|
@@ -12,6 +12,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { SFloorParser, getJsonz } from "@persagy-web/big";
|
|
|
+import { SImageItem, SImageShowType } from "@persagy-web/graph";
|
|
|
import { SPlanView, SPlanParser, SPlanScene } from "@/lib";
|
|
|
import { SBaseEquipment } from "@/components/editClass/big-edit";
|
|
|
import topoTooltip from "./topoTooltip.vue";
|
|
@@ -116,6 +117,7 @@ export default {
|
|
|
clearImg() {
|
|
|
this.scene = new SPlanScene();
|
|
|
this.scene.emitChoice = this.emitChoice;
|
|
|
+ this.scene.clearCmdStatus = this.clearCmdStatus;
|
|
|
this.scene.vueOnMouseDown = this.vueOnMouseDown;
|
|
|
if (this.view) {
|
|
|
this.view.update();
|
|
@@ -132,10 +134,26 @@ export default {
|
|
|
},
|
|
|
// 请求获取地图的压缩包
|
|
|
getMapBlob() {
|
|
|
- const url = `/image-service/common/file_get?systemId=revit&key=${this.floorMap}`;
|
|
|
- getJsonz(url).then((data) => {
|
|
|
- // 解析数据并放入压缩包中
|
|
|
- this.parserData(data);
|
|
|
+ if (this.floorMap.includes("png") || this.floorMap.includes("jpg")) {
|
|
|
+ const url = `/image-service/common/image_get?systemId=dataPlatform&key=${this.floorMap}`;
|
|
|
+ this.getImage(url);
|
|
|
+ } else {
|
|
|
+ const url = `/image-service/common/file_get?systemId=revit&key=${this.floorMap}`;
|
|
|
+ getJsonz(url).then((data) => {
|
|
|
+ // 解析数据并放入压缩包中
|
|
|
+ this.parserData(data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取图片
|
|
|
+ getImage(url) {
|
|
|
+ const imgItem = new SImageItem(null, url);
|
|
|
+ imgItem.showType = SImageShowType.AutoFit;
|
|
|
+ imgItem.connect("imgLoadOver", this, () => {
|
|
|
+ // 画板是否可拖动;
|
|
|
+ this.scene.addItem(imgItem);
|
|
|
+ this.view.DragMove = true;
|
|
|
+ this.view.fitSceneToView();
|
|
|
});
|
|
|
},
|
|
|
// 解析数据并注入 scene 类中
|