计划默认不勾选闪变

This commit is contained in:
sjl
2025-10-14 20:54:35 +08:00
parent 55ff45f9a9
commit 045acfa061
2 changed files with 15 additions and 7 deletions

View File

@@ -752,7 +752,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
user_Result: any user_Result: any
if (mode.value === '比对式') { if (mode.value === '比对式') {
;[ [
PqErrSys_Result, PqErrSys_Result,
pqDevList_Result, pqDevList_Result,
pqReportName_Result, pqReportName_Result,
@@ -792,7 +792,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
} }
} }
} else { } else {
;[pqSource_Result, PqScript_Result, PqErrSys_Result, pqDevList_Result, pqReportName_Result] = [pqSource_Result, PqScript_Result, PqErrSys_Result, pqDevList_Result, pqReportName_Result] =
await Promise.all([ await Promise.all([
getTestSourceList(data), getTestSourceList(data),
getPqScriptList(data), getPqScriptList(data),
@@ -825,7 +825,10 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
formContent.errorSysId = pqErrSysList.value[0]?.id ?? '' formContent.errorSysId = pqErrSysList.value[0]?.id ?? ''
formContent.sourceIds = pqSourceList.value[0]?.id ?? '' formContent.sourceIds = pqSourceList.value[0]?.id ?? ''
const datasourceDicts = dictStore.getDictData('Datasource') const datasourceDicts = dictStore.getDictData('Datasource')
formContent.datasourceIds = [datasourceDicts[0]?.code] ?? []
formContent.datasourceIds = datasourceDicts
.filter(item => ['real', 'wave_data'].includes(item.code))
.map(item => item.code)
} else { } else {
//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值 //编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值
@@ -902,7 +905,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
} }
} }
} else { } else {
;[ [
pqSource_Result, pqSource_Result,
PqScript_Result, PqScript_Result,
PqErrSys_Result, PqErrSys_Result,
@@ -1052,7 +1055,9 @@ const handleErrorSysChange = async (value: string) => {
}) })
}) })
} }
formContent.testItems = secondLevelOptions.map(option => option.value) formContent.testItems = secondLevelOptions
.filter(option => option.label !== '闪变')
.map(option => option.value)
} catch (error) { } catch (error) {
formContent.testItems = [] formContent.testItems = []
console.error('获取检测项失败:', error) console.error('获取检测项失败:', error)
@@ -1083,7 +1088,9 @@ const loadTestItemsForErrorSys = async (errorSysId: string) => {
label: (res.data as Record<string, string>)[key] label: (res.data as Record<string, string>)[key]
}) })
}) })
formContent.testItems = secondLevelOptions.map(option => option.value) formContent.testItems = secondLevelOptions
.filter(option => option.label !== '闪变')
.map(option => option.value)
} }
} catch (error) { } catch (error) {
console.error('获取检测项失败:', error) console.error('获取检测项失败:', error)

View File

@@ -43,6 +43,7 @@
v-auth.plan="'analysis'" v-auth.plan="'analysis'"
icon="DataLine" icon="DataLine"
:disabled="!scope.isSelected" :disabled="!scope.isSelected"
v-if=" modeStore.currentMode != '比对式'"
@click="statisticalAnalysisMore(scope.selectedListIds, scope.selectedList)" @click="statisticalAnalysisMore(scope.selectedListIds, scope.selectedList)"
> >
统计分析 统计分析
@@ -104,7 +105,7 @@
v-auth.plan="'analysis'" v-auth.plan="'analysis'"
link link
icon="DataLine" icon="DataLine"
v-if="scope.row.testState == '2'" v-if="scope.row.testState == '2' && modeStore.currentMode != '比对式'"
@click="statisticalAnalysis(scope.row)" @click="statisticalAnalysis(scope.row)"
> >
统计分析 统计分析