From 5859102225c5b62be316a3fd67f301a16e4cecb3 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 4 Mar 2024 17:55:47 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/mim-medical-audit/components/Conclusions.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue index ad7a3a44..63876d52 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue @@ -340,7 +340,6 @@ export default { var file = await this.fileToBlob(param.file) var trialId = this.$route.query.trialId const res = await this.OSSclient.put(`/${trialId}/MedicalReview/${param.file.name}`, file) - console.log(res) this.fileList.push({ name: param.file.name, url: this.$getObjectName(res.url) }) this.loading = false } catch (e) { From b8384d111a65cf45635030432970b2ec135c1e08 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 4 Mar 2024 17:56:51 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Conclusions.vue | 25 +++-- .../mim-medical-audit/components/FormItem.vue | 15 ++- .../mim-medical-audit/components/Issues.vue | 20 ++-- .../components/MedicalAudit.vue | 101 +++++++++++------- .../reading/mim-medical-audit/index.vue | 89 +++++++++++++-- .../reading/pm-medical-feedback/index.vue | 2 +- 6 files changed, 184 insertions(+), 68 deletions(-) diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue index 63876d52..265ce58d 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Conclusions.vue @@ -18,7 +18,8 @@ > @@ -58,7 +59,7 @@ > @@ -247,7 +248,6 @@ export default { if (!valid) { reject() } else { - this.loading = true this.form.IsSendDialog = this.form.IsHaveQuestion var files = [] this.fileList.map(file => { @@ -260,10 +260,8 @@ export default { this.$emit('getMedicalAuditList') } this.isSendMessage = this.form.IsHaveQuestion - this.loading = false resolve() }).catch(() => { - this.loading = false reject() }) } @@ -296,16 +294,27 @@ export default { }) }) }, + validForm() { + return new Promise((resolve) => { + this.$refs['conclusionsForm'].validate((valid) => { + resolve(valid) + }) + }) + }, handleReply() { this.chatVisible = true }, handleCloseReply() { this.closeQuestionVisible = true }, + isHaveQuestionChange(val) { + this.$emit('setIsHaveQuestion', val) + }, refresh() { this.isClosedDialog = true this.$emit('getMedicalAuditList') this.$refs['chatForm'].getMessageList() + this.$emit('handleSign') }, convertBase64ToBlob(imageEditorBase64) { var base64Arr = imageEditorBase64.split(',') @@ -385,7 +394,7 @@ export default { .disabled{ /deep/ .el-upload--picture-card { display: none; - + } } /deep/ .el-upload-list__item { diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/components/FormItem.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/components/FormItem.vue index 05ed238f..a66fb23f 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/components/FormItem.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/components/FormItem.vue @@ -21,7 +21,7 @@ @@ -50,7 +50,7 @@ {{ val }} @@ -59,7 +59,7 @@ {{ val }} @@ -71,6 +71,7 @@ :question="item" :audit-state="auditState" :question-form="questionForm" + :is-send-message="isSendMessage" @resetFormItemData="resetFormItemData" /> @@ -94,6 +95,10 @@ export default { auditState: { type: Number, required: true + }, + isSendMessage: { + type: Boolean, + required: true } }, data() { diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Issues.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Issues.vue index 7378472c..f06cfe05 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/components/Issues.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/components/Issues.vue @@ -13,7 +13,8 @@ :key="question.Id" :question="question" :question-form="questionForm" - :audit-state="state" + :audit-state="auditState" + :is-send-message="isSendMessage" @resetFormItemData="resetFormItemData" /> @@ -43,6 +44,10 @@ export default { auditState: { type: Number, required: true + }, + isSendMessage: { + type: Boolean, + required: true } }, data() { @@ -52,8 +57,7 @@ export default { isRender: false, trialId: '', readingTaskState: 0, - userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, - state: [14, 30].includes(zzSessionStorage.getItem('userTypeEnumInt') * 1) ? this.auditState : 2 + userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1 } }, mounted() { @@ -67,7 +71,6 @@ export default { if (!valid) { reject() } else { - this.loading = true var answers = [] for (const k in this.questionForm) { answers.push({ id: k, answer: this.questionForm[k] }) @@ -82,10 +85,8 @@ export default { if (isPrompt) { this.$message.success(this.$t('common:message:savedSuccessfully')) } - this.loading = false resolve() }).catch(() => { - this.loading = false reject() }) } @@ -120,6 +121,13 @@ export default { }) }) }, + validForm() { + return new Promise((resolve) => { + this.$refs['questions'].validate((valid) => { + resolve(valid) + }) + }) + }, getQuestions() { this.loading = true var questions = [] diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/components/MedicalAudit.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/components/MedicalAudit.vue index 9a479ef6..87af097b 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/components/MedicalAudit.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/components/MedicalAudit.vue @@ -20,6 +20,7 @@ :question-answer-list="auditInfo.QuestionAnswerList" :task-medical-review-id="taskMedicalReviewId" :audit-state="auditInfo.AuditState" + :is-send-message="isSendMessage" />
@@ -34,29 +35,36 @@ :subject-code="auditInfo.SubjectCode" :task-blind-name="auditInfo.TaskBlindName" @getMedicalAuditList="getMedicalAuditList" + @setIsHaveQuestion="setIsHaveQuestion" + @handleSign="handleSign" />
- + - + + + + + {{ $t('trials:medicalFeedback:title:launch') }} - - + + {{ $t('trials:medicalFeedback:title:qaRecord') }} - + {{ $t('trials:medicalFeedback:button:auditCompleted') }} - - + + {{ $t('trials:medicalFeedback:button:nextTask') }}
@@ -130,7 +138,8 @@ export default { currentUser: zzSessionStorage.getItem('userName'), signVisible: false, userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, - isSendMessage: false + isSendMessage: false, + isHaveQuestion: false } }, mounted() { @@ -146,59 +155,69 @@ export default { getMedicalReviewReadingTask(params).then(res => { this.auditInfo = { ...res.Result } this.isSendMessage = res.Result.IsSendMessage + this.isHaveQuestion = res.Result.MedicalReviewInfo.IsHaveQuestion this.loading = false }).catch(() => { this.loading = false }) }, handleAudit() { - if (!this.$refs['auditConclusions'].isClosedDialog && this.$refs['auditConclusions'].form.IsHaveQuestion) { - // 请先关闭质询! - this.$alert(this.$t('trials:medicalFeedback:message:closeQC'), { - callback: action => {} - }) - return - } - this.loading = true - this.$refs['auditIssues'].handleSave(false).then(() => { - this.$refs['auditConclusions'].handleSave(false).then(() => { - this.loading = false - this.isSendMessage = this.$refs['auditConclusions'].form.IsHaveQuestion - const { MedicalAudit } = const_.processSignature - this.signCode = MedicalAudit - this.signVisible = true + if (this.$refs['auditConclusions'].isClosedDialog && this.$refs['auditConclusions'].form.IsHaveQuestion) { + this.isSendMessage = this.$refs['auditConclusions'].form.IsHaveQuestion + this.handleSign() + } else if (!this.$refs['auditConclusions'].form.IsHaveQuestion) { + const loading = this.$loading({ fullscreen: true }) + this.$refs['auditIssues'].handleSave(false).then(() => { + this.$refs['auditConclusions'].handleSave(false).then(() => { + this.isSendMessage = this.$refs['auditConclusions'].form.IsHaveQuestion + this.handleSign() + loading.close() + }).catch(() => { + loading.close() + }) }).catch(() => { - this.loading = false + loading.close() }) - }).catch(() => { - this.loading = false - }) - // Promise.all([this.$refs['auditIssues'].handleSave(false), this.$refs['auditConclusions'].handleSave(false)]) - // .then(() => { - // this.loading = false - // const { MedicalAudit } = const_.processSignature - // this.signCode = MedicalAudit - // this.signVisible = true - // }).catch(() => { - // this.loading = false - // }) + } + }, + handleSign() { + const { MedicalAudit } = const_.processSignature + this.signCode = MedicalAudit + this.signVisible = true }, handleSave() { - this.loading = true + const loading = this.$loading({ fullscreen: true }) this.$refs['auditIssues'].handleSave(false).then(() => { this.$refs['auditConclusions'].handleSave(false).then(() => { - this.loading = false this.isSendMessage = this.$refs['auditConclusions'].form.IsHaveQuestion + this.$emit('getList') + loading.close() }).catch(() => { - this.loading = false + loading.close() }) }).catch(() => { - this.loading = false + loading.close() }) }, + async handleLaunch() { + var auditIssuesValid = await this.$refs['auditIssues'].validForm() + var auditConclusionsValid = await this.$refs['auditConclusions'].validForm() + if (auditIssuesValid && auditConclusionsValid) { + this.$confirm('当前审核结论为“有问题”,是否发起质询?', { + type: 'warning', + distinguishCancelAndClose: true + }) + .then(() => { + this.handleSave() + }).catch(() => {}) + } + }, handleQc() { this.$refs['auditConclusions'].handleReply() }, + setIsHaveQuestion(isHaveQuestion) { + this.isHaveQuestion = isHaveQuestion + }, // 获取下一任务 getNextTask() { this.loading = true diff --git a/src/views/trials/trials-panel/reading/mim-medical-audit/index.vue b/src/views/trials/trials-panel/reading/mim-medical-audit/index.vue index fd209374..c81714cc 100644 --- a/src/views/trials/trials-panel/reading/mim-medical-audit/index.vue +++ b/src/views/trials/trials-panel/reading/mim-medical-audit/index.vue @@ -504,10 +504,37 @@ @refresh="refresh" /> + + +
+ + {{ $t('common:dialogTitle:sign') }} + + + {{ `(${$t('common:label:sign')}${ currentUser })` }} + +
+ +