toolList.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <ele-modal
  3. width="80%"
  4. :visible.sync="visible"
  5. :close-on-click-modal="false"
  6. custom-class="ele-dialog-form"
  7. append-to-body
  8. :maxable="true"
  9. :resizable="true"
  10. >
  11. <div class="ele-body" style="height:60vh;overflow: auto;">
  12. <el-card shadow="never" v-loading="loading">
  13. <ele-split-layout
  14. width="210px"
  15. allow-collapse
  16. :right-style="{ overflow: 'hidden' }"
  17. >
  18. <div class="ele-border-lighter sys-organization-list">
  19. <el-tree
  20. ref="tree"
  21. :data="data"
  22. highlight-current
  23. :draggable="true"
  24. node-key="id"
  25. :expand-on-click-node="false"
  26. :default-expand-all="true"
  27. @node-click="onNodeClick"
  28. >
  29. </el-tree>
  30. </div>
  31. <template v-slot:content>
  32. <ele-pro-table
  33. ref="table"
  34. :columns="columns"
  35. :datasource="datasource"
  36. tool-class="ele-toolbar-form"
  37. :needPage="false"
  38. row-key="id"
  39. :selection.sync="selection"
  40. :toolbar="false"
  41. >
  42. </ele-pro-table>
  43. </template>
  44. </ele-split-layout>
  45. </el-card>
  46. </div>
  47. <template v-slot:footer>
  48. <el-button @click="fileShow = false">取消</el-button>
  49. <el-button type="primary" @click="addTemplate"> 确认 </el-button>
  50. </template>
  51. </ele-modal>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. loading: false,
  58. visible: false,
  59. datasource:[],
  60. columns:[
  61. {
  62. width: 45,
  63. type: 'selection',
  64. columnKey: 'selection',
  65. align: 'center'
  66. },
  67. {
  68. columnKey: 'index',
  69. type: 'index',
  70. width: 50,
  71. align: 'center',
  72. label: '序号',
  73. showOverflowTooltip: true,
  74. fixed: 'left'
  75. },
  76. {
  77. prop: 'categoryCode',
  78. label: '物品编码',
  79. align: 'center',
  80. showOverflowTooltip: true
  81. },
  82. {
  83. slot: 'categoryName',
  84. prop: 'categoryName',
  85. label: '物品名称',
  86. align: 'center',
  87. showOverflowTooltip: true,
  88. minWidth: 200
  89. },
  90. {
  91. prop: 'brandNum',
  92. label: '牌号',
  93. align: 'center',
  94. showOverflowTooltip: true
  95. },
  96. {
  97. prop: 'categoryModel',
  98. label: '型号',
  99. align: 'center',
  100. showOverflowTooltip: true
  101. },
  102. {
  103. prop: 'specification',
  104. label: '规格',
  105. align: 'center',
  106. showOverflowTooltip: true
  107. },
  108. {
  109. prop: 'measureQuantity',
  110. label: '计量数量',
  111. sortable: 'custom',
  112. showOverflowTooltip: true,
  113. width: 130,
  114. align: 'center'
  115. },
  116. {
  117. prop: 'measureUnit',
  118. label: '计量单位',
  119. align: 'center'
  120. },
  121. {
  122. prop: 'weight',
  123. label: '重量',
  124. showOverflowTooltip: true
  125. },
  126. {
  127. prop: 'weightUnit',
  128. label: '重量单位',
  129. showOverflowTooltip: true
  130. },
  131. ],
  132. data: [],
  133. }
  134. },
  135. methods: {
  136. open(val, type, sList) {
  137. debugger;
  138. this.visible = true;
  139. this.type = type;
  140. this.sList = sList;
  141. },
  142. onNodeClick() {
  143. }
  144. },
  145. }
  146. </script>