index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
  3. :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
  4. :exportList="exportList">
  5. </template-page>
  6. </template>
  7. <script>
  8. import TemplatePage from '@/components/template/template-page-1.vue'
  9. import import_mixin from '@/components/template/import_mixin.js'
  10. import { settleExpenseList, settleExpenseListExport } from "@/api/costPerDimension";
  11. export default {
  12. components: { TemplatePage },
  13. mixins: [import_mixin],
  14. data() {
  15. return {
  16. // 事件组合
  17. optionsEvensGroup: [],
  18. // 表格属性
  19. tableAttributes: {
  20. // 启用勾选列
  21. selectColumn: false
  22. },
  23. // 表格事件
  24. tableEvents: {
  25. 'selection-change': this.selectionChange
  26. },
  27. // 勾选选中行
  28. recordSelected: [],
  29. }
  30. },
  31. computed: {
  32. // 更多参数
  33. moreParameters() {
  34. return []
  35. },
  36. formItems() {
  37. return []
  38. }
  39. },
  40. methods: {
  41. // 列表请求函数
  42. getList: settleExpenseList,
  43. // 列表导出函数
  44. exportList: settleExpenseListExport,
  45. // 表格列解析渲染数据更改
  46. columnParsing(item, defaultData) {
  47. return defaultData
  48. },
  49. // 监听勾选变化
  50. selectionChange(data) {
  51. this.recordSelected = data
  52. },
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped></style>