plan_list.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :exportList="exportList"
  6. :operation="operation()"
  7. :optionsEvensGroup="optionsEvensGroup"
  8. :columnParsing="columnParsing"
  9. >
  10. </template-page>
  11. </template>
  12. <script>
  13. import TemplatePage from '@/components/template/template-page-1.vue'
  14. import import_mixin from '@/components/template/import_mixin.js'
  15. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  16. import Popu from '@/components/template/popu.vue'
  17. import { getPlanListV2, exportPlanListV2 } from '@/api/supply/purchase'
  18. import { getDictList } from '@/api/common'
  19. export default {
  20. components: { TemplatePage, Popu },
  21. mixins: [import_mixin, add_callback_mixin],
  22. data() {
  23. return {
  24. visible: false,
  25. // 事件组合
  26. optionsEvensGroup: [],
  27. // 表格属性
  28. tableAttributes: {
  29. // 启用勾选列
  30. selectColumn: true
  31. }, // 关闭新增弹窗
  32. // 表格事件
  33. tableEvents: {
  34. 'selection-change': this.selectionChange
  35. },
  36. recordSelected: []
  37. }
  38. },
  39. methods: {
  40. // 列表请求函数
  41. getList(...p) {
  42. this.recordSelected = []
  43. return getPlanListV2(...p)
  44. },
  45. // 列表导出函数
  46. exportList: exportPlanListV2,
  47. // 表格列解析渲染数据更改
  48. columnParsing(item, defaultData) {
  49. return defaultData
  50. },
  51. // 监听勾选变化
  52. selectionChange(data) {
  53. this.recordSelected = data
  54. },
  55. operation() {
  56. return (h, { row, index, column }) => {
  57. return (
  58. <div class="operation-btns">
  59. {/* <el-button
  60. size="mini"
  61. type="text"
  62. onClick={ () => {
  63. this.visible = true
  64. this.detailsId = row.id
  65. }}
  66. >
  67. 查看
  68. </el-button> */}
  69. </div>
  70. )
  71. }
  72. },
  73. handleClose() {
  74. this.addOff(() => {
  75. this.visible = false
  76. })()
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped></style>