MRI-PDFF标准阅片时不可测量时,系统自动清空测量值及标注
parent
5d9adab706
commit
91bd50d565
|
@ -259,3 +259,11 @@ export function saveTableQuestionMark(param) {
|
|||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteTableQuestionMark(param) {
|
||||
return request({
|
||||
url: `/ReadingImageTask/deleteTableQuestionMark`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
v-if="readingTaskState!== 2"
|
||||
v-if="questionForm[isMeasurableId] && parseInt(questionForm[isMeasurableId]) === 1 && questionForm[qs.Id] && readingTaskState!== 2"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="saveAnnotation(qs)"
|
||||
|
@ -204,7 +204,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import { submitTableQuestion } from '@/api/trials'
|
||||
import { saveTableQuestionMark } from '@/api/reading'
|
||||
import { saveTableQuestionMark, deleteTableQuestionMark } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
export default {
|
||||
|
@ -272,7 +272,8 @@ export default {
|
|||
activeQuestionMark: '',
|
||||
markList: [],
|
||||
digitPlaces: 2,
|
||||
isMeasurableId: ''
|
||||
isMeasurableId: '',
|
||||
isExitsMarks: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -290,20 +291,19 @@ export default {
|
|||
methods: {
|
||||
async initForm() {
|
||||
this.isRender = false
|
||||
this.isMeasurableId = this.getQuestionId(1105)
|
||||
// const loading = this.$loading({ fullscreen: true })
|
||||
this.questions.forEach(item => {
|
||||
var val = this.answers[item.Id]
|
||||
if (item.DictionaryCode) {
|
||||
val = isNaN(parseInt(this.answers[item.Id])) ? this.answers[item.Id] : parseInt(this.answers[item.Id])
|
||||
}
|
||||
if (this.isBaseLineTask && item.QuestionMark === 7 && this.lesionType === 0) {
|
||||
val = 0
|
||||
}
|
||||
if (this.isBaseLineTask && item.QuestionMark === 7 && this.lesionType === 1) {
|
||||
val = 0
|
||||
if (item.Id === this.isMeasurableId && this.questionForm[item.Id] !== '') {
|
||||
// 不做处理?
|
||||
} else {
|
||||
this.$set(this.questionForm, item.Id, val)
|
||||
}
|
||||
|
||||
this.$set(this.questionForm, item.Id, val)
|
||||
})
|
||||
this.$set(this.questionForm, 'MeasureData', this.answers.MeasureData ? JSON.parse(this.answers.MeasureData) : '')
|
||||
this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '')
|
||||
|
@ -317,14 +317,17 @@ export default {
|
|||
this.lesionMark = this.getLesionName(this.orderMark, 1101)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
this.markList = []
|
||||
this.isExitsMarks = false
|
||||
if (this.answers.TableQuestionMarkList) {
|
||||
let arr = JSON.parse(this.answers.TableQuestionMarkList)
|
||||
arr.map(i=>{
|
||||
|
||||
if (i.MeasureData) {
|
||||
this.isExitsMarks = true
|
||||
}
|
||||
this.markList.push({tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1})
|
||||
})
|
||||
}
|
||||
this.isMeasurableId = this.getQuestionId(1105)
|
||||
|
||||
this.isRender = true
|
||||
// loading.close()
|
||||
},
|
||||
|
@ -669,15 +672,45 @@ export default {
|
|||
async handleSave() {
|
||||
const valid = await this.$refs.measurementForm.validate()
|
||||
if (!valid) return
|
||||
if (parseInt(this.questionForm[this.isMeasurableId]) === 1) {
|
||||
// 检验是否有标记为保存
|
||||
let i = this.markList.findIndex(i=>i.saveEnum === 0)
|
||||
if (i > -1) {
|
||||
this.$message.warning('请先保存标注信息!')
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 不可测量时,清空测量值,平均值
|
||||
const confirm = await this.$confirm(
|
||||
'是否确认不可测量?',
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
let l1Id = this.getQuestionId(1101)
|
||||
this.$set(this.questionForm, l1Id, '')
|
||||
let l2Id = this.getQuestionId(1102)
|
||||
this.$set(this.questionForm, l2Id, '')
|
||||
let l3Id = this.getQuestionId(1103)
|
||||
this.$set(this.questionForm, l3Id, '')
|
||||
let meanId = this.getQuestionId(1104)
|
||||
this.$set(this.questionForm, meanId, '')
|
||||
this.markList.forEach(i => {
|
||||
if (i.measureData && i.measureData.MeasureData) {
|
||||
this.isExitsMarks = true
|
||||
i.measureData = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
|
||||
try {
|
||||
if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && this.isExitsMarks) {
|
||||
await deleteTableQuestionMark({rowId: this.questionForm.RowId})
|
||||
}
|
||||
var answers = []
|
||||
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
|
||||
for (const k in this.questionForm) {
|
||||
|
@ -708,9 +741,15 @@ export default {
|
|||
const isMeasurable = this.getQuestionVal(1105)
|
||||
const mean = this.getQuestionVal(1104)
|
||||
this.$emit('resetQuestions', { isMeasurable, mean, saveTypeEnum: this.questionForm.saveTypeEnum,rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
this.$emit('close')
|
||||
// this.$emit('close')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && this.isExitsMarks) {
|
||||
// this.$emit('getReadingQuestionAndAnswer')
|
||||
this.isExitsMarks = false
|
||||
await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
}
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue