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

main
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>
<div id="app" style="position: relative">
<div id="app" style="position: relative" :class="{ mask: isLock }">
<router-view />
<div v-show="show" v-if="$route.matched.length > 0" v-adaptive @click="openI18n" style="
position: fixed;
@ -97,6 +97,7 @@ import feedBack from '@/views/trials/trials-layout/components/feedBack'
import timeTag from '@/components/timeTag'
import Vue from 'vue'
import i18n from './lang'
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
export default {
name: 'App',
components: {
@ -112,12 +113,17 @@ export default {
arr: [],
il8nExternal: false,
State: null,
config: window.config
config: window.config,
isLock: false
}
},
mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
Vue.prototype.$openI18n = this.openI18n
// this.getIsLock()
// DicomEvent.$on("isLock", (isLock) => {
// this.isLock = isLock
// })
},
// watch: {
// '$route.query': {
@ -149,6 +155,13 @@ export default {
// },
// },
methods: {
getIsLock() {
if (zzSessionStorage.getItem('isLock') === 'true') {
this.isLock = true
} else {
this.isLock = false
}
},
//
handleSortByColumn(column) {
const { prop, order } = column
@ -307,6 +320,23 @@ export default {
</script>
<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;
.el-tooltip__popper {

View File

@ -1,5 +1,6 @@
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 { createVersionPolling } from "@/utils/version-polling.esm.js";
import ElementUI, { MessageBox } from 'element-ui'
@ -451,6 +452,7 @@ async function VueInit() {
isOpen = false
isLock = null
zzSessionStorage.removeItem('isLock')
// DicomEvent.$emit('isLock', false)
router.push("/login")
}).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!', {
@ -462,160 +464,166 @@ 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.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) {
count = 0;
localStorage.setItem('count', '0')
if (_vm.$route.path === '/login') {
zzSessionStorage.removeItem('lastWorkbench')
zzSessionStorage.removeItem('isLock')
isLock = null
}
return
}
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'))
}
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)) {
count = 0;
localStorage.setItem('count', '0')
if (_vm.$route.path === '/login') {
zzSessionStorage.removeItem('lastWorkbench')
zzSessionStorage.removeItem('isLock')
// DicomEvent.$emit('isLock', false)
isLock = null
}
},
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;"
return
}
if (isOpen) {
return
}
isOpen = true
zzSessionStorage.setItem('isLock', 'true')
// DicomEvent.$emit('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
}
}, [
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
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')
DicomEvent.$emit('isLock', false)
localStorage.setItem('count', '0')
document.querySelector('#my_username').value = null
document.querySelector('#my_password').value = null
setTimeout(() => {
done()
}, 500)
}
}),
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"
}
// 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'))
}
}
},
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()
// createVersionPolling({

View File

@ -189,7 +189,7 @@
</el-form-item>
<el-form-item :label="$t('trials:sitesList:table:Country')" prop="Country">
<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-form-item>
<!-- 状态 -->