微调
This commit is contained in:
@@ -333,7 +333,7 @@ watch(testStatus, function (newValue, oldValue) {
|
|||||||
handleReCheck()
|
handleReCheck()
|
||||||
}
|
}
|
||||||
emit('update:testStatus', 'test_init')
|
emit('update:testStatus', 'test_init')
|
||||||
startTimer() // todo 可移除
|
//startTimer() // todo 可移除
|
||||||
startData.value = new Date();
|
startData.value = new Date();
|
||||||
timeDifference.value = 0;
|
timeDifference.value = 0;
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
|
||||||
@@ -473,25 +473,25 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// case 'connect':
|
case 'connect':
|
||||||
// switch (newValue.operateCode) {
|
switch (newValue.operateCode) {
|
||||||
// case "Source":
|
case "Source":
|
||||||
// ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', {
|
ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', {
|
||||||
// confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
// type: 'error',
|
type: 'error',
|
||||||
// })
|
})
|
||||||
// testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`})
|
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`})
|
||||||
// break;
|
break;
|
||||||
// case "Dev":
|
case "Dev":
|
||||||
// ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', {
|
ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', {
|
||||||
// confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
// type: 'error',
|
type: 'error',
|
||||||
// })
|
})
|
||||||
// testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`})
|
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`})
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// emit('update:testStatus', 'test_init_fail')
|
emit('update:testStatus', 'test_init_fail')
|
||||||
// break;
|
break;
|
||||||
case 'yjc_ytxjy':
|
case 'yjc_ytxjy':
|
||||||
switch (newValue.operateCode) {
|
switch (newValue.operateCode) {
|
||||||
case 'INIT_GATHER':
|
case 'INIT_GATHER':
|
||||||
@@ -532,7 +532,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
|
|
||||||
|
|
||||||
activeIndex = getNextActiveIndex() + 2
|
activeIndex = getNextActiveIndex() + 2
|
||||||
startTimer()
|
//startTimer()
|
||||||
|
|
||||||
emit('update:testStatus', 'process')
|
emit('update:testStatus', 'process')
|
||||||
}
|
}
|
||||||
@@ -643,8 +643,8 @@ const handleStartItem = (code: string, desc: string | undefined) => {
|
|||||||
updateCheckResultView(code, true)
|
updateCheckResultView(code, true)
|
||||||
updateLog(true)
|
updateLog(true)
|
||||||
} else {
|
} else {
|
||||||
if (desc.length > 100) {
|
if (desc.length > 150) {
|
||||||
desc = desc.substring(0, 100) + '...'
|
desc = desc.substring(0, 150) + '...'
|
||||||
}
|
}
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}准确度检测:开始`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}准确度检测:开始`})
|
||||||
}
|
}
|
||||||
@@ -657,12 +657,12 @@ const handleEndItem = (code: string, desc: string | undefined, devices: CheckDat
|
|||||||
updateLog(false)
|
updateLog(false)
|
||||||
if (testStatus.value != 'paused') {
|
if (testStatus.value != 'paused') {
|
||||||
activeIndex = getNextActiveIndex(code)
|
activeIndex = getNextActiveIndex(code)
|
||||||
startTimer()
|
//startTimer()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let result = getResult(devices)
|
let result = getResult(devices)
|
||||||
if (desc.length > 100) {
|
if (desc.length > 150) {
|
||||||
desc = desc.substring(0, 100) + '...'
|
desc = desc.substring(0, 150) + '...'
|
||||||
}
|
}
|
||||||
if (result === 1) {
|
if (result === 1) {
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}检测结束:符合`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}检测结束:符合`})
|
||||||
@@ -938,12 +938,12 @@ function getErrorCheckItem(scriptType: string) {
|
|||||||
|
|
||||||
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: CheckData.DeviceCheckResult[] = []) => {
|
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: CheckData.DeviceCheckResult[] = []) => {
|
||||||
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
|
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
|
||||||
devices = [
|
// devices = [
|
||||||
{
|
// {
|
||||||
chnResult: [1, 1, 1, 1],
|
// chnResult: [1, 1, 1, 1],
|
||||||
deviceId: "3250a0ff180845cc8885da4ff628261e",
|
// deviceId: "3250a0ff180845cc8885da4ff628261e",
|
||||||
deviceName: "测试装置-0122-02"
|
// deviceName: "测试装置-0122-02"
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// chnResult: [1, 1, 1, 1],
|
// chnResult: [1, 1, 1, 1],
|
||||||
// deviceId: "df23a4178d194467a432ddf45e835e48",
|
// deviceId: "df23a4178d194467a432ddf45e835e48",
|
||||||
@@ -959,7 +959,7 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch
|
|||||||
// deviceId: "461813a4f30f4a34a1a273ecd0379458",
|
// deviceId: "461813a4f30f4a34a1a273ecd0379458",
|
||||||
// deviceName: "25011407"
|
// deviceName: "25011407"
|
||||||
// }
|
// }
|
||||||
]
|
// ]
|
||||||
let temp = null
|
let temp = null
|
||||||
if (isStart) {
|
if (isStart) {
|
||||||
temp = getLoadingResult(scriptType)
|
temp = getLoadingResult(scriptType)
|
||||||
@@ -1340,7 +1340,7 @@ const handleResumeTest = () => {
|
|||||||
type: 'info',
|
type: 'info',
|
||||||
log: `${new Date().toLocaleString()}:继续检测`,
|
log: `${new Date().toLocaleString()}:继续检测`,
|
||||||
})
|
})
|
||||||
startTimer()
|
//startTimer()
|
||||||
resumeTimeCount()
|
resumeTimeCount()
|
||||||
console.log('开始继续检测')
|
console.log('开始继续检测')
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ const sendResume = () => {
|
|||||||
userPageId: "cdf",
|
userPageId: "cdf",
|
||||||
devIds: checkStore.devices.map((item) => item.deviceId),
|
devIds: checkStore.devices.map((item) => item.deviceId),
|
||||||
planId: checkStore.plan.id,
|
planId: checkStore.plan.id,
|
||||||
operateType: '2' // '1'为预检测、‘2‘为正式检测
|
operateType: '2' // 0:'系数校验','1'为预检测、‘2‘为正式检测
|
||||||
})
|
})
|
||||||
Object.assign(webMsgSend.value, {
|
Object.assign(webMsgSend.value, {
|
||||||
requestId: 'Resume_Success'
|
requestId: 'Resume_Success'
|
||||||
|
|||||||
Reference in New Issue
Block a user