diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue index a8d9aeec..78032cc5 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue @@ -263,7 +263,6 @@ export default { mounted() { this.trialId = this.$route.query.trialId this.initForm() - console.log(this.getQuestionVal(7)) }, beforeDestroy() { diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/convertMultiframeImageIds.js b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/convertMultiframeImageIds.js index 728fe73d..4d0b3f92 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/convertMultiframeImageIds.js +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/convertMultiframeImageIds.js @@ -4,10 +4,17 @@ import cornerstoneDICOMImageLoader from '@cornerstonejs/dicom-image-loader' * preloads imageIds metadata in memory **/ async function prefetchMetadataInformation(imageIdsToPrefetch) { - for (let i = 0; i < imageIdsToPrefetch.length; i++) { - await cornerstoneDICOMImageLoader.wadouri.loadImage(imageIdsToPrefetch[i]) - .promise - } + return new Promise(async(resolve, reject) =>{ + var taskPromises = [] + for (let i = 0; i < imageIdsToPrefetch.length; i++) { + taskPromises.push(cornerstoneDICOMImageLoader.wadouri.loadImage(imageIdsToPrefetch[i]).promise) + if (taskPromises.length >= 6 || i === imageIdsToPrefetch.length - 1) { + await Promise.all(taskPromises) + taskPromises = [] + } + } + resolve() + }) } function getFrameInformation(imageId) { diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/getModalityUnit.js b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/getModalityUnit.js index b99cd059..adbe5589 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/getModalityUnit.js +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/getModalityUnit.js @@ -15,7 +15,6 @@ function getModalityUnit( } function _handlePTModality(imageId, options) { - console.log(imageId, options) if (!options.isPreScaled) { return 'raw' } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue index 7e7802bf..800d8694 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue @@ -66,8 +66,8 @@
- -
+ +
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..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(',') @@ -340,7 +349,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) { @@ -386,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 })` }} + +
+ +