diff --git a/src/views/media/Device/index.vue b/src/views/media/Device/index.vue index 6a71f21a..39ad6b8c 100644 --- a/src/views/media/Device/index.vue +++ b/src/views/media/Device/index.vue @@ -137,7 +137,9 @@ import { getImage } from '@/utils/comm'; import { PROVIDER_OPTIONS } from '@/views/media/Device/const'; import { providerType } from './const'; -const router = useRouter(); +import { useMenuStore } from 'store/menu'; + +const menuStory = useMenuStore(); const listRef = ref>({}); const params = ref>({}); @@ -240,7 +242,9 @@ const handleSearch = (e: any) => { * 新增 */ const handleAdd = () => { - router.push(`/media/device/Save`); + menuStory.jumpPage('media/Device/Save', { + id: ':id', + }); }; const getActions = ( @@ -257,7 +261,9 @@ const getActions = ( }, icon: 'EditOutlined', onClick: () => { - router.push(`/media/device/Save?id=${data.id}`); + menuStory.jumpPage('media/Device/Save', { + id: data.id, + }); }, }, { @@ -268,9 +274,13 @@ const getActions = ( }, icon: 'PartitionOutlined', onClick: () => { - router.push( - `/media/device/Channel?id=${data.id}&type=${data.provider}`, - ); + // router.push( + // `/media/device/Channel?id=${data.id}&type=${data.provider}`, + // ); + menuStory.jumpPage('media/Device/Channel', { + id: data.id, + type: data.provider, + }); }, }, { diff --git a/src/views/media/Home/components/BasicCountCard.vue b/src/views/media/Home/components/BasicCountCard.vue index 203b9a14..2eba7db0 100644 --- a/src/views/media/Home/components/BasicCountCard.vue +++ b/src/views/media/Home/components/BasicCountCard.vue @@ -27,6 +27,9 @@ diff --git a/src/views/notice/Config/index.vue b/src/views/notice/Config/index.vue index 48e9d49b..3615919c 100644 --- a/src/views/notice/Config/index.vue +++ b/src/views/notice/Config/index.vue @@ -180,14 +180,15 @@ import SyncUser from './SyncUser/index.vue'; import Debug from './Debug/index.vue'; import Log from './Log/index.vue'; import { downloadObject } from '@/utils/utils'; +import { useMenuStore } from 'store/menu'; + +const menuStory = useMenuStore(); let providerList: any = []; Object.keys(MSG_TYPE).forEach((key) => { providerList = [...providerList, ...MSG_TYPE[key]]; }); -const router = useRouter(); - const configRef = ref>({}); const params = ref>({}); @@ -270,7 +271,7 @@ const getMethodTxt = (type: string) => { * 新增 */ const handleAdd = () => { - router.push(`/iot/notice/Config/detail/:id`); + menuStory.jumpPage('notice/Config/Detail', { id: ':id' }); }; /** @@ -330,7 +331,9 @@ const getActions = ( onClick: () => { // visible.value = true; // current.value = data; - router.push(`/iot/notice/Config/detail/${data.id}`); + menuStory.jumpPage('notice/Config/Detail', { + id: data.id, + }); }, }, { diff --git a/src/views/notice/Template/index.vue b/src/views/notice/Template/index.vue index 7ffb77cc..4edb02b8 100644 --- a/src/views/notice/Template/index.vue +++ b/src/views/notice/Template/index.vue @@ -167,14 +167,15 @@ import { NOTICE_METHOD, MSG_TYPE } from '@/views/notice/const'; import Debug from './Debug/index.vue'; import Log from './Log/index.vue'; import { downloadObject } from '@/utils/utils'; +import { useMenuStore } from 'store/menu'; + +const menuStory = useMenuStore(); let providerList: any = []; Object.keys(MSG_TYPE).forEach((key) => { providerList = [...providerList, ...MSG_TYPE[key]]; }); -const router = useRouter(); - const configRef = ref>({}); const params = ref>({}); @@ -257,7 +258,9 @@ const getMethodTxt = (type: string) => { * 新增 */ const handleAdd = () => { - router.push(`/iot/notice/Template/detail/:id`); + menuStory.jumpPage('notice/Template/Detail', { + id: ':id', + }); }; /** @@ -324,7 +327,9 @@ const getActions = ( onClick: () => { // visible.value = true; // current.value = data; - router.push(`/iot/notice/Template/detail/${data.id}`); + menuStory.jumpPage('notice/Template/Detail', { + id: data.id, + }); }, }, {