diff --git a/src/api/trials.js b/src/api/trials.js
index 709d4441..7699db50 100644
--- a/src/api/trials.js
+++ b/src/api/trials.js
@@ -4482,4 +4482,36 @@ export function getDoctorUserTrialReadingStat(data) {
method: 'post',
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,
+ })
}
\ No newline at end of file
diff --git a/src/components/TrialsTab/index.vue b/src/components/TrialsTab/index.vue
index f8955262..eb7346a6 100644
--- a/src/components/TrialsTab/index.vue
+++ b/src/components/TrialsTab/index.vue
@@ -56,7 +56,8 @@ export default {
TrialConfig: {},
TrialStatusStr: null,
trialId: null,
- IsAdditionalAssessment: false
+ IsAdditionalAssessment: false,
+ isReload: false
}
},
computed: {
@@ -71,7 +72,11 @@ export default {
if (~url.indexOf('?')) {
query = url.split('?')[1]
}
- zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
+ if (!this.isReload) {
+ zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
+ } else {
+ this.isReload = false
+ }
var firstGoIn = this.trialsRouter.children.find(v => { return v.name === 'TrialsPanel' }).children[0]
if (this.trialsTab === '/trials/trials-panel') {
var targetPath = firstGoIn.path
@@ -96,6 +101,9 @@ export default {
}
},
mounted() {
+ this.$EventBus.$on("reload", () => {
+ this.isReload = true
+ })
var query = ``
var url = window.location.href
if (~url.indexOf('?')) {
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 2d89a113..bf9ab81a 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -2,11 +2,7 @@
-
+
@@ -192,12 +184,14 @@ export default {
flex-direction: row;
justify-content: space-between;
}
+
.navbar {
height: 50px;
overflow: hidden;
// position: relative;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
+
.hamburger-container {
line-height: 46px;
height: 100%;
@@ -219,6 +213,7 @@ export default {
// float: right;
height: 100%;
line-height: 65px;
+
// position: relative;
&:focus {
outline: none;
@@ -245,6 +240,7 @@ export default {
.avatar-container {
display: inline-block;
margin-right: 200px;
+
.user-avatar {
margin-top: 5px;
width: 40px;
@@ -252,16 +248,19 @@ export default {
border-radius: 10px;
}
}
+
.dropdown-container {
// margin-left: 30px;
// position: absolute;
// right: 20px;
// top: 0px;
cursor: pointer;
+
.el-icon-caret-bottom {
font-size: 12px;
}
}
+
.el-dropdown-link {
color: #999c9e;
cursor: pointer;
diff --git a/src/views/research/login.vue b/src/views/research/login.vue
index 6c2352af..4f5a81f0 100644
--- a/src/views/research/login.vue
+++ b/src/views/research/login.vue
@@ -1,6 +1,7 @@
-
+
+
{{ $t('trials:researchForm:title:question') }}
@@ -91,7 +92,10 @@ import { getUserMenuTree, getUserPermissions } from '@/api/user'
import store from '@/store'
import TopLang from './topLang'
import { mapGetters, mapMutations } from 'vuex'
-
+import {
+ getLinkLinkExpirationTime,
+ getLinkVerificationCodeIsEffective
+} from '@/api/trials'
export default {
components: { TopLang },
data() {
@@ -146,6 +150,7 @@ export default {
}
return {
trialId: '',
+ verify: true,
form: {
Sponsor: null, // 申办方
ResearchProgramNo: null, // 方案号
@@ -202,31 +207,112 @@ export default {
])
},
mounted() {
- this.$i18n.locale = this.$route.query.lang
- this.setLanguage(this.$route.query.lang)
+ let lang = 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()
- if (this.$route.query.trialId) {
- this.trialId = this.$route.query.trialId
- this.initPage()
- }
- if (this.$route.query.isUpload) {
- this.isUpload = true
- this.form.IsUpdate = true
- let { email, oldEMail, trialSiteId } = this.$route.query
- if (trialSiteId) this.form.TrialSiteId = trialSiteId
- if (oldEMail) this.form.ReplaceUserEmailOrPhone = oldEMail
- if (email && email !== 'null') {
- this.form.EmailOrPhone = email
- } else {
- this.form.EmailOrPhone = oldEMail
- }
- if ((email && email !== 'null') || (oldEMail && oldEMail !== 'null')) {
- this.isNeedUpload = false
- }
- }
+ 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) {
+ this.trialId = this.$route.query.trialId
+ this.initPage()
+ }
+ if (this.$route.query.isUpload) {
+ this.isUpload = true
+ this.form.IsUpdate = true
+ let { email, oldEMail, trialSiteId } = this.$route.query
+ if (trialSiteId) this.form.TrialSiteId = trialSiteId
+ if (oldEMail) this.form.ReplaceUserEmailOrPhone = oldEMail
+ if (email && email !== 'null') {
+ this.form.EmailOrPhone = email
+ } else {
+ this.form.EmailOrPhone = oldEMail
+ }
+ if ((email && email !== 'null') || (oldEMail && oldEMail !== 'null')) {
+ 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
+ }
+ },
// 初始化页面
async initPage() {
this.loading = true
diff --git a/src/views/trials/trials-layout/components/trialsNavbar.vue b/src/views/trials/trials-layout/components/trialsNavbar.vue
index 5a90faa0..184ffdef 100644
--- a/src/views/trials/trials-layout/components/trialsNavbar.vue
+++ b/src/views/trials/trials-layout/components/trialsNavbar.vue
@@ -1,13 +1,8 @@
-
+
@@ -313,37 +284,45 @@ export default {
overflow: hidden;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
+
.el-breadcrumb__item {
font-size: 16px;
}
+
.leftMenu {
display: flex;
align-items: flex-end;
padding-left: 20px;
padding-bottom: 20px;
+
img {
height: 28px;
margin-right: 10px;
}
+
.title-logo {
height: 36px;
}
+
span {
font-size: 20px;
position: relative;
bottom: -3px;
}
}
+
.right-menu,
.center-menu {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 100%;
+
// line-height: 70px;
&:focus {
outline: none;
}
+
.right-menu-item {
display: inline-block;
padding: 0 8px;
@@ -361,9 +340,11 @@ export default {
}
}
}
+
.avatar-container {
display: inline-block;
margin-right: 200px;
+
.user-avatar {
margin-top: 5px;
width: 40px;
@@ -371,29 +352,34 @@ export default {
border-radius: 10px;
}
}
+
.dropdown-container {
cursor: pointer;
+
.el-icon-caret-bottom {
font-size: 12px;
}
}
+
.el-dropdown-link {
color: #999c9e;
cursor: pointer;
}
}
+
.right-menu {
.el-menu-item.is-active {
font-weight: bolder;
}
}
+
.center-menu {
width: calc(100% - 1200px);
}
}
diff --git a/src/views/trials/trials-panel/attachments/site-research/index.vue b/src/views/trials/trials-panel/attachments/site-research/index.vue
index 07b03083..b9b90924 100644
--- a/src/views/trials/trials-panel/attachments/site-research/index.vue
+++ b/src/views/trials/trials-panel/attachments/site-research/index.vue
@@ -184,44 +184,79 @@
-
+
{{
$t('trials:researchRecord:label:edit')
}}
-
-
-
-
- {{ $t('trials:researchRecord:label:link') }}
-
-
-
-
-
+
+
+
+
+ {{ $t('trials:researchRecord:label:day1') }}
+ {{ $t('trials:researchRecord:label:day7') }}
+ {{ $t('trials:researchRecord:label:day15') }}
+ {{ $t('trials:researchRecord:label:default') }}
+
+ {{ $t('trials:researchRecord:label:day') }}
+
+
+
+
+
+ {{ $t('trials:researchRecord:label:researchProgramNo')
+ }}
+ {{ $t('trials:researchRecord:label:default') }}
+
+
+
+
+
+
+ {{ $t('trials:researchRecord:button:setLink') }}
+
+
+
+
+
{{ $t('trials:researchRecord:label:link') }}
+
+
+ {{ $t('trials:researchRecord:label:linkVerificationCode') }}
+ {{ LinkVerificationCode }}
+
+
+ {{ $t('trials:researchRecord:label:ValidityPeriod') }}
+ {{ validityPeriod }}
+ ({{ $t('trials:researchRecord:label:Expired') }})
+
+
{{ $t('trials:researchRecord:button:copyLink') }}
-
-
-
-
-
{{
- $t('trials:researchRecord:button:copyCode')
- }}
-
{{
- $t('trials:researchRecord:button:savePic')
- }}
+
+
{{ $t('trials:researchRecord:label:shareCode') }}
+
+
+
+ {{
+ $t('trials:researchRecord:button:copyCode')
+ }}
+ {{
+ $t('trials:researchRecord:button:savePic')
+ }}
+
+
+
+
@@ -231,6 +266,9 @@ import {
getTrialSiteSurveyList,
getTrialSiteSelect,
abandonSiteSurvey,
+ setTrialLinkExpirationTime,
+ getTrialLinkExpirationTime,
+ getLinkLinkExpirationTime,
} from '@/api/trials'
import { changeURLStatic } from '@/utils/history.js'
import BaseContainer from '@/components/BaseContainer'
@@ -272,14 +310,51 @@ export default {
share_model: {
visible: false,
title: this.$t('trials:researchRecord:title:shark'),
- width: '800px',
+ width: '1000px',
},
shareLink: '',
researchState: this.$d.ResearchRecord,
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,
- trialSiteSurveyId: null
+ trialSiteSurveyId: null,
}
},
mounted() {
@@ -287,6 +362,78 @@ export default {
this.getSite()
},
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() {
// if (!this.trialSiteSurveyId) return false
this.ImageManualVisible = true
@@ -344,7 +491,7 @@ export default {
// 中心调研表链接
this.$copyText(
`${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) => {
// 复制成功
@@ -415,13 +562,18 @@ export default {
},
// 展示调查表链接
showResearchLink() {
- const trialId = this.trialId
- this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${trialId}&lang=${this.$i18n.locale}`
+ this.shareForm = {
+ ExpirationDays: null,
+ OtherExpirationDays: null,
+ LinkVerificationCode: null,
+ OtherLinkVerificationCode: null,
+ }
+ this.validityPeriod = null
+ this.isExpired = false
this.share_model.visible = true
+ this.getLinkTime()
+ // &lang=${this.$i18n.locale}
// this.trialSiteSurveyId = this.list[0].Id
- this.$nextTick(() => {
- this.creatQrCode()
- })
},
// 重置
handleReset() {
@@ -462,41 +614,54 @@ export default {
}
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
index 8b34c73a..e0d03552 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
@@ -27,14 +27,14 @@
-
{{ $t('trials:readingReport:button:skip') }}
{{ $t('common:button:save') }}
-
{{ $t('common:button:submit') }}
diff --git a/src/views/trials/trials-workbench/index.vue b/src/views/trials/trials-workbench/index.vue
index 30777727..737dd7ef 100644
--- a/src/views/trials/trials-workbench/index.vue
+++ b/src/views/trials/trials-workbench/index.vue
@@ -667,6 +667,7 @@ export default {
}
this.hoursTip = hoursTip
this.$EventBus.$on("reload", (data) => {
+ zzSessionStorage.removeItem('lastWorkbench')
window.location.reload()
});
},