查看历史访视黑屏问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
25e348f428
commit
81297954d3
File diff suppressed because it is too large
Load Diff
|
|
@ -8,25 +8,48 @@
|
||||||
<!-- 跳过 -->
|
<!-- 跳过 -->
|
||||||
{{ $t('trials:readingReport:button:skip') }}
|
{{ $t('trials:readingReport:button:skip') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="getReportInfo">{{
|
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="getReportInfo">
|
||||||
$t('trials:readingReport:button:refresh') }}</el-button>
|
{{
|
||||||
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)">{{
|
$t('trials:readingReport:button:refresh') }}
|
||||||
$t('common:button:save') }}</el-button>
|
</el-button>
|
||||||
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm">{{
|
<el-button
|
||||||
$t('common:button:submit') }}</el-button>
|
v-if="readingTaskState < 2"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleSave(true)"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
$t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm">
|
||||||
|
{{
|
||||||
|
$t('common:button:submit') }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<el-table v-if="taskQuestions.length > 0" ref="reportList" v-adaptive="{ bottomOffset: 0 }"
|
<el-table
|
||||||
:data="taskQuestions" row-key="Id" border default-expand-all height="100"
|
v-if="taskQuestions.length > 0"
|
||||||
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }" size="mini">
|
ref="reportList"
|
||||||
<el-table-column prop="" label="" show-overflow-tooltip width="350px">
|
v-adaptive="{ bottomOffset: 0 }"
|
||||||
|
:data="taskQuestions"
|
||||||
|
row-key="Id"
|
||||||
|
border
|
||||||
|
default-expand-all
|
||||||
|
height="100"
|
||||||
|
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }"
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
<el-table-column prop label show-overflow-tooltip width="350px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName :
|
<span v-if="scope.row.QuestionName">
|
||||||
|
{{ scope.row.BlindName ? scope.row.QuestionName :
|
||||||
scope.row.QuestionName }}
|
scope.row.QuestionName }}
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="scope.row.ShowChartTypeEnum > 0 || (scope.row.LesionType === 0 && scope.row.ReportLayType === 1)"
|
v-if="scope.row.ShowChartTypeEnum > 0 || (scope.row.LesionType === 0 && scope.row.ReportLayType === 1)"
|
||||||
icon-class="readingChart" class="svg-icon svg-readingChart-mini" @click.stop="(e) => handleReadingChart({
|
icon-class="readingChart"
|
||||||
|
class="svg-icon svg-readingChart-mini"
|
||||||
|
@click.stop="(e) => handleReadingChart({
|
||||||
e,
|
e,
|
||||||
data: {
|
data: {
|
||||||
QuestionId: scope.row.RowIndex ? null : scope.row.QuestionId,
|
QuestionId: scope.row.RowIndex ? null : scope.row.QuestionId,
|
||||||
|
|
@ -35,19 +58,24 @@
|
||||||
ReportChartTypeEnum: scope.row.LesionType === 0 && scope.row.ReportLayType === 1 ? 0 : null,
|
ReportChartTypeEnum: scope.row.LesionType === 0 && scope.row.ReportLayType === 1 ? 0 : null,
|
||||||
QuestionName: scope.row.QuestionName
|
QuestionName: scope.row.QuestionName
|
||||||
}
|
}
|
||||||
})" />
|
})"
|
||||||
</span>
|
/>
|
||||||
<span v-else style="font-weight: bold;font-size: 16px;color: #f44336;">
|
|
||||||
{{ scope.row.GroupName }}
|
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-else
|
||||||
|
style="font-weight: bold;font-size: 16px;color: #f44336;"
|
||||||
|
>{{ scope.row.GroupName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
|
<el-table-column
|
||||||
width="200px">
|
v-for="task in visitTaskList"
|
||||||
|
:key="task.VisitTaskId"
|
||||||
|
prop="date"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="200px"
|
||||||
|
>
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<div v-if="task.IsCurrentTask">
|
<div v-if="task.IsCurrentTask">{{ task.BlindName }}</div>
|
||||||
{{ task.BlindName }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div>
|
<div>
|
||||||
{{ task.BlindName }}
|
{{ task.BlindName }}
|
||||||
|
|
@ -59,37 +87,49 @@
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template
|
<template
|
||||||
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')">
|
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')"
|
||||||
|
>
|
||||||
<!-- 输入框 -->
|
<!-- 输入框 -->
|
||||||
<div>
|
<div>
|
||||||
<template
|
<template
|
||||||
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
|
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
||||||
size="mini" />
|
size="mini"
|
||||||
|
/>
|
||||||
<span
|
<span
|
||||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')">
|
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')"
|
||||||
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
|
>{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}</span>
|
||||||
</span>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId]" size="mini" />
|
v-model="questionForm[scope.row.QuestionId]"
|
||||||
<span v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'">
|
size="mini"
|
||||||
{{ questionForm[scope.row.QuestionId] }}
|
/>
|
||||||
</span>
|
<span
|
||||||
|
v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'"
|
||||||
|
>{{ questionForm[scope.row.QuestionId] }}</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
||||||
size="mini" clearable :multiple="scope.row.OptionTypeEnum === 1">
|
size="mini"
|
||||||
|
clearable
|
||||||
|
:multiple="scope.row.OptionTypeEnum === 1"
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
<el-option
|
||||||
|
v-for="val in scope.row.TypeValue.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
:value="val"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span
|
<span
|
||||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && questionForm[scope.row.QuestionId][scope.row.xfIndex] && (scope.row.Type === 'select' || scope.row.Type === 'radio')">
|
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && questionForm[scope.row.QuestionId][scope.row.xfIndex] && (scope.row.Type === 'select' || scope.row.Type === 'radio')"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
|
|
||||||
Array.isArray(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])
|
Array.isArray(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])
|
||||||
?
|
?
|
||||||
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId].join(',') :
|
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId].join(',') :
|
||||||
|
|
@ -98,10 +138,18 @@
|
||||||
</span>
|
</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId]" size="mini" clearable
|
v-model="questionForm[scope.row.QuestionId]"
|
||||||
:multiple="scope.row.OptionTypeEnum === 1">
|
size="mini"
|
||||||
|
clearable
|
||||||
|
:multiple="scope.row.OptionTypeEnum === 1"
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
<el-option
|
||||||
|
v-for="val in scope.row.TypeValue.split('|')"
|
||||||
|
:key="val"
|
||||||
|
:label="val"
|
||||||
|
:value="val"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
|
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
|
||||||
|
|
@ -114,16 +162,23 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
||||||
:disabled="scope.row.DataSource === 1" size="mini"
|
:disabled="scope.row.DataSource === 1"
|
||||||
|
size="mini"
|
||||||
@blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
|
@blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
|
||||||
@focus="() => { questionId = scope.row.QuestionId }">
|
@focus="() => { questionId = scope.row.QuestionId }"
|
||||||
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
|
>
|
||||||
scope.row.Unit) : scope.row.CustomUnit }}</template>
|
<template v-if="scope.row.Unit !== 0" slot="append">
|
||||||
|
{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
|
||||||
|
scope.row.Unit) : scope.row.CustomUnit }}
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
|
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span
|
<span
|
||||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
|
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
|
||||||
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
|
>
|
||||||
|
<template
|
||||||
|
v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
|
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
|
||||||
?
|
?
|
||||||
|
|
@ -150,15 +205,22 @@
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-else-if="scope.row.DataSource !== 1 && scope.row.Type === 'number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
v-else-if="scope.row.DataSource !== 1 && scope.row.Type === 'number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
v-model="questionForm[scope.row.QuestionId]" :disabled="scope.row.DataSource === 1" size="mini"
|
v-model="questionForm[scope.row.QuestionId]"
|
||||||
|
:disabled="scope.row.DataSource === 1"
|
||||||
|
size="mini"
|
||||||
@blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
|
@blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
|
||||||
@focus="() => { questionId = scope.row.QuestionId }">
|
@focus="() => { questionId = scope.row.QuestionId }"
|
||||||
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
|
>
|
||||||
scope.row.Unit) : scope.row.CustomUnit }}</template>
|
<template v-if="scope.row.Unit !== 0" slot="append">
|
||||||
|
{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
|
||||||
|
scope.row.Unit) : scope.row.CustomUnit }}
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
|
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else-if="scope.row.Type === 'number'">
|
<span v-else-if="scope.row.Type === 'number'">
|
||||||
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
|
<template
|
||||||
|
v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
|
||||||
|
>
|
||||||
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
|
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
|
||||||
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4
|
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4
|
||||||
?
|
?
|
||||||
|
|
@ -175,12 +237,19 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]">
|
<template
|
||||||
<span v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url"
|
v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]"
|
||||||
style="margin-left: 5px;">
|
>
|
||||||
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">
|
<span
|
||||||
{{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}
|
v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')"
|
||||||
</el-button>
|
:key="url"
|
||||||
|
style="margin-left: 5px;"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.Answers[task.VisitTaskId]"
|
||||||
|
type="text"
|
||||||
|
@click="preview(url)"
|
||||||
|
>{{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row.DictionaryCode">
|
<template v-else-if="scope.row.DictionaryCode">
|
||||||
|
|
@ -196,8 +265,11 @@
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
|
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
|
||||||
<template v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
|
/>
|
||||||
|
<template
|
||||||
|
v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
|
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
|
||||||
`${scope.row.Answers[task.VisitTaskId]}
|
`${scope.row.Answers[task.VisitTaskId]}
|
||||||
|
|
@ -207,9 +279,9 @@
|
||||||
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
|
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
|
||||||
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
|
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)">
|
<template
|
||||||
{{ scope.row.Answers[task.VisitTaskId] }}
|
v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)"
|
||||||
</template>
|
>{{ scope.row.Answers[task.VisitTaskId] }}</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -217,33 +289,49 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 签名框 -->
|
<!-- 签名框 -->
|
||||||
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
<el-dialog
|
||||||
custom-class="base-dialog-wrapper">
|
v-if="signVisible"
|
||||||
|
:visible.sync="signVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="600px"
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
>
|
||||||
<div slot="title">
|
<div slot="title">
|
||||||
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
||||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
|
<span
|
||||||
|
style="font-size:12px;margin-left:5px"
|
||||||
|
>{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
|
||||||
</div>
|
</div>
|
||||||
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 预览文件 -->
|
<!-- 预览文件 -->
|
||||||
<viewer ref="picture_perview_customizeReportPage" style="margin: 0 10px"
|
<viewer
|
||||||
|
ref="picture_perview_customizeReportPage"
|
||||||
|
style="margin: 0 10px"
|
||||||
v-if="currentType && ['png', 'jpg', 'jpeg'].includes(currentType.toLowerCase())"
|
v-if="currentType && ['png', 'jpg', 'jpeg'].includes(currentType.toLowerCase())"
|
||||||
:images="[`${OSSclientConfig.basePath}${currentPath}`]" :options="viewerOptions">
|
:images="[`${OSSclientConfig.basePath}${currentPath}`]"
|
||||||
|
:options="viewerOptions"
|
||||||
|
>
|
||||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${currentPath}`" alt="Image" />
|
<img v-show="false" :src="`${OSSclientConfig.basePath}${currentPath}`" alt="Image" />
|
||||||
</viewer>
|
</viewer>
|
||||||
<readingChart ref="readingChart_report" />
|
<readingChart ref="readingChart_report" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { changeCalculationAnswer, getReadingReportEvaluation, submitDicomVisitTask, verifyVisitTaskQuestions, getQuestionCalculateRelation } from '@/api/trials'
|
import {
|
||||||
|
changeCalculationAnswer,
|
||||||
|
getReadingReportEvaluation,
|
||||||
|
submitDicomVisitTask,
|
||||||
|
verifyVisitTaskQuestions,
|
||||||
|
getQuestionCalculateRelation,
|
||||||
|
} from '@/api/trials'
|
||||||
import { setSkipReadingCache } from '@/api/reading'
|
import { setSkipReadingCache } from '@/api/reading'
|
||||||
import { getAutoCutNextTask } from '@/api/user'
|
import { getAutoCutNextTask } from '@/api/user'
|
||||||
import const_ from '@/const/sign-code'
|
import const_ from '@/const/sign-code'
|
||||||
import SignForm from '@/views/trials/components/newSignForm'
|
import SignForm from '@/views/trials/components/newSignForm'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { openWindow } from "@/utils/splitScreen";
|
import { openWindow } from '@/utils/splitScreen'
|
||||||
import readingChart from '@/components/readingChart'
|
import readingChart from '@/components/readingChart'
|
||||||
export default {
|
export default {
|
||||||
name: 'CustomizeReportPage',
|
name: 'CustomizeReportPage',
|
||||||
|
|
@ -275,7 +363,6 @@ export default {
|
||||||
currentPath: '',
|
currentPath: '',
|
||||||
currentType: '',
|
currentType: '',
|
||||||
|
|
||||||
|
|
||||||
viewerOptions: {
|
viewerOptions: {
|
||||||
toolbar: {
|
toolbar: {
|
||||||
zoomIn: true,
|
zoomIn: true,
|
||||||
|
|
@ -287,8 +374,8 @@ export default {
|
||||||
rotateRight: true,
|
rotateRight: true,
|
||||||
flipHorizontal: true,
|
flipHorizontal: true,
|
||||||
flipVertical: true,
|
flipVertical: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -298,11 +385,10 @@ export default {
|
||||||
handler(v, oldv) {
|
handler(v, oldv) {
|
||||||
try {
|
try {
|
||||||
if (!v[this.questionId] || !oldv[this.questionId]) return
|
if (!v[this.questionId] || !oldv[this.questionId]) return
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
}
|
|
||||||
this.formItemNumberChange(this.questionId, false)
|
this.formItemNumberChange(this.questionId, false)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
|
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
|
||||||
|
|
@ -318,7 +404,7 @@ export default {
|
||||||
})
|
})
|
||||||
await this.getQuestionCalculateRelation()
|
await this.getQuestionCalculateRelation()
|
||||||
this.getReportInfo()
|
this.getReportInfo()
|
||||||
document.addEventListener("click", this.foo);
|
document.addEventListener('click', this.foo)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleReadingChart(row) {
|
handleReadingChart(row) {
|
||||||
|
|
@ -359,7 +445,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTagterAnswers(list, questionId) {
|
getTagterAnswers(list, questionId) {
|
||||||
list.forEach(v => {
|
list.forEach((v) => {
|
||||||
if (v.QuestionId === questionId) {
|
if (v.QuestionId === questionId) {
|
||||||
return Object.assign({}, v.Answers)
|
return Object.assign({}, v.Answers)
|
||||||
} else if (v.Childrens.length > 0) {
|
} else if (v.Childrens.length > 0) {
|
||||||
|
|
@ -370,7 +456,7 @@ export default {
|
||||||
formItemNumberChange(questionId, isTable) {
|
formItemNumberChange(questionId, isTable) {
|
||||||
if (isTable) {
|
if (isTable) {
|
||||||
this.CalculationList.forEach((v, i) => {
|
this.CalculationList.forEach((v, i) => {
|
||||||
var find = v.CalculateQuestionList.filter(o => {
|
var find = v.CalculateQuestionList.filter((o) => {
|
||||||
return o.QuestionId === questionId
|
return o.QuestionId === questionId
|
||||||
})
|
})
|
||||||
// find的自动计算值number
|
// find的自动计算值number
|
||||||
|
|
@ -383,8 +469,8 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.CalculationList.forEach(v => {
|
this.CalculationList.forEach((v) => {
|
||||||
var find = v.CalculateQuestionList.filter(o => {
|
var find = v.CalculateQuestionList.filter((o) => {
|
||||||
return o.TableQuestionId === questionId
|
return o.TableQuestionId === questionId
|
||||||
})
|
})
|
||||||
// find的自动计算值number
|
// find的自动计算值number
|
||||||
|
|
@ -415,9 +501,26 @@ export default {
|
||||||
},
|
},
|
||||||
InitVisitTaskQuestionForm() {
|
InitVisitTaskQuestionForm() {
|
||||||
this.taskQuestions.map((v, i) => {
|
this.taskQuestions.map((v, i) => {
|
||||||
if (v.Type === 'group' && v.Childrens.length === 0 && v.Type !== 'table' && v.Type !== 'basicTable') return
|
if (
|
||||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') {
|
v.Type === 'group' &&
|
||||||
this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId])
|
v.Childrens.length === 0 &&
|
||||||
|
v.Type !== 'table' &&
|
||||||
|
v.Type !== 'basicTable'
|
||||||
|
)
|
||||||
|
return
|
||||||
|
if (
|
||||||
|
!v.IsPage &&
|
||||||
|
v.Type !== 'group' &&
|
||||||
|
v.Type !== 'summary' &&
|
||||||
|
v.Type !== 'table' &&
|
||||||
|
v.Type !== 'basicTable' &&
|
||||||
|
v.Type !== 'number'
|
||||||
|
) {
|
||||||
|
this.$set(
|
||||||
|
this.questionForm,
|
||||||
|
v.QuestionId,
|
||||||
|
v.Answers[this.visitTaskId]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (v.Type === 'table' || v.Type === 'basicTable') {
|
if (v.Type === 'table' || v.Type === 'basicTable') {
|
||||||
var tableAnswers = this.getTableAnswers(v.QuestionId, v.Childrens, i)
|
var tableAnswers = this.getTableAnswers(v.QuestionId, v.Childrens, i)
|
||||||
|
|
@ -427,11 +530,16 @@ export default {
|
||||||
if (v.Type === 'number') {
|
if (v.Type === 'number') {
|
||||||
let val = null
|
let val = null
|
||||||
if (v.ValueType === 0) {
|
if (v.ValueType === 0) {
|
||||||
val = isNaN(parseFloat(v.Answers[this.visitTaskId])) ? v.Answers[this.visitTaskId] : parseInt(v.Answers[this.visitTaskId])
|
val = isNaN(parseFloat(v.Answers[this.visitTaskId]))
|
||||||
|
? v.Answers[this.visitTaskId]
|
||||||
|
: parseInt(v.Answers[this.visitTaskId])
|
||||||
} else if (v.ValueType === 3) {
|
} else if (v.ValueType === 3) {
|
||||||
val = v.Answers[this.visitTaskId]
|
val = v.Answers[this.visitTaskId]
|
||||||
} else {
|
} else {
|
||||||
val = v.Answers[this.visitTaskId] === '' ? null : v.Answers[this.visitTaskId]
|
val =
|
||||||
|
v.Answers[this.visitTaskId] === ''
|
||||||
|
? null
|
||||||
|
: v.Answers[this.visitTaskId]
|
||||||
}
|
}
|
||||||
this.$set(this.questionForm, v.QuestionId, val)
|
this.$set(this.questionForm, v.QuestionId, val)
|
||||||
}
|
}
|
||||||
|
|
@ -443,41 +551,66 @@ export default {
|
||||||
},
|
},
|
||||||
setChild(obj) {
|
setChild(obj) {
|
||||||
obj.forEach((i, index) => {
|
obj.forEach((i, index) => {
|
||||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
if (
|
||||||
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
|
i.Type !== 'group' &&
|
||||||
|
i.Type !== 'summary' &&
|
||||||
|
i.Id &&
|
||||||
|
i.Type !== 'table' &&
|
||||||
|
i.Type !== 'basicTable'
|
||||||
|
) {
|
||||||
|
this.$set(
|
||||||
|
this.questionForm,
|
||||||
|
i.QuestionId,
|
||||||
|
i.Answers[this.visitTaskId]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (i.Type === 'table' || i.Type === 'basicTable') {
|
if (i.Type === 'table' || i.Type === 'basicTable') {
|
||||||
var tableAnswers = this.getTableAnswers(i.QuestionId, i.Childrens, index)
|
var tableAnswers = this.getTableAnswers(
|
||||||
|
i.QuestionId,
|
||||||
|
i.Childrens,
|
||||||
|
index
|
||||||
|
)
|
||||||
this.$set(this.questionForm, i.QuestionId, tableAnswers)
|
this.$set(this.questionForm, i.QuestionId, tableAnswers)
|
||||||
}
|
}
|
||||||
if (i.Type === 'number') {
|
if (i.Type === 'number') {
|
||||||
let val = null
|
let val = null
|
||||||
if (i.ValueType === 0) {
|
if (i.ValueType === 0) {
|
||||||
val = isNaN(parseFloat(i.Answers[this.visitTaskId])) ? i.Answers[this.visitTaskId] : parseInt(i.Answers[this.visitTaskId])
|
val = isNaN(parseFloat(i.Answers[this.visitTaskId]))
|
||||||
|
? i.Answers[this.visitTaskId]
|
||||||
|
: parseInt(i.Answers[this.visitTaskId])
|
||||||
} else if (i.ValueType === 3) {
|
} else if (i.ValueType === 3) {
|
||||||
val = i.Answers[this.visitTaskId]
|
val = i.Answers[this.visitTaskId]
|
||||||
} else {
|
} else {
|
||||||
val = i.Answers[this.visitTaskId] === '' ? null : i.Answers[this.visitTaskId]
|
val =
|
||||||
|
i.Answers[this.visitTaskId] === ''
|
||||||
|
? null
|
||||||
|
: i.Answers[this.visitTaskId]
|
||||||
}
|
}
|
||||||
this.$set(this.questionForm, i.QuestionId, val)
|
this.$set(this.questionForm, i.QuestionId, val)
|
||||||
}
|
}
|
||||||
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
|
if (
|
||||||
|
i.Childrens &&
|
||||||
|
i.Childrens.length > 0 &&
|
||||||
|
i.Type !== 'table' &&
|
||||||
|
i.Type !== 'basicTable'
|
||||||
|
) {
|
||||||
this.setChild(i.Childrens)
|
this.setChild(i.Childrens)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQuestionCalculateRelation() {
|
getQuestionCalculateRelation() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
getQuestionCalculateRelation({
|
getQuestionCalculateRelation({
|
||||||
TrialReadingCriterionId: this.TrialReadingCriterionId
|
TrialReadingCriterionId: this.TrialReadingCriterionId,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.CalculationList = res.Result
|
this.CalculationList = res.Result
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
logic(rules, num = 0) {
|
logic(rules, num = 0) {
|
||||||
let isNE = false, isNAN = false
|
let isNE = false,
|
||||||
|
isNAN = false
|
||||||
try {
|
try {
|
||||||
if (rules.CalculateQuestionList.length === 0) {
|
if (rules.CalculateQuestionList.length === 0) {
|
||||||
return false
|
return false
|
||||||
|
|
@ -511,9 +644,13 @@ export default {
|
||||||
this.questionForm[o.QuestionId].forEach((q, qi) => {
|
this.questionForm[o.QuestionId].forEach((q, qi) => {
|
||||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||||
if (qi === 0) {
|
if (qi === 0) {
|
||||||
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
|
num = isNaN(parseFloat(q[o.TableQuestionId]))
|
||||||
|
? null
|
||||||
|
: parseFloat(q[o.TableQuestionId])
|
||||||
} else {
|
} else {
|
||||||
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
|
num += isNaN(parseFloat(q[o.TableQuestionId]))
|
||||||
|
? null
|
||||||
|
: parseFloat(q[o.TableQuestionId])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
|
|
@ -538,11 +675,14 @@ export default {
|
||||||
isNE = true
|
isNE = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
num = this.questionForm[o.QuestionId].length === 0 ? 0 : num / this.questionForm[o.QuestionId].length
|
num =
|
||||||
|
this.questionForm[o.QuestionId].length === 0
|
||||||
|
? 0
|
||||||
|
: num / this.questionForm[o.QuestionId].length
|
||||||
break
|
break
|
||||||
case 8:
|
case 8:
|
||||||
const arr = []
|
const arr = []
|
||||||
this.questionForm[o.QuestionId].forEach(q => {
|
this.questionForm[o.QuestionId].forEach((q) => {
|
||||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||||
arr.push(q[o.TableQuestionId])
|
arr.push(q[o.TableQuestionId])
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -557,7 +697,7 @@ export default {
|
||||||
break
|
break
|
||||||
case 9:
|
case 9:
|
||||||
const arr1 = []
|
const arr1 = []
|
||||||
this.questionForm[o.QuestionId].forEach(q => {
|
this.questionForm[o.QuestionId].forEach((q) => {
|
||||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||||
arr.push(q[o.TableQuestionId])
|
arr.push(q[o.TableQuestionId])
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -568,15 +708,16 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
num = arr1.length === 0 ? 0 : Math.min(...arr1)
|
num = arr1.length === 0 ? 0 : Math.min(...arr1)
|
||||||
break;
|
break
|
||||||
case 15:
|
case 15:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (
|
||||||
|
!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
|
) {
|
||||||
num = Math.abs(this.questionForm[o.TableQuestionId])
|
num = Math.abs(this.questionForm[o.TableQuestionId])
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
|
|
@ -584,7 +725,6 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (rules.CustomCalculateMark) {
|
switch (rules.CustomCalculateMark) {
|
||||||
|
|
@ -627,47 +767,60 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
|
num =
|
||||||
return acc + (typeof curr === "number" ? curr : 0);
|
dataArr.length === 0
|
||||||
}, 0) / dataArr.length;
|
? 0
|
||||||
break;
|
: dataArr.reduce((acc, curr) => {
|
||||||
|
return acc + (typeof curr === 'number' ? curr : 0)
|
||||||
|
}, 0) / dataArr.length
|
||||||
|
break
|
||||||
case 11:
|
case 11:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
num = Math.max(...dataArr);
|
num = Math.max(...dataArr)
|
||||||
break;
|
break
|
||||||
case 12:
|
case 12:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
num = Math.min(...dataArr);
|
num = Math.min(...dataArr)
|
||||||
break;
|
break
|
||||||
case 13:
|
case 13:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
|
num =
|
||||||
break;
|
dataArr.length === 0
|
||||||
|
? 0
|
||||||
|
: dataArr.reduce((acc, curr) => acc && curr)
|
||||||
|
? 1
|
||||||
|
: 0
|
||||||
|
break
|
||||||
case 14:
|
case 14:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
} else {
|
} else {
|
||||||
isNAN = true
|
isNAN = true
|
||||||
}
|
}
|
||||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
|
num =
|
||||||
break;
|
dataArr.length === 0
|
||||||
|
? 0
|
||||||
|
: dataArr.reduce((acc, curr) => acc || curr, 0)
|
||||||
|
? 1
|
||||||
|
: 0
|
||||||
|
break
|
||||||
case 15:
|
case 15:
|
||||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
num = Math.abs(this.questionForm[o.TableQuestionId])
|
num = Math.abs(this.questionForm[o.TableQuestionId])
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -683,28 +836,36 @@ export default {
|
||||||
if (rules.ValueType === 2) {
|
if (rules.ValueType === 2) {
|
||||||
num = num * 100
|
num = num * 100
|
||||||
}
|
}
|
||||||
return isNaN(num) ? '' : isFinite(num) ? num.toFixed(this.digitPlaces) : '∞'
|
return isNaN(num)
|
||||||
|
? ''
|
||||||
|
: isFinite(num)
|
||||||
|
? num.toFixed(this.digitPlaces)
|
||||||
|
: '∞'
|
||||||
},
|
},
|
||||||
getReportInfo() {
|
getReportInfo() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var params = {
|
var params = {
|
||||||
visitTaskId: this.visitTaskId,
|
visitTaskId: this.visitTaskId,
|
||||||
trialId: this.trialId
|
trialId: this.trialId,
|
||||||
}
|
}
|
||||||
this.taskQuestions = []
|
this.taskQuestions = []
|
||||||
getReadingReportEvaluation(params).then(res => {
|
getReadingReportEvaluation(params)
|
||||||
|
.then((res) => {
|
||||||
this.readingTaskState = res.Result.ReadingTaskState
|
this.readingTaskState = res.Result.ReadingTaskState
|
||||||
this.answerArr = []
|
this.answerArr = []
|
||||||
this.questions = res.Result.TaskQuestions.concat()
|
this.questions = res.Result.TaskQuestions.concat()
|
||||||
var taskQuestions = this.getQuestions(res.Result.TaskQuestions)
|
var taskQuestions = this.getQuestions(res.Result.TaskQuestions)
|
||||||
taskQuestions.forEach(item => {
|
taskQuestions.forEach((item) => {
|
||||||
this.$set(this.taskQuestions, this.taskQuestions.length, item)
|
this.$set(this.taskQuestions, this.taskQuestions.length, item)
|
||||||
})
|
})
|
||||||
this.visitTaskList = res.Result.VisitTaskList
|
this.visitTaskList = res.Result.VisitTaskList
|
||||||
this.InitVisitTaskQuestionForm()
|
this.InitVisitTaskQuestionForm()
|
||||||
this.handleResize()
|
this.handleResize()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}).catch(() => { this.loading = false })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getQuestions(questions) {
|
getQuestions(questions) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -713,29 +874,39 @@ export default {
|
||||||
questions.forEach((item) => {
|
questions.forEach((item) => {
|
||||||
const obj = item
|
const obj = item
|
||||||
this.$set(obj, 'Answers', {})
|
this.$set(obj, 'Answers', {})
|
||||||
item.Answer.forEach(i => {
|
item.Answer.forEach((i) => {
|
||||||
if (item.DictionaryCode) {
|
if (item.DictionaryCode) {
|
||||||
if (item.Type === 'select' && item.OptionTypeEnum === 1) {
|
if (item.Type === 'select' && item.OptionTypeEnum === 1) {
|
||||||
let val = i.Answer ? JSON.parse(i.Answer) : []
|
let val = i.Answer ? JSON.parse(i.Answer) : []
|
||||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||||
} else {
|
} else {
|
||||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
this.$set(
|
||||||
|
obj.Answers,
|
||||||
|
i.VisitTaskId,
|
||||||
|
i.Answer ? parseInt(i.Answer) : null
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||||
} else {
|
} else {
|
||||||
if (item.Type === 'number') {
|
if (item.Type === 'number') {
|
||||||
let val = null
|
let val = null
|
||||||
if (item.ValueType === 0) {
|
if (item.ValueType === 0) {
|
||||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseInt(i.Answer)
|
val = isNaN(parseFloat(i.Answer))
|
||||||
|
? i.Answer
|
||||||
|
: parseInt(i.Answer)
|
||||||
} else if (item.ValueType === 3) {
|
} else if (item.ValueType === 3) {
|
||||||
val = i.Answer
|
val = i.Answer
|
||||||
} else {
|
} else {
|
||||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces)
|
val = isNaN(parseFloat(i.Answer))
|
||||||
|
? i.Answer
|
||||||
|
: parseFloat(i.Answer).toFixed(this.digitPlaces)
|
||||||
}
|
}
|
||||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||||
} else if (item.Type === 'select' && item.OptionTypeEnum === 1) {
|
} else if (
|
||||||
|
item.Type === 'select' &&
|
||||||
|
item.OptionTypeEnum === 1
|
||||||
|
) {
|
||||||
let val = i.Answer ? JSON.parse(i.Answer) : []
|
let val = i.Answer ? JSON.parse(i.Answer) : []
|
||||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -754,7 +925,6 @@ export default {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleShowDetail(val) {
|
handleShowDetail(val) {
|
||||||
this.getReportInfo()
|
this.getReportInfo()
|
||||||
|
|
@ -770,10 +940,12 @@ export default {
|
||||||
verifyVisitTaskQuestions() {
|
verifyVisitTaskQuestions() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId }).then(res => {
|
verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
|
||||||
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
reject()
|
reject()
|
||||||
})
|
})
|
||||||
|
|
@ -798,9 +970,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
var params = {
|
var params = {
|
||||||
data: {
|
data: {
|
||||||
visitTaskId: this.visitTaskId
|
visitTaskId: this.visitTaskId,
|
||||||
},
|
},
|
||||||
signInfo: signInfo
|
signInfo: signInfo,
|
||||||
}
|
}
|
||||||
const res = await submitDicomVisitTask(params)
|
const res = await submitDicomVisitTask(params)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
|
@ -823,12 +995,12 @@ export default {
|
||||||
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
||||||
this.$confirm(this.$t('trials:readingReport:message:msg4'), {
|
this.$confirm(this.$t('trials:readingReport:message:msg4'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
.catch(action => {
|
.catch((action) => {
|
||||||
// changeURLStatic('visitTaskId', this.visitTaskId)
|
// changeURLStatic('visitTaskId', this.visitTaskId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -847,16 +1019,26 @@ export default {
|
||||||
this.openWindow.close()
|
this.openWindow.close()
|
||||||
}
|
}
|
||||||
var token = getToken()
|
var token = getToken()
|
||||||
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
|
var trialReadingCriterionId =
|
||||||
|
this.$router.currentRoute.query.TrialReadingCriterionId
|
||||||
// var subjectCode = this.$router.currentRoute.query.subjectCode
|
// var subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
var subjectCode = localStorage.getItem('subjectCode')
|
var subjectCode = localStorage.getItem('subjectCode')
|
||||||
var subjectId = this.$router.currentRoute.query.subjectId
|
var subjectId = this.$router.currentRoute.query.subjectId
|
||||||
var trialId = this.$router.currentRoute.query.trialId
|
var trialId = this.$router.currentRoute.query.trialId
|
||||||
var isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder
|
var isReadingTaskViewInOrder =
|
||||||
|
this.$router.currentRoute.query.isReadingTaskViewInOrder
|
||||||
var criterionType = this.$router.currentRoute.query.criterionType
|
var criterionType = this.$router.currentRoute.query.criterionType
|
||||||
var readingTool = this.$router.currentRoute.query.readingTool
|
var readingTool = this.$router.currentRoute.query.readingTool
|
||||||
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
|
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
|
||||||
const routeData = this.$router.resolve({ path })
|
const routeData = this.$router.resolve({ path })
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = routeData.href
|
||||||
|
a.target = '_blank'
|
||||||
|
a.rel = 'noopener noreferrer'
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
document.body.removeChild(a)
|
||||||
|
return false
|
||||||
const res = await getAutoCutNextTask()
|
const res = await getAutoCutNextTask()
|
||||||
let IsDoubleScreen = false
|
let IsDoubleScreen = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
|
@ -865,17 +1047,23 @@ export default {
|
||||||
if (IsDoubleScreen) {
|
if (IsDoubleScreen) {
|
||||||
this.openWindow = await openWindow(routeData.href)
|
this.openWindow = await openWindow(routeData.href)
|
||||||
if (!this.openWindow) {
|
if (!this.openWindow) {
|
||||||
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
|
let html = `<div><span>${this.$t(
|
||||||
|
'trials:reading:tip:MultiScreen2'
|
||||||
|
)}</span><a style="color:#409EFF"
|
||||||
href="/screen.pdf"
|
href="/screen.pdf"
|
||||||
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
|
target="blank">${this.$t(
|
||||||
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
|
'trials:reading:tip:openFile'
|
||||||
|
)}</a></div>`
|
||||||
|
let confirm = await this.$confirm(html, '', {
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
})
|
||||||
if (!confirm) return false
|
if (!confirm) return false
|
||||||
this.openWindow = await openWindow(routeData.href, '', true)
|
this.openWindow = await openWindow(routeData.href, '', true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.openWindow = await openWindow(routeData.href, '', true, true)
|
// this.openWindow = await openWindow(routeData.href, '', true, true)
|
||||||
}
|
|
||||||
// this.openWindow = window.open(routeData.href, '_blank')
|
// this.openWindow = window.open(routeData.href, '_blank')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSave(isPrompt) {
|
handleSave(isPrompt) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
@ -885,13 +1073,13 @@ export default {
|
||||||
for (const k in this.questionForm) {
|
for (const k in this.questionForm) {
|
||||||
if (this.questionForm[k] instanceof Array) {
|
if (this.questionForm[k] instanceof Array) {
|
||||||
this.questionForm[k].forEach((v, i) => {
|
this.questionForm[k].forEach((v, i) => {
|
||||||
Object.keys(v).forEach(o => {
|
Object.keys(v).forEach((o) => {
|
||||||
if (o.indexOf('_RowId') === -1) {
|
if (o.indexOf('_RowId') === -1) {
|
||||||
tableQuestionAnswer.push({
|
tableQuestionAnswer.push({
|
||||||
questionId: k,
|
questionId: k,
|
||||||
answer: v[o],
|
answer: v[o],
|
||||||
tableQuestionId: o,
|
tableQuestionId: o,
|
||||||
rowId: v[o + '_RowId']
|
rowId: v[o + '_RowId'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -904,16 +1092,18 @@ export default {
|
||||||
var params = {
|
var params = {
|
||||||
visitTaskId: this.visitTaskId,
|
visitTaskId: this.visitTaskId,
|
||||||
questionAnswer: answers,
|
questionAnswer: answers,
|
||||||
tableQuestionAnswer: tableQuestionAnswer
|
tableQuestionAnswer: tableQuestionAnswer,
|
||||||
}
|
}
|
||||||
changeCalculationAnswer(params).then(res => {
|
changeCalculationAnswer(params)
|
||||||
|
.then((res) => {
|
||||||
if (isPrompt) {
|
if (isPrompt) {
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
}
|
}
|
||||||
// DicomEvent.$emit('refreshQuestionAnswer')
|
// DicomEvent.$emit('refreshQuestionAnswer')
|
||||||
this.loading = false
|
this.loading = false
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
reject()
|
reject()
|
||||||
})
|
})
|
||||||
|
|
@ -926,7 +1116,7 @@ export default {
|
||||||
this.$t('trials:readingReport:message:skipConfirm'),
|
this.$t('trials:readingReport:message:skipConfirm'),
|
||||||
{
|
{
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (confirm !== 'confirm') return
|
if (confirm !== 'confirm') return
|
||||||
|
|
@ -947,21 +1137,20 @@ export default {
|
||||||
const arr = path.split('.')
|
const arr = path.split('.')
|
||||||
this.currentType = arr[arr.length - 1]
|
this.currentType = arr[arr.length - 1]
|
||||||
// this.previewVisible = true
|
// this.previewVisible = true
|
||||||
if (['.ppt',
|
if (
|
||||||
'.pptx',
|
['.ppt', '.pptx', '.doc', '.docx', '.xls', '.xlsx'].includes(
|
||||||
'.doc',
|
`.${this.currentType.toLowerCase()}`
|
||||||
'.docx',
|
)
|
||||||
'.xls',
|
) {
|
||||||
'.xlsx'].includes(`.${this.currentType.toLowerCase()}`)) {
|
|
||||||
this.$onlyOffice({
|
this.$onlyOffice({
|
||||||
path: path,
|
path: path,
|
||||||
type: this.currentType,
|
type: this.currentType,
|
||||||
title: this.$t('trials:readingReport:title:preview')
|
title: this.$t('trials:readingReport:title:preview'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (['.jpg',
|
if (
|
||||||
'.jpeg',
|
['.jpg', '.jpeg', '.png'].includes(`.${this.currentType.toLowerCase()}`)
|
||||||
'.png'].includes(`.${this.currentType.toLowerCase()}`)) {
|
) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['picture_perview_customizeReportPage'].$viewer.show()
|
this.$refs['picture_perview_customizeReportPage'].$viewer.show()
|
||||||
})
|
})
|
||||||
|
|
@ -970,16 +1159,15 @@ export default {
|
||||||
this.$preview({
|
this.$preview({
|
||||||
path: path,
|
path: path,
|
||||||
type: 'pdf',
|
type: 'pdf',
|
||||||
title: this.$t('trials:readingReport:title:preview')
|
title: this.$t('trials:readingReport:title:preview'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.report-wrapper {
|
.report-wrapper {
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// background-color: #fff;
|
// background-color: #fff;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
|
|
@ -1074,7 +1262,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color: #dfdfdf
|
color: #dfdfdf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue