@kq_npm/client3d_webgl_vue 4.5.55 → 4.5.56
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/airspacegridoccupancyquery/index.js +1876 -0
- package/airspacegridoccupancyquery/style/airspacegridoccupancyquery.css +1 -0
- package/airspacegridoccupancyquery/style/index.js +3 -0
- package/airspaceprofileanalysis/index.js +1778 -0
- package/airspaceprofileanalysis/style/airspaceprofileanalysis.css +1 -0
- package/airspaceprofileanalysis/style/index.js +3 -0
- package/buildpointmodel/index.js +111 -31
- package/clientPrint/index.js +22739 -119
- package/gpuspatialquery/index.js +69 -9
- package/gridoccupancyquery/index.js +561 -0
- package/gridoccupancyquery/style/gridoccupancyquery.css +1 -0
- package/gridoccupancyquery/style/index.js +3 -0
- package/index.js +22739 -119
- package/lowaltitudefeature/index.js +4854 -0
- package/lowaltitudefeature/style/index.js +3 -0
- package/lowaltitudefeature/style/lowaltitudefeature.css +1 -0
- package/modelprofileanalysis/index.js +1 -0
- package/modelselect/index.js +1 -0
- package/package.json +1 -1
- package/sceneapp/index.js +22739 -119
- package/sceneview/index.js +22739 -119
- package/sceneview/style/sceneview.css +1 -1
- package/style.css +1 -1
- package/toolbarapp/index.js +22739 -119
- package/toolboxapp/index.js +22739 -119
- package/videofusion/index.js +80 -51
- package/viewshedanalysis/index.js +3 -1
- package/webgl.es.js +867 -16
- package/windyslicing/index.js +25 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kq3d-airspace-profile-analysis{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-airspace-profile-analysis .kq3d-airspace-profile-analysis-box{width:332px}.kq3d-airspace-profile-analysis .kq3d-airspace-profile-analysis-tip{color:var(--kq-text-color-regular);font-size:var(--kq-font-size-base)}.kq3d-airspace-profile-analysis .kq3d-airspace-profile-analysis-tip p{margin-top:0;margin-bottom:16px}.kq3d-airspace-profile-analysis .kq-collapse{border:unset}.kq3d-airspace-profile-analysis .kq-collapse .kq-collapse-item__header{border:unset;height:38px;background-color:var(--kq-fill-color-light);font-weight:700;padding:0 16px;font-size:16px}.kq3d-airspace-profile-analysis .kq-collapse .kq-collapse-item__arrow{margin:0 0 0 auto}.kq3d-airspace-profile-analysis .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content{padding-bottom:unset;border:unset;padding-top:10px}.kq3d-airspace-profile-analysis .kq-form-item{margin-bottom:8px}.kq3d-airspace-profile-analysis .kq-form-item__content{text-align:end;display:block}.kq3d-airspace-profile-analysis .kq-row{display:block}.kq3d-airspace-profile-analysis .kq-slider{width:95%;padding-left:7px}.kq3d-airspace-profile-analysis .kq-slider .kq-slider__button{width:14px;height:14px}.kq3d-airspace-profile-analysis .kq-input-number.is-controls-right{width:65px}.kq3d-airspace-profile-analysis .kq-input-number.is-controls-right .kq-input-number__decrease,.kq3d-airspace-profile-analysis .kq-input-number.is-controls-right .kq-input-number__increase{width:20px}.kq3d-airspace-profile-analysis .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-airspace-profile-analysis .kq-input-number.is-controls-right .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-airspace-profile-analysis .kq-radio-group{float:left}.kq3d-airspace-profile-analysis .kq-radio__input{display:inline;vertical-align:top}.kq3d-airspace-profile-analysis .kq3d-airspace-profile-analysis-footer{text-align:right;padding:16px 0 0}
|
package/buildpointmodel/index.js
CHANGED
|
@@ -932,8 +932,8 @@ class BuildPointModelViewModel {
|
|
|
932
932
|
PMExtrudedCylinder: () => ({
|
|
933
933
|
...baseConfig,
|
|
934
934
|
slices: util.getNumberValue(properties, that._options, "slicesFields", "slices", _BuildPointModelUtil.GEOMETRY_DEFAULT_CONFIG.SLICES),
|
|
935
|
-
heights:
|
|
936
|
-
radii:
|
|
935
|
+
heights: (that._options.heights || '').split(',').map(s => s.trim()).filter(Boolean).map(Number),
|
|
936
|
+
radii: (that._options.radii || '').split(',').map(s => s.trim()).filter(Boolean).map(Number)
|
|
937
937
|
}),
|
|
938
938
|
PMWedge: () => ({
|
|
939
939
|
...baseConfig,
|
|
@@ -948,7 +948,7 @@ class BuildPointModelViewModel {
|
|
|
948
948
|
PMCustomPointModel: () => ({
|
|
949
949
|
...baseConfig,
|
|
950
950
|
stretchHeight: that._options.stretchHeight ?? 20,
|
|
951
|
-
coordinates:
|
|
951
|
+
coordinates: that._safelyParse(that._options.coordinates),
|
|
952
952
|
scale: {
|
|
953
953
|
x: that._options.scaleX ?? 1,
|
|
954
954
|
y: that._options.scaleY ?? 1
|
|
@@ -1014,13 +1014,53 @@ class BuildPointModelViewModel {
|
|
|
1014
1014
|
ofModelName: () => {
|
|
1015
1015
|
this._pointModel.label = this._options.ofModelName || this._pointModel.label;
|
|
1016
1016
|
},
|
|
1017
|
+
heights: () => {
|
|
1018
|
+
this._pointModel.heights = (this._options.heights || '').split(',').map(s => s.trim()).filter(Boolean).map(Number);
|
|
1019
|
+
},
|
|
1020
|
+
radii: () => {
|
|
1021
|
+
this._pointModel.radii = (this._options.radii || '').split(',').map(s => s.trim()).filter(Boolean).map(Number);
|
|
1022
|
+
},
|
|
1023
|
+
coordinates: () => {
|
|
1024
|
+
this._pointModel.coordinates = this._safelyParse(this._options.coordinates);
|
|
1025
|
+
},
|
|
1017
1026
|
default: () => {
|
|
1018
1027
|
this._pointModel[key] = this._options[key];
|
|
1019
1028
|
}
|
|
1020
1029
|
};
|
|
1021
1030
|
(paramUpdater[key] || paramUpdater.default)();
|
|
1022
1031
|
}
|
|
1032
|
+
/**
|
|
1033
|
+
* 安全解析类JSON字符串(兼容单引号、标准双引号)
|
|
1034
|
+
* @param {string|any} data 字符串/普通值
|
|
1035
|
+
* @returns {any|null} 解析结果
|
|
1036
|
+
*/
|
|
1037
|
+
_safelyParse(data) {
|
|
1038
|
+
// 非字符串直接原值返回
|
|
1039
|
+
if (typeof data !== 'string') return data;
|
|
1040
|
+
const str = data.trim();
|
|
1041
|
+
if (!str) return null;
|
|
1023
1042
|
|
|
1043
|
+
// 第一层:优先解析标准合法JSON(双引号,无多余替换,性能最好)
|
|
1044
|
+
try {
|
|
1045
|
+
return JSON.parse(str);
|
|
1046
|
+
} catch (err) {
|
|
1047
|
+
// 第二层:处理单引号包裹的json
|
|
1048
|
+
let temp = str.replace(/(?<!\\)'(?=[\w_]+:)/g, '"'); // 仅替换键名单引号
|
|
1049
|
+
temp = temp.replace(/(:\s*)'(.*?)(?<!\\)'/g, '$1"$2"'); // 仅替换值单引号
|
|
1050
|
+
try {
|
|
1051
|
+
return JSON.parse(temp);
|
|
1052
|
+
} catch (err2) {
|
|
1053
|
+
// 第三层:处理无引号键 {x:1,y:2} 格式
|
|
1054
|
+
temp = temp.replace(/([{,]\s*)(\w+)(\s*:)/g, '$1"$2"$3');
|
|
1055
|
+
try {
|
|
1056
|
+
return JSON.parse(temp);
|
|
1057
|
+
} catch (err3) {
|
|
1058
|
+
// 全部解析失败返回null
|
|
1059
|
+
return null;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1024
1064
|
/**
|
|
1025
1065
|
* 提取属性字段(对外暴露,复用工具类方法)
|
|
1026
1066
|
* @param {Object} geojsonData - GeoJSON数据
|
|
@@ -1704,34 +1744,74 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
1704
1744
|
});
|
|
1705
1745
|
initScroll();
|
|
1706
1746
|
});
|
|
1707
|
-
|
|
1747
|
+
/**
|
|
1748
|
+
* 安全解析类JSON字符串
|
|
1749
|
+
* 兼容:标准双引号JSON / 单引号JSON / 无引号键名对象数组 / 多行换行字符串
|
|
1750
|
+
* @param {string|any} data 字符串/普通值
|
|
1751
|
+
* @returns {any|null} 解析结果,失败返回null
|
|
1752
|
+
*/
|
|
1753
|
+
function safelyParse(data) {
|
|
1754
|
+
// 非字符串直接原值返回
|
|
1755
|
+
if (typeof data !== 'string') return data;
|
|
1756
|
+
const str = data.trim();
|
|
1757
|
+
if (!str) return null;
|
|
1758
|
+
|
|
1759
|
+
// 第一层:优先解析标准合法JSON(双引号,无多余替换,性能最好)
|
|
1760
|
+
try {
|
|
1761
|
+
return JSON.parse(str);
|
|
1762
|
+
} catch (err) {
|
|
1763
|
+
// 第二层:处理单引号包裹的json
|
|
1764
|
+
let temp = str.replace(/(?<!\\)'(?=[\w_]+:)/g, '"'); // 仅替换键名单引号
|
|
1765
|
+
temp = temp.replace(/(:\s*)'(.*?)(?<!\\)'/g, '$1"$2"'); // 仅替换值单引号
|
|
1766
|
+
try {
|
|
1767
|
+
return JSON.parse(temp);
|
|
1768
|
+
} catch (err2) {
|
|
1769
|
+
// 第三层:处理无引号键 {x:1,y:2} 格式
|
|
1770
|
+
temp = temp.replace(/([{,]\s*)(\w+)(\s*:)/g, '$1"$2"$3');
|
|
1771
|
+
try {
|
|
1772
|
+
return JSON.parse(temp);
|
|
1773
|
+
} catch (err3) {
|
|
1774
|
+
// 全部解析失败返回null
|
|
1775
|
+
return null;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* 校验是否为有效数字
|
|
1783
|
+
* @param {*} val
|
|
1784
|
+
* @returns {boolean}
|
|
1785
|
+
*/
|
|
1786
|
+
function isEffectiveNumber(val) {
|
|
1787
|
+
const num = Number(val);
|
|
1788
|
+
return !isNaN(num) && isFinite(num);
|
|
1789
|
+
}
|
|
1708
1790
|
const isDisabled = (0, _vue.computed)(() => {
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1791
|
+
const geometry = currentItemGeometry.value;
|
|
1792
|
+
// 无几何配置直接禁用
|
|
1793
|
+
if (!geometry?.value) return true;
|
|
1794
|
+
const type = geometry.value;
|
|
1712
1795
|
|
|
1713
|
-
//
|
|
1796
|
+
// 圆柱体:高度、半径必须为有效数字
|
|
1714
1797
|
if (type === 'PMExtrudedCylinder') {
|
|
1715
|
-
return !(formItem.heights && formItem.radii
|
|
1798
|
+
return !(formItem.heights && formItem.radii);
|
|
1716
1799
|
}
|
|
1717
1800
|
|
|
1718
|
-
//
|
|
1801
|
+
// 自定义点模型:解析后必须是非空数组,且每个点 x/y 都是有效数字
|
|
1719
1802
|
if (type === 'PMCustomPointModel') {
|
|
1720
|
-
|
|
1803
|
+
const coords = safelyParse(formItem.coordinates);
|
|
1804
|
+
// 校验:是数组 + 数组不为空
|
|
1805
|
+
if (!Array.isArray(coords) || coords.length === 0) return true;
|
|
1806
|
+
// 校验每一个坐标点
|
|
1807
|
+
return coords.some(point => {
|
|
1808
|
+
return !(isEffectiveNumber(point.x) && isEffectiveNumber(point.y));
|
|
1809
|
+
});
|
|
1721
1810
|
}
|
|
1722
1811
|
|
|
1723
|
-
//
|
|
1812
|
+
// 其他类型:不禁用
|
|
1724
1813
|
return false;
|
|
1725
1814
|
});
|
|
1726
|
-
|
|
1727
|
-
// 工具函数:安全解析 JSON,防止报错
|
|
1728
|
-
function safelyParse(str) {
|
|
1729
|
-
try {
|
|
1730
|
-
return JSON.parse(str);
|
|
1731
|
-
} catch {
|
|
1732
|
-
return null;
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
1815
|
function initScroll() {
|
|
1736
1816
|
const el = scrollBox.value;
|
|
1737
1817
|
if (!el) return;
|
|
@@ -1910,8 +1990,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
1910
1990
|
topSlopeY: topSlopeY ?? formItem.topSlopeY,
|
|
1911
1991
|
bottomSlopeX: bottomSlopeX ?? formItem.bottomSlopeX,
|
|
1912
1992
|
bottomSlopeY: bottomSlopeY ?? formItem.bottomSlopeY,
|
|
1913
|
-
heights: heights
|
|
1914
|
-
radii: radii
|
|
1993
|
+
heights: heights ? Array.isArray(heights) ? heights.join(",") : heights : formItem.heights,
|
|
1994
|
+
radii: radii ? Array.isArray(radii) ? radii.join(",") : radii : formItem.radii,
|
|
1915
1995
|
bottomLength: bottomLength ?? formItem.bottomLength,
|
|
1916
1996
|
bottomWidth: bottomWidth ?? formItem.bottomWidth,
|
|
1917
1997
|
topLength: topLength ?? formItem.topLength,
|
|
@@ -1919,7 +1999,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
1919
1999
|
topCenterOffsetX: topCenterOffsetX ?? formItem.topCenterOffsetX,
|
|
1920
2000
|
topCenterOffsetY: topCenterOffsetY ?? formItem.topCenterOffsetY,
|
|
1921
2001
|
stretchHeight: stretchHeight ?? formItem.stretchHeight,
|
|
1922
|
-
coordinates: coordinates
|
|
2002
|
+
coordinates: coordinates ? Array.isArray(coordinates) ? JSON.stringify(coordinates) : coordinates : formItem.coordinates
|
|
1923
2003
|
});
|
|
1924
2004
|
if (modelingType == "geometrySymbol") {
|
|
1925
2005
|
currentItemGeometry.value = {
|
|
@@ -4308,7 +4388,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4308
4388
|
style: {
|
|
4309
4389
|
"width": "100%"
|
|
4310
4390
|
},
|
|
4311
|
-
placeholder: "
|
|
4391
|
+
placeholder: "0, 200, 400, 600"
|
|
4312
4392
|
}, null, 8 /* PROPS */, ["modelValue"])]),
|
|
4313
4393
|
_: 1 /* STABLE */
|
|
4314
4394
|
})]),
|
|
@@ -4335,7 +4415,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4335
4415
|
style: {
|
|
4336
4416
|
"width": "100%"
|
|
4337
4417
|
},
|
|
4338
|
-
placeholder: "
|
|
4418
|
+
placeholder: "100, 50, 150, 80"
|
|
4339
4419
|
}, null, 8 /* PROPS */, ["modelValue"])]),
|
|
4340
4420
|
_: 1 /* STABLE */
|
|
4341
4421
|
})]),
|
|
@@ -4642,7 +4722,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4642
4722
|
style: {
|
|
4643
4723
|
"width": "100%"
|
|
4644
4724
|
},
|
|
4645
|
-
placeholder: "[{x: 0, y: -10},{x: 2.469, y: -3.399},{x: 9.511, y: -3.090},{x: 3.995, y: 1.298}]"
|
|
4725
|
+
placeholder: "[{'x': 0, 'y': -10},{'x': 2.469, 'y': -3.399},{'x': 9.511, 'y': -3.090},{'x': 3.995, 'y': 1.298}]"
|
|
4646
4726
|
}, null, 8 /* PROPS */, ["modelValue"])]),
|
|
4647
4727
|
_: 1 /* STABLE */
|
|
4648
4728
|
})]),
|
|
@@ -4707,7 +4787,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4707
4787
|
min: (0, _vue.unref)(formItem).minScale,
|
|
4708
4788
|
max: (0, _vue.unref)(formItem).maxScale,
|
|
4709
4789
|
step: (0, _vue.unref)(formItem).scaleStep,
|
|
4710
|
-
onChange: _cache[212] || (_cache[212] = $event => paramsChanged('
|
|
4790
|
+
onChange: _cache[212] || (_cache[212] = $event => paramsChanged('scale'))
|
|
4711
4791
|
}, null, 8 /* PROPS */, ["modelValue", "min", "max", "step"])]),
|
|
4712
4792
|
_: 1 /* STABLE */
|
|
4713
4793
|
}), (0, _vue.createVNode)(_component_kq_col, {
|
|
@@ -4720,7 +4800,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4720
4800
|
max: (0, _vue.unref)(formItem).maxScale,
|
|
4721
4801
|
step: (0, _vue.unref)(formItem).scaleStep,
|
|
4722
4802
|
"controls-position": "right",
|
|
4723
|
-
onChange: _cache[214] || (_cache[214] = $event => paramsChanged('
|
|
4803
|
+
onChange: _cache[214] || (_cache[214] = $event => paramsChanged('scale'))
|
|
4724
4804
|
}, null, 8 /* PROPS */, ["modelValue", "min", "max", "step"])]),
|
|
4725
4805
|
_: 1 /* STABLE */
|
|
4726
4806
|
})]),
|
|
@@ -4747,7 +4827,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4747
4827
|
min: (0, _vue.unref)(formItem).minScale,
|
|
4748
4828
|
max: (0, _vue.unref)(formItem).maxScale,
|
|
4749
4829
|
step: (0, _vue.unref)(formItem).scaleStep,
|
|
4750
|
-
onChange: _cache[216] || (_cache[216] = $event => paramsChanged('
|
|
4830
|
+
onChange: _cache[216] || (_cache[216] = $event => paramsChanged('scale'))
|
|
4751
4831
|
}, null, 8 /* PROPS */, ["modelValue", "min", "max", "step"])]),
|
|
4752
4832
|
_: 1 /* STABLE */
|
|
4753
4833
|
}), (0, _vue.createVNode)(_component_kq_col, {
|
|
@@ -4760,7 +4840,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
4760
4840
|
max: (0, _vue.unref)(formItem).maxScale,
|
|
4761
4841
|
step: (0, _vue.unref)(formItem).scaleStep,
|
|
4762
4842
|
"controls-position": "right",
|
|
4763
|
-
onChange: _cache[218] || (_cache[218] = $event => paramsChanged('
|
|
4843
|
+
onChange: _cache[218] || (_cache[218] = $event => paramsChanged('scale'))
|
|
4764
4844
|
}, null, 8 /* PROPS */, ["modelValue", "min", "max", "step"])]),
|
|
4765
4845
|
_: 1 /* STABLE */
|
|
4766
4846
|
})]),
|