generated from Leo_Ding/web-template
修改不同平台跳转逻辑
This commit is contained in:
parent
dfb266eef3
commit
d428ab01d7
@ -35,6 +35,7 @@ export default {
|
||||
dict: '字典管理',
|
||||
'dict-detail': '字典数据',
|
||||
serverObj: '服务对象管理',
|
||||
serverObjYunying: '服务对象管理',
|
||||
serverList: '服务对象列表',
|
||||
workorderMenu: '工单管理',
|
||||
mineWorderOrder: '我下的工单',
|
||||
|
||||
@ -16,6 +16,7 @@ import workorder from './workorder'
|
||||
import service from './service'
|
||||
import serviceStaff from './serviceStaff'
|
||||
import serverSet from './serverSet'
|
||||
import severObjYunying from './severObjYunying'
|
||||
export default [
|
||||
...home,
|
||||
// ...form,
|
||||
@ -34,5 +35,6 @@ export default [
|
||||
...workorder,
|
||||
...service,
|
||||
...serviceStaff,
|
||||
...serverSet
|
||||
...serverSet,
|
||||
...severObjYunying
|
||||
]
|
||||
|
||||
107
src/router/routes/severObjYunying.js
Normal file
107
src/router/routes/severObjYunying.js
Normal file
@ -0,0 +1,107 @@
|
||||
import { DollarOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'serverObjYunying',
|
||||
name: 'serverObjYunying',
|
||||
component: 'RouteViewLayout',
|
||||
meta: {
|
||||
icon: DollarOutlined,
|
||||
title: '服务对象管理',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'serverList',
|
||||
name: 'serverList',
|
||||
component: 'serverObjYunying/serverList/index.vue',
|
||||
meta: {
|
||||
title: '服务对象列表',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'allocation',
|
||||
name: 'allocation',
|
||||
component: 'serverObjYunying/allocation/index.vue',
|
||||
meta: {
|
||||
title: '服务对象分配',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'domicile',
|
||||
name: 'domicile',
|
||||
component: 'serverObjYunying/domicile/index.vue',
|
||||
meta: {
|
||||
title: '户籍对象列表',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'institution',
|
||||
name: 'institution',
|
||||
component: 'serverObjYunying/institution/index.vue',
|
||||
meta: {
|
||||
title: '机构服务对象列表',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'toBeInstitution',
|
||||
name: 'toBeInstitution',
|
||||
component: 'serverObjYunying/toBeInstitution/index.vue',
|
||||
meta: {
|
||||
title: '待完善对象列表',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'carePhone',
|
||||
name: 'carePhone',
|
||||
component: 'serverObjYunying/carePhone/index.vue',
|
||||
meta: {
|
||||
title: '电话关爱对象',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'serverSearch',
|
||||
name: 'serverSearch',
|
||||
component: 'serverObjYunying/serverSearch/index.vue',
|
||||
meta: {
|
||||
title: '服务对象查询',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'existence',
|
||||
name: 'existence',
|
||||
component: 'serverObjYunying/existence/index.vue',
|
||||
meta: {
|
||||
title: '生存状态管理',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
},
|
||||
}
|
||||
|
||||
],
|
||||
},
|
||||
]
|
||||
@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
|
||||
import storage from '@/utils/storage'
|
||||
import useRouterStore from './router'
|
||||
import { config } from '@/config'
|
||||
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
const defaultConfig = {
|
||||
layout: 'leftRight', // 页面布局【topBottom=上下布局,leftRight=左右布局】
|
||||
menuMode: 'side', // 菜单模式【side=侧边菜单,top=顶部菜单,mix=混合菜单】
|
||||
@ -37,10 +37,15 @@ const useAppStore = defineStore('app', {
|
||||
* 初始化
|
||||
* @returns {Promise}
|
||||
*/
|
||||
init(params) {
|
||||
init() {
|
||||
const platform=storage.local.getItem('platform')
|
||||
if(!platform){
|
||||
const router = useRouter()
|
||||
return router.replace({path:'/platForm'})
|
||||
}
|
||||
const routerStore = useRouterStore()
|
||||
return new Promise((resolve) => {
|
||||
Promise.all([routerStore.getRouterList(params)])
|
||||
Promise.all([routerStore.getRouterList({platform:platform})])
|
||||
.then(() => {
|
||||
this.complete = true
|
||||
resolve()
|
||||
|
||||
@ -111,7 +111,7 @@ async function handleSelect(type) {
|
||||
}
|
||||
} else {
|
||||
storage.local.setItem('platform', type)
|
||||
await appStore.init({ platform: type })
|
||||
await appStore.init()
|
||||
goIndex()
|
||||
}
|
||||
|
||||
@ -144,8 +144,7 @@ function getFirstValidRoute() {
|
||||
async function handleChange(e) {
|
||||
storage.local.setItem('platform', 'yunying')
|
||||
storage.local.setItem('stationId', e)
|
||||
|
||||
await appStore.init({ platform: 'yunying' })
|
||||
await appStore.init()
|
||||
goIndex()
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user