微调
This commit is contained in:
@@ -72,7 +72,7 @@ import ComparePreTest from './comparePreTest.vue'
|
||||
import CompareTest from './compareTest.vue'
|
||||
import socketClient from '@/utils/webSocketClient';
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {pauseTest, resumeTest, startPreTest,contrastTest,getContrastTestNumInfo} from '@/api/socket/socket'
|
||||
import {pauseTest, resumeTest, startPreTest,contrastTest} from '@/api/socket/socket'
|
||||
import {useUserStore} from "@/stores/modules/user";
|
||||
import {JwtUtil} from "@/utils/jwtUtil";
|
||||
|
||||
@@ -205,8 +205,6 @@ const handleSubmitAgain = async () => {
|
||||
ActiveStatue.value = 'waiting'
|
||||
preTestStatus.value = 'waiting'
|
||||
|
||||
const checkNum = await mapValue()
|
||||
|
||||
await contrastTest({
|
||||
planId: planId.value,
|
||||
loginName: loginName.value,
|
||||
@@ -214,7 +212,6 @@ const handleSubmitAgain = async () => {
|
||||
standardDevIds: standardDevIds.value,
|
||||
pairs:pairs.value,
|
||||
testItemList:[checkStore.selectTestItems.preTest,false,checkStore.selectTestItems.test],
|
||||
num: checkNum
|
||||
})
|
||||
|
||||
preTestStatus.value = 'start'
|
||||
@@ -227,8 +224,6 @@ const handleSubmitFast = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
const checkNum = await mapValue()
|
||||
|
||||
switch (stepsActive.value) {
|
||||
case 1:
|
||||
if (preTestStatus.value == 'waiting') {
|
||||
@@ -240,7 +235,6 @@ const handleSubmitFast = async () => {
|
||||
standardDevIds: standardDevIds.value,
|
||||
pairs:pairs.value,
|
||||
testItemList:[checkStore.selectTestItems.preTest,false,checkStore.selectTestItems.test],
|
||||
num: checkNum
|
||||
})
|
||||
preTestStatus.value = 'start'
|
||||
}
|
||||
@@ -257,7 +251,6 @@ const handleSubmitFast = async () => {
|
||||
standardDevIds: standardDevIds.value,
|
||||
pairs:pairs.value,
|
||||
testItemList:[checkStore.selectTestItems.preTest,false,checkStore.selectTestItems.test],
|
||||
num: checkNum
|
||||
})
|
||||
}
|
||||
TestStatus.value = 'start'
|
||||
@@ -271,17 +264,6 @@ const handleSubmitFast = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const mapValue = (async () => {
|
||||
const data = await getContrastTestNumInfo(checkStore.plan.id)
|
||||
// 解析返回的数据,现在是 map 类型 {99: 1}
|
||||
const dataMap = data.data as Record<string, number>
|
||||
// 获取键值对
|
||||
const entries = Object.entries(dataMap)
|
||||
// 获取第一对键值
|
||||
const [key, value] = entries[0]
|
||||
|
||||
return value
|
||||
})
|
||||
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
Reference in New Issue
Block a user