修改测试bug,优化页面
This commit is contained in:
@@ -300,7 +300,6 @@ const chooseNode = (value: string, data: any, node: any) => {
|
||||
}
|
||||
|
||||
const changeDevice = (val: any) => {
|
||||
console.log('changeDevice', val)
|
||||
let arr1: any = []
|
||||
|
||||
//zlDeviceData
|
||||
@@ -331,22 +330,30 @@ const changeDevice = (val: any) => {
|
||||
arr2.map((item: any) => {
|
||||
item.checked = false
|
||||
})
|
||||
treeRef1.value && treeRef1.value.setCurrentKey(arr1[0]?.id)
|
||||
|
||||
emit('changeDeviceType', activeName.value, arr1[0])
|
||||
setTimeout(() => {
|
||||
treeRef1.value?.setCurrentKey(arr1[0]?.id)
|
||||
}, 100)
|
||||
}
|
||||
if (val == '1') {
|
||||
arr1.map((item: any) => {
|
||||
item.checked = false
|
||||
})
|
||||
treeRef2.value && treeRef2.value.setCurrentKey(arr2[0]?.id)
|
||||
emit('changeDeviceType', activeName.value, arr2[0])
|
||||
setTimeout(() => {
|
||||
treeRef2.value?.setCurrentKey(arr2[0]?.id)
|
||||
}, 100)
|
||||
}
|
||||
if (val == '2') {
|
||||
arr3.map((item: any) => {
|
||||
item.checked = false
|
||||
})
|
||||
treeRef3.value && treeRef3.value.setCurrentKey(arr3[0]?.id)
|
||||
|
||||
emit('changeDeviceType', activeName.value, arr3[0])
|
||||
setTimeout(() => {
|
||||
treeRef3.value?.setCurrentKey(arr3[0]?.id)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
//治理
|
||||
|
||||
Reference in New Issue
Block a user