1
continuous-integration/drone/push Build is passing Details

has
wangxiaoshuang 2026-05-15 17:01:08 +08:00
parent d34b4b796c
commit 730a375509
3 changed files with 187 additions and 149 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="app" style="position: relative"> <div id="app" style="position: relative" :class="{ mask: isLock }">
<router-view /> <router-view />
<div v-show="show" v-if="$route.matched.length > 0" v-adaptive @click="openI18n" style=" <div v-show="show" v-if="$route.matched.length > 0" v-adaptive @click="openI18n" style="
position: fixed; position: fixed;
@ -97,6 +97,7 @@ import feedBack from '@/views/trials/trials-layout/components/feedBack'
import timeTag from '@/components/timeTag' import timeTag from '@/components/timeTag'
import Vue from 'vue' import Vue from 'vue'
import i18n from './lang' import i18n from './lang'
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
export default { export default {
name: 'App', name: 'App',
components: { components: {
@ -112,12 +113,17 @@ export default {
arr: [], arr: [],
il8nExternal: false, il8nExternal: false,
State: null, State: null,
config: window.config config: window.config,
isLock: false
} }
}, },
mounted() { mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist' this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
Vue.prototype.$openI18n = this.openI18n Vue.prototype.$openI18n = this.openI18n
// this.getIsLock()
// DicomEvent.$on("isLock", (isLock) => {
// this.isLock = isLock
// })
}, },
// watch: { // watch: {
// '$route.query': { // '$route.query': {
@ -149,6 +155,13 @@ export default {
// }, // },
// }, // },
methods: { methods: {
getIsLock() {
if (zzSessionStorage.getItem('isLock') === 'true') {
this.isLock = true
} else {
this.isLock = false
}
},
// //
handleSortByColumn(column) { handleSortByColumn(column) {
const { prop, order } = column const { prop, order } = column
@ -307,6 +320,23 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.mask {
position: relative;
filter: blur(2px);
user-select: none;
}
.mask::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
display: block;
background: rgba(255, 253, 253, 0.2);
}
$light_gray: #606266; $light_gray: #606266;
.el-tooltip__popper { .el-tooltip__popper {

View File

@ -1,5 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
// import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets import 'normalize.css/normalize.css' // A modern alternative to CSS resets
// import { createVersionPolling } from "@/utils/version-polling.esm.js"; // import { createVersionPolling } from "@/utils/version-polling.esm.js";
import ElementUI, { MessageBox } from 'element-ui' import ElementUI, { MessageBox } from 'element-ui'
@ -451,6 +452,7 @@ async function VueInit() {
isOpen = false isOpen = false
isLock = null isLock = null
zzSessionStorage.removeItem('isLock') zzSessionStorage.removeItem('isLock')
// DicomEvent.$emit('isLock', false)
router.push("/login") router.push("/login")
}).then(() => { }).then(() => {
// _vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', { // _vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
@ -462,160 +464,166 @@ async function VueInit() {
}) })
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME, } : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => { eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' ? () => {
if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
count = 0; if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) {
localStorage.setItem('count', '0') count = 0;
if (_vm.$route.path === '/login') { localStorage.setItem('count', '0')
zzSessionStorage.removeItem('lastWorkbench') if (_vm.$route.path === '/login') {
zzSessionStorage.removeItem('isLock') zzSessionStorage.removeItem('lastWorkbench')
isLock = null zzSessionStorage.removeItem('isLock')
} // DicomEvent.$emit('isLock', false)
return isLock = null
}
if (isOpen) {
return
}
isOpen = true
zzSessionStorage.setItem('isLock', 'true')
_vm.$msgbox({
title: _vm.$t("env:lock:msgBox:title"),
confirmButtonText: _vm.$t("env:lock:msgBox:confirmButtonText"),
showClose: false,
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (!_vm.unlock.my_username) {
_vm.$message.warning(_vm.$t("env:lock:msgBox:iupUser"))
return
}
if (!_vm.unlock.my_password) {
_vm.$message.warning(_vm.$t("env:lock:msgBox:inpPassword"))
return
}
var my_username = zzSessionStorage.getItem('my_username')
var my_password = zzSessionStorage.getItem('my_password')
let my_userid = zzSessionStorage.getItem('userId')
let my_EMail = zzSessionStorage.getItem('my_EMail') || ''
if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === _vm.unlock.my_username.toUpperCase())) {
resetReadingRestTime().then(() => {
})
const closeLock = (_vm) => {
_vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
_vm.unlock = {
my_username: null,
my_password: null,
view: false
}
isOpen = false
count = 0;
isLock = null
zzSessionStorage.removeItem('isLock')
localStorage.setItem('count', '0')
document.querySelector('#my_username').value = null
document.querySelector('#my_password').value = null
setTimeout(() => {
done()
}, 500)
}
// if (eval(process.env.VUE_APP_LOCK_FOR_PERMISSION_MFA)) {
// sendMFAEmail({ UserId: my_userid, MfaType: 1 }).then((res) => {
// done();
// Vue.prototype.$MFA({
// status: "lock",
// UserId: my_userid,
// EMail: res.Result,
// username: my_username,
// callBack: () => {
// closeLock(_vm)
// },
// })
// })
// } else {
closeLock(_vm)
// }
} else {
// console.log(111)
_vm.$message.error(_vm.$t('env:lock:msgBox:userFail'))
}
} }
}, return
message: h('div', {}, [ }
h('el-form', { if (isOpen) {
props: { labelWidth: "80px" } return
}, [ }
h('el-form-item', { isOpen = true
props: { label: _vm.$t("env:lock:msgBox:form:username") }, zzSessionStorage.setItem('isLock', 'true')
}, [ // DicomEvent.$emit('isLock', true)
h('input', { _vm.$msgbox({
props: { title: _vm.$t("env:lock:msgBox:title"),
value: _vm.unlock.my_username confirmButtonText: _vm.$t("env:lock:msgBox:confirmButtonText"),
}, showClose: false,
attrs: { beforeClose: (action, instance, done) => {
id: 'my_username', if (action === 'confirm') {
class: 'el-input__inner', if (!_vm.unlock.my_username) {
autocomplete: 'new-password' _vm.$message.warning(_vm.$t("env:lock:msgBox:iupUser"))
}, return
on: {
change: (event) => {
_vm.unlock.my_username = event.target.value
},
input: (event) => {
_vm.unlock.my_username = event.target.value
}
}
})
]),
h('el-form-item', {
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
attrs: {
style: "position: relative;"
} }
}, [ if (!_vm.unlock.my_password) {
h('input', { _vm.$message.warning(_vm.$t("env:lock:msgBox:inpPassword"))
props: { return
value: _vm.unlock.my_password }
}, var my_username = zzSessionStorage.getItem('my_username')
ref: "unlock_my_password_input", var my_password = zzSessionStorage.getItem('my_password')
attrs: { let my_userid = zzSessionStorage.getItem('userId')
id: 'my_password', let my_EMail = zzSessionStorage.getItem('my_EMail') || ''
class: 'el-input__inner', if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === _vm.unlock.my_username.toUpperCase())) {
type: _vm.unlock.view ? 'text' : 'password', resetReadingRestTime().then(() => {
autocomplete: 'new-password', })
style: "padding-right:25px" const closeLock = (_vm) => {
}, _vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
on: { _vm.unlock = {
change: (event) => { my_username: null,
_vm.unlock.my_password = event.target.value my_password: null,
}, view: false
input: (event) => {
_vm.unlock.my_password = event.target.value
} }
isOpen = false
count = 0;
isLock = null
// zzSessionStorage.removeItem('isLock')
DicomEvent.$emit('isLock', false)
localStorage.setItem('count', '0')
document.querySelector('#my_username').value = null
document.querySelector('#my_password').value = null
setTimeout(() => {
done()
}, 500)
} }
}), // if (eval(process.env.VUE_APP_LOCK_FOR_PERMISSION_MFA)) {
h('i', { // sendMFAEmail({ UserId: my_userid, MfaType: 1 }).then((res) => {
attrs: { // done();
id: 'my_password_view', // Vue.prototype.$MFA({
class: "el-icon-view", // status: "lock",
style: "cursor: pointer;position: absolute;top:35%;right:10px" // UserId: my_userid,
}, // EMail: res.Result,
on: { // username: my_username,
click: (event) => { // callBack: () => {
_vm.unlock.view = !_vm.unlock.view // closeLock(_vm)
if (_vm.unlock.view) { // },
_vm.$refs['unlock_my_password_input'].type = "text" // })
} else { // })
_vm.$refs['unlock_my_password_input'].type = "password" // } else {
} closeLock(_vm)
// }
} else {
// console.log(111)
_vm.$message.error(_vm.$t('env:lock:msgBox:userFail'))
}
}
},
message: h('div', {}, [
h('el-form', {
props: { labelWidth: "80px" }
}, [
h('el-form-item', {
props: { label: _vm.$t("env:lock:msgBox:form:username") },
}, [
h('input', {
props: {
value: _vm.unlock.my_username
}, },
attrs: {
id: 'my_username',
class: 'el-input__inner',
autocomplete: 'new-password'
},
on: {
change: (event) => {
_vm.unlock.my_username = event.target.value
},
input: (event) => {
_vm.unlock.my_username = event.target.value
}
}
})
]),
h('el-form-item', {
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
attrs: {
style: "position: relative;"
} }
}), }, [
h('input', {
props: {
value: _vm.unlock.my_password
},
ref: "unlock_my_password_input",
attrs: {
id: 'my_password',
class: 'el-input__inner',
type: _vm.unlock.view ? 'text' : 'password',
autocomplete: 'new-password',
style: "padding-right:25px"
},
on: {
change: (event) => {
_vm.unlock.my_password = event.target.value
},
input: (event) => {
_vm.unlock.my_password = event.target.value
}
}
}),
h('i', {
attrs: {
id: 'my_password_view',
class: "el-icon-view",
style: "cursor: pointer;position: absolute;top:35%;right:10px"
},
on: {
click: (event) => {
_vm.unlock.view = !_vm.unlock.view
if (_vm.unlock.view) {
_vm.$refs['unlock_my_password_input'].type = "text"
} else {
_vm.$refs['unlock_my_password_input'].type = "password"
}
},
}
}),
])
]) ])
]) ])
]) })
}) } : () => { },
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME) process.env.VUE_APP_LOCK_FOR_TIME
)
} }
VueInit() VueInit()
// createVersionPolling({ // createVersionPolling({

View File

@ -189,7 +189,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:sitesList:table:Country')" prop="Country"> <el-form-item :label="$t('trials:sitesList:table:Country')" prop="Country">
<el-select v-model="form.Country" style="width: 100%"> <el-select v-model="form.Country" style="width: 100%">
<el-option v-for="item of $d.SiteCountry" :key="item.id" :label="item.label" :value="item.value" /> <el-option v-for="item of $d.SiteCountry" :key="item.id" :label="item.label" :value="item.label" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 状态 --> <!-- 状态 -->