{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\ProjectInitiation\\ProjectInitiationSub.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\ProjectInitiation\\ProjectInitiationSub.vue","mtime":1667333351352},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\babel.config.js","mtime":1667333346259},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.find\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport ProjectInfoDialog from '@/components/dialog/ProjectInfoDialog.vue';\nimport req from '@/request.js';\nexport default {\n name: 'projectInitiationSub',\n props: {\n pid: {\n type: String,\n default: ''\n },\n isShow: {\n type: Boolean,\n default: true\n }\n },\n components: {\n ProjectInfoDialog: ProjectInfoDialog\n },\n data: function data() {\n return {\n importData: {\n title: '项目立项导入',\n templateName: '项目立项模板.xls',\n downloadUrl: '/../fvue/static/excel/ExportProjectInitiationSub.xlsx',\n importUrl: window.context.cqxy + '/biz/projectApproval/projectEstablishment/v1/importExcelData',\n showProject: true,\n projectId: ''\n },\n projectObj: [],\n //获取的所有项目数组\n labelPosition: 'right',\n //表单对齐方式\n searchForm: {\n projectId: '',\n establishmentName: '',\n documentNumber: ''\n },\n //顶部搜索参数\n data: [],\n //表格数据\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n form: {},\n dialogVisible: false,\n dialogTitle: '添加',\n L_hidden: false,\n W_hidden: false,\n A_hidden: false,\n typeOptions: [{\n value: '立项批复',\n label: '立项批复'\n }, {\n value: '备案证书',\n label: '备案证书'\n }, {\n value: '核准批复',\n label: '核准批复'\n }],\n //表单验证\n rules: {\n 'projectInfo.projectName': {\n required: true,\n message: '项目名称不能为空',\n trigger: 'blur'\n },\n pcode: {\n required: true,\n message: '项目代码不能为空',\n trigger: 'blur'\n },\n 'projectInfo.projectCode': {\n required: true,\n message: '项目代码不能为空',\n trigger: 'blur'\n },\n documentNumber: {\n required: true,\n message: '文号不能为空',\n trigger: 'blur'\n },\n establishmentName: {\n required: true,\n message: '请输入建设性质',\n trigger: 'blur'\n },\n establishmentDate: {\n required: true,\n message: '批复日期不能为空',\n trigger: 'blur'\n },\n establishmentApprovalUnit: {\n required: true,\n message: '审批单位不能为空',\n trigger: 'blur'\n },\n establishmentInvestmentAmount: {\n required: true,\n message: '总投资不能为空',\n trigger: 'blur'\n }\n }\n };\n },\n computed: {\n deleteUrl: function deleteUrl() {\n return window.context.cqxy + '/biz/projectApproval/projectEstablishment/v1/delete';\n }\n },\n mounted: function mounted() {\n this.initProjectAll();\n },\n methods: {\n handleReset: function handleReset() {\n var _this = this;\n this.searchForm.projectId = '';\n this.searchForm.establishmentName = '';\n this.searchForm.documentNumber = '';\n this.pageResult = {\n page: 1,\n pageSize: 20,\n total: 0\n };\n this.$refs['searchForm'].resetFields();\n this.$nextTick(function () {\n _this.$refs.AtTable.load();\n });\n },\n handleSelectProject: function handleSelectProject(data) {\n this.form.establishmentApprovalUnit = data.projectApprovalAuthority;\n this.form.establishmentScale = data.projectContent;\n this.form.projectInfo.projectName = data.projectName;\n this.form.projectInfo.projectCode = data.projectCode;\n this.form.projectId = data.id;\n var projectType = data.projectType;\n this.getByProjectTypeIsShow(projectType);\n this.$refs.ruleForm.clearValidate();\n },\n //打开选择项目弹框\n handleFocusProject: function handleFocusProject() {\n this.$refs.project.open();\n },\n //导入后重新加载数据\n load: function load() {\n this.$refs.AtTable.load();\n },\n //导出\n handleExport: function handleExport() {\n var _this2 = this;\n var query = [];\n var search = {\n 'pm.ID_': this.searchForm.projectId,\n documentNumber: this.searchForm.documentNumber,\n establishmentName: this.searchForm.establishmentName\n };\n if (!this.isShow) {\n search['pm.ID_'] = this.pid;\n }\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n var param = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n querys: query,\n sorter: []\n };\n req.downloadPostCopy('${cqxy}/biz/projectApproval/projectEstablishment/v1/exportDataToExcel', param).then(function (res) {\n if (res.status == 200) {\n _this2.$message.success('导出成功');\n } else {\n _this2.$message.error('导出失败');\n }\n });\n },\n //获取附件信息\n accessoryInfo: function accessoryInfo(info) {\n this.form.accessoryInfo = info;\n },\n initProjectAll: function initProjectAll() {\n var _this3 = this;\n //初始获取所有项目数据\n if (this.isShow) {\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/All').then(function (res) {\n _this3.projectObj = res.data.value;\n }, function (error) {\n reject(error);\n });\n } else {\n var params = {\n pageBean: {\n page: 1,\n pageSize: 500,\n total: 0\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'id',\n relation: 'AND',\n value: this.pid\n }]\n };\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/page', params).then(function (res) {\n if (res.data.state) {\n var resp = res.data.value;\n _this3.projectObj = resp.rows;\n }\n });\n }\n },\n //查询\n handleSearch: function handleSearch() {\n this.$refs.AtTable.load();\n },\n afterSaveData: function afterSaveData() {\n var _this4 = this;\n setTimeout(function () {\n _this4.form = {\n projectInfo: {\n projectName: '',\n projectCode: ''\n },\n accessoryInfo: []\n };\n _this4.beforeCloseDialog();\n _this4.$refs.AtTable.load();\n }, 500);\n },\n beforeCloseDialog: function beforeCloseDialog() {\n this.dialogVisible = false;\n },\n handleAdd: function handleAdd() {\n this.dialogTitle = '添加';\n this.dialogVisible = true;\n this.form = {\n projectId: '',\n documentNumber: \"\\u6E1D\\u9AD8\\u65B0\\u6539\\u6295\\u3010\".concat(new Date().getFullYear(), \"\\u3011001\\u53F7\"),\n establishmentName: '新建',\n establishmentDate: this.getDate(),\n establishmentApprovalUnit: 2,\n establishmentInvestmentAmount: '',\n establishmentScale: '',\n establishmentType: '立项批复',\n projectInfo: {\n projectName: '',\n projectCode: ''\n },\n accessoryInfo: []\n };\n if (this.isShow) {\n var selectedProject = this.projectObj.find(function (item) {\n if (item.currentProject && item.currentProject == 1) {\n return item.currentProject == 1;\n }\n });\n this.form.establishmentScale = selectedProject.projectContent;\n this.form.projectInfo.projectName = selectedProject.projectName;\n this.form.projectInfo.projectCode = selectedProject.projectCode;\n this.form.projectId = selectedProject.id;\n this.form.establishmentInvestmentAmount = selectedProject.projectMoney;\n } else {\n //根据项目id查询\n this.form.establishmentScale = this.projectObj[0].projectContent;\n this.form.projectInfo.projectName = this.projectObj[0].projectName;\n this.form.projectInfo.projectCode = this.projectObj[0].projectCode;\n this.form.projectId = this.projectObj[0].id;\n this.form.establishmentInvestmentAmount = this.projectObj[0].projectMoney;\n var projectType = this.projectObj[0].projectType;\n this.getByProjectTypeIsShow(projectType);\n }\n },\n //根据项目类型判断显示和隐藏高度,宽度,面积,type为项目类型\n getByProjectTypeIsShow: function getByProjectTypeIsShow(type) {\n //房间工程,填写面积,宽度,隐藏长度\n if (type == 1) {\n this.L_hidden = true;\n this.W_hidden = false;\n this.A_hidden = false;\n } else if (type == 2 || type == 5) {\n //类型为装修和生态环保填写面积,隐藏长、宽\n this.L_hidden = true;\n this.W_hidden = true;\n this.A_hidden = false;\n } else if (type == 3 || type == 4) {\n //类型为市政道路,市政配套填写长、宽,隐藏面积\n this.L_hidden = false;\n this.W_hidden = false;\n this.A_hidden = true;\n } else if (type == 6) {\n //类型为零星项目三个都不用填\n this.L_hidden = true;\n this.W_hidden = true;\n this.A_hidden = true;\n } else {\n this.L_hidden = false;\n this.W_hidden = false;\n this.A_hidden = false;\n }\n },\n handleRowDBClick: function handleRowDBClick(data) {\n var _this5 = this;\n this.dialogTitle = '修改';\n this.$http.post('${cqxy}/biz/projectApproval/projectEstablishment/v1/detail/' + data.id).then(function (res) {\n _this5.dialogVisible = true;\n var response = res.data.value;\n _this5.form = response;\n });\n },\n handleSelect: function handleSelect(selection) {},\n handleDialogCancel: function handleDialogCancel() {\n this.dialogVisible = false;\n this.form = {\n projectInfo: {\n projectName: '',\n projectCode: ''\n },\n accessoryInfo: []\n };\n },\n handleDialogClose: function handleDialogClose() {\n this.dialogVisible = false;\n this.form = {\n projectInfo: {\n projectName: '',\n projectCode: ''\n },\n accessoryInfo: []\n };\n },\n //提交保存\n handleDialogSubmit: function handleDialogSubmit(formName) {\n var _this6 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n if (_this6.form.accessoryInfo && _this6.form.accessoryInfo.length > 0) {\n _this6.form.accessoryInfo.forEach(function (item) {\n if (item.id) {\n delete item.id;\n }\n });\n }\n _this6.$http.post('${cqxy}/biz/projectApproval/projectEstablishment/v1/save', _this6.form).then(function (res) {\n if (res.status == 200) {\n setTimeout(function () {\n _this6.$message.success(res.data.message);\n _this6.afterSaveData();\n }, 500);\n } else {\n _this6.$message.error(res.data.message);\n }\n });\n }\n // else if (this.form.accessoryInfo.length === 0) {\n // this.$message.error('至少上传一个附件')\n // }\n else {\n _this6.$message({\n message: '项目名称不能为空!',\n type: 'warning'\n });\n return false;\n }\n });\n },\n loadData: function loadData(param, cb) {\n var _this7 = this;\n var query = [];\n var search = {\n 'pm.ID_': this.searchForm.projectId,\n establishment_name_: this.searchForm.establishmentName,\n establishment_date_: this.searchForm.establishmentDate,\n document_number_: this.searchForm.documentNumber\n };\n if (!this.isShow) {\n search['pm.ID_'] = this.pid;\n this.importData.projectId = this.pid;\n }\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n if (param.querys && param.querys.length) {\n var _param$querys;\n (_param$querys = param.querys).push.apply(_param$querys, query);\n } else {\n param.querys = query;\n }\n this.$http.post('${cqxy}/biz/projectApproval/projectEstablishment/v1/page', param).then(function (resp) {\n var response = resp.data.value;\n _this7.data = response.rows;\n _this7.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }, function (error) {\n reject(error);\n }).finally(function () {\n return cb();\n });\n }\n }\n};",null]}