fix(inspection): 修复任务绑定数据初始化问题

- 清空左右列表数据避免残留数据影响
- 添加异步等待确保数据加载完成
- 移除调试日志代码
- 保证任务切换时数据正确重置
This commit is contained in:
lixiaolong 2026-08-12 15:11:55 +08:00
parent 4b9d599a3b
commit 40a787e723
2 changed files with 8 additions and 6 deletions

View File

@ -332,8 +332,10 @@ const handleBindPoint = async (row) => {
dialogVisible.value = true; dialogVisible.value = true;
taskId.value = row.id; taskId.value = row.id;
pointQueryParams.mapId = row.mapId; pointQueryParams.mapId = row.mapId;
getBindPointByTaskId(row.id) taskLeftList.value = [];
getPointListData() taskRightList.value = [];
await getBindPointByTaskId(row.id)
await getPointListData()
}; };
/** 查询点位列表 */ /** 查询点位列表 */
@ -341,7 +343,6 @@ const getPointListData = async () => {
const res = await getPointList(pointQueryParams) const res = await getPointList(pointQueryParams)
if (res.code === 200) { if (res.code === 200) {
let ids = [] let ids = []
console.log(taskRightList.value)
if (taskRightList.value) { if (taskRightList.value) {
ids = taskRightList.value.map(item => item.id) ids = taskRightList.value.map(item => item.id)
} }

View File

@ -305,9 +305,10 @@ const taskId = ref(null);
const handleBindCase = async (row) => { const handleBindCase = async (row) => {
dialogVisible.value = true; dialogVisible.value = true;
taskId.value = row.id; taskId.value = row.id;
taskLeftList.value = [];
getbindCaseByTaskId(row.id) taskRightList.value = [];
getTestCaseListData() await getbindCaseByTaskId(row.id)
await getTestCaseListData()
}; };
/** 查询点位列表 */ /** 查询点位列表 */