c752c27f70ca0d368867d0cdbbfd93c6caf60ba7.svn-base 5.7 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-xry
  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-xry>
  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_bzhgd1 from "./report_bzhgd1.vue";
  41. import report_bzhgd2 from "./report_bzhgd2.vue";
  42. import report_bzhgd3 from "./report_bzhgd3.vue";
  43. import report_bzhgd4 from "./report_bzhgd4.vue";
  44. import report_bzhgd5 from "./report_bzhgd5.vue";
  45. import report_bzhgd6 from "./report_bzhgd6.vue";
  46. import exportTreeListWithCheckBoxXry from "./exportTreeListWithCheckBox_xry";
  47. export default {
  48. components: {
  49. report_bzhgd1,
  50. report_bzhgd2,
  51. report_bzhgd3,
  52. report_bzhgd4,
  53. report_bzhgd5,
  54. report_bzhgd6,
  55. exportTreeListWithCheckBoxXry: exportTreeListWithCheckBoxXry,
  56. },
  57. props: [],
  58. data() {
  59. return {
  60. options: [
  61. // {
  62. // value: "report_bzhgd1",
  63. // label: "水利工程标准化示范工地成果表"
  64. // },
  65. {
  66. value: "report_bzhgd2",
  67. label: "标准化示范工地评选评分明细表"
  68. },
  69. {
  70. value: "report_bzhgd4",
  71. label: "水利工程标准化示范工地评选党建明细表"
  72. },
  73. {
  74. value: "report_bzhgd3",
  75. label: "水利工程标准化示范工地评选汇总表"
  76. },
  77. {
  78. value: "report_bzhgd5",
  79. label: "各设区市个项目细项得分统计表"
  80. },
  81. {
  82. value: "report_bzhgd6",
  83. label: "全省项目得分统计表"
  84. }
  85. ],
  86. value: "",
  87. currentViewId: "标准化示范工地评选评分明细表",
  88. showTable: true,
  89. currentNodeType: "",
  90. ids: [],
  91. pid: "000",
  92. pidNodes: [],
  93. type: "104",
  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>