plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
3.6 KiB

2 years ago
  1. <script>
  2. export default {
  3. name: "approvalInformation",
  4. props: {
  5. dataList: {
  6. type: Array,
  7. default: () => [],
  8. },
  9. height: {
  10. type: [String,Number],
  11. default: 300
  12. },
  13. },
  14. model: {
  15. prop: "dataList",
  16. event: "change"
  17. },
  18. data () {
  19. return {
  20. attributeDialog: true,
  21. copyAttributeList: [],
  22. attributeSaveDialog: false,
  23. approvalColumnList: [
  24. // {
  25. // columnProp: 'classificationNo',
  26. // headerAlign: 'center',
  27. // align: 'center',
  28. // columnLabel: '流程分类编码',
  29. // columnHidden: false,
  30. // columnImage: false,
  31. // status: true,
  32. // fixed: '',
  33. // columnWidth: 120
  34. // },
  35. {
  36. columnProp: 'nodeName',
  37. headerAlign: 'center',
  38. align: 'left',
  39. columnLabel: '节点名称',
  40. columnHidden: false,
  41. columnImage: false,
  42. status: true,
  43. fixed: '',
  44. columnWidth: 200
  45. },
  46. {
  47. columnProp: 'rejectFlagDesc',
  48. headerAlign: 'center',
  49. align: 'center',
  50. columnLabel: '是否被驳回',
  51. columnHidden: false,
  52. columnImage: false,
  53. status: true,
  54. fixed: '',
  55. columnWidth: 100
  56. },
  57. {
  58. columnProp: 'rejectNodeName',
  59. headerAlign: 'center',
  60. align: 'center',
  61. columnLabel: '被驳回节点名称',
  62. columnHidden: false,
  63. columnImage: false,
  64. status: true,
  65. fixed: '',
  66. columnWidth: 200
  67. },
  68. {
  69. columnProp: 'nodeConclusionDesc',
  70. headerAlign: 'center',
  71. align: 'center',
  72. columnLabel: '节点结论',
  73. columnHidden: false,
  74. columnImage: false,
  75. status: true,
  76. fixed: '',
  77. columnWidth: 100
  78. },
  79. {
  80. columnProp: 'updateDate',
  81. headerAlign: 'center',
  82. align: 'center',
  83. columnLabel: '审批时间',
  84. columnHidden: false,
  85. columnImage: false,
  86. status: true,
  87. fixed: '',
  88. columnWidth: 170
  89. },
  90. {
  91. columnProp: 'updateBy',
  92. headerAlign: 'center',
  93. align: 'center',
  94. columnLabel: '审批人员',
  95. columnHidden: false,
  96. columnImage: false,
  97. status: true,
  98. fixed: '',
  99. columnWidth: 100
  100. },
  101. {
  102. columnProp: 'rejectOpinion',
  103. headerAlign: 'center',
  104. align: 'left',
  105. columnLabel: '驳回意见',
  106. columnHidden: false,
  107. columnImage: false,
  108. status: true,
  109. fixed: '',
  110. columnWidth: 300
  111. },
  112. ],
  113. searchDataList: [],
  114. }
  115. },
  116. methods:{
  117. },
  118. }
  119. </script>
  120. <template>
  121. <div>
  122. <el-table
  123. :data="dataList"
  124. :height="height"
  125. border
  126. ref="approvalTable"
  127. style="width: 100%;">
  128. <el-table-column
  129. v-for="(item,index) in approvalColumnList" :key="index"
  130. :sortable="item.columnSortable"
  131. :prop="item.columnProp"
  132. :header-align="item.headerAlign"
  133. :show-overflow-tooltip="item.showOverflowTooltip"
  134. :align="item.align"
  135. :fixed="item.fixed === '' ? false : item.fixed"
  136. :min-width="item.columnWidth"
  137. :label="item.columnLabel">
  138. <template slot-scope="scope">
  139. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  140. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  141. </template>
  142. </el-table-column>
  143. </el-table>
  144. </div>
  145. </template>
  146. <style scoped>
  147. </style>