This commit is contained in:
caozehui
2025-08-26 15:39:58 +08:00
parent ac4e0e2077
commit d7f1224df4
4 changed files with 236 additions and 219 deletions

View File

@@ -214,7 +214,7 @@ const open = async (row: any, chnNum: string, deviceId: string | null, source: n
// 查询大项树
const initScriptData = async (row: any) => {
const pattern = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? ''
let response: any = await getBigTestItem({
reCheckType: checkStore.reCheckType,
planId: checkStore.plan.id,
@@ -238,27 +238,27 @@ const initScriptData = async (row: any) => {
}
//获取基本信息
const getBasicInformation = async () => {
getContrastFormContent({
planId: checkStore.plan.id,
scriptType: rowList.value.scriptType,
deviceId: formContent.deviceId,
chnNum: formContent.chnNum,
num: formContent.num ?? null
}).then((res: any) => {
formContent.dataRule = res.data.dataRule
formContent.deviceName = res.data.deviceName
formContent.errorSysId = res.data.errorSysId
chnMapList.value = res.data.chnMap
formContent.num = res.data.checkNum
let chnMap: string[] = []
for (let key in res.data.chnMap) {
chnMap.push(key)
}
chnList.value = chnMap
formContent.chnNum = formContent.chnNum == null ? chnList.value[0] : formContent.chnNum
// 查询表格数据
getResults()
})
getContrastFormContent({
planId: checkStore.plan.id,
scriptType: rowList.value.scriptType,
deviceId: formContent.deviceId,
chnNum: formContent.chnNum,
num: formContent.num == '' ? null : parseInt(formContent.num)
}).then((res: any) => {
formContent.dataRule = res.data.dataRule
formContent.deviceName = res.data.deviceName
formContent.errorSysId = res.data.errorSysId
chnMapList.value = res.data.chnMap
formContent.num = res.data.checkNum
let chnMap: string[] = []
for (let key in res.data.chnMap) {
chnMap.push(key)
}
chnList.value = chnMap
formContent.chnNum = formContent.chnNum == null ? chnList.value[0] : formContent.chnNum
// 查询表格数据
getResults()
})
}
// 左边树变化
@@ -269,24 +269,25 @@ const handleNodeClick = (data: any) => {
}
// 获取结果
const getResults = async () => {
checkResultData.value = []
rawTableData.value = []
getContrastResult({
planId: checkStore.plan.id,
scriptType: rowList.value.scriptType,
deviceId: formContent.deviceId,
chnNum: formContent.chnNum,
num: formContent.num == '' ? null : formContent.num
}).then((res: any) => {
let list: string[] = []
for (let key in res.data.resultMap) {
list.push(key)
}
currentCheckItem.value = list[0]
tesList.value = list
checkResultData.value = res.data.resultMap
rawTableData.value = res.data.rawDataMap
})
checkResultData.value = []
rawTableData.value = []
getContrastResult({
planId: checkStore.plan.id,
scriptType: rowList.value.scriptType,
deviceId: formContent.deviceId,
chnNum: formContent.chnNum,
num: formContent.num == '' ? null : formContent.num
}).then((res: any) => {
let list: string[] = []
for (let key in res.data.resultMap) {
list.push(key)
}
currentCheckItem.value = list[0]
tesList.value = list
checkResultData.value = res.data.resultMap
rawTableData.value = res.data.rawDataMap
})
}
const close = () => {