{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\Municipal\\components\\entryDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\Municipal\\components\\entryDialog.vue","mtime":1744767657573},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { TableMixin } from '@/mixins/tableMixin';\nimport projectsAPI from '@/api/municipalReform';\nimport auditApi from '@/api/ReformSituation/reformAudit';\nimport FileList from '@/components/uploadFile/FileList.vue';\nimport UploadFile from '@/components/uploadFile/index.vue';\nimport RejectInfoBlockDialog from '@/components/dialog/RejectInfoBlockDialog.vue';\nimport api from '@/api/ReformSituation/municipal';\nexport default {\n name: 'projectsDialog',\n components: {\n RejectInfoBlockDialog: RejectInfoBlockDialog,\n UploadFile: UploadFile,\n FileList: FileList\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n value: '',\n addEditData: {\n situations: []\n },\n fileIndex: 0,\n visible: false,\n title: '新增',\n tableLoading: false,\n markLoading: false,\n reqLoading: false,\n year: '',\n rules: {\n groupName: [{\n required: true,\n message: '请选择专项小组',\n trigger: 'change'\n }],\n indexFinishValue: [{\n required: true,\n message: '请输入指标完成值',\n trigger: 'change'\n }]\n },\n basicList: {\n problem: [{\n value: ''\n }],\n files: []\n },\n infoData: {\n status: 1,\n approvalComments: ''\n },\n groupNameOptions: [{\n label: '党建统领体制改革专项小组',\n value: '党建统领体制改革专项小组'\n }, {\n label: '经济体制改革专项小组',\n value: '经济体制改革专项小组'\n }, {\n label: '社会民生领域改革专项小组',\n value: '社会民生领域改革专项小组'\n }, {\n label: '民主与法制领域改革专项小组',\n value: '民主与法制领域改革专项小组'\n }, {\n label: '文化体制改革专项小组',\n value: '文化体制改革专项小组'\n }, {\n label: '平安法治领域改革专项小组',\n value: '平安法治领域改革专项小组'\n }, {\n label: '其他',\n value: '其他'\n }]\n };\n },\n created: function created() {\n var moment = require('moment');\n\n this.year = moment().format('YYYY');\n },\n mounted: function mounted() {},\n methods: {\n // 弹层进入事件\n open: function open(data, title) {\n this.visible = true;\n this.title = title;\n\n if (data && data.id) {\n //编辑\n this.getDetailsituations(data.id);\n } else {\n // 新增\n this.gteAddsituations();\n }\n },\n // 新增获取表格数据\n gteAddsituations: function gteAddsituations() {\n var _this = this;\n\n this.reqLoading = true;\n api.enableIndicator().then(function (res) {\n if (res.value) {\n _this.addEditData.situations = res.value.map(function (item) {\n var indexName = item.indexName,\n indexType = item.indexType,\n indexUnit = item.indexUnit,\n indexCode = item.indexCode,\n indexId = item.id;\n return {\n indexName: indexName,\n indexType: indexType,\n indexUnit: indexUnit,\n indexCode: indexCode,\n indexId: indexId,\n indexFinishValue: '',\n files: []\n };\n });\n }\n\n _this.reqLoading = false;\n });\n },\n // 编辑时获取表格数据\n getDetailsituations: function getDetailsituations(id) {\n var _this2 = this;\n\n this.reqLoading = true;\n api.getDetailById(id).then(function (res) {\n if (res) {\n _this2.addEditData = res;\n }\n\n _this2.reqLoading = false;\n });\n },\n // -----附件相关-----\n openUploade: function openUploade(index) {\n this.fileIndex = index;\n this.$refs.uploadFile.open('listOfMunicipalReforms');\n },\n setAipher: function setAipher() {\n this.$set(this.addEditData.situations[this.fileIndex], 'classified', 1);\n },\n setFileList: function setFileList(file) {\n file.id = file.response.fileId;\n\n if (this.addEditData.situations[this.fileIndex].files) {\n this.addEditData.situations[this.fileIndex].files.push(file);\n } else {\n this.$set(this.addEditData.situations[this.fileIndex], 'files', []);\n this.addEditData.situations[this.fileIndex].files.push(file);\n } // this.$set(\n // this.addEditData.situations[this.fileIndex],\n // 'classified',\n // 0\n // )\n\n },\n changeFileList: function changeFileList(data, index) {\n this.addEditData.situations[index].files = data;\n },\n // ---------------\n // 保存方法\n handleSave: function handleSave(status) {\n var _this3 = this;\n\n this.$refs['form'].validate(function (valid, object) {\n if (valid) {\n var msg = status ? '保存并上报' : '保存为草稿';\n\n _this3.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"\\u5417\\uFF1F\"), _this3.$t('common.tips'), {\n confirmButtonText: _this3.$t('common.confirm'),\n cancelButtonText: _this3.$t('common.cancel'),\n type: 'success'\n }).then(function () {\n _this3.saveData(status, msg);\n }).catch(function () {});\n } else {\n _this3.$message.error('请输入指标完成值');\n }\n });\n },\n // 保存数据\n saveData: function saveData(status, msg, approvalComments) {\n var _this4 = this;\n\n this.markLoading = true;\n var apiName = this.addEditData.id ? 'indexDataUpdate' : 'indexDataEntry';\n var data = JSON.parse(JSON.stringify(this.addEditData));\n data.status = status;\n\n if (approvalComments) {\n data.approvalComments = approvalComments;\n }\n\n api[apiName](data).then(function (res) {\n if (res.state) {\n _this4.$message.success(\"\".concat(msg, \"\\u6210\\u529F\"));\n\n _this4.$emit('getData');\n\n _this4.handleClose();\n }\n\n _this4.markLoading = false;\n }).catch(function (err) {\n _this4.markLoading = false;\n });\n },\n // 审核通过\n handleApprove: function handleApprove() {\n var _this5 = this;\n\n var name = this.$route.name;\n var status = name === 'DepartmentAudit' ? 3 : name === 'SpecialGroupAudit' ? 5 : 7;\n this.$confirm(\"\\u786E\\u8BA4\\u5BA1\\u6838\\u901A\\u8FC7?\", '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'success'\n }).then(function () {\n _this5.saveData(status, '审核通过');\n }).catch(function () {});\n },\n // 审核驳回\n handleReject: function handleReject() {\n var _this6 = this;\n\n this.$confirm(\"\\u786E\\u8BA4\\u9A73\\u56DE?\", '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'error'\n }).then(function () {\n _this6.$refs.RejectInfoBlockDialog.open();\n }).catch(function () {});\n },\n // 驳回提交数据\n sendRejectInfo: function sendRejectInfo(rejectInfo) {\n var name = this.$route.name;\n var status = name === 'DepartmentAudit' ? 2 : name === 'SpecialGroupAudit' ? 4 : 6;\n\n if (!rejectInfo) {\n this.saveLoading = false;\n return;\n }\n\n this.saveData(status, '审核驳回', rejectInfo);\n },\n // 清空数据\n handleClose: function handleClose() {\n var _this7 = this;\n\n this.addEditData = {\n situations: []\n };\n this.visible = false;\n this.$nextTick(function () {\n _this7.$refs.form.clearValidate();\n });\n }\n }\n};",null]}