{"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\\ReformPilotManage\\components\\FormResultsDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformPilotManage\\components\\FormResultsDialog.vue","mtime":1687933939321},{"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/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 moment from 'moment';\nimport sat from '@/api/satisfaction/satisfaction';\nimport filePreview from '@/components/FilePreview/filePreview.vue';\nimport UploadFile from '@/components/uploadFile/index.vue';\nimport FileList from '@/components/uploadFile/newFileList.vue';\nvar portal = window.context.portal;\nimport utils from '@/utils.js';\nexport default {\n name: 'FormResultsDialog',\n components: {\n filePreview: filePreview,\n UploadFile: UploadFile,\n FileList: FileList\n },\n data: function data() {\n return {\n dialogFormVisible: false,\n formLabelWidth: '120px',\n resultForm: {\n resultName: '',\n resultForm: '',\n resultDate: '',\n ids: [],\n solveProblem: '',\n actualEffect: '',\n id: ''\n },\n fileList: [],\n disabled: false,\n imgLoading: false,\n resultRule: {\n resultForm: [{\n required: true,\n message: '请选择成果形式',\n trigger: 'change'\n }],\n resultDate: [{\n required: true,\n message: '请选择成果形成日期',\n trigger: 'change'\n }],\n resultName: [{\n required: true,\n message: '请输入成果名称',\n trigger: 'blur'\n }],\n classified: [{\n required: true,\n message: '请选择文件是否涉密',\n trigger: 'change'\n }]\n },\n dialogImageUrl: '',\n dialogVisible: false,\n isEdit: false,\n // 文件是否涉密\n cipher: false,\n classified: 0,\n reslultIds: [],\n removeIds: [],\n isRequest: true\n };\n },\n methods: {\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n // 打开弹窗\n open: function open(item) {\n console.log(item);\n this.dialogFormVisible = true;\n this.resultForm = item;\n this.fileList = item.fileList || [];\n this.classified = item.classified;\n },\n // 关闭弹窗\n closeResultForm: function closeResultForm() {\n this.dialogFormVisible = false;\n this.fileList = [];\n this.$refs.result.resetFields();\n this.classified = 0;\n },\n openUploade: function openUploade() {\n this.$refs.uploadFile.open('PilotResult');\n },\n setFileList: function setFileList(file) {\n this.fileList.push(file);\n this.classified = 0;\n },\n beforeRemove: function beforeRemove(file, fileList) {\n var _this = this;\n\n var name = file.name ? file.name : file.fileName + '.' + file.extensionName;\n this.$confirm(\"\\u786E\\u5B9A\\u5220\\u9664 \".concat(name, \"\\uFF1F\"), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n sat.deleteFileById(id, function (res) {\n if (res.state) {\n _this.$message.success('附件删除成功');\n\n var arr = _this.fileList.filter(function (item) {\n var fileId = item.id || item.response.fileId;\n\n if (fileId !== id) {\n return item;\n }\n });\n\n if (arr.length == 0) {\n _this.classified = 0;\n }\n\n _this.fileList = arr;\n } else {\n _this.$message.error('附件删除失败');\n }\n });\n });\n },\n handlePreview: function handlePreview(file) {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n this.dialogImageUrl = this.previewUrl + id;\n var type = file.extensionName ? file.extensionName : file.name.split('.')[1];\n this.$refs.filePreview.previewUrl = this.previewUrl + id;\n this.$refs.filePreview.open(type);\n },\n // 文件下载\n handleDownloadFile: function handleDownloadFile(file) {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n window.open(portal + \"/file/v1/downloadFile?fileId=\".concat(id), '_self');\n },\n changeFileList: function changeFileList(arr) {\n this.fileList = arr;\n },\n idExist: function idExist(id) {\n if (!this.reslultIds.includes(id)) {\n // this.isRequest = false\n this.removeIds.push(id);\n } // else {\n // this.isRequest = true\n // }\n\n },\n // 保存数据\n setAipher: function setAipher(val) {\n this.cipher = val;\n this.classified = 1;\n this.saveResultData();\n },\n saveResultData: function saveResultData() {\n var _this2 = this;\n\n var data = JSON.parse(JSON.stringify(this.resultForm));\n this.$refs.result.validate(function (valid) {\n var falg = valid && _this2.classified || valid && _this2.fileList.length != 0;\n\n if (falg) {\n data.classified = _this2.classified;\n data.fileList = _this2.fileList; // data.ids = this.fileList.map(item => item.id || item.response.fileId)\n\n data.resultDate = moment(_this2.resultForm.resultDate).format('YYYY-MM-DD');\n\n _this2.$emit('pushResult', data, _this2.removeIds);\n\n _this2.closeResultForm();\n\n _this2.cipher = false;\n } else {\n if (!valid) {\n _this2.$confirm('请填写完整信息。', '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n } else if (_this2.classified != 1 && _this2.fileList.length == 0) {\n _this2.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this2.openUploade();\n });\n }\n }\n });\n } // 查看详情\n\n }\n};",null]}