调整config弹窗中index字段的校验规则
This commit is contained in:
parent
012c2bebd2
commit
2ddf0d9695
|
@ -63,7 +63,10 @@
|
||||||
v-decorator="[
|
v-decorator="[
|
||||||
'index',
|
'index',
|
||||||
{
|
{
|
||||||
rules: [{ required: true, message: 'Please input index!' }],
|
rules: [
|
||||||
|
{ required: true, message: 'Please input index!' },
|
||||||
|
{ pattern: new RegExp('^([1-9]|[1-9]\\d|100)$'),message: 'Please input an integer from 1 to 100!'},
|
||||||
|
],
|
||||||
initialVale: this.formVal.index
|
initialVale: this.formVal.index
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
|
@ -211,7 +214,7 @@ export default {
|
||||||
this.currId = res.result.id
|
this.currId = res.result.id
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
days: res.result.days,
|
days: res.result.days,
|
||||||
index: res.result.index
|
index: res.result.index*100
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning("This operation fails. Contact your system administrator")
|
||||||
|
@ -223,7 +226,8 @@ export default {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
let params = {
|
let params = {
|
||||||
id: this.currId,
|
id: this.currId,
|
||||||
...values
|
days: values.days,
|
||||||
|
index:values.index/100
|
||||||
}
|
}
|
||||||
httpAction("/nuclideParam/update", params, "put").then(res => {
|
httpAction("/nuclideParam/update", params, "put").then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user