From 99bb9291235021403571b092739592b8dc7cd115 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 9 Sep 2024 14:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/components/IVUS/QuestionForm.vue | 44 --------------- .../dicoms/components/IVUS/QuestionList.vue | 53 ------------------- .../dicoms/components/OCT/QuestionForm.vue | 23 -------- .../dicoms/components/OCT/QuestionList.vue | 50 +---------------- 4 files changed, 1 insertion(+), 169 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue index 167aaa2b..530643a6 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue @@ -207,7 +207,6 @@ export default { lesionName: '', isCurrentTaskAdd: 'False', lesionMark: '', - deleteInfo: null, pictureBaseStr: '', digitPlaces: 2 } @@ -291,27 +290,6 @@ export default { return '' } }, - deleteLesionInfo() { - return new Promise((resolve, reject) => { - const loading = this.$loading({ fullscreen: true }) - var param = { - visitTaskId: this.visitTaskId, - questionId: this.parentQsId, - rowId: this.questionForm.RowId - } - deleteReadingRowAnswer(param) - .then(async res => { - if (res.IsSuccess) { - DicomEvent.$emit('getReportInfo', true) - } - loading.close() - resolve() - }).catch(() => { - loading.close() - reject() - }) - }) - }, async formItemChange(v, question) { if (this.questionForm.RowId) { this.$set(this.questionForm, 'saveTypeEnum', 1) @@ -387,23 +365,6 @@ export default { return '' } }, - setDeleteInfo(deleteInfo) { - this.deleteInfo = deleteInfo - }, - deleteOldLesion(questionId, rowId) { - return new Promise((resolve, reject) => { - var param = { - visitTaskId: this.visitTaskId, - questionId: questionId, - rowId: rowId - } - deleteReadingRowAnswer(param) - .then(async res => { - resolve() - }).catch(() => { - }) - }) - }, async handleSave() { const valid = await this.$refs.measurementForm.validate() if (!valid) return @@ -427,11 +388,6 @@ export default { trialId: this.trialId, answerList: answers } - if (this.deleteInfo) { - await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId) - this.deleteInfo = null - params.rowId = '' - } const res = await submitTableQuestion(params) if (res.IsSuccess) { // 保存成功! diff --git a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue index 6f43e69f..b05fb7e2 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue @@ -104,7 +104,6 @@ :reading-task-state="readingTaskState" :is-base-line-task="isBaseLineTask" @getReadingQuestionAndAnswer="getReadingQuestionAndAnswer" - @determineExistsUnsavedLession="determineExistsUnsavedLession" @resetQuestions="resetQuestions" @close="close" /> @@ -276,10 +275,6 @@ export default { this.setCollapseActive(measureData) console.log('setCollapseActive') }) - DicomEvent.$on('changeLesionType', (questionsObj) => { - this.changeLesionType(questionsObj) - console.log('changeLesionType') - }) DicomEvent.$on('getAllUnSaveLesions', (callback) => { callback([]) }) @@ -291,7 +286,6 @@ export default { }, beforeDestroy() { DicomEvent.$off('setCollapseActive') - DicomEvent.$off('changeLesionType') DicomEvent.$off('getUnSaveTarget') DicomEvent.$off('refreshQuestions') }, @@ -512,10 +506,6 @@ export default { return 0 } }, - determineExistsUnsavedLession(callback) { - callback(true) - return - }, getLesionName(orderMark, rowIndex) { var lessionName = '' var rowIndexArr = rowIndex.split('.') @@ -545,49 +535,6 @@ export default { e.stopPropagation() e.preventDefault() }, - // 更改病灶类型 - async changeLesionType(questionsObj) { - await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId }) - // saveTypeEnum: 0 - var lesionObj = { } - var questionObj = questionsObj.questionForm - // 切换到新的病灶集合 - var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType) - var maxIndex = this.getMaxRowIndex(targetObj.TableQuestions.Answers) - lesionObj.RowIndex = `${maxIndex + 1}.00` - targetObj.TableQuestions.Questions.forEach(i => { - var obj = questionObj.find(v => v.QuestionMark === i.QuestionMark) - if (obj) { - lesionObj[i.Id] = obj.Answer - } - }) - - var deleteInfo = null - if (questionsObj.rowId) { - deleteInfo = { rowId: questionsObj.rowId, questionId: questionsObj.questionId } - lesionObj.RowId = questionsObj.rowId - } - await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: questionsObj.newLesionType, visitTaskId: this.visitTaskId, lesionObj: lesionObj }) - - this.activeItem.activeRowIndex = String(lesionObj.RowIndex) - this.activeItem.activeCollapseId = targetObj.Id - this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}` - const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}` - this.$nextTick(() => { - if (deleteInfo) { - this.$refs[refName][0].setDeleteInfo(deleteInfo) - } - }) - }, - removeQuestionAnswer(questionsObj) { - // 移除当前病灶 - var currentObj = this.tableQuestions.find(item => item.LesionType === questionsObj.oldLesionType) - if (currentObj) { - var i = currentObj.TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(questionsObj.rowIndex)) - if (i === -1) return - currentObj.TableQuestions.Answers.splice(i, 1) - } - }, setCollapseActive(measureData) { }, diff --git a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionForm.vue b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionForm.vue index 9babf325..62eea096 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionForm.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionForm.vue @@ -207,7 +207,6 @@ export default { lesionName: '', isCurrentTaskAdd: 'False', lesionMark: '', - deleteInfo: null, pictureBaseStr: '', digitPlaces: 2 } @@ -387,23 +386,6 @@ export default { return '' } }, - setDeleteInfo(deleteInfo) { - this.deleteInfo = deleteInfo - }, - deleteOldLesion(questionId, rowId) { - return new Promise((resolve, reject) => { - var param = { - visitTaskId: this.visitTaskId, - questionId: questionId, - rowId: rowId - } - deleteReadingRowAnswer(param) - .then(async res => { - resolve() - }).catch(() => { - }) - }) - }, async handleSave() { const valid = await this.$refs.measurementForm.validate() if (!valid) return @@ -427,11 +409,6 @@ export default { trialId: this.trialId, answerList: answers } - if (this.deleteInfo) { - await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId) - this.deleteInfo = null - params.rowId = '' - } const res = await submitTableQuestion(params) if (res.IsSuccess) { // 保存成功! diff --git a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue index 23bc2499..06caf8a6 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue @@ -275,10 +275,6 @@ export default { this.setCollapseActive(measureData) console.log('setCollapseActive') }) - DicomEvent.$on('changeLesionType', (questionsObj) => { - this.changeLesionType(questionsObj) - console.log('changeLesionType') - }) DicomEvent.$on('getAllUnSaveLesions', (callback) => { callback([]) }) @@ -290,7 +286,6 @@ export default { }, beforeDestroy() { DicomEvent.$off('setCollapseActive') - DicomEvent.$off('changeLesionType') DicomEvent.$off('getUnSaveTarget') DicomEvent.$off('refreshQuestions') }, @@ -552,49 +547,6 @@ export default { e.stopPropagation() e.preventDefault() }, - // 更改病灶类型 - async changeLesionType(questionsObj) { - await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId }) - // saveTypeEnum: 0 - var lesionObj = { } - var questionObj = questionsObj.questionForm - // 切换到新的病灶集合 - var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType) - var maxIndex = this.getMaxRowIndex(targetObj.TableQuestions.Answers) - lesionObj.RowIndex = `${maxIndex + 1}.00` - targetObj.TableQuestions.Questions.forEach(i => { - var obj = questionObj.find(v => v.QuestionMark === i.QuestionMark) - if (obj) { - lesionObj[i.Id] = obj.Answer - } - }) - - var deleteInfo = null - if (questionsObj.rowId) { - deleteInfo = { rowId: questionsObj.rowId, questionId: questionsObj.questionId } - lesionObj.RowId = questionsObj.rowId - } - await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: questionsObj.newLesionType, visitTaskId: this.visitTaskId, lesionObj: lesionObj }) - - this.activeItem.activeRowIndex = String(lesionObj.RowIndex) - this.activeItem.activeCollapseId = targetObj.Id - this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}` - const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}` - this.$nextTick(() => { - if (deleteInfo) { - this.$refs[refName][0].setDeleteInfo(deleteInfo) - } - }) - }, - removeQuestionAnswer(questionsObj) { - // 移除当前病灶 - var currentObj = this.tableQuestions.find(item => item.LesionType === questionsObj.oldLesionType) - if (currentObj) { - var i = currentObj.TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(questionsObj.rowIndex)) - if (i === -1) return - currentObj.TableQuestions.Answers.splice(i, 1) - } - }, setCollapseActive(measureData) { }, @@ -634,7 +586,7 @@ export default { answers: answers } try { - await saveTaskQuestion(8, params) + // await saveTaskQuestion(8, params) this.$message.success(this.$t('common:message:savedSuccessfully')) loading.close() DicomEvent.$emit('getReportInfo', true)