IVUS标准更改
parent
1274af3e48
commit
d42252ea78
|
@ -1065,7 +1065,10 @@ const actions = {
|
|||
return new Promise(resolve => {
|
||||
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
|
||||
if (parseInt(isReadingTaskViewInOrder) === 2) {
|
||||
if (!state.lastCanvasTaskId) state.lastCanvasTaskId = taskId
|
||||
if (!state.lastCanvasTaskId) {
|
||||
console.log('setLastCanvasTaskId')
|
||||
state.lastCanvasTaskId = taskId
|
||||
}
|
||||
} else {
|
||||
state.lastCanvasTaskId = taskId
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
@blur="limitBlur(qs.Id, qs.ValueType)"
|
||||
>
|
||||
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
|
||||
<template v-if="qs.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
|
@ -376,7 +376,6 @@ export default {
|
|||
})
|
||||
},
|
||||
async formItemChange(v, question) {
|
||||
console.log('formItemChange')
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
|
@ -497,6 +496,8 @@ export default {
|
|||
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('refreshQuestions')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
}
|
||||
loading.close()
|
||||
|
|
|
@ -35,62 +35,115 @@
|
|||
{{ 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" />
|
||||
<el-form
|
||||
v-if="questions.length > 0"
|
||||
:ref="`questions${index}`"
|
||||
size="small"
|
||||
:model="questionForm"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<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
|
||||
style="margin-bottom: 10px;"
|
||||
@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>
|
||||
<template v-else>
|
||||
<!-- 数值 -->
|
||||
<el-form-item
|
||||
v-if="item.ShowQuestion!==2"
|
||||
:key="item.Id"
|
||||
:label="`${item.QuestionName}`"
|
||||
:prop="item.Id"
|
||||
:rules="[
|
||||
{ required: (item.IsRequired === 0 || (item.IsRequired ===1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type!=='group' && item.Type!=='summary',
|
||||
message:['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
<!-- 数值类型 -->
|
||||
<template v-if="item.Type==='number'">
|
||||
<el-input
|
||||
v-model="questionForm[item.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 "
|
||||
@change="((val)=>{formItemChange(val, item)})"
|
||||
@blur="limitBlur(item.Id, item.ValueType)"
|
||||
>
|
||||
<template v-if="item.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(item.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<div
|
||||
v-if="isCurrentTask && readingTaskState<2"
|
||||
class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;"
|
||||
>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="!formChanged"
|
||||
@click="handleSave(index)"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</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>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -117,6 +170,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { saveTaskQuestion } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
|
@ -171,7 +225,10 @@ export default {
|
|||
tableQuestions: [],
|
||||
isFirstRender: false,
|
||||
CriterionType: null,
|
||||
subjectCode: ''
|
||||
subjectCode: '',
|
||||
questionForm: {},
|
||||
formChanged: false,
|
||||
digitPlaces: 2
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -184,7 +241,6 @@ export default {
|
|||
if (val) {
|
||||
this.initList()
|
||||
}
|
||||
console.log('lastCanvasTaskId', val)
|
||||
}
|
||||
},
|
||||
currentReadingTaskState: {
|
||||
|
@ -199,6 +255,8 @@ export default {
|
|||
mounted() {
|
||||
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||
this.subjectCode = localStorage.getItem('subjectCode')
|
||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||
window.addEventListener('message', this.receiveMsg)
|
||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
DicomEvent.$on('setCollapseActive', measureData => {
|
||||
|
@ -212,6 +270,9 @@ export default {
|
|||
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||
callback([])
|
||||
})
|
||||
DicomEvent.$on('refreshQuestions', _ => {
|
||||
this.refreshQuestions()
|
||||
})
|
||||
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
|
@ -219,6 +280,7 @@ export default {
|
|||
DicomEvent.$off('setCollapseActive')
|
||||
DicomEvent.$off('changeLesionType')
|
||||
DicomEvent.$off('getUnSaveTarget')
|
||||
DicomEvent.$off('refreshQuestions')
|
||||
},
|
||||
methods: {
|
||||
async initList() {
|
||||
|
@ -249,6 +311,7 @@ export default {
|
|||
loading.close()
|
||||
}
|
||||
this.questions = this.visitTaskList[i].ReadingQuestions
|
||||
this.setQuestionForm(this.questions)
|
||||
this.$nextTick(() => {
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
||||
this.$refs['ecrf2'].getQuestions(this.visitTaskId)
|
||||
|
@ -263,6 +326,18 @@ export default {
|
|||
})
|
||||
}
|
||||
},
|
||||
setQuestionForm(questions) {
|
||||
const type = ['number', 'radio', 'select', 'input', 'textarea', 'calculation']
|
||||
questions.forEach(item => {
|
||||
if (type.includes(item.Type)) {
|
||||
const answer = item.Type === 'number' || item.Type === 'calculation' ? isNaN(parseFloat(item.Answer)) ? null : parseFloat(item.Answer) : item.Answer
|
||||
this.$set(this.questionForm, item.Id, answer)
|
||||
}
|
||||
if (item.Childrens.length > 0) {
|
||||
this.setQuestionForm(item.Childrens)
|
||||
}
|
||||
})
|
||||
},
|
||||
async resetQuestions(obj) {
|
||||
this.setQuestions(this.questions, obj)
|
||||
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
||||
|
@ -342,6 +417,7 @@ export default {
|
|||
if (idx > -1) {
|
||||
if (this.visitTaskList[idx].ReadingQuestions.length > 0) {
|
||||
this.questions = this.visitTaskList[idx].ReadingQuestions
|
||||
this.setQuestionForm(this.questions)
|
||||
}
|
||||
this.readingTaskState = this.visitTaskList[idx].ReadingTaskState
|
||||
this.isBaseLineTask = this.visitTaskList[idx].IsBaseLineTask
|
||||
|
@ -505,6 +581,44 @@ export default {
|
|||
// 设置测量数据
|
||||
setMeasuredData(measureData) {
|
||||
|
||||
},
|
||||
formItemChange() {
|
||||
this.formChanged = true
|
||||
},
|
||||
limitBlur(qId, valueType) {
|
||||
const value = this.questionForm[qId]
|
||||
if (valueType === 0) {
|
||||
this.$set(this.questionForm, qId, parseInt(value))
|
||||
} else if (valueType === 3) {
|
||||
this.$set(this.questionForm, qId, parseFloat(value))
|
||||
} else {
|
||||
this.$set(this.questionForm, qId, parseFloat(value).toFixed(this.digitPlaces))
|
||||
}
|
||||
},
|
||||
async handleSave(index) {
|
||||
const refName = `questions${index}`
|
||||
const valid = await this.$refs[refName][0].validate()
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
answers.push({ id: k, answer: this.questionForm[k] })
|
||||
}
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: answers
|
||||
}
|
||||
try {
|
||||
await saveTaskQuestion(8, params)
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
loading.close()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.refreshQuestions()
|
||||
this.formChanged = false
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
async close(questionsObj) {
|
||||
if (questionsObj) {
|
||||
|
@ -552,6 +666,13 @@ export default {
|
|||
console.log(e)
|
||||
}
|
||||
},
|
||||
async refreshQuestions() {
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||
},
|
||||
receiveMsg(event) {
|
||||
}
|
||||
|
||||
|
@ -611,6 +732,36 @@ export default {
|
|||
}
|
||||
.lesion_list{
|
||||
position: relative;
|
||||
/deep/ .el-form-item__label{
|
||||
color: #c3c3c3;
|
||||
text-align: left;
|
||||
}
|
||||
/deep/ .el-input .el-input__inner{
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
/deep/ .el-form-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
.el-collapse{
|
||||
border-bottom:none;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && (questionForm[question.RelevanceId] === question.RelevanceValue))) && question.Type!=='group' && question.Type!=='summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(question.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
|
||||
]"
|
||||
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
|
||||
:class="[question.Type==='group' ? 'mb' : (question.Type==='upload' || question.QuestionName.length > 15) ?'uploadWrapper' : '']"
|
||||
>
|
||||
<template v-if="question.QuestionType === 60 || question.QuestionType === 61">
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center;">
|
||||
|
@ -220,7 +220,11 @@
|
|||
v-else-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
/>
|
||||
>
|
||||
<template v-if="question.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(question.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
<!-- 上传图像 -->
|
||||
<el-upload
|
||||
v-else-if="question.Type==='upload'"
|
||||
|
@ -461,7 +465,7 @@ export default {
|
|||
}
|
||||
.uploadWrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: column !important;
|
||||
align-items: flex-start;
|
||||
}
|
||||
/deep/ .el-input.is-disabled .el-input__inner{
|
||||
|
@ -470,6 +474,9 @@ export default {
|
|||
/deep/ .el-input-group__append, .el-input-group__prepend{
|
||||
padding: 0 10px;
|
||||
}
|
||||
/deep/ .el-form-item__content {
|
||||
width: 100%;
|
||||
}
|
||||
/deep/ .el-select.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
|
|
@ -374,7 +374,7 @@ export default {
|
|||
DicomEvent.$emit('getReportInfo', true)
|
||||
// DicomEvent.$emit('readingPageUpdate', {})
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
let criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
if (idx > -1 && !this.visitTaskList[idx].IsBaseLineTask && (criterionType === 1 || criterionType === 2 || criterionType === 3 || criterionType === 17)) {
|
||||
if (parseInt(imageQuality) === 2) {
|
||||
this.$confirm(this.$t('trials:reading:warnning:unableEvaluate'), '', {
|
||||
|
|
|
@ -349,8 +349,9 @@ export default {
|
|||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
var sIdx = this.studyList.findIndex(s => s.IsDicom)
|
||||
if (sIdx > -1) {
|
||||
this.studyIndex = sIdx
|
||||
this.seriesIndex = 0
|
||||
console.log(this.studyIndex, this.studyIndex)
|
||||
// this.studyIndex = sIdx
|
||||
// c = 0
|
||||
this.activeNames = [`${this.studyList[sIdx].StudyId}`]
|
||||
// 下载关键序列
|
||||
const i = this.studyList.findIndex(i => i.IsCriticalSequence)
|
||||
|
|
|
@ -267,7 +267,7 @@ export default {
|
|||
// this.readingTool = this.$router.currentRoute.query.readingTool
|
||||
this.TrialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
|
||||
// this.isNewSubject = this.$router.currentRoute.query.isNewSubject
|
||||
localStorage.setItem('isReadingTaskViewInOrder', this.isReadingTaskViewInOrder)
|
||||
|
||||
// if (this.isNewSubject && this.isReadingTaskViewInOrder !== 0) {
|
||||
// // 已开始受试者${this.subjectCode}阅片任务
|
||||
// var msg = this.$t('trials:reading:warnning:msg1')
|
||||
|
@ -332,6 +332,7 @@ export default {
|
|||
this.digitPlaces = res.Result.DigitPlaces
|
||||
this.IseCRFShowInDicomReading = res.Result.IseCRFShowInDicomReading
|
||||
this.isReadingTaskViewInOrder = res.Result.IsReadingTaskViewInOrder
|
||||
localStorage.setItem('isReadingTaskViewInOrder', this.isReadingTaskViewInOrder)
|
||||
localStorage.setItem('CriterionType', res.Result.CriterionType)
|
||||
localStorage.setItem('digitPlaces', res.Result.DigitPlaces)
|
||||
this.readingCategory = res.Result.ReadingCategory
|
||||
|
|
Loading…
Reference in New Issue