-
+
{{ item.TableQuestions.Answers[i].area1 }}m㎡
-
+
{{ item.TableQuestions.Answers[i].area2 }}m㎡
-
+
{{ item.TableQuestions.Answers[i].diff }}m㎡
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 854448c4..9babf325 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
@@ -18,30 +18,6 @@
-
-
{formItemChange(val, qs)})"
@blur="limitBlur(qs.Id, qs.ValueType)"
>
-
+
@@ -315,96 +291,65 @@ export default {
return ''
}
},
- async lesionTypeChange(v) {
- this.$emit('determineExistsUnsavedLession', async val => {
- if (val) {
- // 判断是否超过该病灶类型个数的最大值
- var idx = this.tableQuestions.findIndex(item => item.LesionType === v)
- if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
- let msg = this.$t('trials:reading:warnning:msg14')
- // msg = msg.replace('xxx', this.tableQuestions[idx].QuestionName)
- msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
- this.$confirm(msg, {
- type: 'warning',
- showCancelButton: false,
- callback: action => {}
- })
- this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
- return
- }
-
- var arr = []
- this.questionForm[this.getQuestionId(1001)] = ''
- this.questionForm[this.getQuestionId(1002)] = ''
- this.questionForm[this.getQuestionId(1003)] = ''
- this.questions.forEach(item => {
- item.Answer = this.questionForm[item.Id] ? this.questionForm[item.Id] : ''
- arr.push(item)
- })
- var type = null
- if (this.questionForm.RowId) {
- type = 1
- } else {
- type = 0
- }
- DicomEvent.$emit('changeLesionType', { questionForm: arr, oldLesionType: this.lesionType, newLesionType: v, rowIndex: this.questionForm.RowIndex, questionId: this.parentQsId, measureData: this.questionForm.MeasureData, type, rowId: this.questionForm.RowId })
- } else {
- this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
- }
- })
- },
- 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)
} else {
this.$set(this.questionForm, 'saveTypeEnum', 0)
}
- if (question.QuestionMark === 1001 || question.QuestionMark === 1002) {
- this.questionForm[this.getQuestionId(1003)] = this.calculate([1001, 1002], '-')
+ if (question.QuestionMark === 1011 || question.QuestionMark === 1012 || question.QuestionMark === 1013) {
+ // 最小值
+ this.questionForm[this.getQuestionId(1014)] = this.calculate([1011, 1012, 1013], 'min')
+ // 平均值
+ this.questionForm[this.getQuestionId(1015)] = this.calculate([1011, 1012, 1013], 'avg')
}
- this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
+ let l1, l2, l3, min, mean, angle
+ if (this.lesionType === 101) {
+ l1 = this.getQuestionVal(1011)
+ l2 = this.getQuestionVal(1012)
+ l3 = this.getQuestionVal(1013)
+ min = this.getQuestionVal(1014)
+ mean = this.getQuestionVal(1015)
+ } else if (this.lesionType === 103) {
+ angle = this.getQuestionVal(1016)
+ }
+ this.$emit('resetQuestions', { l1, l2, l3, min, mean, angle, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
},
calculate(qsMarkArr, type) {
var num = 0
- qsMarkArr.map((qsmark, i) => {
+ const arr = []
+ for (let i = 0; i < qsMarkArr.length; i++) {
+ const mark = qsMarkArr[i]
+ let v = this.questionForm[this.getQuestionId(mark)]
+ if (isNaN(parseFloat(v))) {
+ num = null
+ break
+ }
+ v = parseFloat(v)
if (i === 0) {
- const v = this.questionForm[this.getQuestionId(qsmark)]
- num = isNaN(parseFloat(v)) ? 0 : parseFloat(v)
+ num = v
+ arr.push(v)
} else {
- const v = this.questionForm[this.getQuestionId(qsmark)]
switch (type) {
- case '-':
- num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v)
+ case 'min':
+ num = num > v ? v : num
+ break
+ case 'avg':
+ arr.push(v)
+ if (arr.length === qsMarkArr.length) {
+ num = arr.reduce((acc, curr) => {
+ return acc + curr
+ }, 0) / arr.length
+ }
break
}
}
- })
- return parseFloat(num).toFixed(this.digitPlaces)
+ }
+
+ return num === null ? num : num.toFixed(this.digitPlaces)
},
limitBlur(qId, valueType) {
- const value = isNaN(parseFloat(this.questionForm[qId])) ? null : parseFloat(this.questionForm[qId])
- if (value === null) return
+ const value = this.questionForm[qId]
if (valueType === 0) {
this.$set(this.questionForm, qId, parseInt(value))
} else if (valueType === 3) {
@@ -494,7 +439,17 @@ export default {
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
this.$set(this.questionForm, 'RowId', res.Result.RowId)
- this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
+ let l1, l2, l3, min, mean, angle
+ if (this.lesionType === 101) {
+ l1 = this.getQuestionVal(1011)
+ l2 = this.getQuestionVal(1012)
+ l3 = this.getQuestionVal(1013)
+ min = this.getQuestionVal(1014)
+ mean = this.getQuestionVal(1015)
+ } else if (this.lesionType === 103) {
+ angle = this.getQuestionVal(1016)
+ }
+ this.$emit('resetQuestions', { l1, l2, l3, min, mean, angle, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$emit('close')
DicomEvent.$emit('refreshQuestions')
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 25e613c2..3ca1d668 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
@@ -73,6 +73,19 @@
+
+
+
+ min: {{ item.TableQuestions.Answers[i].min }}μm
+
+
+ mean: {{ item.TableQuestions.Answers[i].mean }}μm
+
+
+ {{ item.TableQuestions.Answers[i].angle }}°
+
+
+
@@ -91,7 +104,6 @@
:reading-task-state="readingTaskState"
:is-base-line-task="isBaseLineTask"
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
- @determineExistsUnsavedLession="determineExistsUnsavedLession"
@resetQuestions="resetQuestions"
@close="close"
/>
@@ -349,7 +361,15 @@ export default {
if (item.Type === 'table' && item.Id === obj.questionId) {
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum
-
+ if (item.LesionType === 101) {
+ item.TableQuestions.Answers[idx].l1 = obj.l1
+ item.TableQuestions.Answers[idx].l2 = obj.l2
+ item.TableQuestions.Answers[idx].l3 = obj.l3
+ item.TableQuestions.Answers[idx].min = obj.min
+ item.TableQuestions.Answers[idx].mean = obj.mean
+ } else if (item.LesionType === 103) {
+ item.TableQuestions.Answers[idx].angle = obj.angle
+ }
for (const i in obj.anwsers) {
item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i])
}
@@ -364,8 +384,14 @@ export default {
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
item.TableQuestions.Answers.forEach(answerObj => {
if (answerObj.RowId) {
- var diffVal = this.getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj)
- this.$set(answerObj, 'saveTypeEnum', isNaN(parseFloat(diffVal)) ? 1 : 2)
+ if (item.LesionType === 101) {
+ var min = this.getQuestionAnswer(item.TableQuestions.Questions, 1014, answerObj)
+ var mean = this.getQuestionAnswer(item.TableQuestions.Questions, 1015, answerObj)
+ this.$set(answerObj, 'saveTypeEnum', (isNaN(parseFloat(min)) || isNaN(parseFloat(mean))) ? 1 : 2)
+ } else if (item.LesionType === 103) {
+ var angle = this.getQuestionAnswer(item.TableQuestions.Questions, 1016, answerObj)
+ this.$set(answerObj, 'saveTypeEnum', isNaN(parseFloat(angle)) ? 1 : 2)
+ }
} else {
this.$set(answerObj, 'saveTypeEnum', 0)
}
@@ -497,10 +523,6 @@ export default {
return 0
}
},
- determineExistsUnsavedLession(callback) {
- callback(true)
- return
- },
getLesionName(orderMark, rowIndex) {
var lessionName = ''
var rowIndexArr = rowIndex.split('.')
@@ -623,6 +645,7 @@ export default {
async close(questionsObj) {
if (questionsObj) {
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
+ this.refreshQuestions()
}
this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null