Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
39bd20e880
|
|
@ -4483,3 +4483,35 @@ export function getDoctorUserTrialReadingStat(data) {
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 设置项目链接过期时间
|
||||||
|
export function setTrialLinkExpirationTime(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/setTrialLinkExpirationTime`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取项目链接过期时间
|
||||||
|
export function getTrialLinkExpirationTime(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/getTrialLinkExpirationTime`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取项目链接时间是否过期
|
||||||
|
export function getLinkLinkExpirationTime(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/getLinkLinkExpirationTime`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取项目链接code是否有效
|
||||||
|
export function getLinkVerificationCodeIsEffective(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/getLinkVerificationCodeIsEffective`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -56,7 +56,8 @@ export default {
|
||||||
TrialConfig: {},
|
TrialConfig: {},
|
||||||
TrialStatusStr: null,
|
TrialStatusStr: null,
|
||||||
trialId: null,
|
trialId: null,
|
||||||
IsAdditionalAssessment: false
|
IsAdditionalAssessment: false,
|
||||||
|
isReload: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -71,7 +72,11 @@ export default {
|
||||||
if (~url.indexOf('?')) {
|
if (~url.indexOf('?')) {
|
||||||
query = url.split('?')[1]
|
query = url.split('?')[1]
|
||||||
}
|
}
|
||||||
|
if (!this.isReload) {
|
||||||
zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
|
zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
|
||||||
|
} else {
|
||||||
|
this.isReload = false
|
||||||
|
}
|
||||||
var firstGoIn = this.trialsRouter.children.find(v => { return v.name === 'TrialsPanel' }).children[0]
|
var firstGoIn = this.trialsRouter.children.find(v => { return v.name === 'TrialsPanel' }).children[0]
|
||||||
if (this.trialsTab === '/trials/trials-panel') {
|
if (this.trialsTab === '/trials/trials-panel') {
|
||||||
var targetPath = firstGoIn.path
|
var targetPath = firstGoIn.path
|
||||||
|
|
@ -96,6 +101,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$EventBus.$on("reload", () => {
|
||||||
|
this.isReload = true
|
||||||
|
})
|
||||||
var query = ``
|
var query = ``
|
||||||
var url = window.location.href
|
var url = window.location.href
|
||||||
if (~url.indexOf('?')) {
|
if (~url.indexOf('?')) {
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,7 @@
|
||||||
<div class="navbar navbar-flex-wrapper">
|
<div class="navbar navbar-flex-wrapper">
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<div class="navbar-flex-wrapper">
|
<div class="navbar-flex-wrapper">
|
||||||
<hamburger
|
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||||
:is-active="sidebar.opened"
|
|
||||||
class="hamburger-container"
|
|
||||||
@toggleClick="toggleSideBar"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<breadcrumb class="breadcrumb-container" />
|
<breadcrumb class="breadcrumb-container" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -51,12 +47,8 @@
|
||||||
<TopLang></TopLang>
|
<TopLang></TopLang>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<toggleRole
|
<toggleRole v-if="toggleRoleVisible" :visible.sync="toggleRoleVisible" :loading="toggleRoleLoading"
|
||||||
v-if="toggleRoleVisible"
|
@save="loginByRole" />
|
||||||
:visible.sync="toggleRoleVisible"
|
|
||||||
:loading="toggleRoleLoading"
|
|
||||||
@save="loginByRole"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -192,12 +184,14 @@ export default {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// position: relative;
|
// position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||||
|
|
||||||
.hamburger-container {
|
.hamburger-container {
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
@ -219,6 +213,7 @@ export default {
|
||||||
// float: right;
|
// float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 65px;
|
line-height: 65px;
|
||||||
|
|
||||||
// position: relative;
|
// position: relative;
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
@ -245,6 +240,7 @@ export default {
|
||||||
.avatar-container {
|
.avatar-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 200px;
|
margin-right: 200px;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|
@ -252,16 +248,19 @@ export default {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-container {
|
.dropdown-container {
|
||||||
// margin-left: 30px;
|
// margin-left: 30px;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// right: 20px;
|
// right: 20px;
|
||||||
// top: 0px;
|
// top: 0px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.el-icon-caret-bottom {
|
.el-icon-caret-bottom {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
color: #999c9e;
|
color: #999c9e;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="question-login-wrapper">
|
<div class="question-login-wrapper">
|
||||||
<div class="box-wrapper">
|
<div v-if="verify"></div>
|
||||||
|
<div class="box-wrapper" v-else>
|
||||||
<h2 style="text-align:center;">
|
<h2 style="text-align:center;">
|
||||||
<!-- 中心调研表 -->
|
<!-- 中心调研表 -->
|
||||||
{{ $t('trials:researchForm:title:question') }}
|
{{ $t('trials:researchForm:title:question') }}
|
||||||
|
|
@ -91,7 +92,10 @@ import { getUserMenuTree, getUserPermissions } from '@/api/user'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import TopLang from './topLang'
|
import TopLang from './topLang'
|
||||||
import { mapGetters, mapMutations } from 'vuex'
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
|
import {
|
||||||
|
getLinkLinkExpirationTime,
|
||||||
|
getLinkVerificationCodeIsEffective
|
||||||
|
} from '@/api/trials'
|
||||||
export default {
|
export default {
|
||||||
components: { TopLang },
|
components: { TopLang },
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -146,6 +150,7 @@ export default {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
trialId: '',
|
trialId: '',
|
||||||
|
verify: true,
|
||||||
form: {
|
form: {
|
||||||
Sponsor: null, // 申办方
|
Sponsor: null, // 申办方
|
||||||
ResearchProgramNo: null, // 方案号
|
ResearchProgramNo: null, // 方案号
|
||||||
|
|
@ -202,9 +207,49 @@ export default {
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$i18n.locale = this.$route.query.lang
|
let lang = this.$route.query.lang
|
||||||
this.setLanguage(this.$route.query.lang)
|
if (!lang) {
|
||||||
|
const language = navigator.language
|
||||||
|
lang = 'en'
|
||||||
|
if (language.includes("zh")) {
|
||||||
|
lang = 'zh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$i18n.locale = lang
|
||||||
|
this.setLanguage(lang)
|
||||||
this.$updateDictionary()
|
this.$updateDictionary()
|
||||||
|
this.getLinkTimeIsExpired()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
|
async getLinkTimeIsExpired() {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
}
|
||||||
|
let res = await getLinkLinkExpirationTime(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (res.Result.IsExpired) return this.$confirm(this.$t("trials:researchForm:confirm:linkIsExpired"), '', {
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
this.customPrompt()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLinkVerificationCodeIsEffective(value) {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
LinkVerificationCode: value
|
||||||
|
}
|
||||||
|
let res = await getLinkVerificationCodeIsEffective(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (!res.Result.IsEffective) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.verify = false
|
||||||
if (this.$route.query.trialId) {
|
if (this.$route.query.trialId) {
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId
|
||||||
this.initPage()
|
this.initPage()
|
||||||
|
|
@ -224,9 +269,50 @@ export default {
|
||||||
this.isNeedUpload = false
|
this.isNeedUpload = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async customPrompt(name) {
|
||||||
|
try {
|
||||||
|
const that = this
|
||||||
|
// 请输入标记名称
|
||||||
|
let message = this.$t('trials:researchForm:message:LinkVerificationCode')
|
||||||
|
const { value } = await this.$prompt(message, '', {
|
||||||
|
showClose: false,
|
||||||
|
cancelButtonText: this.$t('common:button:cancel'),
|
||||||
|
confirmButtonText: this.$t('trials:researchForm:button:saveLinkCode'),
|
||||||
|
showCancelButton: false,
|
||||||
|
closeOnClickModal: false,
|
||||||
|
closeOnPressEscape: false,
|
||||||
|
inputValue: name,
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
const value = instance.inputValue
|
||||||
|
if (!value) {
|
||||||
|
that.$message.error(this.$t('trials:researchForm:error:noValue'))
|
||||||
|
} else {
|
||||||
|
let flag = await this.getLinkVerificationCodeIsEffective(value)
|
||||||
|
if (!flag) {
|
||||||
|
that.$message.error(this.$t('trials:researchForm:confirm:isEffective'))
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getLinkVerificationCodeIsEffective(value)
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
async initPage() {
|
async initPage() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="trials-navbar" style="position: relative">
|
<div class="trials-navbar" style="position: relative">
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<img
|
<img v-if="NODE_ENV === 'usa'" src="@/assets/title-logo.png" alt="" class="title-logo" />
|
||||||
v-if="NODE_ENV === 'usa'"
|
<img v-else src="@/assets/system.png" alt="" style="width: 150px;height: 50px;margin-bottom: -7px;" />
|
||||||
src="@/assets/title-logo.png"
|
|
||||||
alt=""
|
|
||||||
class="title-logo"
|
|
||||||
/>
|
|
||||||
<img v-else src="@/assets/system.png" alt="" style="width: 150px;height: 50px;margin-bottom: -7px;"/>
|
|
||||||
<span style="white-space: nowrap" v-if="NODE_ENV !== 'usa'">
|
<span style="white-space: nowrap" v-if="NODE_ENV !== 'usa'">
|
||||||
<!-- 中心影像系统(EICS) -->
|
<!-- 中心影像系统(EICS) -->
|
||||||
{{ $t('trials:trials:title:eics') }}
|
{{ $t('trials:trials:title:eics') }}
|
||||||
|
|
@ -17,15 +12,8 @@
|
||||||
<NoticeMarquee />
|
<NoticeMarquee />
|
||||||
</div>
|
</div>
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<el-menu
|
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" size="mini" @select="handleSelect">
|
||||||
:default-active="activeIndex"
|
<el-menu-item v-if="
|
||||||
class="el-menu-demo"
|
|
||||||
mode="horizontal"
|
|
||||||
size="mini"
|
|
||||||
@select="handleSelect"
|
|
||||||
>
|
|
||||||
<el-menu-item
|
|
||||||
v-if="
|
|
||||||
!hasPermi([
|
!hasPermi([
|
||||||
'role:air',
|
'role:air',
|
||||||
'role:rpm',
|
'role:rpm',
|
||||||
|
|
@ -33,26 +21,20 @@
|
||||||
'role:rcrc',
|
'role:rcrc',
|
||||||
'role:rir',
|
'role:rir',
|
||||||
])
|
])
|
||||||
"
|
" index="1">
|
||||||
index="1"
|
|
||||||
>
|
|
||||||
<i class="el-icon-odometer" />
|
<i class="el-icon-odometer" />
|
||||||
<!-- 工作台 -->
|
<!-- 工作台 -->
|
||||||
<span slot="title">{{ $t('trials:menuTitle:workbench') }}</span>
|
<span slot="title">{{ $t('trials:menuTitle:workbench') }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item
|
<el-menu-item v-if="!hasPermi(['role:zys', 'role:zyss', 'role:zybs'])" index="2"
|
||||||
v-if="!hasPermi(['role:zys', 'role:zyss', 'role:zybs'])"
|
:disabled="TotalNeedSignSystemDocCount !== 0">
|
||||||
index="2"
|
|
||||||
:disabled="TotalNeedSignSystemDocCount !== 0"
|
|
||||||
>
|
|
||||||
<i class="el-icon-box" />
|
<i class="el-icon-box" />
|
||||||
<!-- 我的项目 -->
|
<!-- 我的项目 -->
|
||||||
<span slot="title">
|
<span slot="title">
|
||||||
{{ $t('trials:tab:trials') }}
|
{{ $t('trials:tab:trials') }}
|
||||||
</span>
|
</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item
|
<el-menu-item v-if="
|
||||||
v-if="
|
|
||||||
!hasPermi([
|
!hasPermi([
|
||||||
'role:air',
|
'role:air',
|
||||||
'role:rpm',
|
'role:rpm',
|
||||||
|
|
@ -61,9 +43,7 @@
|
||||||
'role:rir',
|
'role:rir',
|
||||||
'role:zys',
|
'role:zys',
|
||||||
])
|
])
|
||||||
"
|
" index="3">
|
||||||
index="3"
|
|
||||||
>
|
|
||||||
<i class="el-icon-chat-dot-square" />
|
<i class="el-icon-chat-dot-square" />
|
||||||
<!-- 通知消息 -->
|
<!-- 通知消息 -->
|
||||||
<span slot="title">{{ $t('trials:tab:notice') }}</span>
|
<span slot="title">{{ $t('trials:tab:notice') }}</span>
|
||||||
|
|
@ -81,11 +61,8 @@
|
||||||
$t('trials:trials-myinfo:title:accountInfo')
|
$t('trials:trials-myinfo:title:accountInfo')
|
||||||
}}</el-menu-item>
|
}}</el-menu-item>
|
||||||
<!-- 管理后台 -->
|
<!-- 管理后台 -->
|
||||||
<el-menu-item
|
<el-menu-item v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])" index="4-4">{{
|
||||||
v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])"
|
$t('trials:trials-myinfo:title:system') }}</el-menu-item>
|
||||||
index="4-4"
|
|
||||||
>{{ $t('trials:trials-myinfo:title:system') }}</el-menu-item
|
|
||||||
>
|
|
||||||
<!-- 切换角色 -->
|
<!-- 切换角色 -->
|
||||||
<el-menu-item index="4-5" v-if="hasRole">{{
|
<el-menu-item index="4-5" v-if="hasRole">{{
|
||||||
$t('trials:trials-myinfo:title:toggleRole')
|
$t('trials:trials-myinfo:title:toggleRole')
|
||||||
|
|
@ -96,18 +73,12 @@
|
||||||
}}</el-menu-item>
|
}}</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
<TopLang
|
<TopLang v-if="
|
||||||
v-if="
|
|
||||||
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' && NODE_ENV !== 'usa'
|
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' && NODE_ENV !== 'usa'
|
||||||
"
|
" />
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<toggleRole
|
<toggleRole v-if="toggleRoleVisible" :visible.sync="toggleRoleVisible" :loading="toggleRoleLoading"
|
||||||
v-if="toggleRoleVisible"
|
@save="loginByRole" />
|
||||||
:visible.sync="toggleRoleVisible"
|
|
||||||
:loading="toggleRoleLoading"
|
|
||||||
@save="loginByRole"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -313,37 +284,45 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||||
|
|
||||||
.el-breadcrumb__item {
|
.el-breadcrumb__item {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftMenu {
|
.leftMenu {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-logo {
|
.title-logo {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: -3px;
|
bottom: -3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu,
|
.right-menu,
|
||||||
.center-menu {
|
.center-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
// line-height: 70px;
|
// line-height: 70px;
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu-item {
|
.right-menu-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
|
|
@ -361,9 +340,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-container {
|
.avatar-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 200px;
|
margin-right: 200px;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|
@ -371,29 +352,34 @@ export default {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-container {
|
.dropdown-container {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.el-icon-caret-bottom {
|
.el-icon-caret-bottom {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
color: #999c9e;
|
color: #999c9e;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu {
|
.right-menu {
|
||||||
.el-menu-item.is-active {
|
.el-menu-item.is-active {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.center-menu {
|
.center-menu {
|
||||||
width: calc(100% - 1200px);
|
width: calc(100% - 1200px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.el-menu--horizontal > .my_info.el-submenu .el-submenu__icon-arrow {
|
.el-menu--horizontal>.my_info.el-submenu .el-submenu__icon-arrow {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -184,44 +184,79 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 调查表链接 -->
|
<!-- 调查表链接 -->
|
||||||
<base-model :config="share_model">
|
<base-model :config="share_model">
|
||||||
<template slot="dialog-body">
|
<template slot="dialog-body" v-loading="shareLoading">
|
||||||
<el-button size="small" type="primary" style="margin-bottom: 10px;" @click.stop="openImageManual">{{
|
<el-button size="small" type="primary" style="margin-bottom: 10px;" @click.stop="openImageManual">{{
|
||||||
$t('trials:researchRecord:label:edit')
|
$t('trials:researchRecord:label:edit')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<div style="width: 100%; display: flex">
|
<div style="width: 100%; display: flex">
|
||||||
<div class="shareLink">
|
<div class="date">
|
||||||
<!-- <div>
|
<el-form :model="shareForm" :rules="rules" ref="shareForm" label-width="100px">
|
||||||
<i style="color: #428bca" class="el-icon-success" />
|
<el-form-item :label="$t('trials:researchRecord:label:ExpirationDays')" prop="ExpirationDays">
|
||||||
<span>{{
|
<el-radio-group v-model="shareForm.ExpirationDays" @input="shareForm.OtherExpirationDays = null">
|
||||||
$t('trials:researchRecord:message:createLinkSuccessfully')
|
<el-radio :label="1">{{ $t('trials:researchRecord:label:day1') }}</el-radio>
|
||||||
}}</span>
|
<el-radio :label="7">{{ $t('trials:researchRecord:label:day7') }}</el-radio>
|
||||||
</div> -->
|
<el-radio :label="15">{{ $t('trials:researchRecord:label:day15') }}</el-radio>
|
||||||
<div style="margin: 10px 0">
|
<el-radio :label="`default`">{{ $t('trials:researchRecord:label:default') }}
|
||||||
<!-- 链接: -->
|
<el-input placeholder="" type="number" @input="handleInput" v-model="shareForm.OtherExpirationDays"
|
||||||
{{ $t('trials:researchRecord:label:link') }}
|
clearable size="mini" style="width: 60px;" class="dayInput" />
|
||||||
<el-input ref="shareLink" v-model="shareLink" readonly type="textarea" autosize />
|
<span style="margin-left: 10px;">{{ $t('trials:researchRecord:label:day') }}</span>
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:researchRecord:label:LinkVerificationCode')" prop="LinkVerificationCode">
|
||||||
|
<el-radio-group v-model="shareForm.LinkVerificationCode"
|
||||||
|
@input="shareForm.OtherLinkVerificationCode = null">
|
||||||
|
<el-radio label="researchProgramNo">{{ $t('trials:researchRecord:label:researchProgramNo')
|
||||||
|
}}</el-radio>
|
||||||
|
<el-radio label="default">{{ $t('trials:researchRecord:label:default') }}
|
||||||
|
<el-input placeholder="" type="number" v-model="shareForm.OtherLinkVerificationCode" clearable
|
||||||
|
size="mini" style="width: 100px;" />
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button type="primary" round @click="setLink" style="float: right;">
|
||||||
|
{{ $t('trials:researchRecord:button:setLink') }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="share">
|
||||||
<!-- 复制链接 -->
|
<div class="shareLink">
|
||||||
<el-button type="primary" round @click="copyLink" class="shareLinkBtn">
|
<h3>{{ $t('trials:researchRecord:label:link') }}</h3>
|
||||||
|
<el-input ref="shareLink" v-model="shareLink" readonly type="textarea" autosize :rows="3" />
|
||||||
|
<div class="dateBox">
|
||||||
|
<span>{{ $t('trials:researchRecord:label:linkVerificationCode') }}</span>
|
||||||
|
<span>{{ LinkVerificationCode }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="dateBox">
|
||||||
|
<span>{{ $t('trials:researchRecord:label:ValidityPeriod') }}</span>
|
||||||
|
<span>{{ validityPeriod }}</span>
|
||||||
|
<span style="color: red;" v-if="isExpired">({{ $t('trials:researchRecord:label:Expired') }})</span>
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" round @click="copyLink" class="shareLinkBtn"
|
||||||
|
:disabled="!validityPeriod || isExpired">
|
||||||
{{ $t('trials:researchRecord:button:copyLink') }}
|
{{ $t('trials:researchRecord:button:copyLink') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="shareCode">
|
<div class="shareCode">
|
||||||
<div class="qrCode">
|
<h3>{{ $t('trials:researchRecord:label:shareCode') }}</h3>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
|
<div class="qrCodeBox">
|
||||||
<div id="qrcode" ref="qrcode"></div>
|
<div id="qrcode" ref="qrcode"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="codeBtnBox">
|
<div class="codeBtnBox">
|
||||||
<el-button @click="handleCopyImg" type="primary" round>{{
|
<el-button @click="handleCopyImg" type="primary" round :disabled="!validityPeriod || isExpired">{{
|
||||||
$t('trials:researchRecord:button:copyCode')
|
$t('trials:researchRecord:button:copyCode')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button @click="savePic" round>{{
|
<el-button @click="savePic" round :disabled="!validityPeriod || isExpired">{{
|
||||||
$t('trials:researchRecord:button:savePic')
|
$t('trials:researchRecord:button:savePic')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
|
|
@ -231,6 +266,9 @@ import {
|
||||||
getTrialSiteSurveyList,
|
getTrialSiteSurveyList,
|
||||||
getTrialSiteSelect,
|
getTrialSiteSelect,
|
||||||
abandonSiteSurvey,
|
abandonSiteSurvey,
|
||||||
|
setTrialLinkExpirationTime,
|
||||||
|
getTrialLinkExpirationTime,
|
||||||
|
getLinkLinkExpirationTime,
|
||||||
} from '@/api/trials'
|
} from '@/api/trials'
|
||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
|
|
@ -272,14 +310,51 @@ export default {
|
||||||
share_model: {
|
share_model: {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: this.$t('trials:researchRecord:title:shark'),
|
title: this.$t('trials:researchRecord:title:shark'),
|
||||||
width: '800px',
|
width: '1000px',
|
||||||
},
|
},
|
||||||
shareLink: '',
|
shareLink: '',
|
||||||
researchState: this.$d.ResearchRecord,
|
researchState: this.$d.ResearchRecord,
|
||||||
qrcode: null,
|
qrcode: null,
|
||||||
|
validityPeriod: null,
|
||||||
|
LinkVerificationCode: null,
|
||||||
|
isExpired: false,
|
||||||
|
shareLoading: false,
|
||||||
|
shareForm: {
|
||||||
|
ExpirationDays: null,
|
||||||
|
OtherExpirationDays: null,
|
||||||
|
LinkVerificationCode: null,
|
||||||
|
OtherLinkVerificationCode: null,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
ExpirationDays: [
|
||||||
|
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (value === 'default' && !this.shareForm.OtherExpirationDays) {
|
||||||
|
callback(new Error(this.$t("common:ruleMessage:specify")));
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
|
||||||
|
}, trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
LinkVerificationCode: [
|
||||||
|
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (value === 'default' && !this.shareForm.OtherLinkVerificationCode) {
|
||||||
|
callback(new Error(this.$t("common:ruleMessage:specify")));
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
|
||||||
|
}, trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
ImageManualVisible: false,
|
ImageManualVisible: false,
|
||||||
trialSiteSurveyId: null
|
trialSiteSurveyId: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -287,6 +362,78 @@ export default {
|
||||||
this.getSite()
|
this.getSite()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getLinkTimeIsExpired() {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
}
|
||||||
|
this.shareLoading = true
|
||||||
|
let res = await getLinkLinkExpirationTime(data)
|
||||||
|
this.shareLoading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.isExpired = res.Result.IsIsExpired
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.shareLoading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLinkTime() {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
}
|
||||||
|
this.shareLoading = true
|
||||||
|
let res = await getTrialLinkExpirationTime(data)
|
||||||
|
this.shareLoading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.validityPeriod = res.Result.LinkExpirationTime
|
||||||
|
this.LinkVerificationCode = res.Result.LinkVerificationCode || this.$route.query.researchProgramNo
|
||||||
|
if (!this.validityPeriod) return false
|
||||||
|
this.getLinkTimeIsExpired()
|
||||||
|
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${this.$route.query.trialId}`
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.creatQrCode()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.shareLoading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async setLink() {
|
||||||
|
try {
|
||||||
|
let validate = await this.$refs.shareForm.validate()
|
||||||
|
if (!validate) return false
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
ExpirationDays: this.shareForm.ExpirationDays,
|
||||||
|
LinkVerificationCode: this.shareForm.LinkVerificationCode
|
||||||
|
}
|
||||||
|
if (this.shareForm.LinkVerificationCode === 'researchProgramNo') {
|
||||||
|
data.LinkVerificationCode = null
|
||||||
|
}
|
||||||
|
if (this.shareForm.LinkVerificationCode === 'default') {
|
||||||
|
data.LinkVerificationCode = this.shareForm.OtherLinkVerificationCode
|
||||||
|
}
|
||||||
|
if (this.shareForm.ExpirationDays === 'default') {
|
||||||
|
data.ExpirationDays = this.shareForm.OtherExpirationDays
|
||||||
|
}
|
||||||
|
this.shareLoading = true
|
||||||
|
let res = await setTrialLinkExpirationTime(data)
|
||||||
|
this.shareLoading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getLinkTime()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.shareLoading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleInput(val) {
|
||||||
|
// 过滤掉非数字字符,并取整为正整数
|
||||||
|
this.shareForm.OtherExpirationDays = val.replace(/[^\d]/g, '').replace(/^0+/, '')
|
||||||
|
},
|
||||||
openImageManual() {
|
openImageManual() {
|
||||||
// if (!this.trialSiteSurveyId) return false
|
// if (!this.trialSiteSurveyId) return false
|
||||||
this.ImageManualVisible = true
|
this.ImageManualVisible = true
|
||||||
|
|
@ -344,7 +491,7 @@ export default {
|
||||||
// 中心调研表链接
|
// 中心调研表链接
|
||||||
this.$copyText(
|
this.$copyText(
|
||||||
`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink
|
`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink
|
||||||
}`
|
}\n${this.$t('trials:researchRecord:label:linkVerificationCode')}:${this.LinkVerificationCode}\n${this.$t('trials:researchRecord:label:ValidityPeriod')}:${this.validityPeriod}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// 复制成功
|
// 复制成功
|
||||||
|
|
@ -415,13 +562,18 @@ export default {
|
||||||
},
|
},
|
||||||
// 展示调查表链接
|
// 展示调查表链接
|
||||||
showResearchLink() {
|
showResearchLink() {
|
||||||
const trialId = this.trialId
|
this.shareForm = {
|
||||||
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${trialId}&lang=${this.$i18n.locale}`
|
ExpirationDays: null,
|
||||||
|
OtherExpirationDays: null,
|
||||||
|
LinkVerificationCode: null,
|
||||||
|
OtherLinkVerificationCode: null,
|
||||||
|
}
|
||||||
|
this.validityPeriod = null
|
||||||
|
this.isExpired = false
|
||||||
this.share_model.visible = true
|
this.share_model.visible = true
|
||||||
|
this.getLinkTime()
|
||||||
|
// &lang=${this.$i18n.locale}
|
||||||
// this.trialSiteSurveyId = this.list[0].Id
|
// this.trialSiteSurveyId = this.list[0].Id
|
||||||
this.$nextTick(() => {
|
|
||||||
this.creatQrCode()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
handleReset() {
|
||||||
|
|
@ -462,26 +614,35 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.shareLink {
|
.date,
|
||||||
padding-right: 20px;
|
.share {
|
||||||
width: 50%;
|
width: 55%;
|
||||||
position: relative;
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.shareLinkBtn {
|
.dayInput {
|
||||||
position: absolute;
|
::v-deep .el-input__inner {
|
||||||
bottom: 0px;
|
padding-left: 5px;
|
||||||
left: 0px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shareCode {
|
|
||||||
width: 50%;
|
|
||||||
border-left: 1px solid #eee;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.qrCode {
|
.date {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.share {
|
||||||
|
width: 45%;
|
||||||
|
padding-left: 5%;
|
||||||
|
border-left: 1px solid #f0f0f0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shareLinkBtn {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrCodeBox {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -490,13 +651,17 @@ export default {
|
||||||
box-shadow: 1px 1px 5px #c0c4cc;
|
box-shadow: 1px 1px 5px #c0c4cc;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.codeBtnBox {
|
.dateBox {
|
||||||
margin-top: 20px;
|
margin: 10px;
|
||||||
width: 100%;
|
}
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
.codeBtnBox {
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
display: block;
|
||||||
|
margin: 10px auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,14 @@
|
||||||
|
|
||||||
<el-form-item v-if="readingTaskState < 2">
|
<el-form-item v-if="readingTaskState < 2">
|
||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
<el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :disabled="isTableVisible || isSaved"
|
<el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :disabled="isTableVisible"
|
||||||
type="primary" @click="skipTask">
|
type="primary" @click="skipTask">
|
||||||
{{ $t('trials:readingReport:button:skip') }}
|
{{ $t('trials:readingReport:button:skip') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" :disabled="isTableVisible || isSaved" @click="handleSave">
|
<el-button type="primary" :disabled="isTableVisible || isSaved" @click="handleSave">
|
||||||
{{ $t('common:button:save') }}
|
{{ $t('common:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :disabled="isTableVisible || isSaved"
|
<el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :disabled="isTableVisible"
|
||||||
type="primary" @click="handleSubmit">
|
type="primary" @click="handleSubmit">
|
||||||
{{ $t('common:button:submit') }}
|
{{ $t('common:button:submit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.hoursTip = hoursTip
|
this.hoursTip = hoursTip
|
||||||
this.$EventBus.$on("reload", (data) => {
|
this.$EventBus.$on("reload", (data) => {
|
||||||
|
zzSessionStorage.removeItem('lastWorkbench')
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue