730fb82eb6641c0a9ab51f8f28b1cc31ec25ba2d.svn-base 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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-xskcxjg
  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-xskcxjg>
  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. <el-col :span="20">
  26. <component v-if="showTable" :is="option.value" :ids="ids" type="034"
  27. :newYear="newYear"></component>
  28. </el-col>
  29. </el-tab-pane>
  30. </el-tabs>
  31. </el-main>
  32. </el-container>
  33. </el-container>
  34. <!-- 添加/编辑人员弹窗 -->
  35. </div>
  36. </template>
  37. <script>
  38. import report_xmjc from "./xskcxjg/report_xmjc.vue";
  39. import report_xmcc from "./xskcxjg/report_xmcc.vue";
  40. import report_dssjgxm from "./xskcxjg/report_dssjgxm.vue";
  41. import report_dssjgxmcc from "./xskcxjg/report_dssjgxmcc.vue";
  42. import report_wthz from "./xskcxjg/report_wthz.vue";
  43. import report_jcry from "./xskcxjg/report_jcry.vue";
  44. import exportTreeListWithCheckBoxXskcxjg from "./exportTreeListWithCheckBox_xry";
  45. export default {
  46. components: {
  47. report_xmjc,
  48. report_xmcc,
  49. report_dssjgxm,
  50. report_dssjgxmcc,
  51. report_wthz,
  52. report_jcry,
  53. exportTreeListWithCheckBoxXskcxjg: exportTreeListWithCheckBoxXskcxjg,
  54. },
  55. props: [],
  56. data() {
  57. return {
  58. options: [
  59. {
  60. value: "report_xmjc",
  61. label: "附件3-1在建小型水库除险加固项目检查表"
  62. },
  63. {
  64. value: "report_xmcc",
  65. label: "附件3-2在建小型水库除险加固项目抽查情况统计表"
  66. },
  67. {
  68. value: "report_dssjgxm",
  69. label: "附件4-1待实施小型水库除险加固项目检查表"
  70. },
  71. {
  72. value: "report_dssjgxmcc",
  73. label: "附件4-2待实施小型水库除险加固项目抽查情况统计表"
  74. },
  75. {
  76. value: "report_wthz",
  77. label: "附件5检查发现问题汇总表"
  78. },
  79. {
  80. value: "report_jcry",
  81. label: "附件7检查人员情况表"
  82. }
  83. ],
  84. value: "",
  85. currentViewId: "附件3-1在建小型水库除险加固项目检查表",
  86. showTable: true,
  87. currentNodeType: "",
  88. ids: [],
  89. pid: "000",
  90. pidNodes: [],
  91. type: "034",
  92. dxdcMainHeight: window.innerHeight - 180,
  93. dxdcAsideHeight: window.innerHeight - 180,
  94. windowHeight: window.innerHeight - 200,
  95. windowWidth: window.innerWidth - 350,
  96. treeWidth: 250,
  97. newYear: ""
  98. };
  99. },
  100. computed: {
  101. persId() {
  102. return localStorage.getItem("userid")
  103. ? localStorage.getItem("userid")
  104. : "1098101939614724096";
  105. }
  106. },
  107. mounted() {
  108. this.treeWidth = this.$refs.elw.$el.clientWidth;
  109. },
  110. watch: {},
  111. methods: {
  112. //树节点选中或取消事件
  113. treeCheckedDataChange(params) {
  114. // 如果是选中状态,把元素id加入到ids里
  115. if (params.newStatus) {
  116. params.newCheckedArray.forEach((element, index) => {
  117. let id = element.id;
  118. if (id != null && id !== undefined && id !== "") {
  119. this.ids.push(id);
  120. }
  121. });
  122. } else {
  123. // 删除取消的元素id
  124. params.changedItem.forEach((element, index) => {
  125. let id = element.id;
  126. let inx = this.ids.indexOf(id);
  127. if (inx > -1) {
  128. delete this.ids[inx];
  129. }
  130. });
  131. }
  132. // 去重
  133. this.ids = Array.from(new Set(this.ids));
  134. console.log("ids:" + this.ids);
  135. },
  136. changeYear(val) {
  137. this.newYear = val;
  138. this.ids = [];
  139. },
  140. }
  141. };
  142. </script>
  143. <style>
  144. </style>