From d428ab01d768f5638df4a540e89227bf03675653 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Mon, 20 Oct 2025 16:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E5=90=8C=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/lang/zh-CN/menu.js | 1 + src/router/routes/index.js | 4 +- src/router/routes/severObjYunying.js | 107 +++++++++++++++++++++++++++ src/store/modules/app.js | 11 ++- src/views/login/platForm.vue | 5 +- 5 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 src/router/routes/severObjYunying.js diff --git a/src/locales/lang/zh-CN/menu.js b/src/locales/lang/zh-CN/menu.js index 96be65a..3a14886 100644 --- a/src/locales/lang/zh-CN/menu.js +++ b/src/locales/lang/zh-CN/menu.js @@ -35,6 +35,7 @@ export default { dict: '字典管理', 'dict-detail': '字典数据', serverObj: '服务对象管理', + serverObjYunying: '服务对象管理', serverList: '服务对象列表', workorderMenu: '工单管理', mineWorderOrder: '我下的工单', diff --git a/src/router/routes/index.js b/src/router/routes/index.js index d50fa47..b45696c 100644 --- a/src/router/routes/index.js +++ b/src/router/routes/index.js @@ -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 ] diff --git a/src/router/routes/severObjYunying.js b/src/router/routes/severObjYunying.js new file mode 100644 index 0000000..d950c6e --- /dev/null +++ b/src/router/routes/severObjYunying.js @@ -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: '*', + }, + } + + ], + }, +] diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 26f743a..c89fb39 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -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() diff --git a/src/views/login/platForm.vue b/src/views/login/platForm.vue index c6238d6..715c560 100644 --- a/src/views/login/platForm.vue +++ b/src/views/login/platForm.vue @@ -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() }