From 61b57871cfe56c35b42653df1d8278b9828d0235 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Mon, 10 May 2021 15:45:18 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-610=20fix:=20cabinet=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bottomBox/tabs/cabinetTab.vue | 18 ++++++++++++++++-- .../src/components/common/language/en.js | 2 +- .../components/common/rightBox/cabinetBox.vue | 4 ++-- .../common/rightBox/setting/cabinetBox.vue | 4 ++-- .../common/table/settings/cabinetTable.vue | 6 ------ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue index b1f1568a8..2e59b891b 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue @@ -25,6 +25,11 @@ @selectionChange="selectionChange" > + @@ -84,8 +89,8 @@ export default { }, { id: 13, - name: this.$t('config.dc.remark'), - label: 'remark', + name: this.$t('config.dc.description'), + label: 'description', disabled: false } ] @@ -99,6 +104,15 @@ export default { // 切换tab changeTab (tab) { this.$emit('changeTab', tab) + }, + addChart () { + this.rightBox.show = true + }, + closeRightBox (refresh) { + this.rightBox.show = false + if (refresh) { + this.refresh() + } } }, watch: { diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 6cebee967..f8f80d083 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -694,7 +694,7 @@ const en = { selectArea: 'Select area', cabinetNum: 'Cabinet', assets: 'Assets', - remark: 'Remark', + remark: 'Description', cabinets: 'Cabinets', createDc: 'Nre data center', editDc: 'Edit data center', diff --git a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue index 586f1fbbd..6de7491d4 100644 --- a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue @@ -79,7 +79,7 @@ export default { if (valid) { this.editCabinet.idcId = this.currentDc.id if (this.editCabinet.id) { - this.$put('cabinet', this.editCabinet).then(res => { + this.$put('/dc/cabinet', this.editCabinet).then(res => { this.prevent_opt.save = false if (res.code === 200) { this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) @@ -89,7 +89,7 @@ export default { } }) } else { - this.$post('cabinet', this.editCabinet).then(res => { + this.$post('/dc/cabinet', this.editCabinet).then(res => { this.prevent_opt.save = false if (res.code === 200) { this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) diff --git a/nezha-fronted/src/components/common/rightBox/setting/cabinetBox.vue b/nezha-fronted/src/components/common/rightBox/setting/cabinetBox.vue index 76d5018f6..0b8d37307 100644 --- a/nezha-fronted/src/components/common/rightBox/setting/cabinetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/setting/cabinetBox.vue @@ -73,7 +73,7 @@ export default { if (valid) { this.editCabinet.idcId = this.currentDc.id if (this.editCabinet.id) { - this.$put('cabinet', this.editCabinet).then(res => { + this.$put('/dc/cabinet', this.editCabinet).then(res => { this.prevent_opt.save = false if (res.code === 200) { this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) @@ -83,7 +83,7 @@ export default { } }) } else { - this.$post('cabinet', this.editCabinet).then(res => { + this.$post('/dc/cabinet', this.editCabinet).then(res => { this.prevent_opt.save = false if (res.code === 200) { this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) diff --git a/nezha-fronted/src/components/common/table/settings/cabinetTable.vue b/nezha-fronted/src/components/common/table/settings/cabinetTable.vue index e25584c59..f684411ad 100644 --- a/nezha-fronted/src/components/common/table/settings/cabinetTable.vue +++ b/nezha-fronted/src/components/common/table/settings/cabinetTable.vue @@ -114,12 +114,6 @@ export default { label: this.$t('config.dc.remark'), prop: 'remark', show: true - }, - { - label: this.$t('config.account.option'), - prop: 'option', - show: true, - width: 120 } ] }