socket连接不上处理

This commit is contained in:
sjl
2025-01-17 09:59:23 +08:00
parent 634c2d84fc
commit ce47831992
2 changed files with 19 additions and 10 deletions

View File

@@ -649,7 +649,7 @@ const updateErrorState = (index: number, hasError: boolean) => {
const emit = defineEmits<{
(e: 'quitClicked'): void;
(e: 'submitClicked'): void;
(e: 'submitClicked', callback: (resolve: (value: boolean) => void) => void): void;
}>();
const handleCancel=() => {
@@ -693,18 +693,27 @@ const checkForErrors = (data: ChannelsTest.CoefficientVO[]): boolean => {
};
const handleSubmit = async () => {
// 创建一个 Promise 来等待父组件的回调
const response = await new Promise<boolean>((resolve) => {
emit('submitClicked', resolve);
});
if (!response) {
return;
}
isButtonDisabled.value = true; // 禁用按钮
tableLoading('big','系数下装')
await getCoefficientCheck({
userPageId: "cdf",
devIds:devIdArray.value,
devIds:devIdArray.value,
planId:planId.value,
errorSysId: select_Plan.value?.errorSysId,
     scriptId: select_Plan.value?.scriptId,
operateType:'0' // '0'为预检测、1为正式检测
})
active.value++;
emit('submitClicked'); // 触发事件
// 初始化 loadingStates 为 true
// loadingStates.value = new Array(name.value.length).fill(true);