阅片工具及报告页查看pdf更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
032150904e
commit
032e710890
|
@ -18,7 +18,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="qs in questions"
|
v-for="qs in questions"
|
||||||
v-show="qs.ShowQuestion!==2"
|
v-show="qs.ShowQuestion!==2"
|
||||||
|
@ -51,35 +50,35 @@
|
||||||
type="text"
|
type="text"
|
||||||
@click="addAnnotation(qs)"
|
@click="addAnnotation(qs)"
|
||||||
>
|
>
|
||||||
{{$t('trials:MRIPDFF:button:measure')}}
|
{{ $t('trials:MRIPDFF:button:measure') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 清除标记 -->
|
<!-- 清除标记 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="getAnnotationStatus(qs) && readingTaskState!== 2"
|
v-if="getAnnotationStatus(qs) && readingTaskState!== 2"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="removeAnnotation(qs)"
|
|
||||||
style="margin-left: 0px"
|
style="margin-left: 0px"
|
||||||
|
@click="removeAnnotation(qs)"
|
||||||
>
|
>
|
||||||
{{$t('trials:MRIPDFF:button:clear')}}
|
{{ $t('trials:MRIPDFF:button:clear') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 返回 -->
|
<!-- 返回 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="questionForm[qs.Id]"
|
v-if="questionForm[qs.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="locateAnnotation(qs)"
|
|
||||||
style="margin-left: 0px"
|
style="margin-left: 0px"
|
||||||
|
@click="locateAnnotation(qs)"
|
||||||
>
|
>
|
||||||
{{$t('trials:MRIPDFF:button:return')}}
|
{{ $t('trials:MRIPDFF:button:return') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="questionForm[isMeasurableId] && parseInt(questionForm[isMeasurableId]) === 1 && questionForm[qs.Id] && 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)"
|
|
||||||
style="margin-left: 0px"
|
style="margin-left: 0px"
|
||||||
|
@click="saveAnnotation(qs)"
|
||||||
>
|
>
|
||||||
<!-- 未保存 -->
|
<!-- 未保存 -->
|
||||||
<el-tooltip v-if="getAnnotationSaveEnum(qs) === 0" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
<el-tooltip v-if="getAnnotationSaveEnum(qs) === 0" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||||
|
@ -279,7 +278,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId
|
||||||
let digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
this.initForm()
|
this.initForm()
|
||||||
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
||||||
|
@ -295,26 +294,29 @@ export default {
|
||||||
this.isMeasurableId = this.getQuestionId(1105)
|
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]
|
if (this.answers.hasOwnProperty(item.Id)) {
|
||||||
if (item.DictionaryCode) {
|
let val = this.answers[item.Id]
|
||||||
val = isNaN(parseInt(this.answers[item.Id])) ? this.answers[item.Id] : parseInt(this.answers[item.Id])
|
if (item.DictionaryCode) {
|
||||||
|
val = isNaN(parseInt(this.answers[item.Id])) ? this.answers[item.Id] : parseInt(this.answers[item.Id])
|
||||||
|
}
|
||||||
|
this.$set(this.questionForm, item.Id, val)
|
||||||
|
} else {
|
||||||
|
this.$set(this.questionForm, item.Id, '')
|
||||||
}
|
}
|
||||||
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 : '')
|
||||||
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
||||||
// 如果存在标记且是否可测量为否,则将是否可测量更改为是
|
// 如果存在标记且是否可测量为否,则将是否可测量更改为是
|
||||||
if (this.isCurrentTask && this.readingTaskState < 2) {
|
if (this.isCurrentTask && this.readingTaskState < 2) {
|
||||||
let arr = JSON.parse(this.answers.TableQuestionMarkList)
|
const arr = JSON.parse(this.answers.TableQuestionMarkList)
|
||||||
let isExitsMarks = arr.findIndex(i=>i.MeasureData) > -1
|
const isExitsMarks = arr.findIndex(i => i.MeasureData) > -1
|
||||||
if (isExitsMarks && parseInt(this.questionForm[this.isMeasurableId]) === 0) {
|
if (isExitsMarks && parseInt(this.questionForm[this.isMeasurableId]) === 0) {
|
||||||
this.$set(this.questionForm, this.isMeasurableId, 1)
|
this.$set(this.questionForm, this.isMeasurableId, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||||
let isMeasurable = this.getQuestionVal(1105)
|
const isMeasurable = this.getQuestionVal(1105)
|
||||||
const mean = this.getQuestionVal(1104)
|
const mean = this.getQuestionVal(1104)
|
||||||
if (this.questionForm.saveTypeEnum !== 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
if (this.questionForm.saveTypeEnum !== 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', parseInt(isMeasurable) === 1 && isNaN(parseFloat(mean)) ? 1 : 2)
|
this.$set(this.questionForm, 'saveTypeEnum', parseInt(isMeasurable) === 1 && isNaN(parseFloat(mean)) ? 1 : 2)
|
||||||
|
@ -325,11 +327,11 @@ export default {
|
||||||
this.markList = []
|
this.markList = []
|
||||||
this.isExitsMarks = false
|
this.isExitsMarks = false
|
||||||
this.isDisabledMeasurableRadio = false
|
this.isDisabledMeasurableRadio = false
|
||||||
let seg = this.getQuestionVal(1106)
|
const seg = this.getQuestionVal(1106)
|
||||||
this.liverSeg = this.$fd('LiverSegmentation', seg)
|
this.liverSeg = this.$fd('LiverSegmentation', seg)
|
||||||
if (this.answers.TableQuestionMarkList) {
|
if (this.answers.TableQuestionMarkList) {
|
||||||
let arr = JSON.parse(this.answers.TableQuestionMarkList)
|
const arr = JSON.parse(this.answers.TableQuestionMarkList)
|
||||||
arr.map(i=>{
|
arr.map(i => {
|
||||||
if (i.MeasureData) {
|
if (i.MeasureData) {
|
||||||
this.isExitsMarks = true
|
this.isExitsMarks = true
|
||||||
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
||||||
|
@ -337,14 +339,14 @@ export default {
|
||||||
}
|
}
|
||||||
i.MeasureData = JSON.parse(i.MeasureData)
|
i.MeasureData = JSON.parse(i.MeasureData)
|
||||||
}
|
}
|
||||||
this.markList.push({tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1})
|
this.markList.push({ tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1 })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let newMean = this.getMean()
|
const newMean = this.getMean()
|
||||||
if (newMean !== mean) {
|
if (newMean !== mean) {
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, newMean ? newMean : '')
|
this.$set(this.questionForm, meanId, newMean || '')
|
||||||
}
|
}
|
||||||
if (this.questionForm.saveTypeEnum === 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
if (this.questionForm.saveTypeEnum === 1 && this.isCurrentTask && this.readingTaskState < 2) {
|
||||||
this.setQuestions()
|
this.setQuestions()
|
||||||
|
@ -357,13 +359,13 @@ export default {
|
||||||
// I II III IV V VI VII VIII
|
// I II III IV V VI VII VIII
|
||||||
// L-I-01 L-I-02 L-I-03
|
// L-I-01 L-I-02 L-I-03
|
||||||
// L-II-01 L-II-02 L-II-03
|
// L-II-01 L-II-02 L-II-03
|
||||||
let segArr = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII']
|
const segArr = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII']
|
||||||
let lessionName = ''
|
let lessionName = ''
|
||||||
let segmentId = this.getQuestionId(1106)
|
const segmentId = this.getQuestionId(1106)
|
||||||
let segmentVal = this.answers[segmentId]
|
let segmentVal = this.answers[segmentId]
|
||||||
segmentVal = segmentVal ? parseInt(segmentVal) : null
|
segmentVal = segmentVal ? parseInt(segmentVal) : null
|
||||||
if (segmentVal) {
|
if (segmentVal) {
|
||||||
let i = questionMark === 1101 ? '01' : questionMark === 1102 ? '02' : questionMark === 1103 ? '03' : ''
|
const i = questionMark === 1101 ? '01' : questionMark === 1102 ? '02' : questionMark === 1103 ? '03' : ''
|
||||||
lessionName = `${orderMark}-${segArr[segmentVal - 1]}-${i}`
|
lessionName = `${orderMark}-${segArr[segmentVal - 1]}-${i}`
|
||||||
}
|
}
|
||||||
return lessionName
|
return lessionName
|
||||||
|
@ -397,18 +399,18 @@ export default {
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||||
const mean = this.getQuestionVal(1104)
|
const mean = this.getQuestionVal(1104)
|
||||||
if (qs.QuestionMark === 1101 || qs.QuestionMark === 1102 || qs.QuestionMark === 1103) {
|
if (qs.QuestionMark === 1101 || qs.QuestionMark === 1102 || qs.QuestionMark === 1103) {
|
||||||
let newMean = this.getMean()
|
const newMean = this.getMean()
|
||||||
if (newMean !== mean) {
|
if (newMean !== mean) {
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, newMean ? newMean : '')
|
this.$set(this.questionForm, meanId, newMean || '')
|
||||||
}
|
}
|
||||||
} else if (qs.QuestionMark === 1105) {
|
} else if (qs.QuestionMark === 1105) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, 'NE')
|
this.$set(this.questionForm, meanId, 'NE')
|
||||||
} else {
|
} else {
|
||||||
let mean = this.getMean()
|
const mean = this.getMean()
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, mean)
|
this.$set(this.questionForm, meanId, mean)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,10 +420,10 @@ export default {
|
||||||
let mean = null
|
let mean = null
|
||||||
let isMeasurable = this.getQuestionVal(1105)
|
let isMeasurable = this.getQuestionVal(1105)
|
||||||
isMeasurable = !isNaN(parseInt(isMeasurable)) ? parseInt(isMeasurable) : null
|
isMeasurable = !isNaN(parseInt(isMeasurable)) ? parseInt(isMeasurable) : null
|
||||||
let l1 = this.getQuestionVal(1101)
|
const l1 = this.getQuestionVal(1101)
|
||||||
let l2 = this.getQuestionVal(1102)
|
const l2 = this.getQuestionVal(1102)
|
||||||
let l3 = this.getQuestionVal(1103)
|
const l3 = this.getQuestionVal(1103)
|
||||||
if ( isMeasurable && !isNaN(parseFloat(l1)) && !isNaN(parseFloat(l2)) && !isNaN(parseFloat(l3))) {
|
if (isMeasurable && !isNaN(parseFloat(l1)) && !isNaN(parseFloat(l2)) && !isNaN(parseFloat(l3))) {
|
||||||
const sum = l1 + l2 + l3
|
const sum = l1 + l2 + l3
|
||||||
mean = sum / 3
|
mean = sum / 3
|
||||||
return parseFloat(mean.toFixed(this.digitPlaces))
|
return parseFloat(mean.toFixed(this.digitPlaces))
|
||||||
|
@ -442,7 +444,7 @@ export default {
|
||||||
// 维护标记信息
|
// 维护标记信息
|
||||||
measureData.data.remark = this.getLesionName(this.orderMark, this.activeQuestionMark)
|
measureData.data.remark = this.getLesionName(this.orderMark, this.activeQuestionMark)
|
||||||
}
|
}
|
||||||
let val = measureData.data.cachedStats.mean / 10
|
const val = measureData.data.cachedStats.mean / 10
|
||||||
this.$set(this.questionForm, measureData.tableQuestionId, val.toFixed(this.digitPlaces))
|
this.$set(this.questionForm, measureData.tableQuestionId, val.toFixed(this.digitPlaces))
|
||||||
data = {
|
data = {
|
||||||
Id: '',
|
Id: '',
|
||||||
|
@ -461,17 +463,17 @@ export default {
|
||||||
}
|
}
|
||||||
store.dispatch('reading/addMeasuredData', { visitTaskId: this.visitTaskId, data: data })
|
store.dispatch('reading/addMeasuredData', { visitTaskId: this.visitTaskId, data: data })
|
||||||
let mean = this.getQuestionVal(1104)
|
let mean = this.getQuestionVal(1104)
|
||||||
let newMean = this.getMean()
|
const newMean = this.getMean()
|
||||||
if (newMean !== mean) {
|
if (newMean !== mean) {
|
||||||
mean = newMean
|
mean = newMean
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, newMean ? newMean : '')
|
this.$set(this.questionForm, meanId, newMean || '')
|
||||||
}
|
}
|
||||||
const isMeasurable = this.getQuestionVal(1105)
|
const isMeasurable = this.getQuestionVal(1105)
|
||||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === measureData.tableQuestionId)
|
const i = this.markList.findIndex(i => i.tableQuestionId === measureData.tableQuestionId)
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
this.markList.push({tableQuestionId: measureData.tableQuestionId, measureData: data, saveEnum: 0})
|
this.markList.push({ tableQuestionId: measureData.tableQuestionId, measureData: data, saveEnum: 0 })
|
||||||
} else {
|
} else {
|
||||||
this.markList[i].saveEnum = 0
|
this.markList[i].saveEnum = 0
|
||||||
this.markList[i].measureData = data
|
this.markList[i].measureData = data
|
||||||
|
@ -486,19 +488,19 @@ export default {
|
||||||
},
|
},
|
||||||
addAnnotation(qs) {
|
addAnnotation(qs) {
|
||||||
// 判断是否有测量数据未保存
|
// 判断是否有测量数据未保存
|
||||||
let i = this.markList.findIndex(i=>i.saveEnum === 0)
|
const i = this.markList.findIndex(i => i.saveEnum === 0)
|
||||||
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
||||||
this.$alert(this.$t('trials:MRIPDFF:message:message3'))
|
this.$alert(this.$t('trials:MRIPDFF:message:message3'))
|
||||||
// this.$message.warning(this.$t('trials:MRIPDFF:message:message3'))
|
// this.$message.warning(this.$t('trials:MRIPDFF:message:message3'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let orderMarkName = this.getLesionName(this.orderMark, qs.QuestionMark)
|
const orderMarkName = this.getLesionName(this.orderMark, qs.QuestionMark)
|
||||||
this.activeQuestionId = qs.Id
|
this.activeQuestionId = qs.Id
|
||||||
this.activeQuestionMark= qs.QuestionMark
|
this.activeQuestionMark = qs.QuestionMark
|
||||||
DicomEvent.$emit('addAnnotation', {question: qs, locateInfo: { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: orderMarkName, lesionType: null, markTool: 'Probe', readingTaskState: this.readingTaskState, isMarked: true }})
|
DicomEvent.$emit('addAnnotation', { question: qs, locateInfo: { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: orderMarkName, lesionType: null, markTool: 'Probe', readingTaskState: this.readingTaskState, isMarked: true }})
|
||||||
},
|
},
|
||||||
getAnnotationSaveEnum(qs) {
|
getAnnotationSaveEnum(qs) {
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
return this.markList[i].saveEnum
|
return this.markList[i].saveEnum
|
||||||
} else {
|
} else {
|
||||||
|
@ -506,7 +508,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAnnotationStatus(qs) {
|
getAnnotationStatus(qs) {
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
@ -516,14 +518,13 @@ export default {
|
||||||
getIsExitsMarks() {
|
getIsExitsMarks() {
|
||||||
const isMeasurable = this.getQuestionVal(1105)
|
const isMeasurable = this.getQuestionVal(1105)
|
||||||
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1) {
|
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1) {
|
||||||
return this.markList.findIndex(i=>i.measureData && i.measureData.MeasureData) > -1 ? true : false
|
return this.markList.findIndex(i => i.measureData && i.measureData.MeasureData) > -1
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async removeAnnotation(qs) {
|
async removeAnnotation(qs) {
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
DicomEvent.$emit('imageLocation', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.markList[i].measureData.OrderMarkName, lesionType: null, markTool: 'Probe', readingTaskState: this.readingTaskState, isMarked: true })
|
DicomEvent.$emit('imageLocation', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.markList[i].measureData.OrderMarkName, lesionType: null, markTool: 'Probe', readingTaskState: this.readingTaskState, isMarked: true })
|
||||||
// 是否确认清除标记?
|
// 是否确认清除标记?
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
|
@ -535,26 +536,26 @@ export default {
|
||||||
)
|
)
|
||||||
if (confirm !== 'confirm') return
|
if (confirm !== 'confirm') return
|
||||||
|
|
||||||
let measureData = Object.assign({}, this.markList[i].measureData)
|
const measureData = Object.assign({}, this.markList[i].measureData)
|
||||||
if (measureData.Id) {
|
if (measureData.Id) {
|
||||||
await deleteSingleTableQuestionMark({Id: measureData.Id}, 11)
|
await deleteSingleTableQuestionMark({ Id: measureData.Id }, 11)
|
||||||
}
|
}
|
||||||
// 移除缓存中的measureData
|
// 移除缓存中的measureData
|
||||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: measureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: measureData.OrderMarkName})
|
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: measureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: measureData.OrderMarkName })
|
||||||
DicomEvent.$emit('getMeasureData')
|
DicomEvent.$emit('getMeasureData')
|
||||||
this.markList[i].measureData = null
|
this.markList[i].measureData = null
|
||||||
this.markList[i].saveEnum = 0
|
this.markList[i].saveEnum = 0
|
||||||
// 清除测量值、清除平均值
|
// 清除测量值、清除平均值
|
||||||
this.$set(this.questionForm, this.markList[i].tableQuestionId, '')
|
this.$set(this.questionForm, this.markList[i].tableQuestionId, '')
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, '')
|
this.$set(this.questionForm, meanId, '')
|
||||||
this.isDisabledMeasurableRadio = this.getIsExitsMarks()
|
this.isDisabledMeasurableRadio = this.getIsExitsMarks()
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||||
this.setQuestions()
|
this.setQuestions()
|
||||||
},
|
},
|
||||||
locateAnnotation(qs) {
|
locateAnnotation(qs) {
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
let measureData = this.markList[i].measureData
|
const measureData = this.markList[i].measureData
|
||||||
// 定位
|
// 定位
|
||||||
var markTool = 'Probe'
|
var markTool = 'Probe'
|
||||||
var readingTaskState = this.readingTaskState
|
var readingTaskState = this.readingTaskState
|
||||||
|
@ -569,18 +570,18 @@ export default {
|
||||||
async saveAnnotation(qs) {
|
async saveAnnotation(qs) {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
try {
|
try {
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
let params = {}
|
let params = {}
|
||||||
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
|
||||||
let measureData = this.markList[i].measureData.MeasureData
|
const measureData = this.markList[i].measureData.MeasureData
|
||||||
// 上传截图
|
// 上传截图
|
||||||
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: measureData.OrderMarkName, lesionType: null, isMarked: !!measureData }, async val => {
|
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: measureData.OrderMarkName, lesionType: null, isMarked: !!measureData }, async val => {
|
||||||
params = Object.assign({}, this.markList[i].measureData)
|
params = Object.assign({}, this.markList[i].measureData)
|
||||||
if (val) {
|
if (val) {
|
||||||
let pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
|
const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
|
||||||
params.PicturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
params.PicturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||||
}
|
}
|
||||||
let tableQuestionId = this.markList[i].tableQuestionId
|
const tableQuestionId = this.markList[i].tableQuestionId
|
||||||
params.Answer = this.questionForm[tableQuestionId]
|
params.Answer = this.questionForm[tableQuestionId]
|
||||||
params.MeasureData = JSON.stringify(this.markList[i].measureData.MeasureData)
|
params.MeasureData = JSON.stringify(this.markList[i].measureData.MeasureData)
|
||||||
loading.close()
|
loading.close()
|
||||||
|
@ -588,13 +589,13 @@ export default {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
params = {
|
params = {
|
||||||
Answer: "",
|
Answer: '',
|
||||||
VisitTaskId: this.visitTaskId,
|
VisitTaskId: this.visitTaskId,
|
||||||
QuestionId: this.parentQsId,
|
QuestionId: this.parentQsId,
|
||||||
InstanceId: '',
|
InstanceId: '',
|
||||||
SeriesId: '',
|
SeriesId: '',
|
||||||
StudyId: '',
|
StudyId: '',
|
||||||
MarkTool:'',
|
MarkTool: '',
|
||||||
PicturePath: '',
|
PicturePath: '',
|
||||||
NumberOfFrames: 0,
|
NumberOfFrames: 0,
|
||||||
MeasureData: '',
|
MeasureData: '',
|
||||||
|
@ -607,9 +608,7 @@ export default {
|
||||||
loading.close()
|
loading.close()
|
||||||
this.saveTableQuestionInfo(params, qs)
|
this.saveTableQuestionInfo(params, qs)
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
} catch(e) {
|
|
||||||
console.log(e)
|
console.log(e)
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
|
@ -617,16 +616,16 @@ export default {
|
||||||
async saveTableQuestionInfo(params, qs) {
|
async saveTableQuestionInfo(params, qs) {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
try {
|
try {
|
||||||
let res = await saveTableQuestionMark(params, 11)
|
const res = await saveTableQuestionMark(params, 11)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 保存后设置保存状态
|
// 保存后设置保存状态
|
||||||
let i = this.markList.findIndex(i=>i.tableQuestionId === qs.Id)
|
const i = this.markList.findIndex(i => i.tableQuestionId === qs.Id)
|
||||||
this.markList[i].saveEnum = 1
|
this.markList[i].saveEnum = 1
|
||||||
// 保存病灶
|
// 保存病灶
|
||||||
let j = this.markList.findIndex(i=>!(i.saveEnum === 1 && i.measureData && i.measureData.MeasureData))
|
const j = this.markList.findIndex(i => !(i.saveEnum === 1 && i.measureData && i.measureData.MeasureData))
|
||||||
if (j === -1) {
|
if (j === -1) {
|
||||||
let answers = []
|
const answers = []
|
||||||
let 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}$/)
|
const 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) {
|
||||||
if (reg.test(k)) {
|
if (reg.test(k)) {
|
||||||
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||||
|
@ -634,7 +633,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let params = {
|
const params = {
|
||||||
questionId: this.parentQsId,
|
questionId: this.parentQsId,
|
||||||
rowId: this.questionForm.RowId,
|
rowId: this.questionForm.RowId,
|
||||||
rowIndex: this.answers.RowIndex,
|
rowIndex: this.answers.RowIndex,
|
||||||
|
@ -659,7 +658,7 @@ export default {
|
||||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
|
@ -735,43 +734,43 @@ export default {
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
try {
|
try {
|
||||||
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) {
|
if (parseInt(this.questionForm[this.isMeasurableId]) === 1) {
|
||||||
// 检验是否有标记为保存
|
// 检验是否有标记为保存
|
||||||
let i = this.markList.findIndex(i=>i.saveEnum === 0)
|
const i = this.markList.findIndex(i => i.saveEnum === 0)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
// 请先保存标注信息!
|
// 请先保存标注信息!
|
||||||
this.$alert(this.$t('trials:MRIPDFF:message:message1'))
|
this.$alert(this.$t('trials:MRIPDFF:message:message1'))
|
||||||
// this.$message.warning(this.$t('trials:MRIPDFF:message:message1'))
|
// this.$message.warning(this.$t('trials:MRIPDFF:message:message1'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 不可测量时,清空测量值,平均值
|
// 不可测量时,清空测量值,平均值
|
||||||
// '是否确认不可测量?'
|
// '是否确认不可测量?'
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
this.$t('trials:MRIPDFF:message:message2'),
|
this.$t('trials:MRIPDFF:message:message2'),
|
||||||
{
|
{
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (confirm !== 'confirm') return
|
if (confirm !== 'confirm') return
|
||||||
let l1Id = this.getQuestionId(1101)
|
const l1Id = this.getQuestionId(1101)
|
||||||
this.$set(this.questionForm, l1Id, '')
|
this.$set(this.questionForm, l1Id, '')
|
||||||
let l2Id = this.getQuestionId(1102)
|
const l2Id = this.getQuestionId(1102)
|
||||||
this.$set(this.questionForm, l2Id, '')
|
this.$set(this.questionForm, l2Id, '')
|
||||||
let l3Id = this.getQuestionId(1103)
|
const l3Id = this.getQuestionId(1103)
|
||||||
this.$set(this.questionForm, l3Id, '')
|
this.$set(this.questionForm, l3Id, '')
|
||||||
let meanId = this.getQuestionId(1104)
|
const meanId = this.getQuestionId(1104)
|
||||||
this.$set(this.questionForm, meanId, 'NE')
|
this.$set(this.questionForm, meanId, 'NE')
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// let isResetMarks = this.markList.findIndex(i=>i.measureData && i.measureData.MeasureData) > -1 ? true : false
|
// let isResetMarks = this.markList.findIndex(i=>i.measureData && i.measureData.MeasureData) > -1 ? true : false
|
||||||
if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && this.isExitsMarks) {
|
if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && this.isExitsMarks) {
|
||||||
await deleteTableQuestionMark({rowId: this.questionForm.RowId}, 11)
|
await deleteTableQuestionMark({ rowId: this.questionForm.RowId }, 11)
|
||||||
this.markList.forEach(i => {
|
this.markList.forEach(i => {
|
||||||
if (i.measureData && i.measureData.MeasureData) {
|
if (i.measureData && i.measureData.MeasureData) {
|
||||||
i.measureData = ''
|
i.measureData = ''
|
||||||
|
|
|
@ -337,16 +337,37 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
|
<!-- 预览文件 -->
|
||||||
|
<el-dialog
|
||||||
|
v-if="previewVisible"
|
||||||
|
:visible.sync="previewVisible"
|
||||||
|
:title="$t('common:button:preview')"
|
||||||
|
:fullscreen="true"
|
||||||
|
append-to-body
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="base-modal-body"
|
||||||
|
style="border: 2px solid #ccc; padding: 10px"
|
||||||
|
>
|
||||||
|
<PreviewFile
|
||||||
|
v-if="previewVisible"
|
||||||
|
:file-path="currentPath"
|
||||||
|
:file-type="currentType"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { uploadReadingAnswerImage, getTrialOrganList, deleteReadingRowAnswer, getCustomTableQuestionPreview, getQuestionCalculateRelation, submitTableQuestion } from '@/api/trials'
|
import { uploadReadingAnswerImage, getTrialOrganList, deleteReadingRowAnswer, getCustomTableQuestionPreview, getQuestionCalculateRelation, submitTableQuestion } from '@/api/trials'
|
||||||
import QuestionTableFormItem from './CustomizeQuestionTableFormItem'
|
import QuestionTableFormItem from './CustomizeQuestionTableFormItem'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
|
import PreviewFile from '@/components/PreviewFile/index'
|
||||||
import DicomEvent from './../components/DicomEvent'
|
import DicomEvent from './../components/DicomEvent'
|
||||||
export default {
|
export default {
|
||||||
name: 'CustomizeQuestionFormItem',
|
name: 'CustomizeQuestionFormItem',
|
||||||
components: { QuestionTableFormItem, BaseModel },
|
components: { QuestionTableFormItem, BaseModel, PreviewFile },
|
||||||
props: {
|
props: {
|
||||||
IsBaseline: {
|
IsBaseline: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -398,7 +419,10 @@ export default {
|
||||||
RowId: null,
|
RowId: null,
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
CalculationTabelList: [],
|
CalculationTabelList: [],
|
||||||
classArr: []
|
classArr: [],
|
||||||
|
previewVisible: false,
|
||||||
|
currentPath: '',
|
||||||
|
currentType: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -975,7 +999,10 @@ export default {
|
||||||
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||||
suffix = suffix ? suffix.toLowerCase() : ''
|
suffix = suffix ? suffix.toLowerCase() : ''
|
||||||
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||||
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
// window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||||
|
this.currentPath = file.url
|
||||||
|
this.currentType = suffix
|
||||||
|
this.previewVisible = true
|
||||||
}else{
|
}else{
|
||||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||||
this.imgVisible = true
|
this.imgVisible = true
|
||||||
|
|
|
@ -66,7 +66,8 @@ export default function(evt) {
|
||||||
draw(context, context => {
|
draw(context, context => {
|
||||||
// Configurable shadow
|
// Configurable shadow
|
||||||
setShadow(context, this.configuration)
|
setShadow(context, this.configuration)
|
||||||
|
// Draw perpendicular line
|
||||||
|
const strokeWidth = lineWidth
|
||||||
const {
|
const {
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
|
@ -86,9 +87,6 @@ export default function(evt) {
|
||||||
// Draw the measurement line
|
// Draw the measurement line
|
||||||
drawLine(context, element, start, end, lineOptions)
|
drawLine(context, element, start, end, lineOptions)
|
||||||
|
|
||||||
// Draw perpendicular line
|
|
||||||
const strokeWidth = lineWidth
|
|
||||||
|
|
||||||
updatePerpendicularLineHandles(eventData, data)
|
updatePerpendicularLineHandles(eventData, data)
|
||||||
|
|
||||||
drawLine(
|
drawLine(
|
||||||
|
|
|
@ -10,6 +10,8 @@ const getNewContext = cornerstoneTools.import('drawing/getNewContext')
|
||||||
const draw = cornerstoneTools.import('drawing/draw')
|
const draw = cornerstoneTools.import('drawing/draw')
|
||||||
const drawHandles = cornerstoneTools.import('drawing/drawHandles')
|
const drawHandles = cornerstoneTools.import('drawing/drawHandles')
|
||||||
const drawTextBox = cornerstoneTools.import('drawing/drawTextBox')
|
const drawTextBox = cornerstoneTools.import('drawing/drawTextBox')
|
||||||
|
|
||||||
|
const drawLinkedTextBox = cornerstoneTools.import('drawing/drawLinkedTextBox')
|
||||||
// Utilities
|
// Utilities
|
||||||
const getRGBPixels = cornerstoneTools.import('util/getRGBPixels')
|
const getRGBPixels = cornerstoneTools.import('util/getRGBPixels')
|
||||||
const calculateSUV = cornerstoneTools.import('util/calculateSUV')
|
const calculateSUV = cornerstoneTools.import('util/calculateSUV')
|
||||||
|
@ -31,6 +33,19 @@ import getCircleCoords from './getCircleCoords'
|
||||||
* desired position.
|
* desired position.
|
||||||
* @extends Tools.Base.BaseAnnotationTool
|
* @extends Tools.Base.BaseAnnotationTool
|
||||||
*/
|
*/
|
||||||
|
const getHandle = (x, y, index, extraAttributes = {}) =>
|
||||||
|
Object.assign(
|
||||||
|
{
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
index,
|
||||||
|
drawnIndependently: false,
|
||||||
|
allowedOutsideImage: false,
|
||||||
|
highlight: true,
|
||||||
|
active: false
|
||||||
|
},
|
||||||
|
extraAttributes
|
||||||
|
)
|
||||||
export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
constructor(props = {}) {
|
constructor(props = {}) {
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
|
@ -64,6 +79,7 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const { x, y } = eventData.currentPoints.image
|
||||||
|
|
||||||
return {
|
return {
|
||||||
visible: true,
|
visible: true,
|
||||||
|
@ -84,6 +100,15 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
active: true,
|
active: true,
|
||||||
radius: 0
|
radius: 0
|
||||||
},
|
},
|
||||||
|
textBox: getHandle(x, y - 30, null, {
|
||||||
|
highlight: false,
|
||||||
|
hasMoved: true,
|
||||||
|
active: false,
|
||||||
|
movesIndependently: false,
|
||||||
|
drawnIndependently: true,
|
||||||
|
allowedOutsideImage: true,
|
||||||
|
hasBoundingBox: true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -226,7 +251,7 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
|
|
||||||
draw(context, context => {
|
draw(context, context => {
|
||||||
const color = toolColors.getColorIfActive(data);
|
const color = toolColors.getColorIfActive(data);
|
||||||
|
const lineWidth = toolStyle.getToolWidth()
|
||||||
if (this.configuration.drawHandles) {
|
if (this.configuration.drawHandles) {
|
||||||
// Draw the handles
|
// Draw the handles
|
||||||
let radius = getCanvasRadius(data.handles, fixedRadius, element, pixelSpacing)
|
let radius = getCanvasRadius(data.handles, fixedRadius, element, pixelSpacing)
|
||||||
|
@ -273,23 +298,74 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
}
|
}
|
||||||
let r = getPixelRadius(fixedRadius, pixelSpacing)
|
let r = getPixelRadius(fixedRadius, pixelSpacing)
|
||||||
// Coords for text
|
// Coords for text
|
||||||
const coords = {
|
|
||||||
// Translate the x/y away from the cursor
|
if (!data.handles.hasOwnProperty('textBox')) {
|
||||||
x: data.handles.end.x + r,
|
// data.handles.textBox = getHandle(data.handles.end.x, data.handles.end.y - 10, null, {
|
||||||
y: data.handles.end.y - r,
|
// highlight: false,
|
||||||
};
|
// hasMoved: true,
|
||||||
const textCoords = external.cornerstone.pixelToCanvas(
|
// active: false,
|
||||||
eventData.element,
|
// movesIndependently: false,
|
||||||
coords
|
// drawnIndependently: true,
|
||||||
);
|
// allowedOutsideImage: false,
|
||||||
drawTextBox(
|
// hasBoundingBox: true
|
||||||
|
// })
|
||||||
|
const coords = {
|
||||||
|
// Translate the x/y away from the cursor
|
||||||
|
x: data.handles.end.x + r,
|
||||||
|
y: data.handles.end.y - r,
|
||||||
|
};
|
||||||
|
const textCoords = external.cornerstone.pixelToCanvas(
|
||||||
|
eventData.element,
|
||||||
|
coords
|
||||||
|
);
|
||||||
|
drawTextBox(
|
||||||
|
context,
|
||||||
|
textLines,
|
||||||
|
textCoords.x,
|
||||||
|
textCoords.y ,
|
||||||
|
color
|
||||||
|
);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let xOffset = 0
|
||||||
|
if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) {
|
||||||
|
let i = parseInt(data.remark.slice(-1))
|
||||||
|
if (i === 1) {
|
||||||
|
xOffset = -40
|
||||||
|
} else if (i === 2) {
|
||||||
|
xOffset = 0
|
||||||
|
} else if (i=== 3) {
|
||||||
|
xOffset = 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// const xOffset = -30
|
||||||
|
const textBoxAnchorPoints = handles => [
|
||||||
|
handles.start,
|
||||||
|
handles.end
|
||||||
|
]
|
||||||
|
const handles = {
|
||||||
|
start: {
|
||||||
|
x: data.handles.end.x,
|
||||||
|
y: data.handles.end.y
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
x: data.handles.end.x + r,
|
||||||
|
y: data.handles.end.y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
drawLinkedTextBox(
|
||||||
context,
|
context,
|
||||||
|
element,
|
||||||
|
data.handles.textBox,
|
||||||
textLines,
|
textLines,
|
||||||
textCoords.x,
|
handles,
|
||||||
textCoords.y ,
|
textBoxAnchorPoints,
|
||||||
color
|
color,
|
||||||
);
|
lineWidth,
|
||||||
// drawTextBox(context, '', textCoords.x, textCoords.y, color);
|
xOffset,
|
||||||
|
true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,13 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="scope.row.Type==='upload' && scope.row.Answers[task.VisitTaskId]">
|
||||||
|
<span v-for="(url,index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url" style="margin-left: 5px;">
|
||||||
|
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">
|
||||||
|
{{ `${$t('trials:noneDicom:title:attachment')}${index}` }}
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row.DictionaryCode">
|
<template v-else-if="scope.row.DictionaryCode">
|
||||||
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
|
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -206,19 +213,40 @@
|
||||||
</div>
|
</div>
|
||||||
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 预览文件 -->
|
||||||
|
<el-dialog
|
||||||
|
v-if="previewVisible"
|
||||||
|
:visible.sync="previewVisible"
|
||||||
|
:title="$t('common:button:preview')"
|
||||||
|
:fullscreen="true"
|
||||||
|
append-to-body
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="base-modal-body"
|
||||||
|
style="border: 2px solid #ccc; padding: 10px"
|
||||||
|
>
|
||||||
|
<PreviewFile
|
||||||
|
v-if="previewVisible"
|
||||||
|
:file-path="currentPath"
|
||||||
|
:file-type="currentType"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { changeCalculationAnswer, getReadingReportEvaluation, changeDicomReadingQuestionAnswer, submitDicomVisitTask, verifyVisitTaskQuestions, getQuestionCalculateRelation } from '@/api/trials'
|
import { changeCalculationAnswer, getReadingReportEvaluation, submitDicomVisitTask, verifyVisitTaskQuestions, getQuestionCalculateRelation } from '@/api/trials'
|
||||||
import { setSkipReadingCache } from '@/api/reading'
|
import { setSkipReadingCache } from '@/api/reading'
|
||||||
import CustomizeReportPageUpload from './CustomizeReportPageUpload'
|
|
||||||
import const_ from '@/const/sign-code'
|
import const_ from '@/const/sign-code'
|
||||||
import SignForm from '@/views/trials/components/newSignForm'
|
import SignForm from '@/views/trials/components/newSignForm'
|
||||||
|
import PreviewFile from '@/components/PreviewFile/index'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
export default {
|
export default {
|
||||||
name: 'CustomizeReportPage',
|
name: 'CustomizeReportPage',
|
||||||
components: { SignForm, CustomizeReportPageUpload },
|
components: { SignForm, PreviewFile },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
trialId: '',
|
trialId: '',
|
||||||
|
@ -242,7 +270,10 @@ export default {
|
||||||
tableAnswers: {},
|
tableAnswers: {},
|
||||||
questionForm: {},
|
questionForm: {},
|
||||||
questionId: null,
|
questionId: null,
|
||||||
taskInfo: null
|
taskInfo: null,
|
||||||
|
previewVisible: false,
|
||||||
|
currentPath: '',
|
||||||
|
currentType: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -380,7 +411,7 @@ export default {
|
||||||
},
|
},
|
||||||
setChild(obj) {
|
setChild(obj) {
|
||||||
obj.forEach((i, index) => {
|
obj.forEach((i, index) => {
|
||||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||||
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
|
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
|
||||||
}
|
}
|
||||||
if (i.Type === 'table' || i.Type === 'basicTable') {
|
if (i.Type === 'table' || i.Type === 'basicTable') {
|
||||||
|
@ -398,7 +429,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.$set(this.questionForm, i.QuestionId, val)
|
this.$set(this.questionForm, i.QuestionId, val)
|
||||||
}
|
}
|
||||||
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
|
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||||
this.setChild(i.Childrens)
|
this.setChild(i.Childrens)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -451,18 +482,18 @@ export default {
|
||||||
num = this.questionForm[o.QuestionId].length === 0 ? 0 : num / this.questionForm[o.QuestionId].length
|
num = this.questionForm[o.QuestionId].length === 0 ? 0 : num / this.questionForm[o.QuestionId].length
|
||||||
break
|
break
|
||||||
case 8:
|
case 8:
|
||||||
var arr = []
|
const arr = []
|
||||||
this.questionForm[o.QuestionId].forEach(q => {
|
this.questionForm[o.QuestionId].forEach(q => {
|
||||||
arr.push(q[o.TableQuestionId])
|
arr.push(q[o.TableQuestionId])
|
||||||
})
|
})
|
||||||
num = arr.length === 0 ? 0 : Math.max(...arr)
|
num = arr.length === 0 ? 0 : Math.max(...arr)
|
||||||
break
|
break
|
||||||
case 9:
|
case 9:
|
||||||
var arr = []
|
const arr1 = []
|
||||||
this.questionForm[o.QuestionId].forEach(q => {
|
this.questionForm[o.QuestionId].forEach(q => {
|
||||||
arr.push(q[o.TableQuestionId])
|
arr1.push(q[o.TableQuestionId])
|
||||||
})
|
})
|
||||||
num = arr.length === 0 ? 0 : Math.min(...arr)
|
num = arr1.length === 0 ? 0 : Math.min(...arr1)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -472,17 +503,17 @@ export default {
|
||||||
switch (rules.CustomCalculateMark) {
|
switch (rules.CustomCalculateMark) {
|
||||||
case 1:
|
case 1:
|
||||||
num += parseFloat(this.questionForm[o.TableQuestionId])
|
num += parseFloat(this.questionForm[o.TableQuestionId])
|
||||||
break;
|
break
|
||||||
case 2:
|
case 2:
|
||||||
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
||||||
break;
|
break
|
||||||
case 3:
|
case 3:
|
||||||
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
||||||
break;
|
break
|
||||||
case 4:
|
case 4:
|
||||||
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||||
// num /= parseFloat(this.questionForm[o.TableQuestionId])
|
// num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -526,7 +557,6 @@ export default {
|
||||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
||||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||||
} else {
|
} else {
|
||||||
console.log(item.Type)
|
|
||||||
if (item.Type === 'number') {
|
if (item.Type === 'number') {
|
||||||
let val = null
|
let val = null
|
||||||
if (item.ValueType === 0) {
|
if (item.ValueType === 0) {
|
||||||
|
@ -719,6 +749,13 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 预览
|
||||||
|
preview(path) {
|
||||||
|
this.currentPath = path
|
||||||
|
const arr = path.split('.')
|
||||||
|
this.currentType = arr[arr.length - 1]
|
||||||
|
this.previewVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<!-- <div v-if="taskInfo && taskInfo.IsShowStudyName">{{ study.StudyName }}</div> -->
|
<!-- <div v-if="taskInfo && taskInfo.IsShowStudyName">{{ study.StudyName }}</div> -->
|
||||||
<div>
|
<div>
|
||||||
<span :title="study.CodeView">{{ study.CodeView }}</span>
|
<span :title="study.CodeView">{{ study.CodeView }}</span>
|
||||||
<span :title="study.StudyName" v-if="taskInfo && taskInfo.IsShowStudyName" style="margin-left: 5px;">{{ study.StudyName }}</span>
|
<span v-if="taskInfo && taskInfo.IsShowStudyName" :title="study.StudyName" style="margin-left: 5px;">{{ study.StudyName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span :title="study.BodyPart">{{ study.BodyPart }}</span>
|
<span :title="study.BodyPart">{{ study.BodyPart }}</span>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
:class="{'file-active': index === activeStudyIndex && i === activeFileIndex}"
|
:class="{'file-active': index === activeStudyIndex && i === activeFileIndex}"
|
||||||
class="file-wrapper"
|
class="file-wrapper"
|
||||||
>
|
>
|
||||||
<div class="file-image">
|
<div class="file-image">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="k.FileType === 'image/jpeg' || k.FileType === 'image/jpg' || k.FileType === 'image/bmp' || k.FileType === 'image/png'"
|
v-if="k.FileType === 'image/jpeg' || k.FileType === 'image/jpg' || k.FileType === 'image/bmp' || k.FileType === 'image/png'"
|
||||||
style="width: 100%;height: 100%;"
|
style="width: 100%;height: 100%;"
|
||||||
|
|
Loading…
Reference in New Issue