fix : 更改参数格式
This commit is contained in:
@@ -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 => {
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user