delayRecordList.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :get-list="getList"
  5. :export-list="exportList"
  6. :operation="operation()"
  7. :options-evens-group="optionsEvensGroup"
  8. :column-parsing="columnParsing"
  9. >
  10. <popu v-if="visible">
  11. <el-page-header slot="head" content="政策延期" @back="handleClose" />
  12. <!-- <delay-record-form /> -->
  13. </popu>
  14. </template-page>
  15. </template>
  16. <script>
  17. import TemplatePage from '@/components/template/template-page-1.vue'
  18. import import_mixin from '@/components/template/import_mixin.js'
  19. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  20. // import DelayRecordForm from '../sales_policy/components/delayRecordForm.vue';
  21. import Popu from '@/components/template/popu.vue'
  22. import { getDealerListV2, exportDealerListV2 } from '@/api/basic_data/dealer'
  23. export default {
  24. components: { TemplatePage, Popu, },
  25. mixins: [import_mixin, add_callback_mixin],
  26. data() {
  27. return {
  28. visible: false,
  29. // 事件组合
  30. optionsEvensGroup: [
  31. [
  32. [
  33. {
  34. name: '新增',
  35. click: this.addOn(() => {
  36. this.visible = true
  37. })
  38. // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
  39. }
  40. ]
  41. ]
  42. ],
  43. // 表格属性
  44. tableAttributes: {
  45. // 启用勾选列
  46. selectColumn: true
  47. }, // 关闭新增弹窗
  48. // 表格事件
  49. tableEvents: {
  50. 'selection-change': this.selectionChange
  51. },
  52. recordSelected: [],
  53. detailsId: ''
  54. }
  55. },
  56. methods: {
  57. // 列表请求函数
  58. getList(...p) {
  59. this.recordSelected = []
  60. return getDealerListV2(...p)
  61. },
  62. // 列表导出函数
  63. exportList: exportDealerListV2,
  64. // 表格列解析渲染数据更改
  65. columnParsing(item, defaultData) {
  66. return defaultData
  67. },
  68. // 监听勾选变化
  69. selectionChange(data) {
  70. this.recordSelected = data
  71. },
  72. operation() {
  73. return (h, { row, index, column }) => {
  74. return (
  75. <div class='operation-btns'>
  76. <el-button
  77. size='mini'
  78. type='text'
  79. onClick={ () => {
  80. this.visible = true
  81. this.detailsId = row.id
  82. }}
  83. >
  84. 查看
  85. </el-button>
  86. </div>
  87. )
  88. }
  89. },
  90. handleClose() {
  91. this.addOff(() => {
  92. this.visible = false
  93. })()
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped></style>