fix: remove dblclick of device node
This commit is contained in:
@@ -107,31 +107,9 @@ const treeData = computed<TreeOption[]>(() => {
|
||||
});
|
||||
});
|
||||
|
||||
// 双击设备节点,跳转到`实时设备状`态页面
|
||||
const nodeProps = ({ option }: { option: TreeOption }) => {
|
||||
return {
|
||||
ondblclick: () => {
|
||||
if (option['device']) {
|
||||
const queryControlStore = useQueryControlStore();
|
||||
queryControlStore.enablePolling();
|
||||
const device = option['device'] as NdmDeviceVO;
|
||||
router.push({
|
||||
path: '/device',
|
||||
query: {
|
||||
stationCode: station.value.code,
|
||||
deviceType: device.deviceType,
|
||||
deviceDBId: device.id,
|
||||
from: route.path,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const override: TreeOverrideNodeClickBehavior = ({ option }) => {
|
||||
if (!option['device']) {
|
||||
return 'toggleExpand';
|
||||
return 'none';
|
||||
}
|
||||
return 'default';
|
||||
};
|
||||
@@ -150,7 +128,6 @@ const onModalClose = () => {
|
||||
<NInput v-model:value="searchPattern" placeholder="搜索设备名称或IP地址" clearable />
|
||||
<NTree
|
||||
:data="treeData"
|
||||
:node-props="nodeProps"
|
||||
:override-default-node-click-behavior="override"
|
||||
:pattern="searchPattern"
|
||||
:filter="searchFilter"
|
||||
|
||||
Reference in New Issue
Block a user