fix : 更改参数格式

This commit is contained in:
likexuan
2022-11-23 15:38:56 +08:00
parent 707ec2680d
commit e844f1669c
2 changed files with 2 additions and 7 deletions

View File

@@ -183,10 +183,7 @@ export default {
if (valid) { if (valid) {
const params = { const params = {
...this.editModel, ...this.editModel,
panelId: Number(this.editModel.panelId) panelId: this.editModel.panelId == '' ? null : Number(this.editModel.panelId)
}
if (Number(this.editModel.panelId) == 0) {
delete params.panelId
} }
if (this.editModel.id) { if (this.editModel.id) {
this.$put(this.url, params).then(res => { this.$put(this.url, params).then(res => {

View File

@@ -1109,9 +1109,7 @@ export default {
} }
if (valid) { if (valid) {
this.prevent_opt.save = true this.prevent_opt.save = true
if (Number(this.editModule.panelId) !== 0) { params.panelId = this.editModule.panelId !== '' ? Number(this.editModule.panelId) : null
params.panelId = Number(this.editModule.panelId)
}
if (this.editModule.id) { if (this.editModule.id) {
this.$put('monitor/module', params).then(response => { this.$put('monitor/module', params).then(response => {
if (response.code === 200) { if (response.code === 200) {