From c58c97ca8bae353d60fb4fb085017969895528e1 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Tue, 20 Aug 2024 11:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=80=E5=8C=97=E7=8E=B0?= =?UTF-8?q?=E5=9C=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interferenceUserTable.vue | 1 + .../components/undocumented/index.vue | 1 + .../components/terminainal/addForm.vue | 28 ++++++++++--------- .../components/terminainal/index.vue | 6 ++-- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/views/pqs/supervise/interfere/components/normalizationManager/interferenceUserTable.vue b/src/views/pqs/supervise/interfere/components/normalizationManager/interferenceUserTable.vue index 5328431a..54449fc8 100644 --- a/src/views/pqs/supervise/interfere/components/normalizationManager/interferenceUserTable.vue +++ b/src/views/pqs/supervise/interfere/components/normalizationManager/interferenceUserTable.vue @@ -308,6 +308,7 @@ tableStore.table.params.projectName = '' tableStore.table.params.loadType = '' tableStore.table.params.userName = '' tableStore.table.params.relationUserName = '' +tableStore.table.params.orgId = adminInfo.$state.deptId tableStore.table.params.aisFileUpload = '' const dialogVisible = ref(false) const interId = ref() diff --git a/src/views/pqs/supervise/interfere/components/undocumented/index.vue b/src/views/pqs/supervise/interfere/components/undocumented/index.vue index 7ea2ee0f..dcfbbe5d 100644 --- a/src/views/pqs/supervise/interfere/components/undocumented/index.vue +++ b/src/views/pqs/supervise/interfere/components/undocumented/index.vue @@ -234,6 +234,7 @@ tableStore.table.params.projectName = '' tableStore.table.params.loadType = '' tableStore.table.params.userName = '' tableStore.table.params.fileUploadflag = '' +tableStore.table.params.orgId = adminInfo.$state.deptId tableStore.table.params.status = '' provide('tableStore', tableStore) diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue index 3882c3fc..236c343f 100644 --- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue +++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue @@ -605,7 +605,7 @@ @@ -803,8 +803,6 @@ getFrontEndMachineList() const powerCompanyList: any = ref([]) //获取所属供电公司,区域列表第三层数据 const getPowerCompanyList = async (flag: any) => { - - getAllDeptList().then(res => { powerCompanyList.value = res.data[0].children[0].children if (flag) { @@ -1356,9 +1354,8 @@ watch( } ) onMounted(() => { - //初始化数据 -resetForm() + resetForm() console.log() }) // 上传报告 @@ -1434,15 +1431,18 @@ const choose = (e: any) => { const disabledDate = time => { return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天 } -const activeName = ref('0') +const importType = ref(0) const resendId = ref('') const open = async (row: any) => { + console.log("🚀 ~ open ~ row:", row.row) let flag = row.row ? true : false + importType.value = 0 if (!flag) await getPowerCompanyList(false) title.value = row.title dialogFormVisible.value = true if (row.row) { resendId.value = row.row.id + importType.value = row.row.importType await getTerminalDetailsById({ id: row.row.id }).then((res: any) => { form.value = { customSubstationFlag: 0, ...res.data, ...res.data.supervisionTempDeviceReport } getPowerCompanyList(true) @@ -1463,17 +1463,19 @@ const open = async (row: any) => { name: res.data[k].split('/')[2] } ] + } else { + form.value[k] = [] } } form.value.id = row.row.id - deviceFilePath.value = res.data.deviceFilePath + deviceFilePath.value = res.data.deviceFilePath || '' // acceptanceInspectionReportSingle.value = res.data.acceptanceInspectionReportSingle - acceptanceInspectionReport.value = res.data.acceptanceInspectionReport - typeExperimentReport.value = res.data.typeExperimentReport - factoryInspectionReport.value = res.data.factoryInspectionReport - performanceTestReport.value = res.data.performanceTestReport - informationSecurityTestReport.value = res.data.informationSecurityTestReport - otherAttachments.value = res.data.otherAttachments + acceptanceInspectionReport.value = res.data.acceptanceInspectionReport || '' + typeExperimentReport.value = res.data.typeExperimentReport || '' + factoryInspectionReport.value = res.data.factoryInspectionReport || '' + performanceTestReport.value = res.data.performanceTestReport || '' + informationSecurityTestReport.value = res.data.informationSecurityTestReport || '' + otherAttachments.value = res.data.otherAttachments || '' form.value.reporter = adminInfo.$state.name form.value.orgId = adminInfo.$state.deptName }) diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue index d3f43dc3..ee593f6c 100644 --- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue +++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue @@ -164,7 +164,7 @@ const tableStore = new TableStore({ icon: 'el-icon-EditPen', render: 'basicButton', disabled: row => { - return !row.processInstanceId + return row.importType == 1 ? false : !row.processInstanceId }, click: row => { flag.value = true @@ -178,10 +178,10 @@ const tableStore = new TableStore({ icon: 'el-icon-Open', render: 'basicButton', showDisabled: row => { - return row.createBy != adminInfo.$state.id || !(row.status == 0) + return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0) }, disabled: row => { - return !(row.status == 0) + return row.importType == 1 ? false : !(row.status == 0) }, click: row => { addForms.value.open({