@kq_npm/client3d_webgl_vue 4.5.36 → 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 +287 -125
- package/geologicalbodyanalysis/index.js +25 -4
- package/index.js +285 -123
- 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 +287 -125
- package/sceneview/index.js +287 -125
- 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("@kq_npm/client_common_vue"), 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", "@kq_npm/client_common_vue", "
|
|
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("@kq_npm/client_common_vue"), 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["@kq_npm/client_common_vue"], 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__, __WEBPACK_EXTERNAL_MODULE__64__,
|
|
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,14 +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
|
-
/***/ 747:
|
|
1032
|
-
/***/ (function(module) {
|
|
1033
|
-
|
|
1034
|
-
"use strict";
|
|
1035
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__747__;
|
|
1036
|
-
|
|
1037
1029
|
/***/ })
|
|
1038
1030
|
|
|
1039
1031
|
/******/ });
|
|
@@ -1517,7 +1509,7 @@ class DrawManager {
|
|
|
1517
1509
|
}
|
|
1518
1510
|
|
|
1519
1511
|
//开始绘制
|
|
1520
|
-
startDraw(type, style, callback, groupName, isMulti=false) {
|
|
1512
|
+
startDraw(type, style, callback, groupName, isMulti = false) {
|
|
1521
1513
|
// 开始绘制之前停止编辑和关闭样式设置框
|
|
1522
1514
|
if (this._drawHandler.editHandler.shapeObject) {
|
|
1523
1515
|
this._drawHandler.startEdit(null);
|
|
@@ -1539,7 +1531,7 @@ class DrawManager {
|
|
|
1539
1531
|
this._viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
1540
1532
|
}
|
|
1541
1533
|
var unionOptions = { ...this._drawStyle[type] };
|
|
1542
|
-
if(type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
|
|
1534
|
+
if (type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
|
|
1543
1535
|
for (const key in unionOptions) {
|
|
1544
1536
|
if (Object.hasOwnProperty.call(options, key)) {
|
|
1545
1537
|
unionOptions[key] = options[key];
|
|
@@ -1585,16 +1577,16 @@ class DrawManager {
|
|
|
1585
1577
|
var feature = that.shapeToGeoFeature(shape);
|
|
1586
1578
|
callback(feature.geometry, { layer: shape.guid });
|
|
1587
1579
|
}
|
|
1588
|
-
if(that.removeEventListener)that.removeEventListener();
|
|
1580
|
+
if (that.removeEventListener) that.removeEventListener();
|
|
1589
1581
|
that.removeEventListener = null;
|
|
1590
|
-
if(isMulti) {
|
|
1582
|
+
if (isMulti) {
|
|
1591
1583
|
that.startDraw(type, style, callback, groupName, isMulti);
|
|
1592
1584
|
}
|
|
1593
1585
|
});
|
|
1594
1586
|
}
|
|
1595
1587
|
|
|
1596
1588
|
stopDraw() {
|
|
1597
|
-
if(this.removeEventListener) {
|
|
1589
|
+
if (this.removeEventListener) {
|
|
1598
1590
|
this.removeEventListener();
|
|
1599
1591
|
this.removeEventListener = null;
|
|
1600
1592
|
}
|
|
@@ -1717,7 +1709,7 @@ class DrawManager {
|
|
|
1717
1709
|
}
|
|
1718
1710
|
|
|
1719
1711
|
//通过geojson进行绘制,支持定位和闪烁
|
|
1720
|
-
drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing=false) {
|
|
1712
|
+
drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing = false) {
|
|
1721
1713
|
if (!geojsonStyle) geojsonStyle = {};
|
|
1722
1714
|
let style = JSON.parse(JSON.stringify(this._geojsonStyle));
|
|
1723
1715
|
for (var type in geojsonStyle) {
|
|
@@ -1757,6 +1749,7 @@ class DrawManager {
|
|
|
1757
1749
|
style.point.color = style.point.material;
|
|
1758
1750
|
delete style.billboard;
|
|
1759
1751
|
}
|
|
1752
|
+
|
|
1760
1753
|
this._viewer.scene.globe.depthTestAgainstTerrain = false;
|
|
1761
1754
|
let geojsonDs = this._viewer.dataSources.getByName(idCustom);
|
|
1762
1755
|
if (geojsonDs.length === 0) {
|
|
@@ -1792,11 +1785,11 @@ class DrawManager {
|
|
|
1792
1785
|
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
1793
1786
|
that._viewer.flyTo(ds, { duration: 1.5, offset });
|
|
1794
1787
|
}
|
|
1795
|
-
if(flashing) {
|
|
1788
|
+
if (flashing) {
|
|
1796
1789
|
// 闪烁效果
|
|
1797
1790
|
let count = 0;
|
|
1798
1791
|
let interval = setInterval(() => {
|
|
1799
|
-
if(ds._destroyed) {
|
|
1792
|
+
if (ds._destroyed) {
|
|
1800
1793
|
clearInterval(interval);
|
|
1801
1794
|
return;
|
|
1802
1795
|
}
|
|
@@ -1818,12 +1811,10 @@ class DrawManager {
|
|
|
1818
1811
|
|
|
1819
1812
|
//删除指定绘图分组的所有图形
|
|
1820
1813
|
removeGeojsonByIdCustom(idCustom) {
|
|
1814
|
+
if (idCustom === "draw") this.clear();
|
|
1821
1815
|
let dsList = this._viewer.dataSources.getByName(idCustom);
|
|
1822
1816
|
|
|
1823
|
-
if (dsList.length <= 0)
|
|
1824
|
-
this.clear();
|
|
1825
|
-
return;
|
|
1826
|
-
}
|
|
1817
|
+
if (dsList.length <= 0) return;
|
|
1827
1818
|
for (let i = 0; i < dsList.length; i++) {
|
|
1828
1819
|
this._viewer.dataSources.remove(dsList[i], true);
|
|
1829
1820
|
}
|
|
@@ -1831,7 +1822,6 @@ class DrawManager {
|
|
|
1831
1822
|
if (index > -1) {
|
|
1832
1823
|
this._layerGroup.splice(index, 1);
|
|
1833
1824
|
}
|
|
1834
|
-
if(idCustom === 'draw') this.clear();
|
|
1835
1825
|
}
|
|
1836
1826
|
|
|
1837
1827
|
getGeometry(idCustom) {
|
|
@@ -2059,8 +2049,8 @@ class DrawManager {
|
|
|
2059
2049
|
const layer = layerList[i];
|
|
2060
2050
|
const name = layer.name || "";
|
|
2061
2051
|
const info = this.getShapeInfo(layer.guid);
|
|
2062
|
-
|
|
2063
|
-
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 });
|
|
2064
2054
|
}
|
|
2065
2055
|
|
|
2066
2056
|
return JSON.stringify(items);
|
|
@@ -2244,7 +2234,7 @@ class DrawManager {
|
|
|
2244
2234
|
let shape = this._drawLayer.getById(id);
|
|
2245
2235
|
if (shape) {
|
|
2246
2236
|
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
2247
|
-
if(shape.type ===
|
|
2237
|
+
if (shape.type === "marker" || shape.type === "text") {
|
|
2248
2238
|
let boundingSphere = new Cesium.BoundingSphere(shape.position, 50000);
|
|
2249
2239
|
this._viewer.camera.flyToBoundingSphere(boundingSphere, { duration: 1.5, offset });
|
|
2250
2240
|
} else {
|
|
@@ -2388,29 +2378,55 @@ class DrawManager {
|
|
|
2388
2378
|
}
|
|
2389
2379
|
}
|
|
2390
2380
|
}
|
|
2381
|
+
setLabelList(v, g) {
|
|
2382
|
+
this._labelInfo = {
|
|
2383
|
+
labelList: v,
|
|
2384
|
+
groupName: g
|
|
2385
|
+
};
|
|
2386
|
+
}
|
|
2391
2387
|
|
|
2392
2388
|
/********** 地理编码通用组件使用 start ************/
|
|
2393
2389
|
// 绘制点图标自带点击弹出气泡, 地理编码通用组件使用
|
|
2394
|
-
drawPointWithPoup(data, idCustom = "geocode") {
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
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
|
+
}
|
|
2413
2428
|
}
|
|
2429
|
+
|
|
2414
2430
|
let pointDs = this._viewer.dataSources.getByName(idCustom);
|
|
2415
2431
|
if (pointDs.length === 0) {
|
|
2416
2432
|
pointDs = new Cesium.CustomDataSource(idCustom);
|
|
@@ -2419,28 +2435,52 @@ class DrawManager {
|
|
|
2419
2435
|
} else {
|
|
2420
2436
|
pointDs = pointDs[0];
|
|
2421
2437
|
}
|
|
2422
|
-
let position = Cesium.Cartesian3.fromDegrees(data.
|
|
2438
|
+
let position = Cesium.Cartesian3.fromDegrees(data.lon, data.lat);
|
|
2423
2439
|
pointDs.entities.add({
|
|
2424
2440
|
position: position,
|
|
2425
2441
|
billboard: {
|
|
2426
2442
|
image: data.image,
|
|
2443
|
+
image1: data.image1,
|
|
2427
2444
|
width: data.width,
|
|
2428
2445
|
height: data.height,
|
|
2429
2446
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2447
|
+
},
|
|
2448
|
+
properties: data
|
|
2432
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
|
+
}
|
|
2433
2455
|
}
|
|
2434
2456
|
|
|
2435
2457
|
// 通过entity创建关联气泡
|
|
2436
2458
|
createPointPoup(entity) {
|
|
2437
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>`;
|
|
2438
2468
|
this._htmlTag = new Cesium.Kq3dHtmlTag(this._viewer, {
|
|
2439
|
-
html: "<div>" + entity.properties.id._value + "</div>",
|
|
2469
|
+
// html: "<div>" + entity.properties.id._value + "</div>",
|
|
2470
|
+
html: popHtml,
|
|
2440
2471
|
position: entity.position,
|
|
2441
|
-
anchor: [0, -entity.properties.height._value],
|
|
2442
|
-
alignmentMode: 7
|
|
2472
|
+
anchor: [0, -entity.properties.height._value - 4],
|
|
2473
|
+
alignmentMode: 7,
|
|
2474
|
+
noEvent: false
|
|
2443
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
|
+
}
|
|
2444
2484
|
}
|
|
2445
2485
|
|
|
2446
2486
|
// 通过id打开地理编码图标气泡
|
|
@@ -4195,7 +4235,8 @@ class LayerManager {
|
|
|
4195
4235
|
let that = this;
|
|
4196
4236
|
this._layerListData.forEach(layer => {
|
|
4197
4237
|
if (layer.visible) {
|
|
4198
|
-
layers_checked.push(layer);
|
|
4238
|
+
// layers_checked.push(layer);
|
|
4239
|
+
layers_checked.unshift(layer);
|
|
4199
4240
|
}
|
|
4200
4241
|
}, this);
|
|
4201
4242
|
const layers_old = this._layerListData_old;
|
|
@@ -10146,7 +10187,8 @@ return (_ctx, _cache) => {
|
|
|
10146
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 */),
|
|
10147
10188
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_select, {
|
|
10148
10189
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(mode),
|
|
10149
|
-
"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)
|
|
10150
10192
|
}, {
|
|
10151
10193
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
|
|
10152
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) => {
|
|
@@ -10158,7 +10200,7 @@ return (_ctx, _cache) => {
|
|
|
10158
10200
|
}), 128 /* KEYED_FRAGMENT */))
|
|
10159
10201
|
]),
|
|
10160
10202
|
_: 1 /* STABLE */
|
|
10161
|
-
}, 8 /* PROPS */, ["modelValue"])
|
|
10203
|
+
}, 8 /* PROPS */, ["modelValue", "disabled"])
|
|
10162
10204
|
])
|
|
10163
10205
|
]),
|
|
10164
10206
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", Measurevue_type_script_setup_true_lang_js_hoisted_5, [
|
|
@@ -12254,6 +12296,9 @@ class ModelSelectViewModel {
|
|
|
12254
12296
|
_modeFiledArray = null; // 模型属性唯一值字段集合
|
|
12255
12297
|
_modeFiled = "id"; // 模型属性匹配字段
|
|
12256
12298
|
_language = {};
|
|
12299
|
+
selectedKey = null;
|
|
12300
|
+
oldColor = null;
|
|
12301
|
+
selectedFeature = null;
|
|
12257
12302
|
constructor(scenceView, pickCallFunc) {
|
|
12258
12303
|
this._language = scenceView._language;
|
|
12259
12304
|
this._viewer = scenceView._viewer;
|
|
@@ -12282,15 +12327,30 @@ class ModelSelectViewModel {
|
|
|
12282
12327
|
})
|
|
12283
12328
|
}
|
|
12284
12329
|
if (properties.indexOf(that._modeFiled) > -1) {
|
|
12285
|
-
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
|
+
}
|
|
12286
12346
|
// that.clear();
|
|
12287
|
-
that._highlight = new Cesium.Kq3dHighlight({
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
});
|
|
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
|
+
// });
|
|
12294
12354
|
let attrs = {};
|
|
12295
12355
|
properties.forEach(prop => {
|
|
12296
12356
|
attrs[prop] = pickedObject.getProperty(prop);
|
|
@@ -12343,6 +12403,11 @@ class ModelSelectViewModel {
|
|
|
12343
12403
|
this._highlight = null;
|
|
12344
12404
|
this.setCursor("default");
|
|
12345
12405
|
this._isPick = false;
|
|
12406
|
+
if (this.selectedFeature) {
|
|
12407
|
+
this.selectedFeature.color = this.oldColor;
|
|
12408
|
+
this.selectedFeature = null;
|
|
12409
|
+
this.selectedKey = null;
|
|
12410
|
+
}
|
|
12346
12411
|
}
|
|
12347
12412
|
|
|
12348
12413
|
//销毁
|
|
@@ -12669,12 +12734,13 @@ ModelSelect.install = (Vue, opts) => {
|
|
|
12669
12734
|
|
|
12670
12735
|
|
|
12671
12736
|
;// CONCATENATED MODULE: ./src/webgl/modelfilter/ModelFilterViewModel.js
|
|
12672
|
-
/*
|
|
12673
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
12674
|
-
* All rights reserved.
|
|
12675
|
-
*/
|
|
12737
|
+
/*
|
|
12738
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
12739
|
+
* All rights reserved.
|
|
12740
|
+
*/
|
|
12676
12741
|
//模型滤镜逻辑类
|
|
12677
12742
|
|
|
12743
|
+
|
|
12678
12744
|
class ModelFilterViewModel {
|
|
12679
12745
|
_viewer = null; //三维viewer对象
|
|
12680
12746
|
_options = {}; //Box裁剪存储参数对象
|
|
@@ -12685,19 +12751,31 @@ class ModelFilterViewModel {
|
|
|
12685
12751
|
saturation:1,
|
|
12686
12752
|
gamma: 1
|
|
12687
12753
|
}
|
|
12688
|
-
|
|
12689
|
-
constructor(scenceView, options) {
|
|
12754
|
+
callbackParams = null;
|
|
12755
|
+
constructor(scenceView, options, callbackParams) {
|
|
12690
12756
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
12691
12757
|
this._viewer = scenceView._viewer;
|
|
12692
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")
|
|
12693
12771
|
}
|
|
12694
|
-
|
|
12695
12772
|
// 查找所有3dtiles模型对象
|
|
12696
12773
|
findLayers() {
|
|
12697
12774
|
let tilesets = [];
|
|
12698
12775
|
const primitives = this._viewer.scene.primitives._primitives;
|
|
12699
12776
|
for (let m = 0; m < primitives.length; m++) {
|
|
12700
12777
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
12778
|
+
if(!primitives[m].show) continue;
|
|
12701
12779
|
tilesets.push({
|
|
12702
12780
|
guid: primitives[m].guid,
|
|
12703
12781
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -12758,6 +12836,7 @@ class ModelFilterViewModel {
|
|
|
12758
12836
|
|
|
12759
12837
|
//销毁
|
|
12760
12838
|
destroy() {
|
|
12839
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
12761
12840
|
this.clear();
|
|
12762
12841
|
}
|
|
12763
12842
|
}
|
|
@@ -12895,7 +12974,7 @@ headerTempTitle.value = language.value.modelFilterPick;
|
|
|
12895
12974
|
saturation: formItem.saturation,
|
|
12896
12975
|
gamma: formItem.gamma
|
|
12897
12976
|
};
|
|
12898
|
-
viewModel = new ModelFilterViewModel(scenceView, options);
|
|
12977
|
+
viewModel = new ModelFilterViewModel(scenceView, options, callbackParams);
|
|
12899
12978
|
}
|
|
12900
12979
|
});
|
|
12901
12980
|
setTimeout(() => {
|
|
@@ -12904,7 +12983,13 @@ headerTempTitle.value = language.value.modelFilterPick;
|
|
|
12904
12983
|
}
|
|
12905
12984
|
}, 1000);
|
|
12906
12985
|
});
|
|
12907
|
-
|
|
12986
|
+
function callbackParams (key, val) {
|
|
12987
|
+
if (viewModel) {
|
|
12988
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
12989
|
+
formItem.tileset = "";
|
|
12990
|
+
paramsChanged("tileset");
|
|
12991
|
+
}
|
|
12992
|
+
}
|
|
12908
12993
|
/**
|
|
12909
12994
|
* @description 监听header生成
|
|
12910
12995
|
*/
|
|
@@ -20250,7 +20335,8 @@ class WindySlicingViewModel {
|
|
|
20250
20335
|
attrRange: [ranges[0], ranges[ranges.length - 1]],
|
|
20251
20336
|
varName: this._windySlicingLayerconfig?.params?.varNames,
|
|
20252
20337
|
};
|
|
20253
|
-
|
|
20338
|
+
Object.assign(this._currentVolumeOption, params || {})
|
|
20339
|
+
return new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
|
|
20254
20340
|
}
|
|
20255
20341
|
/**
|
|
20256
20342
|
* 创建线剖切
|
|
@@ -20781,6 +20867,7 @@ function formatTooltip(val) {
|
|
|
20781
20867
|
}
|
|
20782
20868
|
// 销毁
|
|
20783
20869
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
|
|
20870
|
+
global_event_default().off("windyTypeChange", handleWindyTypeChange);
|
|
20784
20871
|
viewModel && viewModel.destroy();
|
|
20785
20872
|
});
|
|
20786
20873
|
|
|
@@ -33169,6 +33256,7 @@ IsolineAnalysis.install = (Vue, opts) => {
|
|
|
33169
33256
|
*/
|
|
33170
33257
|
//Box裁剪逻辑类
|
|
33171
33258
|
|
|
33259
|
+
|
|
33172
33260
|
class BoxClipViewModel {
|
|
33173
33261
|
_viewer = null; //三维viewer对象
|
|
33174
33262
|
_options = {}; //Box裁剪存储参数对象
|
|
@@ -33195,13 +33283,14 @@ class BoxClipViewModel {
|
|
|
33195
33283
|
_drawManager = null; //绘制管理对象
|
|
33196
33284
|
_removeEventListener = null; //绘制完成监听事件
|
|
33197
33285
|
_language = {};
|
|
33198
|
-
|
|
33286
|
+
callbackParams = null;
|
|
33287
|
+
constructor(scenceView, options, callbackParams) {
|
|
33199
33288
|
this._language = scenceView._language;
|
|
33200
33289
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
33201
33290
|
this._viewer = scenceView._viewer;
|
|
33291
|
+
this.callbackParams = callbackParams;
|
|
33202
33292
|
// this._viewer.enabledFXAA = true;
|
|
33203
33293
|
this._options.viewer = this._viewer;
|
|
33204
|
-
|
|
33205
33294
|
this._drawManager = scenceView._drawManager;
|
|
33206
33295
|
let that = this;
|
|
33207
33296
|
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
@@ -33212,14 +33301,25 @@ class BoxClipViewModel {
|
|
|
33212
33301
|
that._drawManager.clear();
|
|
33213
33302
|
}
|
|
33214
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")
|
|
33215
33315
|
}
|
|
33216
|
-
|
|
33217
33316
|
// 查找所有3dtiles模型对象
|
|
33218
33317
|
findLayers() {
|
|
33219
33318
|
let tilesets = [];
|
|
33220
33319
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
33221
33320
|
for (let m = 0; m < primitives.length; m++) {
|
|
33222
33321
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
33322
|
+
if(!primitives[m].show) continue;
|
|
33223
33323
|
tilesets.push({
|
|
33224
33324
|
guid: primitives[m].guid,
|
|
33225
33325
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -33244,7 +33344,7 @@ class BoxClipViewModel {
|
|
|
33244
33344
|
var flag = false;
|
|
33245
33345
|
var models = this._options.viewer.scene.primitives._primitives;
|
|
33246
33346
|
for (let i = 0; i < models.length; i++) {
|
|
33247
|
-
if (models[i]._url) {
|
|
33347
|
+
if (models[i]._url && models[i].show) {
|
|
33248
33348
|
flag = true;
|
|
33249
33349
|
}
|
|
33250
33350
|
}
|
|
@@ -33275,6 +33375,7 @@ class BoxClipViewModel {
|
|
|
33275
33375
|
//移除监听事件
|
|
33276
33376
|
this._removeEventListener && this._removeEventListener();
|
|
33277
33377
|
this._removeEventListener = null;
|
|
33378
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
33278
33379
|
}
|
|
33279
33380
|
|
|
33280
33381
|
// 设置裁剪对象
|
|
@@ -33482,20 +33583,23 @@ headerTempTitle.value = language.value.boxClip;
|
|
|
33482
33583
|
axisZ: formItem.clipHeight,
|
|
33483
33584
|
angle: formItem.clipRotation
|
|
33484
33585
|
};
|
|
33485
|
-
viewModel = new BoxClipViewModel(scenceView, options);
|
|
33586
|
+
viewModel = new BoxClipViewModel(scenceView, options, callbackParams);
|
|
33486
33587
|
}
|
|
33487
33588
|
});
|
|
33488
33589
|
setTimeout(() => {
|
|
33489
|
-
|
|
33490
|
-
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
33491
|
-
if (tiles.value.length > 0) {
|
|
33492
|
-
formItem.tileset = tiles.value[0].guid;
|
|
33493
|
-
paramsChanged("tileset");
|
|
33494
|
-
}
|
|
33495
|
-
}
|
|
33590
|
+
callbackParams();
|
|
33496
33591
|
}, 1000);
|
|
33497
33592
|
});
|
|
33498
|
-
|
|
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
|
+
}
|
|
33499
33603
|
/**
|
|
33500
33604
|
* @description 监听header生成
|
|
33501
33605
|
*/
|
|
@@ -34115,6 +34219,7 @@ BoxClip.install = (Vue, opts) => {
|
|
|
34115
34219
|
*/
|
|
34116
34220
|
//平面裁剪逻辑类
|
|
34117
34221
|
|
|
34222
|
+
|
|
34118
34223
|
class PlaneClipViewModel {
|
|
34119
34224
|
_viewer = null; //三维viewer对象
|
|
34120
34225
|
_options = {}; //平面裁剪存储参数对象
|
|
@@ -34145,13 +34250,15 @@ class PlaneClipViewModel {
|
|
|
34145
34250
|
_drawManager = null; //绘制管理对象
|
|
34146
34251
|
_removeEventListener = null; //绘制完成事件监听
|
|
34147
34252
|
_language = {};
|
|
34148
|
-
|
|
34253
|
+
callbackParams = null;
|
|
34254
|
+
constructor(scenceView, options, callbackParams) {
|
|
34149
34255
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
34150
34256
|
this._viewer = scenceView._viewer;
|
|
34151
34257
|
// this._viewer.enabledFXAA = true;
|
|
34152
34258
|
this._options.viewer = this._viewer;
|
|
34153
34259
|
this._language = scenceView._language;
|
|
34154
34260
|
this._drawManager = scenceView._drawManager;
|
|
34261
|
+
this.callbackParams = callbackParams;
|
|
34155
34262
|
let that = this;
|
|
34156
34263
|
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
34157
34264
|
if (shape) {
|
|
@@ -34161,14 +34268,25 @@ class PlaneClipViewModel {
|
|
|
34161
34268
|
that._drawManager.clear();
|
|
34162
34269
|
}
|
|
34163
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")
|
|
34164
34282
|
}
|
|
34165
|
-
|
|
34166
34283
|
// 查找所有3dtiles模型对象
|
|
34167
34284
|
findLayers() {
|
|
34168
34285
|
let tilesets = [];
|
|
34169
34286
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
34170
34287
|
for (let m = 0; m < primitives.length; m++) {
|
|
34171
34288
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
34289
|
+
if(!primitives[m].show) continue;
|
|
34172
34290
|
tilesets.push({
|
|
34173
34291
|
guid: primitives[m].guid,
|
|
34174
34292
|
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
@@ -34193,7 +34311,7 @@ class PlaneClipViewModel {
|
|
|
34193
34311
|
var flag = false;
|
|
34194
34312
|
var models = this._options.viewer.scene.primitives._primitives;
|
|
34195
34313
|
for (let i = 0; i < models.length; i++) {
|
|
34196
|
-
if (models[i]._url) {
|
|
34314
|
+
if (models[i]._url && models[i].show) {
|
|
34197
34315
|
flag = true;
|
|
34198
34316
|
}
|
|
34199
34317
|
}
|
|
@@ -34223,6 +34341,7 @@ class PlaneClipViewModel {
|
|
|
34223
34341
|
//移除监听事件
|
|
34224
34342
|
this._removeEventListener && this._removeEventListener();
|
|
34225
34343
|
this._removeEventListener = null;
|
|
34344
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
34226
34345
|
}
|
|
34227
34346
|
|
|
34228
34347
|
// 设置裁剪对象
|
|
@@ -34403,20 +34522,23 @@ headerTempTitle.value = language.value.planeClip;
|
|
|
34403
34522
|
boxEnable: formItem.boxEnable,
|
|
34404
34523
|
distance: formItem.clipDistance
|
|
34405
34524
|
};
|
|
34406
|
-
viewModel = new PlaneClipViewModel(scenceView, options);
|
|
34525
|
+
viewModel = new PlaneClipViewModel(scenceView, options, callbackParams);
|
|
34407
34526
|
}
|
|
34408
34527
|
});
|
|
34409
34528
|
setTimeout(() => {
|
|
34410
|
-
|
|
34411
|
-
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
34412
|
-
if (tiles.value.length > 0) {
|
|
34413
|
-
formItem.tileset = tiles.value[0].guid;
|
|
34414
|
-
paramsChanged("tileset");
|
|
34415
|
-
}
|
|
34416
|
-
}
|
|
34529
|
+
callbackParams();
|
|
34417
34530
|
}, 1000);
|
|
34418
34531
|
});
|
|
34419
|
-
|
|
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
|
+
}
|
|
34420
34542
|
/**
|
|
34421
34543
|
* @description 监听header生成
|
|
34422
34544
|
*/
|
|
@@ -34796,9 +34918,9 @@ PlaneClip.install = (Vue, opts) => {
|
|
|
34796
34918
|
|
|
34797
34919
|
|
|
34798
34920
|
|
|
34799
|
-
|
|
34800
|
-
var
|
|
34801
|
-
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);
|
|
34802
34924
|
;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
|
|
34803
34925
|
/*
|
|
34804
34926
|
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
@@ -34946,7 +35068,7 @@ class AddDataViewModel {
|
|
|
34946
35068
|
});
|
|
34947
35069
|
} else if (ext === "csv") {
|
|
34948
35070
|
(0,util_.readFile)(file, res => {
|
|
34949
|
-
var features =
|
|
35071
|
+
var features = external_papaparse_default().parse(res, {
|
|
34950
35072
|
skipEmptyLines: true,
|
|
34951
35073
|
header: true
|
|
34952
35074
|
}).data;
|
|
@@ -45561,16 +45683,19 @@ Light.install = (Vue, opts) => {
|
|
|
45561
45683
|
*/
|
|
45562
45684
|
//地质体分析逻辑类
|
|
45563
45685
|
|
|
45686
|
+
|
|
45564
45687
|
class GeologicalBodyAnalysisViewModel {
|
|
45565
45688
|
_viewer = null; //三维viewer对象
|
|
45566
45689
|
_options = {}; //地质体分析存储参数对象
|
|
45567
45690
|
_geologyBody = null; //地质体分析三维对象
|
|
45568
45691
|
_measureHandler = null;
|
|
45569
45692
|
_language = {};
|
|
45570
|
-
|
|
45693
|
+
callbackParams = null;
|
|
45694
|
+
constructor(scenceView, options, callbackParams) {
|
|
45571
45695
|
this._language = scenceView._language;
|
|
45572
45696
|
this._options = options;
|
|
45573
45697
|
this._viewer = scenceView._viewer;
|
|
45698
|
+
this.callbackParams = callbackParams;
|
|
45574
45699
|
this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
|
|
45575
45700
|
this._measureHandler.measureEvent.addEventListener(function (result) {
|
|
45576
45701
|
if(result.measureResult.labels) result.measureResult.labels.show = false;
|
|
@@ -45616,8 +45741,18 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45616
45741
|
}
|
|
45617
45742
|
}
|
|
45618
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")
|
|
45619
45755
|
}
|
|
45620
|
-
|
|
45621
45756
|
// 查找所有地质体对象
|
|
45622
45757
|
findLayers() {
|
|
45623
45758
|
let geologys = [];
|
|
@@ -45625,6 +45760,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45625
45760
|
for (let i = 0; i < geologyBodyCollection.length; i++) {
|
|
45626
45761
|
if(geologyBodyCollection[i].geologyPrimitiveCollection) {
|
|
45627
45762
|
if(!geologyBodyCollection[i].guid) geologyBodyCollection[i].guid = Cesium.createGuid();
|
|
45763
|
+
if(geologyBodyCollection[i]?.show == false) continue;
|
|
45628
45764
|
geologys.push({
|
|
45629
45765
|
guid: geologyBodyCollection[i].guid,
|
|
45630
45766
|
name: geologyBodyCollection[i].name ? geologyBodyCollection[i].name : geologyBodyCollection[i].guid
|
|
@@ -45687,6 +45823,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
45687
45823
|
this.clear();
|
|
45688
45824
|
this._measureHandler && this._measureHandler.destroy();
|
|
45689
45825
|
this._measureHandler = null;
|
|
45826
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
45690
45827
|
}
|
|
45691
45828
|
}
|
|
45692
45829
|
|
|
@@ -45814,7 +45951,7 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
45814
45951
|
//父组 件ScenceView初始化完成后执行
|
|
45815
45952
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
45816
45953
|
if (scenceView) {
|
|
45817
|
-
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem);
|
|
45954
|
+
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem, callbackParams);
|
|
45818
45955
|
}
|
|
45819
45956
|
});
|
|
45820
45957
|
setTimeout(() => {
|
|
@@ -45827,7 +45964,13 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
45827
45964
|
}
|
|
45828
45965
|
}, 1000);
|
|
45829
45966
|
});
|
|
45830
|
-
|
|
45967
|
+
function callbackParams (key, val) {
|
|
45968
|
+
if (viewModel) {
|
|
45969
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
45970
|
+
formItem.geology = null;
|
|
45971
|
+
paramsChanged("geology");
|
|
45972
|
+
}
|
|
45973
|
+
}
|
|
45831
45974
|
/**
|
|
45832
45975
|
* @description 监听header生成
|
|
45833
45976
|
*/
|
|
@@ -47486,6 +47629,8 @@ function resetWebMapInfo(webMapInfo, cb, defaultShowLayerNames, isShowAllLayers)
|
|
|
47486
47629
|
return { ..._layerSources[i], ...layerData };
|
|
47487
47630
|
}
|
|
47488
47631
|
}
|
|
47632
|
+
} else {
|
|
47633
|
+
layerData.visible = getLayerDefaultState(layerData);
|
|
47489
47634
|
}
|
|
47490
47635
|
}
|
|
47491
47636
|
} else {
|
|
@@ -49486,10 +49631,7 @@ const updatePosition = (boxElem, props) => {
|
|
|
49486
49631
|
if (!boxElem) {
|
|
49487
49632
|
return false;
|
|
49488
49633
|
}
|
|
49489
|
-
|
|
49490
|
-
boxElem.style.left = "auto";
|
|
49491
|
-
boxElem.style.bottom = "auto";
|
|
49492
|
-
boxElem.style.right = "auto";
|
|
49634
|
+
|
|
49493
49635
|
const { position } = props;
|
|
49494
49636
|
let _fixed = "static";
|
|
49495
49637
|
if (position) {
|
|
@@ -49497,6 +49639,11 @@ const updatePosition = (boxElem, props) => {
|
|
|
49497
49639
|
} else {
|
|
49498
49640
|
return false;
|
|
49499
49641
|
}
|
|
49642
|
+
boxElem.style.top = "auto";
|
|
49643
|
+
boxElem.style.left = "auto";
|
|
49644
|
+
boxElem.style.bottom = "auto";
|
|
49645
|
+
boxElem.style.right = "auto";
|
|
49646
|
+
|
|
49500
49647
|
addClass(boxElem, "kq-is-absolute");
|
|
49501
49648
|
const clientVisibleWidth =
|
|
49502
49649
|
_fixed === "fixed" ? document.documentElement.clientWidth || document.body.clientWidth : "auto";
|
|
@@ -49957,15 +50104,6 @@ function specialSymbols(name) {
|
|
|
49957
50104
|
'"/></DecorateStyle>' +
|
|
49958
50105
|
"</PolygonSymbol>" +
|
|
49959
50106
|
"</StyleItem>";
|
|
49960
|
-
} else if (name === "圆点") {
|
|
49961
|
-
xml =
|
|
49962
|
-
'<StyleItem TypeID="109">' +
|
|
49963
|
-
'<CirclePoint Name="' +
|
|
49964
|
-
name +
|
|
49965
|
-
'" AliasName="' +
|
|
49966
|
-
name +
|
|
49967
|
-
'" 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"/>' +
|
|
49968
|
-
"</StyleItem>";
|
|
49969
50107
|
}
|
|
49970
50108
|
let x2js = new X2JS();
|
|
49971
50109
|
let styleItem = x2js.xml2js(xml).StyleItem;
|
|
@@ -50175,8 +50313,7 @@ function getStyleItem(symbolInfo) {
|
|
|
50175
50313
|
symbolInfo.ITEM_NAME === "运载火箭航天发射" ||
|
|
50176
50314
|
symbolInfo.ITEM_NAME === "地空导弹营火力范围" ||
|
|
50177
50315
|
symbolInfo.ITEM_NAME === "近程常规导弹火力发射圈箭头线" ||
|
|
50178
|
-
symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区"
|
|
50179
|
-
symbolInfo[j].ITEM_NAME === "圆点"
|
|
50316
|
+
symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区"
|
|
50180
50317
|
) {
|
|
50181
50318
|
styleItem = specialSymbols(symbolInfo);
|
|
50182
50319
|
} else {
|
|
@@ -71678,6 +71815,31 @@ function openelement(ChildList, thirdName) {
|
|
|
71678
71815
|
thirdName.children.push(element);
|
|
71679
71816
|
}
|
|
71680
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
|
+
}
|
|
71681
71843
|
|
|
71682
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
|
|
71683
71845
|
|