update: 路由跳转改为menuStory方式
This commit is contained in:
parent
9fd6044e56
commit
50af3f1ad8
|
@ -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<Record<string, any>>({});
|
||||
const params = ref<Record<string, any>>({});
|
||||
|
@ -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,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<script setup lang="ts">
|
||||
import homeApi from '@/api/media/home';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
||||
const channelCount = ref(0);
|
||||
const deviceCount = ref(0);
|
||||
|
@ -44,9 +47,10 @@ const getData = () => {
|
|||
});
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
const jumpPage = () => {
|
||||
router.push('/media/dashboard');
|
||||
menuStory.jumpPage('media/DashBoard', {
|
||||
id: ':id',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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<Record<string, any>>({});
|
||||
const params = ref<Record<string, any>>({});
|
||||
|
||||
|
@ -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,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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<Record<string, any>>({});
|
||||
const params = ref<Record<string, any>>({});
|
||||
|
||||
|
@ -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,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue