@kq_npm/client3d_webgl_vue 4.5.37 → 4.5.38
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/adddata/index.js +9 -16
- package/boxclip/index.js +30 -13
- package/clientPrint/index.js +294 -140
- package/geologicalbodyanalysis/index.js +25 -4
- package/index.js +289 -135
- package/measure/index.js +3 -2
- package/modelfilter/index.js +29 -9
- package/modelselect/index.js +31 -8
- package/package.json +1 -1
- package/planeclip/index.js +30 -12
- package/sceneapp/index.js +293 -139
- package/sceneview/index.js +293 -139
- package/windyslicing/index.js +3 -1
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("
|
|
3
|
+
module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/const-image", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/_utils/gis-utils", "
|
|
5
|
+
define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/const-image", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue", "@kq_npm/client_common_vue/_lang/index.js", "@kq_npm/client_common_vue/_mixin/render", "@kq_npm/client_common_vue/_utils/dictionaries", "@kq_npm/client3d_webgl_vue"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("
|
|
7
|
+
exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
|
|
8
8
|
else
|
|
9
|
-
root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/mitt"], root["@kq_npm/client_common_vue/_utils/const-image"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["
|
|
10
|
-
})(this, function(__WEBPACK_EXTERNAL_MODULE__895__, __WEBPACK_EXTERNAL_MODULE__905__, __WEBPACK_EXTERNAL_MODULE__277__, __WEBPACK_EXTERNAL_MODULE__997__, __WEBPACK_EXTERNAL_MODULE__217__, __WEBPACK_EXTERNAL_MODULE__458__, __WEBPACK_EXTERNAL_MODULE__536__, __WEBPACK_EXTERNAL_MODULE__135__,
|
|
9
|
+
root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/mitt"], root["@kq_npm/client_common_vue/_utils/const-image"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue"], root["@kq_npm/client_common_vue/_lang/index.js"], root["@kq_npm/client_common_vue/_mixin/render"], root["@kq_npm/client_common_vue/_utils/dictionaries"], root["@kq_npm/client3d_webgl_vue"]);
|
|
10
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE__895__, __WEBPACK_EXTERNAL_MODULE__905__, __WEBPACK_EXTERNAL_MODULE__277__, __WEBPACK_EXTERNAL_MODULE__997__, __WEBPACK_EXTERNAL_MODULE__217__, __WEBPACK_EXTERNAL_MODULE__458__, __WEBPACK_EXTERNAL_MODULE__536__, __WEBPACK_EXTERNAL_MODULE__135__, __WEBPACK_EXTERNAL_MODULE__64__, __WEBPACK_EXTERNAL_MODULE__775__, __WEBPACK_EXTERNAL_MODULE__678__, __WEBPACK_EXTERNAL_MODULE__569__, __WEBPACK_EXTERNAL_MODULE__459__) {
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -1026,22 +1026,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__997__;
|
|
|
1026
1026
|
"use strict";
|
|
1027
1027
|
module.exports = __WEBPACK_EXTERNAL_MODULE__895__;
|
|
1028
1028
|
|
|
1029
|
-
/***/ }),
|
|
1030
|
-
|
|
1031
|
-
/***/ 838:
|
|
1032
|
-
/***/ (function(module) {
|
|
1033
|
-
|
|
1034
|
-
"use strict";
|
|
1035
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__838__;
|
|
1036
|
-
|
|
1037
|
-
/***/ }),
|
|
1038
|
-
|
|
1039
|
-
/***/ 747:
|
|
1040
|
-
/***/ (function(module) {
|
|
1041
|
-
|
|
1042
|
-
"use strict";
|
|
1043
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__747__;
|
|
1044
|
-
|
|
1045
1029
|
/***/ })
|
|
1046
1030
|
|
|
1047
1031
|
/******/ });
|
|
@@ -1525,7 +1509,7 @@ class DrawManager {
|
|
|
1525
1509
|
}
|
|
1526
1510
|
|
|
1527
1511
|
//开始绘制
|
|
1528
|
-
startDraw(type, style, callback, groupName, isMulti=false) {
|
|
1512
|
+
startDraw(type, style, callback, groupName, isMulti = false) {
|
|
1529
1513
|
// 开始绘制之前停止编辑和关闭样式设置框
|
|
1530
1514
|
if (this._drawHandler.editHandler.shapeObject) {
|
|
1531
1515
|
this._drawHandler.startEdit(null);
|
|
@@ -1547,7 +1531,7 @@ class DrawManager {
|
|
|
1547
1531
|
this._viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
1548
1532
|
}
|
|
1549
1533
|
var unionOptions = { ...this._drawStyle[type] };
|
|
1550
|
-
if(type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
|
|
1534
|
+
if (type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
|
|
1551
1535
|
for (const key in unionOptions) {
|
|
1552
1536
|
if (Object.hasOwnProperty.call(options, key)) {
|
|
1553
1537
|
unionOptions[key] = options[key];
|
|
@@ -1593,16 +1577,16 @@ class DrawManager {
|
|
|
1593
1577
|
var feature = that.shapeToGeoFeature(shape);
|
|
1594
1578
|
callback(feature.geometry, { layer: shape.guid });
|
|
1595
1579
|
}
|
|
1596
|
-
if(that.removeEventListener)that.removeEventListener();
|
|
1580
|
+
if (that.removeEventListener) that.removeEventListener();
|
|
1597
1581
|
that.removeEventListener = null;
|
|
1598
|
-
if(isMulti) {
|
|
1582
|
+
if (isMulti) {
|
|
1599
1583
|
that.startDraw(type, style, callback, groupName, isMulti);
|
|
1600
1584
|
}
|
|
1601
1585
|
});
|
|
1602
1586
|
}
|
|
1603
1587
|
|
|
1604
1588
|
stopDraw() {
|
|
1605
|
-
if(this.removeEventListener) {
|
|
1589
|
+
if (this.removeEventListener) {
|
|
1606
1590
|
this.removeEventListener();
|
|
1607
1591
|
this.removeEventListener = null;
|
|
1608
1592
|
}
|
|
@@ -1725,7 +1709,7 @@ class DrawManager {
|
|
|
1725
1709
|
}
|
|
1726
1710
|
|
|
1727
1711
|
//通过geojson进行绘制,支持定位和闪烁
|
|
1728
|
-
drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing=false) {
|
|
1712
|
+
drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing = false) {
|
|
1729
1713
|
if (!geojsonStyle) geojsonStyle = {};
|
|
1730
1714
|
let style = JSON.parse(JSON.stringify(this._geojsonStyle));
|
|
1731
1715
|
for (var type in geojsonStyle) {
|
|
@@ -1765,6 +1749,7 @@ class DrawManager {
|
|
|
1765
1749
|
style.point.color = style.point.material;
|
|
1766
1750
|
delete style.billboard;
|
|
1767
1751
|
}
|
|
1752
|
+
|
|
1768
1753
|
this._viewer.scene.globe.depthTestAgainstTerrain = false;
|
|
1769
1754
|
let geojsonDs = this._viewer.dataSources.getByName(idCustom);
|
|
1770
1755
|
if (geojsonDs.length === 0) {
|
|
@@ -1800,11 +1785,11 @@ class DrawManager {
|
|
|
1800
1785
|
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
1801
1786
|
that._viewer.flyTo(ds, { duration: 1.5, offset });
|
|
1802
1787
|
}
|
|
1803
|
-
if(flashing) {
|
|
1788
|
+
if (flashing) {
|
|
1804
1789
|
// 闪烁效果
|
|
1805
1790
|
let count = 0;
|
|
1806
1791
|
let interval = setInterval(() => {
|
|
1807
|
-
if(ds._destroyed) {
|
|
1792
|
+
if (ds._destroyed) {
|
|
1808
1793
|
clearInterval(interval);
|
|
1809
1794
|
return;
|
|
1810
1795
|
}
|
|
@@ -1826,12 +1811,10 @@ class DrawManager {
|
|
|
1826
1811
|
|
|
1827
1812
|
//删除指定绘图分组的所有图形
|
|
1828
1813
|
removeGeojsonByIdCustom(idCustom) {
|
|
1814
|
+
if (idCustom === "draw") this.clear();
|
|
1829
1815
|
let dsList = this._viewer.dataSources.getByName(idCustom);
|
|
1830
1816
|
|
|
1831
|
-
if (dsList.length <= 0)
|
|
1832
|
-
this.clear();
|
|
1833
|
-
return;
|
|
1834
|
-
}
|
|
1817
|
+
if (dsList.length <= 0) return;
|
|
1835
1818
|
for (let i = 0; i < dsList.length; i++) {
|
|
1836
1819
|
this._viewer.dataSources.remove(dsList[i], true);
|
|
1837
1820
|
}
|
|
@@ -1839,7 +1822,6 @@ class DrawManager {
|
|
|
1839
1822
|
if (index > -1) {
|
|
1840
1823
|
this._layerGroup.splice(index, 1);
|
|
1841
1824
|
}
|
|
1842
|
-
if(idCustom === 'draw') this.clear();
|
|
1843
1825
|
}
|
|
1844
1826
|
|
|
1845
1827
|
getGeometry(idCustom) {
|
|
@@ -2067,8 +2049,8 @@ class DrawManager {
|
|
|
2067
2049
|
const layer = layerList[i];
|
|
2068
2050
|
const name = layer.name || "";
|
|
2069
2051
|
const info = this.getShapeInfo(layer.guid);
|
|
2070
|
-
|
|
2071
|
-
items.push({ name: name, info: info, shape: layer.shape });
|
|
2052
|
+
// edited by ly
|
|
2053
|
+
items.push({ name: name, info: info, shape: layer.shape, guid: layer.guid });
|
|
2072
2054
|
}
|
|
2073
2055
|
|
|
2074
2056
|
return JSON.stringify(items);
|
|
@@ -2252,7 +2234,7 @@ class DrawManager {
|
|
|
2252
2234
|
let shape = this._drawLayer.getById(id);
|
|
2253
2235
|
if (shape) {
|
|
2254
2236
|
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
2255
|
-
if(shape.type ===
|
|
2237
|
+
if (shape.type === "marker" || shape.type === "text") {
|
|
2256
2238
|
let boundingSphere = new Cesium.BoundingSphere(shape.position, 50000);
|
|
2257
2239
|
this._viewer.camera.flyToBoundingSphere(boundingSphere, { duration: 1.5, offset });
|
|
2258
2240
|
} else {
|
|
@@ -2396,29 +2378,55 @@ class DrawManager {
|
|
|
2396
2378
|
}
|
|
2397
2379
|
}
|
|
2398
2380
|
}
|
|
2381
|
+
setLabelList(v, g) {
|
|
2382
|
+
this._labelInfo = {
|
|
2383
|
+
labelList: v,
|
|
2384
|
+
groupName: g
|
|
2385
|
+
};
|
|
2386
|
+
}
|
|
2399
2387
|
|
|
2400
2388
|
/********** 地理编码通用组件使用 start ************/
|
|
2401
2389
|
// 绘制点图标自带点击弹出气泡, 地理编码通用组件使用
|
|
2402
|
-
drawPointWithPoup(data, idCustom = "geocode") {
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2390
|
+
drawPointWithPoup(data, showPoup = false, idCustom = "geocode", isLocation = true) {
|
|
2391
|
+
const that = this;
|
|
2392
|
+
let scene = this._viewer.scene;
|
|
2393
|
+
if (showPoup) {
|
|
2394
|
+
if (!this.geocodeSelected) {
|
|
2395
|
+
this.geocodeSelected = [];
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
if (!this._handler) {
|
|
2399
|
+
// 注册点击事件
|
|
2400
|
+
let scene = this._viewer.scene;
|
|
2401
|
+
this._handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
|
2402
|
+
// let that = this;
|
|
2403
|
+
this._handler.setInputAction(function (movement) {
|
|
2404
|
+
var pickedObject = scene.pick(movement.position);
|
|
2405
|
+
if (pickedObject && pickedObject.id && pickedObject.id instanceof Cesium.Entity) {
|
|
2406
|
+
let entity = pickedObject.id;
|
|
2407
|
+
that.createPointPoup(entity);
|
|
2408
|
+
}
|
|
2409
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
2410
|
+
this._handler.setInputAction(function (movement) {
|
|
2411
|
+
// that.closePointPoup();
|
|
2412
|
+
that.openPointPoup("1002", "AAA");
|
|
2413
|
+
// that.removePointAll();
|
|
2414
|
+
//that.clearPointByIdCustom();
|
|
2415
|
+
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
2416
|
+
this._handler.setInputAction(function (movement) {
|
|
2417
|
+
const pickedObject = scene.pick(movement.endPosition);
|
|
2418
|
+
if (Cesium.defined(pickedObject) && pickedObject.id && pickedObject.id instanceof Cesium.Entity) {
|
|
2419
|
+
that.geocodeSelected = [pickedObject.id];
|
|
2420
|
+
pickedObject.id.billboard.image = pickedObject.id.properties.image1;
|
|
2421
|
+
} else {
|
|
2422
|
+
if (that.geocodeSelected && that.geocodeSelected.length > 0) {
|
|
2423
|
+
that.geocodeSelected[0].billboard.image = that.geocodeSelected[0].properties.image;
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2427
|
+
}
|
|
2421
2428
|
}
|
|
2429
|
+
|
|
2422
2430
|
let pointDs = this._viewer.dataSources.getByName(idCustom);
|
|
2423
2431
|
if (pointDs.length === 0) {
|
|
2424
2432
|
pointDs = new Cesium.CustomDataSource(idCustom);
|
|
@@ -2427,28 +2435,52 @@ class DrawManager {
|
|
|
2427
2435
|
} else {
|
|
2428
2436
|
pointDs = pointDs[0];
|
|
2429
2437
|
}
|
|
2430
|
-
let position = Cesium.Cartesian3.fromDegrees(data.
|
|
2438
|
+
let position = Cesium.Cartesian3.fromDegrees(data.lon, data.lat);
|
|
2431
2439
|
pointDs.entities.add({
|
|
2432
2440
|
position: position,
|
|
2433
2441
|
billboard: {
|
|
2434
2442
|
image: data.image,
|
|
2443
|
+
image1: data.image1,
|
|
2435
2444
|
width: data.width,
|
|
2436
2445
|
height: data.height,
|
|
2437
2446
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2447
|
+
},
|
|
2448
|
+
properties: data
|
|
2440
2449
|
});
|
|
2450
|
+
// 是否定位
|
|
2451
|
+
if (isLocation) {
|
|
2452
|
+
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
2453
|
+
that._viewer.flyTo(pointDs, { duration: 1.5, offset });
|
|
2454
|
+
}
|
|
2441
2455
|
}
|
|
2442
2456
|
|
|
2443
2457
|
// 通过entity创建关联气泡
|
|
2444
2458
|
createPointPoup(entity) {
|
|
2445
2459
|
if (this._htmlTag) this._htmlTag.destroy();
|
|
2460
|
+
const id = entity.properties.id._value;
|
|
2461
|
+
const comp = id.component;
|
|
2462
|
+
|
|
2463
|
+
let popHtml = `<div class='kq-label-popup' style='background-color:var(--kq-bg-color); border-radius: 8px; padding: 10px;'>
|
|
2464
|
+
<div id='tag_vue_${id.id}'></div>
|
|
2465
|
+
<span class='triangle' ></span>
|
|
2466
|
+
<a class='close' style='color: #757575' href="javascript:void(0)" onclick="document.getElementsByClassName('kq-label-popup')[0].style.display='none';"><span>×</span></a>
|
|
2467
|
+
</div>`;
|
|
2446
2468
|
this._htmlTag = new Cesium.Kq3dHtmlTag(this._viewer, {
|
|
2447
|
-
html: "<div>" + entity.properties.id._value + "</div>",
|
|
2469
|
+
// html: "<div>" + entity.properties.id._value + "</div>",
|
|
2470
|
+
html: popHtml,
|
|
2448
2471
|
position: entity.position,
|
|
2449
|
-
anchor: [0, -entity.properties.height._value],
|
|
2450
|
-
alignmentMode: 7
|
|
2472
|
+
anchor: [0, -entity.properties.height._value - 4],
|
|
2473
|
+
alignmentMode: 7,
|
|
2474
|
+
noEvent: false
|
|
2451
2475
|
});
|
|
2476
|
+
if (comp) {
|
|
2477
|
+
const pop = id.createVNode(id.component, id.componentProps);
|
|
2478
|
+
// 传入外部vue的appContext到createVNode创建的vue组件对象中
|
|
2479
|
+
if (id.appContext) pop.appContext = id.appContext;
|
|
2480
|
+
setTimeout(() => {
|
|
2481
|
+
id.render(pop, document.getElementById("tag_vue_" + id.id));
|
|
2482
|
+
}, 0);
|
|
2483
|
+
}
|
|
2452
2484
|
}
|
|
2453
2485
|
|
|
2454
2486
|
// 通过id打开地理编码图标气泡
|
|
@@ -4203,7 +4235,8 @@ class LayerManager {
|
|
|
4203
4235
|
let that = this;
|
|
4204
4236
|
this._layerListData.forEach(layer => {
|
|
4205
4237
|
if (layer.visible) {
|
|
4206
|
-
layers_checked.push(layer);
|
|
4238
|
+
// layers_checked.push(layer);
|
|
4239
|
+
layers_checked.unshift(layer);
|
|
4207
4240
|
}
|
|
4208
4241
|
}, this);
|
|
4209
4242
|
const layers_old = this._layerListData_old;
|
|
@@ -6094,9 +6127,9 @@ Compass.install = (Vue, opts) => {
|
|
|
6094
6127
|
};
|
|
6095
6128
|
|
|
6096
6129
|
|
|
6097
|
-
|
|
6098
|
-
var
|
|
6099
|
-
var
|
|
6130
|
+
;// CONCATENATED MODULE: external "html2canvas-pro"
|
|
6131
|
+
var external_html2canvas_pro_namespaceObject = require("html2canvas-pro");
|
|
6132
|
+
var external_html2canvas_pro_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_pro_namespaceObject);
|
|
6100
6133
|
// EXTERNAL MODULE: ./public/libs/kqwebclient/leaflet/3rd-libs/vue3-print-nb/vue3-print-nb.umd.js
|
|
6101
6134
|
var vue3_print_nb_umd = __webpack_require__(347);
|
|
6102
6135
|
var vue3_print_nb_umd_default = /*#__PURE__*/__webpack_require__.n(vue3_print_nb_umd);
|
|
@@ -7067,7 +7100,7 @@ function getPic() {
|
|
|
7067
7100
|
loadState.value = true;
|
|
7068
7101
|
// 延时1000ms,等待图片读入到blob文件对象,然后使用URL.createObjectURL转换成src可用的地址
|
|
7069
7102
|
setTimeout(() => {
|
|
7070
|
-
|
|
7103
|
+
external_html2canvas_pro_default()(printMap.value, {
|
|
7071
7104
|
taintTest: true, // 检测每张图片都已经加载完成
|
|
7072
7105
|
logging: true, // 启用日志记录以进行调试 (发现加上对去白边有帮助)
|
|
7073
7106
|
allowTaint: true, // 否允许跨源图像污染画布
|
|
@@ -10154,7 +10187,8 @@ return (_ctx, _cache) => {
|
|
|
10154
10187
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", Measurevue_type_script_setup_true_lang_js_hoisted_4, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).mode), 1 /* TEXT */),
|
|
10155
10188
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_select, {
|
|
10156
10189
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(mode),
|
|
10157
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? (mode).value = $event : mode = $event))
|
|
10190
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? (mode).value = $event : mode = $event)),
|
|
10191
|
+
disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive)
|
|
10158
10192
|
}, {
|
|
10159
10193
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
|
|
10160
10194
|
((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(modeList), (item) => {
|
|
@@ -10166,7 +10200,7 @@ return (_ctx, _cache) => {
|
|
|
10166
10200
|
}), 128 /* KEYED_FRAGMENT */))
|
|
10167
10201
|
]),
|
|
10168
10202
|
_: 1 /* STABLE */
|
|
10169
|
-
}, 8 /* PROPS */, ["modelValue"])
|
|
10203
|
+
}, 8 /* PROPS */, ["modelValue", "disabled"])
|
|
10170
10204
|
])
|
|
10171
10205
|
]),
|
|
10172
10206
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", Measurevue_type_script_setup_true_lang_js_hoisted_5, [
|
|
@@ -12262,6 +12296,9 @@ class ModelSelectViewModel {
|
|
|
12262
12296
|
_modeFiledArray = null; // 模型属性唯一值字段集合
|
|
12263
12297
|
_modeFiled = "id"; // 模型属性匹配字段
|
|
12264
12298
|
_language = {};
|
|
12299
|
+
selectedKey = null;
|
|
12300
|
+
oldColor = null;
|
|
12301
|
+
selectedFeature = null;
|
|
12265
12302
|
constructor(scenceView, pickCallFunc) {
|
|
12266
12303
|
this._language = scenceView._language;
|
|
12267
12304
|
this._viewer = scenceView._viewer;
|
|
@@ -12290,15 +12327,30 @@ class ModelSelectViewModel {
|
|
|
12290
12327
|
})
|
|
12291
12328
|
}
|
|
12292
12329
|
if (properties.indexOf(that._modeFiled) > -1) {
|
|
12293
|
-
let id = pickedObject.getProperty(that._modeFiled);
|
|
12330
|
+
// let id = pickedObject.getProperty(that._modeFiled);
|
|
12331
|
+
var newKey = pickedObject ? pickedObject.getProperty(that._modeFiled) : null;
|
|
12332
|
+
if (newKey != that.selectedKey) {
|
|
12333
|
+
if (that.selectedFeature) {
|
|
12334
|
+
that.selectedFeature.color = that.oldColor;
|
|
12335
|
+
that.selectedFeature = null;
|
|
12336
|
+
that.selectedKey = null;
|
|
12337
|
+
}
|
|
12338
|
+
|
|
12339
|
+
if (newKey != null) {
|
|
12340
|
+
that.selectedKey = newKey;
|
|
12341
|
+
that.selectedFeature = pickedObject;
|
|
12342
|
+
that.oldColor = that.selectedFeature.color;
|
|
12343
|
+
that.selectedFeature.color = Cesium.Color.fromCssColorString(that._highlightColor);
|
|
12344
|
+
}
|
|
12345
|
+
}
|
|
12294
12346
|
// that.clear();
|
|
12295
|
-
that._highlight = new Cesium.Kq3dHighlight({
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
});
|
|
12347
|
+
// that._highlight = new Cesium.Kq3dHighlight({
|
|
12348
|
+
// viewer: that._viewer,
|
|
12349
|
+
// tileset: pickedObject.tileset,
|
|
12350
|
+
// attrName: that._modeFiled,
|
|
12351
|
+
// attrValue: [id],
|
|
12352
|
+
// color: [Cesium.Color.fromCssColorString(that._highlightColor)]
|
|
12353
|
+
// });
|
|
12302
12354
|
let attrs = {};
|
|
12303
12355
|
properties.forEach(prop => {
|
|
12304
12356
|
attrs[prop] = pickedObject.getProperty(prop);
|
|
@@ -12351,6 +12403,11 @@ class ModelSelectViewModel {
|
|
|
12351
12403
|
this._highlight = null;
|
|
12352
12404
|
this.setCursor("default");
|
|
12353
12405
|
this._isPick = false;
|
|
12406
|
+
if (this.selectedFeature) {
|
|
12407
|
+
this.selectedFeature.color = this.oldColor;
|
|
12408
|
+
this.selectedFeature = null;
|
|
12409
|
+
this.selectedKey = null;
|
|
12410
|
+
}
|
|
12354
12411
|
}
|
|
12355
12412
|
|
|
12356
12413
|
//销毁
|
|
@@ -12677,12 +12734,13 @@ ModelSelect.install = (Vue, opts) => {
|
|
|
12677
12734
|
|
|
12678
12735
|
|
|
12679
12736
|
;// CONCATENATED MODULE: ./src/webgl/modelfilter/ModelFilterViewModel.js
|
|
12680
|
-
/*
|
|
12681
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
12682
|
-
* All rights reserved.
|
|
12683
|
-
*/
|
|
12737
|
+
/*
|
|
12738
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
12739
|
+
* All rights reserved.
|
|
12740
|
+
*/
|
|
12684
12741
|
//模型滤镜逻辑类
|
|
12685
12742
|
|
|
12743
|
+
|
|
12686
12744
|
class ModelFilterViewModel {
|
|
12687
12745
|
_viewer = null; //三维viewer对象
|
|
12688
12746
|
_options = {}; //Box裁剪存储参数对象
|
|
@@ -12693,19 +12751,31 @@ class ModelFilterViewModel {
|
|
|
12693
12751
|
saturation:1,
|
|
12694
12752
|
gamma: 1
|
|
12695
12753
|
}
|
|
12696
|
-
|
|
12697
|
-
constructor(scenceView, options) {
|
|
12754
|
+
callbackParams = null;
|
|
12755
|
+
constructor(scenceView, options, callbackParams) {
|
|
12698
12756
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
12699
12757
|
this._viewer = scenceView._viewer;
|
|
12700
12758
|
this._options.viewer = this._viewer;
|
|
12759
|
+
this.callbackParams = callbackParams;
|
|
12760
|
+
// 事件绑定this
|
|
12761
|
+
this._resetListData = this._resetListData.bind(this);
|
|
12762
|
+
// 添加图层数据源变化监听
|
|
12763
|
+
gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
12764
|
+
}
|
|
12765
|
+
_resetListData(e) {
|
|
12766
|
+
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
12767
|
+
if (e.eventTarget && e.eventTarget === this) {
|
|
12768
|
+
return;
|
|
12769
|
+
}
|
|
12770
|
+
this.callbackParams && this.callbackParams("setData")
|
|
12701
12771
|
}
|
|
12702
|
-
|
|
12703
12772
|
// 查找所有3dtiles模型对象
|
|
12704
12773
|
findLayers() {
|
|
12705
12774
|
let tilesets = [];
|
|
12706
12775
|
const primitives = this._viewer.scene.primitives._primitives;
|
|
12707
12776
|
for (let m = 0; m < primitives.length; m++) {
|
|
12708
12777
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
12778
|
+
if(!primitives[m].show) continue;
|
|
12709
12779
|
tilesets.push({
|
|
12710
12780
|
guid: primitives[m].guid,
|
|
12711
12781
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -12766,6 +12836,7 @@ class ModelFilterViewModel {
|
|
|
12766
12836
|
|
|
12767
12837
|
//销毁
|
|
12768
12838
|
destroy() {
|
|
12839
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
12769
12840
|
this.clear();
|
|
12770
12841
|
}
|
|
12771
12842
|
}
|
|
@@ -12903,7 +12974,7 @@ headerTempTitle.value = language.value.modelFilterPick;
|
|
|
12903
12974
|
saturation: formItem.saturation,
|
|
12904
12975
|
gamma: formItem.gamma
|
|
12905
12976
|
};
|
|
12906
|
-
viewModel = new ModelFilterViewModel(scenceView, options);
|
|
12977
|
+
viewModel = new ModelFilterViewModel(scenceView, options, callbackParams);
|
|
12907
12978
|
}
|
|
12908
12979
|
});
|
|
12909
12980
|
setTimeout(() => {
|
|
@@ -12912,7 +12983,13 @@ headerTempTitle.value = language.value.modelFilterPick;
|
|
|
12912
12983
|
}
|
|
12913
12984
|
}, 1000);
|
|
12914
12985
|
});
|
|
12915
|
-
|
|
12986
|
+
function callbackParams (key, val) {
|
|
12987
|
+
if (viewModel) {
|
|
12988
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
12989
|
+
formItem.tileset = "";
|
|
12990
|
+
paramsChanged("tileset");
|
|
12991
|
+
}
|
|
12992
|
+
}
|
|
12916
12993
|
/**
|
|
12917
12994
|
* @description 监听header生成
|
|
12918
12995
|
*/
|
|
@@ -20258,7 +20335,8 @@ class WindySlicingViewModel {
|
|
|
20258
20335
|
attrRange: [ranges[0], ranges[ranges.length - 1]],
|
|
20259
20336
|
varName: this._windySlicingLayerconfig?.params?.varNames,
|
|
20260
20337
|
};
|
|
20261
|
-
|
|
20338
|
+
Object.assign(this._currentVolumeOption, params || {})
|
|
20339
|
+
return new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
|
|
20262
20340
|
}
|
|
20263
20341
|
/**
|
|
20264
20342
|
* 创建线剖切
|
|
@@ -20789,6 +20867,7 @@ function formatTooltip(val) {
|
|
|
20789
20867
|
}
|
|
20790
20868
|
// 销毁
|
|
20791
20869
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
|
|
20870
|
+
global_event_default().off("windyTypeChange", handleWindyTypeChange);
|
|
20792
20871
|
viewModel && viewModel.destroy();
|
|
20793
20872
|
});
|
|
20794
20873
|
|
|
@@ -33177,6 +33256,7 @@ IsolineAnalysis.install = (Vue, opts) => {
|
|
|
33177
33256
|
*/
|
|
33178
33257
|
//Box裁剪逻辑类
|
|
33179
33258
|
|
|
33259
|
+
|
|
33180
33260
|
class BoxClipViewModel {
|
|
33181
33261
|
_viewer = null; //三维viewer对象
|
|
33182
33262
|
_options = {}; //Box裁剪存储参数对象
|
|
@@ -33203,13 +33283,14 @@ class BoxClipViewModel {
|
|
|
33203
33283
|
_drawManager = null; //绘制管理对象
|
|
33204
33284
|
_removeEventListener = null; //绘制完成监听事件
|
|
33205
33285
|
_language = {};
|
|
33206
|
-
|
|
33286
|
+
callbackParams = null;
|
|
33287
|
+
constructor(scenceView, options, callbackParams) {
|
|
33207
33288
|
this._language = scenceView._language;
|
|
33208
33289
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
33209
33290
|
this._viewer = scenceView._viewer;
|
|
33291
|
+
this.callbackParams = callbackParams;
|
|
33210
33292
|
// this._viewer.enabledFXAA = true;
|
|
33211
33293
|
this._options.viewer = this._viewer;
|
|
33212
|
-
|
|
33213
33294
|
this._drawManager = scenceView._drawManager;
|
|
33214
33295
|
let that = this;
|
|
33215
33296
|
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
@@ -33220,14 +33301,25 @@ class BoxClipViewModel {
|
|
|
33220
33301
|
that._drawManager.clear();
|
|
33221
33302
|
}
|
|
33222
33303
|
});
|
|
33304
|
+
// 事件绑定this
|
|
33305
|
+
this._resetListData = this._resetListData.bind(this);
|
|
33306
|
+
// 添加图层数据源变化监听
|
|
33307
|
+
gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
33308
|
+
}
|
|
33309
|
+
_resetListData(e) {
|
|
33310
|
+
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
33311
|
+
if (e.eventTarget && e.eventTarget === this) {
|
|
33312
|
+
return;
|
|
33313
|
+
}
|
|
33314
|
+
this.callbackParams && this.callbackParams("setData")
|
|
33223
33315
|
}
|
|
33224
|
-
|
|
33225
33316
|
// 查找所有3dtiles模型对象
|
|
33226
33317
|
findLayers() {
|
|
33227
33318
|
let tilesets = [];
|
|
33228
33319
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
33229
33320
|
for (let m = 0; m < primitives.length; m++) {
|
|
33230
33321
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
33322
|
+
if(!primitives[m].show) continue;
|
|
33231
33323
|
tilesets.push({
|
|
33232
33324
|
guid: primitives[m].guid,
|
|
33233
33325
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -33252,7 +33344,7 @@ class BoxClipViewModel {
|
|
|
33252
33344
|
var flag = false;
|
|
33253
33345
|
var models = this._options.viewer.scene.primitives._primitives;
|
|
33254
33346
|
for (let i = 0; i < models.length; i++) {
|
|
33255
|
-
if (models[i]._url) {
|
|
33347
|
+
if (models[i]._url && models[i].show) {
|
|
33256
33348
|
flag = true;
|
|
33257
33349
|
}
|
|
33258
33350
|
}
|
|
@@ -33283,6 +33375,7 @@ class BoxClipViewModel {
|
|
|
33283
33375
|
//移除监听事件
|
|
33284
33376
|
this._removeEventListener && this._removeEventListener();
|
|
33285
33377
|
this._removeEventListener = null;
|
|
33378
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
33286
33379
|
}
|
|
33287
33380
|
|
|
33288
33381
|
// 设置裁剪对象
|
|
@@ -33490,20 +33583,23 @@ headerTempTitle.value = language.value.boxClip;
|
|
|
33490
33583
|
axisZ: formItem.clipHeight,
|
|
33491
33584
|
angle: formItem.clipRotation
|
|
33492
33585
|
};
|
|
33493
|
-
viewModel = new BoxClipViewModel(scenceView, options);
|
|
33586
|
+
viewModel = new BoxClipViewModel(scenceView, options, callbackParams);
|
|
33494
33587
|
}
|
|
33495
33588
|
});
|
|
33496
33589
|
setTimeout(() => {
|
|
33497
|
-
|
|
33498
|
-
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
33499
|
-
if (tiles.value.length > 0) {
|
|
33500
|
-
formItem.tileset = tiles.value[0].guid;
|
|
33501
|
-
paramsChanged("tileset");
|
|
33502
|
-
}
|
|
33503
|
-
}
|
|
33590
|
+
callbackParams();
|
|
33504
33591
|
}, 1000);
|
|
33505
33592
|
});
|
|
33506
|
-
|
|
33593
|
+
function callbackParams (key, val) {
|
|
33594
|
+
if (viewModel) {
|
|
33595
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
33596
|
+
formItem.tileset = "";
|
|
33597
|
+
if (tiles.value.length > 0) {
|
|
33598
|
+
formItem.tileset = tiles.value[0].guid;
|
|
33599
|
+
}
|
|
33600
|
+
paramsChanged("tileset");
|
|
33601
|
+
}
|
|
33602
|
+
}
|
|
33507
33603
|
/**
|
|
33508
33604
|
* @description 监听header生成
|
|
33509
33605
|
*/
|
|
@@ -34123,6 +34219,7 @@ BoxClip.install = (Vue, opts) => {
|
|
|
34123
34219
|
*/
|
|
34124
34220
|
//平面裁剪逻辑类
|
|
34125
34221
|
|
|
34222
|
+
|
|
34126
34223
|
class PlaneClipViewModel {
|
|
34127
34224
|
_viewer = null; //三维viewer对象
|
|
34128
34225
|
_options = {}; //平面裁剪存储参数对象
|
|
@@ -34153,13 +34250,15 @@ class PlaneClipViewModel {
|
|
|
34153
34250
|
_drawManager = null; //绘制管理对象
|
|
34154
34251
|
_removeEventListener = null; //绘制完成事件监听
|
|
34155
34252
|
_language = {};
|
|
34156
|
-
|
|
34253
|
+
callbackParams = null;
|
|
34254
|
+
constructor(scenceView, options, callbackParams) {
|
|
34157
34255
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
34158
34256
|
this._viewer = scenceView._viewer;
|
|
34159
34257
|
// this._viewer.enabledFXAA = true;
|
|
34160
34258
|
this._options.viewer = this._viewer;
|
|
34161
34259
|
this._language = scenceView._language;
|
|
34162
34260
|
this._drawManager = scenceView._drawManager;
|
|
34261
|
+
this.callbackParams = callbackParams;
|
|
34163
34262
|
let that = this;
|
|
34164
34263
|
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
34165
34264
|
if (shape) {
|
|
@@ -34169,14 +34268,25 @@ class PlaneClipViewModel {
|
|
|
34169
34268
|
that._drawManager.clear();
|
|
34170
34269
|
}
|
|
34171
34270
|
});
|
|
34271
|
+
// 事件绑定this
|
|
34272
|
+
this._resetListData = this._resetListData.bind(this);
|
|
34273
|
+
// 添加图层数据源变化监听
|
|
34274
|
+
gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
34275
|
+
}
|
|
34276
|
+
_resetListData(e) {
|
|
34277
|
+
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
34278
|
+
if (e.eventTarget && e.eventTarget === this) {
|
|
34279
|
+
return;
|
|
34280
|
+
}
|
|
34281
|
+
this.callbackParams && this.callbackParams("setData")
|
|
34172
34282
|
}
|
|
34173
|
-
|
|
34174
34283
|
// 查找所有3dtiles模型对象
|
|
34175
34284
|
findLayers() {
|
|
34176
34285
|
let tilesets = [];
|
|
34177
34286
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
34178
34287
|
for (let m = 0; m < primitives.length; m++) {
|
|
34179
34288
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
34289
|
+
if(!primitives[m].show) continue;
|
|
34180
34290
|
tilesets.push({
|
|
34181
34291
|
guid: primitives[m].guid,
|
|
34182
34292
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -34201,7 +34311,7 @@ class PlaneClipViewModel {
|
|
|
34201
34311
|
var flag = false;
|
|
34202
34312
|
var models = this._options.viewer.scene.primitives._primitives;
|
|
34203
34313
|
for (let i = 0; i < models.length; i++) {
|
|
34204
|
-
if (models[i]._url) {
|
|
34314
|
+
if (models[i]._url && models[i].show) {
|
|
34205
34315
|
flag = true;
|
|
34206
34316
|
}
|
|
34207
34317
|
}
|
|
@@ -34231,6 +34341,7 @@ class PlaneClipViewModel {
|
|
|
34231
34341
|
//移除监听事件
|
|
34232
34342
|
this._removeEventListener && this._removeEventListener();
|
|
34233
34343
|
this._removeEventListener = null;
|
|
34344
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
34234
34345
|
}
|
|
34235
34346
|
|
|
34236
34347
|
// 设置裁剪对象
|
|
@@ -34411,20 +34522,23 @@ headerTempTitle.value = language.value.planeClip;
|
|
|
34411
34522
|
boxEnable: formItem.boxEnable,
|
|
34412
34523
|
distance: formItem.clipDistance
|
|
34413
34524
|
};
|
|
34414
|
-
viewModel = new PlaneClipViewModel(scenceView, options);
|
|
34525
|
+
viewModel = new PlaneClipViewModel(scenceView, options, callbackParams);
|
|
34415
34526
|
}
|
|
34416
34527
|
});
|
|
34417
34528
|
setTimeout(() => {
|
|
34418
|
-
|
|
34419
|
-
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
34420
|
-
if (tiles.value.length > 0) {
|
|
34421
|
-
formItem.tileset = tiles.value[0].guid;
|
|
34422
|
-
paramsChanged("tileset");
|
|
34423
|
-
}
|
|
34424
|
-
}
|
|
34529
|
+
callbackParams();
|
|
34425
34530
|
}, 1000);
|
|
34426
34531
|
});
|
|
34427
|
-
|
|
34532
|
+
function callbackParams (key, val) {
|
|
34533
|
+
if (viewModel) {
|
|
34534
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
34535
|
+
formItem.tileset = "";
|
|
34536
|
+
if (tiles.value.length > 0) {
|
|
34537
|
+
formItem.tileset = tiles.value[0].guid;
|
|
34538
|
+
}
|
|
34539
|
+
paramsChanged("tileset");
|
|
34540
|
+
}
|
|
34541
|
+
}
|
|
34428
34542
|
/**
|
|
34429
34543
|
* @description 监听header生成
|
|
34430
34544
|
*/
|
|
@@ -34804,9 +34918,9 @@ PlaneClip.install = (Vue, opts) => {
|
|
|
34804
34918
|
|
|
34805
34919
|
|
|
34806
34920
|
|
|
34807
|
-
|
|
34808
|
-
var
|
|
34809
|
-
var
|
|
34921
|
+
;// CONCATENATED MODULE: external "papaparse"
|
|
34922
|
+
var external_papaparse_namespaceObject = require("papaparse");
|
|
34923
|
+
var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_papaparse_namespaceObject);
|
|
34810
34924
|
;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
|
|
34811
34925
|
/*
|
|
34812
34926
|
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
@@ -34954,7 +35068,7 @@ class AddDataViewModel {
|
|
|
34954
35068
|
});
|
|
34955
35069
|
} else if (ext === "csv") {
|
|
34956
35070
|
(0,util_.readFile)(file, res => {
|
|
34957
|
-
var features =
|
|
35071
|
+
var features = external_papaparse_default().parse(res, {
|
|
34958
35072
|
skipEmptyLines: true,
|
|
34959
35073
|
header: true
|
|
34960
35074
|
}).data;
|
|
@@ -45569,16 +45683,19 @@ Light.install = (Vue, opts) => {
|
|
|
45569
45683
|
*/
|
|
45570
45684
|
//地质体分析逻辑类
|
|
45571
45685
|
|
|
45686
|
+
|
|
45572
45687
|
class GeologicalBodyAnalysisViewModel {
|
|
45573
45688
|
_viewer = null; //三维viewer对象
|
|
45574
45689
|
_options = {}; //地质体分析存储参数对象
|
|
45575
45690
|
_geologyBody = null; //地质体分析三维对象
|
|
45576
45691
|
_measureHandler = null;
|
|
45577
45692
|
_language = {};
|
|
45578
|
-
|
|
45693
|
+
callbackParams = null;
|
|
45694
|
+
constructor(scenceView, options, callbackParams) {
|
|
45579
45695
|
this._language = scenceView._language;
|
|
45580
45696
|
this._options = options;
|
|
45581
45697
|
this._viewer = scenceView._viewer;
|
|
45698
|
+
this.callbackParams = callbackParams;
|
|
45582
45699
|
this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
|
|
45583
45700
|
this._measureHandler.measureEvent.addEventListener(function (result) {
|
|
45584
45701
|
if(result.measureResult.labels) result.measureResult.labels.show = false;
|
|
@@ -45624,8 +45741,18 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45624
45741
|
}
|
|
45625
45742
|
}
|
|
45626
45743
|
});
|
|
45744
|
+
// 事件绑定this
|
|
45745
|
+
this._resetListData = this._resetListData.bind(this);
|
|
45746
|
+
// 添加图层数据源变化监听
|
|
45747
|
+
gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
45748
|
+
}
|
|
45749
|
+
_resetListData(e) {
|
|
45750
|
+
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
45751
|
+
if (e.eventTarget && e.eventTarget === this) {
|
|
45752
|
+
return;
|
|
45753
|
+
}
|
|
45754
|
+
this.callbackParams && this.callbackParams("setData")
|
|
45627
45755
|
}
|
|
45628
|
-
|
|
45629
45756
|
// 查找所有地质体对象
|
|
45630
45757
|
findLayers() {
|
|
45631
45758
|
let geologys = [];
|
|
@@ -45633,6 +45760,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45633
45760
|
for (let i = 0; i < geologyBodyCollection.length; i++) {
|
|
45634
45761
|
if(geologyBodyCollection[i].geologyPrimitiveCollection) {
|
|
45635
45762
|
if(!geologyBodyCollection[i].guid) geologyBodyCollection[i].guid = Cesium.createGuid();
|
|
45763
|
+
if(geologyBodyCollection[i]?.show == false) continue;
|
|
45636
45764
|
geologys.push({
|
|
45637
45765
|
guid: geologyBodyCollection[i].guid,
|
|
45638
45766
|
name: geologyBodyCollection[i].name ? geologyBodyCollection[i].name : geologyBodyCollection[i].guid
|
|
@@ -45695,6 +45823,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45695
45823
|
this.clear();
|
|
45696
45824
|
this._measureHandler && this._measureHandler.destroy();
|
|
45697
45825
|
this._measureHandler = null;
|
|
45826
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
45698
45827
|
}
|
|
45699
45828
|
}
|
|
45700
45829
|
|
|
@@ -45822,7 +45951,7 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
45822
45951
|
//父组 件ScenceView初始化完成后执行
|
|
45823
45952
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
45824
45953
|
if (scenceView) {
|
|
45825
|
-
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem);
|
|
45954
|
+
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem, callbackParams);
|
|
45826
45955
|
}
|
|
45827
45956
|
});
|
|
45828
45957
|
setTimeout(() => {
|
|
@@ -45835,7 +45964,13 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
45835
45964
|
}
|
|
45836
45965
|
}, 1000);
|
|
45837
45966
|
});
|
|
45838
|
-
|
|
45967
|
+
function callbackParams (key, val) {
|
|
45968
|
+
if (viewModel) {
|
|
45969
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
45970
|
+
formItem.geology = null;
|
|
45971
|
+
paramsChanged("geology");
|
|
45972
|
+
}
|
|
45973
|
+
}
|
|
45839
45974
|
/**
|
|
45840
45975
|
* @description 监听header生成
|
|
45841
45976
|
*/
|
|
@@ -47494,6 +47629,8 @@ function resetWebMapInfo(webMapInfo, cb, defaultShowLayerNames, isShowAllLayers)
|
|
|
47494
47629
|
return { ..._layerSources[i], ...layerData };
|
|
47495
47630
|
}
|
|
47496
47631
|
}
|
|
47632
|
+
} else {
|
|
47633
|
+
layerData.visible = getLayerDefaultState(layerData);
|
|
47497
47634
|
}
|
|
47498
47635
|
}
|
|
47499
47636
|
} else {
|
|
@@ -49494,10 +49631,7 @@ const updatePosition = (boxElem, props) => {
|
|
|
49494
49631
|
if (!boxElem) {
|
|
49495
49632
|
return false;
|
|
49496
49633
|
}
|
|
49497
|
-
|
|
49498
|
-
boxElem.style.left = "auto";
|
|
49499
|
-
boxElem.style.bottom = "auto";
|
|
49500
|
-
boxElem.style.right = "auto";
|
|
49634
|
+
|
|
49501
49635
|
const { position } = props;
|
|
49502
49636
|
let _fixed = "static";
|
|
49503
49637
|
if (position) {
|
|
@@ -49505,6 +49639,11 @@ const updatePosition = (boxElem, props) => {
|
|
|
49505
49639
|
} else {
|
|
49506
49640
|
return false;
|
|
49507
49641
|
}
|
|
49642
|
+
boxElem.style.top = "auto";
|
|
49643
|
+
boxElem.style.left = "auto";
|
|
49644
|
+
boxElem.style.bottom = "auto";
|
|
49645
|
+
boxElem.style.right = "auto";
|
|
49646
|
+
|
|
49508
49647
|
addClass(boxElem, "kq-is-absolute");
|
|
49509
49648
|
const clientVisibleWidth =
|
|
49510
49649
|
_fixed === "fixed" ? document.documentElement.clientWidth || document.body.clientWidth : "auto";
|
|
@@ -49965,15 +50104,6 @@ function specialSymbols(name) {
|
|
|
49965
50104
|
'"/></DecorateStyle>' +
|
|
49966
50105
|
"</PolygonSymbol>" +
|
|
49967
50106
|
"</StyleItem>";
|
|
49968
|
-
} else if (name === "圆点") {
|
|
49969
|
-
xml =
|
|
49970
|
-
'<StyleItem TypeID="109">' +
|
|
49971
|
-
'<CirclePoint Name="' +
|
|
49972
|
-
name +
|
|
49973
|
-
'" AliasName="' +
|
|
49974
|
-
name +
|
|
49975
|
-
'" Color="4278190080" Units="1" Mask="-5" EnableReallyMeter="0" Light="0" EnableXRay="0" XRayColor="4294967295" OffsetX="0" OffsetY="0" Degree="0" Width="3" Height="3" PivotX="0.5" PivotY="0.5" PivotZ="0" m="Y" md="1" mot_h="1" mov_rel_h="0" mov_abs_h="0" mot_v="1" mov_rel_v="0" mov_abs_v="0" vectortype="1" vectorpath="" vectoruuid="" StrokeColor="4294901760" StrokeWidth="0.5" Cap="512" Join="8192" PenStyle="1" FillColor="4294901760" FillStyle="1" GradientType="0" StartGradientColor="4278190080" EndGradientColor="4294967295" GradientDegree="0" GradientRatio="0" scaleWithStyle="N" SourceStyleLocked="N"/>' +
|
|
49976
|
-
"</StyleItem>";
|
|
49977
50107
|
}
|
|
49978
50108
|
let x2js = new X2JS();
|
|
49979
50109
|
let styleItem = x2js.xml2js(xml).StyleItem;
|
|
@@ -50183,8 +50313,7 @@ function getStyleItem(symbolInfo) {
|
|
|
50183
50313
|
symbolInfo.ITEM_NAME === "运载火箭航天发射" ||
|
|
50184
50314
|
symbolInfo.ITEM_NAME === "地空导弹营火力范围" ||
|
|
50185
50315
|
symbolInfo.ITEM_NAME === "近程常规导弹火力发射圈箭头线" ||
|
|
50186
|
-
symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区"
|
|
50187
|
-
symbolInfo[j].ITEM_NAME === "圆点"
|
|
50316
|
+
symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区"
|
|
50188
50317
|
) {
|
|
50189
50318
|
styleItem = specialSymbols(symbolInfo);
|
|
50190
50319
|
} else {
|
|
@@ -71686,6 +71815,31 @@ function openelement(ChildList, thirdName) {
|
|
|
71686
71815
|
thirdName.children.push(element);
|
|
71687
71816
|
}
|
|
71688
71817
|
}
|
|
71818
|
+
|
|
71819
|
+
function getPlotColor(colorValue) {
|
|
71820
|
+
if (colorValue.toString().indexOf("rgba") >= 0) {
|
|
71821
|
+
let value = colorValue.substring(colorValue.indexOf("(") + 1, colorValue.indexOf(")"));
|
|
71822
|
+
let values = value.split(",");
|
|
71823
|
+
let r = Number(values[0]);
|
|
71824
|
+
let g = Number(values[1]);
|
|
71825
|
+
let b = Number(values[2]);
|
|
71826
|
+
let a = Math.round((Number(values[3]) / 255) * 100) / 100;
|
|
71827
|
+
return "rgba(" + r + "," + g + "," + b + "," + a + ")";
|
|
71828
|
+
}
|
|
71829
|
+
if (colorValue === undefined) {
|
|
71830
|
+
return "rgba(0,0,0,1)";
|
|
71831
|
+
}
|
|
71832
|
+
colorValue = Number(colorValue);
|
|
71833
|
+
if (colorValue === 0) {
|
|
71834
|
+
return "rgba(255,0,0,1)";
|
|
71835
|
+
}
|
|
71836
|
+
// colorValue = colorValue >>> 0;
|
|
71837
|
+
let r = (colorValue >> 16) & 0xff;
|
|
71838
|
+
let g = (colorValue >> 8) & 0xff;
|
|
71839
|
+
let b = colorValue & 0xff;
|
|
71840
|
+
let a = Math.round(((colorValue >>> 24) / 255) * 100) / 100;
|
|
71841
|
+
return "rgba(" + r + "," + g + "," + b + "," + a + ")";
|
|
71842
|
+
}
|
|
71689
71843
|
|
|
71690
71844
|
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/sceneapp/components/AppPlotting.vue?vue&type=script&setup=true&lang=js
|
|
71691
71845
|
|