|
@@ -89,6 +89,7 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
|
import myCascader from "@/components/ledger/lib/cascader";
|
|
|
import { queryEquip, updateEquip } from '@/api/scan/request';
|
|
|
import { LocationPointScene, FloorView, Opt, SpaceItem, ZoneItem } from "@saga-web/cad-engine/lib";
|
|
|
+import { SPoint } from "@saga-web/draw";
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -325,6 +326,7 @@ export default {
|
|
|
},
|
|
|
//修改楼层
|
|
|
changeFloor(value, data) {
|
|
|
+ this.floorData = data;
|
|
|
this.showCanvas = false;
|
|
|
this.clearGraphy();
|
|
|
if (value[0]) {
|
|
@@ -394,9 +396,20 @@ export default {
|
|
|
this.scene.selectContainer.connect('listChange', this, this.listChange)
|
|
|
this.canvasLoading = true;
|
|
|
if (this.floorMap.split('.')[1].toString() == 'png' || this.floorMap.split('.')[1].toString() == 'jpg') {
|
|
|
+ let x = 0;
|
|
|
+ let y = 0;
|
|
|
+ let scale = 1;
|
|
|
+ if (this.floorData && this.floorData.Properties) {
|
|
|
+ x = this.floorData.Properties.X;
|
|
|
+ y = this.floorData.Properties.Y;
|
|
|
+ const pro = this.floorData.Properties;
|
|
|
+ const dis = SMathUtil.pointDistance(pro.Line[0].x, pro.Line[0].y, pro.Line[1].x, pro.Line[1].y)
|
|
|
+ const proText = pro.Text.substring(0, pro.Text.length - 3);
|
|
|
+ scale = proText / dis;
|
|
|
+ }
|
|
|
this.scene.loadImg(`/image-service/common/image_get?systemId=dataPlatform&key=${this.floorMap}`, res => {
|
|
|
this.getGraphtSuc(res)
|
|
|
- })
|
|
|
+ }, x, y, scale)
|
|
|
} else {
|
|
|
this.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.floorMap}`).then(res => {
|
|
|
this.getGraphtSuc(res)
|