From f74fedc213f001e34dc745c1e257a0277850302b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Thu, 25 Sep 2025 11:16:57 +0800 Subject: [PATCH 1/5] =?UTF-8?q?UPDATE:=20=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/device/interface/standardDevice.ts | 3 ++- frontend/src/components/ImportZip/index.vue | 4 ++-- frontend/src/views/home/components/tree.vue | 1 - .../plan/planList/components/childrenPlan.vue | 13 ++++------- .../plan/planList/components/devSelect.vue | 8 +++---- .../plan/planList/components/planPopup.vue | 23 +++++++++++-------- frontend/src/views/plan/planList/index.vue | 6 ++--- 7 files changed, 28 insertions(+), 30 deletions(-) diff --git a/frontend/src/api/device/interface/standardDevice.ts b/frontend/src/api/device/interface/standardDevice.ts index 4a345d9..9b50c01 100644 --- a/frontend/src/api/device/interface/standardDevice.ts +++ b/frontend/src/api/device/interface/standardDevice.ts @@ -1,4 +1,4 @@ -import type {ReqPage, ResPage} from '@/api/interface' +import type { ReqPage, ResPage } from '@/api/interface' // 标准设备模块 export namespace StandardDevice { @@ -34,6 +34,7 @@ export namespace StandardDevice { createTime?: string | null; //创建时间 updateBy?: string | null; //更新用户 updateTime?: string | null; //更新时间 + disabled?: boolean; } diff --git a/frontend/src/components/ImportZip/index.vue b/frontend/src/components/ImportZip/index.vue index 80dcec2..7a8e5de 100644 --- a/frontend/src/components/ImportZip/index.vue +++ b/frontend/src/components/ImportZip/index.vue @@ -115,8 +115,8 @@ const handleImportResponse = (res: any) => { if (!parameter.value.progressBar) { if (res.code === 'A0000') { ElMessage.success('导入成功') + emit('result', true) dialogVisible.value = false - emit('result', res.data) } else { ElMessage.error(res.message) fileDisabled.value = false @@ -195,8 +195,8 @@ const initSSE = () => { progressData.value.status = 'success' eventSource.value!.close() ElMessage.success('导入成功') - dialogVisible.value = false emit('result', true) + dialogVisible.value = false } } diff --git a/frontend/src/views/home/components/tree.vue b/frontend/src/views/home/components/tree.vue index 0902670..622df27 100644 --- a/frontend/src/views/home/components/tree.vue +++ b/frontend/src/views/home/components/tree.vue @@ -53,7 +53,6 @@ content="子计划信息" > 新增子计划 - + 编辑子计划 []>([ fixed: 'right', render: (scope: { row: { checkState: number } }) => { return scope.row.checkState === 0 ? ( - + 未检 ) : scope.row.checkState === 1 ? ( - + 检测中 ) : ( @@ -478,6 +472,7 @@ const addTab = (type: string) => { //收到子组件回复后新增子计划tab const addNewChildTab = async () => { await props.refreshTable!() //刷新检测计划列表 + proTable.value?.getTableList() // 刷新当前设备列表 renderTabs() } diff --git a/frontend/src/views/plan/planList/components/devSelect.vue b/frontend/src/views/plan/planList/components/devSelect.vue index e08edd3..d4e6765 100644 --- a/frontend/src/views/plan/planList/components/devSelect.vue +++ b/frontend/src/views/plan/planList/components/devSelect.vue @@ -412,13 +412,13 @@ const convertToTree = (data: Device[], groupBy?: string | undefined) => { const groupNode: Tree = { id: `${groupBy}_${groupName}`, label: groupName, - disabled: props.disabled, children: (items as any[]).map((item: any) => ({ + ...item, label: item.name, children: [], - disabled: item.disabled ? item.disabled : props.disabled, - ...item - })) + disabled: item.disabled ? item.disabled : props.disabled + })), + disabled: props.disabled } treeData.push(groupNode) }) diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue index 2db6774..6a6cb0b 100644 --- a/frontend/src/views/plan/planList/components/planPopup.vue +++ b/frontend/src/views/plan/planList/components/planPopup.vue @@ -13,6 +13,7 @@ @@ -83,7 +84,7 @@ { } } i.checked = boundPqDevIds.includes(i.id) - if (i.assign) { - i.disabled = i.checkState != 0 || i.assign == 1 || allDisabled.value - } else { - i.disabled = allDisabled.value + i.disabled = i.checkState != 0 + if (allDisabled.value) { + i.disabled = true } }) // 排序逻辑 @@ -1117,14 +1117,16 @@ function pqToArray() { if (planType.value === 0) { pqStandardDevArray.value = sourceArray5.map(item => ({ label: item.name, - value: item.id + value: item.id, + disabled: item.disabled || false })) } else if (planType.value === 1) { pqStandardDevArray.value = sourceArray5 .filter(item => formContent.standardDevIds.includes(item.id)) .map(item => ({ label: item.name, - value: item.id + value: item.id, + disabled: item.disabled || false })) formContent.standardDevIds = [] formContent.standardDevMap = new Map() @@ -1134,7 +1136,8 @@ function pqToArray() { const boundStandardDevAllList = Array.isArray(result.data) ? result.data : [] pqStandardDevArray.value = boundStandardDevAllList.map(item => ({ label: item.name, - value: item.id + value: item.id, + disabled: item.disabled || false })) }) } diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index 6edeb53..79d5f37 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -41,7 +41,7 @@ @@ -342,11 +342,11 @@ const columns = reactive[]>([ fieldNames: { label: 'label', value: 'id' }, render: scope => { return scope.row.testState === 0 ? ( - + 未检 ) : scope.row.testState === 1 ? ( - + 检测中 ) : ( From 58bb25500e45d79ae2caccb96fb3716791f8358d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Thu, 25 Sep 2025 14:40:45 +0800 Subject: [PATCH 2/5] =?UTF-8?q?UPDATE:=20=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/plan/planList/components/childrenPlan.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/plan/planList/components/childrenPlan.vue b/frontend/src/views/plan/planList/components/childrenPlan.vue index d305590..7c87ed1 100644 --- a/frontend/src/views/plan/planList/components/childrenPlan.vue +++ b/frontend/src/views/plan/planList/components/childrenPlan.vue @@ -797,9 +797,10 @@ const importAndMergePlanCheckDataClick = () => { } planCheckDataImportZip.value?.acceptParams(params) } -const importResult = async (success: boolean | undefined) => { +const importResult = async (success: boolean) => { if (success) { await props.refreshTable!() + proTable.value?.getTableList() } } From a4a64ef0f95a3b58f9d8d9e6f7f3d80adadfec52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Mon, 29 Sep 2025 09:47:53 +0800 Subject: [PATCH 3/5] =?UTF-8?q?UPDATE:=20=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/plan/planList/components/childrenPlan.vue | 6 ++++-- .../src/views/plan/planList/components/devSelect.vue | 1 + .../src/views/plan/planList/components/planPopup.vue | 9 +++++---- frontend/src/views/plan/planList/index.vue | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/plan/planList/components/childrenPlan.vue b/frontend/src/views/plan/planList/components/childrenPlan.vue index 7c87ed1..5e146e0 100644 --- a/frontend/src/views/plan/planList/components/childrenPlan.vue +++ b/frontend/src/views/plan/planList/components/childrenPlan.vue @@ -416,7 +416,7 @@ const renderTabs = () => { }) } // 子计划 tabs - if (planFormContent.value?.children?.length > 0) { + if (planFormContent.value && planFormContent.value.children && planFormContent.value.children?.length > 0) { planFormContent.value.children.forEach((child, index) => { tabs.push({ title: child.name, @@ -445,7 +445,8 @@ const unbindDevice = (row: any) => { await subPlanBindDev({ planId: row.planId, devIds: [row.id], bindFlag: 0 }) //解绑 0 绑定 1 // 👇 更新数据(例如清空 state 字段) row.state = '/' - proTable.value?.getTableList() + await proTable.value?.getTableList() + await props.refreshTable!() // 可选:刷新表格或提交接口 ElMessage.success('解绑成功') }) @@ -500,6 +501,7 @@ const distribute = (childPlan: Plan.ResPlan, scope: any) => { .then(async () => { await subPlanBindDev({ planId: childPlan.id, devIds: scope.selectedListIds, bindFlag: 1 }) //解绑 0 绑定 1 proTable.value?.getTableList() + await props.refreshTable!() ElMessage.success('分配成功') }) .catch(() => { diff --git a/frontend/src/views/plan/planList/components/devSelect.vue b/frontend/src/views/plan/planList/components/devSelect.vue index d4e6765..5f5c586 100644 --- a/frontend/src/views/plan/planList/components/devSelect.vue +++ b/frontend/src/views/plan/planList/components/devSelect.vue @@ -367,6 +367,7 @@ const initTree = (data: Device[]) => { filter.value.groupBy ) defaultCheckedKeys.value = data.filter(item => item.checked).map(item => item.id) + modelValue.value = defaultCheckedKeys.value // 统计数据 statistics.value.checked = defaultCheckedKeys.value.length statistics.value.total = data.length diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue index 6a6cb0b..ea39a9b 100644 --- a/frontend/src/views/plan/planList/components/planPopup.vue +++ b/frontend/src/views/plan/planList/components/planPopup.vue @@ -460,8 +460,9 @@ const generateData = () => { i.manufacturer = manufacturer.name } } - i.checked = boundPqDevIds.includes(i.id) - i.disabled = i.checkState != 0 + i.checked = boundPqDevIds.length > 0 ? boundPqDevIds.includes(i.id) : false + i.disabled = i.checkState ? i.checkState != 0 : false + if (allDisabled.value) { i.disabled = true } @@ -668,12 +669,12 @@ const save = () => { if (planType.value == 1) { formContent.fatherPlanId = formContent.id formContent.id = '' - formContent.memberIds = [formContent.memberIds?.toString()] + formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : [] await addPlan(formContent) emit('update:tab') // 编辑子计划 } else if (planType.value == 2) { - formContent.memberIds = [formContent.memberIds?.toString()] + formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : [] await updatePlan(formContent) emit('update:tab') console.log('更新子计划', formContent) diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index 79d5f37..67e73c6 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -365,7 +365,7 @@ const columns = reactive[]>([ ) From 7c0ec5844a0dac8616342358c3f5a0598b138f59 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 29 Sep 2025 14:49:29 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/home/components/comparePreTest.vue | 313 ++++++++---------- .../src/views/home/components/compareTest.vue | 53 ++- 2 files changed, 170 insertions(+), 196 deletions(-) diff --git a/frontend/src/views/home/components/comparePreTest.vue b/frontend/src/views/home/components/comparePreTest.vue index 43b7408..b0d0e04 100644 --- a/frontend/src/views/home/components/comparePreTest.vue +++ b/frontend/src/views/home/components/comparePreTest.vue @@ -226,184 +226,161 @@ watch(webMsgSend, function (newValue, oldValue) { } switch (newValue.requestId) { case 'yjc_sbtxjy': - switch (newValue.operateCode) { - case 'INIT_GATHER$02': - if (newValue.code == 10200) { - step1InitLog.value.push({ - type: 'info', - log: newValue.data, - }) - - } else if (newValue.code == 10201) { - step1.value = 'process' - step1InitLog.value = [{ - type: 'wait', - log: '正在进行设备通讯校验.....', - }]; - } else if (newValue.code == 10551) { - step1InitLog.value.push({ - type: 'error', - log: newValue.data + '设备触发报告异常!', - }) - step1.value = 'error' - ts.value = 'error' - step5.value = 'error' - } else if (newValue.code == 10552) { - step1InitLog.value = [{ - type: 'error', - log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', - }]; - step1.value = 'error' - ts.value = 'error' - step5.value = 'error' - } else if (newValue.code == 25001) { - activeIndex.value = 1 - step1.value = 'success' - step2.value = 'process' - } - break; - case 'INIT_GATHER$03': - if (newValue.code == 10200) { - step1InitLog.value.push({ - type: 'info', - log: newValue.data, - }) - }else if (newValue.code == 25001) { - step1InitLog.value.push({ - type: 'info', - log: newValue.data, - }) - activeIndex.value = 1 - step1.value = 'success' - step2.value = 'process' - } - break; - case 'DATA_REQUEST$03': - if (newValue.code == 25001) { - activeIndex.value = 1 - step1.value = 'success' - step2.value = 'process' - } - break; + if (newValue.code == 10200) { + step1InitLog.value.push({ + type: 'info', + log: newValue.data, + }) + } + if (newValue.code == 10201) { + step1.value = 'process' + step1InitLog.value = [{ + type: 'wait', + log: '正在进行设备通讯校验.....', + }]; + } + if (newValue.code == 10551) { + step1InitLog.value.push({ + type: 'error', + log: newValue.data + '设备触发报告异常!', + }) + step1.value = 'error' + ts.value = 'error' + step5.value = 'error' + } + if (newValue.code == 10552) { + step1InitLog.value = [{ + type: 'error', + log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', + }]; + step1.value = 'error' + ts.value = 'error' + step5.value = 'error' + } + if (newValue.code == 25001) { + step1InitLog.value.push({ + type: 'info', + log: newValue.data, + }) + activeIndex.value = 1 + step1.value = 'success' + step2.value = 'process' } break; case 'record_wave_step1': - switch (newValue.operateCode) { - case 'DATA_REQUEST$03': - if (newValue.code == 25002) { //某一路录波校验失败 - step1InitLog.value.push({ - type: 'error', - log: newValue.data , - }) - }else if (newValue.code == 25003) { //最终失败 - step1.value = 'error' - ts.value = 'error' - step5.value = 'error' - } + if (newValue.code == 25002) { //某一路录波校验失败 + step1InitLog.value.push({ + type: 'error', + log: newValue.data, + }) + } else if (newValue.code == 25003) { //最终失败 + step1.value = 'error' + ts.value = 'error' + step5.value = 'error' } break; case 'yjc_mxyzxjy': - switch (newValue.operateCode){ - case 'DATA_REQUEST$02': - if (newValue.code == 10200) { //单个监测点成功 - step2InitLog.value.push({ - type: 'info', - log: newValue.data + '模型一致性检验成功!', - }) - }else if (newValue.code == 10201) { - step2.value = 'process' - step2InitLog.value = [{ - type: 'wait', - log: '正在进行模型一致性校验.....', - }]; - } else if (newValue.code == 25002) { //单个监测点失败 - step2InitLog.value.push({ - type: 'error', - log: newValue.data +'模型一致性检验失败!', - }) - }else if (newValue.code == 25001) { //最终成功 - step2.value = 'success' - step3.value = 'process' - activeIndex.value = 2 - }else if (newValue.code == 25003) { //最终失败 - step2.value = 'error' - ts.value = 'error' - step5.value = 'error' - } - break; + if (newValue.code == 10200) { //单个监测点成功 + step2InitLog.value.push({ + type: 'info', + log: newValue.data + '模型一致性检验成功!', + }) } - break; + if (newValue.code == 10201) { + step2.value = 'process' + step2InitLog.value = [{ + type: 'wait', + log: '正在进行模型一致性校验.....', + }]; + } + if (newValue.code == 25002) { //单个监测点失败 + step2InitLog.value.push({ + type: 'error', + log: newValue.data + '模型一致性检验失败!', + }) + } + if (newValue.code == 25001) { //最终成功 + step2.value = 'success' + step3.value = 'process' + activeIndex.value = 2 + } + if (newValue.code == 25003) { //最终失败 + step2.value = 'error' + ts.value = 'error' + step5.value = 'error' + } + break; case 'yjc_align': - switch (newValue.operateCode){ - case 'DATA_REQUEST$02': - if (newValue.code == 10200) { //单个监测点成功 - step3InitLog.value.push({ - type: 'info', - log: newValue.data +'实时数据对齐检验成功!', - }) - }else if (newValue.code == 10201) { - step3.value = 'process' - step3InitLog.value = [{ - type: 'wait', - log: '正在进行实时数据对齐检验.....', - }]; - }else if (newValue.code == 25002) { //单个监测点失败 - - step3InitLog.value.push({ - type: 'error', - log: newValue.data + '实时数据对齐检验失败!', - }) - }else if (newValue.code == 25001 && newValue.data) { //最终成功 - isShowDialog.value = true - step3.value = 'success' - step4.value = 'process' - activeIndex.value = 3 - testDataStructure.value = newValue.data - }else if (newValue.code == 25003) { //最终失败 - - isShowDialog.value = true - step3.value = 'error' - ts.value = 'error' - step5.value = 'error' - testDataStructure.value = newValue.data - } - break; + if (newValue.code == 10200) { //单个监测点成功 + step3InitLog.value.push({ + type: 'info', + log: newValue.data + '数据对齐检验成功!', + }) } - break; + if (newValue.code == 10201) { + step3.value = 'process' + step3InitLog.value = [{ + type: 'wait', + log: '正在进行数据对齐检验.....', + }]; + } + if (newValue.code == 25002) { //单个监测点失败 + + step3InitLog.value.push({ + type: 'error', + log: newValue.data + '数据对齐检验失败!', + }) + } + if (newValue.code == 25001 && newValue.data) { //最终成功 + isShowDialog.value = true + step3.value = 'success' + step4.value = 'process' + activeIndex.value = 3 + testDataStructure.value = newValue.data + } + if (newValue.code == 25003) { //最终失败 + + isShowDialog.value = true + step3.value = 'error' + ts.value = 'error' + step5.value = 'error' + testDataStructure.value = newValue.data + } + break; case 'YJC_xujy': - switch (newValue.operateCode) { - case 'DATA_REQUEST$02': - if (newValue.code == 10200) { - step4InitLog.value.push({ - type: 'info', - log: newValue.data, - }) - }else if (newValue.code == 10201) { - step4.value = 'process' - step4InitLog.value = [{ - type: 'wait', - log: '正在进行相序性检.....', - }]; - } else if(newValue.code == 25002){ - step4InitLog.value.push({ - type: 'error', - log: newValue.data, - }) - } else if (newValue.code == 25003) { - step4InitLog.value.push({ - type: 'error', - log: newValue.data, - }) - step4.value = 'error' - ts.value = 'error' - step5.value = 'error' - } else if (newValue.code == 25001) { - step4.value = 'success' - step5.value = 'success' - ts.value = 'success' - activeIndex.value = 4 - } - break + if (newValue.code == 10200) { + step4InitLog.value.push({ + type: 'info', + log: newValue.data, + }) + } + if (newValue.code == 10201) { + step4.value = 'process' + step4InitLog.value = [{ + type: 'wait', + log: '正在进行相序性检.....', + }]; + } + if (newValue.code == 25002) { + step4InitLog.value.push({ + type: 'error', + log: newValue.data, + }) + } + if (newValue.code == 25003) { + step4InitLog.value.push({ + type: 'error', + log: newValue.data, + }) + step4.value = 'error' + ts.value = 'error' + step5.value = 'error' + } + if (newValue.code == 25001) { + step4.value = 'success' + step5.value = 'success' + ts.value = 'success' + activeIndex.value = 4 } break; case 'quit': diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index d43d290..4667e23 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -394,31 +394,24 @@ watch( setLogList('error', '设备主动关闭连接!') stopTimeCount() break - case 'yjc_xyjy' : - switch (newValue.operateCode) { - - case 'INIT_GATHER$03': - if (newValue.code == 10552) { - ElMessageBox.alert('重复的初始化操作!', '检测失败', { - confirmButtonText: '确定', - type: 'error', - }) - setLogList('error', '重复的初始化操作!') - stopTimeCount() - } - } - break; + case 'yjc_xyjy' : + if (newValue.code == 10552) { + ElMessageBox.alert('重复的初始化操作!', '检测失败', { + confirmButtonText: '确定', + type: 'error', + }) + setLogList('error', '重复的初始化操作!') + stopTimeCount() + } + break; case 'yjc_sbtxjy' : - switch (newValue.operateCode) { - case 'INIT_GATHER$02': - ElMessageBox.alert('重复的初始化操作!', '检测失败', { - confirmButtonText: '确定', - type: 'error', - }) - setLogList('error', '重复的初始化操作!') - stopTimeCount() - } - break; + ElMessageBox.alert('重复的初始化操作!', '检测失败', { + confirmButtonText: '确定', + type: 'error', + }) + setLogList('error', '重复的初始化操作!') + stopTimeCount() + break; } if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') { if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') { @@ -431,7 +424,7 @@ watch( : newValue.requestId == 'yjc_mxyzxjy' ? '模型一致性检验' : newValue.requestId == 'yjc_align' - ? '实时数据对齐检验' + ? '数据对齐检验' : newValue.requestId == 'YJC_xujy' ? '相序校验' : '' @@ -462,12 +455,13 @@ watch( switch (newValue.code) { case 25001: case 25005: + case 25006: { let result: CheckData.ScriptChnItem[] = [] let message = JSON.parse(newValue.data) - // 当收到 25005 消息时,录波项目开始loading - if (newValue.code == 25005) { + // 当收到 25005/25006 消息时,录波项目开始loading + if (newValue.code == 25005 || newValue.code == 25006) { // 设置录波项目为LOADING状态 const waveResultItem = checkResult.find(item => item.code === 'wave_data') @@ -487,7 +481,7 @@ watch( } // 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目,则使用已设置的状态 - if (newValue.code == 25005 && item.code === 'wave_data') { + if ((newValue.code == 25005||newValue.code == 25006) && item.code === 'wave_data') { const existingWaveItem = checkResult.find(checkItem => checkItem.scriptType === 'wave_data') if (existingWaveItem) { temp.devices = [...existingWaveItem.devices] // 保留已设置的devices @@ -536,6 +530,9 @@ watch( if(newValue.code == 25005){ setLogList("error", '实时数据校验失败!开始录波校验...') } + if(newValue.code == 25006){ + setLogList("error", '统计数据校验失败!开始录波校验...') + } break } From b0c88b9df2fa936078af54d496014b44106a088d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Tue, 30 Sep 2025 08:42:45 +0800 Subject: [PATCH 5/5] =?UTF-8?q?UPDATE:=20=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/plan/planList/components/planPopup.vue | 12 ++++++++++-- frontend/src/views/plan/planList/index.vue | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue index ea39a9b..ed9ef84 100644 --- a/frontend/src/views/plan/planList/components/planPopup.vue +++ b/frontend/src/views/plan/planList/components/planPopup.vue @@ -461,8 +461,9 @@ const generateData = () => { } } i.checked = boundPqDevIds.length > 0 ? boundPqDevIds.includes(i.id) : false - i.disabled = i.checkState ? i.checkState != 0 : false - + if (i.checkState && i.checkState != 0) { + i.disabled = true + } if (allDisabled.value) { i.disabled = true } @@ -948,6 +949,13 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan: ...user, disabled: childrenMembers.includes(user.id) || formContent.leader === user.id })) + const subPlanIds = data.children.map((item: any) => item.id) + const subBoundDev_Result = await getBoundPqDevList({ planIdList: subPlanIds }) + const subBoundDevData = Array.isArray(subBoundDev_Result.data) ? subBoundDev_Result.data : [] + const subBoundDevIds = subBoundDevData.map((item: any) => item.id) + boundPqDevList.value.forEach((item: any) => { + item.disabled = subBoundDevIds.includes(item.id) + }) } } else if (planType.value === 1) { unboundPqDevList.value = boundData.filter((i: any) => !i.boundPlanName) as Device.ResPqDev[] diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index 67e73c6..0ae6774 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -103,7 +103,7 @@ type="primary" v-auth.plan="'analysis'" link - :icon="List" + icon="DataLine" v-if="scope.row.testState == '2'" @click="statisticalAnalysis(scope.row)" > @@ -149,7 +149,7 @@