|
@@ -33,18 +33,6 @@
|
|
|
<div class="head-container">
|
|
|
<el-tree :key="treeKey" :data="deptList" :props="defaultDeptProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree"
|
|
|
node-key="deptId" default-expand-all highlight-current @node-click="handleDeptNodeClick" style="height: calc(100vh - 50px); overflow-y: auto;">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="custom-tree-node">
|
|
|
- <span>{{ scope.node.label }}</span>
|
|
|
- <el-button
|
|
|
- v-if="scope.node.data.deptId !== 'all' && scope.node.data.children && scope.node.data.children.length > 0"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-map-location"
|
|
|
- @click="showDeptTopology(scope.node.data)"
|
|
|
- >拓扑图</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -59,18 +47,6 @@
|
|
|
:filter-node-method="filterNode" ref="tree"
|
|
|
node-key="id" default-expand-all highlight-current @node-click="handleFacsNodeClick"
|
|
|
style="height: calc(100vh - 50px); overflow-y: auto;">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="custom-tree-node">
|
|
|
- <span>{{ scope.node.label }}</span>
|
|
|
- <el-button
|
|
|
- v-if="scope.node.data.deptId !== 'all' && scope.node.data.children && scope.node.data.children.length > 0"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-map-location"
|
|
|
- @click="showFacsTopology(scope.node.data)"
|
|
|
- >拓扑图</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -85,18 +61,6 @@
|
|
|
:filter-node-method="filterNode" ref="tree"
|
|
|
node-key="id" default-expand-all highlight-current @node-click="handleDeviceNodeClick"
|
|
|
class="device-tree">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="custom-tree-node">
|
|
|
- <span>{{ scope.node.label }}</span>
|
|
|
- <el-button
|
|
|
- v-if="scope.node.data.deptId !== 'all' && scope.node.data.children && scope.node.data.children.length > 0"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-map-location"
|
|
|
- @click="showDeviceTopology(scope.node.data)"
|
|
|
- >拓扑图</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -666,7 +630,6 @@ export default {
|
|
|
|
|
|
/**组织机构*/
|
|
|
handleDeptNodeClick(data) {
|
|
|
- console.log("组织机构的data", data);
|
|
|
if (data.deptId === 'all') {
|
|
|
return;
|
|
|
}
|
|
@@ -720,9 +683,7 @@ export default {
|
|
|
this.areaList = this.handleTree(response.data, "areaCode", "parentCode");
|
|
|
this.areaList = this.extractTagNames(this.areaList);
|
|
|
this.tableKey += 1; // 改变 key 值以强制重新渲染
|
|
|
- // 将“全部”节点添加到区域列表的顶部
|
|
|
- this.areaList.unshift(this.allAreaNode);
|
|
|
- this.handleNodeClick(this.areaList[1]);//常泰北区
|
|
|
+ this.handleNodeClick(this.areaList[0]);//常泰北区
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
@@ -750,8 +711,7 @@ export default {
|
|
|
this.deptList = this.extractTagNames(this.deptList);
|
|
|
this.treeKey += 1;
|
|
|
this.loading = false;
|
|
|
- this.deptList.unshift(this.allDeptNode);
|
|
|
- this.handleDeptNodeClick(this.deptList[1]);
|
|
|
+ this.handleDeptNodeClick(this.deptList[0]);
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -761,7 +721,7 @@ export default {
|
|
|
getFacsCategoryTree().then(response => {
|
|
|
this.facsOptions = response.data;
|
|
|
this.tableKey += 1;
|
|
|
- // 首次进入界面时,找到第一个叶子节点并加载数据
|
|
|
+ // 第一个叶子节点
|
|
|
if (this.facsOptions && this.facsOptions.length > 0 && this.facsOptions[0].children) {
|
|
|
const firstLeafNode = this.findFirstLeafNode(this.facsOptions[0].children);
|
|
|
if (firstLeafNode) {
|
|
@@ -827,7 +787,7 @@ export default {
|
|
|
tagCodes: null,
|
|
|
tagNames: null,
|
|
|
tagCodeList: []
|
|
|
- }// 确保 areaAttr 始终为一个空对象
|
|
|
+ }
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
this.queryParams = {
|
|
@@ -914,7 +874,6 @@ export default {
|
|
|
});
|
|
|
listByObj(objType, meterCls, this.queryParams.areaCode).then(response => {
|
|
|
this. facsBound = response.data;
|
|
|
- console.log("设施已经绑定",this.facsBound)
|
|
|
this.loading = false;
|
|
|
});
|
|
|
} else if (this.activeTab === 'device') {
|
|
@@ -932,7 +891,6 @@ export default {
|
|
|
|
|
|
/**绑定设备*/
|
|
|
moveToDevice(row, tabType) {
|
|
|
- console.log("绑定设备",tabType);
|
|
|
this.$confirm('是否确定绑定?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -1041,7 +999,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getEmsTag(tagModel) {
|
|
|
- console.log("tagModel", tagModel)
|
|
|
getEmsTag(tagModel).then(response => {
|
|
|
if (response && response.data) {
|
|
|
this.emsTagOptions = response.data.map(item => ({
|
|
@@ -1091,13 +1048,11 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
-
|
|
|
// 处理根节点数据
|
|
|
const processedData = processTopologyData(topologyData);
|
|
|
|
|
|
// 指定图表的配置项和数据
|
|
|
const option = {
|
|
|
-
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
triggerOn: 'mousemove',
|