feat: enhance device tree
This commit is contained in:
@@ -73,9 +73,8 @@ const treeData = computed<TreeOption[]>(() => {
|
||||
key: type,
|
||||
children: offlineDeviceList.map<TreeOption>((device) => ({
|
||||
label: `${device.name}`,
|
||||
key: device.deviceId,
|
||||
key: device.id,
|
||||
suffix: () => `${device.ipAddress ?? '未知IP地址'}`,
|
||||
isLeaf: true,
|
||||
device,
|
||||
})),
|
||||
};
|
||||
@@ -85,7 +84,7 @@ const treeData = computed<TreeOption[]>(() => {
|
||||
const nodeProps = ({ option }: { option: TreeOption }) => {
|
||||
return {
|
||||
ondblclick: () => {
|
||||
if (option.isLeaf) {
|
||||
if (option['device']) {
|
||||
const queryControlStore = useQueryControlStore();
|
||||
queryControlStore.enablePolling();
|
||||
const device = option['device'] as NdmDeviceVO;
|
||||
|
||||
Reference in New Issue
Block a user