分类问题补充属性

uat_us
caiyiling 2024-10-30 10:43:10 +08:00
parent 7ebfcd0827
commit 94e924a753
6 changed files with 235 additions and 72 deletions

View File

@ -156,12 +156,27 @@
</el-checkbox-group>
<!-- 自动分类 -->
<el-input
v-if="question.Type === 'class' && !question.TypeValue"
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
v-model="questionForm[question.Id]"
/>
<el-radio-group
v-if="question.Type === 'class' && question.TypeValue"
<el-select
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@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"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-radio
v-for="item of question.TypeValue.split('|')"

View File

@ -97,12 +97,27 @@
</el-checkbox-group>
<!-- 自动分类 -->
<el-input
v-if="question.Type === 'class' && !question.TypeValue"
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
v-model="questionForm[question.Id]"
/>
<el-radio-group
v-if="question.Type === 'class' && question.TypeValue"
<el-select
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@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"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-radio
v-for="item of question.TypeValue.split('|')"

View File

@ -198,12 +198,28 @@
/>
<!-- 自动分类 -->
<el-input
v-if="question.Type === 'class' && !question.TypeValue"
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
/>
<el-radio-group
v-if="question.Type === 'class' && question.TypeValue"
<el-select
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@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"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-radio
v-for="item of question.TypeValue.split('|')"

View File

@ -103,12 +103,28 @@
/>
<!-- 自动计算 -->
<el-input
v-if="question.Type === 'class' && !question.TypeValue"
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
/>
<el-radio-group
v-if="question.Type === 'class' && question.TypeValue"
<el-select
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@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"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-radio
v-for="item of question.TypeValue.split('|')"
@ -118,6 +134,7 @@
{{ item.trim() }}
</el-radio>
</el-radio-group>
<!-- 自增 -->
<el-input
v-if="question.Type==='increment'"

View File

@ -910,6 +910,48 @@
</el-table>
</div>
</el-form-item>
<!-- 分类是否可编辑 -->
<el-form-item
v-if="form.Type === 'class'"
:label="$t('trials:readingUnit:qsList:title:ClassifyEditType')"
prop="ClassifyEditType"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group
v-model="form.ClassifyEditType"
>
<el-radio
v-for="item of $d.ClassifyEditType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 分类显示类型 -->
<el-form-item
v-if="form.Type === 'class'"
:label="$t('trials:readingUnit:qsList:title:ClassifyShowType')"
prop="ClassifyShowType"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group
v-model="form.ClassifyShowType"
>
<el-radio
v-for="item of $d.ClassifyShowType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</div>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
@ -1026,6 +1068,8 @@ export default {
ExportIdentification: 0,
ExportResult: [],
ClassifyType: null,
ClassifyEditType: null,
ClassifyShowType: null
// IsEnable: true
},
rules: {
@ -1479,6 +1523,11 @@ export default {
} else {
form.MaxAnswerLength = null
}
if (val === 'class') {
form.ClassifyEditType = 1
} else {
form.ClassifyEditType = null
}
form.IsRequired = 2
form.LesionType = null
form.ImageCount = 0
@ -1499,6 +1548,7 @@ export default {
form.ExportIdentification = 0
form.ExportResult = []
form.ClassifyType = null
form.ClassifyShowType = null
},
getLesionType() {
return new Promise((resolve, reject) => {

View File

@ -750,6 +750,48 @@
</el-table>
</div>
</el-form-item>
<!-- 分类是否可编辑 -->
<el-form-item
v-if="form.Type === 'class'"
:label="$t('trials:readingUnit:qsList:title:ClassifyEditType')"
prop="ClassifyEditType"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group
v-model="form.ClassifyEditType"
>
<el-radio
v-for="item of $d.ClassifyEditType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 分类显示类型 -->
<el-form-item
v-if="form.Type === 'class'"
:label="$t('trials:readingUnit:qsList:title:ClassifyShowType')"
prop="ClassifyShowType"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group
v-model="form.ClassifyShowType"
>
<el-radio
v-for="item of $d.ClassifyShowType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</div>
</div>
@ -848,7 +890,9 @@ export default {
ExportIdentification: 0,
ExportResult: [],
ImageCount: 0,
ClassifyType: null
ClassifyType: null,
ClassifyEditType: null,
ClassifyShowType: null,
// IsEnable: true
},
rules: {
@ -1238,6 +1282,11 @@ export default {
} else {
form.MaxAnswerLength = null
}
if (val === 'class') {
form.ClassifyEditType = 1
} else {
form.ClassifyEditType = null
}
form.IsRequired = 2
form.TypeValue = ''
form.TableQuestionType = null
@ -1260,6 +1309,7 @@ export default {
form.ExportResult = []
form.ImageCount = 0
form.ClassifyType = null
form.ClassifyShowType = null
},
close() {
this.$emit('close')