Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
605bf04e43
|
@ -19,14 +19,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
:label="$t('trials:reading:title:lesionType')"
|
:label="$t('trials:reading:title:lesionType')"
|
||||||
prop="LesionType"
|
prop="LesionType"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<!-- 下拉框 -->
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="questionForm.LesionType"
|
v-model="questionForm.LesionType"
|
||||||
filterable
|
filterable
|
||||||
|
@ -42,7 +41,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="qs in questions"
|
v-for="qs in questions"
|
||||||
v-show="qs.ShowQuestion!==2"
|
v-show="qs.ShowQuestion!==2"
|
||||||
|
@ -541,9 +540,9 @@ export default {
|
||||||
},
|
},
|
||||||
async handleClose() {
|
async handleClose() {
|
||||||
if (!this.questionForm.RowId) {
|
if (!this.questionForm.RowId) {
|
||||||
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
// '当前数据未保存。如果关闭窗口,将会删除,是否继续?'
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
this.$t('trials:reading:warnning:msg49'),
|
this.$t('trials:reading:warnning:msg60'),
|
||||||
{
|
{
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true
|
||||||
|
|
|
@ -19,14 +19,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
:label="$t('trials:reading:title:lesionType')"
|
:label="$t('trials:reading:title:lesionType')"
|
||||||
prop="LesionType"
|
prop="LesionType"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<!-- 下拉框 -->
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="questionForm.LesionType"
|
v-model="questionForm.LesionType"
|
||||||
filterable
|
filterable
|
||||||
|
@ -42,7 +41,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="qs in questions"
|
v-for="qs in questions"
|
||||||
v-show="qs.ShowQuestion!==2"
|
v-show="qs.ShowQuestion!==2"
|
||||||
|
@ -56,14 +55,34 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- 输入框 -->
|
<!-- 输入框 -->
|
||||||
<template v-if="qs.Type==='input' || qs.Type==='number'">
|
<template v-if="qs.Type==='input'">
|
||||||
<el-input
|
<el-input
|
||||||
v-if="qs.Type==='input' || qs.Type==='number'"
|
|
||||||
v-model="questionForm[qs.Id]"
|
v-model="questionForm[qs.Id]"
|
||||||
:disabled="!isCurrentTask || readingTaskState>=2 "
|
:disabled="!isCurrentTask || readingTaskState>=2 "
|
||||||
@change="((val)=>{formItemChange(val, qs)})"
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<!-- 数值类型 -->
|
||||||
|
<template v-if="qs.Type==='number'">
|
||||||
|
<el-input
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
:disabled="!isCurrentTask || readingTaskState>=2 "
|
||||||
|
@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>
|
||||||
|
</template>
|
||||||
|
<!-- 自动计算 -->
|
||||||
|
<template v-if="qs.Type==='calculation'">
|
||||||
|
<el-input
|
||||||
|
v-model="questionForm[qs.Id]"
|
||||||
|
disabled
|
||||||
|
@change="((val)=>{formItemChange(val, qs)})"
|
||||||
|
>
|
||||||
|
<template v-if="qs.Unit" slot="append">
|
||||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
@ -213,11 +232,14 @@ export default {
|
||||||
isCurrentTaskAdd: 'False',
|
isCurrentTaskAdd: 'False',
|
||||||
lesionMark: '',
|
lesionMark: '',
|
||||||
deleteInfo: null,
|
deleteInfo: null,
|
||||||
pictureBaseStr: ''
|
pictureBaseStr: '',
|
||||||
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId
|
||||||
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
this.initForm()
|
this.initForm()
|
||||||
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
DicomEvent.$on('handleImageQualityAbnormal', () => {
|
||||||
|
|
||||||
|
@ -358,9 +380,39 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||||
}
|
}
|
||||||
|
if (question.QuestionMark === 1001 || question.QuestionMark === 1002) {
|
||||||
|
this.questionForm[this.getQuestionId(1003)] = this.calculate([1001, 1002], '-')
|
||||||
|
}
|
||||||
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||||
},
|
},
|
||||||
|
calculate(qsMarkArr, type) {
|
||||||
|
var num = 0
|
||||||
|
qsMarkArr.map((qsmark, i) => {
|
||||||
|
if (i === 0) {
|
||||||
|
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||||
|
num = isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||||
|
} else {
|
||||||
|
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||||
|
switch (type) {
|
||||||
|
case '-':
|
||||||
|
num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return parseFloat(num).toFixed(this.digitPlaces)
|
||||||
|
},
|
||||||
|
limitBlur(qId, valueType) {
|
||||||
|
const value = isNaN(parseFloat(this.questionForm[qId])) ? null : parseFloat(this.questionForm[qId])
|
||||||
|
if (value === null) return
|
||||||
|
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))
|
||||||
|
}
|
||||||
|
},
|
||||||
returnFloat(num) {
|
returnFloat(num) {
|
||||||
if (num) return
|
if (num) return
|
||||||
var value = Math.round(parseFloat(num) * 100) / 100
|
var value = Math.round(parseFloat(num) * 100) / 100
|
||||||
|
@ -444,6 +496,8 @@ export default {
|
||||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
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('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
|
|
||||||
|
DicomEvent.$emit('refreshQuestions')
|
||||||
DicomEvent.$emit('getReportInfo', true)
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
|
@ -487,9 +541,9 @@ export default {
|
||||||
},
|
},
|
||||||
async handleClose() {
|
async handleClose() {
|
||||||
if (!this.questionForm.RowId) {
|
if (!this.questionForm.RowId) {
|
||||||
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
// '当前数据未保存。如果关闭窗口,将会删除,是否继续?'
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
this.$t('trials:reading:warnning:msg49'),
|
this.$t('trials:reading:warnning:msg60'),
|
||||||
{
|
{
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true
|
||||||
|
@ -508,6 +562,7 @@ export default {
|
||||||
.measurement-form{
|
.measurement-form{
|
||||||
/deep/ .el-form-item__label{
|
/deep/ .el-form-item__label{
|
||||||
color: #c3c3c3;
|
color: #c3c3c3;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
/deep/ .el-input .el-input__inner{
|
/deep/ .el-input .el-input__inner{
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
|
@ -17,10 +17,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 非测量问题 -->
|
<!-- 影像质量问题 -->
|
||||||
<div class="lesions">
|
<div class="lesions">
|
||||||
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" />
|
<Questions
|
||||||
|
ref="ecrf"
|
||||||
|
:question-form-change-state="true"
|
||||||
|
:question-form-change-num="0"
|
||||||
|
:is-qulity-issues="false"
|
||||||
|
:group-classify="1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 测量问题 -->
|
<!-- 测量问题 -->
|
||||||
<template v-if="questions.length > 0 && CriterionType !== 10">
|
<template v-if="questions.length > 0 && CriterionType !== 10">
|
||||||
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper">
|
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper">
|
||||||
|
@ -28,69 +35,142 @@
|
||||||
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="lesion_list">
|
<div class="lesion_list">
|
||||||
<div v-for="item in qs.Childrens" :key="item.Id">
|
<el-form
|
||||||
<div v-if="item.Type === 'table'" class="flex-row" style="margin:3px 0;">
|
v-if="questions.length > 0"
|
||||||
<div class="title">{{ item.QuestionName }}</div>
|
:ref="`questions${index}`"
|
||||||
<div v-if="readingTaskState < 2" class="add-icon" @click.prevent="handleAdd(item)">
|
size="small"
|
||||||
<i class="el-icon-plus" />
|
: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>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse
|
</el-form>
|
||||||
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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 计算值 -->
|
||||||
|
<Questions
|
||||||
|
ref="ecrf2"
|
||||||
|
:question-form-change-state="true"
|
||||||
|
:question-form-change-num="0"
|
||||||
|
:is-qulity-issues="false"
|
||||||
|
:group-classify="4"
|
||||||
|
style="margin-top:20px"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 评估结果 -->
|
||||||
|
<Questions
|
||||||
|
ref="ecrf3"
|
||||||
|
:question-form-change-state="true"
|
||||||
|
:question-form-change-num="0"
|
||||||
|
:is-qulity-issues="false"
|
||||||
|
:group-classify="5"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { saveTaskQuestion } from '@/api/trials'
|
||||||
import { resetReadingTask } from '@/api/reading'
|
import { resetReadingTask } from '@/api/reading'
|
||||||
import DicomEvent from './../DicomEvent'
|
import DicomEvent from './../DicomEvent'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
@ -145,7 +225,10 @@ export default {
|
||||||
tableQuestions: [],
|
tableQuestions: [],
|
||||||
isFirstRender: false,
|
isFirstRender: false,
|
||||||
CriterionType: null,
|
CriterionType: null,
|
||||||
subjectCode: ''
|
subjectCode: '',
|
||||||
|
questionForm: {},
|
||||||
|
formChanged: false,
|
||||||
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -158,7 +241,6 @@ export default {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.initList()
|
this.initList()
|
||||||
}
|
}
|
||||||
console.log('lastCanvasTaskId', val)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
currentReadingTaskState: {
|
currentReadingTaskState: {
|
||||||
|
@ -173,6 +255,8 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
this.subjectCode = localStorage.getItem('subjectCode')
|
this.subjectCode = localStorage.getItem('subjectCode')
|
||||||
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
window.addEventListener('message', this.receiveMsg)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
@ -186,6 +270,9 @@ export default {
|
||||||
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||||
callback([])
|
callback([])
|
||||||
})
|
})
|
||||||
|
DicomEvent.$on('refreshQuestions', _ => {
|
||||||
|
this.refreshQuestions()
|
||||||
|
})
|
||||||
|
|
||||||
window.addEventListener('resize', this.setHeight)
|
window.addEventListener('resize', this.setHeight)
|
||||||
},
|
},
|
||||||
|
@ -193,6 +280,7 @@ export default {
|
||||||
DicomEvent.$off('setCollapseActive')
|
DicomEvent.$off('setCollapseActive')
|
||||||
DicomEvent.$off('changeLesionType')
|
DicomEvent.$off('changeLesionType')
|
||||||
DicomEvent.$off('getUnSaveTarget')
|
DicomEvent.$off('getUnSaveTarget')
|
||||||
|
DicomEvent.$off('refreshQuestions')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initList() {
|
async initList() {
|
||||||
|
@ -223,8 +311,11 @@ export default {
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
this.questions = this.visitTaskList[i].ReadingQuestions
|
this.questions = this.visitTaskList[i].ReadingQuestions
|
||||||
|
this.setQuestionForm(this.questions)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
this.$refs['ecrf'].getQuestions(this.visitTaskId)
|
||||||
|
this.$refs['ecrf2'].getQuestions(this.visitTaskId)
|
||||||
|
this.$refs['ecrf3'].getQuestions(this.visitTaskId)
|
||||||
this.getTableQuestions()
|
this.getTableQuestions()
|
||||||
this.tableQuestions.forEach(item => {
|
this.tableQuestions.forEach(item => {
|
||||||
item.TableQuestions.Answers.forEach(i => {
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
|
@ -235,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) {
|
async resetQuestions(obj) {
|
||||||
this.setQuestions(this.questions, obj)
|
this.setQuestions(this.questions, obj)
|
||||||
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
await store.dispatch('reading/setReadingQuestionAndAnswer', { questions: this.questions, visitTaskId: this.visitTaskId })
|
||||||
|
@ -245,12 +348,6 @@ export default {
|
||||||
questions.forEach(item => {
|
questions.forEach(item => {
|
||||||
if (item.Type === 'table' && item.Id === obj.questionId) {
|
if (item.Type === 'table' && item.Id === obj.questionId) {
|
||||||
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
|
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
|
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum
|
||||||
|
|
||||||
for (const i in obj.anwsers) {
|
for (const i in obj.anwsers) {
|
||||||
|
@ -267,7 +364,8 @@ export default {
|
||||||
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||||
item.TableQuestions.Answers.forEach(answerObj => {
|
item.TableQuestions.Answers.forEach(answerObj => {
|
||||||
if (answerObj.RowId) {
|
if (answerObj.RowId) {
|
||||||
this.$set(answerObj, 'saveTypeEnum', 2)
|
var diffVal = this.getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj)
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', isNaN(parseFloat(diffVal)) ? 1 : 2)
|
||||||
} else {
|
} else {
|
||||||
this.$set(answerObj, 'saveTypeEnum', 0)
|
this.$set(answerObj, 'saveTypeEnum', 0)
|
||||||
}
|
}
|
||||||
|
@ -319,6 +417,7 @@ export default {
|
||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
if (this.visitTaskList[idx].ReadingQuestions.length > 0) {
|
if (this.visitTaskList[idx].ReadingQuestions.length > 0) {
|
||||||
this.questions = this.visitTaskList[idx].ReadingQuestions
|
this.questions = this.visitTaskList[idx].ReadingQuestions
|
||||||
|
this.setQuestionForm(this.questions)
|
||||||
}
|
}
|
||||||
this.readingTaskState = this.visitTaskList[idx].ReadingTaskState
|
this.readingTaskState = this.visitTaskList[idx].ReadingTaskState
|
||||||
this.isBaseLineTask = this.visitTaskList[idx].IsBaseLineTask
|
this.isBaseLineTask = this.visitTaskList[idx].IsBaseLineTask
|
||||||
|
@ -482,6 +581,44 @@ export default {
|
||||||
// 设置测量数据
|
// 设置测量数据
|
||||||
setMeasuredData(measureData) {
|
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) {
|
async close(questionsObj) {
|
||||||
if (questionsObj) {
|
if (questionsObj) {
|
||||||
|
@ -493,6 +630,8 @@ export default {
|
||||||
},
|
},
|
||||||
getECRFQuestions(obj) {
|
getECRFQuestions(obj) {
|
||||||
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||||
|
this.$refs['ecrf2'].getQuestions(obj.visitTaskId)
|
||||||
|
this.$refs['ecrf3'].getQuestions(obj.visitTaskId)
|
||||||
},
|
},
|
||||||
async resetMeasuredData() {
|
async resetMeasuredData() {
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
|
@ -517,6 +656,8 @@ export default {
|
||||||
const triald = this.$router.currentRoute.query.trialId
|
const triald = this.$router.currentRoute.query.trialId
|
||||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||||
|
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||||
|
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||||
DicomEvent.$emit('getReportInfo', true)
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
|
@ -525,6 +666,13 @@ export default {
|
||||||
console.log(e)
|
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) {
|
receiveMsg(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,6 +732,36 @@ export default {
|
||||||
}
|
}
|
||||||
.lesion_list{
|
.lesion_list{
|
||||||
position: relative;
|
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: 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%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.el-collapse{
|
.el-collapse{
|
||||||
border-bottom:none;
|
border-bottom:none;
|
||||||
|
|
Loading…
Reference in New Issue