From e7ba2390711e7332a5d355342dde4021ac9dc2cb Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Mon, 19 Aug 2024 19:54:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E6=97=A5=E5=BF=97=20=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/undocumented/addUpload.vue | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/views/pqs/supervise/interfere/components/undocumented/addUpload.vue b/src/views/pqs/supervise/interfere/components/undocumented/addUpload.vue index 67a2c53e..9b432585 100644 --- a/src/views/pqs/supervise/interfere/components/undocumented/addUpload.vue +++ b/src/views/pqs/supervise/interfere/components/undocumented/addUpload.vue @@ -191,7 +191,7 @@ const choose = (e: any, name: string) => { } const submitForm = async (id: string) => { - console.log(form.value) + // console.log(form.value) let data = [] for (let i in formName.value) { @@ -206,6 +206,7 @@ const submitForm = async (id: string) => { await addOrUpdateFile(data) } const queryFiles = (id: string) => { + reset() getFileById({ id: id }).then(res => { res.data.forEach((item: any) => { if (item.url.length > 0) getFileNamePath(item.url, item.name) @@ -225,6 +226,33 @@ const getFileNamePath = async (val: any, pathName: any) => { }, 100) }) } +const reset = () => { + form.value = { + NetReport: [], //入网设计方案审查报告: + governReport: [], //治理工程验收报告 + informationSecurityTestReport: [], //信息安全检测报告 + acceptanceInspectionReportSingle: [], //信息安全检测报告 + acceptanceInspectionReport: [], //验收检验报告: + typeExperimentReport: [], //型式实验报告 + factoryInspectionReport: [], //出厂检验报告: + performanceTestReport: [], //性能检测报告 + mainWiringDiagram: [], //主接线图: + runTheReport: [] //试运行报告 + } + + formName.value = { + NetReport: '', + governReport: '', + informationSecurityTestReport: '', + acceptanceInspectionReportSingle: '', + acceptanceInspectionReport: '', + typeExperimentReport: '', + factoryInspectionReport: '', + performanceTestReport: '', + mainWiringDiagram: '', + runTheReport: '' + } +} defineExpose({ submitForm, queryFiles })