9d1eb627ec9367712d96bbb24bfc8c6bbad28964.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <template>
  2. <el-container>
  3. <el-aside width="250px" :style="{'height': treeHeight + 'px'}">
  4. <el-tree
  5. :highlight-current="true"
  6. class="filter_tree report_tree"
  7. :data="treeDataLists"
  8. :props="defaultProps"
  9. node-key="id"
  10. :filter-node-method="filterNode"
  11. :expand-on-click-node="false"
  12. :default-expand-all="true"
  13. @node-click='treeNodeClickHandler'
  14. ref="tree2">
  15. <span class="custom-tree-node" slot-scope="{ node }">
  16. <el-tooltip v-if="node.isLeaf" class="item" effect="dark" :content="node.label"
  17. placement="top-start">
  18. <span>{{ node.label }}</span>
  19. </el-tooltip>
  20. <span v-else>{{ node.label }}</span>
  21. </span>
  22. </el-tree>
  23. </el-aside>
  24. <el-main>
  25. <div class="block" style="'padding':'10px 0'">
  26. <span class="demonstration" style="margin-right: 5px;margin-left: 7px">报告状态</span>
  27. <el-select v-model="bgType" placeholder="请选择" @change="search">
  28. <el-option :label="item.nowStep" :value="item.nowId" :key="index"
  29. v-for="(item,index) in bgTypeList"/>
  30. </el-select>
  31. <!-- <el-select v-model="bgType" clearable placeholder="请选择">-->
  32. <!-- <el-option label="专家(交换意见稿)" value="0"></el-option>-->
  33. <!-- <el-option label="交换意见阶段" value="4"></el-option>-->
  34. <!-- <el-option label="成果讨论阶段" value="5"></el-option>-->
  35. <!-- <el-option label="中心修改阶段" value="6"></el-option>-->
  36. <!-- <el-option label="司局修改阶段" value="7"></el-option>-->
  37. <!-- </el-select>-->
  38. </div>
  39. <el-tabs v-model="activeName" @tab-click="handleClick">
  40. <el-tab-pane v-for="(item,index) in tabList" :key="index" :label="item.label" :lazy="true"
  41. :name="item.value">
  42. <!-- 稽察发现问题责任追究清单 -->
  43. <div v-if="item.value === 'jcfxwtzrjqd'" style="padding: 10px;">
  44. <el-button @click="downloadFileWt" type="primary" icon="el-icon-download" style="margin-top: 10px;">下载</el-button>
  45. <div style="margin-top:2%;height:60vh;width: 100%;text-align: center;">
  46. <img src="../../../assets/jcwt.png" alt="稽察问题图片" style="width: 30%;"/>
  47. </div>
  48. </div>
  49. <!-- 稽察组人员名单 -->
  50. <div v-else-if="item.value === 'jczrymd'" style="padding: 10px;">
  51. <el-button @click="downloadFileMd" type="primary" icon="el-icon-download" style="margin-top: 10px;">下载</el-button>
  52. <div style="margin-top:2%;height:60vh;width: 100%;text-align: center;">
  53. <img src="../../../assets/jcmd.png" alt="稽察组人员名单图片" style="width: 30%;"/>
  54. </div>
  55. </div>
  56. <!-- 其他tab保持原有内容 -->
  57. <div v-if="showReport&&item.value !== 'jczrymd'&&item.value !== 'jcfxwtzrjqd'" style="width:100%;padding:0px 0px;" :style="{'height' : tableHeight + 'px'}">
  58. <p v-if="showLastTab"
  59. style="font-weight: bolder;color: #868686;font-size: larger;line-height: 100px;text-align: center">
  60. 请通过左侧树点击指定工程,查看报表</p>
  61. <iframe v-if="!showLastTab && item.value === activeName" id="iframeEle"
  62. :src="tableSrc + '&rgstrId=' + rgstrId + '&names=' + name + '&bgType=' + bgType + '&currentRlcode='+currentRlcode+ '&isStage='+(bgType=='0'?'0':'1')+ '&width=1920&height=592'"
  63. frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  64. </div>
  65. <!-- <component :is="'summary'" :tableSrc="tableSrc" :pcid="pcid" :year="year"></component> -->
  66. </el-tab-pane>
  67. </el-tabs>
  68. </el-main>
  69. </el-container>
  70. </template>
  71. <script>
  72. import summary from './summary'
  73. import request from "@util/gw_ajax_request"
  74. import {reportHosturl} from '@util/global_variable.js'
  75. import { exportModel } from '@util/gw_exportModel';
  76. export default {
  77. data() {
  78. return {
  79. treeHeight: window.innerHeight - 110,
  80. tableHeight: window.innerHeight - 180,
  81. activeName: 'summary',
  82. showReport: false,
  83. tabList: [
  84. {label: '问题统计表(按专业)', value: 'summary'},
  85. {label: '问题统计表(按责任主体)', value: 'membership'},
  86. // {label: '2018-2019年度中央及省级水利投资建设项目稽察问题汇总表', value: 'problemSummary'},
  87. {label: '稽察发现问题清单', value: 'seriousProblemReport'},
  88. {label: '稽察发现问题责任追究统计表', value: 'jcfxwtzrjjtjb'},
  89. {label: '稽察发现问题责任追究清单', value: 'jcfxwtzrjqd'},
  90. {label: '稽察组人员名单', value: 'jczrymd'},
  91. ],
  92. addForm: {
  93. year: '',
  94. batch: '',
  95. persId: localStorage.getItem("userid")
  96. },
  97. yearList: [],
  98. pcList: [],
  99. pcid: '',
  100. year: '',
  101. treeDataLists: [],
  102. defaultProps: {
  103. children: 'children',
  104. label: 'pnm'
  105. },
  106. rgstrId: '',
  107. name: '',
  108. tableSrc: `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_wttj_zy`,
  109. currentRlcode: localStorage.getItem('currentRlcode'),
  110. bgType:'0',
  111. bgTypeList: [],
  112. }
  113. },
  114. //监听属性 类似于data概念
  115. computed: {
  116. persId() {
  117. return localStorage.getItem("userid")
  118. ? localStorage.getItem("userid")
  119. : "1098101939614724096";
  120. },
  121. showLastTab() {
  122. return this.activeName == 'seriousProblemReport' && !this.rgstrId
  123. },
  124. // tableSrc(){
  125. // return `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_wttj_zy`
  126. // }
  127. },
  128. components: {
  129. summary,
  130. },
  131. mounted() {
  132. this.$nextTick(() => {
  133. this.getTreeData();
  134. })
  135. this.getBgTypeList();
  136. },
  137. methods: {
  138. downloadFileWt(){
  139. window.open('https://27.156.118.74:19901/upload/2026\\5\\28\\13b644e133644930a27c945209c3675b.xlsx', '_blank');
  140. },
  141. async downloadFileMd(){
  142. window.open('https://27.156.118.74:19901/upload/2026//5//28//787a6a8d8bde410f8077a04a350e39b9.xlsx', '_blank');
  143. },
  144. search() {
  145. let iframe = document.getElementById('iframeEle')
  146. let src = this.tableSrc
  147. iframe.src = src
  148. + '&year=' + this.addForm.year
  149. + '&pcid=' + this.addForm.batch
  150. + '&bgType=' + this.bgType
  151. + '&currentRlcode=' + this.currentRlcode
  152. + '&isStage=' + (this.bgType === '0' ? '0' : '1')
  153. + '&width=1920&height=592'
  154. },
  155. //获取左侧树数据
  156. getTreeData() {
  157. let _self = this;
  158. request.post(`/tac/insp/year/batch/obj/getObjTreeListV2`, {
  159. "persId": _self.persId
  160. }).then(res => {
  161. _self.showReport = true
  162. _self.treeDataLists = res.data.children;
  163. console.log(_self.treeDataLists)
  164. let batchList = _self.treeDataLists[0].children
  165. let rgstrId = []
  166. let projectList = []
  167. batchList[0].children.forEach(ele => {
  168. ele.children.forEach(element => {
  169. projectList = projectList.concat(element.children)
  170. })
  171. })
  172. projectList.forEach(ele => {
  173. rgstrId.push(ele.id)
  174. })
  175. this.rgstrId = rgstrId.join(',')
  176. this.name = batchList[0].pnm
  177. console.log(rgstrId)
  178. setTimeout(() => {
  179. this.$refs.tree2.filter('初始化');
  180. }, 1000)
  181. })
  182. },
  183. getBgTypeList() {
  184. request.post(`/tac/province/plan/process/list`, {}).then(res => {
  185. if (res.success) {
  186. this.bgTypeList = res.data;
  187. let expertOpinion = {
  188. nowStep: '专家现场意见稿',
  189. nowId: '0'
  190. }
  191. this.bgTypeList.unshift(expertOpinion);//方法将把它的参数插入 arrayObject 的头部
  192. }
  193. })
  194. },
  195. //树节点点击事件
  196. treeNodeClickHandler(data, node, tree) {
  197. let rgstrId = []
  198. let projectList = []
  199. if (this.activeName == 'seriousProblemReport') {
  200. if (node.level == 5) {
  201. this.rgstrId = data.id
  202. this.name = data.pnm
  203. } else {
  204. this.rgstrId = ''
  205. this.name = ''
  206. }
  207. } else {
  208. if(node.level == 1){
  209. data.children.forEach(ele => {
  210. ele.children.forEach(element => {
  211. element.children.forEach(element1 => {
  212. projectList = projectList.concat(element1.children)
  213. })
  214. })
  215. })
  216. projectList.forEach(ele => {
  217. rgstrId.push(ele.id)
  218. })
  219. this.rgstrId = rgstrId.join(',')
  220. this.name = data.pnm
  221. }else if (node.level == 2) {
  222. data.children.forEach(ele => {
  223. ele.children.forEach(element => {
  224. projectList = projectList.concat(element.children)
  225. })
  226. })
  227. projectList.forEach(ele => {
  228. rgstrId.push(ele.id)
  229. })
  230. this.rgstrId = rgstrId.join(',')
  231. this.name = data.pnm
  232. } else if (node.level == 3) {
  233. data.children.forEach(ele => {
  234. projectList = projectList.concat(ele.children)
  235. })
  236. projectList.forEach(ele => {
  237. rgstrId.push(ele.id)
  238. })
  239. this.rgstrId = rgstrId.join(',')
  240. this.name = data.pnm
  241. } else if (node.level == 4) {
  242. projectList = projectList.concat(data.children)
  243. projectList.forEach(ele => {
  244. rgstrId.push(ele.id)
  245. })
  246. this.rgstrId = rgstrId.join(',')
  247. this.name = data.pnm
  248. } else {
  249. this.rgstrId = ''
  250. this.name = ''
  251. }
  252. }
  253. },
  254. filterNode(value, data, node) {
  255. if (!value) return true;
  256. if (this.activeName == 'seriousProblemReport') {
  257. return node.level < 6;
  258. } else {
  259. return node.level < 5;
  260. }
  261. },
  262. changeYear() {
  263. },
  264. handleClick() {
  265. }
  266. },
  267. watch: {
  268. activeName(val) {
  269. if (val == 'summary') {
  270. this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_wttj_zy`
  271. } else if (val == 'membership') {
  272. this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_wttj_zrzt`
  273. } else if (val == 'problemSummary') {
  274. this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_wttj_huizong`
  275. } else if (val == 'seriousProblemReport') {
  276. this.rgstrId = ''
  277. this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_fxwtqd`
  278. } else if (val == 'jcfxwtzrjjtjb') {
  279. this.rgstrId = ''
  280. this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport-suoding.jsp?rpx=fjjc_fxwt_zrjj.rpx`
  281. }
  282. this.$refs.tree2.filter(val);
  283. }
  284. }
  285. }
  286. </script>
  287. <style lang="scss">
  288. .report_tree {
  289. margin-top: 20px;
  290. }
  291. </style>