fix: polling doesnot resumed after router.push
This commit is contained in:
@@ -51,12 +51,9 @@ watch(show, (newValue) => {
|
|||||||
|
|
||||||
const searchPattern = ref('');
|
const searchPattern = ref('');
|
||||||
const searchFilter: (pattern: string, node: TreeOption) => boolean = (pattern, node) => {
|
const searchFilter: (pattern: string, node: TreeOption) => boolean = (pattern, node) => {
|
||||||
if (node.children) {
|
|
||||||
return node.children.some((child) => searchFilter(pattern, child));
|
|
||||||
}
|
|
||||||
const device = node['device'] as NdmDeviceVO;
|
const device = node['device'] as NdmDeviceVO;
|
||||||
const { name, ipAddress } = device;
|
const { name, ipAddress } = device;
|
||||||
return name?.includes(pattern) || ipAddress?.includes(pattern);
|
return (name ?? '').includes(pattern) || (ipAddress ?? '').includes(pattern);
|
||||||
};
|
};
|
||||||
|
|
||||||
const offlineDeviceCount = computed(() => {
|
const offlineDeviceCount = computed(() => {
|
||||||
@@ -89,6 +86,8 @@ const nodeProps = ({ option }: { option: TreeOption }) => {
|
|||||||
return {
|
return {
|
||||||
ondblclick: () => {
|
ondblclick: () => {
|
||||||
if (option.isLeaf) {
|
if (option.isLeaf) {
|
||||||
|
const queryControlStore = useQueryControlStore();
|
||||||
|
queryControlStore.enablePolling();
|
||||||
const device = option['device'] as NdmDeviceVO;
|
const device = option['device'] as NdmDeviceVO;
|
||||||
router.push({
|
router.push({
|
||||||
path: '/device',
|
path: '/device',
|
||||||
|
|||||||
Reference in New Issue
Block a user