|
@@ -3,7 +3,18 @@
|
|
|
<!-- 顶部编辑器 -->
|
|
|
<div class="tit">
|
|
|
<a-icon style="cursor: pointer;" type="left" @click="goDrafts" />
|
|
|
- {{this.urlMsg.floorName}}
|
|
|
+ <el-popover
|
|
|
+ placement="bottom-start"
|
|
|
+ width="300"
|
|
|
+ trigger="click">
|
|
|
+ <div style="max-height:400px;overflow-y:auto;">
|
|
|
+ <el-tree :data="treeData" :props="defaultProps" :default-expand-all=true @node-click="handleNodeClick"></el-tree>
|
|
|
+ </div>
|
|
|
+ <span style="margin-left: 10px;cursor: pointer;" slot="reference">
|
|
|
+ {{this.urlMsg.floorName}}
|
|
|
+ <i class="el-icon-caret-bottom"></i>
|
|
|
+ </span>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
<div class="tool">
|
|
|
<ul>
|
|
@@ -119,12 +130,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ title="操作提示"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="400">
|
|
|
+ <div>您打开的是已发布的平面图,您可以进行如下操作:</div>
|
|
|
+ <p>1、直接选择平面图中的元素进行复制,然后贴到其他平面图;</p>
|
|
|
+ <p>2、点击“启动编辑”对当前平面图进行编辑;</p>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="handleOpenUrl">打 开</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import bus from "@/bus";
|
|
|
import bus2 from "@/bus2";
|
|
|
import {SGraphLayoutType, SOrderSetType} from "@saga-web/graph/lib";
|
|
|
+ import {queryFullFloor} from "@/api/editer";
|
|
|
import systym from "./codeMapSystem.js";
|
|
|
import {MessageBox} from "element-ui";
|
|
|
|
|
@@ -132,7 +157,6 @@
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
-
|
|
|
isLock: false, //是否锁定
|
|
|
focusItem: null,
|
|
|
alignmentOptions: [
|
|
@@ -218,7 +242,14 @@
|
|
|
scaleStep: 0.05, // +-缩放步进
|
|
|
locationQuery: null,
|
|
|
urlMsg: {},
|
|
|
- focusItemList: []
|
|
|
+ focusItemList: [],
|
|
|
+ treeData: [],
|
|
|
+ defaultProps: {
|
|
|
+ children: 'Children',
|
|
|
+ label: 'Name'
|
|
|
+ },
|
|
|
+ treeQuery: "",
|
|
|
+ dialogVisible: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -232,6 +263,34 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getFullFloor() {
|
|
|
+ queryFullFloor({projectId: this.urlMsg.projectId}).then(res => {
|
|
|
+ this.treeData = res.Data;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 切换楼层
|
|
|
+ handleNodeClick(data, node) {
|
|
|
+ console.log(data, node);
|
|
|
+ if (data.CategoryId && data.ProjectId && data.BuildingId && data.FloorId && data.Name && data.Seq && data.Type) {
|
|
|
+ const query = `categoryId=${data.CategoryId}&projectId=${data.ProjectId}&BuildingID=${data.BuildingId}&FloorID=${data.FloorId}&FloorName=${data.Name}&fmapID=${this.urlMsg.fmapID}&seq=${data.Seq}&token=${this.urlMsg.token}`;
|
|
|
+ const url = window.location.origin + "/wandaEditer/editer?" + encodeURIComponent(query);
|
|
|
+ if (data.Type == "NotPub") {
|
|
|
+ window.open(url, "_self");
|
|
|
+ } else if (data.Type == "HasPub") {
|
|
|
+ this.treeQuery = query;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error("缺少跳转参数!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 已发布跳转url
|
|
|
+ handleOpenUrl() {
|
|
|
+ const query = `${this.treeQuery}&isCopy=true`;
|
|
|
+ const url = window.location.origin + "/wandaEditer/editer?" + encodeURIComponent(query);
|
|
|
+ window.open(url, "_self");
|
|
|
+ this.dialogVisible = false;
|
|
|
+ },
|
|
|
/**
|
|
|
* @name getInitScale
|
|
|
* @description 获取底图加载完成后的,初始化的缩放比例initScale,设置为baseScale
|
|
@@ -433,6 +492,7 @@
|
|
|
this.urlMsg = obj;
|
|
|
const FloorName = this.urlMsg.FloorName ? this.urlMsg.FloorName : "";
|
|
|
this.urlMsg.floorName = systym[this.urlMsg.categoryId] + "-" + FloorName;
|
|
|
+ this.getFullFloor();
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -457,6 +517,7 @@ li {
|
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
color: #1f2429;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
.tool {
|
|
|
ul {
|