ivus标准更改
parent
c114903dba
commit
a470d961df
|
@ -433,13 +433,31 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RecistQuestionList
|
<RecistQuestionList
|
||||||
v-else-if="CriterionType !== 17"
|
v-else-if="CriterionType === 13"
|
||||||
ref="measurementList"
|
ref="measurementList"
|
||||||
:question-form-change-state="questionFormChangeState"
|
:question-form-change-state="questionFormChangeState"
|
||||||
:question-form-change-num="questionFormChangeNum"
|
:question-form-change-num="questionFormChangeNum"
|
||||||
:is-show="isShow"
|
:is-show="isShow"
|
||||||
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<IVUSList
|
||||||
|
v-else-if="CriterionType === 19"
|
||||||
|
ref="measurementList"
|
||||||
|
:question-form-change-state="questionFormChangeState"
|
||||||
|
:question-form-change-num="questionFormChangeNum"
|
||||||
|
:is-show="isShow"
|
||||||
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
||||||
|
/>
|
||||||
|
<OCTList
|
||||||
|
v-else-if="CriterionType === 20"
|
||||||
|
ref="measurementList"
|
||||||
|
:question-form-change-state="questionFormChangeState"
|
||||||
|
:question-form-change-num="questionFormChangeNum"
|
||||||
|
:is-show="isShow"
|
||||||
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -677,6 +695,8 @@ import RecistBMQuestionList from './RecistBM/QuestionList'
|
||||||
import IRecistQuestionList from './IRecist/QuestionList'
|
import IRecistQuestionList from './IRecist/QuestionList'
|
||||||
import PCWGQuestionList from './PCWG/QuestionList'
|
import PCWGQuestionList from './PCWG/QuestionList'
|
||||||
import LuganoQuestionList from './Lugano/QuestionList'
|
import LuganoQuestionList from './Lugano/QuestionList'
|
||||||
|
import IVUSList from './IVUS/QuestionList'
|
||||||
|
import OCTList from './OCT/QuestionList'
|
||||||
import CustomWwwcForm from './CustomWwwcForm'
|
import CustomWwwcForm from './CustomWwwcForm'
|
||||||
import Manuals from './Manuals'
|
import Manuals from './Manuals'
|
||||||
import Hotkeys from './Hotkeys'
|
import Hotkeys from './Hotkeys'
|
||||||
|
@ -698,7 +718,10 @@ export default {
|
||||||
PCWGQuestionList,
|
PCWGQuestionList,
|
||||||
RecistBMQuestionList,
|
RecistBMQuestionList,
|
||||||
IRecistQuestionList,
|
IRecistQuestionList,
|
||||||
LuganoQuestionList },
|
LuganoQuestionList,
|
||||||
|
IVUSList,
|
||||||
|
OCTList
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
isShow: {
|
isShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -923,6 +946,10 @@ export default {
|
||||||
this.measuredTools = [{ toolName: 'ArrowAnnotate', text: this.$t('trials:reading:button:arrowAnnotate'), icon: 'arrow', isDisabled: false, disabledReason: '' }, { toolName: 'RectangleRoi', text: this.$t('trials:reading:button:rectangle'), icon: 'rectangle', isDisabled: false, disabledReason: '' }]
|
this.measuredTools = [{ toolName: 'ArrowAnnotate', text: this.$t('trials:reading:button:arrowAnnotate'), icon: 'arrow', isDisabled: false, disabledReason: '' }, { toolName: 'RectangleRoi', text: this.$t('trials:reading:button:rectangle'), icon: 'rectangle', isDisabled: false, disabledReason: '' }]
|
||||||
} else if (this.CriterionType === 17) {
|
} else if (this.CriterionType === 17) {
|
||||||
this.measuredTools = [{ toolName: 'Length', text: this.$t('trials:reading:button:length'), icon: 'length', isDisabled: false, disabledReason: '' }, { toolName: 'RectangleRoi', text: this.$t('trials:reading:button:rectangle'), icon: 'rectangle', isDisabled: false, disabledReason: '' }, { toolName: 'ArrowAnnotate', text: this.$t('trials:reading:button:arrowAnnotate'), icon: 'arrow', isDisabled: false, disabledReason: '' }]
|
this.measuredTools = [{ toolName: 'Length', text: this.$t('trials:reading:button:length'), icon: 'length', isDisabled: false, disabledReason: '' }, { toolName: 'RectangleRoi', text: this.$t('trials:reading:button:rectangle'), icon: 'rectangle', isDisabled: false, disabledReason: '' }, { toolName: 'ArrowAnnotate', text: this.$t('trials:reading:button:arrowAnnotate'), icon: 'arrow', isDisabled: false, disabledReason: '' }]
|
||||||
|
} else if (this.CriterionType === 19) {
|
||||||
|
this.measuredTools = []
|
||||||
|
} else if (this.CriterionType === 20) {
|
||||||
|
this.measuredTools = []
|
||||||
}
|
}
|
||||||
this.rotateList[0] = '1'
|
this.rotateList[0] = '1'
|
||||||
this.colorList[0] = ''
|
this.colorList[0] = ''
|
||||||
|
|
|
@ -0,0 +1,546 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
v-if="isRender"
|
||||||
|
ref="measurementForm"
|
||||||
|
v-loading="loading"
|
||||||
|
:model="questionForm"
|
||||||
|
size="mini"
|
||||||
|
class="measurement-form"
|
||||||
|
>
|
||||||
|
<div class="base-dialog-body">
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<h3 v-if="questionName" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||||
|
<!-- {{ `${questionName} (${orderMark}${String(rowIndex).padStart(2, '0')})` }} -->
|
||||||
|
{{ lesionName }}
|
||||||
|
</h3>
|
||||||
|
<!-- 关闭 -->
|
||||||
|
<div>
|
||||||
|
<i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:reading:title:lesionType')"
|
||||||
|
prop="LesionType"
|
||||||
|
:rules="[
|
||||||
|
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<!-- 下拉框 -->
|
||||||
|
<el-select
|
||||||
|
v-model="questionForm.LesionType"
|
||||||
|
filterable
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{lesionTypeChange(val)})"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.LesionType"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-for="qs in questions"
|
||||||
|
v-show="qs.ShowQuestion!==2"
|
||||||
|
:key="qs.Id"
|
||||||
|
:label="`${qs.QuestionName}`"
|
||||||
|
:prop="qs.Id"
|
||||||
|
:rules="[
|
||||||
|
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (questionForm[qs.RelevanceId] === qs.RelevanceValue))) && qs.Type!=='group' && qs.Type!=='summary',
|
||||||
|
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 输入框 -->
|
||||||
|
<template v-if="qs.Type==='input' || qs.Type==='number'">
|
||||||
|
<el-input
|
||||||
|
v-if="qs.Type==='input' || qs.Type==='number'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2 "
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
>
|
||||||
|
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
|
||||||
|
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
<!-- 多行文本输入框 -->
|
||||||
|
<el-input
|
||||||
|
v-if="qs.Type==='textarea'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4}"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-if="qs.Type==='select'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
filterable
|
||||||
|
:placeholder="$t('common:placeholder:select')"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
>
|
||||||
|
<template v-if="qs.DictionaryCode">
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d[qs.DictionaryCode]"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-option
|
||||||
|
v-for="val in qs.TypeValue.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
:value="val"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
<!-- 单选 -->
|
||||||
|
<el-radio-group
|
||||||
|
v-if="qs.Type==='radio'"
|
||||||
|
v-model="questionForm[qs.id]"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
>
|
||||||
|
<el-radio
|
||||||
|
v-for="val in qs.options.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
>
|
||||||
|
{{ val }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="isCurrentTask && readingTaskState<2"
|
||||||
|
class="base-dialog-footer"
|
||||||
|
style="text-align:right;margin-top:10px;"
|
||||||
|
>
|
||||||
|
<!-- 删除 -->
|
||||||
|
<el-button
|
||||||
|
v-if="isCurrentTaskAdd !== 'False'"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:delete') }}
|
||||||
|
</el-button>
|
||||||
|
<!-- 保存 -->
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="handleSave"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
|
||||||
|
import DicomEvent from './../DicomEvent'
|
||||||
|
// import store from '@/store'
|
||||||
|
export default {
|
||||||
|
name: 'MeasurementForm',
|
||||||
|
props: {
|
||||||
|
questions: {
|
||||||
|
type: Array,
|
||||||
|
default() { return [] }
|
||||||
|
},
|
||||||
|
answers: {
|
||||||
|
type: Object,
|
||||||
|
default() { return {} }
|
||||||
|
},
|
||||||
|
lesionType: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
visitTaskId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
parentQsId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isCurrentTask: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
readingTaskState: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isBaseLineTask: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
orderMark: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
questionName: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
rowIndex: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
tableQuestions: {
|
||||||
|
type: Array,
|
||||||
|
default() { return [] }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
questionForm: {},
|
||||||
|
loading: false,
|
||||||
|
trialId: '',
|
||||||
|
originalQuestionForm: {},
|
||||||
|
isRender: false,
|
||||||
|
toolType: '',
|
||||||
|
lesionName: '',
|
||||||
|
isCurrentTaskAdd: 'False',
|
||||||
|
lesionMark: '',
|
||||||
|
deleteInfo: null,
|
||||||
|
pictureBaseStr: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.trialId = this.$route.query.trialId
|
||||||
|
this.initForm()
|
||||||
|
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
DicomEvent.$off('handleImageQualityAbnormal')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initForm() {
|
||||||
|
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])
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(this.questionForm, item.Id, val)
|
||||||
|
})
|
||||||
|
this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '')
|
||||||
|
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
||||||
|
if (this.questionForm.RowId) {
|
||||||
|
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||||
|
} else {
|
||||||
|
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
|
this.$set(this.questionForm, 'IsDicomReading', this.answers.IsDicomReading !== 'False')
|
||||||
|
if (!this.questionForm.LesionType) {
|
||||||
|
this.$set(this.questionForm, 'LesionType', this.lesionType)
|
||||||
|
}
|
||||||
|
this.lesionName = this.getLesionInfo(this.orderMark, this.rowIndex)
|
||||||
|
this.isCurrentTaskAdd = this.answers.IsCurrentTaskAdd ? this.answers.IsCurrentTaskAdd : 'True'
|
||||||
|
this.lesionMark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||||
|
this.originalQuestionForm = { ...this.questionForm }
|
||||||
|
this.isRender = true
|
||||||
|
loading.close()
|
||||||
|
},
|
||||||
|
getLesionName(orderMark, rowIndex) {
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return lessionName
|
||||||
|
},
|
||||||
|
getLesionInfo(orderMark, rowIndex) {
|
||||||
|
var arr = []
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
arr.push(lessionName)
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
arr.push(lessionName)
|
||||||
|
}
|
||||||
|
return arr.join(' ')
|
||||||
|
},
|
||||||
|
getQuestionId(questionMark) {
|
||||||
|
var idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
return this.questions[idx].Id
|
||||||
|
} else {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||||
|
},
|
||||||
|
returnFloat(num) {
|
||||||
|
if (num) return
|
||||||
|
var value = Math.round(parseFloat(num) * 100) / 100
|
||||||
|
var s = value.toString().split('.')
|
||||||
|
if (s.length === 1) {
|
||||||
|
value = value.toString() + '.00'
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
if (s.length > 1) {
|
||||||
|
if (s[1].length < 2) {
|
||||||
|
value = value.toString() + '0'
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getQuestionVal(questionMark) {
|
||||||
|
const idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
const questionId = this.questions[idx].Id
|
||||||
|
const answer = this.questionForm[questionId]
|
||||||
|
if (isNaN(parseFloat(answer))) {
|
||||||
|
return answer
|
||||||
|
} else {
|
||||||
|
return parseFloat(answer)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
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
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
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) {
|
||||||
|
if (reg.test(k)) {
|
||||||
|
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||||
|
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
questionId: this.parentQsId,
|
||||||
|
rowId: this.questionForm.RowId,
|
||||||
|
rowIndex: this.answers.RowIndex,
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
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) {
|
||||||
|
// 保存成功!
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
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 })
|
||||||
|
this.$emit('close')
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleDelete() {
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:reading:warnning:msg48'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
if (this.questionForm.RowId) {
|
||||||
|
var param = {
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
questionId: this.parentQsId,
|
||||||
|
rowId: this.questionForm.RowId
|
||||||
|
}
|
||||||
|
const res = await deleteReadingRowAnswer(param)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
// '删除成功!'
|
||||||
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
loading.close()
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleClose() {
|
||||||
|
if (!this.questionForm.RowId) {
|
||||||
|
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:reading:warnning:msg49'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
} else {
|
||||||
|
this.$emit('close')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.measurement-form{
|
||||||
|
/deep/ .el-form-item__label{
|
||||||
|
color: #c3c3c3;
|
||||||
|
}
|
||||||
|
/deep/ .el-input .el-input__inner{
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ddd;
|
||||||
|
border: 1px solid #5e5e5e;
|
||||||
|
}
|
||||||
|
/deep/ .el-form-item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
/deep/ .el-form-item__content{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
/deep/ .el-input.is-disabled .el-input__inner{
|
||||||
|
background-color: #646464a1;
|
||||||
|
}
|
||||||
|
/deep/ .el-select.is-disabled .el-input__inner{
|
||||||
|
background-color: #646464a1;
|
||||||
|
}
|
||||||
|
/deep/ .el-button--mini, .el-button--mini.is-round {
|
||||||
|
padding: 7px 10px;
|
||||||
|
}
|
||||||
|
.el-form-item__content
|
||||||
|
.el-select{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.input-width1{
|
||||||
|
width: calc(100% -60px)!important;
|
||||||
|
}
|
||||||
|
.input-width2{
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,623 @@
|
||||||
|
<template>
|
||||||
|
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||||
|
|
||||||
|
<div class="container" :style="{'height':height+'px'}">
|
||||||
|
<div class="basic-info">
|
||||||
|
<h3 v-if="isReadingShowSubjectInfo">
|
||||||
|
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||||
|
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||||
|
</h3>
|
||||||
|
<div v-if="readingTaskState < 2">
|
||||||
|
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||||
|
<i
|
||||||
|
class="el-icon-refresh-left"
|
||||||
|
@click="resetMeasuredData"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 非测量问题 -->
|
||||||
|
<div class="lesions">
|
||||||
|
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" />
|
||||||
|
</div>
|
||||||
|
<!-- 测量问题 -->
|
||||||
|
<template v-if="questions.length > 0 && CriterionType !== 10">
|
||||||
|
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper">
|
||||||
|
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||||
|
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||||
|
</h4>
|
||||||
|
<div class="lesion_list">
|
||||||
|
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||||
|
<div v-if="item.Type === 'table'" class="flex-row" style="margin:3px 0;">
|
||||||
|
<div class="title">{{ item.QuestionName }}</div>
|
||||||
|
<div v-if="readingTaskState < 2" class="add-icon" @click.prevent="handleAdd(item)">
|
||||||
|
<i class="el-icon-plus" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-collapse
|
||||||
|
v-if="item.Type === 'table' && item.TableQuestions"
|
||||||
|
v-model="activeName"
|
||||||
|
accordion
|
||||||
|
@change="handleCollapseChange"
|
||||||
|
>
|
||||||
|
<el-collapse-item
|
||||||
|
v-for="(q,i) in item.TableQuestions.Answers"
|
||||||
|
:key="`${item.Id}_${q.RowIndex}`"
|
||||||
|
:name="`${item.Id}_${q.RowIndex}`"
|
||||||
|
>
|
||||||
|
<template slot="title">
|
||||||
|
<div style="width:300px;position: relative;" :style="{color:(activeName===item.Id+q.RowIndex?'#ffeb3b':'#fff')}">
|
||||||
|
|
||||||
|
{{ getLesionName(item.OrderMark,q.RowIndex) }}
|
||||||
|
<!-- 未保存 -->
|
||||||
|
<!-- <el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 0" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||||
|
<i class="el-icon-warning" style="color:red" />
|
||||||
|
</el-tooltip> -->
|
||||||
|
<!-- 信息不完整 -->
|
||||||
|
<!-- <el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) ===1" class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')" placement="bottom">
|
||||||
|
<i class="el-icon-warning" style="color:#ff9800" />
|
||||||
|
</el-tooltip> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<QuestionForm
|
||||||
|
:ref="`${item.Id}_${q.RowIndex}`"
|
||||||
|
:questions="item.TableQuestions.Questions"
|
||||||
|
:answers="item.TableQuestions.Answers[i]"
|
||||||
|
:lesion-type="item.LesionType"
|
||||||
|
:order-mark="item.OrderMark"
|
||||||
|
:table-questions="tableQuestions"
|
||||||
|
:row-index="String(q.RowIndex)"
|
||||||
|
:question-name="item.QuestionName"
|
||||||
|
:parent-qs-id="item.Id"
|
||||||
|
:visit-task-id="visitTaskId"
|
||||||
|
:is-current-task="isCurrentTask"
|
||||||
|
:reading-task-state="readingTaskState"
|
||||||
|
:is-base-line-task="isBaseLineTask"
|
||||||
|
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
|
||||||
|
@determineExistsUnsavedLession="determineExistsUnsavedLession"
|
||||||
|
@resetQuestions="resetQuestions"
|
||||||
|
@close="close"
|
||||||
|
/>
|
||||||
|
</el-collapse-item>
|
||||||
|
|
||||||
|
</el-collapse>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { resetReadingTask } from '@/api/reading'
|
||||||
|
import DicomEvent from './../DicomEvent'
|
||||||
|
import store from '@/store'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import Questions from './../Questions'
|
||||||
|
import QuestionForm from './QuestionForm'
|
||||||
|
export default {
|
||||||
|
name: 'MeasurementList',
|
||||||
|
components: {
|
||||||
|
Questions,
|
||||||
|
QuestionForm
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
isShow: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isReadingShowSubjectInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
questionFormChangeState: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
questionFormChangeNum: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
height: window.innerHeight - 140,
|
||||||
|
questions: [],
|
||||||
|
activeName: '',
|
||||||
|
activeItem: {
|
||||||
|
activeRowIndex: null,
|
||||||
|
activeCollapseId: null
|
||||||
|
},
|
||||||
|
visitTaskId: '',
|
||||||
|
isCurrentTask: false,
|
||||||
|
loading: false,
|
||||||
|
unSaveTargets: [],
|
||||||
|
temporaryLesions: [],
|
||||||
|
readingTaskState: 2,
|
||||||
|
isBaseLineTask: false,
|
||||||
|
taskBlindName: '',
|
||||||
|
tableQuestions: [],
|
||||||
|
isFirstRender: false,
|
||||||
|
CriterionType: null,
|
||||||
|
subjectCode: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['visitTaskList', 'language', 'lastCanvasTaskId', 'currentReadingTaskState'])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
lastCanvasTaskId: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.initList()
|
||||||
|
}
|
||||||
|
console.log('lastCanvasTaskId', val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
currentReadingTaskState: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.readingTaskState = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
|
this.subjectCode = localStorage.getItem('subjectCode')
|
||||||
|
window.addEventListener('message', this.receiveMsg)
|
||||||
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
this.setCollapseActive(measureData)
|
||||||
|
console.log('setCollapseActive')
|
||||||
|
})
|
||||||
|
DicomEvent.$on('changeLesionType', (questionsObj) => {
|
||||||
|
this.changeLesionType(questionsObj)
|
||||||
|
console.log('changeLesionType')
|
||||||
|
})
|
||||||
|
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||||
|
callback([])
|
||||||
|
})
|
||||||
|
|
||||||
|
window.addEventListener('resize', this.setHeight)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
DicomEvent.$off('setCollapseActive')
|
||||||
|
DicomEvent.$off('changeLesionType')
|
||||||
|
DicomEvent.$off('getUnSaveTarget')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initList() {
|
||||||
|
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.lastCanvasTaskId)
|
||||||
|
if (i > -1) {
|
||||||
|
this.visitTaskId = this.visitTaskList[i].VisitTaskId
|
||||||
|
this.taskBlindName = this.visitTaskList[i].TaskBlindName
|
||||||
|
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
|
||||||
|
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
|
||||||
|
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
if (!this.visitTaskList[i].IsInit) {
|
||||||
|
var loading = this.$loading({ fullscreen: true })
|
||||||
|
var triald = this.trialId = this.$router.currentRoute.query.trialId
|
||||||
|
if (!this.visitTaskList[i].studyListInit) {
|
||||||
|
await store.dispatch('reading/getStudyInfo', { trialId: triald, subjectVisitId: this.visitTaskList[i].VisitId, visitTaskId: this.visitTaskList[i].VisitTaskId, taskBlindName: this.visitTaskList[i].TaskBlindName })
|
||||||
|
}
|
||||||
|
if (!this.visitTaskList[i].readingQuestionsInit) {
|
||||||
|
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: triald, visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
}
|
||||||
|
if (!this.visitTaskList[i].questionsInit) {
|
||||||
|
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
}
|
||||||
|
|
||||||
|
await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
this.questions = this.visitTaskList[i].ReadingQuestions
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
||||||
|
this.getTableQuestions()
|
||||||
|
this.tableQuestions.forEach(item => {
|
||||||
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
|
var refName = `${item.Id}_${i.RowIndex}`
|
||||||
|
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async resetQuestions(obj) {
|
||||||
|
this.setQuestions(this.questions, obj)
|
||||||
|
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
||||||
|
|
||||||
|
this.getTableQuestions()
|
||||||
|
},
|
||||||
|
setQuestions(questions, obj) {
|
||||||
|
questions.forEach(item => {
|
||||||
|
if (item.Type === 'table' && item.Id === obj.questionId) {
|
||||||
|
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
|
||||||
|
item.TableQuestions.Answers[idx].isLymphLesion = obj.isLymphLesion
|
||||||
|
item.TableQuestions.Answers[idx].loctation = obj.lesionOrgan
|
||||||
|
item.TableQuestions.Answers[idx].lesionPart = obj.lesionPart
|
||||||
|
item.TableQuestions.Answers[idx].lesionLength = obj.lesionLength
|
||||||
|
item.TableQuestions.Answers[idx].lesionShort = obj.lesionShort
|
||||||
|
item.TableQuestions.Answers[idx].lesionState = obj.lesionState
|
||||||
|
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum
|
||||||
|
|
||||||
|
for (const i in obj.anwsers) {
|
||||||
|
item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.setQuestions(item.Childrens, obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQuestions(questions) {
|
||||||
|
questions.forEach(item => {
|
||||||
|
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||||
|
item.TableQuestions.Answers.forEach(answerObj => {
|
||||||
|
if (answerObj.RowId) {
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', 2)
|
||||||
|
} else {
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getQuestions(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return questions
|
||||||
|
},
|
||||||
|
getTableQuestions() {
|
||||||
|
this.tableQuestions = []
|
||||||
|
this.questions.map(item => {
|
||||||
|
if (item.Type === 'table') {
|
||||||
|
this.tableQuestions.push(item)
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getTableQuestionsChild(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTableQuestionsChild(obj) {
|
||||||
|
obj.map(item => {
|
||||||
|
if (item.Type === 'table') {
|
||||||
|
this.tableQuestions.push(item)
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getTableQuestionsChild(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refreshReadingQuestionAndAnswer(type) {
|
||||||
|
if (type === 0) {
|
||||||
|
// 删除
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
|
},
|
||||||
|
getReadingQuestionAndAnswer() {
|
||||||
|
return new Promise(async resolve => {
|
||||||
|
try {
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
await store.dispatch('reading/refreshReadingQuestionAndAnswer', { trialId: this.$router.currentRoute.query.trialId, visitTaskId: this.visitTaskId }).then(() => {
|
||||||
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
|
if (idx > -1) {
|
||||||
|
if (this.visitTaskList[idx].ReadingQuestions.length > 0) {
|
||||||
|
this.questions = this.visitTaskList[idx].ReadingQuestions
|
||||||
|
}
|
||||||
|
this.readingTaskState = this.visitTaskList[idx].ReadingTaskState
|
||||||
|
this.isBaseLineTask = this.visitTaskList[idx].IsBaseLineTask
|
||||||
|
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
|
||||||
|
}
|
||||||
|
this.getTableQuestions()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.tableQuestions.forEach(item => {
|
||||||
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
|
var refName = `${item.Id}_${i.RowIndex}`
|
||||||
|
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
resolve()
|
||||||
|
} catch (e) { console.log(e) }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setHeight() {
|
||||||
|
this.height = window.innerHeight - 140
|
||||||
|
},
|
||||||
|
getQuestionAnswer(questions, questionMark, answers) {
|
||||||
|
var idx = questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
var questionId = questions[idx].Id
|
||||||
|
return answers[questionId]
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isCanActiveTool(toolName) {
|
||||||
|
return { isCanActiveTool: true, reason: '' }
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleAdd(qs) {
|
||||||
|
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
|
||||||
|
let msg = this.$t('trials:reading:warnning:msg14')
|
||||||
|
// msg = msg.replace('xxx', qs.QuestionName)
|
||||||
|
msg = msg.replace('xxx', qs.MaxQuestionCount)
|
||||||
|
this.$confirm(msg, {
|
||||||
|
type: 'warning',
|
||||||
|
showCancelButton: false,
|
||||||
|
callback: action => {}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// saveTypeEnum: 0
|
||||||
|
var obj = { saveTypeEnum: 0 }
|
||||||
|
// var questions = qs.TableQuestions.Questions.find(item => item.QuestionMark === 3)
|
||||||
|
// if (questions) {
|
||||||
|
// console.log(questions)
|
||||||
|
// var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
||||||
|
// obj.RowIndex = `${maxIndex + 1}.00`
|
||||||
|
// obj[questions.Id] = `${qs.OrderMark}${String(maxIndex + 1).padStart(2, '0')}`
|
||||||
|
// }
|
||||||
|
var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
||||||
|
obj.RowIndex = `${maxIndex + 1}.00`
|
||||||
|
obj.IsDicomReading = true
|
||||||
|
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: qs.LesionType, visitTaskId: this.visitTaskId, lesionObj: obj })
|
||||||
|
|
||||||
|
this.activeItem.activeRowIndex = String(obj.RowIndex)
|
||||||
|
this.activeItem.activeCollapseId = qs.Id
|
||||||
|
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getMaxRowIndex(answerList) {
|
||||||
|
if (answerList.length > 0) {
|
||||||
|
var arr = []
|
||||||
|
answerList.forEach(item => {
|
||||||
|
var rowIndex = item.RowIndex
|
||||||
|
arr.push(parseInt(rowIndex))
|
||||||
|
})
|
||||||
|
var max = Math.max.apply(null, arr)
|
||||||
|
return max
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
determineExistsUnsavedLession(callback) {
|
||||||
|
callback(true)
|
||||||
|
return
|
||||||
|
},
|
||||||
|
getLesionName(orderMark, rowIndex) {
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return lessionName
|
||||||
|
},
|
||||||
|
handleCollapseChange(val) {
|
||||||
|
if (this.activeName) {
|
||||||
|
var arr = this.activeName.split('_')
|
||||||
|
this.activeItem.activeRowIndex = arr[1]
|
||||||
|
this.activeItem.activeCollapseId = arr[0]
|
||||||
|
} else {
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
collapseRightClick(e, obj, activeCollapseId, activeRowIndex) {
|
||||||
|
e.stopImmediatePropagation()
|
||||||
|
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) {
|
||||||
|
|
||||||
|
},
|
||||||
|
modifyMeasuredData(measureObj) {
|
||||||
|
},
|
||||||
|
// 设置测量数据
|
||||||
|
setMeasuredData(measureData) {
|
||||||
|
|
||||||
|
},
|
||||||
|
async close(questionsObj) {
|
||||||
|
if (questionsObj) {
|
||||||
|
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
|
||||||
|
}
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
this.activeName = ''
|
||||||
|
},
|
||||||
|
getECRFQuestions(obj) {
|
||||||
|
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||||
|
},
|
||||||
|
async resetMeasuredData() {
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||||
|
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
// 刷新标注、表单、报告页信息
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
|
const triald = this.$router.currentRoute.query.trialId
|
||||||
|
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||||
|
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
loading.close()
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
receiveMsg(event) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.measurement-wrapper{
|
||||||
|
overflow-y: auto;
|
||||||
|
// overflow: hidden;
|
||||||
|
|
||||||
|
.container{
|
||||||
|
padding: 10px;
|
||||||
|
.basic-info{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
h3{
|
||||||
|
color: #ddd;
|
||||||
|
padding: 5px 0px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
i{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.add-icon{
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 15px;
|
||||||
|
border: 1px solid #938b8b;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.add-icon:hover{
|
||||||
|
background-color: #607d8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-row{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #424242;
|
||||||
|
|
||||||
|
}
|
||||||
|
.lesion_list{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.el-collapse{
|
||||||
|
border-bottom:none;
|
||||||
|
border-top:none;
|
||||||
|
/deep/ .el-collapse-item{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__header{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
border-bottom-color:#5a5a5a;
|
||||||
|
padding-left: 5px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__wrap{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__content{
|
||||||
|
width:260px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
// border: 1px solid #ffeb3b;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
z-index: 1;
|
||||||
|
color: #ddd;
|
||||||
|
padding: 5px;
|
||||||
|
background-color:#1e1e1e;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,546 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
v-if="isRender"
|
||||||
|
ref="measurementForm"
|
||||||
|
v-loading="loading"
|
||||||
|
:model="questionForm"
|
||||||
|
size="mini"
|
||||||
|
class="measurement-form"
|
||||||
|
>
|
||||||
|
<div class="base-dialog-body">
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<h3 v-if="questionName" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||||
|
<!-- {{ `${questionName} (${orderMark}${String(rowIndex).padStart(2, '0')})` }} -->
|
||||||
|
{{ lesionName }}
|
||||||
|
</h3>
|
||||||
|
<!-- 关闭 -->
|
||||||
|
<div>
|
||||||
|
<i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:reading:title:lesionType')"
|
||||||
|
prop="LesionType"
|
||||||
|
:rules="[
|
||||||
|
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<!-- 下拉框 -->
|
||||||
|
<el-select
|
||||||
|
v-model="questionForm.LesionType"
|
||||||
|
filterable
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{lesionTypeChange(val)})"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.LesionType"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-for="qs in questions"
|
||||||
|
v-show="qs.ShowQuestion!==2"
|
||||||
|
:key="qs.Id"
|
||||||
|
:label="`${qs.QuestionName}`"
|
||||||
|
:prop="qs.Id"
|
||||||
|
:rules="[
|
||||||
|
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (questionForm[qs.RelevanceId] === qs.RelevanceValue))) && qs.Type!=='group' && qs.Type!=='summary',
|
||||||
|
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 输入框 -->
|
||||||
|
<template v-if="qs.Type==='input' || qs.Type==='number'">
|
||||||
|
<el-input
|
||||||
|
v-if="qs.Type==='input' || qs.Type==='number'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2 "
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
>
|
||||||
|
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
|
||||||
|
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
<!-- 多行文本输入框 -->
|
||||||
|
<el-input
|
||||||
|
v-if="qs.Type==='textarea'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4}"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-if="qs.Type==='select'"
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
filterable
|
||||||
|
:placeholder="$t('common:placeholder:select')"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
>
|
||||||
|
<template v-if="qs.DictionaryCode">
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d[qs.DictionaryCode]"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-option
|
||||||
|
v-for="val in qs.TypeValue.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
:value="val"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
<!-- 单选 -->
|
||||||
|
<el-radio-group
|
||||||
|
v-if="qs.Type==='radio'"
|
||||||
|
v-model="questionForm[qs.id]"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||||
|
>
|
||||||
|
<el-radio
|
||||||
|
v-for="val in qs.options.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
>
|
||||||
|
{{ val }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="isCurrentTask && readingTaskState<2"
|
||||||
|
class="base-dialog-footer"
|
||||||
|
style="text-align:right;margin-top:10px;"
|
||||||
|
>
|
||||||
|
<!-- 删除 -->
|
||||||
|
<el-button
|
||||||
|
v-if="isCurrentTaskAdd !== 'False'"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:delete') }}
|
||||||
|
</el-button>
|
||||||
|
<!-- 保存 -->
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="handleSave"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
|
||||||
|
import DicomEvent from './../DicomEvent'
|
||||||
|
// import store from '@/store'
|
||||||
|
export default {
|
||||||
|
name: 'MeasurementForm',
|
||||||
|
props: {
|
||||||
|
questions: {
|
||||||
|
type: Array,
|
||||||
|
default() { return [] }
|
||||||
|
},
|
||||||
|
answers: {
|
||||||
|
type: Object,
|
||||||
|
default() { return {} }
|
||||||
|
},
|
||||||
|
lesionType: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
visitTaskId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
parentQsId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isCurrentTask: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
readingTaskState: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isBaseLineTask: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
orderMark: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
questionName: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
rowIndex: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
tableQuestions: {
|
||||||
|
type: Array,
|
||||||
|
default() { return [] }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
questionForm: {},
|
||||||
|
loading: false,
|
||||||
|
trialId: '',
|
||||||
|
originalQuestionForm: {},
|
||||||
|
isRender: false,
|
||||||
|
toolType: '',
|
||||||
|
lesionName: '',
|
||||||
|
isCurrentTaskAdd: 'False',
|
||||||
|
lesionMark: '',
|
||||||
|
deleteInfo: null,
|
||||||
|
pictureBaseStr: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.trialId = this.$route.query.trialId
|
||||||
|
this.initForm()
|
||||||
|
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
DicomEvent.$off('handleImageQualityAbnormal')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initForm() {
|
||||||
|
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])
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(this.questionForm, item.Id, val)
|
||||||
|
})
|
||||||
|
this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '')
|
||||||
|
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
||||||
|
if (this.questionForm.RowId) {
|
||||||
|
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||||
|
} else {
|
||||||
|
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
|
this.$set(this.questionForm, 'IsDicomReading', this.answers.IsDicomReading !== 'False')
|
||||||
|
if (!this.questionForm.LesionType) {
|
||||||
|
this.$set(this.questionForm, 'LesionType', this.lesionType)
|
||||||
|
}
|
||||||
|
this.lesionName = this.getLesionInfo(this.orderMark, this.rowIndex)
|
||||||
|
this.isCurrentTaskAdd = this.answers.IsCurrentTaskAdd ? this.answers.IsCurrentTaskAdd : 'True'
|
||||||
|
this.lesionMark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||||
|
this.originalQuestionForm = { ...this.questionForm }
|
||||||
|
this.isRender = true
|
||||||
|
loading.close()
|
||||||
|
},
|
||||||
|
getLesionName(orderMark, rowIndex) {
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return lessionName
|
||||||
|
},
|
||||||
|
getLesionInfo(orderMark, rowIndex) {
|
||||||
|
var arr = []
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
arr.push(lessionName)
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
arr.push(lessionName)
|
||||||
|
}
|
||||||
|
return arr.join(' ')
|
||||||
|
},
|
||||||
|
getQuestionId(questionMark) {
|
||||||
|
var idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
return this.questions[idx].Id
|
||||||
|
} else {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||||
|
},
|
||||||
|
returnFloat(num) {
|
||||||
|
if (num) return
|
||||||
|
var value = Math.round(parseFloat(num) * 100) / 100
|
||||||
|
var s = value.toString().split('.')
|
||||||
|
if (s.length === 1) {
|
||||||
|
value = value.toString() + '.00'
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
if (s.length > 1) {
|
||||||
|
if (s[1].length < 2) {
|
||||||
|
value = value.toString() + '0'
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getQuestionVal(questionMark) {
|
||||||
|
const idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
const questionId = this.questions[idx].Id
|
||||||
|
const answer = this.questionForm[questionId]
|
||||||
|
if (isNaN(parseFloat(answer))) {
|
||||||
|
return answer
|
||||||
|
} else {
|
||||||
|
return parseFloat(answer)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
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
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
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) {
|
||||||
|
if (reg.test(k)) {
|
||||||
|
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||||
|
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
questionId: this.parentQsId,
|
||||||
|
rowId: this.questionForm.RowId,
|
||||||
|
rowIndex: this.answers.RowIndex,
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
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) {
|
||||||
|
// 保存成功!
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
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 })
|
||||||
|
this.$emit('close')
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleDelete() {
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:reading:warnning:msg48'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
if (this.questionForm.RowId) {
|
||||||
|
var param = {
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
questionId: this.parentQsId,
|
||||||
|
rowId: this.questionForm.RowId
|
||||||
|
}
|
||||||
|
const res = await deleteReadingRowAnswer(param)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
// '删除成功!'
|
||||||
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
loading.close()
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleClose() {
|
||||||
|
if (!this.questionForm.RowId) {
|
||||||
|
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:reading:warnning:msg49'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||||
|
} else {
|
||||||
|
this.$emit('close')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.measurement-form{
|
||||||
|
/deep/ .el-form-item__label{
|
||||||
|
color: #c3c3c3;
|
||||||
|
}
|
||||||
|
/deep/ .el-input .el-input__inner{
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ddd;
|
||||||
|
border: 1px solid #5e5e5e;
|
||||||
|
}
|
||||||
|
/deep/ .el-form-item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
/deep/ .el-form-item__content{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
/deep/ .el-input.is-disabled .el-input__inner{
|
||||||
|
background-color: #646464a1;
|
||||||
|
}
|
||||||
|
/deep/ .el-select.is-disabled .el-input__inner{
|
||||||
|
background-color: #646464a1;
|
||||||
|
}
|
||||||
|
/deep/ .el-button--mini, .el-button--mini.is-round {
|
||||||
|
padding: 7px 10px;
|
||||||
|
}
|
||||||
|
.el-form-item__content
|
||||||
|
.el-select{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.input-width1{
|
||||||
|
width: calc(100% -60px)!important;
|
||||||
|
}
|
||||||
|
.input-width2{
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,623 @@
|
||||||
|
<template>
|
||||||
|
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||||
|
|
||||||
|
<div class="container" :style="{'height':height+'px'}">
|
||||||
|
<div class="basic-info">
|
||||||
|
<h3 v-if="isReadingShowSubjectInfo">
|
||||||
|
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||||
|
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||||
|
</h3>
|
||||||
|
<div v-if="readingTaskState < 2">
|
||||||
|
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||||
|
<i
|
||||||
|
class="el-icon-refresh-left"
|
||||||
|
@click="resetMeasuredData"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 非测量问题 -->
|
||||||
|
<div class="lesions">
|
||||||
|
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" />
|
||||||
|
</div>
|
||||||
|
<!-- 测量问题 -->
|
||||||
|
<template v-if="questions.length > 0 && CriterionType !== 10">
|
||||||
|
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper">
|
||||||
|
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||||
|
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||||
|
</h4>
|
||||||
|
<div class="lesion_list">
|
||||||
|
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||||
|
<div v-if="item.Type === 'table'" class="flex-row" style="margin:3px 0;">
|
||||||
|
<div class="title">{{ item.QuestionName }}</div>
|
||||||
|
<div v-if="readingTaskState < 2" class="add-icon" @click.prevent="handleAdd(item)">
|
||||||
|
<i class="el-icon-plus" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-collapse
|
||||||
|
v-if="item.Type === 'table' && item.TableQuestions"
|
||||||
|
v-model="activeName"
|
||||||
|
accordion
|
||||||
|
@change="handleCollapseChange"
|
||||||
|
>
|
||||||
|
<el-collapse-item
|
||||||
|
v-for="(q,i) in item.TableQuestions.Answers"
|
||||||
|
:key="`${item.Id}_${q.RowIndex}`"
|
||||||
|
:name="`${item.Id}_${q.RowIndex}`"
|
||||||
|
>
|
||||||
|
<template slot="title">
|
||||||
|
<div style="width:300px;position: relative;" :style="{color:(activeName===item.Id+q.RowIndex?'#ffeb3b':'#fff')}">
|
||||||
|
|
||||||
|
{{ getLesionName(item.OrderMark,q.RowIndex) }}
|
||||||
|
<!-- 未保存 -->
|
||||||
|
<!-- <el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 0" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||||
|
<i class="el-icon-warning" style="color:red" />
|
||||||
|
</el-tooltip> -->
|
||||||
|
<!-- 信息不完整 -->
|
||||||
|
<!-- <el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) ===1" class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')" placement="bottom">
|
||||||
|
<i class="el-icon-warning" style="color:#ff9800" />
|
||||||
|
</el-tooltip> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<QuestionForm
|
||||||
|
:ref="`${item.Id}_${q.RowIndex}`"
|
||||||
|
:questions="item.TableQuestions.Questions"
|
||||||
|
:answers="item.TableQuestions.Answers[i]"
|
||||||
|
:lesion-type="item.LesionType"
|
||||||
|
:order-mark="item.OrderMark"
|
||||||
|
:table-questions="tableQuestions"
|
||||||
|
:row-index="String(q.RowIndex)"
|
||||||
|
:question-name="item.QuestionName"
|
||||||
|
:parent-qs-id="item.Id"
|
||||||
|
:visit-task-id="visitTaskId"
|
||||||
|
:is-current-task="isCurrentTask"
|
||||||
|
:reading-task-state="readingTaskState"
|
||||||
|
:is-base-line-task="isBaseLineTask"
|
||||||
|
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
|
||||||
|
@determineExistsUnsavedLession="determineExistsUnsavedLession"
|
||||||
|
@resetQuestions="resetQuestions"
|
||||||
|
@close="close"
|
||||||
|
/>
|
||||||
|
</el-collapse-item>
|
||||||
|
|
||||||
|
</el-collapse>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { resetReadingTask } from '@/api/reading'
|
||||||
|
import DicomEvent from './../DicomEvent'
|
||||||
|
import store from '@/store'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import Questions from './../Questions'
|
||||||
|
import QuestionForm from './QuestionForm'
|
||||||
|
export default {
|
||||||
|
name: 'MeasurementList',
|
||||||
|
components: {
|
||||||
|
Questions,
|
||||||
|
QuestionForm
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
isShow: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isReadingShowSubjectInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
questionFormChangeState: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
questionFormChangeNum: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
height: window.innerHeight - 140,
|
||||||
|
questions: [],
|
||||||
|
activeName: '',
|
||||||
|
activeItem: {
|
||||||
|
activeRowIndex: null,
|
||||||
|
activeCollapseId: null
|
||||||
|
},
|
||||||
|
visitTaskId: '',
|
||||||
|
isCurrentTask: false,
|
||||||
|
loading: false,
|
||||||
|
unSaveTargets: [],
|
||||||
|
temporaryLesions: [],
|
||||||
|
readingTaskState: 2,
|
||||||
|
isBaseLineTask: false,
|
||||||
|
taskBlindName: '',
|
||||||
|
tableQuestions: [],
|
||||||
|
isFirstRender: false,
|
||||||
|
CriterionType: null,
|
||||||
|
subjectCode: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['visitTaskList', 'language', 'lastCanvasTaskId', 'currentReadingTaskState'])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
lastCanvasTaskId: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.initList()
|
||||||
|
}
|
||||||
|
console.log('lastCanvasTaskId', val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
currentReadingTaskState: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.readingTaskState = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
|
this.subjectCode = localStorage.getItem('subjectCode')
|
||||||
|
window.addEventListener('message', this.receiveMsg)
|
||||||
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
this.setCollapseActive(measureData)
|
||||||
|
console.log('setCollapseActive')
|
||||||
|
})
|
||||||
|
DicomEvent.$on('changeLesionType', (questionsObj) => {
|
||||||
|
this.changeLesionType(questionsObj)
|
||||||
|
console.log('changeLesionType')
|
||||||
|
})
|
||||||
|
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||||
|
callback([])
|
||||||
|
})
|
||||||
|
|
||||||
|
window.addEventListener('resize', this.setHeight)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
DicomEvent.$off('setCollapseActive')
|
||||||
|
DicomEvent.$off('changeLesionType')
|
||||||
|
DicomEvent.$off('getUnSaveTarget')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initList() {
|
||||||
|
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.lastCanvasTaskId)
|
||||||
|
if (i > -1) {
|
||||||
|
this.visitTaskId = this.visitTaskList[i].VisitTaskId
|
||||||
|
this.taskBlindName = this.visitTaskList[i].TaskBlindName
|
||||||
|
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
|
||||||
|
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
|
||||||
|
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
if (!this.visitTaskList[i].IsInit) {
|
||||||
|
var loading = this.$loading({ fullscreen: true })
|
||||||
|
var triald = this.trialId = this.$router.currentRoute.query.trialId
|
||||||
|
if (!this.visitTaskList[i].studyListInit) {
|
||||||
|
await store.dispatch('reading/getStudyInfo', { trialId: triald, subjectVisitId: this.visitTaskList[i].VisitId, visitTaskId: this.visitTaskList[i].VisitTaskId, taskBlindName: this.visitTaskList[i].TaskBlindName })
|
||||||
|
}
|
||||||
|
if (!this.visitTaskList[i].readingQuestionsInit) {
|
||||||
|
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: triald, visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
}
|
||||||
|
if (!this.visitTaskList[i].questionsInit) {
|
||||||
|
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
}
|
||||||
|
|
||||||
|
await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[i].VisitTaskId })
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
this.questions = this.visitTaskList[i].ReadingQuestions
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
||||||
|
this.getTableQuestions()
|
||||||
|
this.tableQuestions.forEach(item => {
|
||||||
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
|
var refName = `${item.Id}_${i.RowIndex}`
|
||||||
|
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async resetQuestions(obj) {
|
||||||
|
this.setQuestions(this.questions, obj)
|
||||||
|
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
||||||
|
|
||||||
|
this.getTableQuestions()
|
||||||
|
},
|
||||||
|
setQuestions(questions, obj) {
|
||||||
|
questions.forEach(item => {
|
||||||
|
if (item.Type === 'table' && item.Id === obj.questionId) {
|
||||||
|
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
|
||||||
|
item.TableQuestions.Answers[idx].isLymphLesion = obj.isLymphLesion
|
||||||
|
item.TableQuestions.Answers[idx].loctation = obj.lesionOrgan
|
||||||
|
item.TableQuestions.Answers[idx].lesionPart = obj.lesionPart
|
||||||
|
item.TableQuestions.Answers[idx].lesionLength = obj.lesionLength
|
||||||
|
item.TableQuestions.Answers[idx].lesionShort = obj.lesionShort
|
||||||
|
item.TableQuestions.Answers[idx].lesionState = obj.lesionState
|
||||||
|
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum
|
||||||
|
|
||||||
|
for (const i in obj.anwsers) {
|
||||||
|
item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.setQuestions(item.Childrens, obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQuestions(questions) {
|
||||||
|
questions.forEach(item => {
|
||||||
|
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||||
|
item.TableQuestions.Answers.forEach(answerObj => {
|
||||||
|
if (answerObj.RowId) {
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', 2)
|
||||||
|
} else {
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getQuestions(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return questions
|
||||||
|
},
|
||||||
|
getTableQuestions() {
|
||||||
|
this.tableQuestions = []
|
||||||
|
this.questions.map(item => {
|
||||||
|
if (item.Type === 'table') {
|
||||||
|
this.tableQuestions.push(item)
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getTableQuestionsChild(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTableQuestionsChild(obj) {
|
||||||
|
obj.map(item => {
|
||||||
|
if (item.Type === 'table') {
|
||||||
|
this.tableQuestions.push(item)
|
||||||
|
}
|
||||||
|
if (item.Childrens.length > 0) {
|
||||||
|
this.getTableQuestionsChild(item.Childrens)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refreshReadingQuestionAndAnswer(type) {
|
||||||
|
if (type === 0) {
|
||||||
|
// 删除
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
|
},
|
||||||
|
getReadingQuestionAndAnswer() {
|
||||||
|
return new Promise(async resolve => {
|
||||||
|
try {
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
await store.dispatch('reading/refreshReadingQuestionAndAnswer', { trialId: this.$router.currentRoute.query.trialId, visitTaskId: this.visitTaskId }).then(() => {
|
||||||
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
|
if (idx > -1) {
|
||||||
|
if (this.visitTaskList[idx].ReadingQuestions.length > 0) {
|
||||||
|
this.questions = this.visitTaskList[idx].ReadingQuestions
|
||||||
|
}
|
||||||
|
this.readingTaskState = this.visitTaskList[idx].ReadingTaskState
|
||||||
|
this.isBaseLineTask = this.visitTaskList[idx].IsBaseLineTask
|
||||||
|
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
|
||||||
|
}
|
||||||
|
this.getTableQuestions()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.tableQuestions.forEach(item => {
|
||||||
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
|
var refName = `${item.Id}_${i.RowIndex}`
|
||||||
|
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
resolve()
|
||||||
|
} catch (e) { console.log(e) }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setHeight() {
|
||||||
|
this.height = window.innerHeight - 140
|
||||||
|
},
|
||||||
|
getQuestionAnswer(questions, questionMark, answers) {
|
||||||
|
var idx = questions.findIndex(i => i.QuestionMark === questionMark)
|
||||||
|
if (idx > -1) {
|
||||||
|
var questionId = questions[idx].Id
|
||||||
|
return answers[questionId]
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isCanActiveTool(toolName) {
|
||||||
|
return { isCanActiveTool: true, reason: '' }
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleAdd(qs) {
|
||||||
|
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
|
||||||
|
let msg = this.$t('trials:reading:warnning:msg14')
|
||||||
|
// msg = msg.replace('xxx', qs.QuestionName)
|
||||||
|
msg = msg.replace('xxx', qs.MaxQuestionCount)
|
||||||
|
this.$confirm(msg, {
|
||||||
|
type: 'warning',
|
||||||
|
showCancelButton: false,
|
||||||
|
callback: action => {}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// saveTypeEnum: 0
|
||||||
|
var obj = { saveTypeEnum: 0 }
|
||||||
|
// var questions = qs.TableQuestions.Questions.find(item => item.QuestionMark === 3)
|
||||||
|
// if (questions) {
|
||||||
|
// console.log(questions)
|
||||||
|
// var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
||||||
|
// obj.RowIndex = `${maxIndex + 1}.00`
|
||||||
|
// obj[questions.Id] = `${qs.OrderMark}${String(maxIndex + 1).padStart(2, '0')}`
|
||||||
|
// }
|
||||||
|
var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
||||||
|
obj.RowIndex = `${maxIndex + 1}.00`
|
||||||
|
obj.IsDicomReading = true
|
||||||
|
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: qs.LesionType, visitTaskId: this.visitTaskId, lesionObj: obj })
|
||||||
|
|
||||||
|
this.activeItem.activeRowIndex = String(obj.RowIndex)
|
||||||
|
this.activeItem.activeCollapseId = qs.Id
|
||||||
|
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getMaxRowIndex(answerList) {
|
||||||
|
if (answerList.length > 0) {
|
||||||
|
var arr = []
|
||||||
|
answerList.forEach(item => {
|
||||||
|
var rowIndex = item.RowIndex
|
||||||
|
arr.push(parseInt(rowIndex))
|
||||||
|
})
|
||||||
|
var max = Math.max.apply(null, arr)
|
||||||
|
return max
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
determineExistsUnsavedLession(callback) {
|
||||||
|
callback(true)
|
||||||
|
return
|
||||||
|
},
|
||||||
|
getLesionName(orderMark, rowIndex) {
|
||||||
|
var lessionName = ''
|
||||||
|
var rowIndexArr = rowIndex.split('.')
|
||||||
|
var x = parseInt(rowIndexArr[0])
|
||||||
|
var y = parseInt(rowIndexArr[1])
|
||||||
|
if (y > 0) {
|
||||||
|
y = String.fromCharCode(parseInt(rowIndexArr[1]) - 1 + 65 + 32)
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}${y}`
|
||||||
|
} else {
|
||||||
|
lessionName = `${orderMark}${String(x).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return lessionName
|
||||||
|
},
|
||||||
|
handleCollapseChange(val) {
|
||||||
|
if (this.activeName) {
|
||||||
|
var arr = this.activeName.split('_')
|
||||||
|
this.activeItem.activeRowIndex = arr[1]
|
||||||
|
this.activeItem.activeCollapseId = arr[0]
|
||||||
|
} else {
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
collapseRightClick(e, obj, activeCollapseId, activeRowIndex) {
|
||||||
|
e.stopImmediatePropagation()
|
||||||
|
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) {
|
||||||
|
|
||||||
|
},
|
||||||
|
modifyMeasuredData(measureObj) {
|
||||||
|
},
|
||||||
|
// 设置测量数据
|
||||||
|
setMeasuredData(measureData) {
|
||||||
|
|
||||||
|
},
|
||||||
|
async close(questionsObj) {
|
||||||
|
if (questionsObj) {
|
||||||
|
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
|
||||||
|
}
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
this.activeName = ''
|
||||||
|
},
|
||||||
|
getECRFQuestions(obj) {
|
||||||
|
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||||
|
},
|
||||||
|
async resetMeasuredData() {
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||||
|
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
// 刷新标注、表单、报告页信息
|
||||||
|
this.activeName = ''
|
||||||
|
this.activeItem.activeRowIndex = null
|
||||||
|
this.activeItem.activeCollapseId = null
|
||||||
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
|
const triald = this.$router.currentRoute.query.trialId
|
||||||
|
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||||
|
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
loading.close()
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
receiveMsg(event) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.measurement-wrapper{
|
||||||
|
overflow-y: auto;
|
||||||
|
// overflow: hidden;
|
||||||
|
|
||||||
|
.container{
|
||||||
|
padding: 10px;
|
||||||
|
.basic-info{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
h3{
|
||||||
|
color: #ddd;
|
||||||
|
padding: 5px 0px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
i{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.add-icon{
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 15px;
|
||||||
|
border: 1px solid #938b8b;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.add-icon:hover{
|
||||||
|
background-color: #607d8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-row{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #424242;
|
||||||
|
|
||||||
|
}
|
||||||
|
.lesion_list{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.el-collapse{
|
||||||
|
border-bottom:none;
|
||||||
|
border-top:none;
|
||||||
|
/deep/ .el-collapse-item{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__header{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
border-bottom-color:#5a5a5a;
|
||||||
|
padding-left: 5px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__wrap{
|
||||||
|
background-color: #000!important;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
/deep/ .el-collapse-item__content{
|
||||||
|
width:260px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
// border: 1px solid #ffeb3b;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
z-index: 1;
|
||||||
|
color: #ddd;
|
||||||
|
padding: 5px;
|
||||||
|
background-color:#1e1e1e;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -294,7 +294,14 @@ export default {
|
||||||
store.dispatch('reading/setImageloadedInfo', item)
|
store.dispatch('reading/setImageloadedInfo', item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var i = res.findIndex(s => s.isCurrentTask)
|
var i = -1
|
||||||
|
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
||||||
|
if (isReadingTaskViewInOrder === 2) {
|
||||||
|
// 受试者内随机
|
||||||
|
i = res.length === 2 ? 1 : -1
|
||||||
|
} else {
|
||||||
|
i = res.findIndex(s => s.isCurrentTask)
|
||||||
|
}
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
|
@ -377,8 +384,23 @@ export default {
|
||||||
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
this.studyList = this.visitTaskList[idx].StudyList
|
this.studyList = this.visitTaskList[idx].StudyList
|
||||||
if (this.visitTaskList[idx].IsBaseLineTask || isReadingTaskViewInOrder !== 1) {
|
if (isReadingTaskViewInOrder === 2) {
|
||||||
// 基线
|
// 受试者内随机
|
||||||
|
const studyList = this.visitTaskList[idx].StudyList.filter(i => i.IsDicom)
|
||||||
|
const seriesArr = studyList.map(s => s.SeriesList).flat()
|
||||||
|
if (seriesArr.length === 1) {
|
||||||
|
seriesList.push(seriesArr[0], seriesArr[0])
|
||||||
|
this.studyIndex = seriesArr[0].studyIndex
|
||||||
|
this.seriesIndex = seriesArr[0].seriesIndex
|
||||||
|
this.activeNames = [`${seriesArr[0].studyId}`]
|
||||||
|
} else if (seriesArr.length > 1) {
|
||||||
|
seriesList.push(seriesArr[0], seriesArr[1])
|
||||||
|
this.studyIndex = seriesArr[1].studyIndex
|
||||||
|
this.seriesIndex = seriesArr[1].seriesIndex
|
||||||
|
this.activeNames = [`${seriesArr[1].studyId}`]
|
||||||
|
}
|
||||||
|
} else if (this.visitTaskList[idx].IsBaseLineTask || isReadingTaskViewInOrder === 0) {
|
||||||
|
// 基线任务或完全随机
|
||||||
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
|
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
|
||||||
if (Object.keys(obj).length !== 0) {
|
if (Object.keys(obj).length !== 0) {
|
||||||
this.studyIndex = obj.studyIndex
|
this.studyIndex = obj.studyIndex
|
||||||
|
|
Loading…
Reference in New Issue