index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :get-list="getList"
  5. :exportList="exportList"
  6. :table-attributes="tableAttributes"
  7. :table-events="tableEvents"
  8. :options-evens-group="optionsEvensGroup"
  9. :moreParameters="moreParameters"
  10. :column-parsing="columnParsing"
  11. >
  12. </template-page>
  13. </template>
  14. <script>
  15. import TemplatePage from '@/components/template/template-page-1.vue'
  16. import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
  17. import { policyOrderListIn, policyOrderListInExport, policyOrderImport } from '@/api/workersCompensationInsurance'
  18. import operation_mixin from '@/components/template/operation_mixin.js'
  19. import import_mixin from '@/components/template/import_mixin.js'
  20. export default {
  21. components: { TemplatePage },
  22. mixins: [operation_mixin, import_mixin],
  23. data() {
  24. return {
  25. // 表格属性
  26. tableAttributes: {
  27. // 启用勾选列
  28. selectColumn: false
  29. },
  30. // 表格事件
  31. tableEvents: {
  32. 'selection-change': this.selectionChange
  33. },
  34. // 勾选选中行
  35. recordSelected: []
  36. }
  37. },
  38. computed: {
  39. // 更多参数
  40. moreParameters() {
  41. return [
  42. {
  43. name: '保单状态',
  44. key: 'policyOrderStatus',
  45. value: '',
  46. conditions: [
  47. {
  48. label: '全部',
  49. value: ''
  50. },
  51. {
  52. label: '待购买',
  53. value: 'DGM'
  54. },
  55. {
  56. label: '保障中',
  57. value: 'BZZ'
  58. },
  59. {
  60. label: '待生效',
  61. value: 'DSX'
  62. },
  63. {
  64. label: '已失效',
  65. value: 'YSX'
  66. }
  67. ]
  68. }
  69. ]
  70. },
  71. optionsEvensGroup() {
  72. return [
  73. [
  74. [
  75. this.optionsEvensAuth('import', ({ moduleName }) => {
  76. return {
  77. name: moduleName,
  78. render: () => {
  79. return this.importButton(policyOrderImport, moduleName)
  80. }
  81. }
  82. })
  83. ]
  84. ]
  85. ]
  86. },
  87. formItems() {
  88. return []
  89. }
  90. },
  91. created() {},
  92. methods: {
  93. // 列表请求函数
  94. getList(p, cb) {
  95. var pam = JSON.parse(JSON.stringify(p))
  96. try {
  97. if (pam.policyOrderStatus) {
  98. pam.params.push({ param: 'policy_order_status', compare: '=', value: pam.policyOrderStatus })
  99. }
  100. cb && cb(pam)
  101. return policyOrderListIn(pam)
  102. } catch (err) {
  103. console.log(err)
  104. }
  105. },
  106. // 列表导出函数
  107. exportList: policyOrderListInExport,
  108. // 表格列解析渲染数据更改
  109. columnParsing(item, defaultData) {
  110. return defaultData
  111. },
  112. // 表格操作列
  113. operation(h, { row, index, column }) {}
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .tab {
  119. padding: 20px 20px 0 20px;
  120. }
  121. </style>