irc_web/.svn/pristine/00/00a4546bcce04de46a9eee72f53...

717 lines
29 KiB
Plaintext

<template>
<div>
<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;">
{{ qs.GroupName }}
</h4>
<div class="lesion_list">
<div v-for="item in qs.Childrens" v-show="!(isBaseLineTask && item.LesionType === 2) && !(isBaseLineTask && item.LesionType === 3)" :key="item.Id">
<!-- <div v-for="item in qs.Childrens" :key="item.Id">-->
<div v-if="item.Type === 'table'" class="flex-row">
<div class="title">{{ item.QuestionName }}</div>
<div v-if="readingTaskState<2 && (isBaseLineTask || item.LesionType === 2)" class="add-icon" @click.prevent="handleAdd(item)">
<i class="el-icon-plus" />
</div>
</div>
<!-- @change="handleCollapseChange(qs.Childrens,item)" -->
<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="i"
: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, qs.Childrens) }}
<!-- <el-tooltip v-if="!item.TableQuestions.Answers[i].isLesionSaved" class="item" effect="dark" content="未保存" placement="bottom">-->
<!-- <i class="el-icon-warning" style="color:red" />-->
<!-- </el-tooltip>-->
<el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) === 0" class="item" effect="dark" content="未保存" 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 && item.LesionType !== 4" class="item" effect="dark" content="已更新,未保存" placement="bottom">
<i class="el-icon-warning" style="color:#ff9800" />
</el-tooltip>
<div style="position: absolute;left: 60px;top: 2px;">
<div style="display: flex;flex-direction: row;font-size: 10px;width:200px;">
<div v-if="item.TableQuestions.Answers[i].lesionPart" style="margin-left:10px;margin-bottom:5px;">
{{ item.TableQuestions.Answers[i].lesionPart }}
</div>
<div v-if="item.TableQuestions.Answers[i].lesionState" style="margin-left:10px;margin-bottom:5px;">
{{ $fd('EvaluationOfState',parseInt(item.TableQuestions.Answers[i].lesionState)) }}
</div>
</div>
</div>
</div>
</template>
<PCWG3QuestionsForm
: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>
</div>
</template>
<script>
import DicomEvent from '../DicomEvent'
import PCWG3QuestionsForm from './PCWG3QuestionsForm'
import store from '@/store'
import { mapGetters } from 'vuex'
export default {
name: 'PCWG3Questions',
components: {
PCWG3QuestionsForm
},
props: {
questions: {
type: Array,
default() { return [] }
},
readingTaskStateParent: {
type: Number,
default() { return 0 }
}
},
data() {
return {
loading: false,
activeName: null,
isBaseLineTask: false,
readingTaskState: 0,
tableQuestions: [],
unSaveTargets: [],
activeItem: {
activeRowIndex: null,
activeCollapseId: null
},
visitTaskId: '',
isFirstRender: false,
isCurrentTask: false,
TaskNum: null,
BlindName: null,
isMax: false
}
},
computed: {
...mapGetters(['visitTaskList'])
},
watch: {
readingTaskStateParent(v) {
this.readingTaskState = v
},
activeName(v) {
if (v) {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$nextTick(() => {
if (this.$refs[refName][0].questionForm && !this.$refs[refName][0].questionForm.MeasureData) {
DicomEvent.$emit('PGWC3Active')
}
})
}
}
},
mounted() {
DicomEvent.$on('loadMeasurementList', async obj => {
this.initPage(obj)
})
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
var list = this.getAllUnSaveLesions()
callback(list)
})
DicomEvent.$on('setCollapseActive', measureData => {
this.setCollapseActive(measureData)
})
},
methods: {
modifyMeasuredData(measureObj) {
if (measureObj.questionInfo) {
this.activeItem.activeCollapseId = measureObj.questionInfo.QuestionId
this.activeItem.activeRowIndex = String(measureObj.questionInfo.RowIndex)
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$refs[refName][0].setMeasureData(measureObj.measureData)
}
},
setMeasuredData(measureData) {
if (this.activeItem.activeCollapseId) {
// 判断是否存在测量数据
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if ((this.$refs[refName][0].questionForm && this.$refs[refName][0].questionForm.MeasureData && measureData.data.uuid === this.$refs[refName][0].questionForm.MeasureData.data.uuid) || !this.$refs[refName][0].questionForm.MeasureData) {
this.$refs[refName][0].setMeasureData(measureData)
} else {
if (this.isBaseLineTask) {
this.createNTTarget(measureData)
} else {
this.createNLTarget(measureData)
}
}
})
} else {
if (this.isBaseLineTask) {
this.createNTTarget(measureData)
} else {
this.createNLTarget(measureData)
}
}
},
createNTTarget(measureData) {
var idx = this.tableQuestions.findIndex(item => item.LesionType === 4)
if (idx > -1) {
this.addTarget(this.tableQuestions[idx], measureData)
}
},
setCollapseActive(measureData) {
if (measureData) {
if (this.activeItem.activeRowIndex === measureData.RowIndex && this.activeItem.activeCollapseId === measureData.QuestionId) {
return
} else {
this.activeItem.activeCollapseId = measureData.QuestionId
this.activeItem.activeRowIndex = measureData.RowIndex
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
}
}
},
// 创建新病灶
createNLTarget(measureData) {
var idx = this.tableQuestions.findIndex(item => item.LesionType === 2)
var idx2 = this.tableQuestions.findIndex(item => item.LesionType === 3)
if (idx > -1) {
this.addTarget(this.tableQuestions[idx], measureData, this.tableQuestions[idx2])
}
},
async addTarget(target, measureData, atarget) {
var obj = { saveTypeEnum: 0 }
// obj.RowIndex = target.TableQuestions.Answers.length + 1
// var questions = target.TableQuestions.Questions.find(item => item.QuestionMark === 3)
var questions2 = target.TableQuestions.Questions.find(item => item.QuestionMark === 9)
var questions3 = target.TableQuestions.Questions.find(item => item.QuestionMark === 7)
questions3 && (obj[questions3.Id] = 2)
// if (questions) {
// var maxIndex = this.getMaxRowIndex(target.TableQuestions.Answers)
// if (maxIndex < 1 && !this.isBaseLineTask) {
// maxIndex = this.getMaxRowIndex(atarget.TableQuestions.Answers)
// }
// obj.RowIndex = `${maxIndex + 1}.00`
// obj[questions.Id] = `${target.OrderMark}${String(maxIndex + 1).padStart(2, '0')}`
// }
var maxIndex = this.getMaxRowIndex(target.TableQuestions.Answers)
if (maxIndex < 1 && !this.isBaseLineTask) {
maxIndex = this.getMaxRowIndex(atarget.TableQuestions.Answers)
}
obj.RowIndex = `${maxIndex + 1}.00`
if (questions2) {
obj[questions2.Id] = this.BlindName
obj['BlindName'] = this.BlindName
obj['TaskNum'] = this.TaskNum
}
// target.TableQuestions.Answers.push(obj)
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: target.LesionType, visitTaskId: this.visitTaskId, lesionObj: obj })
this.activeItem.activeRowIndex = String(obj.RowIndex)
this.activeItem.activeCollapseId = target.Id
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$nextTick(() => {
this.$refs[refName][0].setMeasureData(measureData)
})
},
determineExistsUnsavedLession(callback) {
// const loading = this.$loading({ fullscreen: true })
this.getUnSaveTarget()
if (this.unSaveTargets.length > 0) {
var rowIndex = String(this.unSaveTargets[0].rowIndex)
var questionId = this.unSaveTargets[0].questionId
if (rowIndex === String(this.activeItem.activeRowIndex) && questionId === this.activeItem.activeCollapseId) {
callback(true)
// loading.close()
return
} else {
this.$confirm(`病灶${this.unSaveTargets[0].lessionName}信息未保存,不允许执行此操作!`, {
type: 'warning',
showCancelButton: false,
callback: action => { }
})
callback(false)
// loading.close()
return
}
}
callback(true)
// loading.close()
return
},
getReadingQuestionAndAnswer() {
return new Promise(async resolve => {
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][0].initForm()
})
})
})
})
await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
DicomEvent.$emit('getMeasureData')
loading.close()
resolve()
})
},
// getReadingQuestionAndAnswer() {
// return new Promise(async resolve => {
// const loading = this.$loading({ fullscreen: true })
// await store.dispatch('reading/getReadingQuestionAndAnswer', { 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()
// })
// await store.dispatch('reading/getMeasuredData', this.visitTaskId)
// DicomEvent.$emit('getMeasureData')
// loading.close()
// resolve()
// })
// },
getUnSaveTarget() {
this.unSaveTargets = []
this.isMax = false
this.tableQuestions.map(item => {
if (item.TableQuestions && item.TableQuestions.Answers && item.TableQuestions.Answers.length < item.MaxQuestionCount) {
item.TableQuestions.Answers.map(t => {
if (!t.RowId) {
var lessionName = this.getLesionName(item.OrderMark, t.RowIndex)
this.unSaveTargets.push({ lessionName: lessionName, rowIndex: t.RowIndex, questionId: item.Id })
}
})
} else {
this.isMax = true
if (this.isBaseLineTask) {
this.isMax = false
}
if (item.MaxQuestionCount === null) {
this.isMax = false
}
}
})
return this.unSaveTargets
},
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) {
if (i === 'MeasureData' && obj.anwsers[i]) {
item.TableQuestions.Answers[idx].InstanceId = obj.anwsers[i].instanceId
item.TableQuestions.Answers[idx].SeriesId = obj.anwsers[i].seriesId
item.TableQuestions.Answers[idx][i] = JSON.stringify(obj.anwsers[i])
item.TableQuestions.Answers[idx].isDicomReading = !(obj.anwsers[i].IsDicomReading === false || obj.anwsers[i].IsDicomReading === 'False')
} else {
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 => {
this.$set(answerObj, 'loctation', this.getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj))
this.$set(answerObj, 'lesionLength', this.getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj))
this.$set(answerObj, 'lesionShort', this.getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj))
var isLymphLesion = this.getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
this.$set(answerObj, 'isLymphLesion', isLymphLesion)
this.$set(answerObj, 'isLesionSaved', true)
var lesionState = this.getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)
lesionState = !isNaN(parseInt(lesionState)) ? parseInt(lesionState) : ''
this.$set(answerObj, 'lesionState', lesionState)
if (answerObj.RowId) {
this.$set(answerObj, 'saveTypeEnum', isNaN(parseInt(lesionState)) ? 1 : 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)
}
})
},
getLesionName(orderMark, rowIndex, qs) {
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
},
handleAdd(qs) {
this.getUnSaveTarget()
if (this.unSaveTargets.length > 0) {
this.$confirm(`病灶${this.unSaveTargets[0].lessionName}信息未保存,不允许继续添加!`, {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
return
}
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
this.$confirm(`${qs.QuestionName}个数最多不能超过${qs.MaxQuestionCount}个`, {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
} else {
var obj = { saveTypeEnum: 0 }
var idx2 = this.tableQuestions.findIndex(item => item.LesionType === 3)
var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
if (maxIndex < 1) {
maxIndex = this.getMaxRowIndex(this.tableQuestions[idx2].TableQuestions.Answers)
}
obj.RowIndex = `${maxIndex + 1}.00`
qs.TableQuestions.Questions.forEach(item => {
if (item.QuestionMark === 9) {
obj[item.Id] = this.BlindName
obj['BlindName'] = this.BlindName
obj['TaskNum'] = this.TaskNum
} else if (item.QuestionMark === 7) {
console.log('状态')
obj[item.Id] = 2
} else {
obj[item.Id] = ''
}
})
qs.TableQuestions.Answers.push(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
}
},
handleCollapseChange(val) {
console.log(this.activeName)
if (this.activeName) {
var arr = this.activeName.split('_')
this.activeItem.activeRowIndex = arr[1]
this.activeItem.activeCollapseId = arr[0]
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if (this.$refs[refName][0].questionForm.IsDicomReading !== false) {
DicomEvent.$emit('imageLocation', { questionId: this.activeItem.activeCollapseId, rowIndex: this.activeItem.activeRowIndex, visitTaskId: this.visitTaskId, lesionName: this.$refs[refName][0].lesionName, lesionType: this.$refs[refName][0].lesionType })
}
})
} else {
this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null
}
},
getAllUnSaveLesions() {
var arr = []
console.log(this.tableQuestions)
this.tableQuestions.map(item => {
if (item.TableQuestions && item.TableQuestions.Answers) {
item.TableQuestions.Answers.map(t => {
const refName = `${item.Id}_${t.RowIndex}`
if (this.$refs[refName] && this.$refs[refName][0] && this.$refs[refName][0].questionForm.saveTypeEnum !== 2) {
var lessionName = this.getLesionName(item.OrderMark, t.RowIndex)
arr.push({ lessionName: lessionName, rowIndex: t.RowIndex, questionId: item.Id })
}
})
}
})
return arr
},
initPage(obj) {
console.log(this.questions)
if (this.visitTaskId !== obj.visitTaskId) {
this.visitTaskId = obj.visitTaskId
this.taskBlindName = obj.taskBlindName
this.activeName = ''
this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null
// this.$refs['ecrf'].getQuestions(obj.visitTaskId)
this.$emit('getECRFQuestions', obj)
}
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.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.TaskNum = this.visitTaskList[idx].VisitTaskNum
this.BlindName = this.visitTaskList[idx].TaskBlindName
this.getTableQuestions()
if (this.isFirstRender) {
this.$nextTick(() => {
this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => {
var refName = `${item.Id}_${i.RowIndex}`
this.$refs[refName][0].initForm()
})
})
})
}
}
if (!this.isFirstRender) {
this.isFirstRender = true
}
},
isCanActiveTool(toolName) {
this.getUnSaveTarget()
if (!this.activeName) {
if (this.isMax) {
return { isCanActiveTool: false, reason: `新病灶已到达最大数,无法添加` }
}
} else {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if (this.$refs[refName][0].questionForm.MeasureData && this.isMax) {
return { isCanActiveTool: false, reason: `新病灶已到达最大数,无法添加` }
}
}
if (this.unSaveTargets.length > 0) {
var rowIndex = String(this.unSaveTargets[0].rowIndex)
var questionId = this.unSaveTargets[0].questionId
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && !this.$refs[refName][0].questionForm.MeasureData) {
return this.checkToolCanActive(toolName)
} else {
return { isCanActiveTool: false, reason: `病灶${this.unSaveTargets[0].lessionName}信息未保存,不允许继续添加!` }
}
} else {
if (this.activeItem.activeCollapseId) {
return this.checkToolCanActive(toolName)
} else {
if (toolName === 'ArrowAnnotate' || toolName === 'Bidirectional' || toolName === 'Length') {
return { isCanActiveTool: true, reason: '' }
} else {
return { isCanActiveTool: false, reason: '' }
}
}
}
},
checkToolCanActive(toolName) {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
var isLymphNodes = this.$refs[refName][0].getQuestionVal(2)
isLymphNodes = !isNaN(parseInt(isLymphNodes)) ? parseInt(isLymphNodes) : null
if (!this.$refs[refName][0].questionForm.MeasureData) {
if (this.isBaseLineTask) {
if (this.$refs[refName][0].lesionType === 0 && isLymphNodes === 1 && toolName !== 'Bidirectional') {
return { isCanActiveTool: false, reason: '淋巴结靶病灶需使用长短径测量工具' }
} else if (this.$refs[refName][0].lesionType === 0 && isLymphNodes === 0 && toolName !== 'Length') {
return { isCanActiveTool: false, reason: '非淋巴结靶病灶需使用长径测量工具' }
} else if (this.$refs[refName][0].lesionType === 1 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '淋巴结非靶病灶需使用长短径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 1 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '非淋巴结非靶病灶需使用长径测量工具或标注工具' }
} else {
return { isCanActiveTool: true, reason: '' }
}
} else {
if (this.$refs[refName][0].lesionType === 0 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '淋巴结靶病灶需使用长短径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 0 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '淋巴结f非靶病灶需使用长径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 1 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '淋巴结非靶病灶需使用长短径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 1 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '非淋巴结非靶病灶需使用长径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 2 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '淋巴结新病灶需使用长短径测量工具或标注工具' }
} else if (this.$refs[refName][0].lesionType === 2 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') {
return { isCanActiveTool: false, reason: '非淋巴结新病灶需使用长径测量工具或标注工具' }
} else {
return { isCanActiveTool: true, reason: '' }
}
}
} else {
return { isCanActiveTool: true, reason: '' }
}
},
async close(questionsObj) {
if (questionsObj) {
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
}
this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null
this.activeName = ''
}
}
}
</script>
<style lang="scss" scoped>
.measurement-wrapper{
overflow-y: auto;
// overflow: hidden;
.container{
padding: 10px;
}
.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;
>>>.el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
padding-left: 5px;
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;
right: 0px;
border: 1px solid #ffeb3b;
z-index: 1;
color: #ddd;
padding: 5px;
background-color:#1e1e1e;
}
}
}
</style>