{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\reformDemandData.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\reformDemandData.vue","mtime":1731008470955},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport pagenation from './pagenation.vue'\r\nimport apiList from '@/api/bigScreen/majorView.js'\r\nimport utils from '@/utils.js'\r\nexport default {\r\n name: 'reformDemandData',\r\n components: {\r\n pagenation,\r\n FileList,\r\n },\r\n props: {\r\n tableOptions: {\r\n type: Object,\r\n default: () => {\r\n return {}\r\n },\r\n },\r\n },\r\n data() {\r\n return {\r\n loading: false,\r\n loadingColor: 'rgba(6, 46, 106, 0.4)',\r\n tableLoading: false,\r\n fileLoading: false,\r\n params: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n showTotal: true,\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'Project_Name_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'group_Name_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'project_Field_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'project_Runway_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'status_',\r\n relation: 'AND',\r\n value: -3,\r\n }\r\n ],\r\n },\r\n tableData: [],\r\n currentRow: {},\r\n fileList: [],\r\n searchData: {},\r\n previewUrl: '',\r\n detailsData: {},\r\n demandRunwayOptions: [],\r\n leadObj: {},\r\n xqUnits: [],\r\n groupData: [\r\n { groupName: '总计', cityDemandNum: 0, groupDemandNum: 0 }\r\n ],\r\n exportLoading: false,\r\n depLoading: false,\r\n }\r\n },\r\n beforeDestroy() {\r\n this.$bus.$off('changeDate')\r\n },\r\n mounted() {\r\n this.getData()\r\n this.getReformDemandStatistics()\r\n },\r\n created() {\r\n this.hanldeCommonSelect()\r\n this.$emit('searchDateChange')\r\n },\r\n methods: {\r\n downloadReform() {\r\n this.exportLoading = true\r\n let data = JSON.parse(JSON.stringify(this.params))\r\n data.pageBean.pageSize = -1\r\n apiList.downloadReform(data, res => {\r\n this.exportLoading = false\r\n })\r\n },\r\n listItemClick(item, type, status) {\r\n if (item.groupName === '总计') {\r\n this.params.querys[1].value = ''\r\n } else {\r\n this.params.querys[1].value = item.groupName\r\n }\r\n if (type === 'item') {\r\n this.params.querys[4].value = status\r\n } else {\r\n this.params.querys[4].value = ''\r\n }\r\n this.getData(1)\r\n },\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n getReformDemandStatistics() {\r\n this.depLoading = true\r\n apiList.getReformDemandStatistics(res => {\r\n if (res) {\r\n this.groupData[0].cityDemandNum = res.group.reduce((sum, item) => {\r\n return sum + item.cityDemandNum;\r\n }, 0);\r\n this.groupData[0].groupDemandNum = res.group.reduce((sum, item) => {\r\n return sum + item.groupDemandNum;\r\n }, 0);\r\n this.groupData = [...this.groupData, ...res.group]\r\n }\r\n this.depLoading = false\r\n })\r\n },\r\n getData(page) {\r\n this.tableLoading = true\r\n this.detailsData = {}\r\n if (page) {\r\n this.params.pageBean.page = 1\r\n }\r\n apiList.getReformDemandData(this.params, res => {\r\n if (res.rows.length) {\r\n this.tableData = res.rows\r\n this.tableData.forEach(item => {\r\n item.pilotRange = item.pilotRange && item.pilotRange.split(',')\r\n })\r\n // this.currentRow = this.tableData[0]\r\n // this.$nextTick(() => {\r\n // this.$refs.dataTable.setCurrentRow(\r\n // this.$refs.dataTable.data[0]\r\n // )\r\n // })\r\n } else {\r\n this.tableData = []\r\n this.currentRow = {}\r\n this.leadObj = {}\r\n this.xqUnits = []\r\n }\r\n this.params.pageBean.total = res.total\r\n this.tableLoading = false\r\n })\r\n },\r\n currentChange(newRow) {\r\n if (newRow) {\r\n this.fileLoading = true\r\n this.currentRow = newRow\r\n let { id } = newRow\r\n Promise.all([this.getPropelDetails(id)]).then(() => {\r\n this.fileLoading = false\r\n })\r\n }\r\n },\r\n getPropelDetails(id) {\r\n return new Promise((reslove) => {\r\n apiList.getReformDemandDetails(id, res => {\r\n if (res) {\r\n this.leadObj = res.units.find(item => item.mainType == 1)\r\n this.xqUnits = res.units.filter(item => item.mainType == 2)\r\n this.detailsData = res\r\n }\r\n reslove()\r\n })\r\n })\r\n },\r\n pageChange(key) {\r\n this.params.pageBean.page = key\r\n this.getData()\r\n },\r\n hanldeCommonSelect(val) {\r\n if (!val) val = '1'\r\n let data = null\r\n let arr = utils.getDictItemsFromCache('ggbb_ssly')\r\n arr.forEach((item) => {\r\n if (item.value == val) {\r\n data = item.lowerDic['ggbb_sspd']\r\n }\r\n })\r\n this.demandRunwayOptions = data\r\n },\r\n },\r\n}\r\n",null]}