forked from SmartBench/CMVR-IOT-UI
fix(inspection): 修复任务绑定数据初始化问题
- 清空左右列表数据避免残留数据影响 - 添加异步等待确保数据加载完成 - 移除调试日志代码 - 保证任务切换时数据正确重置
This commit is contained in:
parent
4b9d599a3b
commit
40a787e723
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 查询点位列表 */
|
/** 查询点位列表 */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user