214178261def352d2e1558810f2de7ab0ff148bc.svn-base 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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-skfh
  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-skfh>
  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_skfh1 from "./report_skfh1.vue";
  41. import report_skfh2 from "./report_skfh2.vue";
  42. import report_skfh3 from "./report_skfh3.vue";
  43. import report_skfh4 from "./report_skfh4.vue";
  44. import report_skfh5 from "./report_skfh5.vue";
  45. // 新版
  46. import report_01 from "./skfh/report_01.vue";
  47. import report_02 from "./skfh/report_02.vue";
  48. import report_03 from "./skfh/report_03.vue";
  49. import report_04 from "./skfh/report_04.vue";
  50. import report_05 from "./skfh/report_05.vue";
  51. import report_06 from "./skfh/report_06.vue";
  52. import exportTreeListWithCheckBoxSkfh from "./exportTreeListWithCheckBox_xry";
  53. export default {
  54. components: {
  55. report_skfh1: report_skfh1,
  56. report_skfh2: report_skfh2,
  57. report_skfh3: report_skfh3,
  58. report_skfh4: report_skfh4,
  59. report_skfh5: report_skfh5,
  60. report_01,
  61. report_02,
  62. report_03,
  63. report_04,
  64. report_05,
  65. report_06,
  66. exportTreeListWithCheckBoxSkfh: exportTreeListWithCheckBoxSkfh,
  67. },
  68. props: [],
  69. data() {
  70. return {
  71. options1: [
  72. {
  73. value: "report_skfh1",
  74. label: "附件1 督查人员情况表"
  75. },
  76. {
  77. value: "report_skfh2",
  78. label: "附件2 大型和重点中型水库(水电站)基本情况表"
  79. },
  80. {
  81. value: "report_skfh3",
  82. label: "附件3 水库防洪调度和汛限水位执行督查工作统计表"
  83. },
  84. {
  85. value: "report_skfh4",
  86. label: "附件4 流域水库防洪调度和汛限水位执行督查发现问题汇总表"
  87. },
  88. {
  89. value: "report_skfh5",
  90. label: "附件5 水库防洪登记表"
  91. }
  92. ],
  93. options: [
  94. {
  95. value: "report_01",
  96. label: "附表1-监督检查人员情况表"
  97. },
  98. {
  99. value: "report_02",
  100. label: "附表2-大型和重点中型水库(水电站)基本情况表"
  101. },
  102. {
  103. value: "report_03",
  104. label: "附表3-防洪调度违规问题统计表"
  105. },
  106. {
  107. value: "report_04",
  108. label: "附表4-汛限水位执行违规问题统计表"
  109. },
  110. {
  111. value: "report_05",
  112. label: "附表5-防洪调度监督检查发现问题汇总表"
  113. },
  114. {
  115. value: "report_06",
  116. label: "附表6-汛限水位执行监督检查发现问题汇总表"
  117. }
  118. ],
  119. value: "",
  120. currentViewId: "附表1-监督检查人员情况表",
  121. showTable: true,
  122. currentNodeType: "",
  123. ids: [],
  124. pid: "000",
  125. pidNodes: [],
  126. type: "026",
  127. dxdcMainHeight: window.innerHeight - 180,
  128. dxdcAsideHeight: window.innerHeight - 180,
  129. windowHeight: window.innerHeight - 200,
  130. windowWidth: window.innerWidth - 350,
  131. treeWidth: 250,
  132. newYear: ""
  133. };
  134. },
  135. computed: {
  136. persId() {
  137. return localStorage.getItem("userid")
  138. ? localStorage.getItem("userid")
  139. : "1098101939614724096";
  140. }
  141. },
  142. mounted() {
  143. this.treeWidth = this.$refs.elw.$el.clientWidth;
  144. },
  145. watch: {},
  146. methods: {
  147. //树节点选中或取消事件
  148. treeCheckedDataChange(params) {
  149. // 如果是选中状态,把元素id加入到ids里
  150. if (params.newStatus) {
  151. params.newCheckedArray.forEach((element, index) => {
  152. let id = element.id;
  153. if (id != null && id !== undefined && id !== "") {
  154. this.ids.push(id);
  155. }
  156. });
  157. } else {
  158. // 删除取消的元素id
  159. params.changedItem.forEach((element, index) => {
  160. let id = element.id;
  161. let inx = this.ids.indexOf(id);
  162. if (inx > -1) {
  163. delete this.ids[inx];
  164. }
  165. });
  166. }
  167. // 去重
  168. this.ids = Array.from(new Set(this.ids));
  169. console.log("ids:" + this.ids);
  170. },
  171. changeYear(val) {
  172. this.newYear = val;
  173. this.ids = [];
  174. },
  175. }
  176. };
  177. </script>
  178. <style>
  179. </style>