拆分条款详情修改
This commit is contained in:
@@ -380,58 +380,67 @@
|
||||
if (res.field_show_type === '1') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
if(res.db_field_name=='standNumber'){
|
||||
rule.push(
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
)
|
||||
}else if(res.db_field_name=='standName'){
|
||||
rule.push(
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
)
|
||||
}
|
||||
// if(res.db_field_name=='standNumber'){
|
||||
// rule.push(
|
||||
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
// )
|
||||
// }else if(res.db_field_name=='standName'){
|
||||
// rule.push(
|
||||
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
// )
|
||||
// }
|
||||
|
||||
} else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
|
||||
res.field_show_type === 'date' || res.field_show_type === 'file') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
})
|
||||
} else if (res.field_show_type === 'NUMBER') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === 'TEXTAREA') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === 'RADIO' || res.field_show_type === '3') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
})
|
||||
}else if (res.field_show_type === '7') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change',
|
||||
})
|
||||
}else if (res.field_show_type === '0') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change',
|
||||
})
|
||||
}
|
||||
}
|
||||
if (res.field_show_type === '1' ||
|
||||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|
||||
|| res.field_show_type === '11') {
|
||||
rule.push({
|
||||
max: res.db_length,
|
||||
message: res.db_field_txt + this.$t('cantExeed') + res.db_length + this.$t('characters'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
}
|
||||
if (rule.length > 0) {
|
||||
rules[res.db_field_name] = rule
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user