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