From cb0a72a6809883debb70850ede6d9ecdfd34db06 Mon Sep 17 00:00:00 2001 From: monkeyhouyi Date: Fri, 18 Oct 2024 20:12:31 +0800 Subject: [PATCH] 核查处置优化 --- src/api/common.js | 4 ++-- src/api/systemData/dataInterface.js | 9 +++++++++ src/views/DisposalSuggestions/Form.vue | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------- src/views/DisposalSuggestions/HandleForm.vue | 48 +++++++++++++++++++++++++++++++++++++++++------- src/views/DisposalSuggestions/index.vue | 574 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/views/baseInspectionReport/Form.vue | 52 ++++++++++++++++++++++++++++++++++++++-------------- src/views/baseInspectionReport/index.vue | 2 +- 7 files changed, 502 insertions(+), 254 deletions(-) diff --git a/src/api/common.js b/src/api/common.js index 00289ea..5886bee 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -20,9 +20,9 @@ export async function uploader({ type, file }) { data: { file } }); } -export function getDownloadUrl(type, fileName) { +export function getDownloadUrl(type, fileId, name) { return request({ - url: `/file/Download/${type}/${fileName}`, + url: `/file/Download/${type}/${fileId}/${encodeURIComponent(name)}`, method: 'get' }) } diff --git a/src/api/systemData/dataInterface.js b/src/api/systemData/dataInterface.js index 9e39cba..cc47296 100644 --- a/src/api/systemData/dataInterface.js +++ b/src/api/systemData/dataInterface.js @@ -139,4 +139,13 @@ export function getDataInterfaceLog(id, data) { method: 'GET', data }) +} + +// 编辑不进入流程 +export function UpdateByHandle(data) { + return request({ + url: `/Extend/BaseInspectionReport/${data.id}/UpdateByHandle`, + method: 'PUT', + data + }) } \ No newline at end of file diff --git a/src/views/DisposalSuggestions/Form.vue b/src/views/DisposalSuggestions/Form.vue index 0d33df9..f74996b 100644 --- a/src/views/DisposalSuggestions/Form.vue +++ b/src/views/DisposalSuggestions/Form.vue @@ -109,24 +109,58 @@
{{ dataForm.areaName || "--" }}
- + +
研判信息{{ i + 1 }}
-
处置建议:
-
{{ dataForm.judgmentOpinions || "--" }}
+
处置类型:
+
{{ v.State }}
+
+
+
处置建议:
+
{{ v.judgmentOpinion }}
- + +
处置信息{{ index + 1 }}
-
处置结果:
-
{{ dataForm.disposalSuggestions || "--" }}
+
处置结果:
+
{{ v.disposalSuggestion }}
+
+
+
处置附件:
+
+ +
- + + + @@ -242,6 +276,7 @@ import { getDictionaryDataSelector } from "@/api/systemData/dictionary"; import { getDetail, disposalSuggestionsAPI, + UpdateByHandle } from "@/api/systemData/dataInterface"; export default { components: {}, @@ -301,6 +336,7 @@ export default { areaOptions: [], btnLoading: false, communicationOutOptions: [], + formType: '', }; }, computed: { @@ -341,12 +377,13 @@ export default { goBack() { this.$emit("refresh"); }, - async init(id, isDetail) { + async init(id, isDetail, type) { this.dataForm.id = id || 0; this.visible = true; this.showSuggsetion = false; this.showarea = false; this.loading = true; + this.formType = type || ''; await this.initCommunicationOutOptions(); await this.getSourceOptions(); await this.initAreaTypeList(); @@ -390,7 +427,15 @@ export default { id: this.dataForm.id, }; this.btnLoading = true; - let res = await disposalSuggestionsAPI(obj); + let res + if(this.formType) { + // 编辑 + res = await UpdateByHandle(obj); + console.log(res, 'bianji'); + } else { + // 研判 + res = await disposalSuggestionsAPI(obj); + } if (res.code != 200) return (this.btnLoading = false); this.$message({ message: res.msg, diff --git a/src/views/DisposalSuggestions/HandleForm.vue b/src/views/DisposalSuggestions/HandleForm.vue index 32c64a0..2b0e8c9 100644 --- a/src/views/DisposalSuggestions/HandleForm.vue +++ b/src/views/DisposalSuggestions/HandleForm.vue @@ -110,24 +110,58 @@
{{ dataForm.areaName || "--" }}
- + +
研判信息{{ i + 1 }}
+
+
处置类型:
+
{{ v.State }}
+
+
+
处置建议:
+
{{ v.judgmentOpinion }}
+
+
+ +
处置信息{{ i + 1 }}
+
+
处置结果:
+
{{ v.disposalSuggestion }}
+
+
+
处置附件:
+
+ +
+
+
+ +
diff --git a/src/views/DisposalSuggestions/index.vue b/src/views/DisposalSuggestions/index.vue index 6b9b1b5..652ab54 100644 --- a/src/views/DisposalSuggestions/index.vue +++ b/src/views/DisposalSuggestions/index.vue @@ -1,67 +1,133 @@ \ No newline at end of file + diff --git a/src/views/baseInspectionReport/Form.vue b/src/views/baseInspectionReport/Form.vue index 2e398be..022856f 100644 --- a/src/views/baseInspectionReport/Form.vue +++ b/src/views/baseInspectionReport/Form.vue @@ -129,7 +129,7 @@ - + 所属外协:
外协一
- -
处置建议:
-
{{ dataForm.judgmentOpinions || '--' }}
-
- -
处置结果:
-
{{ dataForm.disposalSuggestions || '--' }}
+ +
研判信息{{ i + 1 }}
+
+
处置类型:
+
{{ v.State }}
+
+
+
处置建议:
+
{{ v.judgmentOpinion }}
+
- -
处置附件:
-
- + +
处置信息{{ i + 1 }}
+
+
处置结果:
+
{{ v.disposalSuggestion }}
+
+
+
处置附件:
+
+ +
@@ -305,6 +315,9 @@ export default { questionType: [ { required: true, message: "请选择问题类型", trigger: "blur" }, ], + disposalSuggestions: [ + { required: true, message: "请填写处置结果", trigger: "blur" }, + ], // otherQuestionType: [ // { required: true, message: "请输入其他问题类型", trigger: "blur" }, // ], @@ -459,6 +472,10 @@ export default { if(res.code != 200) return this.form_loading = false; if(!res.data) return; this.dataForm = res.data; + if(!this.isDetail) { + let disposalSuggestions = this.dataForm.disposalSuggestions; + this.dataForm.disposalSuggestions = disposalSuggestions[disposalSuggestions.length - 1].disposalSuggestion; + } res.data.areaId && (this.dataForm.areaName = dynamicText(res.data.areaId, this.areaOptions)); this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); if(this.questionTypeOptions.findIndex(v => v.fullName == this.dataForm.questionType) == -1) { @@ -479,7 +496,14 @@ export default { ...this.dataForm, questionType: this.dataForm.questionType == '其他' ? this.dataForm.otherQuestionType : this.dataForm.questionType, selfMediaPlatformType: this.dataForm.selfMediaPlatformType == '其他' ? this.dataForm.selfMediaPlatformTypeOther : this.dataForm.selfMediaPlatformType, - } + disposalSuggestions: [ + { + disposalSuggestion: this.dataForm.disposalSuggestions, + fileUrl: '', + } + ], + }; + this.isSHILevel && delete obj.disposalSuggestions; this.btnLoading = true; try { let res = !this.dataForm.id ? await addForm(obj) : await updataForm(obj); diff --git a/src/views/baseInspectionReport/index.vue b/src/views/baseInspectionReport/index.vue index a0d1479..647a42d 100644 --- a/src/views/baseInspectionReport/index.vue +++ b/src/views/baseInspectionReport/index.vue @@ -84,7 +84,7 @@ -- libgit2 0.21.4