changeList.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <div>
  3. <ele-pro-table
  4. ref="table"
  5. :needPage="false"
  6. :columns="columns"
  7. :datasource="datasource"
  8. class="time-form"
  9. >
  10. <!-- 查看详情列 -->
  11. <template v-slot:contractName="{ row }">
  12. <el-link type="primary" :underline="false" @click="openDetail(row)">
  13. {{ row.contractName }}
  14. </el-link>
  15. </template>
  16. </ele-pro-table>
  17. <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
  18. </div>
  19. </template>
  20. <script>
  21. import { reviewStatus } from '@/enum/dict';
  22. import { getTableList } from '@/api/contractManage/contractChange.js';
  23. import detailDialog from './detailDialog1.vue';
  24. export default {
  25. components: { detailDialog },
  26. data() {
  27. return {
  28. datasource: [],
  29. columns: [
  30. {
  31. width: 60,
  32. label: '序号',
  33. type: 'index',
  34. columnKey: 'index',
  35. align: 'center'
  36. },
  37. {
  38. minWidth: 200,
  39. prop: 'changeCode',
  40. label: '编码',
  41. align: 'center',
  42. slot: 'changeCode',
  43. showOverflowTooltip: true
  44. },
  45. {
  46. minWidth: 200,
  47. prop: 'contractName',
  48. label: '变更合同',
  49. slot: 'contractName',
  50. align: 'center',
  51. showOverflowTooltip: true
  52. },
  53. {
  54. minWidth: 200,
  55. prop: 'reason',
  56. label: '变更原因',
  57. align: 'center',
  58. showOverflowTooltip: true
  59. },
  60. {
  61. minWidth: 80,
  62. prop: 'remark',
  63. label: '变更描述',
  64. align: 'center',
  65. showOverflowTooltip: true
  66. },
  67. {
  68. prop: 'approvalStatus',
  69. label: '审核状态',
  70. align: 'center',
  71. showOverflowTooltip: true,
  72. minWidth: 100,
  73. formatter: (_row, _column, cellValue) => {
  74. return reviewStatus[_row.approvalStatus];
  75. }
  76. },
  77. {
  78. minWidth: 100,
  79. prop: 'createUserName',
  80. label: '创建人',
  81. align: 'center',
  82. showOverflowTooltip: true
  83. },
  84. {
  85. minWidth: 100,
  86. prop: 'createTime',
  87. label: '创建时间',
  88. align: 'center',
  89. showOverflowTooltip: true
  90. }
  91. ]
  92. };
  93. },
  94. methods: {
  95. //查看详情
  96. openDetail(row) {
  97. this.$refs.contactDetailDialogRef.open({id:row.contractId});
  98. },
  99. init(id) {
  100. getTableList({
  101. pageNum: 1,
  102. size: 100,
  103. contractId: id
  104. }).then((res) => {
  105. this.datasource=res.list
  106. });
  107. }
  108. }
  109. };
  110. </script>
  111. <style lang="scss" scoped></style>