fix : 更改参数格式
This commit is contained in:
@@ -183,10 +183,7 @@ export default {
|
||||
if (valid) {
|
||||
const params = {
|
||||
...this.editModel,
|
||||
panelId: Number(this.editModel.panelId)
|
||||
}
|
||||
if (Number(this.editModel.panelId) == 0) {
|
||||
delete params.panelId
|
||||
panelId: this.editModel.panelId == '' ? null : Number(this.editModel.panelId)
|
||||
}
|
||||
if (this.editModel.id) {
|
||||
this.$put(this.url, params).then(res => {
|
||||
|
||||
@@ -1109,9 +1109,7 @@ export default {
|
||||
}
|
||||
if (valid) {
|
||||
this.prevent_opt.save = true
|
||||
if (Number(this.editModule.panelId) !== 0) {
|
||||
params.panelId = Number(this.editModule.panelId)
|
||||
}
|
||||
params.panelId = this.editModule.panelId !== '' ? Number(this.editModule.panelId) : null
|
||||
if (this.editModule.id) {
|
||||
this.$put('monitor/module', params).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
||||
Reference in New Issue
Block a user