123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <template>
- <div class="app-container">
- <div class="filter-container">
- <span>医师姓名:</span>
- <el-input v-model="listQuery.productName" placeholder="医师姓名" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
- <span>审核状态:</span>
- <el-select
- v-model="listQuery.auditStatus"
- placeholder="审核状态"
- clearable
- style="width: 200px"
- class="filter-item"
- @change="getList"
- >
- <el-option label="全部" value="" />
- <el-option label="待审核" :value="2" />
- <el-option label="审核通过" :value="1" />
- <el-option label="审核未通过" :value="0" />
- </el-select>
- <span>上线状态:</span>
- <el-select
- v-model="listQuery.status"
- placeholder="上线状态"
- clearable
- style="width: 200px"
- class="filter-item"
- @change="getList"
- >
- <el-option label="全部" value="" />
- <el-option label="已上线" :value="1" />
- <el-option label="待上线" :value="2" />
- <el-option label="未上线" :value="0" />
- </el-select>
- <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
- <el-button type="primary" icon="el-icon-edit" @click="$_navigationTo('/doctor/add')">添加</el-button>
- </div>
- <!-- 表格区域 -->
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- :data="list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- header-row-class-name="tableHeader"
- >
- <el-table-column label="序号" :index="indexMethod" type="index" align="center" width="80" />
- <el-table-column label="医生姓名" align="center" prop="productName" />
- <el-table-column label="从业资格证编号" align="center" prop="snCode" />
- <el-table-column label="审核状态" width="220px" align="center">
- <template slot-scope="{ row }">
- <el-tag v-if="row.auditStatus === 2" size="small" type="warning">待审核</el-tag>
- <el-tag v-if="row.auditStatus === 1" size="small" type="success">审核通过</el-tag>
- <!-- 未通过原因展示 -->
- <template v-if="row.auditStatus === 0">
- <!-- <span class="status danger">审核未通过 </span> -->
- <el-popover
- placement="top-start"
- title="审核说明"
- width="400"
- trigger="hover"
- :content="row.invalidReason"
- >
- <el-tag slot="reference" size="small" type="danger" class="reason">
- <span>审核未通过</span>
- <span class="el-icon-question status danger " />
- </el-tag>
- </el-popover>
- <!-- 未通过原因展示END -->
- </template>
- </template>
- </el-table-column>
- <el-table-column label="上线状态" width="140px" align="center">
- <template slot-scope="{row}">
- <!-- 只有审核通过了才能操作上下线 auditStatus :审核状态 -->
- <template v-if="row.auditStatus === 1">
- <template v-if="row.status === 0">
- <span style="margin-right:10px;" class="status danger">已下线</span>
- <el-button v-if="isProxy" type="primary" size="mini" @click="handleChangeStatus(row)">上线</el-button>
- </template>
- <template v-else>
- <span style="margin-right:10px;" class="status success ">已上线</span>
- <el-button v-if="isProxy" type="info" size="mini" @click="handleChangeStatus(row)">下线</el-button>
- </template>
- </template>
- <template v-else>
- <!-- <el-tag type="warning">待上线</el-tag> -->
- <span style="margin-right:10px;" class="status warning">待上线</span>
- </template>
- </template>
- </el-table-column>
- <el-table-column label="创建时间" class-name="status-col" width="300px" align="center">
- <template slot-scope="{row}">
- <span>{{ row.createTime | formatTime }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column v-if="false" label="创建人" width="180px" align="center" prop="createBy" /> -->
- <el-table-column label="操作" align="center" width="240px" class-name="small-padding fixed-width">
- <template slot-scope="{row}">
- <template v-if="userIdentity === 2|| proxyInfo !== null">
- <el-button type="default" size="mini" @click="$_navigationTo(`edit?id=${row.productId}`)">
- 编辑
- </el-button>
- <el-button type="danger" size="mini" @click="handleRemoveDoctor(row)">
- 删除
- </el-button>
- </template>
- </template>
- </el-table-column>
- </el-table>
- <!-- 页码 -->
- <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
- </div>
- </template>
- <script>
- import Pagination from '@/components/Pagination' // secondary package based on el-pagination
- export default {
- components: { Pagination },
- data() {
- return {
- listLoading: false,
- tableKey: 0,
- total: 0,
- listQuery: {
- status: '',
- auditStatus: '',
- authId: '',
- productName: '',
- snCode: '',
- pageNum: 1,
- pageSize: 10
- },
- list: []
- }
- },
- methods: {
- getList() {},
- handleChangeStatus() {},
- handleRemoveDoctor() {},
- indexMethod(index) {
- return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .filter-container{
- span{
- display: inline-block;
- margin-bottom: 10px;
- vertical-align: middle;
- font-size: 14px;
- }
- .el-button{
- display: inline-block;
- margin-bottom: 10px;
- vertical-align: middle;
- }
- .el-input,.el-select{
- margin-right: 10px;
- margin-left: 10px;
- }
- }
- </style>
|