NEZ-610 fix: 修复dc、cabinet相关bug
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
></cabinet-table>
|
||||
</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">
|
||||
<button id="asset-create-asset" v-has="'dc_add'" class="top-tool-btn margin-r-10" @click.stop="add">
|
||||
<i class="nz-icon nz-icon-create-square"></i>
|
||||
</button>
|
||||
</template>
|
||||
@@ -56,13 +56,11 @@ export default {
|
||||
'delete-button': deleteButton,
|
||||
cabinetTable
|
||||
},
|
||||
props: {
|
||||
obj: Object // 关联的实体对象
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: 'dc/cabinet',
|
||||
tableId: 'cabinetTable',
|
||||
|
||||
blankObject: {
|
||||
id: '',
|
||||
idcId: '',
|
||||
@@ -104,15 +102,6 @@ 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: {
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label='$t("asset.principal")' prop="principal">
|
||||
<el-select value-key="id" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" v-model="editDc.principal" placeholder="" size="small" id="dc-box-input-principal">
|
||||
<el-option v-for="item in userData" :id="'dc-principal-op-'+item.userId" :key="item.userId" :label="item.username" :value="item.userId">
|
||||
<span>{{item.username}}</span>
|
||||
<el-option v-for="item in userData" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -91,7 +90,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.props)
|
||||
|
||||
},
|
||||
methods: {
|
||||
/* 关闭弹框 */
|
||||
@@ -209,7 +208,6 @@ export default {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
this.editDc = JSON.parse(JSON.stringify(n))
|
||||
console.info(this.editDc)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.latlngPicker.setLnglat(this.editDc.latitude, this.editDc.longitude)
|
||||
})
|
||||
|
||||
@@ -57,6 +57,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
clickOutside () {
|
||||
@@ -71,7 +72,7 @@ export default {
|
||||
this.prevent_opt.save = true
|
||||
this.$refs.cabinetForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.editCabinet.idcId = this.currentDc.id
|
||||
this.editCabinet.dcId = this.currentDc.id
|
||||
if (this.editCabinet.id) {
|
||||
this.$put('/dc/cabinet', this.editCabinet).then(res => {
|
||||
this.prevent_opt.save = false
|
||||
@@ -126,6 +127,7 @@ export default {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler: function (n, o) {
|
||||
console.info(n)
|
||||
if (n) {
|
||||
this.editCabinet = JSON.parse(JSON.stringify(n))
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user