update
This commit is contained in:
@@ -122,9 +122,12 @@ export default {
|
||||
// 备注
|
||||
remark: ''
|
||||
},
|
||||
dataFormRules: {
|
||||
name: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }],
|
||||
code: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }]
|
||||
},
|
||||
limit: 5,
|
||||
page: 1,
|
||||
dataFormRules: {},
|
||||
showAttrForm: false
|
||||
}
|
||||
},
|
||||
@@ -287,20 +290,24 @@ export default {
|
||||
}
|
||||
},
|
||||
handleCreateOrUpdate() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/workshopSection'),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: {
|
||||
...this.dataForm
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/workshopSection'),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: {
|
||||
...this.dataForm
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
this.$message.success({
|
||||
message: i18n.t('prompt.success'),
|
||||
onClose: () => {
|
||||
this.$emit('refreshDataList')
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
this.$message.success({
|
||||
message: i18n.t('prompt.success'),
|
||||
onClose: () => {
|
||||
this.$emit('refreshDataList')
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user