{"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\\reformPilot.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\reformPilot.vue","mtime":1717149258858},{"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//\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//\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\nconst portal = window.context.portal\r\nimport utils from '@/utils.js'\r\nimport apiList from '@/api/bigScreen/districView.js'\r\nimport EasyDialog from '@/views/BigScreen/components/easy-dialog/index.vue'\r\nimport pagenation from './pagenation.vue'\r\nimport filePreview from '@/components/FilePreview/filePreview.vue'\r\nimport dialogComponents from '@/views/BigScreen/js/dialog_components.js'\r\nimport dialogConfig from '@/views/BigScreen/js/DistrictReformDialogConfig.js'\r\nimport FileList from '@/components/uploadFile/newFileList.vue'\r\nexport default {\r\n components: {\r\n pagenation,\r\n ...dialogComponents,\r\n EasyDialog,\r\n filePreview,\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 previewUrl: `${portal}/file/onlinePreviewController/v1/getFileById_`,\r\n searchMore: false,\r\n currentUnit: '',\r\n textempty: ' ',\r\n activeNames: ['1'],\r\n currentRow: {\r\n fileList: [],\r\n },\r\n demandRunwayOptions: [],\r\n loading: false,\r\n infoLoading: false,\r\n loadingColor: 'rgba(6, 46, 106, 0.4)',\r\n tableData: [],\r\n showEasy: false,\r\n currentTabComponent: '',\r\n dialogOption: {\r\n dialogTitle: '',\r\n },\r\n searchData: {\r\n PILOT_LEVEL_: '',\r\n PILOT_PROJECT_NAME_: '',\r\n 'i.UNIT_NAME_': '',\r\n PILOT_FIELD_: '',\r\n PILOT_RUNWAY_: '',\r\n START_TIME_: [],\r\n 'm.UNIT_NAME_': '',\r\n 'm.PROPULSIVE_STATUS_': '',\r\n 'm.ACCEPTANCE_TIME_': '',\r\n },\r\n tempTableOptions: null,\r\n params: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n showTotal: true,\r\n total: 0,\r\n },\r\n params: {},\r\n querys: [\r\n // {\r\n // group: 'main',\r\n // operation: 'EQUAL',\r\n // parentGroup: '',\r\n // property: 'PILOT_LEVEL_',\r\n // relation: 'AND',\r\n // value: 1,\r\n // },\r\n ],\r\n },\r\n prarmsFile: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n showTotal: true,\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'BIZ_ID_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n },\r\n unitInfo: {},\r\n unitData: {},\r\n downloading: false,\r\n currentUnitCode: null,\r\n startTime: '',\r\n endTime: '',\r\n unitCode: null,\r\n }\r\n },\r\n beforeDestroy() {\r\n this.$bus.$off('changeDate')\r\n },\r\n mounted() {\r\n this.demandRunwayOptions = this.getDemandData('1')\r\n // let {code, type} = this.$route.query\r\n // this.unitInfo = {code, type}\r\n let { type, unitName, unitCode, time, numType } = this.$route.query\r\n this.unitCode = unitCode\r\n this.params.params.type = numType\r\n type && this.$set(this.searchData, 'PILOT_LEVEL_', type + '')\r\n unitName && this.$set(this.searchData, 'i.UNIT_NAME_', unitName)\r\n this.startTime = time && time[0]\r\n this.endTime = time && time[1]\r\n this.search()\r\n this.$bus.$on('changeDate', () => {\r\n let { year} = JSON.parse(sessionStorage.getItem('searchDate'))\r\n this.params.params.type = year < 2024 ? 'nationalProject' : 'nationalAddNum'\r\n this.search()\r\n })\r\n },\r\n methods: {\r\n isActive(item) {\r\n if (this.currentUnitCode) {\r\n return item.unitCode === this.currentUnitCode\r\n } else {\r\n return item.unitCode === this.unitCode\r\n }\r\n },\r\n getFiles(row) {\r\n if (row && row.id) {\r\n this.prarmsFile.querys[0].value = row.id\r\n apiList.getFiles(this.prarmsFile, (data) => {\r\n this.$set(this.currentRow, 'fileList', data.rows)\r\n })\r\n }\r\n },\r\n handlePreview(file) {\r\n let id = file.fileId\r\n ? file.fileId\r\n : file.id\r\n ? file.id\r\n : file.response.fileId\r\n let type =\r\n file.fileType ||\r\n (file.extensionName\r\n ? file.extensionName\r\n : file.name.split('.')[1])\r\n this.$refs.filePreview.previewUrl = this.previewUrl + id\r\n this.$refs.filePreview.open(type)\r\n },\r\n // 文件下载\r\n handleDownloadFile(file) {\r\n let id = file.fileId\r\n ? file.fileId\r\n : file.id\r\n ? file.id\r\n : file.response.fileId\r\n window.open(portal + `/file/v1/downloadFile?fileId=${id}`, '_self')\r\n },\r\n handleDistrict(district, currentRow) {\r\n this.currentUnit = district.unitName\r\n this.currentUnitCode = district.unitCode\r\n this.getPilotDetail(currentRow, district)\r\n },\r\n download() {\r\n this.downloading = true\r\n this.$message.warning(\r\n '试点台账数据量较大,导出所需时间较长,请耐性等待......'\r\n )\r\n let searchDate = sessionStorage.getItem('searchDate')\r\n searchDate = JSON.parse(searchDate)\r\n this.params.params.year = searchDate.year\r\n this.params.params.quarter = searchDate.quarter || 4\r\n apiList.exportLedgerDetail(this.params).then((res) => {\r\n this.downloading = false\r\n this.$message.success('试点台账数据导出成功')\r\n })\r\n },\r\n handleDetail(comp, projectName, code) {\r\n this.$router.push({\r\n path: '/DetailComponent',\r\n name: 'DetailComponent',\r\n query: {\r\n comp,\r\n projectName,\r\n code: code ? code : this.unitCode,\r\n },\r\n })\r\n },\r\n search(data, type) {\r\n this.params.pageBean.page = 1\r\n if (type == 'PILOT_FIELD_') {\r\n this.demandRunwayOptions = this.getDemandData(data)\r\n this.searchData.PILOT_RUNWAY_ = ''\r\n }\r\n this.params.querys = []\r\n for (let key in this.searchData) {\r\n let operation = ''\r\n if (\r\n key == 'PILOT_PROJECT_NAME_' ||\r\n key == 'i.UNIT_NAME_' ||\r\n key == 'm.UNIT_NAME_'\r\n ) {\r\n operation = 'LIKE'\r\n } else if (\r\n key == 'PILOT_FIELD_' ||\r\n key == 'PILOT_RUNWAY_' ||\r\n key == 'PILOT_LEVEL_' ||\r\n key == 'm.PROPULSIVE_STATUS_'\r\n ) {\r\n operation = 'EQUAL'\r\n } else if (key == 'START_TIME_') {\r\n if (this.startTime && this.endTime) {\r\n this.searchData['START_TIME_'] = [\r\n this.startTime,\r\n this.endTime,\r\n ]\r\n } else if (this.startTime && !this.endTime) {\r\n this.searchData['START_TIME_'] = this.startTime\r\n } else if (!this.startTime && this.endTime) {\r\n this.searchData['START_TIME_'] = this.endTime\r\n } else {\r\n this.searchData['START_TIME_'] = []\r\n }\r\n operation =\r\n this.startTime && !this.endTime\r\n ? 'GREAT_EQUAL'\r\n : !this.startTime && this.endTime\r\n ? 'LESS_EQUAL'\r\n : 'BETWEEN'\r\n } else if (key == 'm.ACCEPTANCE_TIME_') {\r\n operation = 'LESS_EQUAL'\r\n }\r\n this.params.querys.push({\r\n group: 'main',\r\n operation,\r\n parentGroup: '',\r\n property: key,\r\n relation: 'AND',\r\n value: this.searchData[key],\r\n })\r\n }\r\n this.loadData()\r\n },\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n currentChange(currentRow) {\r\n this.currentRow = currentRow\r\n this.unitData = {}\r\n this.currentUnit = ''\r\n this.currentUnitCode = null\r\n this.activeNames = ['1']\r\n if (this.unitCode) {\r\n this.getPilotDetail(this.currentRow, { unitCode: this.unitCode })\r\n }\r\n this.getFiles(this.currentRow)\r\n },\r\n loadData() {\r\n this.loading = true\r\n let searchDate = sessionStorage.getItem('searchDate')\r\n searchDate = JSON.parse(searchDate)\r\n this.params.params.year = searchDate.year\r\n this.params.params.quarter = searchDate.quarter || 4\r\n let apiName =\r\n this.params.params.type === 'nationalProject'\r\n ? 'getPilotLedgerDetail_'\r\n : 'getPilotLedgerDetail'\r\n apiList[apiName](this.params, (res) => {\r\n if (res && res.rows) {\r\n this.tableData = res.rows\r\n this.params.pageBean.page = res.page\r\n this.params.pageBean.total = res.total\r\n this.params.pageBean.pageSize = res.pageSize\r\n if (this.tableData.length) {\r\n this.currentRow = this.tableData[0]\r\n this.$nextTick(() => {\r\n this.$refs.myTable.setCurrentRow(\r\n this.$refs.myTable.data[0]\r\n )\r\n })\r\n if (this.unitCode) {\r\n this.getPilotDetail(this.currentRow, {\r\n unitCode: this.unitCode,\r\n })\r\n }\r\n this.getFiles(this.currentRow)\r\n } else {\r\n this.currentRow = {}\r\n }\r\n }\r\n this.loading = false\r\n })\r\n },\r\n // 查询详情\r\n getPilotDetail(row, district) {\r\n this.infoLoading = true\r\n let data = {\r\n id: row.id,\r\n unitCode: district.unitCode,\r\n }\r\n data = this.qs.stringify(data)\r\n apiList.pilotPushDetailforUnit(data, (res) => {\r\n if (res) {\r\n this.unitData = res\r\n }\r\n this.infoLoading = false\r\n this.activeNames = ['1', '2']\r\n })\r\n },\r\n pageChange(key) {\r\n this.params.pageBean.page = key\r\n this.loadData()\r\n },\r\n handleOpen(type, item, row) {\r\n this.currentTabComponent = dialogConfig.dialogOption[type]\r\n .componentName\r\n ? dialogConfig.dialogOption[type].componentName\r\n : type // 动态组件名称\r\n this.tempTableOptions = {\r\n name: item.unitName,\r\n code: item.unitCode,\r\n id: row.id,\r\n } //table的查询参数\r\n let data = {\r\n dialogTitle: item.unitName + '改革试点详情',\r\n ...dialogConfig.dialogOption[type].option,\r\n }\r\n this.dialogOption = data //弹窗配置参数\r\n this.showEasy = true\r\n },\r\n getDemandData(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 return data\r\n },\r\n },\r\n}\r\n",null]}