leiting-bim 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leitingbim.es.js +758 -230
- package/package.json +1 -1
- package/style.css +134 -68
package/leitingbim.es.js
CHANGED
|
@@ -211471,11 +211471,6 @@ var cadPointsType = /* @__PURE__ */ ((cadPointsType2) => {
|
|
|
211471
211471
|
cadPointsType2["mapPoint"] = "校准点";
|
|
211472
211472
|
return cadPointsType2;
|
|
211473
211473
|
})(cadPointsType || {});
|
|
211474
|
-
var cadPointsText = /* @__PURE__ */ ((cadPointsText2) => {
|
|
211475
|
-
cadPointsText2["longitude"] = "经度";
|
|
211476
|
-
cadPointsText2["latitude"] = "纬度";
|
|
211477
|
-
return cadPointsText2;
|
|
211478
|
-
})(cadPointsText || {});
|
|
211479
211474
|
function wrapLine$1(line2, maxChars) {
|
|
211480
211475
|
const result = [];
|
|
211481
211476
|
let currentLine = line2;
|
|
@@ -233331,6 +233326,43 @@ class BaseZoom {
|
|
|
233331
233326
|
}
|
|
233332
233327
|
}
|
|
233333
233328
|
}
|
|
233329
|
+
adjustingModelByCad(params2) {
|
|
233330
|
+
if (this.getSelectPoint().longitude != 0 && this.getSelectPoint().latitude != 0 && this.getSelectPoint().height != 0) {
|
|
233331
|
+
const mz1 = this.set3dtilesSelectedMatrix(
|
|
233332
|
+
params2.tileset,
|
|
233333
|
+
params2
|
|
233334
|
+
);
|
|
233335
|
+
const _cesium = this.cesium;
|
|
233336
|
+
const position2 = _cesium.Cartesian3.fromDegrees(
|
|
233337
|
+
params2.longitude,
|
|
233338
|
+
params2.latitude,
|
|
233339
|
+
params2.height
|
|
233340
|
+
);
|
|
233341
|
+
const m2 = _cesium.Transforms.eastNorthUpToFixedFrame(position2);
|
|
233342
|
+
_cesium.Matrix4.multiply(m2, mz1, m2);
|
|
233343
|
+
params2.tileset._root.transform = m2;
|
|
233344
|
+
} else {
|
|
233345
|
+
const _cesium = this.cesium;
|
|
233346
|
+
const quaternion = _cesium.Quaternion.fromAxisAngle(
|
|
233347
|
+
_cesium.Cartesian3.UNIT_Z,
|
|
233348
|
+
_cesium.Math.toRadians(params2.totalRotation)
|
|
233349
|
+
);
|
|
233350
|
+
const rotationZ = _cesium.Matrix4.fromRotationTranslation(
|
|
233351
|
+
_cesium.Matrix3.fromQuaternion(quaternion),
|
|
233352
|
+
new _cesium.Cartesian3(0, 0, 0)
|
|
233353
|
+
);
|
|
233354
|
+
const position2 = _cesium.Cartesian3.fromDegrees(
|
|
233355
|
+
params2.longitude,
|
|
233356
|
+
params2.latitude,
|
|
233357
|
+
params2.height
|
|
233358
|
+
);
|
|
233359
|
+
const m2 = _cesium.Transforms.eastNorthUpToFixedFrame(position2);
|
|
233360
|
+
_cesium.Matrix4.multiply(m2, rotationZ, m2);
|
|
233361
|
+
if (params2.tileset._root) {
|
|
233362
|
+
params2.tileset._root.transform = m2;
|
|
233363
|
+
}
|
|
233364
|
+
}
|
|
233365
|
+
}
|
|
233334
233366
|
updateOSGBMatrix(params2) {
|
|
233335
233367
|
const { X, Y: Y2, Z: Z2, modelId: modelId2 } = params2;
|
|
233336
233368
|
const Cesium2 = this.cesium;
|
|
@@ -235520,7 +235552,7 @@ class BaseDxf {
|
|
|
235520
235552
|
return false;
|
|
235521
235553
|
}
|
|
235522
235554
|
}
|
|
235523
|
-
async addDxfModel({ fileNames: fileNames2,
|
|
235555
|
+
async addDxfModel({ fileNames: fileNames2, options: options2 }) {
|
|
235524
235556
|
var _a2;
|
|
235525
235557
|
const startAllGen = this.renderGenAll;
|
|
235526
235558
|
if (fileNames2 == null ? void 0 : fileNames2.length) {
|
|
@@ -235530,13 +235562,14 @@ class BaseDxf {
|
|
|
235530
235562
|
if ((this.renderGenByModel[file.modelId] || 0) !== startModelGen) return;
|
|
235531
235563
|
`${file.outPutPath}${file.dbName}/layerInfo.json`;
|
|
235532
235564
|
const tilesetUrl = `${file.outPutPath}${file.dbName}/tileset.json`;
|
|
235533
|
-
const
|
|
235565
|
+
const _options = options2 ? Object.assign(this.options, options2) : this.options;
|
|
235534
235566
|
try {
|
|
235535
235567
|
const layerInfoZip = `${file.outPutPath}${file.dbName}/layerInfo.zip`;
|
|
235536
235568
|
const layerInfo = await this.loadModelFile(layerInfoZip);
|
|
235537
235569
|
if (this.renderGenAll !== startAllGen) return;
|
|
235538
235570
|
if ((this.renderGenByModel[file.modelId] || 0) !== startModelGen) return;
|
|
235539
235571
|
const tileset = await this.cesium.Cesium3DTileset.fromUrl(tilesetUrl);
|
|
235572
|
+
tileset.maximumScreenSpaceError = 0;
|
|
235540
235573
|
if (this.renderGenAll !== startAllGen) return;
|
|
235541
235574
|
if ((this.renderGenByModel[file.modelId] || 0) !== startModelGen) return;
|
|
235542
235575
|
tileset.modelId = file.modelId;
|
|
@@ -235546,7 +235579,45 @@ class BaseDxf {
|
|
|
235546
235579
|
tileset.relocated = true;
|
|
235547
235580
|
tileset.dbName = file.dbName;
|
|
235548
235581
|
tileset.outPutPath = file.outPutPath;
|
|
235582
|
+
tileset.totalRotation = file.totalRotation || 0;
|
|
235549
235583
|
tileset.layerInfo = layerInfo;
|
|
235584
|
+
if (file.formData) {
|
|
235585
|
+
tileset.formData = file.formData;
|
|
235586
|
+
} else {
|
|
235587
|
+
const formData = {
|
|
235588
|
+
modelId: tileset.modelId,
|
|
235589
|
+
longitude: tileset.deltaLatitude,
|
|
235590
|
+
latitude: tileset.deltaLongitude,
|
|
235591
|
+
distance: 1e-6,
|
|
235592
|
+
rotation: 0,
|
|
235593
|
+
totalRotation: tileset.totalRotation,
|
|
235594
|
+
heightDistance: 1,
|
|
235595
|
+
height: 0,
|
|
235596
|
+
lonlat: 1e-6,
|
|
235597
|
+
modelOptions: [
|
|
235598
|
+
{
|
|
235599
|
+
value: tileset.modelId,
|
|
235600
|
+
label: tileset.modelName
|
|
235601
|
+
}
|
|
235602
|
+
],
|
|
235603
|
+
selectPoint: {
|
|
235604
|
+
longitude: 0,
|
|
235605
|
+
//显示经度
|
|
235606
|
+
latitude: 0,
|
|
235607
|
+
//显示纬度116.7636085096031,
|
|
235608
|
+
height: 0
|
|
235609
|
+
},
|
|
235610
|
+
selectedMode: false,
|
|
235611
|
+
X: 0,
|
|
235612
|
+
Y: 0,
|
|
235613
|
+
Z: 0
|
|
235614
|
+
};
|
|
235615
|
+
tileset.formData = formData;
|
|
235616
|
+
}
|
|
235617
|
+
this.adjustingModelByCad({
|
|
235618
|
+
...tileset.formData,
|
|
235619
|
+
tileset
|
|
235620
|
+
});
|
|
235550
235621
|
if (Array.isArray(layerInfo)) {
|
|
235551
235622
|
tileset.layerMap = {};
|
|
235552
235623
|
if (!this.mapLayers[file.modelId]) {
|
|
@@ -235567,10 +235638,12 @@ class BaseDxf {
|
|
|
235567
235638
|
this.dxfModelsList.push(tileset);
|
|
235568
235639
|
this.setModelId(file.modelId);
|
|
235569
235640
|
this.viewer.scene.primitives.add(tileset);
|
|
235570
|
-
|
|
235641
|
+
if (_options.mode !== "3d") {
|
|
235642
|
+
this.setRectangle(tileset);
|
|
235643
|
+
}
|
|
235571
235644
|
if (this.renderGenAll !== startAllGen) return;
|
|
235572
235645
|
if ((this.renderGenByModel[file.modelId] || 0) !== startModelGen) return;
|
|
235573
|
-
if (
|
|
235646
|
+
if (_options.flyTo) {
|
|
235574
235647
|
const Cesium2 = this.cesium;
|
|
235575
235648
|
const radius2 = ((_a2 = tileset.boundingSphere) == null ? void 0 : _a2.radius) || 1e3;
|
|
235576
235649
|
this.flyToBounds(tileset, {
|
|
@@ -235583,6 +235656,27 @@ class BaseDxf {
|
|
|
235583
235656
|
}
|
|
235584
235657
|
}
|
|
235585
235658
|
}
|
|
235659
|
+
adjustingModelByCad(params2) {
|
|
235660
|
+
const _cesium = this.cesium;
|
|
235661
|
+
const quaternion = _cesium.Quaternion.fromAxisAngle(
|
|
235662
|
+
_cesium.Cartesian3.UNIT_Z,
|
|
235663
|
+
_cesium.Math.toRadians(params2.totalRotation)
|
|
235664
|
+
);
|
|
235665
|
+
const rotationZ = _cesium.Matrix4.fromRotationTranslation(
|
|
235666
|
+
_cesium.Matrix3.fromQuaternion(quaternion),
|
|
235667
|
+
new _cesium.Cartesian3(0, 0, 0)
|
|
235668
|
+
);
|
|
235669
|
+
const position2 = _cesium.Cartesian3.fromDegrees(
|
|
235670
|
+
params2.longitude,
|
|
235671
|
+
params2.latitude,
|
|
235672
|
+
params2.height
|
|
235673
|
+
);
|
|
235674
|
+
const m2 = _cesium.Transforms.eastNorthUpToFixedFrame(position2);
|
|
235675
|
+
_cesium.Matrix4.multiply(m2, rotationZ, m2);
|
|
235676
|
+
if (params2.tileset._root) {
|
|
235677
|
+
params2.tileset._root.transform = m2;
|
|
235678
|
+
}
|
|
235679
|
+
}
|
|
235586
235680
|
deleteGeoJson({ modelId: modelId2 }) {
|
|
235587
235681
|
if (this.mapLayers[modelId2]) {
|
|
235588
235682
|
Object.keys(this.mapLayers[modelId2]).forEach((layer) => {
|
|
@@ -236393,7 +236487,7 @@ class BaseViewerManagements {
|
|
|
236393
236487
|
this.cesium;
|
|
236394
236488
|
}
|
|
236395
236489
|
async parseDxf({ fileNames: fileNames2, options: options2 }) {
|
|
236396
|
-
return await this.baseDxfParse.
|
|
236490
|
+
return await this.baseDxfParse.addDxfModel({ fileNames: fileNames2, options: options2 });
|
|
236397
236491
|
}
|
|
236398
236492
|
async parseNormalDxfs({ fileNames: fileNames2, options: options2 }) {
|
|
236399
236493
|
return await this.baseNormalDxfParse.parseDxfs({ fileNames: fileNames2, options: options2 });
|
|
@@ -239296,21 +239390,40 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
239296
239390
|
});
|
|
239297
239391
|
}
|
|
239298
239392
|
});
|
|
239393
|
+
const columns$2 = [
|
|
239394
|
+
{
|
|
239395
|
+
title: "序号",
|
|
239396
|
+
width: 20,
|
|
239397
|
+
dataIndex: "index",
|
|
239398
|
+
key: "index"
|
|
239399
|
+
// customRender:(text,record,index)=>{`${index+1}`}
|
|
239400
|
+
},
|
|
239401
|
+
{
|
|
239402
|
+
title: "名称",
|
|
239403
|
+
dataIndex: "modelName",
|
|
239404
|
+
key: "modelName",
|
|
239405
|
+
width: 80,
|
|
239406
|
+
scopedSlots: { customRender: "modelName" },
|
|
239407
|
+
ellipsis: true
|
|
239408
|
+
},
|
|
239409
|
+
{
|
|
239410
|
+
title: "主模型",
|
|
239411
|
+
dataIndex: "mainModel",
|
|
239412
|
+
key: "mainModel",
|
|
239413
|
+
width: 20,
|
|
239414
|
+
scopedSlots: { customRender: "mainModel" },
|
|
239415
|
+
ellipsis: true
|
|
239416
|
+
}
|
|
239417
|
+
];
|
|
239299
239418
|
function _isSlot$1(s2) {
|
|
239300
239419
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
|
239301
239420
|
}
|
|
239302
|
-
var cadPoints = /* @__PURE__ */ function(cadPoints2) {
|
|
239303
|
-
cadPoints2["cadPoint"] = "cadPoint";
|
|
239304
|
-
cadPoints2["mapPoint"] = "mapPoint";
|
|
239305
|
-
return cadPoints2;
|
|
239306
|
-
}(cadPoints || {});
|
|
239307
239421
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
239308
239422
|
name: "CadCard",
|
|
239309
239423
|
props: {
|
|
239310
|
-
|
|
239311
|
-
|
|
239312
|
-
|
|
239313
|
-
default: 1
|
|
239424
|
+
methodsOption: {
|
|
239425
|
+
type: Object,
|
|
239426
|
+
default: () => ({})
|
|
239314
239427
|
}
|
|
239315
239428
|
},
|
|
239316
239429
|
setup(props2, {
|
|
@@ -239318,239 +239431,610 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
239318
239431
|
emit
|
|
239319
239432
|
}) {
|
|
239320
239433
|
const DragCardRef = ref(null);
|
|
239321
|
-
const
|
|
239322
|
-
const
|
|
239323
|
-
const
|
|
239324
|
-
|
|
239325
|
-
|
|
239326
|
-
|
|
239327
|
-
|
|
239328
|
-
|
|
239434
|
+
const _selectedRowKeys = ref([]);
|
|
239435
|
+
const columnsTemp = ref(columns$2);
|
|
239436
|
+
const modelId2 = ref({
|
|
239437
|
+
value: "111",
|
|
239438
|
+
label: "123333"
|
|
239439
|
+
});
|
|
239440
|
+
const data2 = ref([]);
|
|
239441
|
+
const {
|
|
239442
|
+
Panel: Panel2
|
|
239443
|
+
} = Collapse;
|
|
239444
|
+
const style = reactive({
|
|
239445
|
+
height: "600px"
|
|
239446
|
+
});
|
|
239447
|
+
ref(16);
|
|
239448
|
+
const tableCollapsed = ref(false);
|
|
239449
|
+
const bimModel = ref(true);
|
|
239450
|
+
ref([
|
|
239451
|
+
// { label: '百度', value: '百度' },
|
|
239452
|
+
// { label: '高德', value: '高德' },
|
|
239453
|
+
{
|
|
239454
|
+
label: "BIM模型",
|
|
239455
|
+
value: true
|
|
239456
|
+
},
|
|
239457
|
+
{
|
|
239458
|
+
label: "倾斜摄影",
|
|
239459
|
+
value: false
|
|
239460
|
+
}
|
|
239461
|
+
]);
|
|
239462
|
+
const bimAdjust = ref(true);
|
|
239463
|
+
const bimShowType = ref("bimPoint1");
|
|
239464
|
+
const bimPointsList = reactive({
|
|
239465
|
+
bimPoint1: {
|
|
239329
239466
|
longitude: void 0,
|
|
239330
239467
|
latitude: void 0,
|
|
239331
|
-
type:
|
|
239332
|
-
longitudeText:
|
|
239333
|
-
latitudeText:
|
|
239334
|
-
|
|
239335
|
-
|
|
239468
|
+
type: `BIM标记点`,
|
|
239469
|
+
longitudeText: "经度",
|
|
239470
|
+
latitudeText: "纬度",
|
|
239471
|
+
heightText: "高程",
|
|
239472
|
+
height: void 0
|
|
239473
|
+
},
|
|
239474
|
+
bimPoint2: {
|
|
239336
239475
|
longitude: void 0,
|
|
239337
239476
|
latitude: void 0,
|
|
239338
|
-
type:
|
|
239339
|
-
longitudeText:
|
|
239340
|
-
latitudeText:
|
|
239341
|
-
|
|
239342
|
-
|
|
239343
|
-
let cadPointsList = reactive(_cadPointsList);
|
|
239344
|
-
watchEffect(() => {
|
|
239345
|
-
const _cadPointsList2 = {};
|
|
239346
|
-
for (let index2 = 0; index2 < props2.pointListNum; index2++) {
|
|
239347
|
-
_cadPointsList2[`${cadPoints.cadPoint}${index2 + 1}`] = {
|
|
239348
|
-
longitude: void 0,
|
|
239349
|
-
latitude: void 0,
|
|
239350
|
-
type: `${cadPointsType.cadPoint}${index2 + 1}`,
|
|
239351
|
-
longitudeText: cadPointsText.longitude,
|
|
239352
|
-
latitudeText: cadPointsText.latitude
|
|
239353
|
-
};
|
|
239354
|
-
_cadPointsList2[`${cadPoints.mapPoint}${index2 + 1}`] = {
|
|
239355
|
-
longitude: void 0,
|
|
239356
|
-
latitude: void 0,
|
|
239357
|
-
type: `${cadPointsType.mapPoint}${index2 + 1}`,
|
|
239358
|
-
longitudeText: cadPointsText.longitude,
|
|
239359
|
-
latitudeText: cadPointsText.latitude
|
|
239360
|
-
};
|
|
239477
|
+
type: `地图标记点`,
|
|
239478
|
+
longitudeText: "经度",
|
|
239479
|
+
latitudeText: "纬度",
|
|
239480
|
+
heightText: "高程",
|
|
239481
|
+
height: void 0
|
|
239361
239482
|
}
|
|
239362
|
-
cadPointsList = reactive(_cadPointsList2);
|
|
239363
239483
|
});
|
|
239364
|
-
const
|
|
239365
|
-
|
|
239366
|
-
|
|
239367
|
-
|
|
239368
|
-
|
|
239369
|
-
|
|
239370
|
-
|
|
239484
|
+
const bimModelAdjustOptions = ref([
|
|
239485
|
+
// { label: '百度', value: '百度' },
|
|
239486
|
+
// { label: '高德', value: '高德' },
|
|
239487
|
+
{
|
|
239488
|
+
label: "参数模式",
|
|
239489
|
+
value: true
|
|
239490
|
+
},
|
|
239491
|
+
{
|
|
239492
|
+
label: "地图点选",
|
|
239493
|
+
value: false
|
|
239371
239494
|
}
|
|
239372
|
-
|
|
239373
|
-
|
|
239495
|
+
]);
|
|
239496
|
+
const originFormData = reactive({
|
|
239497
|
+
longitude: 116.0084142079,
|
|
239498
|
+
latitude: 35.52358109680741,
|
|
239499
|
+
height: 0,
|
|
239500
|
+
totalRotation: 0,
|
|
239501
|
+
X: 0,
|
|
239502
|
+
Y: 0,
|
|
239503
|
+
Z: 0
|
|
239504
|
+
});
|
|
239505
|
+
const step = ref(1e-6);
|
|
239506
|
+
ref("600px");
|
|
239507
|
+
const formData = reactive({
|
|
239508
|
+
modelId: "111",
|
|
239509
|
+
longitude: 116.0084142079,
|
|
239510
|
+
latitude: 35.52358109680741,
|
|
239511
|
+
distance: 1e-6,
|
|
239512
|
+
rotation: 0,
|
|
239513
|
+
totalRotation: 0,
|
|
239514
|
+
heightDistance: 1,
|
|
239515
|
+
height: 0,
|
|
239516
|
+
lonlat: 1e-6,
|
|
239517
|
+
modelOptions: [{
|
|
239518
|
+
value: "111",
|
|
239519
|
+
label: "123333"
|
|
239520
|
+
}],
|
|
239521
|
+
selectPoint: {
|
|
239522
|
+
longitude: 0,
|
|
239523
|
+
//显示经度
|
|
239524
|
+
latitude: 0,
|
|
239525
|
+
//显示纬度116.7636085096031,
|
|
239526
|
+
height: 0
|
|
239527
|
+
},
|
|
239528
|
+
selectedMode: false,
|
|
239529
|
+
X: 0,
|
|
239530
|
+
Y: 0,
|
|
239531
|
+
Z: 0
|
|
239532
|
+
});
|
|
239533
|
+
const colMap = reactive([{
|
|
239534
|
+
style: {
|
|
239535
|
+
color: "#e74c3c"
|
|
239536
|
+
},
|
|
239537
|
+
id: "leftRotate",
|
|
239538
|
+
label: "左转",
|
|
239539
|
+
fun: () => {
|
|
239540
|
+
formData.totalRotation -= formData.rotation + 1e-4;
|
|
239541
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239542
|
+
}
|
|
239543
|
+
}, {
|
|
239544
|
+
style: {
|
|
239545
|
+
color: "#3498db"
|
|
239546
|
+
},
|
|
239547
|
+
id: "moveForward",
|
|
239548
|
+
label: "北移",
|
|
239549
|
+
fun: () => {
|
|
239550
|
+
formData.latitude += formData.distance + 1e-8;
|
|
239551
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239552
|
+
}
|
|
239553
|
+
}, {
|
|
239554
|
+
style: {
|
|
239555
|
+
color: "#e74c3c"
|
|
239556
|
+
},
|
|
239557
|
+
id: "rightRotate",
|
|
239558
|
+
label: "右转",
|
|
239559
|
+
fun: () => {
|
|
239560
|
+
formData.totalRotation += formData.rotation + 1e-4;
|
|
239561
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239562
|
+
}
|
|
239563
|
+
}, {
|
|
239564
|
+
style: {
|
|
239565
|
+
color: "#3498db"
|
|
239566
|
+
},
|
|
239567
|
+
id: "moveLeft",
|
|
239568
|
+
label: "西移",
|
|
239569
|
+
fun: () => {
|
|
239570
|
+
formData.longitude -= formData.distance + 1e-8;
|
|
239571
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239572
|
+
}
|
|
239573
|
+
}, {
|
|
239574
|
+
style: {
|
|
239575
|
+
color: "#3498db"
|
|
239576
|
+
},
|
|
239577
|
+
id: "moveBackward",
|
|
239578
|
+
label: "南移",
|
|
239579
|
+
fun: () => {
|
|
239580
|
+
formData.latitude -= formData.distance;
|
|
239581
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239582
|
+
}
|
|
239583
|
+
}, {
|
|
239584
|
+
style: {
|
|
239585
|
+
color: "#3498db"
|
|
239586
|
+
},
|
|
239587
|
+
id: "moveRight",
|
|
239588
|
+
label: "东移",
|
|
239589
|
+
fun: () => {
|
|
239590
|
+
formData.longitude += formData.distance;
|
|
239591
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239592
|
+
}
|
|
239593
|
+
}, {
|
|
239594
|
+
style: {
|
|
239595
|
+
color: "#2ecc71"
|
|
239596
|
+
},
|
|
239597
|
+
id: "moveUp",
|
|
239598
|
+
label: "上移",
|
|
239599
|
+
fun: () => {
|
|
239600
|
+
formData.height += formData.heightDistance + 1e-8;
|
|
239601
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239602
|
+
}
|
|
239603
|
+
}, {
|
|
239604
|
+
style: {
|
|
239605
|
+
color: "#2ecc71"
|
|
239606
|
+
},
|
|
239607
|
+
id: "moveDown",
|
|
239608
|
+
label: "下移",
|
|
239609
|
+
fun: () => {
|
|
239610
|
+
formData.height -= formData.heightDistance;
|
|
239611
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239612
|
+
}
|
|
239613
|
+
}, {
|
|
239614
|
+
style: {
|
|
239615
|
+
color: "#e67e22"
|
|
239616
|
+
},
|
|
239617
|
+
id: "saving",
|
|
239618
|
+
label: "保存",
|
|
239619
|
+
fun: () => {
|
|
239620
|
+
emit("handleSavingByCadCard");
|
|
239621
|
+
}
|
|
239622
|
+
}]);
|
|
239623
|
+
const zoomToModelManagementsAdjustingModelByCad = ({
|
|
239624
|
+
modelId: modelId3,
|
|
239625
|
+
modelList,
|
|
239626
|
+
adjustingModel
|
|
239627
|
+
}) => {
|
|
239628
|
+
modelList.find((i2) => i2.modelId === modelId3);
|
|
239629
|
+
const longitudeRange = formData.longitude - originFormData.longitude;
|
|
239630
|
+
const latitudeRange = formData.latitude - originFormData.latitude;
|
|
239631
|
+
const heightRange = formData.height - originFormData.height;
|
|
239632
|
+
const totalRotationRange = formData.totalRotation - originFormData.totalRotation;
|
|
239633
|
+
_selectedRowKeys.value.forEach((key2) => {
|
|
239634
|
+
const anotherItem = modelList.find((i2) => i2.modelId === key2 && i2.modelId !== modelId3);
|
|
239635
|
+
const _anotherItem = modelList.find((i2) => i2.modelId === key2 && i2.modelId !== modelId3);
|
|
239636
|
+
if (key2.toString() === modelId3) {
|
|
239637
|
+
const currentItem = modelList.find((i2) => i2.modelId === key2 && i2.modelId == modelId3);
|
|
239638
|
+
currentItem.formData.longitude = formData.longitude;
|
|
239639
|
+
currentItem.formData.latitude = formData.latitude;
|
|
239640
|
+
currentItem.formData.height = formData.height;
|
|
239641
|
+
currentItem.formData.totalRotation = formData.totalRotation;
|
|
239642
|
+
formData.X = currentItem.formData.X;
|
|
239643
|
+
formData.Y = currentItem.formData.Y;
|
|
239644
|
+
formData.Z = currentItem.formData.Z;
|
|
239645
|
+
adjustingModel({
|
|
239646
|
+
...formData,
|
|
239647
|
+
tileset: currentItem
|
|
239648
|
+
});
|
|
239649
|
+
}
|
|
239650
|
+
if (_anotherItem) {
|
|
239651
|
+
_anotherItem.formData.longitude += unref(longitudeRange);
|
|
239652
|
+
_anotherItem.formData.latitude += unref(latitudeRange);
|
|
239653
|
+
_anotherItem.formData.height += unref(heightRange);
|
|
239654
|
+
_anotherItem.formData.totalRotation += unref(totalRotationRange);
|
|
239655
|
+
adjustingModel({
|
|
239656
|
+
...anotherItem.formData,
|
|
239657
|
+
tileset: _anotherItem
|
|
239658
|
+
});
|
|
239659
|
+
}
|
|
239374
239660
|
});
|
|
239661
|
+
originFormData.longitude = formData.longitude;
|
|
239662
|
+
originFormData.latitude = formData.latitude;
|
|
239663
|
+
originFormData.height = formData.height;
|
|
239664
|
+
originFormData.totalRotation = formData.totalRotation;
|
|
239375
239665
|
};
|
|
239376
|
-
const
|
|
239377
|
-
|
|
239378
|
-
|
|
239379
|
-
|
|
239380
|
-
|
|
239666
|
+
const zoomToModelManagementsAdjustingModelByBimPointListByCad = ({
|
|
239667
|
+
modelId: modelId3,
|
|
239668
|
+
modelList,
|
|
239669
|
+
adjustingModel
|
|
239670
|
+
}) => {
|
|
239671
|
+
const longitudeRange = bimPointsList["bimPoint2"].longitude - bimPointsList["bimPoint1"].longitude;
|
|
239672
|
+
const latitudeRange = bimPointsList["bimPoint2"].latitude - bimPointsList["bimPoint1"].latitude;
|
|
239673
|
+
const heightRange = bimPointsList["bimPoint2"].height - bimPointsList["bimPoint1"].height;
|
|
239674
|
+
const totalRotationRange = 0;
|
|
239675
|
+
_selectedRowKeys.value.forEach((key2) => {
|
|
239676
|
+
const anotherItem = modelList.find((i2) => i2.modelId === key2);
|
|
239677
|
+
anotherItem.formData.longitude += unref(longitudeRange);
|
|
239678
|
+
anotherItem.formData.latitude += unref(latitudeRange);
|
|
239679
|
+
anotherItem.formData.height += unref(heightRange);
|
|
239680
|
+
anotherItem.formData.totalRotation += unref(totalRotationRange);
|
|
239681
|
+
adjustingModel({
|
|
239682
|
+
...anotherItem.formData,
|
|
239683
|
+
tileset: anotherItem
|
|
239684
|
+
});
|
|
239381
239685
|
});
|
|
239686
|
+
formData.longitude += longitudeRange;
|
|
239687
|
+
formData.latitude += latitudeRange;
|
|
239688
|
+
originFormData.longitude = formData.longitude;
|
|
239689
|
+
originFormData.latitude = formData.latitude;
|
|
239690
|
+
originFormData.height = formData.height;
|
|
239691
|
+
originFormData.totalRotation = formData.totalRotation;
|
|
239382
239692
|
};
|
|
239383
|
-
const
|
|
239384
|
-
|
|
239385
|
-
Object.keys(cadPointsList).forEach((i2) => {
|
|
239386
|
-
cadPointsList[i2].longitude = void 0;
|
|
239387
|
-
cadPointsList[i2].latitude = void 0;
|
|
239388
|
-
});
|
|
239389
|
-
}
|
|
239390
|
-
emit("handleUpdateCadPointsList", cadPointsList);
|
|
239391
|
-
emit("handleCloseByCadCard");
|
|
239392
|
-
emit("handleCloseCardByCadCard");
|
|
239693
|
+
const handleLongitude = () => {
|
|
239694
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239393
239695
|
};
|
|
239394
|
-
const
|
|
239395
|
-
emit("
|
|
239696
|
+
const handleLatitude = () => {
|
|
239697
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239396
239698
|
};
|
|
239397
|
-
const
|
|
239398
|
-
|
|
239399
|
-
|
|
239400
|
-
|
|
239401
|
-
|
|
239402
|
-
|
|
239403
|
-
|
|
239404
|
-
|
|
239405
|
-
|
|
239699
|
+
const handleRotation = () => {
|
|
239700
|
+
emit("zoomToModelManagementsAdjustingModelByCad");
|
|
239701
|
+
};
|
|
239702
|
+
const setFormData = (params2) => {
|
|
239703
|
+
const _paramsCopy = JSON.parse(JSON.stringify(params2));
|
|
239704
|
+
Object.assign(formData, _paramsCopy);
|
|
239705
|
+
modelId2.value = formData.modelOptions.find((i2) => i2.value === _paramsCopy.modelId);
|
|
239706
|
+
originFormData.longitude = formData.longitude;
|
|
239707
|
+
originFormData.latitude = formData.latitude;
|
|
239708
|
+
originFormData.height = formData.height;
|
|
239709
|
+
originFormData.totalRotation = formData.totalRotation;
|
|
239710
|
+
originFormData.heightDistance = formData.heightDistance ?? 1;
|
|
239711
|
+
};
|
|
239712
|
+
const handleChangeMainModel = (record) => {
|
|
239713
|
+
_selectedRowKeys.value.length = 0;
|
|
239714
|
+
data2.value.forEach((key2) => {
|
|
239715
|
+
key2.mainModel = false;
|
|
239406
239716
|
});
|
|
239407
|
-
|
|
239408
|
-
|
|
239409
|
-
|
|
239717
|
+
_selectedRowKeys.value.push(record.modelId.toString());
|
|
239718
|
+
record.mainModel = true;
|
|
239719
|
+
modelId2.value.label = record.modelName;
|
|
239720
|
+
modelId2.value.value = record.modelId.toString();
|
|
239721
|
+
emit("handleChangeMainModelByAdjustingModel", {
|
|
239722
|
+
modelId: record.modelId.toString()
|
|
239410
239723
|
});
|
|
239411
|
-
(_a2 = DragCardRef.value) == null ? void 0 : _a2.openCard();
|
|
239412
239724
|
};
|
|
239413
|
-
const
|
|
239414
|
-
|
|
239415
|
-
|
|
239416
|
-
|
|
239417
|
-
|
|
239418
|
-
|
|
239419
|
-
|
|
239420
|
-
|
|
239421
|
-
|
|
239725
|
+
const toggleBimAdjust = () => {
|
|
239726
|
+
emit("clearBimPointList");
|
|
239727
|
+
};
|
|
239728
|
+
const addGltfOr3dTilesModelList = (modelList) => {
|
|
239729
|
+
data2.value = [...modelList.map((i2, index2) => {
|
|
239730
|
+
return {
|
|
239731
|
+
//@ts-ignore
|
|
239732
|
+
modelName: i2.modelName,
|
|
239733
|
+
index: index2 + 1,
|
|
239734
|
+
key: i2.modelId,
|
|
239735
|
+
mainModel: false,
|
|
239736
|
+
formData: i2.formData
|
|
239737
|
+
};
|
|
239738
|
+
})];
|
|
239739
|
+
if (data2.value.length > 0) {
|
|
239740
|
+
const rowKey = data2.value[0].key.toString();
|
|
239741
|
+
if (!_selectedRowKeys.value.includes(rowKey)) _selectedRowKeys.value.push(rowKey);
|
|
239742
|
+
data2.value[0].mainModel = true;
|
|
239743
|
+
} else {
|
|
239744
|
+
_selectedRowKeys.value.length = 0;
|
|
239745
|
+
}
|
|
239422
239746
|
};
|
|
239423
239747
|
const handleOpenClose = () => {
|
|
239424
239748
|
var _a2;
|
|
239425
239749
|
(_a2 = DragCardRef.value) == null ? void 0 : _a2.closeCard();
|
|
239426
239750
|
};
|
|
239427
|
-
const
|
|
239428
|
-
|
|
239751
|
+
const handleOpenCard = () => {
|
|
239752
|
+
var _a2;
|
|
239753
|
+
(_a2 = DragCardRef.value) == null ? void 0 : _a2.openCard();
|
|
239429
239754
|
};
|
|
239430
|
-
const
|
|
239431
|
-
|
|
239755
|
+
const changeFormData = (model) => {
|
|
239756
|
+
const _model = model;
|
|
239757
|
+
if (_model) {
|
|
239758
|
+
const _modelCopy = JSON.parse(JSON.stringify(_model));
|
|
239759
|
+
formData.modelId = modelId2.value.value;
|
|
239760
|
+
formData.longitude = _modelCopy.formData.longitude;
|
|
239761
|
+
formData.latitude = _modelCopy.formData.latitude;
|
|
239762
|
+
formData.distance = _modelCopy.formData.distance;
|
|
239763
|
+
formData.heightDistance = _modelCopy.formData.heightDistance;
|
|
239764
|
+
formData.rotation = _modelCopy.formData.rotation;
|
|
239765
|
+
formData.totalRotation = _modelCopy.formData.totalRotation;
|
|
239766
|
+
formData.height = _modelCopy.formData.height;
|
|
239767
|
+
formData.lonlat = _modelCopy.formData.lonlat;
|
|
239768
|
+
formData.X = _modelCopy.formData.X;
|
|
239769
|
+
formData.Y = _modelCopy.formData.Y;
|
|
239770
|
+
formData.Z = _modelCopy.formData.Z;
|
|
239771
|
+
originFormData.longitude = formData.longitude;
|
|
239772
|
+
originFormData.latitude = formData.latitude;
|
|
239773
|
+
originFormData.height = formData.height;
|
|
239774
|
+
originFormData.totalRotation = formData.totalRotation;
|
|
239775
|
+
}
|
|
239432
239776
|
};
|
|
239433
|
-
const
|
|
239434
|
-
|
|
239777
|
+
const rowSelection = {
|
|
239778
|
+
selectedRowKeys: _selectedRowKeys,
|
|
239779
|
+
onChange: (selectedRowKeys) => {
|
|
239780
|
+
_selectedRowKeys.value = selectedRowKeys;
|
|
239781
|
+
},
|
|
239782
|
+
columnWidth: 20
|
|
239783
|
+
// onSelect: (selectedRows: RecordType[]) => {
|
|
239784
|
+
// _selectedRowKeys.value = selectedRows.map((row) => row.key.toString());
|
|
239785
|
+
// },
|
|
239786
|
+
// getCheckboxProps: (record: RecordType) => ({
|
|
239787
|
+
// disabled: record.key.toString() === modelId.value.value.toString()
|
|
239788
|
+
// })
|
|
239789
|
+
};
|
|
239790
|
+
const setIsOsgb = (value) => {
|
|
239791
|
+
bimModel.value = value;
|
|
239792
|
+
};
|
|
239793
|
+
const setBIMPointsList = ({
|
|
239435
239794
|
longitude,
|
|
239436
239795
|
latitude,
|
|
239437
239796
|
height: height2
|
|
239438
239797
|
}) => {
|
|
239439
|
-
|
|
239440
|
-
|
|
239441
|
-
|
|
239442
|
-
const updateCadPointsList = () => {
|
|
239443
|
-
emit("handleUpdateCadPointsList", cadPointsList);
|
|
239798
|
+
bimPointsList[bimShowType.value].longitude = longitude;
|
|
239799
|
+
bimPointsList[bimShowType.value].latitude = latitude;
|
|
239800
|
+
bimPointsList[bimShowType.value].height = height2;
|
|
239444
239801
|
};
|
|
239802
|
+
const adjustingDisable = computed(() => Object.keys(bimPointsList).some((i2) => bimPointsList[i2].longitude === void 0 || bimPointsList[i2].latitude === void 0));
|
|
239445
239803
|
expose({
|
|
239446
239804
|
openCard: handleOpenCard,
|
|
239447
|
-
closeCard:
|
|
239448
|
-
|
|
239805
|
+
closeCard: handleOpenClose,
|
|
239806
|
+
setFormData,
|
|
239807
|
+
addGltfOr3dTilesModelList,
|
|
239449
239808
|
DragCardRef,
|
|
239450
|
-
|
|
239451
|
-
|
|
239809
|
+
changeFormData,
|
|
239810
|
+
zoomToModelManagementsAdjustingModelByCad,
|
|
239811
|
+
bimModel,
|
|
239812
|
+
setIsOsgb,
|
|
239813
|
+
getBimAdjust: () => {
|
|
239814
|
+
return bimAdjust.value;
|
|
239815
|
+
},
|
|
239816
|
+
setBIMPointsList,
|
|
239817
|
+
zoomToModelManagementsAdjustingModelByBimPointListByCad,
|
|
239818
|
+
getBimPointsList: () => {
|
|
239819
|
+
return bimPointsList;
|
|
239820
|
+
}
|
|
239452
239821
|
});
|
|
239453
|
-
return {
|
|
239454
|
-
DragCardRef,
|
|
239455
|
-
|
|
239456
|
-
|
|
239457
|
-
modelSelect,
|
|
239458
|
-
modelOptions,
|
|
239459
|
-
handleChangeSelection,
|
|
239460
|
-
handleShow,
|
|
239461
|
-
handleClose,
|
|
239462
|
-
handleChangeMode,
|
|
239463
|
-
cadPointsList,
|
|
239464
|
-
handleSavingByCadCard,
|
|
239465
|
-
handleAdjustingByCadCard,
|
|
239466
|
-
updateCadPointsList,
|
|
239467
|
-
adjustingDisable
|
|
239468
|
-
};
|
|
239469
|
-
},
|
|
239470
|
-
render() {
|
|
239471
|
-
return createVNode$1(DragCard, {
|
|
239472
|
-
"ref": "DragCardRef",
|
|
239473
|
-
"title": "CAD校准",
|
|
239822
|
+
return () => createVNode$1(DragCard, {
|
|
239823
|
+
"ref": DragCardRef,
|
|
239824
|
+
"class": "CadCard",
|
|
239825
|
+
"title": "Cad校准 ",
|
|
239474
239826
|
"resize": true,
|
|
239475
|
-
"
|
|
239476
|
-
|
|
239827
|
+
"onResize": (height2) => {
|
|
239828
|
+
if (height2 == 0 || height2 > 550) {
|
|
239829
|
+
style.height = "100%";
|
|
239830
|
+
} else {
|
|
239831
|
+
style.height = `${height2 - 120}px`;
|
|
239832
|
+
}
|
|
239833
|
+
}
|
|
239477
239834
|
}, {
|
|
239478
239835
|
default: () => {
|
|
239479
239836
|
let _slot;
|
|
239480
239837
|
return createVNode$1("div", {
|
|
239481
|
-
"
|
|
239482
|
-
|
|
239483
|
-
|
|
239484
|
-
|
|
239485
|
-
"class": "cadStandard"
|
|
239486
|
-
}, [createVNode$1(Form, {
|
|
239487
|
-
"name": "nest-messages",
|
|
239838
|
+
"class": "CadCard-Body"
|
|
239839
|
+
}, [createVNode$1("div", null, [createVNode$1(Form, {
|
|
239840
|
+
"style": style,
|
|
239841
|
+
"name": "basic",
|
|
239488
239842
|
"labelCol": {
|
|
239489
|
-
|
|
239490
|
-
textAlign: "start",
|
|
239491
|
-
marginRight: "5px"
|
|
239492
|
-
}
|
|
239843
|
+
span: 8
|
|
239493
239844
|
},
|
|
239494
239845
|
"wrapperCol": {
|
|
239495
|
-
|
|
239496
|
-
|
|
239497
|
-
|
|
239846
|
+
span: 16
|
|
239847
|
+
},
|
|
239848
|
+
"autoComplete": "off",
|
|
239849
|
+
"class": "CadCard-Form panel-form"
|
|
239498
239850
|
}, {
|
|
239499
|
-
default: () => [createVNode$1(
|
|
239500
|
-
"
|
|
239851
|
+
default: () => [createVNode$1(Button$1, {
|
|
239852
|
+
"class": "modelListButton",
|
|
239853
|
+
"block": true,
|
|
239854
|
+
"onClick": () => {
|
|
239855
|
+
tableCollapsed.value = !tableCollapsed.value;
|
|
239856
|
+
document.querySelector(".CadCard").style.width = tableCollapsed.value ? "60%" : "330PX";
|
|
239857
|
+
}
|
|
239858
|
+
}, {
|
|
239859
|
+
default: () => ["Cad列表"]
|
|
239860
|
+
}), createVNode$1(Form.Item, {
|
|
239861
|
+
"name": "showModel",
|
|
239862
|
+
"label": "调整操作"
|
|
239501
239863
|
}, {
|
|
239502
|
-
default: () => [createVNode$1(
|
|
239503
|
-
"value":
|
|
239504
|
-
"onUpdate:value": ($event) =>
|
|
239505
|
-
"
|
|
239506
|
-
"
|
|
239507
|
-
"onChange": this.handleChangeSelection
|
|
239864
|
+
default: () => [createVNode$1(Radio.Group, {
|
|
239865
|
+
"value": bimAdjust.value,
|
|
239866
|
+
"onUpdate:value": ($event) => bimAdjust.value = $event,
|
|
239867
|
+
"options": bimModelAdjustOptions.value,
|
|
239868
|
+
"onChange": toggleBimAdjust
|
|
239508
239869
|
}, null)]
|
|
239509
|
-
}), createVNode$1(
|
|
239510
|
-
"
|
|
239870
|
+
}), createVNode$1(Form.Item, {
|
|
239871
|
+
"name": "showMainModel",
|
|
239872
|
+
"label": "当前主模型"
|
|
239511
239873
|
}, {
|
|
239512
|
-
default: () => [createVNode$1(
|
|
239513
|
-
"
|
|
239514
|
-
|
|
239515
|
-
|
|
239516
|
-
|
|
239517
|
-
|
|
239518
|
-
|
|
239519
|
-
|
|
239520
|
-
|
|
239521
|
-
|
|
239522
|
-
|
|
239523
|
-
|
|
239524
|
-
|
|
239525
|
-
|
|
239526
|
-
|
|
239527
|
-
|
|
239528
|
-
|
|
239529
|
-
|
|
239530
|
-
|
|
239531
|
-
|
|
239532
|
-
|
|
239533
|
-
|
|
239534
|
-
|
|
239535
|
-
|
|
239536
|
-
|
|
239537
|
-
|
|
239538
|
-
|
|
239539
|
-
|
|
239874
|
+
default: () => [createVNode$1("span", {
|
|
239875
|
+
"style": {
|
|
239876
|
+
width: "200px"
|
|
239877
|
+
}
|
|
239878
|
+
}, [modelId2.value.label])]
|
|
239879
|
+
}), bimAdjust.value && createVNode$1("div", null, [createVNode$1(Form.Item, {
|
|
239880
|
+
"name": "showLongitude",
|
|
239881
|
+
"label": "经度(东西)"
|
|
239882
|
+
}, {
|
|
239883
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239884
|
+
"value": formData.longitude,
|
|
239885
|
+
"onUpdate:value": ($event) => formData.longitude = $event,
|
|
239886
|
+
"onChange": handleLongitude,
|
|
239887
|
+
"step": step.value
|
|
239888
|
+
}, null)]
|
|
239889
|
+
}), createVNode$1(Form.Item, {
|
|
239890
|
+
"name": "showLatitude",
|
|
239891
|
+
"label": "纬度(南北)"
|
|
239892
|
+
}, {
|
|
239893
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239894
|
+
"value": formData.latitude,
|
|
239895
|
+
"onUpdate:value": ($event) => formData.latitude = $event,
|
|
239896
|
+
"onChange": handleLatitude,
|
|
239897
|
+
"step": step.value
|
|
239898
|
+
}, null)]
|
|
239899
|
+
}), createVNode$1(Form.Item, {
|
|
239900
|
+
"name": "showDistance",
|
|
239901
|
+
"label": " 经纬增量(°)"
|
|
239902
|
+
}, {
|
|
239903
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239904
|
+
"value": formData.distance,
|
|
239905
|
+
"onUpdate:value": ($event) => formData.distance = $event,
|
|
239906
|
+
"step": step.value
|
|
239907
|
+
}, null)]
|
|
239908
|
+
}), createVNode$1(Form.Item, {
|
|
239909
|
+
"name": "showDistance",
|
|
239910
|
+
"label": "高度步长(m)"
|
|
239911
|
+
}, {
|
|
239912
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239913
|
+
"value": formData.heightDistance,
|
|
239914
|
+
"onUpdate:value": ($event) => formData.heightDistance = $event,
|
|
239915
|
+
"step": step.value
|
|
239916
|
+
}, null)]
|
|
239917
|
+
}), createVNode$1(Form.Item, {
|
|
239918
|
+
"name": "showRotation",
|
|
239919
|
+
"label": "单次旋转(°)"
|
|
239920
|
+
}, {
|
|
239921
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239922
|
+
"value": formData.rotation,
|
|
239923
|
+
"onUpdate:value": ($event) => formData.rotation = $event,
|
|
239924
|
+
"onChange": handleRotation,
|
|
239925
|
+
"step": step.value
|
|
239926
|
+
}, null)]
|
|
239927
|
+
}), createVNode$1(Form.Item, {
|
|
239928
|
+
"name": "showRotation",
|
|
239929
|
+
"label": "累计旋转(°)"
|
|
239930
|
+
}, {
|
|
239931
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239932
|
+
"value": formData.totalRotation,
|
|
239933
|
+
"onUpdate:value": ($event) => formData.totalRotation = $event,
|
|
239934
|
+
"onChange": handleRotation,
|
|
239935
|
+
"step": step.value
|
|
239936
|
+
}, null)]
|
|
239937
|
+
}), createVNode$1(Form.Item, {
|
|
239938
|
+
"name": "showHeight",
|
|
239939
|
+
"label": "高度"
|
|
239940
|
+
}, {
|
|
239941
|
+
default: () => [createVNode$1(InputNumber$1, {
|
|
239942
|
+
"value": formData.height,
|
|
239943
|
+
"onUpdate:value": ($event) => formData.height = $event,
|
|
239944
|
+
"onChange": handleRotation,
|
|
239945
|
+
"step": step.value
|
|
239946
|
+
}, null)]
|
|
239947
|
+
}), createVNode$1(Row, {
|
|
239948
|
+
"gutter": [2, 2]
|
|
239949
|
+
}, _isSlot$1(_slot = colMap.map((item) => createVNode$1(Col, {
|
|
239950
|
+
"span": 8,
|
|
239951
|
+
"key": item.id
|
|
239952
|
+
}, {
|
|
239953
|
+
default: () => [createVNode$1(Button$1, {
|
|
239954
|
+
"class": "col-item_adjustingModelPanel",
|
|
239955
|
+
"onClick": item.fun,
|
|
239956
|
+
"style": item.style
|
|
239957
|
+
}, {
|
|
239958
|
+
default: () => [item.label]
|
|
239540
239959
|
})]
|
|
239541
|
-
})
|
|
239542
|
-
|
|
239960
|
+
}))) ? _slot : {
|
|
239961
|
+
default: () => [_slot]
|
|
239962
|
+
})]), !bimAdjust.value && createVNode$1("div", null, [createVNode$1(Radio.Group, {
|
|
239963
|
+
"value": bimShowType.value,
|
|
239964
|
+
"onUpdate:value": ($event) => bimShowType.value = $event,
|
|
239965
|
+
"style": "margin-top: 10px;",
|
|
239966
|
+
"onChange": () => {
|
|
239967
|
+
emit("handleChangeModeByCadCard", bimShowType.value);
|
|
239968
|
+
},
|
|
239969
|
+
"name": "showTypeRadioGroup"
|
|
239543
239970
|
}, {
|
|
239544
|
-
default: () => [createVNode$1("
|
|
239545
|
-
|
|
239546
|
-
|
|
239547
|
-
|
|
239548
|
-
|
|
239549
|
-
|
|
239550
|
-
|
|
239971
|
+
default: () => [createVNode$1("div", {
|
|
239972
|
+
"style": "display: flex; flex-direction: column; gap: 10px;"
|
|
239973
|
+
}, [Object.entries(bimPointsList).map(([key2, value]) => createVNode$1("div", {
|
|
239974
|
+
"class": "location",
|
|
239975
|
+
"key": key2,
|
|
239976
|
+
"style": "display: flex; align-items: flex-start; "
|
|
239977
|
+
}, [createVNode$1("div", {
|
|
239978
|
+
"class": "radio-location"
|
|
239979
|
+
}, [createVNode$1(Radio, {
|
|
239980
|
+
"value": key2
|
|
239981
|
+
}, {
|
|
239982
|
+
default: () => [value.type, createTextVNode(":")]
|
|
239983
|
+
})]), createVNode$1("div", null, [createVNode$1("div", {
|
|
239984
|
+
"class": "radio-location-text"
|
|
239985
|
+
}, [value.longitudeText, createTextVNode(":"), value.longitude]), createVNode$1("div", {
|
|
239986
|
+
"class": "radio-location-text"
|
|
239987
|
+
}, [value.latitudeText, createTextVNode(":"), value.latitude])])])), createVNode$1(Button$1, {
|
|
239988
|
+
"class": "modelListButton",
|
|
239989
|
+
"onClick": () => {
|
|
239990
|
+
emit("zoomToModelManagementsAdjustingModelByBimPointListByCad");
|
|
239991
|
+
emit("clearBimPointList");
|
|
239992
|
+
Object.entries(bimPointsList).map(([key2, value]) => {
|
|
239993
|
+
value.latitude = void 0;
|
|
239994
|
+
value.longitude = void 0;
|
|
239995
|
+
});
|
|
239996
|
+
},
|
|
239997
|
+
"disabled": adjustingDisable.value
|
|
239998
|
+
}, {
|
|
239999
|
+
default: () => ["调整位置"]
|
|
240000
|
+
}), createVNode$1(Button$1, {
|
|
240001
|
+
"class": "modelListButton",
|
|
240002
|
+
"onClick": () => {
|
|
240003
|
+
emit("handleSavingByCadCard");
|
|
240004
|
+
}
|
|
240005
|
+
}, {
|
|
240006
|
+
default: () => ["保存"]
|
|
240007
|
+
})])]
|
|
240008
|
+
}), createVNode$1("div", {
|
|
240009
|
+
"label": "操作说明",
|
|
240010
|
+
"class": "calibration-instructions"
|
|
240011
|
+
}, [createVNode$1("div", null, [createTextVNode("说明:")]), createVNode$1("ul", {
|
|
240012
|
+
"class": "instructions-list"
|
|
240013
|
+
}, [createVNode$1("li", null, [createTextVNode("请选择 "), createVNode$1("strong", null, [createTextVNode("BIM 标记点")]), createTextVNode(" 与 "), createVNode$1("strong", null, [createTextVNode("地图标记点")]), createTextVNode(",并确保一一对应。")]), createVNode$1("li", null, [createTextVNode("按 "), createVNode$1("strong", null, [createTextVNode("Shift + 左键")]), createTextVNode(" 快速拾取当前经纬度并自动添加标签。")]), createVNode$1("li", null, [createTextVNode("完成两点选择后,点击"), createVNode$1("strong", null, [createTextVNode("“调整位置”")]), createTextVNode("即可执行操作。")])])])])]
|
|
240014
|
+
})]), withDirectives(createVNode$1(Table$1, {
|
|
240015
|
+
"class": "panel-table",
|
|
240016
|
+
"columns": columnsTemp.value,
|
|
240017
|
+
"dataSource": data2.value,
|
|
240018
|
+
"rowSelection": rowSelection,
|
|
240019
|
+
"rowKey": (record) => record.key,
|
|
240020
|
+
"pagination": false,
|
|
240021
|
+
"scroll": {
|
|
240022
|
+
y: 600
|
|
240023
|
+
}
|
|
239551
240024
|
}, {
|
|
239552
|
-
|
|
239553
|
-
|
|
240025
|
+
bodyCell: ({
|
|
240026
|
+
column: column2,
|
|
240027
|
+
record
|
|
240028
|
+
}) => {
|
|
240029
|
+
if (column2.dataIndex === "mainModel") {
|
|
240030
|
+
return createVNode$1(Checkbox, {
|
|
240031
|
+
"checked": record.mainModel,
|
|
240032
|
+
"onChange": () => handleChangeMainModel(record)
|
|
240033
|
+
}, null);
|
|
240034
|
+
}
|
|
240035
|
+
return null;
|
|
240036
|
+
}
|
|
240037
|
+
}), [[vShow, tableCollapsed.value]])]);
|
|
239554
240038
|
}
|
|
239555
240039
|
});
|
|
239556
240040
|
}
|
|
@@ -283995,7 +284479,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
283995
284479
|
menu.constructionProgressTracking,
|
|
283996
284480
|
menu.fullscreen,
|
|
283997
284481
|
menu.annotation,
|
|
283998
|
-
menu.cadModel,
|
|
284482
|
+
// menu.cadModel,
|
|
283999
284483
|
menu.cadHomeView,
|
|
284000
284484
|
menu.cadLayer
|
|
284001
284485
|
// menu.personPlayer
|
|
@@ -284404,10 +284888,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284404
284888
|
}
|
|
284405
284889
|
break;
|
|
284406
284890
|
case menu.cadHomeView:
|
|
284407
|
-
|
|
284408
|
-
baseViewerManagements.getBaseDxf().flyToCadModel({
|
|
284409
|
-
modelId: modelId2
|
|
284410
|
-
});
|
|
284891
|
+
cadHomeView();
|
|
284411
284892
|
break;
|
|
284412
284893
|
case menu.flat:
|
|
284413
284894
|
if (!menuOpenStatus.flat) {
|
|
@@ -284838,6 +285319,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284838
285319
|
adjustingModel: baseViewerManagements.getBaseZoom().adjustingModel.bind(baseViewerManagements.getBaseZoom())
|
|
284839
285320
|
});
|
|
284840
285321
|
}
|
|
285322
|
+
function zoomToModelManagementsAdjustingModelByCad() {
|
|
285323
|
+
cadCardRef.value.zoomToModelManagementsAdjustingModelByCad({
|
|
285324
|
+
modelList: baseViewerManagements.getBaseDxf().getDxfModels(),
|
|
285325
|
+
modelId: baseViewerManagements.getBaseDxf().getModelId(),
|
|
285326
|
+
adjustingModel: baseViewerManagements.getBaseZoom().adjustingModelByCad.bind(baseViewerManagements.getBaseZoom())
|
|
285327
|
+
});
|
|
285328
|
+
}
|
|
285329
|
+
function zoomToModelManagementsAdjustingModelByBimPointListByCad() {
|
|
285330
|
+
cadCardRef.value.zoomToModelManagementsAdjustingModelByBimPointListByCad({
|
|
285331
|
+
modelList: baseViewerManagements.getBaseDxf().getDxfModels(),
|
|
285332
|
+
modelId: baseViewerManagements.getBaseDxf().getModelId(),
|
|
285333
|
+
adjustingModel: baseViewerManagements.getBaseZoom().adjustingModelByCad.bind(baseViewerManagements.getBaseZoom())
|
|
285334
|
+
});
|
|
285335
|
+
cesiumMethods.setEntityList([]);
|
|
285336
|
+
}
|
|
284841
285337
|
function zoomToModelManagementsAdjustingModelByBimPointList() {
|
|
284842
285338
|
adjustingModelPanelCardRef.value.zoomToModelManagementsAdjustingModelByBimPointList({
|
|
284843
285339
|
modelList: baseViewerManagements.getModelList(),
|
|
@@ -284849,11 +285345,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284849
285345
|
methodsOption.value.saveRegion(baseViewerManagements.getModelList());
|
|
284850
285346
|
}
|
|
284851
285347
|
function savingByCadCard() {
|
|
285348
|
+
const modelId2 = baseViewerManagements.getBaseDxf().getModelId();
|
|
285349
|
+
const tileset = getDxfModels({
|
|
285350
|
+
modelId: baseViewerManagements.getBaseDxf().getModelId()
|
|
285351
|
+
});
|
|
285352
|
+
const dxfModel2 = {
|
|
285353
|
+
formData: tileset.formData,
|
|
285354
|
+
dbName: tileset.dbName,
|
|
285355
|
+
modelId: modelId2,
|
|
285356
|
+
modelName: tileset.modelName,
|
|
285357
|
+
outPutPath: tileset.outPutPath
|
|
285358
|
+
};
|
|
284852
285359
|
methodsOption.value.saveCadCalibration({
|
|
284853
|
-
|
|
284854
|
-
dxfModel: getDxfModels({
|
|
284855
|
-
modelId: baseViewerManagements.getBaseDxfParse().getModelId()
|
|
284856
|
-
})
|
|
285360
|
+
...dxfModel2
|
|
284857
285361
|
});
|
|
284858
285362
|
}
|
|
284859
285363
|
async function handleAdjustingByCadCard() {
|
|
@@ -284916,8 +285420,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284916
285420
|
modelId: modelId2
|
|
284917
285421
|
});
|
|
284918
285422
|
}
|
|
285423
|
+
function cadHomeView() {
|
|
285424
|
+
if (baseViewerManagements) {
|
|
285425
|
+
const modelId2 = baseViewerManagements.getBaseDxf().getModelId();
|
|
285426
|
+
baseViewerManagements.getBaseDxf().flyToCadModel({
|
|
285427
|
+
modelId: modelId2
|
|
285428
|
+
});
|
|
285429
|
+
}
|
|
285430
|
+
}
|
|
284919
285431
|
function handleChangeModeByCadCard(type4) {
|
|
284920
|
-
baseViewerManagements.getBaseDxf().setPointMode(type4);
|
|
284921
285432
|
}
|
|
284922
285433
|
function handleUpdateCadPointsList(cadPointsList) {
|
|
284923
285434
|
baseViewerManagements.getBaseDxf().setCadPointsList(cadPointsList);
|
|
@@ -285489,14 +286000,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285489
286000
|
tiandituOption.value.mapStyle = options2.tiandituOption.mapStyle;
|
|
285490
286001
|
}
|
|
285491
286002
|
function toggleCadCard(flag) {
|
|
286003
|
+
var _a2;
|
|
285492
286004
|
menuOpenStatus.cadModel = !flag;
|
|
285493
286005
|
if (!menuOpenStatus.cadModel) {
|
|
285494
286006
|
menuOpenStatus.cadModel = true;
|
|
285495
|
-
|
|
285496
|
-
|
|
286007
|
+
const modelList = baseViewerManagements.getBaseDxf().getDxfModelsList();
|
|
286008
|
+
const _model = modelList.find((item) => item.modelId === baseViewerManagements.getBaseDxf().getModelId());
|
|
286009
|
+
cadCardRef.value.setFormData(_model == null ? void 0 : _model.formData);
|
|
286010
|
+
cadCardRef.value.addGltfOr3dTilesModelList(modelList);
|
|
286011
|
+
(_a2 = cadCardRef.value) == null ? void 0 : _a2.openCard();
|
|
285497
286012
|
} else {
|
|
285498
286013
|
menuOpenStatus.cadModel = false;
|
|
285499
|
-
cadCardRef.value.
|
|
286014
|
+
cadCardRef.value.closeCard();
|
|
285500
286015
|
}
|
|
285501
286016
|
}
|
|
285502
286017
|
function toggleadjustingModelPanel(flag) {
|
|
@@ -285697,18 +286212,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285697
286212
|
height: height2
|
|
285698
286213
|
}) => {
|
|
285699
286214
|
if (menuOpenStatus.cadModel) {
|
|
285700
|
-
|
|
285701
|
-
baseViewerManagements.getBaseDxfParse().setCadPoints({
|
|
285702
|
-
pointMode,
|
|
285703
|
-
longitude,
|
|
285704
|
-
latitude
|
|
285705
|
-
});
|
|
285706
|
-
cadCardRef.value.setCadPointsList({
|
|
285707
|
-
pointMode,
|
|
286215
|
+
cadCardRef.value.setBIMPointsList({
|
|
285708
286216
|
longitude,
|
|
285709
|
-
latitude
|
|
286217
|
+
latitude,
|
|
286218
|
+
height: height2
|
|
285710
286219
|
});
|
|
285711
|
-
|
|
286220
|
+
setEntityListByCardByCad();
|
|
285712
286221
|
}
|
|
285713
286222
|
if (menuOpenStatus.adjustingModelPanel && !adjustingModelPanelCardRef.value.getBimAdjust()) {
|
|
285714
286223
|
adjustingModelPanelCardRef.value.setBIMPointsList({
|
|
@@ -285797,6 +286306,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285797
286306
|
});
|
|
285798
286307
|
cesiumMethods.setEntityList(entityList2);
|
|
285799
286308
|
};
|
|
286309
|
+
const setEntityListByCardByCad = () => {
|
|
286310
|
+
const bimPointsList = cadCardRef.value.getBimPointsList();
|
|
286311
|
+
const entityList2 = Object.keys(bimPointsList).filter((key2) => bimPointsList[key2].longitude != void 0 && bimPointsList[key2].latitude != void 0).map((key2) => {
|
|
286312
|
+
return {
|
|
286313
|
+
id: key2,
|
|
286314
|
+
billboard: [{
|
|
286315
|
+
theme: "Tag9999",
|
|
286316
|
+
position: [bimPointsList[key2].longitude, bimPointsList[key2].latitude, 0],
|
|
286317
|
+
options: {
|
|
286318
|
+
text: bimPointsList[key2].type
|
|
286319
|
+
}
|
|
286320
|
+
}]
|
|
286321
|
+
};
|
|
286322
|
+
});
|
|
286323
|
+
cesiumMethods.setEntityList(entityList2);
|
|
286324
|
+
};
|
|
285800
286325
|
const rootRef = ref();
|
|
285801
286326
|
const viewerId = ref(typeof crypto !== "undefined" && crypto.randomUUID ? "vc-" + crypto.randomUUID() : "vc-" + Date.now() + "-" + Math.floor(Math.random() * 1e6));
|
|
285802
286327
|
let resizeObserver2 = null;
|
|
@@ -285965,9 +286490,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285965
286490
|
"onHandleUpdateCadPointsList": handleUpdateCadPointsList,
|
|
285966
286491
|
"onHandleOpenCardByCadCard": handleOpenCardByCadCard,
|
|
285967
286492
|
"onHandleCloseCardByCadCard": handleCloseCardByCadCard,
|
|
286493
|
+
"onZoomToModelManagementsAdjustingModelByCad": zoomToModelManagementsAdjustingModelByCad,
|
|
285968
286494
|
"onCloseCard": () => {
|
|
285969
286495
|
menuOpenStatus.cadModel = false;
|
|
285970
|
-
}
|
|
286496
|
+
},
|
|
286497
|
+
"onZoomToModelManagementsAdjustingModelByBimPointListByCad": zoomToModelManagementsAdjustingModelByBimPointListByCad,
|
|
286498
|
+
"onCadHomeView": cadHomeView
|
|
285971
286499
|
}, null), createVNode$1(_sfc_main$k, {
|
|
285972
286500
|
"ref": cadLayerCardRef,
|
|
285973
286501
|
"onHandleChangeSelectionByCadCard": handleChangeSelectionByCadCard,
|
|
@@ -286056,7 +286584,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
286056
286584
|
});
|
|
286057
286585
|
}
|
|
286058
286586
|
});
|
|
286059
|
-
const BaseCxBImGis = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
286587
|
+
const BaseCxBImGis = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ce3da308"]]);
|
|
286060
286588
|
function useCesium(options2) {
|
|
286061
286589
|
const CesiumRef = ref(null);
|
|
286062
286590
|
function register4(instance2) {
|