{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorProjectManagement\\TwoMonthReport.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorProjectManagement\\TwoMonthReport.vue","mtime":1718912489938},{"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\r\nimport utils from '@/utils.js'\r\nimport RejectInfoDialog from '@/components/dialog/RejectInfoDialog.vue'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport moment from 'moment'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport apiList from '@/api/MajorReformProjects/monthReport.js'\r\nimport req from '@/request.js'\r\nconst portal = window.context.portal\r\nimport pagination from '@/components/pagination'\r\nimport { log } from '@antv/g2plot/lib/utils'\r\nexport default {\r\n name: 'TwoMonthReport',\r\n components: {\r\n UploadFile,\r\n FileList,\r\n RejectInfoDialog,\r\n pagination,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n markLoading: false,\r\n reqLoading: false,\r\n visible: false,\r\n title: '两月进度上报',\r\n activeCollapse: ['1'],\r\n projectData: null,\r\n queryParam: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n },\r\n querys: [\r\n {\r\n group: \"main\",\r\n operation: \"EQUAL\",\r\n parentGroup: \"\",\r\n property: \"project_id_\",\r\n relation: \"AND\",\r\n value: \"\"\r\n },\r\n {\r\n group: \"main\",\r\n operation: \"IN\",\r\n parentGroup: \"\",\r\n property: \"status\",\r\n relation: \"AND\",\r\n value: []\r\n }\r\n ]\r\n },\r\n tableData: [\r\n {\r\n id: 1,\r\n date: '2024-4',\r\n status: '1',\r\n dateUpload: '2024-05-08',\r\n },\r\n ],\r\n visibleUpload: false,\r\n accept: '.wps,.et,.bmp,.jpg,.png,.tif,.gif,.pcx,.tga,.exif,.fpx,.svg,.psd,.cdr,.pcd,.dxf,.ufo,.eps,.ai,.raw,.WMF,.webp,.avif,.apng,.xls,.docx,.docm,.doc,.dotx,.pptx,.pptm,.ppt,.pdf,.xps,.potx,.txt,.xls,.xlsx,.xps,.zip,.rar,.7z',\r\n url: `${portal}/file/v1/uploadFileForConfig`,\r\n header: {\r\n Authorization: `Bearer ${this.$store.state.login.currentUser.token}`,\r\n },\r\n uploadAcitonData: {\r\n bizCode: 'projectProgress',\r\n bizId: '',\r\n bizType: '',\r\n },\r\n previewUrl: `${portal}/file/onlinePreviewController/v1/getFileById_`,\r\n uploadData: {\r\n planYear: '',\r\n planMonth: '',\r\n date: '',\r\n projectId: '',\r\n projectType: 3, // 三个一批的类型 1 加快实施 2 准备启动 3谋划储备\r\n files: [],\r\n status: 0,\r\n classified: '',\r\n },\r\n fileList: [],\r\n reportDetailType: '',\r\n deleteIds: '',\r\n // 是否查阅\r\n isReferTo: false,\r\n // 是否上报\r\n isReport: false\r\n }\r\n },\r\n created() { },\r\n mounted() { },\r\n methods: {\r\n beforeUpload() {\r\n this.markLoading = true\r\n },\r\n openDialog(title, data, type) {\r\n this.projectData = data\r\n this.title = title\r\n this.visible = true\r\n this.uploadData.projectType = type\r\n this.uploadData.projectId = this.projectData.id\r\n this.uploadData.date = moment().format('YYYY-MM')\r\n this.uploadData.planYear = moment().format('YYYY')\r\n this.uploadData.planMonth = moment().format('MM')\r\n this.getReportData()\r\n },\r\n getReportData() {\r\n this.reqLoading = true\r\n this.queryParam.querys[0].value = this.projectData.id\r\n this.queryParam.querys[1].value = this.title === '两月进度查阅' ? [-1, 1, 2] : []\r\n apiList.queryReportByProjectId(this.queryParam).then((res) => {\r\n this.tableData = res.rows\r\n this.reqLoading = false\r\n this.queryParam.pageBean.total = res.total\r\n })\r\n },\r\n //展示数量\r\n handleSizeChange(val) {\r\n this.queryParam.pageBean.pageSize = val\r\n this.getReportData()\r\n },\r\n //表格页数\r\n handleCurrentChange(val) {\r\n this.queryParam.pageBean.page = val\r\n this.getReportData()\r\n },\r\n handleDateChange(val) {\r\n this.uploadData.planYear = val.split('-')[0]\r\n this.uploadData.planMonth = val.split('-')[1]\r\n },\r\n // 上传报告\r\n handleAddReport() {\r\n this.visibleUpload = true\r\n },\r\n // 关闭\r\n handleClose() {\r\n if (this.isReferTo || this.isReport) {\r\n this.$bus.$emit('dataRefresh')\r\n this.isReferTo = false\r\n this.isReport = false\r\n }\r\n this.visible = false\r\n this.projectData = null\r\n },\r\n handleReport(type, row) {\r\n this.reportDetailType = type\r\n this.visibleUpload = true\r\n this.getReportById(row)\r\n },\r\n getReportById(row) {\r\n let { id, status } = row\r\n apiList.queryReportById(id).then((res) => {\r\n this.uploadData = res\r\n this.uploadData.date =\r\n this.uploadData.planYear +\r\n '-' +\r\n (this.uploadData.planMonth < 10\r\n ? '0' + this.uploadData.planMonth\r\n : this.uploadData.planMonth)\r\n this.fileList = res.files.map((item) => {\r\n item.name = item.fileName\r\n return item\r\n })\r\n if (status === 1 && this.title === '两月进度查阅') {\r\n this.referTo(id)\r\n }\r\n })\r\n },\r\n // 查阅\r\n referTo(id) {\r\n let data = {\r\n status: 2,\r\n id\r\n }\r\n apiList.updateStatus(data).then((res) => {\r\n if (res.state) {\r\n this.getReportData()\r\n this.isReferTo = true\r\n }\r\n })\r\n },\r\n handleChangeStatus(status, row) {\r\n let message\r\n if (status == 1) {\r\n message = '上报'\r\n } else if (status == -1) {\r\n message = '驳回'\r\n } else if (status == 0) {\r\n message = '撤回'\r\n }\r\n this.$confirm(`确定${message}吗?`, '提示', {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n }).then(() => {\r\n let data = {\r\n status,\r\n id: row.id,\r\n }\r\n apiList.updateStatus(data).then((res) => {\r\n if (res.state) this.$message.success(`${message}成功!`)\r\n this.getReportData()\r\n if (status === 1) {\r\n this.isReport = true\r\n }\r\n })\r\n })\r\n },\r\n handleCloseUpload() {\r\n this.fileList = []\r\n this.visibleUpload = false\r\n },\r\n handleSave() {\r\n this.$refs.refform.validate((valid) => {\r\n if (valid) {\r\n if (!this.fileList.length) {\r\n this.$message.warning('请上传文件!')\r\n } else {\r\n this.markLoading = true\r\n this.uploadData.files = this.fileList.map((item) => {\r\n item.id = item.id || item.response.fileId\r\n item.fileName =\r\n item.fileName || item.response.fileName\r\n return item\r\n })\r\n apiList.saveReport(this.uploadData).then((res) => {\r\n if (res.state) {\r\n this.$message.success('保存成功!')\r\n this.visibleUpload = false\r\n this.fileList = []\r\n this.getReportData()\r\n }\r\n this.markLoading = false\r\n })\r\n }\r\n }\r\n })\r\n },\r\n handleSaveAndVerfiry() {\r\n this.uploadData.status = 1\r\n this.isReport = true\r\n this.handleSave()\r\n },\r\n // 删除\r\n handleDeleteReport() {\r\n this.$confirm(`确定删除吗?`, '提示', {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n }).then(() => {\r\n apiList.deleteByIds(this.deleteIds).then(res => {\r\n if (res.state) {\r\n this.$message.success('删除成功')\r\n this.getReportData()\r\n }\r\n })\r\n })\r\n },\r\n handleSelectionChange(e) {\r\n let ids = e.map(item => item.id)\r\n if (ids.length) {\r\n this.deleteIds = ids.join(',')\r\n }\r\n },\r\n // 获取字典值翻译\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n // --------------文件--------------\r\n beforeRemove(file) {\r\n return this.$confirm(`确定移除 ${file.name}?`)\r\n },\r\n handlePreview(file, fileList) {\r\n console.log(file)\r\n },\r\n handleRemove(file, fileList) {\r\n let fileId = file.id || file.response.fileId\r\n apiList.removeFile(fileId).then((res) => {\r\n if (res.state) {\r\n this.$message.success('文件删除成功')\r\n } else {\r\n this.$message.error('文件删除失败')\r\n }\r\n })\r\n this.fileList = fileList\r\n },\r\n uploadSuccess(res, file, fileList) {\r\n if (res.success) {\r\n this.$message.success('文件上传成功')\r\n } else {\r\n this.$message.error('文件上传失败')\r\n }\r\n this.fileList = fileList\r\n this.markLoading = false\r\n },\r\n uploadError(err) {\r\n this.$message.error('附件上传失败')\r\n },\r\n // ------------文件相关--------------\r\n // 根据id查询附件\r\n getFiles(id, index) {\r\n let data = JSON.parse(JSON.stringify(this.queryParam))\r\n data.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: id,\r\n },\r\n ]\r\n req.post(portal + '/file/v1/list', data).then((res) => {\r\n if (res) {\r\n }\r\n })\r\n },\r\n openUploade() {\r\n let { projectType } = this.parameter\r\n let code =\r\n projectType === 2 ? 'ReadyStartProject' : 'PlanStartProject'\r\n this.$refs.uploadFile.open(code)\r\n },\r\n // 上传附件\r\n setFileList(file) {\r\n let newFile = {\r\n ...file,\r\n id: file.response.fileId,\r\n }\r\n this.advanceData.files =\r\n this.advanceData.files ||\r\n this.$set(this.advanceData, 'files', [])\r\n this.advanceData.files.push(newFile)\r\n this.advanceData.classified = ''\r\n },\r\n },\r\n}\r\n",null]}