index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <ele-pro-table
  3. ref="table"
  4. :columns="columns"
  5. :datasource="tableList"
  6. class="dict-table"
  7. tool-class="ele-toolbar-form"
  8. :need-page="false"
  9. >
  10. <template v-slot:code="{ row }">
  11. <el-link type="primary" :underline="false" @click="openDetail(row)">{{
  12. row.code
  13. }}</el-link>
  14. <p class="ele-text-info">
  15. {{ getDictValue('客户/供应商资质类型', row.type) }}
  16. </p>
  17. </template>
  18. <template v-slot:time="{ row }">
  19. <p>起:{{ row.validityStartTime }}</p>
  20. <p class="ele-text-info">止:{{ row.validityEndTime }}</p>
  21. </template>
  22. <template v-slot:createUser="{ row }">
  23. <p>{{ row.createUserName }}</p>
  24. <p>{{ row.createUserDeptName }}</p>
  25. <p class="ele-text-info">{{ row.createTime }}</p>
  26. </template>
  27. <template v-slot:picture="{ row }">
  28. <fileMain v-model="row.fileObj" type="view"></fileMain>
  29. </template>
  30. <ele-modal
  31. :visible.sync="visible"
  32. :close-on-click-modal="false"
  33. width="60%"
  34. :maxable="true"
  35. append-to-body
  36. >
  37. <certificateQualificationsDialog
  38. v-if="visible"
  39. :businessId="businessId"
  40. ></certificateQualificationsDialog>
  41. </ele-modal>
  42. </ele-pro-table>
  43. </template>
  44. <script>
  45. import certificateQualificationsDialog from './certificateQualificationsDialog.vue';
  46. import dictMixins from '@/mixins/dictMixins';
  47. import { holderTypeOptions, reviewStatus } from '@/enum/dict.js';
  48. // import fileMain from '@/components/addDoc/index.vue';
  49. import { identityphotoList } from '@/api/bpm/components/documentManagement';
  50. export default {
  51. mixins: [dictMixins],
  52. components: { certificateQualificationsDialog,
  53. // fileMain
  54. },
  55. data() {
  56. return {
  57. visible: false,
  58. tableList: [],
  59. businessId: '',
  60. columns: [
  61. {
  62. label: '序号',
  63. type: 'index',
  64. width: 55,
  65. align: 'center'
  66. },
  67. // {
  68. // label: '持证类型',
  69. // align: 'center',
  70. // prop: 'holderType',
  71. // formatter: (row) => {
  72. // return holderTypeOptions.find(
  73. // (item) => item.value == row.holderType
  74. // )?.label;
  75. // },
  76. // width: 150
  77. // },
  78. {
  79. align: 'center',
  80. label: '证照编号',
  81. prop: 'code',
  82. slot: 'code',
  83. width: 180
  84. },
  85. {
  86. label: '状态',
  87. align: 'center',
  88. prop: 'status',
  89. formatter: (row) => {
  90. return this.getDictValue('规则状态', row.status);
  91. }
  92. },
  93. {
  94. label: '执证对象',
  95. align: 'center',
  96. prop: 'holder'
  97. },
  98. {
  99. align: 'center',
  100. label: '有效期限',
  101. prop: 'time',
  102. slot: 'time',
  103. minWidth: '180',
  104. showOverflowTooltip: true
  105. },
  106. {
  107. label: '创建人信息',
  108. align: 'center',
  109. prop: 'createUser',
  110. slot: 'createUser',
  111. minWidth: '200',
  112. showOverflowTooltip: true
  113. },
  114. {
  115. label: '证照',
  116. align: 'center',
  117. prop: 'picture',
  118. slot: 'picture'
  119. },
  120. {
  121. label: '备注',
  122. align: 'center',
  123. prop: 'remark',
  124. minWidth: '100',
  125. showOverflowTooltip: true
  126. },
  127. {
  128. label: '审核状态',
  129. prop: 'approvalStatus',
  130. align: 'center',
  131. width: 120,
  132. formatter: (_row, _column, cellValue) => {
  133. return reviewStatus[_row.approvalStatus];
  134. }
  135. }
  136. ]
  137. };
  138. },
  139. created() {
  140. this.requestDict('客户/供应商资质类型');
  141. this.requestDict('规则状态');
  142. },
  143. methods: {
  144. getTable(holderId, holderType) {
  145. identityphotoList({
  146. holderType,
  147. holderId
  148. }).then((res) => {
  149. this.tableList = res;
  150. });
  151. },
  152. openDetail(row) {
  153. this.visible=true
  154. this.businessId = row.id;
  155. }
  156. }
  157. };
  158. </script>
  159. <style class=""></style>