|
@@ -1,183 +1,200 @@
|
|
-<template>
|
|
|
|
- <div class="app-container">
|
|
|
|
- <div class="filter-container">
|
|
|
|
- <div class="filter-control">
|
|
|
|
- <span>操作师姓名:</span>
|
|
|
|
- <el-input v-model="listQuery.doctorName" placeholder="操作师姓名" @keyup.enter.native="handleFilter" />
|
|
|
|
- </div>
|
|
|
|
- <div class="filter-control">
|
|
|
|
- <span>审核状态:</span>
|
|
|
|
- <el-select v-model="listQuery.auditStatus" placeholder="审核状态" clearable @change="getList">
|
|
|
|
- <el-option label="全部" value="" />
|
|
|
|
- <el-option label="待审核" :value="2" />
|
|
|
|
- <el-option label="审核通过" :value="1" />
|
|
|
|
- <el-option label="审核未通过" :value="0" />
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- <div class="filter-control">
|
|
|
|
- <span>上线状态:</span>
|
|
|
|
- <el-select v-model="listQuery.status" placeholder="上线状态" clearable @change="getList">
|
|
|
|
- <el-option label="全部" value="" />
|
|
|
|
- <el-option label="已上线" :value="1" />
|
|
|
|
- <el-option label="待上线" :value="2" />
|
|
|
|
- <el-option label="未上线" :value="0" />
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- <div class="filter-control">
|
|
|
|
- <permission-button type="primary" @click="getList">查询</permission-button>
|
|
|
|
- <permission-button type="primary" @click="navigationTo('add?type=add')">添加</permission-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 表格区域 -->
|
|
|
|
- <el-table
|
|
|
|
- :key="tableKey"
|
|
|
|
- :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="doctorName" />
|
|
|
|
- <el-table-column label="从业资格证编号" align="center" prop="certificateNo" />
|
|
|
|
-
|
|
|
|
- <el-table-column label="审核状态" width="120px" align="center">
|
|
|
|
- <template slot-scope="{ row }">
|
|
|
|
- <audit-status :status="row.auditStatus" :reason="row.invalidReason" />
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
-
|
|
|
|
- <el-table-column label="上线状态" width="160px" 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>
|
|
|
|
- <permission-button type="primary" size="mini" @click="handleChangeStatus(row)">上线</permission-button>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <span style="margin-right: 10px" class="status success">已上线</span>
|
|
|
|
- <permission-button type="info" size="mini" @click="handleChangeStatus(row)">下线</permission-button>
|
|
|
|
- </template>
|
|
|
|
- </template>
|
|
|
|
- <template v-else-if="row.auditStatus === 2">
|
|
|
|
- <!-- <el-tag type="warning">待上线</el-tag> -->
|
|
|
|
- <span style="margin-right: 10px" class="status warning">待上线</span>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <!-- <el-tag type="warning">待上线</el-tag> -->
|
|
|
|
- <span style="margin-right: 10px" class="status danger">已下线</span>
|
|
|
|
- </template>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="创建时间" class-name="status-col" width="160px" 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 }">
|
|
|
|
- <permission-button type="primary" size="mini" @click="navigationTo(`edit?type=edit&id=${row.doctorId}`)">
|
|
|
|
- 编辑
|
|
|
|
- </permission-button>
|
|
|
|
- <permission-button type="danger" size="mini" @click="handleRemoveDoctor(row)"> 删除 </permission-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <!-- 页码 -->
|
|
|
|
- <pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
|
- </div>
|
|
|
|
-</template>
|
|
|
|
-
|
|
|
|
-<script>
|
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
|
-import { fetchDoctorList, removeDoctor, doctorStatusChange } from '@/api/doctor'
|
|
|
|
-
|
|
|
|
-export default {
|
|
|
|
- name: 'OperateDoctorList',
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- tableKey: 0,
|
|
|
|
- total: 0,
|
|
|
|
- listQuery: {
|
|
|
|
- authUserId: '',
|
|
|
|
- auditStatus: '',
|
|
|
|
- certificateNo: '',
|
|
|
|
- doctorName: '',
|
|
|
|
- doctorType: 1,
|
|
|
|
- listType: 1,
|
|
|
|
- status: '',
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
- },
|
|
|
|
- list: []
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- ...mapGetters(['authUserId'])
|
|
|
|
- },
|
|
|
|
- created() {
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- activated() {
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- // 获取列表
|
|
|
|
- getList() {
|
|
|
|
- this.listQuery.authUserId = this.authUserId
|
|
|
|
- fetchDoctorList(this.listQuery)
|
|
|
|
- .then((res) => {
|
|
|
|
- console.log(res)
|
|
|
|
- this.list = res.data.list
|
|
|
|
- this.total = res.data.total
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- console.log(error)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 修改状态
|
|
|
|
- handleChangeStatus(row) {
|
|
|
|
- const status = row.status === 1 ? 0 : 1
|
|
|
|
-
|
|
|
|
- doctorStatusChange({ doctorId: row.doctorId, status })
|
|
|
|
- .then((res) => {
|
|
|
|
- this.$message.success('状态修改成功')
|
|
|
|
- this.getList()
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- console.log(error)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 删除
|
|
|
|
- async handleRemoveDoctor(row) {
|
|
|
|
- const text = await this.$confirm('确认删除该医师信息吗?删除后不可恢复', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).catch(() => {
|
|
|
|
- this.$message.info('已取消操作')
|
|
|
|
- })
|
|
|
|
- if (text !== 'confirm') return
|
|
|
|
-
|
|
|
|
- removeDoctor({ doctorId: row.doctorId })
|
|
|
|
- .then((res) => {
|
|
|
|
- this.$message.success('删除成功')
|
|
|
|
- this.getList()
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- console.log(error)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 表格索引
|
|
|
|
- indexMethod(index) {
|
|
|
|
- return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-</script>
|
|
|
|
-
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <div class="filter-container">
|
|
|
|
+ <div class="filter-control">
|
|
|
|
+ <span>操作师姓名:</span>
|
|
|
|
+ <el-input v-model="listQuery.doctorName" placeholder="操作师姓名" @keyup.enter.native="handleFilter" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-control">
|
|
|
|
+ <span>审核状态:</span>
|
|
|
|
+ <el-select v-model="listQuery.auditStatus" placeholder="审核状态" clearable @change="getList">
|
|
|
|
+ <el-option label="全部" value="" />
|
|
|
|
+ <el-option label="待审核" :value="2" />
|
|
|
|
+ <el-option label="审核通过" :value="1" />
|
|
|
|
+ <el-option label="审核未通过" :value="0" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-control">
|
|
|
|
+ <span>上线状态:</span>
|
|
|
|
+ <el-select v-model="listQuery.status" placeholder="上线状态" clearable @change="getList">
|
|
|
|
+ <el-option label="全部" value="" />
|
|
|
|
+ <el-option label="已上线" :value="1" />
|
|
|
|
+ <el-option label="待上线" :value="2" />
|
|
|
|
+ <el-option label="未上线" :value="0" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-control">
|
|
|
|
+ <permission-button type="primary" @click="getList">查询</permission-button>
|
|
|
|
+ <permission-button type="primary" @click="navigationTo('add?type=add')">添加</permission-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 表格区域 -->
|
|
|
|
+ <el-table
|
|
|
|
+ :key="tableKey"
|
|
|
|
+ :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="doctorName" />
|
|
|
|
+ <el-table-column label="从业资格证编号" align="center" prop="certificateNo" />
|
|
|
|
+
|
|
|
|
+ <el-table-column label="审核状态" width="120px" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <audit-status :status="row.auditStatus" :reason="row.invalidReason" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column label="上线状态" width="160px" 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>
|
|
|
|
+ <permission-button type="primary" size="mini" @click="handleChangeStatus(row)">上线</permission-button>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <span style="margin-right: 10px" class="status success">已上线</span>
|
|
|
|
+ <permission-button type="info" size="mini" @click="handleChangeStatus(row)">下线</permission-button>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="row.auditStatus === 2">
|
|
|
|
+ <!-- <el-tag type="warning">待上线</el-tag> -->
|
|
|
|
+ <span style="margin-right: 10px" class="status warning">待上线</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <!-- <el-tag type="warning">待上线</el-tag> -->
|
|
|
|
+ <span style="margin-right: 10px" class="status danger">已下线</span>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="创建时间" class-name="status-col" width="160px" 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 }">
|
|
|
|
+ <permission-button type="primary" size="mini" @click="navigationTo(`edit?type=edit&id=${row.doctorId}`)">
|
|
|
|
+ 编辑
|
|
|
|
+ </permission-button>
|
|
|
|
+ <permission-button type="danger" size="mini" @click="handleRemoveDoctor(row)"> 删除 </permission-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="handleShowQRcode(row)">
|
|
|
|
+ 二维码
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <!-- 页码 -->
|
|
|
|
+ <pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
|
+ <!-- 二维码 -->
|
|
|
|
+ <transition name="fade">
|
|
|
|
+ <qrcode-operator v-if="showQRcode" :operator-info="operatorInfo" @close="showQRcode = false" />
|
|
|
|
+ </transition>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
+import { fetchDoctorList, removeDoctor, doctorStatusChange } from '@/api/doctor'
|
|
|
|
+import QrcodeOperator from '@/components/QrcodeOperator'
|
|
|
|
+export default {
|
|
|
|
+ name: 'OperateDoctorList',
|
|
|
|
+ components: {
|
|
|
|
+ QrcodeOperator
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ tableKey: 0,
|
|
|
|
+ total: 0,
|
|
|
|
+ listQuery: {
|
|
|
|
+ authUserId: '',
|
|
|
|
+ auditStatus: '',
|
|
|
|
+ certificateNo: '',
|
|
|
|
+ doctorName: '',
|
|
|
|
+ doctorType: 1,
|
|
|
|
+ listType: 1,
|
|
|
|
+ status: '',
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10
|
|
|
|
+ },
|
|
|
|
+ list: [],
|
|
|
|
+ showQRcode: false, // 二维码
|
|
|
|
+ operatorInfo: {} // 人员信息
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters(['authUserId'])
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ activated() {
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 获取列表
|
|
|
|
+ getList() {
|
|
|
|
+ this.listQuery.authUserId = this.authUserId
|
|
|
|
+ fetchDoctorList(this.listQuery)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.list = res.data.list
|
|
|
|
+ this.total = res.data.total
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 修改状态
|
|
|
|
+ handleChangeStatus(row) {
|
|
|
|
+ const status = row.status === 1 ? 0 : 1
|
|
|
|
+
|
|
|
|
+ doctorStatusChange({ doctorId: row.doctorId, status })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$message.success('状态修改成功')
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 删除
|
|
|
|
+ async handleRemoveDoctor(row) {
|
|
|
|
+ const text = await this.$confirm('确认删除该医师信息吗?删除后不可恢复', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message.info('已取消操作')
|
|
|
|
+ })
|
|
|
|
+ if (text !== 'confirm') return
|
|
|
|
+
|
|
|
|
+ removeDoctor({ doctorId: row.doctorId })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$message.success('删除成功')
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 表格索引
|
|
|
|
+ indexMethod(index) {
|
|
|
|
+ return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
|
|
+ },
|
|
|
|
+ // 二维码
|
|
|
|
+ handleShowQRcode(row) {
|
|
|
|
+ this.operatorInfo = row
|
|
|
|
+ this.showQRcode = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped></style>
|