feat:asset 列表机房弹框 及其他调整

1.机房配置抽取组件
2.idc配置组件增加详情查看
3.idc配置组件增加联动更新
This commit is contained in:
wangwenrui
2020-01-10 18:16:25 +08:00
parent 663f8e1b4f
commit cda2dd7daf
9 changed files with 312 additions and 453 deletions

View File

@@ -8,9 +8,12 @@
<el-checkbox class="sidebar-info-item" :class="{'sidebar-info-item-active': checkList.indexOf(item.id) != -1}"
v-for="(item,key) in checkListData" :key="key" :label=item.id>
<span>{{item.name}}</span>
<idc-config-box :post-idc="addIdcData" placement="left" @after="getIDCOptionData" :button-class="'checkbox-edit'">
<idc-config-box ref="idcConfigBox" :post-idc="item" placement="left" @after="getIDCOptionData" :button-class="'checkbox-edit'">
<template v-slot:optionZone>
<i class="el-icon-edit-outline" @click="getSingleIDCData(item.id,'edit')"></i>
<span @click="closeAllPop">
<i class="el-icon-edit-outline" @click="getSingleIDCData(item.id,'edit')"></i>
</span>
</template>
</idc-config-box>
<!--<el-popover
@@ -139,15 +142,19 @@
<div class="tab-input-square link">{{scope.row.alertNum}}</div>
</div>
<div v-if="item.prop=='dataCenter'">
<idc-config-box :post-idc="JSON.parse(JSON.stringify(scope.row.idc))" placement="left" @after="getAssetData(null, true)" :button-class="'checkbox-edit'">
<idc-config-box :post-idc="JSON.parse(JSON.stringify(scope.row.idc))" ref="idcConfigBox" :is-edit="false" placement="left" @after="getAssetData(null, true)" :button-class="'checkbox-edit'">
<template v-slot:optionZone>
<span class="link">{{scope.row.idc.name}}</span>
<span class="link" @click="closeAllPop">{{scope.row.idc.name}}</span>
</template>
</idc-config-box>
<!--<span class="link">{{scope.row.idc.name}}</span>-->
</div>
<div v-if="item.prop=='cabinet'">
<span class="link">{{returnData(scope.row.cabinet)}}</span>
<cabinet-config-box v-if="scope.row.cabinet&&scope.row.cabinet!='--'" ref="cabinetConfigBox" placement="left" :is-edit="false" :post-cabinet="JSON.parse(JSON.stringify(scope.row.cabinet))" @after="getAssetData(null, true)">
<span slot="optionZone" @click="closeAllPop" class="link">{{returnData(scope.row.cabinet)}}</span>
</cabinet-config-box>
<span v-else>{{returnData(scope.row.cabinet)}}</span>
</div>
<div v-if="item.prop=='model'">
<span>{{scope.row.model.name}}</span>
@@ -623,6 +630,14 @@
this.getAssetData();
this.getIDCOptionData();
},
closeAllPop:function(){
this.$refs.idcConfigBox.forEach((item)=>{
item.show(false)
})
this.$refs.cabinetConfigBox.forEach((item)=>{
item.show(false)
})
},
search(searchObj) {
this.searchLabel = {};
this.pageObj.pageNo = 1;