refactor: asset侧滑框重构
1.将新增、编辑侧滑并为同一个代码文件
This commit is contained in:
@@ -114,8 +114,8 @@
|
||||
<panel-box :panel="editPanel" @reload="panelListReload" @reloadForDel="" ref="panelBox"></panel-box>
|
||||
<project-box :project="editProject" ref="projectBox"></project-box>
|
||||
<module-box :currentProject="currentProject" :module="editModule" @reload="" ref="moduleBox"></module-box>
|
||||
<add-endpoint-box :currentProject="currentProject" :currentModule="currentModule" @reload=""
|
||||
ref="addEndpointBox"></add-endpoint-box>
|
||||
<asset-box :currentProject="currentProject" :currentModule="currentModule" @reload=""
|
||||
ref="addEndpointBox"></asset-box>
|
||||
<asset-add-unit :add-unit-show='addUnitShow' @refreshData="refreshAsset" ref="assetAddUnit"
|
||||
@sendStateData="closeAsset"></asset-add-unit>
|
||||
<alert-config-box :parentAlertRule="alertRule" @reload="" ref="alertConfigBox"></alert-config-box>
|
||||
|
||||
1458
nezha-fronted/src/components/common/rightBox/assetBox.vue
Normal file
1458
nezha-fronted/src/components/common/rightBox/assetBox.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -167,10 +167,10 @@
|
||||
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||
</div>
|
||||
|
||||
<asset-add-unit :add-unit-show='addUnitShow' @refreshData="flushData" ref="assetAddUnit"
|
||||
@sendStateData="tabControl"></asset-add-unit>
|
||||
<asset-edit-unit :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
||||
ref="assetEditUnit"></asset-edit-unit>
|
||||
<!--<asset-add-unit :add-unit-show='addUnitShow' @refreshData="flushData" ref="assetAddUnit"
|
||||
@sendStateData="tabControl"></asset-add-unit>-->
|
||||
<asset-box :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
||||
ref="assetEditUnit"></asset-box>
|
||||
<element-set
|
||||
v-clickoutside="elementsetHide"
|
||||
:drop-col="dropCol"
|
||||
@@ -600,10 +600,12 @@
|
||||
},
|
||||
tagShow(data, id, type) {
|
||||
if (data === 'showAdd') {
|
||||
this.addUnitShow = true
|
||||
//this.addUnitShow = true;
|
||||
this.editUnitShow = true;
|
||||
this.$refs['assetEditUnit'].getAssetData('');
|
||||
}
|
||||
if (data === 'showEdit') {
|
||||
this.editUnitShow = true
|
||||
this.editUnitShow = true;
|
||||
this.$refs['assetEditUnit'].getAssetData(id)
|
||||
}
|
||||
if (data === 'showView') {
|
||||
|
||||
@@ -26,6 +26,7 @@ import editEndpointBox from './components/common/rightBox/editEndpointBox'; //en
|
||||
import addEndpointBox from './components/common/rightBox/addEndpointBox'; //endpoint弹框组件
|
||||
import assetAddUnit from "./components/page/asset/assetAddUnit"; //资产添加组件
|
||||
import assetEditUnit from "./components/page/asset/assetEditUnit"; //资产添加组件
|
||||
import assetBox from "./components/common/rightBox/assetBox"; //资产添加组件
|
||||
import alertConfigBox from "./components/common/rightBox/alertConfigBox"; //告警规则弹框组件
|
||||
import dcConfigBox from "./components/common/popBox/dcConfig"; //idc配置弹框组件
|
||||
import panelBox from "./components/common/rightBox/panelBox"; //面板弹框组件
|
||||
@@ -39,6 +40,7 @@ Vue.component("project-box", projectBox);
|
||||
Vue.component("module-box", moduleBox);
|
||||
Vue.component("edit-endpoint-box", editEndpointBox);
|
||||
Vue.component("add-endpoint-box", addEndpointBox);
|
||||
Vue.component("asset-box", assetBox);
|
||||
Vue.component("assetAddUnit", assetAddUnit);
|
||||
Vue.component("assetEditUnit", assetEditUnit);
|
||||
Vue.component("alert-config-box", alertConfigBox);
|
||||
|
||||
Reference in New Issue
Block a user