generated from Leo_Ding/web-template
修改不同平台跳转逻辑
This commit is contained in:
parent
dfb266eef3
commit
d428ab01d7
@ -35,6 +35,7 @@ export default {
|
|||||||
dict: '字典管理',
|
dict: '字典管理',
|
||||||
'dict-detail': '字典数据',
|
'dict-detail': '字典数据',
|
||||||
serverObj: '服务对象管理',
|
serverObj: '服务对象管理',
|
||||||
|
serverObjYunying: '服务对象管理',
|
||||||
serverList: '服务对象列表',
|
serverList: '服务对象列表',
|
||||||
workorderMenu: '工单管理',
|
workorderMenu: '工单管理',
|
||||||
mineWorderOrder: '我下的工单',
|
mineWorderOrder: '我下的工单',
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import workorder from './workorder'
|
|||||||
import service from './service'
|
import service from './service'
|
||||||
import serviceStaff from './serviceStaff'
|
import serviceStaff from './serviceStaff'
|
||||||
import serverSet from './serverSet'
|
import serverSet from './serverSet'
|
||||||
|
import severObjYunying from './severObjYunying'
|
||||||
export default [
|
export default [
|
||||||
...home,
|
...home,
|
||||||
// ...form,
|
// ...form,
|
||||||
@ -34,5 +35,6 @@ export default [
|
|||||||
...workorder,
|
...workorder,
|
||||||
...service,
|
...service,
|
||||||
...serviceStaff,
|
...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 storage from '@/utils/storage'
|
||||||
import useRouterStore from './router'
|
import useRouterStore from './router'
|
||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
layout: 'leftRight', // 页面布局【topBottom=上下布局,leftRight=左右布局】
|
layout: 'leftRight', // 页面布局【topBottom=上下布局,leftRight=左右布局】
|
||||||
menuMode: 'side', // 菜单模式【side=侧边菜单,top=顶部菜单,mix=混合菜单】
|
menuMode: 'side', // 菜单模式【side=侧边菜单,top=顶部菜单,mix=混合菜单】
|
||||||
@ -37,10 +37,15 @@ const useAppStore = defineStore('app', {
|
|||||||
* 初始化
|
* 初始化
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
init(params) {
|
init() {
|
||||||
|
const platform=storage.local.getItem('platform')
|
||||||
|
if(!platform){
|
||||||
|
const router = useRouter()
|
||||||
|
return router.replace({path:'/platForm'})
|
||||||
|
}
|
||||||
const routerStore = useRouterStore()
|
const routerStore = useRouterStore()
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
Promise.all([routerStore.getRouterList(params)])
|
Promise.all([routerStore.getRouterList({platform:platform})])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.complete = true
|
this.complete = true
|
||||||
resolve()
|
resolve()
|
||||||
|
|||||||
@ -111,7 +111,7 @@ async function handleSelect(type) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
storage.local.setItem('platform', type)
|
storage.local.setItem('platform', type)
|
||||||
await appStore.init({ platform: type })
|
await appStore.init()
|
||||||
goIndex()
|
goIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,8 +144,7 @@ function getFirstValidRoute() {
|
|||||||
async function handleChange(e) {
|
async function handleChange(e) {
|
||||||
storage.local.setItem('platform', 'yunying')
|
storage.local.setItem('platform', 'yunying')
|
||||||
storage.local.setItem('stationId', e)
|
storage.local.setItem('stationId', e)
|
||||||
|
await appStore.init()
|
||||||
await appStore.init({ platform: 'yunying' })
|
|
||||||
goIndex()
|
goIndex()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user