feat(detection): 添加检测锁机制防止多用户同时操作
- 新增 detectionLock store 管理检测锁状态 - 实现检测锁相关的弹窗提示功能 - 添加 DETECTION_BUSY 错误码处理多人竞争逻辑 - 在 websocket 中集成检测锁超时处理 - 修改程序源控制接口以同步锁状态 - 更新项目标题和图标配置 - 添加 docs 目录到忽略列表
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import type { controlSource } from '@/api/device/interface/controlSource'
|
||||
import http from '@/api'
|
||||
import { useDetectionLockStore } from '@/stores/modules/detectionLock'
|
||||
|
||||
/**
|
||||
* @name 程控源管理模块
|
||||
@@ -17,8 +18,11 @@ export const startSimulateTest = (params: controlSource.ResControl) => {
|
||||
}
|
||||
|
||||
//停止
|
||||
export const closeSimulateTest = (params: controlSource.ResControl) => {
|
||||
return http.post(`/prepare/closeSimulateTest`,params,{loading:false})
|
||||
export const closeSimulateTest = async (params: controlSource.ResControl) => {
|
||||
const result = await http.post(`/prepare/closeSimulateTest`,params,{loading:false})
|
||||
// 主动终止 → 释放本地持锁标记
|
||||
useDetectionLockStore().clearHolder()
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user