Browse Source

fix: 提交

master
yinsiyu 3 weeks ago
parent
commit
c6b7c64a21
5 changed files with 14 additions and 3 deletions
  1. +3
    -0
      .env.development
  2. +3
    -0
      .env.production
  3. +2
    -1
      package.json
  4. +1
    -1
      src/router/admin.js
  5. +5
    -1
      src/store/modules/permission.js

+ 3
- 0
.env.development View File

@@ -10,3 +10,6 @@ VUE_APP_BASE_PATH = '/sf-admin/'
VUE_APP_SURVEY_PREFIX = /dw
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

# 神火医院定制化
VUE_APP_SHEN_HUO_CLIENTID = "2015112716143758";

+ 3
- 0
.env.production View File

@@ -9,3 +9,6 @@ VUE_APP_BASE_PATH = /sf-admin/
VUE_APP_ADMIN_LOGIN_URL = /hisca/#/sub-login
VUE_APP_ADMIN_HOME_URL = /hisca/
VUE_APP_SURVEY_PREFIX = /dw

# 神火医院定制化
VUE_APP_SHEN_HUO_CLIENTID = "2024060415545011";

+ 2
- 1
package.json View File

@@ -5,7 +5,8 @@
"author": "",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"dev": "vue-cli-service serve --mode development",
"build:dev": "vue-cli-service build --mode development",
"build": "vue-cli-service build --mode production",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",


+ 1
- 1
src/router/admin.js View File

@@ -117,7 +117,7 @@ export const dynamicRoutes = [
path: "therapeuticRegimen",
hidden: false,
component: () => import("@/views/dictManage/therapeuticRegimen/list"),
// permissions: ["820004"],
clientId: [process.env.VUE_APP_SHEN_HUO_CLIENTID], // 只有神火有该权限
meta: {
title: "治疗方案维护",
noCache: false,


+ 5
- 1
src/store/modules/permission.js View File

@@ -1,5 +1,6 @@
import auth from "@/plugins/auth";
import router, { constantRoutes, dynamicRoutes } from "@/router";
import { getClientId } from "@/utils/auth";
const permission = {
state: {
routes: [],
@@ -45,7 +46,10 @@ export function filterDynamicRoutes(routes) {
...route,
children: route.children ? filterDynamicRoutes(route.children) : [],
};
if (auth.hasPermiOr(temp.permissions)) {
if (
(auth.hasPermiOr(temp.permissions) && !temp.clientId) ||
temp.clientId?.includes(getClientId())
) {
res.push(temp);
}
});


Loading…
Cancel
Save