自定义表格问题预览
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1d42e5eab5
commit
7692037b67
2
.env.usa
2
.env.usa
|
@ -2,7 +2,7 @@
|
|||
ENV = 'production'
|
||||
NODE_ENV = 'production'
|
||||
# base public path
|
||||
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-01-19/'
|
||||
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-01-22/'
|
||||
|
||||
# 是否开启登陆限制 true:是 false:否
|
||||
VUE_APP_LOGIN_FOR_PERMISSION = false
|
||||
|
|
|
@ -239,7 +239,6 @@
|
|||
</el-dialog>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="question.Childrens && question.Childrens.length>0 && question.Type !== 'table'">
|
||||
<QuestionFormItem
|
||||
v-for="(item) in question.Childrens"
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item v-if="form.Type === 'upload'" :label="$t('trials:readingUnit:qsList:title:FileType')" prop="DataSource">
|
||||
<el-form-item v-if="form.Type === 'upload'" :label="$t('trials:readingUnit:qsList:title:FileType')"
|
||||
prop="DataSource">
|
||||
<el-checkbox-group
|
||||
v-model="form.FileType"
|
||||
@change="(v) => {
|
||||
|
@ -97,12 +98,13 @@
|
|||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<!-- 最大字符数 -->
|
||||
<el-form-item v-if="form.Type === 'input' || form.Type === 'textarea'" :label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')">
|
||||
<el-input v-model="form.MaxAnswerLength" />
|
||||
<el-form-item v-if="form.Type === 'input' || form.Type === 'textarea'"
|
||||
:label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')">
|
||||
<el-input v-model="form.MaxAnswerLength"/>
|
||||
</el-form-item>
|
||||
<!-- 自增序号前缀 -->
|
||||
<el-form-item v-if="form.Type === 'table'" :label="$t('trials:readingUnit:qsList:title:orderMark')">
|
||||
<el-input v-model="form.OrderMark" />
|
||||
<el-input v-model="form.OrderMark"/>
|
||||
</el-form-item>
|
||||
<!-- 最大行数 -->
|
||||
<el-form-item v-if="form.Type === 'table'" :label="$t('trials:readingUnit:qsList:title:maxQuestionCount')">
|
||||
|
@ -120,7 +122,8 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<!-- 问题数据来源 -->
|
||||
<el-form-item v-if="form.Type === 'number'" :label="$t('trials:readingUnit:qsList:title:dataSource')" prop="DataSource">
|
||||
<el-form-item v-if="form.Type === 'number'" :label="$t('trials:readingUnit:qsList:title:dataSource')"
|
||||
prop="DataSource">
|
||||
<el-radio-group
|
||||
v-model="form.DataSource"
|
||||
>
|
||||
|
@ -164,7 +167,7 @@
|
|||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-input :value="$fd('DigitPlaces', ValueType).toString()" :disabled="true" />
|
||||
<el-input :value="$fd('DigitPlaces', ValueType).toString()" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<!-- 单位 -->
|
||||
<el-form-item
|
||||
|
@ -190,9 +193,10 @@
|
|||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="form.CustomUnit" />
|
||||
<el-input v-model="form.CustomUnit"/>
|
||||
</el-form-item>
|
||||
<div v-if="form.Type === 'number' && form.DataSource === 1" style="background: #f8f8f8;padding: 10px 0px;border-radius: 10px;position: relative;margin-bottom: 10px;">
|
||||
<div v-if="form.Type === 'number' && form.DataSource === 1"
|
||||
style="background: #f8f8f8;padding: 10px 0px;border-radius: 10px;position: relative;margin-bottom: 10px;">
|
||||
<!-- 运算类型 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:customCalculateMark')"
|
||||
|
@ -248,7 +252,9 @@
|
|||
min-width="70"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index === 0 && [1, 2, 3, 4].includes(form.CustomCalculateMark) ? null : $fd('CustomCalculateMark', form.CustomCalculateMark) }}
|
||||
{{
|
||||
scope.$index === 0 && [1, 2, 3, 4].includes(form.CustomCalculateMark) ? null : $fd('CustomCalculateMark', form.CustomCalculateMark)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 表格名称 -->
|
||||
|
@ -261,7 +267,8 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.QuestionId" clearable :disabled="!scope.row.IsTable">
|
||||
<el-option v-for="item of tableQuestions" :key="item.QuestionId" :label="item.QuestionName" :value="item.QuestionId" />
|
||||
<el-option v-for="item of tableQuestions" :key="item.QuestionId" :label="item.QuestionName"
|
||||
:value="item.QuestionId"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -274,10 +281,13 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select v-if="!scope.row.IsTable" v-model="scope.row.TableQuestionId" clearable>
|
||||
<el-option v-for="item of Questions" :key="item.QuestionId" :label="item.QuestionName" :value="item.QuestionId" />
|
||||
<el-option v-for="item of Questions" :key="item.QuestionId" :label="item.QuestionName"
|
||||
:value="item.QuestionId"/>
|
||||
</el-select>
|
||||
<el-select v-if="scope.row.IsTable" v-model="scope.row.TableQuestionId" clearable>
|
||||
<el-option v-for="item of !scope.row.QuestionId ? [] : tableQuestions.find(v => v.QuestionId === scope.row.QuestionId).TableQuestions" :key="item.QuestionId" :label="item.QuestionName" :value="item.QuestionId" />
|
||||
<el-option
|
||||
v-for="item of !scope.row.QuestionId ? [] : tableQuestions.find(v => v.QuestionId === scope.row.QuestionId).TableQuestions"
|
||||
:key="item.QuestionId" :label="item.QuestionName" :value="item.QuestionId"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -310,7 +320,9 @@
|
|||
</el-table>
|
||||
<div style="font-size: 12px;color:#666;padding: 0 15px 0;text-align: right">
|
||||
<!-- '请选择同级问题!': '请选择表格问题下的子问题!' -->
|
||||
<i class="el-icon-info" />{{ [1, 2, 3, 4].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2') }}
|
||||
<i class="el-icon-info"/>{{
|
||||
[1, 2, 3, 4].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2')
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选项类型 -->
|
||||
|
@ -358,7 +370,8 @@
|
|||
prop="ClassifyQuestionId"
|
||||
>
|
||||
<el-select v-model="form.ClassifyQuestionId" clearable>
|
||||
<el-option v-for="item of Questions" :key="item.QuestionId" :label="item.QuestionName" :value="item.QuestionId" />
|
||||
<el-option v-for="item of Questions" :key="item.QuestionId" :label="item.QuestionName"
|
||||
:value="item.QuestionId"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
@ -380,7 +393,7 @@
|
|||
min-width="70"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.label}}
|
||||
{{ scope.row.label }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 运算类型 -->
|
||||
|
@ -480,7 +493,9 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 是否必填 -->
|
||||
<el-form-item v-if="form.Type !== 'group' && form.Type !== 'table' && form.Type !== 'summary' || form.Type === 'class'" :label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.Type !== 'table' && form.Type !== 'summary' || form.Type === 'class'"
|
||||
:label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
|
||||
<el-radio-group
|
||||
v-model="form.IsRequired"
|
||||
:disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2"
|
||||
|
@ -515,7 +530,8 @@
|
|||
</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"
|
||||
|
@ -581,7 +597,8 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 是否裁判问题 -->
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'number'" :label="$t('trials:readingUnit:qsList:title:isJudgeQuestion')">
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'number'"
|
||||
:label="$t('trials:readingUnit:qsList:title:isJudgeQuestion')">
|
||||
<el-radio-group
|
||||
v-model="form.IsJudgeQuestion"
|
||||
@change="((val)=>{isJudgeQuestionChange(val, form)})"
|
||||
|
@ -595,16 +612,29 @@
|
|||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 限制显示 -->
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:LimitShow')">
|
||||
<el-radio-group v-model="form.LimitShow" @change="(v) => {
|
||||
if (v !== 0) {
|
||||
form.LimitEdit = v
|
||||
}
|
||||
}">
|
||||
<el-radio v-for="item of $d.LimitShow" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 限制编辑 -->
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:limitEdit')">
|
||||
<el-radio-group v-model="form.LimitEdit">
|
||||
<el-radio-group v-model="form.LimitEdit" :disabled="form.LimitShow !== 0">
|
||||
<el-radio v-for="item of $d.LimitEdit" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 全局阅片是否显示 -->
|
||||
<el-form-item :label="$t('trials:readingUnit:qsList:title:globalReadingShowType')">
|
||||
<el-radio-group v-model="form.GlobalReadingShowType">
|
||||
<el-radio v-for="item of $d.GlobalReadingShowType" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-radio v-for="item of $d.GlobalReadingShowType" :key="item.id" :label="item.value">{{
|
||||
item.label
|
||||
}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
@ -636,27 +666,41 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getCalculateQuestions, addOrUpdateReadingQuestionTrial, getTrialCriterionOtherQuestion, getTrialGroupNameList, getCriterionLesionType } from '@/api/trials'
|
||||
import { getBasicConfigSelect, getCriterionDictionaryList } from '@/api/dictionary'
|
||||
import {
|
||||
getCalculateQuestions,
|
||||
addOrUpdateReadingQuestionTrial,
|
||||
getTrialCriterionOtherQuestion,
|
||||
getTrialGroupNameList,
|
||||
getCriterionLesionType
|
||||
} from '@/api/trials'
|
||||
import {getBasicConfigSelect, getCriterionDictionaryList} from '@/api/dictionary'
|
||||
|
||||
export default {
|
||||
name: 'AddOrUpdateClinicalData',
|
||||
props: {
|
||||
digitPlaces: {
|
||||
type: Number,
|
||||
default() { return 0 }
|
||||
default() {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default() { return [] }
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
trialCriterionId: {
|
||||
type: String,
|
||||
default() { return '' }
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
isFromSystem: {
|
||||
type: Boolean,
|
||||
|
@ -724,28 +768,33 @@ export default {
|
|||
DictionaryCode: null,
|
||||
GroupId: null,
|
||||
ClassifyQuestionId: null,
|
||||
ClassifyAlgorithms: null
|
||||
ClassifyAlgorithms: null,
|
||||
LimitShow: null
|
||||
// IsEnable: true
|
||||
},
|
||||
rules: {
|
||||
Type: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
|
||||
{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}
|
||||
],
|
||||
QuestionName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'] },
|
||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
|
||||
TypeValue: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'] },
|
||||
{ validator: validateTypeVal, trigger: ['blur', 'change'] },
|
||||
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }],
|
||||
ShowQuestion: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
IsRequired: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
ParentId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
QuestionName: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
|
||||
{max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}],
|
||||
TypeValue: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
|
||||
{validator: validateTypeVal, trigger: ['blur', 'change']},
|
||||
{max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200`}],
|
||||
ShowQuestion: [{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}],
|
||||
IsRequired: [{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}],
|
||||
ParentId: [{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}],
|
||||
ParentTriggerValueList: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
|
||||
{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}
|
||||
],
|
||||
RelevanceId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
RelevanceValueList: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
GroupName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'] },
|
||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }]
|
||||
RelevanceId: [{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}],
|
||||
RelevanceValueList: [{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
GroupName: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
|
||||
{max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}]
|
||||
},
|
||||
loading: false,
|
||||
dicList: [],
|
||||
|
@ -882,7 +931,7 @@ export default {
|
|||
} else {
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
options.push({id: index, label: item, value: item})
|
||||
})
|
||||
this.parentTriggerValOptions = options
|
||||
}
|
||||
|
@ -898,7 +947,7 @@ export default {
|
|||
} else {
|
||||
const options = []
|
||||
this.parentOptions[i].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: i, label: item, value: item })
|
||||
options.push({id: i, label: item, value: item})
|
||||
})
|
||||
this.reParentTriggerValOptions = options
|
||||
}
|
||||
|
@ -1013,7 +1062,7 @@ export default {
|
|||
// this.parentTriggerValOptions = this.parentOptions[index].TypeValue.split('|')
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
options.push({id: index, label: item, value: item})
|
||||
})
|
||||
this.parentTriggerValOptions = options
|
||||
if (this.parentOptions[index].GroupName) {
|
||||
|
@ -1038,7 +1087,7 @@ export default {
|
|||
// this.reParentTriggerValOptions = this.parentOptions[index].TypeValue.split('|')
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
options.push({id: index, label: item, value: item})
|
||||
})
|
||||
this.reParentTriggerValOptions = options
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue