|
@@ -3,7 +3,9 @@
|
|
|
<div class="tit">草稿箱</div>
|
|
|
<div class="conent">
|
|
|
<div class="left-nav">
|
|
|
- <Tree :data="treeData" @change="change"></Tree>
|
|
|
+<!-- <Tree :data="treeData" @change="change"></Tree>-->
|
|
|
+ <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="conent-right">
|
|
|
<div class="conent-tit">
|
|
@@ -50,67 +52,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-const dataArr = [
|
|
|
- {
|
|
|
- id: "0",
|
|
|
- name: "顶级顶级顶级顶级顶级顶级顶级顶级顶级顶级顶级顶级",
|
|
|
- open: false,
|
|
|
- checked: "uncheck",
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- name: "一级1",
|
|
|
- open: false,
|
|
|
- checked: "uncheck",
|
|
|
- children: [
|
|
|
- { id: "12", name: "二级2", checked: "uncheck" },
|
|
|
- { id: "121", name: "二级3", checked: "uncheck" },
|
|
|
- { id: "122", name: "二级4", checked: "uncheck" },
|
|
|
- {
|
|
|
- id: "1321",
|
|
|
- name: "二级1",
|
|
|
- open: false,
|
|
|
- checked: "uncheck",
|
|
|
- children: [
|
|
|
- { id: "13", name: "三级2", checked: "uncheck" },
|
|
|
- { id: "131", name: "三级3", checked: "uncheck" },
|
|
|
- { id: "132", name: "三级4", checked: "uncheck" }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: "2",
|
|
|
- name: "一级2",
|
|
|
- open: false,
|
|
|
- checked: "uncheck",
|
|
|
- children: [
|
|
|
- { id: "222", name: "二级2", checked: "uncheck" },
|
|
|
- { id: "2221", name: "二级1", checked: "uncheck" },
|
|
|
- { id: "2222", name: "二级3", checked: "uncheck" }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: "3",
|
|
|
- name: "一级3",
|
|
|
- open: false,
|
|
|
- checked: "uncheck",
|
|
|
- children: [
|
|
|
- { id: "322", name: "二级2", checked: "uncheck" },
|
|
|
- { id: "3220", name: "二级0", checked: "uncheck" },
|
|
|
- { id: "3221", name: "二级1", checked: "uncheck" }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
-];
|
|
|
import Tree from "./../components/Tree/Tree.vue";
|
|
|
import { SFengParser } from "@saga-web/feng-map";
|
|
|
import { SFloorParser } from "@saga-web/big";
|
|
|
import { FloorView } from "./../lib/FloorView";
|
|
|
import { EditScence } from "@/components/mapClass/EditScence";
|
|
|
import bus from "@/bus";
|
|
|
-import { saveGroup, readGroup } from "@/api/editer.js";
|
|
|
+import { saveGroup, readGroup,queryDraftGroup,queryStatistic } from "@/api/editer.js";
|
|
|
import { STopologyParser } from "./../lib/parsers/STopologyParser";
|
|
|
import { uuid } from "@/components/mapClass/until";
|
|
|
import { SImageItem } from "@saga-web/graph/lib";
|
|
@@ -120,7 +68,7 @@ export default {
|
|
|
components: { Tree },
|
|
|
data() {
|
|
|
return {
|
|
|
- treeData: JSON.parse(JSON.stringify(dataArr)),
|
|
|
+ treeData: [],
|
|
|
columns: [
|
|
|
{
|
|
|
title: "名称", // 列的名称
|
|
@@ -158,11 +106,17 @@ export default {
|
|
|
floorList: {},
|
|
|
mapServerURL: "/wdfn",
|
|
|
key: "23f30a832a862c58637a4aadbf50a566",
|
|
|
- appName: "万达可视化系统"
|
|
|
+ appName: "万达可视化系统",
|
|
|
+ defaultProps: {
|
|
|
+ children: 'Category',
|
|
|
+ label: 'Name'
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- change() {},
|
|
|
+ handleNodeClick(data) {
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
init() {
|
|
|
console.log(this.urlMsg);
|
|
|
// const loadings = this.$loading({type: 'global'});
|
|
@@ -241,9 +195,108 @@ export default {
|
|
|
console.log("楼层不正确");
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ getTreeData(){
|
|
|
+ queryDraftGroup({projectId:'1000423'}).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ let res = {
|
|
|
+ "Data": [
|
|
|
+ {
|
|
|
+ "Category": [
|
|
|
+ {
|
|
|
+ "Code": "F6",
|
|
|
+ "Gcode": "6F",
|
|
|
+ "Gname": "f6",
|
|
|
+ "Name": "第6层"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "Id": "LCGN",
|
|
|
+ "Name": "楼层功能"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [
|
|
|
+ {
|
|
|
+ "Category": [
|
|
|
+ {
|
|
|
+ "Code": "F1",
|
|
|
+ "Gcode": "1F",
|
|
|
+ "Gname": "f1",
|
|
|
+ "Name": "第1层"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "Id": "GDXT",
|
|
|
+ "Name": "供电系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "NTXT",
|
|
|
+ "Name": "暖通系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "XFXT",
|
|
|
+ "Name": "消防系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "RDXT",
|
|
|
+ "Name": "弱电系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "JPSXT",
|
|
|
+ "Name": "给排水系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "DTXT",
|
|
|
+ "Name": "电梯系统"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "RQXT",
|
|
|
+ "Name": "燃气系统"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "Id": "LCFB",
|
|
|
+ "Name": "楼层分布"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "SCPZ",
|
|
|
+ "Name": "石材铺装(土建装饰)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "FZQZL",
|
|
|
+ "Name": "分支器支路分布图(暖通系统)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "Category": [],
|
|
|
+ "Id": "XFBFYCFL",
|
|
|
+ "Name": "消防泵房引出管路分布图(消防系统)"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "Id": "XTYLT",
|
|
|
+ "Name": "系统原理图"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "Message": "",
|
|
|
+ "Result": "success"
|
|
|
+ };
|
|
|
+ this.treeData = res.Data;
|
|
|
+ },
|
|
|
+ getLegend(){
|
|
|
+ queryStatistic({}).then(res=>{
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getTreeData();
|
|
|
// this.canvasWidth = this.$refs.graphy.offsetWidth;
|
|
|
// this.canvasHeight = this.$refs.graphy.offsetHeight - 10;
|
|
|
this.urlMsg = {
|
|
@@ -282,7 +335,18 @@ export default {
|
|
|
.left-nav {
|
|
|
width: 224px;
|
|
|
height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
padding: 0 12px;
|
|
|
+ /deep/ .el-tree{
|
|
|
+ background: #F7F9FA;
|
|
|
+ .el-tree-node__content{
|
|
|
+ height: 38px;
|
|
|
+ }
|
|
|
+ /deep/.el-tree-node:focus >.el-tree-node__content {
|
|
|
+ background-color: #E1F2FF!important;
|
|
|
+ color: #0091FF!important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.conent-right {
|
|
|
flex: 1;
|
|
@@ -314,6 +378,7 @@ export default {
|
|
|
.map {
|
|
|
flex: 1;
|
|
|
position: relative;
|
|
|
+ height: 100%;
|
|
|
/*height: calc(100% - 61px);*/
|
|
|
/*background: red;*/
|
|
|
.legend-btn {
|