From 72f2e0a459fd0bdfdd1627a0835237ea6ce0dc26 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Fri, 12 Sep 2025 17:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 12 ++-- src/permission.js | 4 +- src/utils/request.js | 3 +- src/utils/whiteList.js | 2 + src/views/system/hospital/components/form.vue | 3 +- .../system/hospital/components/groupList.vue | 32 ++++----- src/views/system/hospital/components/list.vue | 2 +- src/views/system/role/index.vue | 66 ++++++++----------- 8 files changed, 59 insertions(+), 65 deletions(-) create mode 100644 src/utils/whiteList.js diff --git a/src/main.js b/src/main.js index 9ae8c0f..441fd0f 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,7 @@ import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' -import { getBasicDataAllSelect, getFrontInternationalizationList,getCurrentPublishInfo } from '@/api/dictionary/dictionary' +import { getBasicDataAllSelect, getFrontInternationalizationList, getCurrentPublishInfo } from '@/api/dictionary/dictionary' import './assets/css/theme-blue/index.css' // 浅绿色主题 import './assets/css/iconfont/index.css' // 阿里巴巴图标库 import i18n from './lang' @@ -15,7 +15,7 @@ Vue.use(vcrontab); //使用方式: import App from './App' import store from './store' import router from './router' - +import WHITELIST from "./utils/whiteList" import '@/icons' // icon import '@/permission' // permission control import md5 from 'js-md5' @@ -185,7 +185,7 @@ async function VueInit() { zhMessages[v.Code] = v.ValueCN enMessages[v.Code] = v.Value }) - // 获取版本信息 + // 获取版本信息 let PublishInfo = await getCurrentPublishInfo(); Vue.prototype.$version = PublishInfo.Result; i18n.mergeLocaleMessage('zh', zhMessages) @@ -295,7 +295,7 @@ async function VueInit() { if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) { setInterval(() => { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' - if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { + if (WHITELIST.includes(_vm.$route.path)) { return } if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) { @@ -355,7 +355,7 @@ async function VueInit() { /* eslint-disable */ waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' - if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/' || _vm.$route.path === '/login' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { + if (WHITELIST.includes(_vm.$route.path)) { count = 0; localStorage.setItem('count', '0') return @@ -383,7 +383,7 @@ async function VueInit() { } : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME, eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' - if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { + if (WHITELIST.includes(_vm.$route.path)) { count = 0; localStorage.setItem('count', '0') if (_vm.$route.path === '/login') { diff --git a/src/permission.js b/src/permission.js index f6a6190..5bbb961 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,13 +7,13 @@ import 'nprogress/nprogress.css' import { getToken, removeToken } from '@/utils/auth' import Vue from 'vue' import { OSSclient } from './utils/oss' +import WHITELIST from './utils/whiteList' import moment from "moment"; // import getPageTitle from '@/utils/get-page-title' NProgress.configure({ showSpinner: false }) -const whiteList = ['/activate', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] -// 影像页关闭 +const whiteList = WHITELIST Vue.prototype.$openWindow = null Vue.prototype.$setOpenWindow = (openWindow) => { if (Vue.prototype.$openWindow) { diff --git a/src/utils/request.js b/src/utils/request.js index 3469054..6955129 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,6 +2,7 @@ import axios from 'axios' import { Message, MessageBox, Alert } from 'element-ui' import store from '@/store' import router from '@/router' +import WHITELIST from "./whiteList" import Vue from 'vue' const ROUTER = require('@/router'); axios.defaults.withCredentials = false @@ -25,7 +26,7 @@ service.interceptors.request.use( } try { if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) { - if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/' || path === '/login' || path === '/researchForm' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') { + if (!path || WHITELIST.some(item => item === path)) { return config } if (store.state.user.userId !== zzSessionStorage.getItem('userId')) { diff --git a/src/utils/whiteList.js b/src/utils/whiteList.js new file mode 100644 index 0000000..fc95b17 --- /dev/null +++ b/src/utils/whiteList.js @@ -0,0 +1,2 @@ +const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] +export default WHITELIST diff --git a/src/views/system/hospital/components/form.vue b/src/views/system/hospital/components/form.vue index bc23ecb..7a45c2f 100644 --- a/src/views/system/hospital/components/form.vue +++ b/src/views/system/hospital/components/form.vue @@ -39,7 +39,8 @@ + inactive-color="#ff4949" :active-text="$fd('YesOrNo', true)" + :inactive-text="$fd('YesOrNo', false)" :disabled="disabled"> diff --git a/src/views/system/hospital/components/groupList.vue b/src/views/system/hospital/components/groupList.vue index 84b3204..361586d 100644 --- a/src/views/system/hospital/components/groupList.vue +++ b/src/views/system/hospital/components/groupList.vue @@ -126,7 +126,7 @@ {{ $t('common:button:cancel') }} {{ $t('common:button:save') - }} + }} @@ -170,27 +170,27 @@ export default { IdentityUserIdList: [] }, rules: { - Affiliation: [ - { required: true, message: 'Please specify', trigger: 'blur' }, - ], + // Affiliation: [ + // { required: true, message: 'Please specify', trigger: 'blur' }, + // ], Code: [ { required: true, message: 'Please specify', trigger: 'blur' }, ], - ContactName: [ - { required: true, message: 'Please specify', trigger: 'blur' }, - ], - ContactPhone: [ - { required: true, message: 'Please specify', trigger: 'blur' }, - ], + // ContactName: [ + // { required: true, message: 'Please specify', trigger: 'blur' }, + // ], + // ContactPhone: [ + // { required: true, message: 'Please specify', trigger: 'blur' }, + // ], Name: [ { required: true, message: 'Please specify', trigger: 'blur' }, ], - CallingAE: [ - { required: true, message: 'Please specify', trigger: 'blur' }, - ], - IdentityUserIdList: [ - { required: true, type: 'array', message: 'Please select', trigger: 'blur' }, - ], + // CallingAE: [ + // { required: true, message: 'Please specify', trigger: 'blur' }, + // ], + // IdentityUserIdList: [ + // { required: true, type: 'array', message: 'Please select', trigger: 'blur' }, + // ], }, GAUserList: [], status: 'add' diff --git a/src/views/system/hospital/components/list.vue b/src/views/system/hospital/components/list.vue index b0f8e2b..6c4d014 100644 --- a/src/views/system/hospital/components/list.vue +++ b/src/views/system/hospital/components/list.vue @@ -62,7 +62,7 @@ -