[update] 修改bug79983
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('businessSupport.questionAnswer.classify')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('businessSupport.questionAnswer.classify')">
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('businessSupport.questionAnswer.classify')"
|
<a-select :placeholder="$t('pleaseSelect') + $t('businessSupport.questionAnswer.classify')"
|
||||||
allowClear
|
allowClear
|
||||||
|
@change="typeChange"
|
||||||
v-decorator.trim="[ 'type', validatorRules.type]">
|
v-decorator.trim="[ 'type', validatorRules.type]">
|
||||||
<a-select-option :value="null" :key="-1">请选择</a-select-option>
|
<a-select-option :value="null" :key="-1">请选择</a-select-option>
|
||||||
<a-select-option value="1">国内标准</a-select-option>
|
<a-select-option value="1">国内标准</a-select-option>
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 标准编号 -->
|
<!-- 标准编号 -->
|
||||||
<a-col :span="12" v-if="['1', '2', '3'].includes(form.getFieldValue('type'))">
|
<a-col :span="12">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardNumber')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardNumber')">
|
||||||
<standard-selection
|
<standard-selection
|
||||||
v-decorator.trim="[ 'standardNumber', validatorRules.standardNumber]"
|
v-decorator.trim="[ 'standardNumber', validatorRules.standardNumber]"
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 标准名称 -->
|
<!-- 标准名称 -->
|
||||||
<a-col :span="12" v-if="['1', '2', '3'].includes(form.getFieldValue('type'))">
|
<a-col :span="12">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardName')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardName')">
|
||||||
<a-input disabled :placeholder="$t('pleaseEnter') + $t('standardName')"
|
<a-input disabled :placeholder="$t('pleaseEnter') + $t('standardName')"
|
||||||
v-decorator.trim="[ 'standardName', validatorRules.standardName]"/>
|
v-decorator.trim="[ 'standardName', validatorRules.standardName]"/>
|
||||||
@@ -193,7 +194,7 @@ export default {
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
const param = {}
|
const param = {}
|
||||||
param.quizTime = new Date().getFullYear() + '-' + new Date().getMonth() + '-' + new Date().getDay() + ' ' +
|
param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' +
|
||||||
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(param, 'quizTime'))
|
this.form.setFieldsValue(pick(param, 'quizTime'))
|
||||||
@@ -209,6 +210,19 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 分类改变
|
||||||
|
typeChange (value) {
|
||||||
|
if (value) {
|
||||||
|
if (value === '4') {
|
||||||
|
// 是其他问题,标准编号和标准名称不必填
|
||||||
|
this.validatorRules.standardNumber.rules[0].required = false
|
||||||
|
this.validatorRules.standardName.rules[0].required = false
|
||||||
|
} else {
|
||||||
|
this.validatorRules.standardNumber.rules[0].required = true
|
||||||
|
this.validatorRules.standardName.rules[0].required = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 标准选择名称改变的回调
|
// 标准选择名称改变的回调
|
||||||
standardNameChange (value) {
|
standardNameChange (value) {
|
||||||
const param = { standardName: value }
|
const param = { standardName: value }
|
||||||
|
|||||||
Reference in New Issue
Block a user