update PUT-POST

This commit is contained in:
lb
2022-08-05 09:35:05 +08:00
parent cf28335d9e
commit 8f802c5580
27 changed files with 54 additions and 54 deletions

View File

@@ -158,8 +158,8 @@ export default {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? '' : this.dataForm.id}`),
method: this.dataForm.id ? 'put' : 'post',
data: this.$http.adornData({
id: this.dataForm.id || undefined,
code: this.dataForm.code,