fix: 基础设置表单验证
This commit is contained in:
parent
b4a17d66a4
commit
d173ebc4b7
@ -611,6 +611,8 @@ export default {
|
|||||||
msg_time_out: 'Message retention time(unit: day)',
|
msg_time_out: 'Message retention time(unit: day)',
|
||||||
empty_front: 'If empty then default value is 10s',
|
empty_front: 'If empty then default value is 10s',
|
||||||
empty_msg: 'If empty then default value is 30 days',
|
empty_msg: 'If empty then default value is 30 days',
|
||||||
|
front_error: 'Valid ranger [0 - 100]',
|
||||||
|
msg_error: 'Valid ranger [1 - 365]',
|
||||||
SMTP_port: 'SMTP Port',
|
SMTP_port: 'SMTP Port',
|
||||||
SMTP_account: 'SMTP Account',
|
SMTP_account: 'SMTP Account',
|
||||||
SMTP_password: 'SMTP Password',
|
SMTP_password: 'SMTP Password',
|
||||||
|
|||||||
@ -613,6 +613,8 @@ export default {
|
|||||||
msg_time_out: '消息保留時間(單位:天)',
|
msg_time_out: '消息保留時間(單位:天)',
|
||||||
empty_front: '為空則默認取值10秒',
|
empty_front: '為空則默認取值10秒',
|
||||||
empty_msg: '為空則默認取值30天',
|
empty_msg: '為空則默認取值30天',
|
||||||
|
front_error: '請填寫0-100正整數',
|
||||||
|
msg_error: '請填寫1-365正整數',
|
||||||
SMTP_port: 'SMTP端口',
|
SMTP_port: 'SMTP端口',
|
||||||
SMTP_account: 'SMTP賬戶',
|
SMTP_account: 'SMTP賬戶',
|
||||||
SMTP_password: 'SMTP密碼',
|
SMTP_password: 'SMTP密碼',
|
||||||
|
|||||||
@ -617,7 +617,7 @@ export default {
|
|||||||
empty_front: '为空则默认取10秒',
|
empty_front: '为空则默认取10秒',
|
||||||
empty_msg: '为空则默认取30天',
|
empty_msg: '为空则默认取30天',
|
||||||
front_error: '请填写0-100正整数',
|
front_error: '请填写0-100正整数',
|
||||||
msg_error: '请填写正整数',
|
msg_error: '请填写1-365正整数',
|
||||||
SMTP_port: 'SMTP端口',
|
SMTP_port: 'SMTP端口',
|
||||||
SMTP_account: 'SMTP账户',
|
SMTP_account: 'SMTP账户',
|
||||||
SMTP_password: 'SMTP密码',
|
SMTP_password: 'SMTP密码',
|
||||||
|
|||||||
@ -70,7 +70,7 @@ export default {
|
|||||||
],
|
],
|
||||||
msgTimeOut: [
|
msgTimeOut: [
|
||||||
{
|
{
|
||||||
pattern: '^[0-9]*$',
|
pattern: '^([1-9]|[1-9]\\d|365)$',
|
||||||
message: this.$t('system_parameter_setting.msg_error'),
|
message: this.$t('system_parameter_setting.msg_error'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
@ -101,10 +101,6 @@ export default {
|
|||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
save(formInline) {
|
save(formInline) {
|
||||||
this.showEdit = true
|
|
||||||
this.showCancel = false
|
|
||||||
this.showSave = false
|
|
||||||
this.show = true
|
|
||||||
const param = [
|
const param = [
|
||||||
{ paramKey: 'basic.frontTimeOut', paramValue: this.formInline.frontTimeOut, type: 'text', sort: 1 },
|
{ paramKey: 'basic.frontTimeOut', paramValue: this.formInline.frontTimeOut, type: 'text', sort: 1 },
|
||||||
{ paramKey: 'basic.msgTimeOut', paramValue: this.formInline.msgTimeOut, type: 'text', sort: 2 }
|
{ paramKey: 'basic.msgTimeOut', paramValue: this.formInline.msgTimeOut, type: 'text', sort: 2 }
|
||||||
@ -117,6 +113,10 @@ export default {
|
|||||||
const flag = response.success
|
const flag = response.success
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.$success(this.$t('commons.save_success'))
|
this.$success(this.$t('commons.save_success'))
|
||||||
|
this.showEdit = true
|
||||||
|
this.showCancel = false
|
||||||
|
this.showSave = false
|
||||||
|
this.show = true
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(this.$t('commons.save_failed'))
|
this.$message.error(this.$t('commons.save_failed'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user