index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <span>医师姓名:</span>
  5. <el-input v-model="listQuery.productName" placeholder="医师姓名" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
  6. <span>审核状态:</span>
  7. <el-select
  8. v-model="listQuery.auditStatus"
  9. placeholder="审核状态"
  10. clearable
  11. style="width: 200px"
  12. class="filter-item"
  13. @change="getList"
  14. >
  15. <el-option label="全部" value="" />
  16. <el-option label="待审核" :value="2" />
  17. <el-option label="审核通过" :value="1" />
  18. <el-option label="审核未通过" :value="0" />
  19. </el-select>
  20. <span>上线状态:</span>
  21. <el-select
  22. v-model="listQuery.status"
  23. placeholder="上线状态"
  24. clearable
  25. style="width: 200px"
  26. class="filter-item"
  27. @change="getList"
  28. >
  29. <el-option label="全部" value="" />
  30. <el-option label="已上线" :value="1" />
  31. <el-option label="待上线" :value="2" />
  32. <el-option label="未上线" :value="0" />
  33. </el-select>
  34. <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
  35. <el-button type="primary" icon="el-icon-edit" @click="$_navigationTo('/doctor/add')">添加</el-button>
  36. </div>
  37. <!-- 表格区域 -->
  38. <el-table
  39. :key="tableKey"
  40. v-loading="listLoading"
  41. :data="list"
  42. border
  43. fit
  44. highlight-current-row
  45. style="width: 100%;"
  46. header-row-class-name="tableHeader"
  47. >
  48. <el-table-column label="序号" :index="indexMethod" type="index" align="center" width="80" />
  49. <el-table-column label="医生姓名" align="center" prop="productName" />
  50. <el-table-column label="从业资格证编号" align="center" prop="snCode" />
  51. <el-table-column label="审核状态" width="220px" align="center">
  52. <template slot-scope="{ row }">
  53. <el-tag v-if="row.auditStatus === 2" size="small" type="warning">待审核</el-tag>
  54. <el-tag v-if="row.auditStatus === 1" size="small" type="success">审核通过</el-tag>
  55. <!-- 未通过原因展示 -->
  56. <template v-if="row.auditStatus === 0">
  57. <!-- <span class="status danger">审核未通过&nbsp;</span> -->
  58. <el-popover
  59. placement="top-start"
  60. title="审核说明"
  61. width="400"
  62. trigger="hover"
  63. :content="row.invalidReason"
  64. >
  65. <el-tag slot="reference" size="small" type="danger" class="reason">
  66. <span>审核未通过</span>
  67. <span class="el-icon-question status danger " />
  68. </el-tag>
  69. </el-popover>
  70. <!-- 未通过原因展示END -->
  71. </template>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="上线状态" width="140px" align="center">
  75. <template slot-scope="{row}">
  76. <!-- 只有审核通过了才能操作上下线 auditStatus :审核状态 -->
  77. <template v-if="row.auditStatus === 1">
  78. <template v-if="row.status === 0">
  79. <span style="margin-right:10px;" class="status danger">已下线</span>
  80. <el-button v-if="isProxy" type="primary" size="mini" @click="handleChangeStatus(row)">上线</el-button>
  81. </template>
  82. <template v-else>
  83. <span style="margin-right:10px;" class="status success ">已上线</span>
  84. <el-button v-if="isProxy" type="info" size="mini" @click="handleChangeStatus(row)">下线</el-button>
  85. </template>
  86. </template>
  87. <template v-else>
  88. <!-- <el-tag type="warning">待上线</el-tag> -->
  89. <span style="margin-right:10px;" class="status warning">待上线</span>
  90. </template>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="创建时间" class-name="status-col" width="300px" align="center">
  94. <template slot-scope="{row}">
  95. <span>{{ row.createTime | formatTime }}</span>
  96. </template>
  97. </el-table-column>
  98. <!-- <el-table-column v-if="false" label="创建人" width="180px" align="center" prop="createBy" /> -->
  99. <el-table-column label="操作" align="center" width="240px" class-name="small-padding fixed-width">
  100. <template slot-scope="{row}">
  101. <template v-if="userIdentity === 2|| proxyInfo !== null">
  102. <el-button type="default" size="mini" @click="$_navigationTo(`edit?id=${row.productId}`)">
  103. 编辑
  104. </el-button>
  105. <el-button type="danger" size="mini" @click="handleRemoveDoctor(row)">
  106. 删除
  107. </el-button>
  108. </template>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <!-- 页码 -->
  113. <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
  114. </div>
  115. </template>
  116. <script>
  117. import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  118. export default {
  119. components: { Pagination },
  120. data() {
  121. return {
  122. listLoading: false,
  123. tableKey: 0,
  124. total: 0,
  125. listQuery: {
  126. status: '',
  127. auditStatus: '',
  128. authId: '',
  129. productName: '',
  130. snCode: '',
  131. pageNum: 1,
  132. pageSize: 10
  133. },
  134. list: []
  135. }
  136. },
  137. methods: {
  138. getList() {},
  139. handleChangeStatus() {},
  140. handleRemoveDoctor() {},
  141. indexMethod(index) {
  142. return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
  143. }
  144. }
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. .filter-container{
  149. span{
  150. display: inline-block;
  151. margin-bottom: 10px;
  152. vertical-align: middle;
  153. font-size: 14px;
  154. }
  155. .el-button{
  156. display: inline-block;
  157. margin-bottom: 10px;
  158. vertical-align: middle;
  159. }
  160. .el-input,.el-select{
  161. margin-right: 10px;
  162. margin-left: 10px;
  163. }
  164. }
  165. </style>