OCT系统标准修改,表单下拉框增加多选(OCT、自定义)
continuous-integration/drone/push Build encountered an error
Details
continuous-integration/drone/push Build encountered an error
Details
parent
6ee3a06eb2
commit
41eb974496
|
|
@ -40,6 +40,13 @@ function getQuestions(questions) {
|
|||
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
questions.forEach(item => {
|
||||
if ((item.Type === 'table' || item.Type === 'basicTable') && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||
item.TableQuestions.Questions.forEach(question => {
|
||||
if (question.Type === 'select' && question.OptionTypeEnum === 1) {
|
||||
item.TableQuestions.Answers.forEach((answer) => {
|
||||
answer[question.Id] = answer[question.Id] ? JSON.parse(answer[question.Id]) : []
|
||||
})
|
||||
}
|
||||
})
|
||||
item.TableQuestions.Answers.forEach(answerObj => {
|
||||
answerObj.isDicomReading = answerObj.IsDicomReading === 'True'
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,155 +1,86 @@
|
|||
<template>
|
||||
<el-form
|
||||
ref="tableQsForm"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
size="small"
|
||||
:disabled="type === 'look'"
|
||||
:rules="rules"
|
||||
label-width="130px"
|
||||
>
|
||||
<el-form ref="tableQsForm" v-loading="loading" :model="form" size="small" :disabled="type === 'look'" :rules="rules"
|
||||
label-width="130px">
|
||||
<div class="base-dialog-body" style="height: 550px; display:flex;flex-direction: column;">
|
||||
<div style="height: 150px;">
|
||||
<!-- 类型 -->
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:type')" prop="Type">
|
||||
<el-select
|
||||
v-model="form.Type"
|
||||
@change="((val)=>{qsTypeChange(val, form)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Criterion_Question_Type"
|
||||
<el-select v-model="form.Type" @change="((val) => { qsTypeChange(val, form) })">
|
||||
<el-option v-for="item of $d.Criterion_Question_Type"
|
||||
v-show="item.value !== 'class' && item.value !== 'group' && item.value !== 'table' && item.value !== 'basicTable'"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
:key="item.value" :value="item.value" :label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 问题名称 -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group'"
|
||||
:label="$t('trials:readingUnit:qsList:title:qsNameEn')"
|
||||
prop="QuestionName"
|
||||
:rules="[
|
||||
<el-form-item v-if="form.Type !== 'group'" :label="$t('trials:readingUnit:qsList:title:qsNameEn')"
|
||||
prop="QuestionName" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||
{ max: form.Type === 'summary' ? 300 : 100, message: `${this.$t('common:ruleMessage:maxLength')} ${form.Type === 'summary' ? 300 : 100}` }
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.QuestionName"
|
||||
/>
|
||||
]">
|
||||
<el-input v-model="form.QuestionName" />
|
||||
</el-form-item>
|
||||
<!-- 问题名称(EN) -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group'"
|
||||
:label="$t('trials:readingUnit:qsList:title:qsNameEn')"
|
||||
prop="QuestionEnName"
|
||||
:rules="[
|
||||
<el-form-item v-if="form.Type !== 'group'" :label="$t('trials:readingUnit:qsList:title:qsNameEn')"
|
||||
prop="QuestionEnName" :rules="[
|
||||
{ max: form.Type === 'summary' ? 300 : 100, message: `${this.$t('common:ruleMessage:maxLength')} ${form.Type === 'summary' ? 300 : 100}` }
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.QuestionEnName"
|
||||
/>
|
||||
]">
|
||||
<el-input v-model="form.QuestionEnName" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="flex: 1;overflow-y:auto;">
|
||||
<!-- 公有属性 -->
|
||||
<el-divider content-position="left">{{$t('trials:readingUnit:title:publicProperties')}}</el-divider>
|
||||
<el-divider content-position="left">{{ $t('trials:readingUnit:title:publicProperties') }}</el-divider>
|
||||
<!-- 是否显示 -->
|
||||
<el-form-item v-if="form.Type !== 'group'" :label="$t('trials:readingUnit:qsList:title:isShow')" prop="ShowQuestion">
|
||||
<el-radio-group
|
||||
v-model="form.ShowQuestion"
|
||||
@change="((val)=>{isShowQuestionChange(val, form)})"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.ShowQuestion"
|
||||
:key="`ShowQuestion${item.value}`"
|
||||
:label="item.value"
|
||||
>
|
||||
<el-form-item v-if="form.Type !== 'group'" :label="$t('trials:readingUnit:qsList:title:isShow')"
|
||||
prop="ShowQuestion">
|
||||
<el-radio-group v-model="form.ShowQuestion" @change="((val) => { isShowQuestionChange(val, form) })">
|
||||
<el-radio v-for="item of $d.ShowQuestion" :key="`ShowQuestion${item.value}`" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 显示时依赖父问题 -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.ShowQuestion===1"
|
||||
:label="$t('trials:readingUnit:qsList:title:parentId')"
|
||||
prop="ParentId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.ParentId"
|
||||
clearable
|
||||
@change="((val)=>{parentQuestionChange(val, form)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of parentOptions"
|
||||
:key="`ParentId${item.QuestionId}`"
|
||||
:label="item.QuestionName"
|
||||
:value="item.QuestionId"
|
||||
/>
|
||||
<el-form-item v-if="form.Type !== 'group' && form.ShowQuestion === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:parentId')" prop="ParentId">
|
||||
<el-select v-model="form.ParentId" clearable @change="((val) => { parentQuestionChange(val, form) })">
|
||||
<el-option v-for="item of parentOptions" :key="`ParentId${item.QuestionId}`" :label="item.QuestionName"
|
||||
:value="item.QuestionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 显示时依赖父问题触发值 -->
|
||||
<el-form-item v-if="form.ParentId && form.ShowQuestion===1" :label="$t('trials:readingUnit:qsList:title:parentTriggerValueList')" prop="ParentTriggerValueList">
|
||||
<el-form-item v-if="form.ParentId && form.ShowQuestion === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:parentTriggerValueList')" prop="ParentTriggerValueList">
|
||||
<el-select v-model="form.ParentTriggerValueList" clearable multiple>
|
||||
<el-option
|
||||
v-for="item of parentTriggerValOptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="String(item.value)"
|
||||
/>
|
||||
<el-option v-for="item of parentTriggerValOptions" :key="item.id" :label="item.label"
|
||||
:value="String(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 是否必填 -->
|
||||
<el-form-item v-if="form.Type !== 'group' && form.Type !== 'table' && form.Type !== 'basicTable' && form.Type !== 'summary'" :label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
|
||||
<el-radio-group
|
||||
v-model="form.IsRequired"
|
||||
:disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2"
|
||||
@change="((val)=>{isRequiredChange(val, form)})"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.QuestionRequired"
|
||||
:key="`QuestionRequired${item.value}`"
|
||||
:label="item.value"
|
||||
>
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.Type !== 'table' && form.Type !== 'basicTable' && form.Type !== 'summary'"
|
||||
:label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
|
||||
<el-radio-group v-model="form.IsRequired" :disabled="form.IsJudgeQuestion === true || form.ShowQuestion === 2"
|
||||
@change="((val) => { isRequiredChange(val, form) })">
|
||||
<el-radio v-for="item of $d.QuestionRequired" :key="`QuestionRequired${item.value}`" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 必填依赖父问题 -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.IsRequired === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:relevanceId')"
|
||||
prop="RelevanceId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.RelevanceId"
|
||||
clearable
|
||||
@change="((val)=>{relevanceQuestionChange(val, form)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of parentOptions"
|
||||
:key="`RelevanceId${item.QuestionId}`"
|
||||
:label="item.QuestionName"
|
||||
:value="item.QuestionId"
|
||||
/>
|
||||
<el-form-item v-if="form.Type !== 'group' && form.IsRequired === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:relevanceId')" prop="RelevanceId">
|
||||
<el-select v-model="form.RelevanceId" clearable @change="((val) => { relevanceQuestionChange(val, form) })">
|
||||
<el-option v-for="item of parentOptions" :key="`RelevanceId${item.QuestionId}`" :label="item.QuestionName"
|
||||
:value="item.QuestionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 必填触发值 -->
|
||||
<el-form-item
|
||||
v-if="form.RelevanceId && form.IsRequired === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:relevanceValueList')"
|
||||
prop="RelevanceValueList"
|
||||
>
|
||||
<el-form-item v-if="form.RelevanceId && form.IsRequired === 1"
|
||||
:label="$t('trials:readingUnit:qsList:title:relevanceValueList')" prop="RelevanceValueList">
|
||||
<el-select v-model="form.RelevanceValueList" clearable multiple>
|
||||
<el-option
|
||||
v-for="item of reParentTriggerValOptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="String(item.value)"
|
||||
/>
|
||||
<el-option v-for="item of reParentTriggerValOptions" :key="item.id" :label="item.label"
|
||||
:value="String(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 导出标识 -->
|
||||
|
|
@ -174,175 +105,106 @@
|
|||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<!-- 导出结果 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
|
||||
v-if="form.Type === 'radio' || form.Type === 'select' || form.Type === 'input' || form.Type === 'textarea' || form.Type === 'number' || form.Type === 'class' || form.Type === 'calculation'"
|
||||
>
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:ExportResult')"
|
||||
v-if="form.Type === 'radio' || form.Type === 'select' || form.Type === 'input' || form.Type === 'textarea' || form.Type === 'number' || form.Type === 'class' || form.Type === 'calculation'">
|
||||
<el-select v-model="form.ExportResult" multiple>
|
||||
<el-option
|
||||
v-for="item in CriterionDictionaryList.ExportResult"
|
||||
:key="`ExportResult${item.value}`"
|
||||
:value="parseInt(item.Code)"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
||||
>
|
||||
<el-option v-for="item in CriterionDictionaryList.ExportResult" :key="`ExportResult${item.value}`"
|
||||
:value="parseInt(item.Code)" :label="$i18n.locale === 'zh' ? item.ValueCN : item.Value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 限制编辑 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:limitEdit')"
|
||||
v-if="form.Type !== 'summary'"
|
||||
prop="LimitEdit"
|
||||
:rules="[
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:limitEdit')" v-if="form.Type !== 'summary'"
|
||||
prop="LimitEdit" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
|
||||
]"
|
||||
>
|
||||
]">
|
||||
<el-radio-group v-model="form.LimitEdit">
|
||||
<el-radio v-for="item of $d.LimitEdit" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 问题标识 -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.Type !== 'summary'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:questionMark')"
|
||||
prop="QuestionMark"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.QuestionMark"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item of CriterionDictionaryList.QuestionMark"
|
||||
:key="item.Id"
|
||||
:value="parseInt(item.Code)"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
||||
/>
|
||||
<el-form-item v-if="form.Type !== 'group' && form.Type !== 'summary'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:questionMark')" prop="QuestionMark">
|
||||
<el-select v-model="form.QuestionMark" clearable>
|
||||
<el-option v-for="item of CriterionDictionaryList.QuestionMark" :key="item.Id" :value="parseInt(item.Code)"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 注释 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:Remark')"
|
||||
prop="Remark"
|
||||
>
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:Remark')" prop="Remark">
|
||||
<el-input v-model="form.Remark" />
|
||||
</el-form-item>
|
||||
<!-- 序号 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:order')"
|
||||
prop="ShowOrder"
|
||||
:rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
|
||||
]"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.ShowOrder"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
/>
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:order')" prop="ShowOrder" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
|
||||
]">
|
||||
<el-input-number v-model="form.ShowOrder" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<!-- 重复出现最大次数 -->
|
||||
<el-form-item :label="$t('dictionary:template:criterionConfig:table:maxRowCount')" v-if="form.Type !== 'summary' && form.Type !== 'screenshot' && form.Type !== 'upload'">
|
||||
<el-input-number
|
||||
v-model="form.MaxRowCount"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
:max="10"
|
||||
/>
|
||||
<el-form-item :label="$t('dictionary:template:criterionConfig:table:maxRowCount')"
|
||||
v-if="form.Type !== 'summary' && form.Type !== 'screenshot' && form.Type !== 'upload'">
|
||||
<el-input-number v-model="form.MaxRowCount" controls-position="right" :min="0" :max="10" />
|
||||
</el-form-item>
|
||||
<!-- 问题分类 -->
|
||||
<el-form-item :label="$t('dictionary:template:criterionConfig:table:questionClassify')" v-if="criterionType === 2">
|
||||
<el-form-item :label="$t('dictionary:template:criterionConfig:table:questionClassify')"
|
||||
v-if="criterionType === 2">
|
||||
<el-select v-model="form.QuestionClassify" clearable>
|
||||
<el-option
|
||||
v-for="item of $d.QuestionClassify"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item of $d.QuestionClassify" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 私有属性 -->
|
||||
<el-divider content-position="left">{{$t('trials:readingUnit:title:privateProperties')}}</el-divider>
|
||||
<el-divider content-position="left">{{ $t('trials:readingUnit:title:privateProperties') }}</el-divider>
|
||||
<!-- 下拉框单选或多选 -->
|
||||
<el-form-item v-if="form.Type === 'select'" :label="$t('trials:readingUnit:qsList:title:MultipleSelect')"
|
||||
prop="OptionTypeEnum" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify') }
|
||||
]">
|
||||
<el-radio-group v-model="form.OptionTypeEnum">
|
||||
<el-radio v-for="item of $d.OptionType" :key="item.id" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 选项类型 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'input'"
|
||||
:label="$t('trials:readingUnit:label:QuestionGenre')"
|
||||
prop="TableQuestionType"
|
||||
:rules="[
|
||||
{ required: form.Type !== 'input', message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.TableQuestionType"
|
||||
@change="((val)=>{tableQuestionTypeChange(val, form)})"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.TableQuestionType"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
:disabled="(form.Type === 'radio' && (item.value===1 || item.value===2)) || (form.Type === 'input' && (item.value===0 || item.value===3))"
|
||||
>
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'input'"
|
||||
:label="$t('trials:readingUnit:label:QuestionGenre')" prop="TableQuestionType" :rules="[
|
||||
{ required: form.Type !== 'input', message: this.$t('common:ruleMessage:select') }
|
||||
]">
|
||||
<el-radio-group v-model="form.TableQuestionType" @change="((val) => { tableQuestionTypeChange(val, form) })">
|
||||
<el-radio v-for="item of $d.TableQuestionType" :key="item.id" :label="item.value"
|
||||
:disabled="(form.Type === 'radio' && (item.value === 1 || item.value === 2)) || (form.Type === 'input' && (item.value === 0 || item.value === 3))">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 选项 -->
|
||||
<el-form-item
|
||||
v-if="form.TableQuestionType === 0 || form.Type === 'class'"
|
||||
:label="$t('trials:qcCfg:table:typeValue')"
|
||||
prop="TypeValue"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.TypeValue"
|
||||
:placeholder="$t('trials:qcCfg:message:typeValue')"
|
||||
@change="typeValueChange"
|
||||
/>
|
||||
<el-form-item v-if="form.TableQuestionType === 0 || form.Type === 'class'"
|
||||
:label="$t('trials:qcCfg:table:typeValue')" prop="TypeValue">
|
||||
<el-input v-model="form.TypeValue" :placeholder="$t('trials:qcCfg:message:typeValue')"
|
||||
@change="typeValueChange" />
|
||||
</el-form-item>
|
||||
<!-- 关联问题 -->
|
||||
<el-form-item
|
||||
v-if="form.TableQuestionType === 2"
|
||||
:label="$t('dictionary:template:criterionConfig:table:dependParentId')"
|
||||
prop="DependParentId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.DependParentId"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of parentOptions"
|
||||
:key="`DependParentId${item.QuestionId}`"
|
||||
:label="item.QuestionName"
|
||||
:value="item.QuestionId"
|
||||
/>
|
||||
<el-form-item v-if="form.TableQuestionType === 2"
|
||||
:label="$t('dictionary:template:criterionConfig:table:dependParentId')" prop="DependParentId">
|
||||
<el-select v-model="form.DependParentId">
|
||||
<el-option v-for="item of parentOptions" :key="`DependParentId${item.QuestionId}`"
|
||||
:label="item.QuestionName" :value="item.QuestionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 关联字段 -->
|
||||
<el-form-item
|
||||
v-if="form.TableQuestionType === 1 || !!form.DependParentId"
|
||||
:label="$t('dictionary:template:criterionConfig:table:dataTableColumn')"
|
||||
prop="DataTableColumn"
|
||||
>
|
||||
<el-form-item v-if="form.TableQuestionType === 1 || !!form.DependParentId"
|
||||
:label="$t('dictionary:template:criterionConfig:table:dataTableColumn')" prop="DataTableColumn">
|
||||
<el-select v-model="form.DataTableColumn">
|
||||
<el-option
|
||||
v-for="item of CriterionDictionaryList.OrganColumn"
|
||||
:key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
||||
:value="item.Code"
|
||||
/>
|
||||
<el-option v-for="item of CriterionDictionaryList.OrganColumn" :key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value" :value="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 关联字典 -->
|
||||
<el-form-item
|
||||
v-if="form.TableQuestionType === 3 || form.TableQuestionType === 2"
|
||||
:label="$t('dictionary:template:criterionConfig:table:relatedDictionaryCode')"
|
||||
prop="DictionaryCode"
|
||||
:rules="[{ required: form.TableQuestionType === 3, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
<el-form-item v-if="form.TableQuestionType === 3 || form.TableQuestionType === 2"
|
||||
:label="$t('dictionary:template:criterionConfig:table:relatedDictionaryCode')" prop="DictionaryCode"
|
||||
:rules="[{ required: form.TableQuestionType === 3, message: '请选择', trigger: 'blur' }]">
|
||||
<el-select v-model="form.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of dicList"
|
||||
:key="item.Id"
|
||||
:label="item.Code"
|
||||
:value="item.Code"
|
||||
/>
|
||||
<el-option v-for="item of dicList" :key="item.Id" :label="item.Code" :value="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 默认值 -->
|
||||
|
|
@ -354,35 +216,23 @@
|
|||
:label="item.label"
|
||||
:value="item.value.toString()"
|
||||
/> -->
|
||||
<el-option
|
||||
v-for="item of highlightAnswers"
|
||||
:key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
||||
:value="item.Code"
|
||||
/>
|
||||
<el-option v-for="item of highlightAnswers" :key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value" :value="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 默认值 -->
|
||||
<el-form-item v-if="form.TableQuestionType === 0" :label="$t('trials:readingUnit:qsList:title:defaultValue')">
|
||||
<el-select v-model="form.DefaultValue" clearable>
|
||||
<el-option
|
||||
v-for="item of form.TypeValue ? form.TypeValue.split('|') : []"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
<el-option v-for="item of form.TypeValue ? form.TypeValue.split('|') : []" :key="item" :label="item"
|
||||
:value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 高亮标记值 -->
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" :label="$t('trials:readingUnit:qsList:title:highlightAnswers')" prop="HighlightAnswerList">
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'"
|
||||
:label="$t('trials:readingUnit:qsList:title:highlightAnswers')" prop="HighlightAnswerList">
|
||||
<el-select v-model="form.HighlightAnswerList" clearable multiple>
|
||||
<template v-if="form.TypeValue">
|
||||
<el-option
|
||||
v-for="item of form.TypeValue.split('|')"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
<el-option v-for="item of form.TypeValue.split('|')" :key="item" :label="item" :value="item" />
|
||||
</template>
|
||||
<template v-else-if="form.DictionaryCode">
|
||||
<!-- <el-option
|
||||
|
|
@ -391,24 +241,16 @@
|
|||
:label="item.label"
|
||||
:value="item.value.toString()"
|
||||
/> -->
|
||||
<el-option
|
||||
v-for="item of highlightAnswers"
|
||||
:key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
||||
:value="item.Code"
|
||||
/>
|
||||
<el-option v-for="item of highlightAnswers" :key="item.Id"
|
||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value" :value="item.Code" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 最大长度 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'input' || form.Type === 'textarea'"
|
||||
:label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')"
|
||||
prop="MaxAnswerLength"
|
||||
:rules="[
|
||||
<el-form-item v-if="form.Type === 'input' || form.Type === 'textarea'"
|
||||
:label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')" prop="MaxAnswerLength" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
||||
]"
|
||||
>
|
||||
]">
|
||||
<el-input-number v-model="form.MaxAnswerLength" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
<!-- 是否复制前值 -->
|
||||
|
|
@ -425,138 +267,75 @@
|
|||
/>
|
||||
</el-form-item> -->
|
||||
<!-- 数值类型 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
:label="$t('trials:readingUnit:qsList:title:valueType')"
|
||||
prop="ValueType"
|
||||
:rules="[
|
||||
<el-form-item v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
:label="$t('trials:readingUnit:qsList:title:valueType')" prop="ValueType" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select') }
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ValueType"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.ValueType"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
>
|
||||
]">
|
||||
<el-radio-group v-model="form.ValueType">
|
||||
<el-radio v-for="item of $d.ValueType" :key="item.id" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 单位 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
:label="$t('trials:readingUnit:qsList:title:unit')"
|
||||
prop="Unit"
|
||||
:rules="[
|
||||
<el-form-item v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
:label="$t('trials:readingUnit:qsList:title:unit')" prop="Unit" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.Unit"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.ValueUnit"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
>
|
||||
]">
|
||||
<el-radio-group v-model="form.Unit">
|
||||
<el-radio v-for="item of $d.ValueUnit" :key="item.id" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 最大上传个数 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'upload'"
|
||||
:label="$t('trials:readingUnit:qsList:title:imageCount')"
|
||||
prop="ImageCount"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.ImageCount"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
:max="10"
|
||||
/>
|
||||
<el-form-item v-if="form.Type === 'upload'" :label="$t('trials:readingUnit:qsList:title:imageCount')"
|
||||
prop="ImageCount">
|
||||
<el-input-number v-model="form.ImageCount" controls-position="right" :min="0" :max="10" />
|
||||
</el-form-item>
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'upload'"
|
||||
:label="$t('trials:readingUnit:qsList:title:FileType')"
|
||||
<el-form-item v-if="form.Type === 'upload'" :label="$t('trials:readingUnit:qsList:title:FileType')"
|
||||
prop="FileType"
|
||||
:rules="[{ type: 'array', required: true, message: this.$t('common:ruleMessage:specify'), trigger: [ 'change'] }]"
|
||||
>
|
||||
<el-checkbox-group
|
||||
v-model="form.FileType"
|
||||
@change="(v) => {
|
||||
if (v && v.includes('-1')) {
|
||||
form.FileType = ['-1']
|
||||
}
|
||||
}"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item of $d.fileType"
|
||||
:key="`fileType${item.value}`"
|
||||
:value="item.value + ''"
|
||||
:label="item.value"
|
||||
:disabled="form.FileType && form.FileType.includes('-1') && item.value !== '-1'"
|
||||
>
|
||||
:rules="[{ type: 'array', required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['change'] }]">
|
||||
<el-checkbox-group v-model="form.FileType" @change="(v) => {
|
||||
if (v && v.includes('-1')) {
|
||||
form.FileType = ['-1']
|
||||
}
|
||||
}">
|
||||
<el-checkbox v-for="item of $d.fileType" :key="`fileType${item.value}`" :value="item.value + ''"
|
||||
:label="item.value" :disabled="form.FileType && form.FileType.includes('-1') && item.value !== '-1'">
|
||||
{{ item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<!-- 分类 -->
|
||||
<!-- 分类数据来源 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'class'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:classifyQuestion')"
|
||||
prop="ClassifyTableQuestionId"
|
||||
>
|
||||
<el-form-item v-if="form.Type === 'class'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:classifyQuestion')" prop="ClassifyTableQuestionId">
|
||||
<el-select v-model="form.ClassifyTableQuestionId" clearable>
|
||||
<el-option v-for="item of Questions" :key="item.Id" :label="item.QuestionName"
|
||||
:value="item.Id"/>
|
||||
<el-option v-for="item of Questions" :key="item.Id" :label="item.QuestionName" :value="item.Id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 分类算法 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'class'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:classifyAlgorithms')"
|
||||
prop="ClassifyAlgorithms"
|
||||
>
|
||||
<el-form-item v-if="form.Type === 'class'"
|
||||
:label="$t('dictionary:template:criterionConfig:table:classifyAlgorithms')" prop="ClassifyAlgorithms">
|
||||
<div>
|
||||
<el-table
|
||||
ref="CalculateTable"
|
||||
:data="ClassifyAlgorithmsList"
|
||||
style="margin: 10px;width: 100%"
|
||||
size="small"
|
||||
>
|
||||
<el-table ref="CalculateTable" :data="ClassifyAlgorithmsList" style="margin: 10px;width: 100%" size="small">
|
||||
<!-- 运算类型 -->
|
||||
<el-table-column
|
||||
:label="$t('trials:readingUnit:label:label')"
|
||||
show-overflow-tooltip
|
||||
min-width="70"
|
||||
>
|
||||
<el-table-column :label="$t('trials:readingUnit:label:label')" show-overflow-tooltip min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.label }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 运算类型 -->
|
||||
<el-table-column
|
||||
:label="$t('trials:readingUnit:label:gt')"
|
||||
show-overflow-tooltip
|
||||
min-width="128"
|
||||
>
|
||||
<el-table-column :label="$t('trials:readingUnit:label:gt')" show-overflow-tooltip min-width="128">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.gt"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 运算类型 -->
|
||||
<el-table-column
|
||||
:label="$t('trials:readingUnit:label:lt')"
|
||||
show-overflow-tooltip
|
||||
min-width="128"
|
||||
>
|
||||
<el-table-column :label="$t('trials:readingUnit:label:lt')" show-overflow-tooltip min-width="128">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.lt"></el-input-number>
|
||||
</template>
|
||||
|
|
@ -569,11 +348,7 @@
|
|||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item>
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="close"
|
||||
>
|
||||
<el-button size="small" type="primary" @click="close">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
|
|
@ -666,7 +441,8 @@ export default {
|
|||
ClassifyAlgorithms: null,
|
||||
// ExportIdentification: 0,
|
||||
ExportResult: [],
|
||||
DefaultValue:null
|
||||
DefaultValue: null,
|
||||
OptionTypeEnum: 0
|
||||
// IsEnable: true
|
||||
},
|
||||
rules: {
|
||||
|
|
@ -677,8 +453,8 @@ export default {
|
|||
// { max: 300, message: '最大长度为 300' }],
|
||||
|
||||
TypeValue: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||
{ validator: validateTypeVal, trigger: 'blur' },
|
||||
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }],
|
||||
{ validator: validateTypeVal, trigger: 'blur' },
|
||||
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }],
|
||||
ShowQuestion: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }],
|
||||
IsRequired: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }],
|
||||
ParentId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }],
|
||||
|
|
@ -776,7 +552,7 @@ export default {
|
|||
if (this.data.hasOwnProperty(k)) {
|
||||
if (k === 'ClassifyAlgorithms' && this.data[k] !== undefined && this.data[k] !== '') {
|
||||
this.ClassifyAlgorithmsList = JSON.parse(this.data[k])
|
||||
} else if(k === 'FileType'){
|
||||
} else if (k === 'FileType') {
|
||||
this.form[k] = this.data[k].split(',')
|
||||
} else {
|
||||
this.form[k] = this.data[k]
|
||||
|
|
@ -792,10 +568,10 @@ export default {
|
|||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
// this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
let dicCode = this.parentOptions[index].DictionaryCode
|
||||
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
|
||||
let res = await getCriterionDictionary({ ReadingCriterionId: this.criterionId, DictionaryCode: dicCode })
|
||||
|
||||
this.parentTriggerValOptions = res.Result[dicCode].map(i=>{
|
||||
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
|
||||
this.parentTriggerValOptions = res.Result[dicCode].map(i => {
|
||||
return { id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code }
|
||||
})
|
||||
} else {
|
||||
const options = []
|
||||
|
|
@ -814,9 +590,9 @@ export default {
|
|||
if (this.parentOptions[i].QuestionGenre === 3) {
|
||||
// this.reParentTriggerValOptions = this.$d[this.parentOptions[i].DictionaryCode]
|
||||
let dicCode = this.parentOptions[i].DictionaryCode
|
||||
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
|
||||
this.reParentTriggerValOptions = res.Result[dicCode].map(i=>{
|
||||
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
|
||||
let res = await getCriterionDictionary({ ReadingCriterionId: this.criterionId, DictionaryCode: dicCode })
|
||||
this.reParentTriggerValOptions = res.Result[dicCode].map(i => {
|
||||
return { id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code }
|
||||
})
|
||||
} else {
|
||||
const options = []
|
||||
|
|
@ -903,12 +679,12 @@ export default {
|
|||
if (index !== -1) {
|
||||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
// this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
let dicCode = this.parentOptions[index].DictionaryCode
|
||||
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
|
||||
let dicCode = this.parentOptions[index].DictionaryCode
|
||||
let res = await getCriterionDictionary({ ReadingCriterionId: this.criterionId, DictionaryCode: dicCode })
|
||||
|
||||
this.parentTriggerValOptions = res.Result[dicCode].map(i=>{
|
||||
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
|
||||
})
|
||||
this.parentTriggerValOptions = res.Result[dicCode].map(i => {
|
||||
return { id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code }
|
||||
})
|
||||
} else {
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
|
|
@ -929,10 +705,10 @@ export default {
|
|||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
// this.reParentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
let dicCode = this.parentOptions[index].DictionaryCode
|
||||
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
|
||||
let res = await getCriterionDictionary({ ReadingCriterionId: this.criterionId, DictionaryCode: dicCode })
|
||||
|
||||
this.reParentTriggerValOptions = res.Result[dicCode].map(i=>{
|
||||
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
|
||||
this.reParentTriggerValOptions = res.Result[dicCode].map(i => {
|
||||
return { id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code }
|
||||
})
|
||||
} else {
|
||||
const options = []
|
||||
|
|
@ -993,6 +769,7 @@ export default {
|
|||
// form.ExportIdentification = 0
|
||||
form.ExportResult = []
|
||||
form.DefaultValue = null
|
||||
form.OptionTypeEnum = 0
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
|
|
@ -1001,5 +778,4 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@
|
|||
<div class="add-icon" @click.prevent="downloadTpl(item.LesionType)">
|
||||
<i class="el-icon-download" />
|
||||
</div>
|
||||
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl(item.LesionType, item.QuestionName)">
|
||||
<div class="add-icon" style="margin: 0 5px;"
|
||||
@click.prevent="uploadTpl(item.LesionType, item.QuestionName)">
|
||||
<i class="el-icon-upload2" />
|
||||
</div>
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)">
|
||||
|
|
@ -64,7 +65,11 @@
|
|||
{{ `${scope.row[q.Id]} ${$fd('ValueUnit', parseInt(q.Unit))}` }}
|
||||
</span>
|
||||
<span v-else-if="q.DictionaryCode">
|
||||
{{ `${$fd(q.DictionaryCode, parseInt(scope.row[q.Id]))}` }}
|
||||
{{`${scope.row[q.Id] instanceof Array ? scope.row[q.Id].map(item => $fd(q.DictionaryCode,
|
||||
parseInt(item))).join(',') : $fd(q.DictionaryCode, parseInt(scope.row[q.Id]))}`}}
|
||||
</span>
|
||||
<span v-else-if="q.OptionTypeEnum === 1">
|
||||
{{ `${scope.row[q.Id] instanceof Array ? scope.row[q.Id].join(',') : scope.row[q.Id]}` }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ `${scope.row[q.Id]}` }}
|
||||
|
|
@ -169,7 +174,8 @@
|
|||
<!-- 导入 -->
|
||||
<el-dialog v-if="upload.visible" :visible.sync="upload.visible" :close-on-click-modal="false"
|
||||
:title="upload.title" width="500px">
|
||||
<UploadExcel :visit-task-id="visitTaskId" :lesion-type="upload.lesionType" :TableName="upload.TableName" @close="uploadDlgClose" />
|
||||
<UploadExcel :visit-task-id="visitTaskId" :lesion-type="upload.lesionType" :TableName="upload.TableName"
|
||||
@close="uploadDlgClose" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -319,7 +325,7 @@ export default {
|
|||
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
|
||||
const answer = item.Type === 'select' && item.OptionTypeEnum === 1 && item.Answer ? JSON.parse(item.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) {
|
||||
|
|
@ -604,7 +610,7 @@ export default {
|
|||
for (const k in this.qsForm) {
|
||||
if (reg.test(k)) {
|
||||
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||
answers.push({ tableQuestionId: k, answer: this.qsForm[k] })
|
||||
answers.push({ tableQuestionId: k, answer: Array.isArray(this.qsForm[k]) ? JSON.stringify(this.qsForm[k]) : this.qsForm[k] })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,9 @@
|
|||
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="500" :disabled="readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, question) })" />
|
||||
<!-- 下拉框 -->
|
||||
<el-select v-else-if="question.Type === 'select' || question.type === 'multipleSelect'"
|
||||
v-model="questionForm[question.Id]"
|
||||
<el-select v-else-if="question.Type === 'select'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || ((question.TableQuestionType === 2 || question.QuestionGenre === 2) && !!question.DictionaryCode)"
|
||||
clearable :multiple="question.type === 'multipleSelect'"
|
||||
@change="((val) => { formItemChange(val, question) })">
|
||||
clearable :multiple="question.OptionTypeEnum === 1" @change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
<el-option v-for="item in organList" :key="item.Id" :label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]" />
|
||||
|
|
|
|||
|
|
@ -6,47 +6,44 @@
|
|||
>
|
||||
{{ question.GroupName }}
|
||||
</div> -->
|
||||
<div
|
||||
v-if="!!question.GroupName && question.Type==='group'"
|
||||
>
|
||||
<div v-if="!!question.GroupName && question.Type === 'group'">
|
||||
<h4 style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
{{ language==='en'?question.GroupEnName:question.GroupName }}
|
||||
{{ language === 'en' ? question.GroupEnName : question.GroupName }}
|
||||
</h4>
|
||||
</div>
|
||||
<template v-else-if="((question.QuestionType === 56 || question.QuestionType === 57) && question.IsBaseLineTask)" />
|
||||
<template v-else>
|
||||
|
||||
<el-form-item
|
||||
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion===0 "
|
||||
:label="`${question.QuestionName}`"
|
||||
:prop="question.Id"
|
||||
:rules="[
|
||||
{ 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']},
|
||||
v-if="(question.ShowQuestion === 1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion === 0"
|
||||
:label="`${question.QuestionName}`" :prop="question.Id" :rules="[
|
||||
{
|
||||
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' || question.QuestionName.length > 15) ?'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;">
|
||||
|
||||
<el-input
|
||||
v-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
style="width: 130px;"
|
||||
>
|
||||
<el-input v-if="question.Type === 'calculation'" v-model="questionForm[question.Id]" disabled
|
||||
style="width: 130px;">
|
||||
<template v-if="question.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(question.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
<!-- 测量 -->
|
||||
<el-button v-if="!questionForm[question.Id] && readingTaskState!== 2" size="mini" type="text" @click="addAnnotation(question)">{{ $t('trials:lugano:button:addAnnotation') }}</el-button>
|
||||
<el-button v-if="!questionForm[question.Id] && readingTaskState !== 2" size="mini" type="text"
|
||||
@click="addAnnotation(question)">{{ $t('trials:lugano:button:addAnnotation') }}</el-button>
|
||||
<!-- 清除标记 -->
|
||||
<el-button v-if="questionForm[question.Id]&& readingTaskState!== 2" size="mini" type="text" @click="removeAnnotation(question)">{{ $t('trials:lugano:button:clearAnnotation') }}</el-button>
|
||||
<el-button v-if="questionForm[question.Id] && readingTaskState !== 2" size="mini" type="text"
|
||||
@click="removeAnnotation(question)">{{ $t('trials:lugano:button:clearAnnotation') }}</el-button>
|
||||
<!-- 定位 -->
|
||||
<el-button v-if="questionForm[question.Id]" size="mini" type="text" @click="locateAnnotation(question)">{{ $t('trials:lugano:button:locateAnnotation') }}</el-button>
|
||||
<el-button v-if="questionForm[question.Id]" size="mini" type="text" @click="locateAnnotation(question)">{{
|
||||
$t('trials:lugano:button:locateAnnotation') }}</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button v-if="readingTaskState!== 2 && question.SaveEnum === 1" size="mini" type="text" @click="saveAnnotation(question)">
|
||||
<el-button v-if="readingTaskState !== 2 && question.SaveEnum === 1" size="mini" type="text"
|
||||
@click="saveAnnotation(question)">
|
||||
<!-- 未保存 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||
<i class="el-icon-warning" style="color:red" />
|
||||
|
|
@ -56,12 +53,9 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else-if="question.QuestionType === 48 || question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53">
|
||||
<el-input
|
||||
v-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
>
|
||||
<template
|
||||
v-else-if="question.QuestionType === 48 || question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53">
|
||||
<el-input v-if="question.Type === 'calculation'" v-model="questionForm[question.Id]" disabled>
|
||||
<template v-if="question.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(question.Unit)) }}
|
||||
</template>
|
||||
|
|
@ -69,144 +63,79 @@
|
|||
</template>
|
||||
|
||||
<!-- 输入框 -->
|
||||
<el-input
|
||||
v-else-if="question.Type==='input'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
/>
|
||||
<el-input v-else-if="question.Type === 'input'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask" @change="((val) => { formItemChange(val, question) })" />
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-else-if="question.Type==='textarea'"
|
||||
v-model="questionForm[question.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
maxlength="500"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
/>
|
||||
<el-input v-else-if="question.Type === 'textarea'" v-model="questionForm[question.Id]" type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="500" :disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
@change="((val) => { formItemChange(val, question) })" />
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-else-if="question.Type==='select'"
|
||||
v-model="questionForm[question.Id]"
|
||||
<el-select v-else-if="question.Type === 'select'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || ((question.TableQuestionType === 2 || question.QuestionGenre === 2) && !!question.DictionaryCode) || isFirstChangeTask || question.QuestionType === 50 || question.QuestionType === 55"
|
||||
clearable
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
clearable :multiple="question.OptionTypeEnum === 1" @change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]"
|
||||
/>
|
||||
<el-option v-for="item in organList" :key="item.Id" :label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]" />
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && question.IsBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 2 || item.value === 5 "
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 || item.value === 2 || item.value === 5" :key="item.id"
|
||||
:value="String(item.value)" :label="item.label" />
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && !question.IsBaseLineTask">
|
||||
<template
|
||||
v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && !question.IsBaseLineTask">
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 3|| item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode, parseFloat(question.LastTaskAnswer))}` : ''">
|
||||
<el-option v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 || item.value === 3 || item.value === 4 || item.value === 5" :key="item.id"
|
||||
:value="String(item.value)" :label="item.label" />
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && question.IsBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 5 || item.value === 6 "
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 || item.value === 5 || item.value === 6" :key="item.id"
|
||||
:value="String(item.value)" :label="item.label" />
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && !question.IsBaseLineTask">
|
||||
<template
|
||||
v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && !question.IsBaseLineTask">
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode, parseFloat(question.LastTaskAnswer))}` : ''">
|
||||
<el-option v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 || item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5"
|
||||
:key="item.id" :value="String(item.value)" :label="item.label" />
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
|
||||
:label="item.label" />
|
||||
</template>
|
||||
<template v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<template
|
||||
v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
|
||||
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
|
||||
:label="item.label" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
</template>
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-else-if="question.Type==='radio'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<el-radio-group v-else-if="question.Type === 'radio'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask" @change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.DictionaryCode">
|
||||
<el-radio
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:label="String(item.value)"
|
||||
>
|
||||
<el-radio v-for="item of $d[question.DictionaryCode]" :key="item.id" :label="String(item.value)">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</template>
|
||||
<template v-else-if="question.TypeValue">
|
||||
<el-radio
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
<el-radio v-for="val in question.TypeValue.split('|')" :key="val" :label="val">
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
<!-- 复选框 -->
|
||||
<el-checkbox-group
|
||||
v-else-if="question.Type==='checkbox'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
<el-checkbox-group v-else-if="question.Type === 'checkbox'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask">
|
||||
<el-checkbox v-for="val in question.TypeValue.split('|')" :key="val" :label="val">
|
||||
{{ val }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
|
@ -217,80 +146,41 @@
|
|||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
:precision="2"
|
||||
/> -->
|
||||
<template v-else-if="question.Type==='number'">
|
||||
<el-input-number
|
||||
v-if="question.ValueType === 0"
|
||||
v-model="questionForm[question.Id]"
|
||||
:precision="0"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="question.ValueType === 3"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="question.ValueType === 1 || question.ValueType === 2"
|
||||
v-model="questionForm[question.Id]"
|
||||
:precision="digitPlaces"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
/>
|
||||
<template v-else-if="question.Type === 'number'">
|
||||
<el-input-number v-if="question.ValueType === 0" v-model="questionForm[question.Id]" :precision="0"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask" />
|
||||
<el-input-number v-else-if="question.ValueType === 3" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask" />
|
||||
<el-input-number v-else-if="question.ValueType === 1 || question.ValueType === 2"
|
||||
v-model="questionForm[question.Id]" :precision="digitPlaces"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask" />
|
||||
</template>
|
||||
<el-input
|
||||
v-else-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
>
|
||||
<el-input 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'"
|
||||
action
|
||||
:accept="accept"
|
||||
:limit="question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:http-request="uploadScreenshot"
|
||||
list-type="picture-card"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
:class="{disabled:fileList.length >= question.ImageCount}"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask"
|
||||
>
|
||||
<el-upload v-else-if="question.Type === 'upload'" action :accept="accept" :limit="question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview" :before-upload="handleBeforeUpload" :http-request="uploadScreenshot"
|
||||
list-type="picture-card" :on-remove="handleRemove" :file-list="fileList"
|
||||
:class="{ disabled: fileList.length >= question.ImageCount }"
|
||||
:disabled="readingTaskState >= 2 || isFirstChangeTask">
|
||||
<i slot="default" class="el-icon-plus" />
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="OSSclientConfig.basePath + file.url"
|
||||
alt=""
|
||||
>
|
||||
<img class="el-upload-list__item-thumbnail" :src="OSSclientConfig.basePath + file.url" alt="">
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in" />
|
||||
</span>
|
||||
|
||||
<span
|
||||
v-if="readingTaskState < 2"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<span v-if="readingTaskState < 2" class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-dialog
|
||||
v-if="question.Type==='upload'"
|
||||
append-to-body
|
||||
:visible.sync="imgVisible"
|
||||
width="600px"
|
||||
>
|
||||
<el-dialog v-if="question.Type === 'upload'" append-to-body :visible.sync="imgVisible" width="600px">
|
||||
<el-image :src="imageUrl" width="100%">
|
||||
<div slot="placeholder" class="image-slot">
|
||||
加载中<span class="dot">...</span>
|
||||
|
|
@ -300,17 +190,9 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<QuestionItem
|
||||
v-for="(item) in question.Childrens"
|
||||
:key="item.Id"
|
||||
:question="item"
|
||||
:reading-task-state="readingTaskState"
|
||||
:is-first-change-task="isFirstChangeTask"
|
||||
:question-form="questionForm"
|
||||
:visit-task-id="visitTaskId"
|
||||
@setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
/>
|
||||
<QuestionItem v-for="(item) in question.Childrens" :key="item.Id" :question="item"
|
||||
:reading-task-state="readingTaskState" :is-first-change-task="isFirstChangeTask" :question-form="questionForm"
|
||||
:visit-task-id="visitTaskId" @setFormItemData="setFormItemData" @resetFormItemData="resetFormItemData" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -423,7 +305,7 @@ export default {
|
|||
.then(() => {
|
||||
DicomEvent.$emit('removeAnnotation', question)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
},
|
||||
locateAnnotation(question) {
|
||||
DicomEvent.$emit('locateAnnotation', question)
|
||||
|
|
@ -479,29 +361,36 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.mb{
|
||||
.mb {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.disabled{
|
||||
|
||||
.disabled {
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.uploadWrapper{
|
||||
|
||||
.uploadWrapper {
|
||||
display: flex;
|
||||
flex-direction: column !important;
|
||||
align-items: flex-start;
|
||||
}
|
||||
::v-deep .el-input.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
::v-deep .el-input-group__append, .el-input-group__prepend{
|
||||
padding: 0 10px;
|
||||
}
|
||||
::v-deep .el-form-item__content {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-select.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
::v-deep .el-input.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
::v-deep .el-input-group__append,
|
||||
.el-input-group__prepend {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
::v-deep .el-select.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,197 +1,104 @@
|
|||
<template>
|
||||
<div>
|
||||
<div
|
||||
v-if="!!question.GroupName && question.Type==='group'"
|
||||
>
|
||||
<div v-if="!!question.GroupName && question.Type === 'group'">
|
||||
<h4 style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
{{ language==='en'?question.GroupEnName:question.GroupName }}
|
||||
{{ language === 'en' ? question.GroupEnName : question.GroupName }}
|
||||
</h4>
|
||||
</div>
|
||||
<template v-else>
|
||||
<el-form-item
|
||||
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion===0 "
|
||||
:label="`${question.QuestionName}`"
|
||||
:prop="question.Id"
|
||||
:rules="[
|
||||
{ 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']},
|
||||
v-if="(question.ShowQuestion === 1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion === 0"
|
||||
:label="`${question.QuestionName}`" :prop="question.Id" :rules="[
|
||||
{
|
||||
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' || question.QuestionName.length > 15) ?'uploadWrapper' : '']"
|
||||
>
|
||||
:class="[question.Type === 'group' ? 'mb' : (question.Type === 'upload' || question.QuestionName.length > 15) ? 'uploadWrapper' : '']">
|
||||
|
||||
<!-- 输入框 -->
|
||||
<el-input
|
||||
v-if="question.Type==='input'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
/>
|
||||
<el-input v-if="question.Type === 'input'" v-model="questionForm[question.Id]" :disabled="readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, question) })" />
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-else-if="question.Type==='textarea'"
|
||||
v-model="questionForm[question.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
maxlength="500"
|
||||
:disabled="readingTaskState >= 2"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
/>
|
||||
<el-input v-else-if="question.Type === 'textarea'" v-model="questionForm[question.Id]" type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="500" :disabled="readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, question) })" />
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-else-if="question.Type==='select'"
|
||||
v-model="questionForm[question.Id]"
|
||||
<el-select v-else-if="question.Type === 'select'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 || ((question.TableQuestionType === 2 || question.QuestionGenre === 2) && !!question.DictionaryCode)"
|
||||
clearable
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
clearable :multiple="question.OptionTypeEnum === 1" @change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]"
|
||||
/>
|
||||
<el-option v-for="item in organList" :key="item.Id" :label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]" />
|
||||
</template>
|
||||
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
|
||||
:label="item.label" />
|
||||
</template>
|
||||
<template v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<template
|
||||
v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
|
||||
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
|
||||
:label="item.label" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
</template>
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-else-if="question.Type==='radio'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<el-radio-group v-else-if="question.Type === 'radio'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2" @change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.DictionaryCode">
|
||||
<el-radio
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:label="String(item.value)"
|
||||
>
|
||||
<el-radio v-for="item of $d[question.DictionaryCode]" :key="item.id" :label="String(item.value)">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</template>
|
||||
<template v-else-if="question.TypeValue">
|
||||
<el-radio
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
<el-radio v-for="val in question.TypeValue.split('|')" :key="val" :label="val">
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
<!-- 复选框 -->
|
||||
<el-checkbox-group
|
||||
v-else-if="question.Type==='checkbox'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
<el-checkbox-group v-else-if="question.Type === 'checkbox'" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2">
|
||||
<el-checkbox v-for="val in question.TypeValue.split('|')" :key="val" :label="val">
|
||||
{{ val }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<!-- 数值 -->
|
||||
<template v-else-if="question.Type==='number'">
|
||||
<el-input-number
|
||||
v-if="question.ValueType === 0"
|
||||
v-model="questionForm[question.Id]"
|
||||
:precision="0"
|
||||
:disabled="readingTaskState >= 2"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="question.ValueType === 3"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="question.ValueType === 1 || question.ValueType === 2"
|
||||
v-model="questionForm[question.Id]"
|
||||
:precision="digitPlaces"
|
||||
:disabled="readingTaskState >= 2"
|
||||
/>
|
||||
<template v-else-if="question.Type === 'number'">
|
||||
<el-input-number v-if="question.ValueType === 0" v-model="questionForm[question.Id]" :precision="0"
|
||||
:disabled="readingTaskState >= 2" />
|
||||
<el-input-number v-else-if="question.ValueType === 3" v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2" />
|
||||
<el-input-number v-else-if="question.ValueType === 1 || question.ValueType === 2"
|
||||
v-model="questionForm[question.Id]" :precision="digitPlaces" :disabled="readingTaskState >= 2" />
|
||||
</template>
|
||||
<el-input
|
||||
v-else-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
>
|
||||
<el-input 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'"
|
||||
action
|
||||
:accept="accept"
|
||||
:limit="question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:http-request="uploadScreenshot"
|
||||
list-type="picture-card"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
:class="{disabled:fileList.length >= question.ImageCount}"
|
||||
:disabled="readingTaskState >= 2"
|
||||
>
|
||||
<el-upload v-else-if="question.Type === 'upload'" action :accept="accept" :limit="question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview" :before-upload="handleBeforeUpload" :http-request="uploadScreenshot"
|
||||
list-type="picture-card" :on-remove="handleRemove" :file-list="fileList"
|
||||
:class="{ disabled: fileList.length >= question.ImageCount }" :disabled="readingTaskState >= 2">
|
||||
<i slot="default" class="el-icon-plus" />
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="OSSclientConfig.basePath + file.url"
|
||||
alt=""
|
||||
>
|
||||
<img class="el-upload-list__item-thumbnail" :src="OSSclientConfig.basePath + file.url" alt="">
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in" />
|
||||
</span>
|
||||
|
||||
<span
|
||||
v-if="readingTaskState < 2"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<span v-if="readingTaskState < 2" class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-dialog
|
||||
v-if="question.Type==='upload'"
|
||||
append-to-body
|
||||
:visible.sync="imgVisible"
|
||||
width="600px"
|
||||
>
|
||||
<el-dialog v-if="question.Type === 'upload'" append-to-body :visible.sync="imgVisible" width="600px">
|
||||
<el-image :src="imageUrl" width="100%">
|
||||
<div slot="placeholder" class="image-slot">
|
||||
加载中<span class="dot">...</span>
|
||||
|
|
@ -201,16 +108,9 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<question-form-item
|
||||
v-for="(item) in question.Childrens"
|
||||
:key="item.Id"
|
||||
:question="item"
|
||||
:question-form="questionForm"
|
||||
:reading-task-state="readingTaskState"
|
||||
:visitTaskId="visitTaskId"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
@setFormItemData="setFormItemData"
|
||||
/>
|
||||
<question-form-item v-for="(item) in question.Childrens" :key="item.Id" :question="item"
|
||||
:question-form="questionForm" :reading-task-state="readingTaskState" :visitTaskId="visitTaskId"
|
||||
@resetFormItemData="resetFormItemData" @setFormItemData="setFormItemData" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -293,33 +193,40 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.mb{
|
||||
.mb {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.disabled{
|
||||
|
||||
.disabled {
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.uploadWrapper{
|
||||
|
||||
.uploadWrapper {
|
||||
display: flex;
|
||||
flex-direction: column !important;
|
||||
align-items: flex-start;
|
||||
}
|
||||
::v-deep .el-input.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
::v-deep .el-input-group__append, .el-input-group__prepend{
|
||||
|
||||
::v-deep .el-input.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
::v-deep .el-input-group__append,
|
||||
.el-input-group__prepend {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-select.is-disabled .el-input__inner{
|
||||
|
||||
::v-deep .el-select.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
// ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
|
||||
// background-color: #428bca;
|
||||
// border-color: #428bca;
|
||||
// }
|
||||
</style>
|
||||
// }</style>
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ export default {
|
|||
getOuterFormData(childrens, formData = {}) {
|
||||
childrens.forEach(item => {
|
||||
if (item.Type !== 'group' && item.Type !== 'summary') {
|
||||
formData[item.Id] = item.Answer || ''
|
||||
formData[item.Id] = item.Answer ? item.OptionTypeEnum === 1 ? JSON.parse(item.Answer) : item.Answer : ''
|
||||
if (item.QuestionType === 44) {
|
||||
// 影像质量评估
|
||||
this.imageQualityId = item.Id
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@
|
|||
<span v-else-if="item.Type === 'number'">
|
||||
{{ scope.row[item.Id] ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) : null }}
|
||||
</span>
|
||||
<span v-else-if="item.Type === 'select' && item.OptionTypeEnum === 1">
|
||||
{{ scope.row[item.Id] && Array.isArray(scope.row[item.Id]) ?
|
||||
scope.row[item.Id].join(',') : scope.row[item.Id] }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row[item.Id] }}
|
||||
</span>
|
||||
|
|
@ -92,6 +96,7 @@
|
|||
:autosize="{ minRows: 2, maxRows: 4 }" :disabled="readingTaskState === 2" />
|
||||
<!-- 下拉框 -->
|
||||
<el-select v-if="question.Type === 'select'" v-model="questionForm[question.Id]" clearable
|
||||
:multiple="question.OptionTypeEnum === 1"
|
||||
:disabled="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && !!question.DictionaryCode || readingTaskState === 2"
|
||||
@change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
|
|
@ -636,7 +641,7 @@ export default {
|
|||
for (const k in this.QuestionsForm) {
|
||||
if (reg.test(k)) {
|
||||
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||
answers.push({ tableQuestionId: k, answer: this.QuestionsForm[k] })
|
||||
answers.push({ tableQuestionId: k, answer: Array.isArray(this.QuestionsForm[k]) ? JSON.stringify(this.QuestionsForm[k]) : this.QuestionsForm[k] })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -744,7 +749,7 @@ export default {
|
|||
}
|
||||
},
|
||||
logic(rules, num = 0) {
|
||||
let isNE = false
|
||||
let isNE = false, isNAN = false
|
||||
try {
|
||||
if (rules.CalculateQuestionList.length === 0) {
|
||||
return false
|
||||
|
|
@ -762,6 +767,8 @@ export default {
|
|||
} else {
|
||||
num *= parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -777,6 +784,8 @@ export default {
|
|||
} else {
|
||||
num += parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -792,6 +801,8 @@ export default {
|
|||
} else {
|
||||
num += parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -805,6 +816,8 @@ export default {
|
|||
this.questionForm[o.QuestionId].forEach(q => {
|
||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||
arr.push(q[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -818,6 +831,8 @@ export default {
|
|||
this.questionForm[o.QuestionId].forEach(q => {
|
||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||
arr.push(q[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
isNE = true
|
||||
|
|
@ -832,6 +847,8 @@ export default {
|
|||
}
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num = parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
if (!isNaN(num)) {
|
||||
dataArr.push(num)
|
||||
|
|
@ -845,18 +862,24 @@ export default {
|
|||
case 1:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num += parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -867,12 +890,16 @@ export default {
|
|||
} else {
|
||||
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 10:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
|
||||
return acc + (typeof curr === "number" ? curr : 0);
|
||||
|
|
@ -881,27 +908,43 @@ export default {
|
|||
case 11:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = Math.max(...dataArr);
|
||||
break;
|
||||
case 12:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = Math.min(...dataArr);
|
||||
break;
|
||||
case 13:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
|
||||
break;
|
||||
case 14:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
|
||||
break;
|
||||
case 15:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num = Math.abs(num)
|
||||
}
|
||||
else {
|
||||
isNAN = true
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -911,7 +954,7 @@ export default {
|
|||
if (isNE) {
|
||||
return 'NE'
|
||||
}
|
||||
if (isNaN(num)) {
|
||||
if (isNAN) {
|
||||
return null
|
||||
}
|
||||
if (rules.ValueType === 2) {
|
||||
|
|
@ -964,7 +1007,7 @@ export default {
|
|||
var CalculateQuestions = JSON.parse(v.CalculateQuestions);
|
||||
var num,
|
||||
arr = [];
|
||||
let isNE = false
|
||||
let isNE = false, isNAN = false
|
||||
CalculateQuestions.forEach((o, i) => {
|
||||
if (this.QuestionsForm[o.TableQuestionId] === 'NE') {
|
||||
isNE = true
|
||||
|
|
@ -973,6 +1016,8 @@ export default {
|
|||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
num = parseFloat(this.QuestionsForm[o.TableQuestionId]);
|
||||
arr = [num];
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -980,24 +1025,32 @@ export default {
|
|||
case 1:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
case 4:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -1006,6 +1059,9 @@ export default {
|
|||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
|
||||
}
|
||||
|
||||
else {
|
||||
isNAN = true
|
||||
}
|
||||
num =
|
||||
arr.length === 0
|
||||
? 0
|
||||
|
|
@ -1016,6 +1072,8 @@ export default {
|
|||
case 8:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
num = arr.length === 0 ? 0 : Math.max(...arr);
|
||||
|
|
@ -1023,6 +1081,8 @@ export default {
|
|||
case 9:
|
||||
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
|
||||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
num = arr.length === 0 ? 0 : Math.min(...arr);
|
||||
|
|
@ -1034,6 +1094,9 @@ export default {
|
|||
if (isNE) {
|
||||
num = 'NE'
|
||||
}
|
||||
if (isNAN) {
|
||||
num = ''
|
||||
}
|
||||
this.$set(this.QuestionsForm, v.Id, num.toString());
|
||||
}
|
||||
});
|
||||
|
|
@ -1198,11 +1261,12 @@ export default {
|
|||
const referencedImageId = annotation?.metadata?.referencedImageId
|
||||
if (!referencedImageId) return null
|
||||
const cacheKey = `imageId:${referencedImageId}`
|
||||
const cachedStats = annotation.data?.cachedStats?.[cacheKey]
|
||||
const points = ['x', 'y', 'z'];
|
||||
const cachedStats = annotation.markTool === "ArrowAnnotate" ? annotation.data?.handles?.points[0] : annotation.data?.cachedStats?.[cacheKey]
|
||||
const hasProp = cachedStats
|
||||
&& Object.prototype.hasOwnProperty.call(cachedStats, prop)
|
||||
&& (Object.prototype.hasOwnProperty.call(cachedStats, prop) || cachedStats[points.indexOf(prop)])
|
||||
if (!hasProp) return null
|
||||
const value = cachedStats[prop]
|
||||
const value = annotation.markTool === "ArrowAnnotate" ? cachedStats[points.indexOf(prop)] : cachedStats[prop]
|
||||
return value !== null
|
||||
? parseFloat(value).toFixed(this.digitPlaces)
|
||||
: value
|
||||
|
|
|
|||
|
|
@ -181,6 +181,9 @@ export default {
|
|||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||
this.$set(this.questionForm, i.Id, i.Answer)
|
||||
}
|
||||
if (i.Type === 'select' && i.OptionTypeEnum === 1) {
|
||||
this.$set(this.questionForm, i.Id, i.Answer ? JSON.parse(i.Answer) : [])
|
||||
}
|
||||
if (i.Type === 'table' || i.Type === 'basicTable') {
|
||||
i.TableQuestions.Questions.forEach(o => {
|
||||
if (o.Type === 'number') {
|
||||
|
|
@ -188,6 +191,11 @@ export default {
|
|||
this.$set(i.TableQuestions.Answers[index], o.Id, isNaN(parseFloat(i.TableQuestions.Answers[index][o.Id])) ? i.TableQuestions.Answers[index][o.Id] : parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces))
|
||||
})
|
||||
}
|
||||
if (o.Type === 'select' && o.OptionTypeEnum === 1) {
|
||||
i.TableQuestions.Answers.forEach((ite, index) => {
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? JSON.parse(i.TableQuestions.Answers[index][o.Id]) : [])
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$set(this.questionForm, i.Id, i.TableQuestions.Answers)
|
||||
}
|
||||
|
|
@ -220,7 +228,11 @@ export default {
|
|||
try {
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
if (this.questionForm[k] instanceof Array) { } else {
|
||||
if (this.questionForm[k] instanceof Array) {
|
||||
if (this.questionForm[k].length > 0 && Object.prototype.toString.call(this.questionForm[k][0]) === '[object String]') {
|
||||
answers.push({ id: k, answer: JSON.stringify(this.questionForm[k]) })
|
||||
}
|
||||
} else {
|
||||
answers.push({ id: k, answer: this.questionForm[k] })
|
||||
}
|
||||
}
|
||||
|
|
@ -261,7 +273,11 @@ export default {
|
|||
this.loading = true
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
if (this.questionForm[k] instanceof Array) { } else {
|
||||
if (this.questionForm[k] instanceof Array) {
|
||||
if (this.questionForm[k].length > 0 && Object.prototype.toString.call(this.questionForm[k][0]) === '[object String]') {
|
||||
answers.push({ id: k, answer: JSON.stringify(this.questionForm[k]) })
|
||||
}
|
||||
} else {
|
||||
answers.push({ readingQuestionTrialId: k, answer: this.questionForm[k] })
|
||||
}
|
||||
}
|
||||
|
|
@ -952,11 +968,12 @@ export default {
|
|||
const referencedImageId = annotation?.metadata?.referencedImageId
|
||||
if (!referencedImageId) return null
|
||||
const cacheKey = `imageId:${referencedImageId}`
|
||||
const cachedStats = annotation.data?.cachedStats?.[cacheKey]
|
||||
const points = ['x', 'y', 'z']
|
||||
const cachedStats = annotation.markTool === "ArrowAnnotate" ? annotation.data?.handles?.points[0] : annotation.data?.cachedStats?.[cacheKey]
|
||||
const hasProp = cachedStats
|
||||
&& Object.prototype.hasOwnProperty.call(cachedStats, prop)
|
||||
&& (Object.prototype.hasOwnProperty.call(cachedStats, prop) || cachedStats[points.indexOf(prop)])
|
||||
if (!hasProp) return null
|
||||
const value = cachedStats[prop]
|
||||
const value = annotation.markTool === "ArrowAnnotate" ? cachedStats[points.indexOf(prop)] : cachedStats[prop]
|
||||
return value !== null
|
||||
? parseFloat(value).toFixed(this.digitPlaces)
|
||||
: value
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
:autosize="{ minRows: 2, maxRows: 4 }" />
|
||||
<!-- 下拉框 -->
|
||||
<el-select v-if="question.Type === 'select'" v-model="questionForm[question.Id]" clearable
|
||||
:multiple="question.OptionTypeEnum === 1"
|
||||
:disabled="(question.TableQuestionType === 2 || question.IsPreinstall || question.QuestionGenre === 2) || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val) => { formItemChange(val, question) })">
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
|
|
@ -62,7 +63,8 @@
|
|||
<el-input v-if="question.Type === 'class' && question.ClassifyShowType === 1"
|
||||
v-model="questionForm[question.Id]" />
|
||||
<el-select v-if="question.Type === 'class' && question.ClassifyShowType === 2" v-model="questionForm[question.Id]"
|
||||
:disabled="!question.ClassifyEditType || question.IsPreinstall" @change="(val) => { formItemChange(val, question) }">
|
||||
:disabled="!question.ClassifyEditType || question.IsPreinstall"
|
||||
@change="(val) => { formItemChange(val, question) }">
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val.trim()" :value="val.trim()" />
|
||||
</el-select>
|
||||
<el-radio-group v-if="question.Type === 'class' && question.ClassifyShowType === 3"
|
||||
|
|
@ -158,9 +160,9 @@
|
|||
</el-input>
|
||||
</template>
|
||||
<!-- 上传图像 -->
|
||||
<el-upload v-if="question.Type === 'upload' || question.Type === 'screenshot'" :disabled="readingTaskState === 2 || question.IsPreinstall"
|
||||
action :accept="question.FileType" :limit="question.ImageCount === 0 ? 100 : question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
<el-upload v-if="question.Type === 'upload' || question.Type === 'screenshot'"
|
||||
:disabled="readingTaskState === 2 || question.IsPreinstall" action :accept="question.FileType"
|
||||
:limit="question.ImageCount === 0 ? 100 : question.ImageCount" :on-preview="handlePictureCardPreview"
|
||||
:before-upload="(file) => { return handleBeforeUpload(file, question.FileType, question.Type) }"
|
||||
:http-request="uploadScreenshot" :on-remove="handleRemove" :file-list="fileList"
|
||||
:class="{ disabled: question.ImageCount === 0 ? false : fileList.length >= question.ImageCount }">
|
||||
|
|
|
|||
|
|
@ -68,24 +68,35 @@
|
|||
<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-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
||||
size="mini" clearable>
|
||||
size="mini" clearable :multiple="scope.row.OptionTypeEnum === 1">
|
||||
<template>
|
||||
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
</template>
|
||||
</el-select>
|
||||
<span
|
||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio')">
|
||||
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
|
||||
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && questionForm[scope.row.QuestionId][scope.row.xfIndex] && questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] && (scope.row.Type === 'select' || scope.row.Type === 'radio')">
|
||||
{{
|
||||
|
||||
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]
|
||||
}}
|
||||
</span>
|
||||
<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-model="questionForm[scope.row.QuestionId]" size="mini" clearable>
|
||||
v-model="questionForm[scope.row.QuestionId]" size="mini" clearable
|
||||
:multiple="scope.row.OptionTypeEnum === 1">
|
||||
<template>
|
||||
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
</template>
|
||||
</el-select>
|
||||
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
|
||||
{{ questionForm[scope.row.QuestionId] }}
|
||||
{{
|
||||
questionForm[scope.row.QuestionId] && Array.isArray(questionForm[scope.row.QuestionId]) ?
|
||||
questionForm[scope.row.QuestionId].join(',') :
|
||||
questionForm[scope.row.QuestionId]
|
||||
}}
|
||||
</span>
|
||||
<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)"
|
||||
|
|
@ -160,7 +171,10 @@
|
|||
</span>
|
||||
</template>
|
||||
<template v-else-if="scope.row.DictionaryCode">
|
||||
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
|
||||
{{scope.row.Answers[task.VisitTaskId] instanceof Array
|
||||
? scope.row.Answers[task.VisitTaskId].map(item => $fd(scope.row.DictionaryCode,
|
||||
item)).join(",") : $fd(scope.row.DictionaryCode,
|
||||
scope.row.Answers[task.VisitTaskId])}}
|
||||
</template>
|
||||
<template v-else-if="criterionType === 10">
|
||||
{{
|
||||
|
|
@ -430,7 +444,7 @@ export default {
|
|||
})
|
||||
},
|
||||
logic(rules, num = 0) {
|
||||
let isNE = false
|
||||
let isNE = false, isNAN = false
|
||||
try {
|
||||
if (rules.CalculateQuestionList.length === 0) {
|
||||
return false
|
||||
|
|
@ -451,6 +465,8 @@ export default {
|
|||
} else {
|
||||
num *= parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -466,6 +482,8 @@ export default {
|
|||
} else {
|
||||
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
isNE = true
|
||||
|
|
@ -480,6 +498,8 @@ export default {
|
|||
} else {
|
||||
num += parseFloat(q[o.TableQuestionId])
|
||||
}
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
isNE = true
|
||||
|
|
@ -492,6 +512,8 @@ export default {
|
|||
this.questionForm[o.QuestionId].forEach(q => {
|
||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||
arr.push(q[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
|
|
@ -505,6 +527,8 @@ export default {
|
|||
this.questionForm[o.QuestionId].forEach(q => {
|
||||
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
|
||||
arr.push(q[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
if (q[o.TableQuestionId] === 'NE') {
|
||||
isNE = true
|
||||
|
|
@ -516,6 +540,8 @@ export default {
|
|||
} else {
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num = parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -524,24 +550,32 @@ export default {
|
|||
case 1:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num += parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break
|
||||
case 2:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break
|
||||
case 3:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
break
|
||||
case 4:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
|
||||
// num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
|
|
@ -549,6 +583,8 @@ export default {
|
|||
case 10:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
|
||||
return acc + (typeof curr === "number" ? curr : 0);
|
||||
|
|
@ -557,27 +593,40 @@ export default {
|
|||
case 11:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = Math.max(...dataArr);
|
||||
break;
|
||||
case 12:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = Math.min(...dataArr);
|
||||
break;
|
||||
case 13:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
|
||||
break;
|
||||
case 14:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
} else {
|
||||
isNAN = true
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
|
||||
break;
|
||||
case 15:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
num = Math.abs(num)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -587,6 +636,9 @@ export default {
|
|||
if (isNE) {
|
||||
return 'NE'
|
||||
}
|
||||
if (isNAN) {
|
||||
return null
|
||||
}
|
||||
if (rules.ValueType === 2) {
|
||||
num = num * 100
|
||||
}
|
||||
|
|
@ -614,39 +666,54 @@ export default {
|
|||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
getQuestions(questions) {
|
||||
const arr = []
|
||||
if (questions.length !== 0) {
|
||||
questions.forEach((item) => {
|
||||
const obj = item
|
||||
this.$set(obj, 'Answers', {})
|
||||
item.Answer.forEach(i => {
|
||||
if (item.DictionaryCode) {
|
||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||
} else {
|
||||
if (item.Type === 'number') {
|
||||
let val = null
|
||||
if (item.ValueType === 0) {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseInt(i.Answer)
|
||||
} else if (item.ValueType === 3) {
|
||||
val = i.Answer
|
||||
try {
|
||||
const arr = []
|
||||
if (questions.length !== 0) {
|
||||
questions.forEach((item) => {
|
||||
const obj = item
|
||||
this.$set(obj, 'Answers', {})
|
||||
item.Answer.forEach(i => {
|
||||
if (item.DictionaryCode) {
|
||||
if (item.Type === 'select' && item.OptionTypeEnum === 1) {
|
||||
let val = i.Answer ? JSON.parse(i.Answer) : []
|
||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||
} else {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces)
|
||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
||||
}
|
||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||
|
||||
|
||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||
} else {
|
||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer)
|
||||
if (item.Type === 'number') {
|
||||
let val = null
|
||||
if (item.ValueType === 0) {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseInt(i.Answer)
|
||||
} else if (item.ValueType === 3) {
|
||||
val = i.Answer
|
||||
} else {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces)
|
||||
}
|
||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||
} else if (item.Type === 'select' && item.OptionTypeEnum === 1) {
|
||||
let val = i.Answer ? JSON.parse(i.Answer) : []
|
||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||
} else {
|
||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer)
|
||||
}
|
||||
// obj.Answers[i.VisitTaskId] = i.Answer
|
||||
}
|
||||
// obj.Answers[i.VisitTaskId] = i.Answer
|
||||
})
|
||||
if (item.Childrens.length >= 1) {
|
||||
obj.Childrens = this.getQuestions(item.Childrens)
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
if (item.Childrens.length >= 1) {
|
||||
obj.Childrens = this.getQuestions(item.Childrens)
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
}
|
||||
return arr
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
return arr
|
||||
|
||||
},
|
||||
handleShowDetail(val) {
|
||||
this.getReportInfo()
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ const config = {
|
|||
'name': '箭头工具',
|
||||
'icon': 'arrow',
|
||||
'toolName': 'ArrowAnnotate',
|
||||
'props': [],
|
||||
'props': ['x', 'y', 'z'],
|
||||
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
|
|
|
|||
|
|
@ -225,6 +225,17 @@
|
|||
</el-form-item>
|
||||
<!-- 私有属性 -->
|
||||
<el-divider content-position="left">{{ $t('trials:readingUnit:title:privateProperties') }}</el-divider>
|
||||
<!-- 下拉框单选或多选 -->
|
||||
<el-form-item v-if="form.Type === 'select'" :label="$t('trials:readingUnit:qsList:title:MultipleSelect')"
|
||||
prop="OptionTypeEnum" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify') }
|
||||
]">
|
||||
<el-radio-group v-model="form.OptionTypeEnum">
|
||||
<el-radio v-for="item of $d.OptionType" :key="item.id" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 数值类型 -->
|
||||
<el-form-item v-if="form.Type === 'number'" :label="$t('trials:readingUnit:qsList:title:valueType')"
|
||||
prop="ValueType" :rules="[
|
||||
|
|
@ -737,7 +748,8 @@ export default {
|
|||
ImageMarkEnum: 0,
|
||||
ImageTool: '',
|
||||
ImageToolAttribute: '',
|
||||
ExcludeShowVisitList: []
|
||||
ExcludeShowVisitList: [],
|
||||
OptionTypeEnum: 0
|
||||
|
||||
// IsEnable: true
|
||||
},
|
||||
|
|
@ -1246,6 +1258,7 @@ export default {
|
|||
form.ImageMarkEnum = 0
|
||||
form.ImageTool = ''
|
||||
form.ImageToolAttribute = ''
|
||||
form.OptionTypeEnum = 0
|
||||
this.imageToolAttributes = []
|
||||
},
|
||||
getLesionType() {
|
||||
|
|
|
|||
|
|
@ -154,6 +154,17 @@
|
|||
|
||||
<!-- 私有属性 -->
|
||||
<el-divider content-position="left">{{ $t('trials:readingUnit:title:privateProperties') }}</el-divider>
|
||||
<!-- 下拉框单选或多选 -->
|
||||
<el-form-item v-if="form.Type === 'select'" :label="$t('trials:readingUnit:qsList:title:MultipleSelect')"
|
||||
prop="OptionTypeEnum" :rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify') }
|
||||
]">
|
||||
<el-radio-group v-model="form.OptionTypeEnum">
|
||||
<el-radio v-for="item of $d.OptionType" :key="item.id" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 问题数据来源 -->
|
||||
<el-form-item v-if="form.Type === 'number'" :label="$t('trials:readingUnit:qsList:title:dataSource')"
|
||||
prop="DataSource" :rules="[
|
||||
|
|
@ -600,6 +611,7 @@ export default {
|
|||
ImageMarkEnum: 0,
|
||||
ImageTool: '',
|
||||
ImageToolAttribute: '',
|
||||
OptionTypeEnum: 0
|
||||
// IsEnable: true
|
||||
},
|
||||
imageToolAttributes: [],
|
||||
|
|
@ -1110,6 +1122,7 @@ export default {
|
|||
form.ImageMarkEnum = 0
|
||||
form.ImageTool = ''
|
||||
form.ImageToolAttribute = ''
|
||||
form.OptionTypeEnum = 0
|
||||
this.imageToolAttributes = []
|
||||
},
|
||||
close() {
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@
|
|||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsHaveDicom" type="primary">{{
|
||||
$fd('IsDicom', true)
|
||||
}}</el-tag>
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.IsHaveNoneDicom" type="primary">{{
|
||||
$fd('IsDicom', false)
|
||||
}}</el-tag>
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 影像数量 -->
|
||||
|
|
@ -204,16 +204,16 @@ export default {
|
|||
}
|
||||
let res = await getExportSubjectVisitImageList(data)
|
||||
if (res.IsSuccess) {
|
||||
this.downLoad(IsKeyImage, res.Result)
|
||||
this.downLoad(IsKeyImage, res.Result, IsExportReading)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 下载
|
||||
async downLoad(IsKeyImage = false, row) {
|
||||
async downLoad(IsKeyImage = false, row, IsExportReading = false) {
|
||||
try {
|
||||
let { files, name } = this.formatDownloadFile(IsKeyImage, row)
|
||||
let { files, name } = this.formatDownloadFile(IsKeyImage, row, IsExportReading)
|
||||
let res = await downLoadFile(files, name, 'zip')
|
||||
// }
|
||||
} catch (err) {
|
||||
|
|
@ -221,24 +221,44 @@ export default {
|
|||
}
|
||||
},
|
||||
// 格式化下载文件路径
|
||||
formatDownloadFile(IsKeyImage = false, row) {
|
||||
formatDownloadFile(IsKeyImage = false, row, IsExportReading = false) {
|
||||
let files = [],
|
||||
name = `${this.$route.query.researchProgramNo}_${this.$t('trials:imageSummary:downloadname:dicom')}_${Date.now()}.zip`;
|
||||
if (IsExportReading) {
|
||||
name = `${this.$route.query.researchProgramNo}_${this.$t('trials:imageSummary:downloadname:readingDicom')}_${Date.now()}.zip`;
|
||||
}
|
||||
if (!IsKeyImage) {
|
||||
//中心ID/受试者ID/访视名/Study ID_Study Date_Modality/文件
|
||||
row.VisitList.forEach(visit => {
|
||||
if (visit.StudyList && visit.StudyList.length > 0) {
|
||||
visit.StudyList.forEach(study => {
|
||||
let arr = []
|
||||
study.SeriesList.forEach(item => {
|
||||
if (!arr.includes(item.Modality)) {
|
||||
arr.push(item.Modality)
|
||||
}
|
||||
})
|
||||
let str = arr.join('_')
|
||||
let time = study.StudyTime.split(' ')[0]
|
||||
if (study.StudyDIRPath && !study.dirHas) {
|
||||
study.dirHas = true
|
||||
let obj = {
|
||||
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${time}_${str}/DICOMDIR`,
|
||||
url: this.OSSclientConfig.basePath + study.StudyDIRPath,
|
||||
}
|
||||
files.push(obj)
|
||||
}
|
||||
if (study.SeriesList && study.SeriesList.length > 0) {
|
||||
study.SeriesList.forEach(serie => {
|
||||
if (serie.InstancePathList && serie.InstancePathList.length > 0) {
|
||||
serie.InstancePathList.forEach(instance => {
|
||||
|
||||
if (serie.InstanceList && serie.InstanceList.length > 0) {
|
||||
serie.InstanceList.forEach(instance => {
|
||||
let instanceArr = instance.Path.split("/")
|
||||
let fileName = instanceArr[instanceArr.length - 1]
|
||||
let time = study.StudyTime.split(' ')[0]
|
||||
let fileName = instance.FileName || instanceArr[instanceArr.length - 1]
|
||||
let obj = {
|
||||
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${time}_${serie.Modality}/IMAGE/${fileName}`,
|
||||
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${time}_${str}/IMAGE/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + instance.Path,
|
||||
IsEncapsulated: instance.IsEncapsulated
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue