NEZ-610 fix: cabinet列表页面bug

This commit is contained in:
@changcode
2021-05-10 15:45:18 +08:00
parent aa9f9f38f1
commit 61b57871cf
5 changed files with 21 additions and 13 deletions

View File

@@ -25,6 +25,11 @@
@selectionChange="selectionChange" @selectionChange="selectionChange"
></cabinet-table> ></cabinet-table>
</template> </template>
<template v-slot:top-tool-right>
<button id="asset-create-asset" v-has="'panel_chart_add'" class="top-tool-btn margin-r-10" @click.stop="addChart">
<i class="nz-icon nz-icon-create-square"></i>
</button>
</template>
<template v-slot:pagination> <template v-slot:pagination>
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination> <Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
</template> </template>
@@ -84,8 +89,8 @@ export default {
}, },
{ {
id: 13, id: 13,
name: this.$t('config.dc.remark'), name: this.$t('config.dc.description'),
label: 'remark', label: 'description',
disabled: false disabled: false
} }
] ]
@@ -99,6 +104,15 @@ export default {
// 切换tab // 切换tab
changeTab (tab) { changeTab (tab) {
this.$emit('changeTab', tab) this.$emit('changeTab', tab)
},
addChart () {
this.rightBox.show = true
},
closeRightBox (refresh) {
this.rightBox.show = false
if (refresh) {
this.refresh()
}
} }
}, },
watch: { watch: {

View File

@@ -694,7 +694,7 @@ const en = {
selectArea: 'Select area', selectArea: 'Select area',
cabinetNum: 'Cabinet', cabinetNum: 'Cabinet',
assets: 'Assets', assets: 'Assets',
remark: 'Remark', remark: 'Description',
cabinets: 'Cabinets', cabinets: 'Cabinets',
createDc: 'Nre data center', createDc: 'Nre data center',
editDc: 'Edit data center', editDc: 'Edit data center',

View File

@@ -79,7 +79,7 @@ export default {
if (valid) { if (valid) {
this.editCabinet.idcId = this.currentDc.id this.editCabinet.idcId = this.currentDc.id
if (this.editCabinet.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 this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
@@ -89,7 +89,7 @@ export default {
} }
}) })
} else { } else {
this.$post('cabinet', this.editCabinet).then(res => { this.$post('/dc/cabinet', this.editCabinet).then(res => {
this.prevent_opt.save = false this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })

View File

@@ -73,7 +73,7 @@ export default {
if (valid) { if (valid) {
this.editCabinet.idcId = this.currentDc.id this.editCabinet.idcId = this.currentDc.id
if (this.editCabinet.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 this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
@@ -83,7 +83,7 @@ export default {
} }
}) })
} else { } else {
this.$post('cabinet', this.editCabinet).then(res => { this.$post('/dc/cabinet', this.editCabinet).then(res => {
this.prevent_opt.save = false this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })

View File

@@ -114,12 +114,6 @@ export default {
label: this.$t('config.dc.remark'), label: this.$t('config.dc.remark'),
prop: 'remark', prop: 'remark',
show: true show: true
},
{
label: this.$t('config.account.option'),
prop: 'option',
show: true,
width: 120
} }
] ]
} }