自定义表格问题预览
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-22 16:37:50 +08:00
parent 1d42e5eab5
commit 7692037b67
3 changed files with 95 additions and 47 deletions

View File

@ -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

View File

@ -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"

View File

@ -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,7 +98,8 @@
</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-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>
<!-- 自增序号前缀 -->
@ -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"
>
@ -192,7 +195,8 @@
>
<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
@ -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,7 +666,13 @@
</el-form>
</template>
<script>
import { getCalculateQuestions, addOrUpdateReadingQuestionTrial, getTrialCriterionOtherQuestion, getTrialGroupNameList, getCriterionLesionType } from '@/api/trials'
import {
getCalculateQuestions,
addOrUpdateReadingQuestionTrial,
getTrialCriterionOtherQuestion,
getTrialGroupNameList,
getCriterionLesionType
} from '@/api/trials'
import {getBasicConfigSelect, getCriterionDictionaryList} from '@/api/dictionary'
export default {
@ -644,19 +680,27 @@ export default {
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,7 +768,8 @@ export default {
DictionaryCode: null,
GroupId: null,
ClassifyQuestionId: null,
ClassifyAlgorithms: null
ClassifyAlgorithms: null,
LimitShow: null
// IsEnable: true
},
rules: {
@ -743,7 +788,11 @@ export default {
{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'] }],
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`}]
},