|
@@ -12,7 +12,7 @@
|
|
|
import { DivideFloorScene, FloorView, Opt } from "@saga-web/cad-engine/lib"
|
|
|
import { SColor, SPoint } from "@saga-web/draw/lib";
|
|
|
import canvasFun from "@/components/business_space/newGraphy/canvasFun"
|
|
|
-import { floorQueryOutline } from "@/api/scan/request";
|
|
|
+import { floorQueryOutline, floorQueryAndSign } from "@/api/scan/request";
|
|
|
import { EditLineItem } from "@saga-web/cad-engine"
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
@@ -27,7 +27,6 @@ export default {
|
|
|
cadWidth: 800,
|
|
|
cadHeight: 600,
|
|
|
canvasLoading: false,
|
|
|
- modelId: '',
|
|
|
FloorID: '',
|
|
|
Outline: [],
|
|
|
floorData: {},
|
|
@@ -38,6 +37,7 @@ export default {
|
|
|
shadeList: [],
|
|
|
type: 1, // 当前图展示类型
|
|
|
scaleItem: null, // 比例尺item
|
|
|
+ urlModelId: '', // url中传入的modelid
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -65,6 +65,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.FloorID = this.$route.query.FloorID;
|
|
|
+ this.urlModelId = this.$route.query.modelId
|
|
|
Opt.sceneMarkColor = new SColor('#00000080');
|
|
|
if (!this.dialog) {
|
|
|
this.init();
|
|
@@ -86,7 +87,6 @@ export default {
|
|
|
// type=3 => id:图片的key
|
|
|
let that = this;
|
|
|
that.type = type;
|
|
|
- that.modelId = Id;
|
|
|
that.clearGraphy()
|
|
|
that.drawMainScene = new DivideFloorScene();
|
|
|
that.canvasLoading = true;
|
|
@@ -149,20 +149,25 @@ export default {
|
|
|
let pa = {
|
|
|
Filters: `FloorID='${this.FloorID}'`
|
|
|
}
|
|
|
- floorQueryOutline(pa, res => {
|
|
|
- this.floorData = res.Content[0];
|
|
|
- if (this.floorData.StructureInfo && this.floorData.StructureInfo.FloorMap) {
|
|
|
- this.getOtherFloorOutLine();
|
|
|
- let floorMap = this.floorData.StructureInfo.FloorMap
|
|
|
- if (floorMap.split('.')[1] == 'png' || floorMap.split('.')[1] == 'jpg') {
|
|
|
+ const temp = this.urlModelId.split('.')[1]
|
|
|
+ if (temp == 'png' || temp == 'jpg') { //底图为图片且已经绑定过图片
|
|
|
+ floorQueryAndSign(pa, res => {
|
|
|
+ this.floorData = res.Content[0];
|
|
|
+ if (this.floorData.StructureInfo && this.floorData.StructureInfo.FloorMap) {
|
|
|
+ let floorMap = this.floorData.StructureInfo.FloorMap
|
|
|
this.initGraphy(floorMap, 3)
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ floorQueryOutline(pa, res => {
|
|
|
+ this.floorData = res.Content[0];
|
|
|
+ if (this.floorData.StructureInfo && this.floorData.StructureInfo.FloorMap) {
|
|
|
+ this.getOtherFloorOutLine();
|
|
|
+ let floorMap = this.floorData.StructureInfo.FloorMap
|
|
|
this.initGraphy(floorMap, 2)
|
|
|
}
|
|
|
- } else {
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 获取绑定该模型id的其他楼层轮廓线
|
|
|
getOtherFloorOutLine() {
|