提交访视时,签名时的说明中的临床数据名称需要与实际配置的临床数据名称一致
continuous-integration/drone/push Build is running Details

uat_us
wangxiaoshuang 2024-11-25 15:56:28 +08:00
parent 9c5e3570b5
commit 05c6a9a8fc
3 changed files with 96 additions and 41 deletions

View File

@ -3907,3 +3907,11 @@ export function setTaskValid(data) {
data data
}) })
} }
// 一致性分析临床数据设置任务为有效
export function getVisitClinicalDataName(data) {
return request({
url: `/ReadingClinicalData/getVisitClinicalDataName`,
method: 'post',
data
})
}

View File

@ -1,7 +1,9 @@
<template> <template>
<div v-loading="loading" class="sign-form-wrapper"> <div v-loading="loading" class="sign-form-wrapper">
<div class="sign-form-body"> <div class="sign-form-body">
<h4 v-if="signText" style="color:red;white-space: pre-line;">* {{ signText }}</h4> <h4 v-if="signText" style="color: red; white-space: pre-line">
* {{ signText }}
</h4>
<el-form <el-form
ref="signForm" ref="signForm"
:model="signForm" :model="signForm"
@ -13,7 +15,11 @@
:label="$t('common:form:sign:userName')" :label="$t('common:form:sign:userName')"
prop="userName" prop="userName"
:rules="[ :rules="[
{ required: true, message: $t('common:ruleMessage:specify'), trigger: 'blur' } {
required: true,
message: $t('common:ruleMessage:specify'),
trigger: 'blur',
},
]" ]"
> >
<el-input v-model="signForm.userName" /> <el-input v-model="signForm.userName" />
@ -23,18 +29,37 @@
:label="$t('common:form:sign:password')" :label="$t('common:form:sign:password')"
prop="password" prop="password"
:rules="[ :rules="[
{ required: true, message: $t('common:ruleMessage:specify'), trigger: 'blur' } {
required: true,
message: $t('common:ruleMessage:specify'),
trigger: 'blur',
},
]" ]"
> >
<el-input v-model="signForm.password" show-password auto-complete="new-password" /> <el-input
v-model="signForm.password"
show-password
auto-complete="new-password"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer sign-form-footer"> <div slot="footer" class="dialog-footer sign-form-footer">
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleclose"> <el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="handleclose"
>
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<el-button :loading="btnLoading" :disabled="unsigned" size="small" type="primary" @click="handleVerifySignature"> <el-button
:loading="btnLoading"
:disabled="unsigned"
size="small"
type="primary"
@click="handleVerifySignature"
>
{{ $t('common:button:sign') }} {{ $t('common:button:sign') }}
</el-button> </el-button>
</div> </div>
@ -49,44 +74,56 @@ export default {
props: { props: {
signCodeEnum: { signCodeEnum: {
type: Number, type: Number,
required: true required: true,
}, },
subjectVisitId: { subjectVisitId: {
type: String, type: String,
default: '' default: '',
} },
signReplaceText: {
type: String,
default: '',
},
}, },
data() { data() {
return { return {
signForm: { signForm: {
userName: '', userName: '',
password: '' password: '',
}, },
signText: '', signText: '',
signCodeId: '', signCodeId: '',
signCode: '', signCode: '',
btnLoading: false, btnLoading: false,
loading: false, loading: false,
unsigned: false unsigned: false,
} }
}, },
mounted() { mounted() {
this.loading = true this.loading = true
this.$store.dispatch('trials/getSignInfo', { signCode: this.signCodeEnum }) this.$store
.dispatch('trials/getSignInfo', { signCode: this.signCodeEnum })
.then((res) => { .then((res) => {
this.unsigned = false this.unsigned = false
this.loading = false this.loading = false
if (this.signReplaceText) {
this.signText = res.SignText.replace('xxx', this.signReplaceText)
} else {
this.signText = res.SignText this.signText = res.SignText
}
this.signCode = res.SignCode this.signCode = res.SignCode
this.signCodeId = res.SignCodeId this.signCodeId = res.SignCodeId
}).catch(() => { })
.catch(() => {
this.loading = false this.loading = false
this.unsigned = true this.unsigned = true
}) })
}, },
methods: { methods: {
handleVerifySignature() { handleVerifySignature() {
const currentUser = zzSessionStorage.getItem('userName').toLocaleLowerCase() const currentUser = zzSessionStorage
.getItem('userName')
.toLocaleLowerCase()
this.$refs.signForm.validate((valid) => { this.$refs.signForm.validate((valid) => {
if (!valid) return if (!valid) return
if (this.signForm.userName.trim().toLocaleLowerCase() !== currentUser) { if (this.signForm.userName.trim().toLocaleLowerCase() !== currentUser) {
@ -103,15 +140,15 @@ export default {
SignCode: this.signCode, SignCode: this.signCode,
SignText: this.signText, SignText: this.signText,
SignCodeId: this.signCodeId, SignCodeId: this.signCodeId,
SubjectVisitId: this.subjectVisitId SubjectVisitId: this.subjectVisitId,
} }
this.$emit('closeDialog', true, param) this.$emit('closeDialog', true, param)
}) })
}, },
handleclose() { handleclose() {
this.$emit('closeDialog', false) this.$emit('closeDialog', false)
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -131,7 +168,6 @@ export default {
text-align: right; text-align: right;
} }
} }
</style> </style>
<style> <style>
.el-dialog__body .sign-form-body h4 { .el-dialog__body .sign-form-body h4 {

View File

@ -1085,6 +1085,7 @@
<SignForm <SignForm
ref="signForm" ref="signForm"
:sign-code-enum="signCode" :sign-code-enum="signCode"
:sign-replace-text="signReplaceText"
:subject-visit-id="rowData.Id" :subject-visit-id="rowData.Id"
@closeDialog="closeSignDialog" @closeDialog="closeSignDialog"
/> />
@ -1496,6 +1497,7 @@ import {
cRCCancelConfirmClinical, cRCCancelConfirmClinical,
getClinicalTableList, getClinicalTableList,
getClinicalDateList, getClinicalDateList,
getVisitClinicalDataName,
} from '@/api/trials' } from '@/api/trials'
import { cRCRequestToQC } from '@/api/trials/visit' import { cRCRequestToQC } from '@/api/trials/visit'
import { cRCVisitList_Export } from '@/api/export' import { cRCVisitList_Export } from '@/api/export'
@ -1578,6 +1580,7 @@ export default {
selectArr: [], selectArr: [],
signVisible: false, signVisible: false,
signCode: null, signCode: null,
signReplaceText: null,
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
pickerOption: { pickerOption: {
disabledDate: (time) => { disabledDate: (time) => {
@ -1970,9 +1973,17 @@ export default {
.then(() => { .then(() => {
if (this.rowData.IsBaseLine) { if (this.rowData.IsBaseLine) {
if (this.otherInfo.ClinicalInformationTransmissionEnum > 0) { if (this.otherInfo.ClinicalInformationTransmissionEnum > 0) {
const { ClinicalDataConfirmation } = const_.processSignature getVisitClinicalDataName({ id: this.rowData.Id })
.then((res) => {
this.signReplaceText = res.Result.ClinicalDataName
const { ClinicalDataConfirmation } =
const_.processSignature
this.signCode = ClinicalDataConfirmation this.signCode = ClinicalDataConfirmation
this.signVisible = true this.signVisible = true
})
.catch((err) => {
console.log(err)
})
} else { } else {
this.submit() this.submit()
} }