ec12cc853c86734e678528616c5ddedfbe88ef01.svn-base 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-container>
  5. <el-main id="dxdcListMain" style="padding:5px 20px;">
  6. <el-tabs v-model="currentViewId" type="card">
  7. <el-col :span="4" ref="elw">
  8. <el-card :body-style="{'padding':'0'}">
  9. <export-tree-list-with-check-box-dfxgxd
  10. :pid="pid"
  11. :type="type"
  12. :pidNodes="pidNodes"
  13. :height="dxdcAsideHeight"
  14. :width="treeWidth"
  15. @treeCheckedDataChange="treeCheckedDataChange"
  16. @changeYear="changeYear"
  17. ></export-tree-list-with-check-box-dfxgxd>
  18. </el-card>
  19. </el-col>
  20. <el-tab-pane
  21. :label="option.label"
  22. :name="option.label"
  23. v-for="option in options"
  24. :key="option.value"
  25. >
  26. <!-- <component v-if="currentViewId == option.label" :is="option.value"></component> -->
  27. <el-col :span="20">
  28. <component v-if="showTable" :is="option.value" :ids="ids" type="001"
  29. :newYear="newYear"></component>
  30. </el-col>
  31. </el-tab-pane>
  32. </el-tabs>
  33. </el-main>
  34. </el-container>
  35. </el-container>
  36. <!-- 添加/编辑人员弹窗 -->
  37. </div>
  38. </template>
  39. <script>
  40. import report_dfxgxd1 from "./report_dfxgxd1.vue";
  41. import report_dfxgxd2 from "./report_dfxgxd2.vue";
  42. import report_dfxgxd3 from "./report_dfxgxd3.vue";
  43. import report_dfxgxd4 from "./report_dfxgxd4.vue";
  44. import report_dfxgxd5 from "./report_dfxgxd5.vue";
  45. import report_dfxgxd6 from "./report_dfxgxd6.vue";
  46. import exportTreeListWithCheckBoxDfxgxd from "./exportTreeListWithCheckBox_xry";
  47. export default {
  48. components: {
  49. report_dfxgxd1: report_dfxgxd1,
  50. report_dfxgxd2: report_dfxgxd2,
  51. report_dfxgxd3: report_dfxgxd3,
  52. report_dfxgxd4: report_dfxgxd4,
  53. report_dfxgxd5: report_dfxgxd5,
  54. report_dfxgxd6: report_dfxgxd6,
  55. exportTreeListWithCheckBoxDfxgxd: exportTreeListWithCheckBoxDfxgxd,
  56. },
  57. props: [],
  58. data() {
  59. return {
  60. options: [
  61. {
  62. value: "report_dfxgxd1",
  63. label: "附件1 检查人员情况表"
  64. },
  65. {
  66. value: "report_dfxgxd2",
  67. label: "附件2 检查堤防工程险工险段基本情况表"
  68. },
  69. {
  70. value: "report_dfxgxd3",
  71. label: "附件3 检查堤防工程险工险段情况统计表"
  72. },
  73. {
  74. value: "report_dfxgxd4",
  75. label: "附件4 检查发现问题汇总表"
  76. },
  77. {
  78. value: "report_dfxgxd5",
  79. label: "附件5 责任追究建议"
  80. },
  81. {
  82. value: "report_dfxgxd6",
  83. label: "附件6 检查堤防工程险工险段情况表"
  84. }
  85. ],
  86. value: "",
  87. currentViewId: "附件1 检查人员情况表",
  88. showTable: true,
  89. currentNodeType: "",
  90. ids: [],
  91. pid: "000",
  92. pidNodes: [],
  93. type: "029",
  94. dxdcMainHeight: window.innerHeight - 180,
  95. dxdcAsideHeight: window.innerHeight - 180,
  96. windowHeight: window.innerHeight - 200,
  97. windowWidth: window.innerWidth - 350,
  98. treeWidth: 250,
  99. newYear: ""
  100. };
  101. },
  102. computed: {
  103. persId() {
  104. return localStorage.getItem("userid")
  105. ? localStorage.getItem("userid")
  106. : "1098101939614724096";
  107. }
  108. },
  109. mounted() {
  110. this.treeWidth = this.$refs.elw.$el.clientWidth;
  111. },
  112. watch: {},
  113. methods: {
  114. //树节点选中或取消事件
  115. treeCheckedDataChange(params) {
  116. // 如果是选中状态,把元素id加入到ids里
  117. if (params.newStatus) {
  118. params.newCheckedArray.forEach((element, index) => {
  119. let id = element.id;
  120. if (id != null && id !== undefined && id !== "") {
  121. this.ids.push(id);
  122. }
  123. });
  124. } else {
  125. // 删除取消的元素id
  126. params.changedItem.forEach((element, index) => {
  127. let id = element.id;
  128. let inx = this.ids.indexOf(id);
  129. if (inx > -1) {
  130. delete this.ids[inx];
  131. }
  132. });
  133. }
  134. // 去重
  135. this.ids = Array.from(new Set(this.ids));
  136. console.log("ids:" + this.ids);
  137. },
  138. changeYear(val) {
  139. this.newYear = val;
  140. this.ids = [];
  141. },
  142. }
  143. };
  144. </script>
  145. <style>
  146. </style>