是否需要相序检测

This commit is contained in:
sjl
2025-12-05 11:02:25 +08:00
parent be95e792a8
commit ff90f51cf1
2 changed files with 88 additions and 33 deletions

View File

@@ -58,6 +58,7 @@
:webMsgSend="webMsgSend"
:mapping="channelMapping"
:onlyWave="onlyWave"
:xiangXuIsShow="xiangXuIsShow"
/>
</keep-alive>
<keep-alive>
@@ -170,6 +171,9 @@ const preTestRef = ref<InstanceType<typeof ComparePreTest> | null>(null)
const testRef: any = ref(null)
const windowWidth = ref(window.innerWidth)
const computedDialogWidth = ref(0)
const xiangXuIsShow = ref(true)//预检测是否展示相序检测
// 监听窗口大小变化
const handleResize = () => {
windowWidth.value = window.innerWidth
@@ -342,7 +346,8 @@ const handleSubmitAgain = async () => {
standardDevIds: standardDevIds.value,
pairs: pairs.value,
testItemList: [checkStore.selectTestItems.preTest, false, checkStore.selectTestItems.test],
userId: userStore.userInfo.id
userId: userStore.userInfo.id,
phaseCheck: xiangXuIsShow.value ? 1 : 0,
})
preTestStatus.value = 'start'
@@ -350,6 +355,26 @@ const handleSubmitAgain = async () => {
//开始检测
const handleSubmitFast = async () => {
try {
await ElMessageBox.confirm('是否需要进行相序检测?', '确认检测', {
confirmButtonText: '是',
cancelButtonText: '否',
distinguishCancelAndClose: true, // 区分取消和关闭操作
type: 'warning'
});
xiangXuIsShow.value = true;
} catch (action) {
// 区分用户点击关闭按钮和其他情况
if (action === 'cancel') {
// 用户点击了"否"按钮
xiangXuIsShow.value = false;
} else {
// 用户点击了关闭按钮或按了ESC键中断流程
return; // 直接返回,不继续执行后续代码
}
}
if (channelPairingRef.value) {
const res = await channelPairingRef.value.handleNext()
@@ -390,7 +415,8 @@ const handleSubmitFast = async () => {
pairs: pairs.value,
testItemList: [checkStore.selectTestItems.preTest, false, checkStore.selectTestItems.test],
userId: userStore.userInfo.id
userId: userStore.userInfo.id,
phaseCheck: xiangXuIsShow.value ? 1 : 0,
})
preTestStatus.value = 'start'
if (checkStore.selectTestItems.test) {
@@ -414,7 +440,8 @@ const handleSubmitFast = async () => {
pairs: pairs.value,
testItemList: [checkStore.selectTestItems.preTest, false, checkStore.selectTestItems.test],
userId: userStore.userInfo.id
userId: userStore.userInfo.id,
phaseCheck: xiangXuIsShow.value ? 1 : 0,
})
}
TestStatus.value = 'start'
@@ -508,8 +535,6 @@ const sendPause = () => {
pauseTest()
}
const sendResume = () => {
resumeTest({
userPageId: JwtUtil.getLoginName(),
devIds: checkStore.devices.map(item => item.deviceId),