Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/hir-web into main
commit
96cff33b25
86
src/main.js
86
src/main.js
|
@ -74,8 +74,8 @@ Vue.use(adaptive)
|
||||||
import dialogDrag from '@/directive/dialogDrag'
|
import dialogDrag from '@/directive/dialogDrag'
|
||||||
// 窗口拖拽
|
// 窗口拖拽
|
||||||
Vue.use(dialogDrag)
|
Vue.use(dialogDrag)
|
||||||
if(!String.prototype.replaceAll){
|
if (!String.prototype.replaceAll) {
|
||||||
String.prototype.replaceAll = function(str, newStr){
|
String.prototype.replaceAll = function (str, newStr) {
|
||||||
// 正则表达式
|
// 正则表达式
|
||||||
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
|
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
|
||||||
return this.replace(str, newStr)
|
return this.replace(str, newStr)
|
||||||
|
@ -111,7 +111,7 @@ Vue.prototype.$getObjectName = (url) => {
|
||||||
console.log(url)
|
console.log(url)
|
||||||
var value = url
|
var value = url
|
||||||
var str = value.split("//"); //https://进行分割,
|
var str = value.split("//"); //https://进行分割,
|
||||||
var index = str[1].indexOf("/")+1; //indexOf 获取第一个斜杠的索引,
|
var index = str[1].indexOf("/") + 1; //indexOf 获取第一个斜杠的索引,
|
||||||
console.log(str[1].substring(index)); //substring 截取,
|
console.log(str[1].substring(index)); //substring 截取,
|
||||||
return '/' + str[1].substring(index)
|
return '/' + str[1].substring(index)
|
||||||
}
|
}
|
||||||
|
@ -128,18 +128,18 @@ Vue.prototype.getGuid = (text) => {
|
||||||
t8 = text.substr(14, 2)
|
t8 = text.substr(14, 2)
|
||||||
t9 = text.substr(16, 4)
|
t9 = text.substr(16, 4)
|
||||||
t10 = text.substr(20, 12)
|
t10 = text.substr(20, 12)
|
||||||
console.log(`${t4+t3+t2+t1}-${t6+t5}-${t8+t7}-${t9}-${t10}`)
|
console.log(`${t4 + t3 + t2 + t1}-${t6 + t5}-${t8 + t7}-${t9}-${t10}`)
|
||||||
return `${t4+t3+t2+t1}-${t6+t5}-${t8+t7}-${t9}-${t10}`
|
return `${t4 + t3 + t2 + t1}-${t6 + t5}-${t8 + t7}-${t9}-${t10}`
|
||||||
}
|
}
|
||||||
///50350000-3e2c-0016-eb4c-08db926b69d6/Image/84410000-3e10-0016-d156-08da242403fe/50350000-3e2c-0016-414e-08db926d9135/50350000-3e2c-0016-fd9d-08db926d9137/1.2.156.110002.21.2019.1.9.84822154.1/1.3.12.2.1107.5.1.4.73793.30000019010509500386600308609/1.3.12.2.1107.5.1.4.73793.30000019010509500386600308616/7fba7d7e-b3b3-d989-fa54-82e41f87a6ed
|
///50350000-3e2c-0016-eb4c-08db926b69d6/Image/84410000-3e10-0016-d156-08da242403fe/50350000-3e2c-0016-414e-08db926d9135/50350000-3e2c-0016-fd9d-08db926d9137/1.2.156.110002.21.2019.1.9.84822154.1/1.3.12.2.1107.5.1.4.73793.30000019010509500386600308609/1.3.12.2.1107.5.1.4.73793.30000019010509500386600308616/7fba7d7e-b3b3-d989-fa54-82e41f87a6ed
|
||||||
Vue.prototype.getGuid('1.2.156.110002.21.2019.1.9.84822154.11.3.12.2.1107.5.1.4.73793.300000190105095003866003086091.3.12.2.1107.5.1.4.73793.3000001901050950038660030861650350000-3e2c-0016-eb4c-08db926b69d6')
|
Vue.prototype.getGuid('1.2.156.110002.21.2019.1.9.84822154.11.3.12.2.1107.5.1.4.73793.300000190105095003866003086091.3.12.2.1107.5.1.4.73793.3000001901050950038660030861650350000-3e2c-0016-eb4c-08db926b69d6')
|
||||||
//7fba7d7e-b3b3-d989-fa54-82e41f87a6ed
|
//7fba7d7e-b3b3-d989-fa54-82e41f87a6ed
|
||||||
Vue.prototype.$validatePassword = (rule, value, callback) => {
|
Vue.prototype.$validatePassword = (rule, value, callback) => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
|
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
|
||||||
if (!reg1.test(value)) {
|
if (!reg1.test(value)) {
|
||||||
callback(lang==='zh' ? new Error("密码必须包含:1)8 – 32 个字符;2)至少1个数字;3) 至少1个大写字母;4)至少1个小写字母;5)至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
|
callback(lang === 'zh' ? new Error("密码必须包含:1)8 – 32 个字符;2)至少1个数字;3) 至少1个大写字母;4)至少1个小写字母;5)至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ Vue.prototype.fileToBlob = (file) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _vm
|
var _vm
|
||||||
async function VueInit () {
|
async function VueInit() {
|
||||||
var params
|
var params
|
||||||
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions')) {
|
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions')) {
|
||||||
params = $q('TrialReadingCriterionId')
|
params = $q('TrialReadingCriterionId')
|
||||||
|
@ -192,14 +192,14 @@ async function VueInit () {
|
||||||
i18n.mergeLocaleMessage('en', enMessages)
|
i18n.mergeLocaleMessage('en', enMessages)
|
||||||
let d = function (code) {
|
let d = function (code) {
|
||||||
var dictInfo = res.Result
|
var dictInfo = res.Result
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||||
try {
|
try {
|
||||||
for (var code in dictInfo) {
|
for (var code in dictInfo) {
|
||||||
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
|
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
|
||||||
return {
|
return {
|
||||||
id: dict.Id,
|
id: dict.Id,
|
||||||
label: lang==='zh' ? dict.ValueCN : dict.Value,
|
label: lang === 'zh' ? dict.ValueCN : dict.Value,
|
||||||
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code): dict.Code,
|
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code) : dict.Code,
|
||||||
raw: Object.assign({}, dict),
|
raw: Object.assign({}, dict),
|
||||||
IsBaseLineUse: false,
|
IsBaseLineUse: false,
|
||||||
IsFollowVisitUse: false
|
IsFollowVisitUse: false
|
||||||
|
@ -207,7 +207,7 @@ async function VueInit () {
|
||||||
}) : []
|
}) : []
|
||||||
dictInfo[code] = dictList
|
dictInfo[code] = dictList
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
return dictInfo
|
return dictInfo
|
||||||
|
@ -226,17 +226,17 @@ async function VueInit () {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vue.prototype.$updateDictionary = function() {
|
Vue.prototype.$updateDictionary = function () {
|
||||||
Vue.prototype.$d = function (code) {
|
Vue.prototype.$d = function (code) {
|
||||||
var dictInfo = res.Result
|
var dictInfo = res.Result
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||||
try {
|
try {
|
||||||
for (var code in dictInfo) {
|
for (var code in dictInfo) {
|
||||||
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
|
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
|
||||||
return {
|
return {
|
||||||
id: dict.raw.Id,
|
id: dict.raw.Id,
|
||||||
label: lang==='zh' ? dict.raw.ValueCN : dict.raw.Value,
|
label: lang === 'zh' ? dict.raw.ValueCN : dict.raw.Value,
|
||||||
value: dict.raw.DataTypeEnum === 3 ? eval(dict.raw.Code) : dict.raw.IsEnumInt ? parseInt(dict.raw.Code): dict.raw.Code,
|
value: dict.raw.DataTypeEnum === 3 ? eval(dict.raw.Code) : dict.raw.IsEnumInt ? parseInt(dict.raw.Code) : dict.raw.Code,
|
||||||
raw: Object.assign({}, dict.raw),
|
raw: Object.assign({}, dict.raw),
|
||||||
IsBaseLineUse: false,
|
IsBaseLineUse: false,
|
||||||
IsFollowVisitUse: false
|
IsFollowVisitUse: false
|
||||||
|
@ -244,7 +244,7 @@ async function VueInit () {
|
||||||
}) : []
|
}) : []
|
||||||
_vm.$set(dictInfo, code, dictList)
|
_vm.$set(dictInfo, code, dictList)
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
return dictInfo
|
return dictInfo
|
||||||
|
@ -280,14 +280,14 @@ async function VueInit () {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
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 === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _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') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
window.location.href = `/login`
|
window.location.href = `/login`
|
||||||
zzSessionStorage.removeItem('lastWorkbench')
|
zzSessionStorage.removeItem('lastWorkbench')
|
||||||
_vm.$alert(lang === 'en'? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
|
_vm.$alert(lang === 'en' ? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -301,10 +301,10 @@ async function VueInit () {
|
||||||
function countTime() {
|
function countTime() {
|
||||||
count++
|
count++
|
||||||
localStorage.setItem('count', count)
|
localStorage.setItem('count', count)
|
||||||
if (count == parseInt(second2) || isLock === 'true') {
|
if (count == parseInt(second2) || isLock === 'true') {
|
||||||
callback2();
|
callback2();
|
||||||
}
|
}
|
||||||
if (count >= second) {
|
if (count >= second) {
|
||||||
callback();
|
callback();
|
||||||
count = 0;
|
count = 0;
|
||||||
localStorage.removeItem('count')
|
localStorage.removeItem('count')
|
||||||
|
@ -340,22 +340,22 @@ async function VueInit () {
|
||||||
const h = _vm.$createElement
|
const h = _vm.$createElement
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
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 (_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') {
|
||||||
count = 0;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_vm.$store.dispatch('user/logout').then(res => {
|
_vm.$store.dispatch('user/logout').then(res => {
|
||||||
window.location.href = `/login`
|
window.location.href = `/login`
|
||||||
})
|
})
|
||||||
|
|
||||||
_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!', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
} : () => {}, 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'
|
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 (_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') {
|
||||||
count = 0;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
|
@ -408,14 +408,14 @@ async function VueInit () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
message: h('div', {} , [
|
message: h('div', {}, [
|
||||||
h('el-form', {
|
h('el-form', {
|
||||||
props: { labelWidth: "80px" }
|
props: { labelWidth: "80px" }
|
||||||
}, [
|
}, [
|
||||||
h('el-form-item', {
|
h('el-form-item', {
|
||||||
props: {label: lang === 'zh' ? '用户名' : 'User ID'},
|
props: { label: lang === 'zh' ? '用户名' : 'User ID' },
|
||||||
}, [
|
}, [
|
||||||
h('input',{
|
h('input', {
|
||||||
props: {
|
props: {
|
||||||
value: _vm.unlock.my_username
|
value: _vm.unlock.my_username
|
||||||
},
|
},
|
||||||
|
@ -435,7 +435,7 @@ async function VueInit () {
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
h('el-form-item', {
|
h('el-form-item', {
|
||||||
props: {label: lang === 'zh' ? '密码' : 'Password'},
|
props: { label: lang === 'zh' ? '密码' : 'Password' },
|
||||||
}, [
|
}, [
|
||||||
h('input', {
|
h('input', {
|
||||||
props: {
|
props: {
|
||||||
|
@ -460,7 +460,7 @@ async function VueInit () {
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
} : () => {}, process.env.VUE_APP_LOCK_FOR_TIME)
|
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
|
||||||
}
|
}
|
||||||
VueInit()
|
VueInit()
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
const whiteList = ['/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 = ['/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']
|
||||||
|
|
||||||
router.beforeEach(async(to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
// document.title = getPageTitle(to.meta.title)
|
// document.title = getPageTitle(to.meta.title)
|
||||||
|
@ -56,7 +56,10 @@ router.beforeEach(async(to, from, next) => {
|
||||||
/* has no token*/
|
/* has no token*/
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录whiteList中,直接进入
|
// 在免登录whiteList中,直接进入
|
||||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading'){
|
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||||
|
OSSclient()
|
||||||
|
}
|
||||||
|
if (to.path === '/login') {
|
||||||
OSSclient()
|
OSSclient()
|
||||||
}
|
}
|
||||||
next()
|
next()
|
||||||
|
@ -68,7 +71,7 @@ router.beforeEach(async(to, from, next) => {
|
||||||
next(`/ReviewersResearch?`)
|
next(`/ReviewersResearch?`)
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
// 其他无权访问的页面将重定向到登录页面。
|
// 其他无权访问的页面将重定向到登录页面。
|
||||||
next(`/login?`)
|
next(`/login?`)
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,15 @@
|
||||||
<div class="login-body">
|
<div class="login-body">
|
||||||
<div class="login-l">
|
<div class="login-l">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="" />
|
<img
|
||||||
|
v-if="language === 'zh'"
|
||||||
|
:src="
|
||||||
|
hospital.HospitalLogoPath
|
||||||
|
? OSSclientConfig.basePath + hospital.HospitalLogoPath
|
||||||
|
: logoImg
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="login-image">
|
<div class="login-image">
|
||||||
|
@ -16,7 +24,9 @@
|
||||||
<div class="login-r">
|
<div class="login-r">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<!-- IRC Management System -->
|
<!-- IRC Management System -->
|
||||||
<div class="title">{{ $t("login:title:system") }}</div>
|
<div class="title">
|
||||||
|
{{ $t("login:title:system") }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
|
@ -135,11 +145,14 @@ import TopLang from "./topLang";
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from "vue-puzzle-vcode";
|
import Vcode from "vue-puzzle-vcode";
|
||||||
import Img1 from "@/assets/pic-1.png";
|
import Img1 from "@/assets/pic-1.png";
|
||||||
|
import logoImg from "@/assets/zzlogo2.png";
|
||||||
|
import { getHospital } from "@/api/hospital.js";
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
components: { TopLang, Vcode },
|
components: { TopLang, Vcode },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
logoImg,
|
||||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: "",
|
||||||
|
@ -174,11 +187,18 @@ export default {
|
||||||
location: null,
|
location: null,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
Img1,
|
Img1,
|
||||||
|
hospital: {
|
||||||
|
HospitalLogoPath: null,
|
||||||
|
HospitalName: null,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
...mapGetters(["asyncRoutes", "routes", "language"]),
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getInfo();
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType;
|
||||||
this.location = this.$route.query.location;
|
this.location = this.$route.query.location;
|
||||||
|
@ -202,6 +222,19 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||||
|
// 获取医院信息
|
||||||
|
async getInfo() {
|
||||||
|
try {
|
||||||
|
let res = await getHospital();
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
Object.keys(this.hospital).forEach((key) => {
|
||||||
|
this.hospital[key] = res.Result[key];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === "password") {
|
if (this.passwordType === "password") {
|
||||||
this.passwordType = "";
|
this.passwordType = "";
|
||||||
|
|
|
@ -1,70 +1,91 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<div class="hospital">
|
||||||
ref="hospitalForm"
|
<el-form
|
||||||
size="small"
|
ref="hospitalForm"
|
||||||
:model="hospital"
|
size="small"
|
||||||
:rules="hospitalFormRules"
|
:model="hospital"
|
||||||
label-width="150px"
|
:rules="hospitalFormRules"
|
||||||
style="width: 800px"
|
label-width="150px"
|
||||||
>
|
style="width: 800px"
|
||||||
<el-card class="Basic" shadow="never" size="small">
|
>
|
||||||
<el-form-item label="医院名称: " prop="HospitalName">
|
<el-card class="Basic" shadow="never" size="small">
|
||||||
<el-input v-model="hospital.HospitalName" :disabled="disabled" />
|
<el-form-item label="医院名称: " prop="HospitalName">
|
||||||
</el-form-item>
|
<el-input v-model="hospital.HospitalName" :disabled="disabled" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医院编码: " prop="HospitalCode">
|
||||||
|
<el-input v-model="hospital.HospitalCode" :disabled="disabled" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="医院别称: " prop="HospitalAliasName">
|
<el-form-item label="医院别称: " prop="HospitalAliasName">
|
||||||
<el-input v-model="hospital.HospitalAliasName" :disabled="disabled" />
|
<el-input v-model="hospital.HospitalAliasName" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="国家: " prop="Country">
|
<el-form-item label="国家: " prop="Country">
|
||||||
<el-input v-model="hospital.Country" :disabled="disabled" />
|
<el-input v-model="hospital.Country" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="省份: " prop="Province">
|
<el-form-item label="省份: " prop="Province">
|
||||||
<el-input v-model="hospital.Province" :disabled="disabled" />
|
<el-input v-model="hospital.Province" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="城市: " prop="City">
|
<el-form-item label="城市: " prop="City">
|
||||||
<el-input v-model="hospital.City" :disabled="disabled" />
|
<el-input v-model="hospital.City" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="地址: " prop="Address">
|
<el-form-item label="地址: " prop="Address">
|
||||||
<el-input v-model="hospital.Address" :disabled="disabled" />
|
<el-input v-model="hospital.Address" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系方式: " prop="Phone">
|
<el-form-item label="联系方式: " prop="Phone">
|
||||||
<el-input v-model="hospital.Phone" :disabled="disabled" />
|
<el-input v-model="hospital.Phone" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否可以连接互联网: ">
|
<el-form-item label="未激活项目数: " prop="TrialKeepCount">
|
||||||
<el-switch
|
<el-input
|
||||||
v-model="hospital.IsCanConnectInternet"
|
v-model="hospital.TrialKeepCount"
|
||||||
active-color="#13ce66"
|
:disabled="disabled"
|
||||||
inactive-color="#ff4949"
|
type="number"
|
||||||
active-text="是"
|
/>
|
||||||
inactive-text="否"
|
</el-form-item>
|
||||||
:disabled="disabled"
|
<el-form-item label="是否可以连接互联网: ">
|
||||||
|
<el-switch
|
||||||
|
v-model="hospital.IsCanConnectInternet"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
:disabled="disabled"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="logo: " prop="HospitalLogoPath">
|
||||||
|
<upload-logo
|
||||||
|
:path.sync="hospital.HospitalLogoPath"
|
||||||
|
:disabled="disabled"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-card>
|
||||||
|
<el-form-item v-hasPermi="['system:hospital:edit']">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
style="margin: 10px 15px"
|
||||||
|
:loading="btnLoading"
|
||||||
|
:disabled="btnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>保存</el-button
|
||||||
>
|
>
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-card>
|
</el-form>
|
||||||
<el-form-item v-hasPermi="['system:hospital:edit']">
|
</div>
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
style="margin: 10px 15px"
|
|
||||||
:loading="btnLoading"
|
|
||||||
:disabled="btnLoading"
|
|
||||||
@click="handleSave"
|
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { setHospital, getHospital } from "@/api/hospital.js";
|
import { setHospital, getHospital } from "@/api/hospital.js";
|
||||||
|
import uploadLogo from "./uploadLogo.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "systemHospital",
|
name: "systemHospital",
|
||||||
|
components: { "upload-logo": uploadLogo },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
hospital: {
|
hospital: {
|
||||||
HospitalName: null,
|
HospitalName: null,
|
||||||
HospitalAliasName: null,
|
HospitalAliasName: null,
|
||||||
|
HospitalCode: null,
|
||||||
Country: null,
|
Country: null,
|
||||||
City: null,
|
City: null,
|
||||||
Province: null,
|
Province: null,
|
||||||
|
@ -72,25 +93,36 @@ export default {
|
||||||
Phone: null,
|
Phone: null,
|
||||||
IsCanConnectInternet: true,
|
IsCanConnectInternet: true,
|
||||||
Id: null,
|
Id: null,
|
||||||
|
TrialKeepCount: null,
|
||||||
|
HospitalLogoPath: null,
|
||||||
},
|
},
|
||||||
hospitalFormRules: {
|
hospitalFormRules: {
|
||||||
HospitalName: [
|
HospitalName: [
|
||||||
{ required: true, message: "请输入医院名称", trigger: "blur" },
|
{ required: true, message: "请输入医院名称", trigger: "blur" },
|
||||||
],
|
],
|
||||||
HospitalAliasName: [
|
HospitalCode: [
|
||||||
{ required: true, message: "请输入医院别称", trigger: "blur" },
|
{ required: true, message: "请输入医院编码", trigger: "blur" },
|
||||||
],
|
],
|
||||||
Country: [{ required: true, message: "请输入国家", trigger: "blur" }],
|
HospitalLogoPath: [
|
||||||
City: [{ required: true, message: "请输入所在城市", trigger: "blur" }],
|
{ required: true, message: "请上传医院logo", trigger: "blur" },
|
||||||
Province: [
|
|
||||||
{ required: true, message: "请输入所在省份", trigger: "blur" },
|
|
||||||
],
|
],
|
||||||
Address: [
|
TrialKeepCount: [
|
||||||
{ required: true, message: "请输入医院地址", trigger: "blur" },
|
{ required: true, message: "请输入未激活项目数", trigger: "blur" },
|
||||||
],
|
|
||||||
Phone: [
|
|
||||||
{ required: true, message: "请输入医院联系方式", trigger: "blur" },
|
|
||||||
],
|
],
|
||||||
|
// HospitalAliasName: [
|
||||||
|
// { required: true, message: "请输入医院别称", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
// Country: [{ required: true, message: "请输入国家", trigger: "blur" }],
|
||||||
|
// City: [{ required: true, message: "请输入所在城市", trigger: "blur" }],
|
||||||
|
// Province: [
|
||||||
|
// { required: true, message: "请输入所在省份", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
// Address: [
|
||||||
|
// { required: true, message: "请输入医院地址", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
// Phone: [
|
||||||
|
// { required: true, message: "请输入医院联系方式", trigger: "blur" },
|
||||||
|
// ],
|
||||||
},
|
},
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
};
|
};
|
||||||
|
@ -139,5 +171,10 @@ export default {
|
||||||
::v-deep .is-error.my_new_pwd {
|
::v-deep .is-error.my_new_pwd {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
.hospital {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
<template>
|
||||||
|
<div class="upload-container">
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
action
|
||||||
|
:http-request="uploadFile"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:file-list="fileList"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:on-remove="remove"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
accept=".png,.jpg,.jpeg"
|
||||||
|
v-if="!disabled"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary" :disabled="btnDisabled"
|
||||||
|
>上传</el-button
|
||||||
|
>
|
||||||
|
<span slot="tip" class="el-upload__tip">(只能上传png/jpg/jpeg文件)</span>
|
||||||
|
</el-upload>
|
||||||
|
<p
|
||||||
|
v-if="fileList.length > 0 && disabled"
|
||||||
|
class="logoAMessage"
|
||||||
|
@click.stop="handlePreview(fileList[0])"
|
||||||
|
style="margin: 0"
|
||||||
|
>
|
||||||
|
<i class="el-icon-document"></i>
|
||||||
|
<span>{{ fileList.length > 0 ? fileList[0].name : "" }}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
const type = "Statement of Work";
|
||||||
|
export default {
|
||||||
|
name: "UploadLogo",
|
||||||
|
props: {
|
||||||
|
path: {
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileList: [],
|
||||||
|
btnDisabled: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
path: {
|
||||||
|
handler() {
|
||||||
|
if (this.path) {
|
||||||
|
let name = this.path.split("/");
|
||||||
|
this.fileList = [
|
||||||
|
{
|
||||||
|
name: name[name.length - 1],
|
||||||
|
path: this.path,
|
||||||
|
fullPath: this.OSSclientConfig.basePath + this.path,
|
||||||
|
url: this.path,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
remove(file, fileList) {
|
||||||
|
this.$emit("update:path", null);
|
||||||
|
},
|
||||||
|
fileToBlob(file) {
|
||||||
|
// 创建 FileReader 对象
|
||||||
|
const reader = new FileReader();
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
// FileReader 添加 load 事件
|
||||||
|
reader.addEventListener("load", (e) => {
|
||||||
|
let blob;
|
||||||
|
if (typeof e.target.result === "object") {
|
||||||
|
blob = new Blob([e.target.result]);
|
||||||
|
} else {
|
||||||
|
blob = e.target.result;
|
||||||
|
}
|
||||||
|
resolve(blob);
|
||||||
|
});
|
||||||
|
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||||
|
reader.readAsArrayBuffer(file);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 上传oss
|
||||||
|
async uploadToOSS(name, file) {
|
||||||
|
try {
|
||||||
|
let res = await this.OSSclient.put(
|
||||||
|
`/System/GeneralDocuments/${name}`,
|
||||||
|
file
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initFileList(fileList) {
|
||||||
|
this.fileList = fileList;
|
||||||
|
},
|
||||||
|
async uploadFile(param) {
|
||||||
|
var fileName = param.file.name;
|
||||||
|
this.btnDisabled = true;
|
||||||
|
let file = await this.fileToBlob(param.file);
|
||||||
|
let res = await this.uploadToOSS(fileName, file);
|
||||||
|
this.btnDisabled = false;
|
||||||
|
if (!res) return;
|
||||||
|
this.fileList = [
|
||||||
|
{
|
||||||
|
name: fileName,
|
||||||
|
path: res.name,
|
||||||
|
fullPath: this.OSSclientConfig.basePath + res.name,
|
||||||
|
url: res.name,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
console.log(this.fileList);
|
||||||
|
this.$emit("update:path", res.name);
|
||||||
|
return console.log(res);
|
||||||
|
},
|
||||||
|
beforeUpload(file, fileList) {
|
||||||
|
const isValidFile = this.fileValid(file.name, ["png", "jpg", "jpeg"]);
|
||||||
|
if (isValidFile) {
|
||||||
|
this.fileList = [];
|
||||||
|
} else {
|
||||||
|
this.$alert("请上传PNG/JPG/JPEG文件");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePreview(file) {
|
||||||
|
file.fullPath ? window.open(file.fullPath, "_blank") : "";
|
||||||
|
},
|
||||||
|
handleExceed(files, fileList) {
|
||||||
|
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||||
|
},
|
||||||
|
fileValid(fileName, typeArr) {
|
||||||
|
var extendName = fileName
|
||||||
|
.substring(fileName.lastIndexOf(".") + 1)
|
||||||
|
.toLocaleLowerCase();
|
||||||
|
if (typeArr.indexOf(extendName) > -1) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.upload-container .el-upload--text {
|
||||||
|
border: none;
|
||||||
|
width: 80px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
.upload-container .el-form-item__label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.upload-container .el-upload-list__item {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.logoAMessage {
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -39,7 +39,7 @@
|
||||||
>
|
>
|
||||||
<el-input v-model="user.FirstName" />
|
<el-input v-model="user.FirstName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
:label="$t('system:userlist:table:Gender')"
|
:label="$t('system:userlist:table:Gender')"
|
||||||
prop="Sex"
|
prop="Sex"
|
||||||
style="margin-right: 40px"
|
style="margin-right: 40px"
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<el-radio :label="1">Male</el-radio>
|
<el-radio :label="1">Male</el-radio>
|
||||||
<el-radio :label="0">Female</el-radio>
|
<el-radio :label="0">Female</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
|
<el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
|
||||||
<el-input v-model="user.EMail" />
|
<el-input v-model="user.EMail" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
:label="$t('trials:researchForm:form:checkCode')"
|
:label="$t('trials:researchForm:form:checkCode')"
|
||||||
prop="checkCode"
|
prop="checkCode"
|
||||||
v-if="!IsCanConnectInternet"
|
v-if="!IsCanConnectInternet"
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
<span style="color: red"
|
<span style="color: red"
|
||||||
>请输入,校验码用于用户首次登录、重置密码时的校验</span
|
>请输入,校验码用于用户首次登录、重置密码时的校验</span
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card
|
<el-card
|
||||||
|
|
|
@ -122,6 +122,8 @@ export default {
|
||||||
submitMessage: {
|
submitMessage: {
|
||||||
SubjectId: null,
|
SubjectId: null,
|
||||||
TrialId: null,
|
TrialId: null,
|
||||||
|
TrialCode: null,
|
||||||
|
ResearchProgramNo: null,
|
||||||
},
|
},
|
||||||
subjectIdList: [], // 受试者列表
|
subjectIdList: [], // 受试者列表
|
||||||
rules: {
|
rules: {
|
||||||
|
|
|
@ -251,6 +251,11 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleDetail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/trials/trials-panel?trialId=${this.submitMessage.TrialId}&trialCode=${this.submitMessage.TrialCode}&researchProgramNo=${this.submitMessage.ResearchProgramNo}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 移除检查与访视绑定关系
|
// 移除检查与访视绑定关系
|
||||||
async remove(item) {
|
async remove(item) {
|
||||||
try {
|
try {
|
||||||
|
@ -377,6 +382,11 @@ export default {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1;
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="trials-navbar" style="position: relative">
|
<div class="trials-navbar" style="position: relative">
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="" />
|
<img
|
||||||
|
v-if="language === 'zh'"
|
||||||
|
:src="
|
||||||
|
hospital.HospitalLogoPath
|
||||||
|
? OSSclientConfig.basePath + hospital.HospitalLogoPath
|
||||||
|
: logoImg
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
||||||
<span style="white-space:nowrap;">
|
<span style="white-space: nowrap">
|
||||||
<!-- 中心影像系统(EICS) -->
|
<!-- 中心影像系统(EICS) -->
|
||||||
{{ $t("trials:trials:title:eics") }}
|
{{ $t("trials:trials:title:eics") }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -85,14 +93,21 @@ import { loginOut } from "@/api/user";
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
import { mapGetters, mapMutations } from "vuex";
|
||||||
import TopLang from "./topLang";
|
import TopLang from "./topLang";
|
||||||
import NoticeMarquee from "./noticeMarquee";
|
import NoticeMarquee from "./noticeMarquee";
|
||||||
|
import { getHospital } from "@/api/hospital.js";
|
||||||
|
import logoImg from "@/assets/zzlogo2.png";
|
||||||
export default {
|
export default {
|
||||||
components: { TopLang, NoticeMarquee },
|
components: { TopLang, NoticeMarquee },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
logoImg,
|
||||||
activeIndex: "2",
|
activeIndex: "2",
|
||||||
isReviewer: false,
|
isReviewer: false,
|
||||||
userTypeShortName: zzSessionStorage.getItem("userTypeShortName"),
|
userTypeShortName: zzSessionStorage.getItem("userTypeShortName"),
|
||||||
notice: "",
|
notice: "",
|
||||||
|
hospital: {
|
||||||
|
HospitalLogoPath: null,
|
||||||
|
HospitalName: null,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -113,9 +128,23 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.isReviewer = JSON.parse(zzSessionStorage.getItem("IsReviewer"));
|
this.isReviewer = JSON.parse(zzSessionStorage.getItem("IsReviewer"));
|
||||||
this.changeRoute(this.$route);
|
this.changeRoute(this.$route);
|
||||||
|
this.getInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||||
|
// 获取医院信息
|
||||||
|
async getInfo() {
|
||||||
|
try {
|
||||||
|
let res = await getHospital();
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
Object.keys(this.hospital).forEach((key) => {
|
||||||
|
this.hospital[key] = res.Result[key];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
changeRoute(v) {
|
changeRoute(v) {
|
||||||
if (v.path === "/trials/trials-inspection") {
|
if (v.path === "/trials/trials-inspection") {
|
||||||
this.activeIndex = "1";
|
this.activeIndex = "1";
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
||||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
|
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
|
||||||
</div>
|
</div>
|
||||||
<SignForm ref="signForm" :trial-id="trialId" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
<SignForm ref="signForm" :trial-id="trialId" :sign-code-enum="signCode" @close="closeSignDialog" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -151,14 +151,14 @@ export default {
|
||||||
this.signVisible = false
|
this.signVisible = false
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.$emit('closeDialog')
|
this.$emit('close')
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
this.$refs['signForm'].btnLoading = false
|
this.$refs['signForm'].btnLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('closeDialog')
|
this.$emit('close')
|
||||||
},
|
},
|
||||||
closeSignDialog(isSign, signInfo) {
|
closeSignDialog(isSign, signInfo) {
|
||||||
if (isSign) {
|
if (isSign) {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
:title="$t('trials:trials-list:action:activateProject')"
|
:title="$t('trials:trials-list:action:activateProject')"
|
||||||
width="500px"
|
width="500px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:before-close="handleCancel"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="activateProjectForm"
|
ref="activateProjectForm"
|
||||||
|
@ -20,9 +21,9 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 授权码 -->
|
<!-- 授权码 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:authorizationCode')">
|
<el-form-item :label="$t('trials:trials-list:form:authorizationCode')">
|
||||||
<p v-if="form.Authorization" class="AuthorizationBox">
|
<p v-if="data.Authorization" class="AuthorizationBox">
|
||||||
<span class="Authorization" :title="form.Authorization">{{
|
<span class="Authorization" :title="data.Authorization">{{
|
||||||
form.Authorization
|
data.Authorization
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="copy" @click.stop="copy">{{
|
<span class="copy" @click.stop="copy">{{
|
||||||
$t("trials:trials-list:action:copy")
|
$t("trials:trials-list:action:copy")
|
||||||
|
@ -69,11 +70,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { activateTrial, getTrialActivationCode } from "@/api/trials.js";
|
||||||
getTrialAuthorizationCode,
|
|
||||||
activateTrial,
|
|
||||||
getTrialActivationCode,
|
|
||||||
} from "@/api/trials.js";
|
|
||||||
export default {
|
export default {
|
||||||
name: "activateProject",
|
name: "activateProject",
|
||||||
props: {
|
props: {
|
||||||
|
@ -139,7 +136,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 复制
|
// 复制
|
||||||
copy() {
|
copy() {
|
||||||
this.$copyText(this.form.Authorization)
|
this.$copyText(this.data.Authorization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// 复制成功
|
// 复制成功
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
|
@ -151,25 +148,11 @@ export default {
|
||||||
this.$alert(this.$t("trials:researchRecord:message:copyFailed"));
|
this.$alert(this.$t("trials:researchRecord:message:copyFailed"));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取授权码
|
|
||||||
async getTrialAuthorizationCode() {
|
|
||||||
let params = {
|
|
||||||
TrialId: this.data.TrialId,
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
let res = await getTrialAuthorizationCode(params);
|
|
||||||
if (res.IsSuccess) {
|
|
||||||
this.form.Authorization = res.Result;
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取激活码
|
// 获取激活码
|
||||||
async getCode() {
|
async getCode() {
|
||||||
let params = {
|
let params = {
|
||||||
TrialId: this.data.TrialId,
|
TrialId: this.data.TrialId,
|
||||||
AuthorizationCode: this.form.Authorization,
|
AuthorizationCode: this.data.Authorization,
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
let res = await getTrialActivationCode(params);
|
let res = await getTrialActivationCode(params);
|
||||||
|
|
|
@ -113,17 +113,17 @@
|
||||||
v-if="
|
v-if="
|
||||||
scope.row.AuthorizationEncrypt &&
|
scope.row.AuthorizationEncrypt &&
|
||||||
scope.row.AuthorizationDate &&
|
scope.row.AuthorizationDate &&
|
||||||
trialExpired(moment(scope.row.AuthorizationDate, 15))
|
!trialExpired(scope.row.AuthorizationDate, 15)
|
||||||
"
|
"
|
||||||
class="el-icon-warning-outline"
|
class="el-icon-warning-outline"
|
||||||
:title="$t('trials:trials-list:tipMessage:tipTwo')"
|
:title="$t('trials:trials-list:tipMessage:tipTwo')"
|
||||||
style="color: #0f0; font-size: 20px"
|
style="color: #e6a23c; font-size: 20px"
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
v-if="
|
v-if="
|
||||||
scope.row.AuthorizationEncrypt &&
|
scope.row.AuthorizationEncrypt &&
|
||||||
scope.row.AuthorizationDate &&
|
scope.row.AuthorizationDate &&
|
||||||
trialExpired(moment(scope.row.AuthorizationDate))
|
!trialExpired(scope.row.AuthorizationDate)
|
||||||
"
|
"
|
||||||
class="el-icon-warning-outline"
|
class="el-icon-warning-outline"
|
||||||
:title="$t('trials:trials-list:tipMessage:tipThree')"
|
:title="$t('trials:trials-list:tipMessage:tipThree')"
|
||||||
|
@ -231,13 +231,6 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="" min-width="150" align="left" fixed="right">
|
<el-table-column label="" min-width="150" align="left" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 激活 -->
|
|
||||||
<el-button
|
|
||||||
circle
|
|
||||||
icon="el-icon-key"
|
|
||||||
:title="$t('trials:trials-list:action:activate')"
|
|
||||||
@click="handleActivate(scope.row)"
|
|
||||||
/>
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['trials:trials-list:panel']"
|
v-hasPermi="['trials:trials-list:panel']"
|
||||||
|
@ -277,6 +270,13 @@
|
||||||
:title="$t('trials:trials-list:action:abolition')"
|
:title="$t('trials:trials-list:action:abolition')"
|
||||||
@click="handleAbandon(scope.row)"
|
@click="handleAbandon(scope.row)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 激活 -->
|
||||||
|
<el-button
|
||||||
|
circle
|
||||||
|
icon="el-icon-key"
|
||||||
|
:title="$t('trials:trials-list:action:activate')"
|
||||||
|
@click="handleActivate(scope.row)"
|
||||||
|
/>
|
||||||
<!-- 代办详情 -->
|
<!-- 代办详情 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-hasPermi="['trials:trials-list:abolish']"
|
v-hasPermi="['trials:trials-list:abolish']"
|
||||||
|
@ -357,7 +357,11 @@
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { abandonTrial, getTrialListHir } from "@/api/trials";
|
import {
|
||||||
|
abandonTrial,
|
||||||
|
getTrialListHir,
|
||||||
|
getTrialAuthorizationCode,
|
||||||
|
} from "@/api/trials";
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import Excel from "exceljs";
|
import Excel from "exceljs";
|
||||||
import BaseContainer from "@/components/BaseContainer";
|
import BaseContainer from "@/components/BaseContainer";
|
||||||
|
@ -473,10 +477,30 @@ export default {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
// 获取授权码
|
||||||
|
async getTrialAuthorizationCode(item) {
|
||||||
|
let params = {
|
||||||
|
TrialId: item.TrialId,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
let res = await getTrialAuthorizationCode(params);
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.currentRow.Authorization = res.Result;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 打开激活弹框
|
// 打开激活弹框
|
||||||
handleActivate(item) {
|
async handleActivate(item) {
|
||||||
this.currentRow = item;
|
this.currentRow = item;
|
||||||
this.activateVisible = true;
|
let res = await this.getTrialAuthorizationCode(item);
|
||||||
|
if (res) {
|
||||||
|
this.activateVisible = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initPage() {
|
initPage() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
@ -277,30 +277,32 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column :label="$t('trials:adReview:title:result')">
|
||||||
prop="item.QuestionId"
|
<el-table-column
|
||||||
:label="item.QuestionName"
|
prop="item.QuestionId"
|
||||||
min-width="140"
|
:label="item.QuestionName"
|
||||||
v-for="(item, index) of QuestionList"
|
min-width="140"
|
||||||
:key="'QuestionId' + index"
|
v-for="(item, index) of QuestionList"
|
||||||
show-overflow-tooltip
|
:key="'QuestionId' + index"
|
||||||
>
|
show-overflow-tooltip
|
||||||
<template slot-scope="scope">
|
>
|
||||||
{{
|
<template slot-scope="scope">
|
||||||
item.DictionaryCode
|
{{
|
||||||
? $fd(
|
item.DictionaryCode
|
||||||
item.DictionaryCode,
|
? $fd(
|
||||||
parseInt(
|
item.DictionaryCode,
|
||||||
scope.row.PIReadingResultList.find(
|
parseInt(
|
||||||
(v) => v.QuestionId === item.QuestionId
|
scope.row.PIReadingResultList.find(
|
||||||
).Answer
|
(v) => v.QuestionId === item.QuestionId
|
||||||
|
).Answer
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
: scope.row.PIReadingResultList.find(
|
||||||
: scope.row.PIReadingResultList.find(
|
(v) => v.QuestionId === item.QuestionId
|
||||||
(v) => v.QuestionId === item.QuestionId
|
).Answer
|
||||||
).Answer
|
}}
|
||||||
}}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否入组 -->
|
<!-- 是否入组 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -277,30 +277,32 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column :label="$t('trials:adReview:title:result')">
|
||||||
prop="item.QuestionId"
|
<el-table-column
|
||||||
:label="item.QuestionName"
|
prop="item.QuestionId"
|
||||||
min-width="140"
|
:label="item.QuestionName"
|
||||||
v-for="(item, index) of QuestionList"
|
min-width="140"
|
||||||
:key="'QuestionId' + index"
|
v-for="(item, index) of QuestionList"
|
||||||
show-overflow-tooltip
|
:key="'QuestionId' + index"
|
||||||
>
|
show-overflow-tooltip
|
||||||
<template slot-scope="scope">
|
>
|
||||||
{{
|
<template slot-scope="scope">
|
||||||
item.DictionaryCode
|
{{
|
||||||
? $fd(
|
item.DictionaryCode
|
||||||
item.DictionaryCode,
|
? $fd(
|
||||||
parseInt(
|
item.DictionaryCode,
|
||||||
scope.row.PIReadingResultList.find(
|
parseInt(
|
||||||
(v) => v.QuestionId === item.QuestionId
|
scope.row.PIReadingResultList.find(
|
||||||
).Answer
|
(v) => v.QuestionId === item.QuestionId
|
||||||
|
).Answer
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
: scope.row.PIReadingResultList.find(
|
||||||
: scope.row.PIReadingResultList.find(
|
(v) => v.QuestionId === item.QuestionId
|
||||||
(v) => v.QuestionId === item.QuestionId
|
).Answer
|
||||||
).Answer
|
}}
|
||||||
}}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否入组 -->
|
<!-- 是否入组 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div slot="main-container">
|
<div slot="main-container">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{ bottomOffset: 60 }"
|
v-adaptive="{ bottomOffset: 80 }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
|
@ -276,30 +276,32 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column :label="$t('trials:adReview:title:result')">
|
||||||
prop="item.QuestionId"
|
<el-table-column
|
||||||
:label="item.QuestionName"
|
prop="item.QuestionId"
|
||||||
min-width="140"
|
:label="item.QuestionName"
|
||||||
v-for="(item, index) of QuestionList"
|
min-width="140"
|
||||||
:key="'QuestionId' + index"
|
v-for="(item, index) of QuestionList"
|
||||||
show-overflow-tooltip
|
:key="'QuestionId' + index"
|
||||||
>
|
show-overflow-tooltip
|
||||||
<template slot-scope="scope">
|
>
|
||||||
{{
|
<template slot-scope="scope">
|
||||||
item.DictionaryCode
|
{{
|
||||||
? $fd(
|
item.DictionaryCode
|
||||||
item.DictionaryCode,
|
? $fd(
|
||||||
parseInt(
|
item.DictionaryCode,
|
||||||
scope.row.PIReadingResultList.find(
|
parseInt(
|
||||||
(v) => v.QuestionId === item.QuestionId
|
scope.row.PIReadingResultList.find(
|
||||||
).Answer
|
(v) => v.QuestionId === item.QuestionId
|
||||||
|
).Answer
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
: scope.row.PIReadingResultList.find(
|
||||||
: scope.row.PIReadingResultList.find(
|
(v) => v.QuestionId === item.QuestionId
|
||||||
(v) => v.QuestionId === item.QuestionId
|
).Answer
|
||||||
).Answer
|
}}
|
||||||
}}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否入组 -->
|
<!-- 是否入组 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -460,7 +462,7 @@ export default {
|
||||||
auditRecordVisible: false,
|
auditRecordVisible: false,
|
||||||
openWindow: null,
|
openWindow: null,
|
||||||
TrialReadingCriterionId: "0",
|
TrialReadingCriterionId: "0",
|
||||||
QuestionList:[]
|
QuestionList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
Loading…
Reference in New Issue