index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :exportList="exportList"
  6. :columnParsing="columnParsing"
  7. :optionsEvensGroup="optionsEvensGroup"
  8. :morePlan="morePlan"
  9. :operationColumnWidth="200"
  10. :operation="operation()"
  11. >
  12. <Popu v-if="visible">
  13. <el-page-header slot="head" content="" @back="handleClose" />
  14. <InsuranceContractForm
  15. :item="item"
  16. :type="showType"
  17. @success="
  18. () => {
  19. handleClose()
  20. $refs.pageRef.refreshList()
  21. }
  22. "
  23. />
  24. </Popu>
  25. </template-page>
  26. </template>
  27. <script>
  28. import TemplatePage from '@/components/template/template-page-1.vue'
  29. import import_mixin from '@/components/template/import_mixin.js'
  30. import Popu from '@/components/template/popu.vue'
  31. import InsuranceContractForm from './InsuranceContractForm.vue'
  32. import operation_mixin from '@/components/template/operation_mixin.js'
  33. import { workerApplyList, workerApplyListExport } from '@/api/difficultyExpenseApproval.js'
  34. export default {
  35. components: { TemplatePage, Popu, InsuranceContractForm },
  36. mixins: [import_mixin, operation_mixin],
  37. data() {
  38. return {
  39. morePlan: [],
  40. // 事件组合
  41. optionsEvensGroup: [],
  42. // 表格属性
  43. tableAttributes: {
  44. // 启用勾选列
  45. selectColumn: true
  46. },
  47. // 表格事件
  48. tableEvents: {
  49. 'selection-change': this.selectionChange
  50. },
  51. recordSelected: [],
  52. visible: false,
  53. item: null,
  54. showType: null
  55. }
  56. },
  57. methods: {
  58. // 列表请求函数
  59. getList: workerApplyList,
  60. // 导出
  61. exportList: workerApplyListExport,
  62. // 表格列解析渲染数据更改
  63. columnParsing(item, defaultData) {
  64. return defaultData
  65. },
  66. // 监听勾选变化
  67. selectionChange(data) {
  68. this.recordSelected = data
  69. },
  70. operation() {
  71. return this.operationBtn({
  72. networkAudit: {
  73. conditions: ({ row, index, column }) => {
  74. return row.websitStatus == 1
  75. },
  76. click: ({ row, index, column }) => {
  77. this.item = row
  78. this.visible = true
  79. this.showType = 1
  80. }
  81. },
  82. centralAudit: {
  83. conditions: ({ row, index, column }) => {
  84. return row.status == 3
  85. },
  86. click: ({ row, index, column }) => {
  87. this.item = row
  88. this.visible = true
  89. this.showType = 2
  90. }
  91. },
  92. details: {
  93. click: ({ row, index, column }) => {
  94. this.item = row
  95. this.visible = true
  96. this.showType = 3
  97. }
  98. }
  99. })
  100. },
  101. // 关闭新增弹窗
  102. handleClose() {
  103. this.visible = false
  104. this.item = null
  105. this.showType = null
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped></style>