@kq_npm/client3d_webgl_vue 4.5.55 → 4.5.57
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 +189 -21
- package/airspacegridoccupancyquery/index.js +1977 -0
- package/airspacegridoccupancyquery/style/airspacegridoccupancyquery.css +1 -0
- package/airspacegridoccupancyquery/style/index.js +3 -0
- package/airspaceprofileanalysis/index.js +1870 -0
- package/airspaceprofileanalysis/style/airspaceprofileanalysis.css +1 -0
- package/airspaceprofileanalysis/style/index.js +3 -0
- package/aspectanalysis/index.js +25 -7
- package/baseterraingallery/index.js +16 -4
- package/boxclip/index.js +58 -16
- package/buildpointmodel/index.js +3207 -230
- package/buildpointmodel/style/buildpointmodel.css +1 -1
- package/buildpolygonmodel/index.js +205 -81
- package/buildpolylinemodel/index.js +346 -70
- package/clientPrint/index.js +32440 -2337
- package/comparemap/index.js +132 -60
- package/compass/index.js +16 -6
- package/excavatefillanalysis/index.js +51 -7
- package/fixedzoomin/index.js +24 -7
- package/fixedzoomout/index.js +25 -7
- package/flight/index.js +113 -26
- package/floodanalysis/index.js +79 -14
- package/geologicalbodyanalysis/index.js +41 -5
- package/gpuspatialquery/index.js +127 -19
- package/gridoccupancyquery/index.js +627 -0
- package/gridoccupancyquery/style/gridoccupancyquery.css +1 -0
- package/gridoccupancyquery/style/index.js +3 -0
- package/hawkeye/index.js +20 -2
- package/headertemp/index.js +7 -2
- package/heatmap3d/index.js +282 -158
- package/index.js +32440 -2337
- package/isolineanalysis/index.js +113 -38
- package/light/index.js +80 -22
- package/limitheightanalysis/index.js +30 -10
- package/lowaltitudefeature/index.js +5027 -0
- package/lowaltitudefeature/style/index.js +3 -0
- package/lowaltitudefeature/style/lowaltitudefeature.css +1 -0
- package/measure/index.js +60 -19
- package/modelFlat/index.js +48 -8
- package/modeledit/index.js +38 -4
- package/modelexcavate/index.js +48 -7
- package/modelfilter/index.js +51 -8
- package/modelmaterialedit/index.js +127 -25
- package/modelprofileanalysis/index.js +51 -14
- package/modelselect/index.js +34 -3
- package/modelstyleedit/index.js +39 -3
- package/modeltransform/index.js +79 -14
- package/package.json +1 -1
- package/particleeffect/index.js +83 -17
- package/planeclip/index.js +66 -17
- package/pointcloudrender/index.js +134 -15
- package/radarscananalysis/index.js +35 -3
- package/resetview/index.js +14 -6
- package/roller/index.js +55 -18
- package/scaneffect/index.js +98 -29
- package/sceneadvancedtoimage/index.js +32 -6
- package/sceneapp/index.js +32440 -2337
- package/sceneset/index.js +141 -71
- package/scenetohdimage/index.js +23 -3
- package/sceneview/index.js +32440 -2337
- package/sceneview/style/sceneview.css +1 -1
- package/screenshot/index.js +44 -11
- package/shadowanalysis/index.js +79 -19
- package/sightlineanalysis/index.js +66 -15
- package/skylineanalysis/index.js +20 -4
- package/slopeanalysis/index.js +75 -16
- package/slopeaspectanalysis/index.js +128 -26
- package/statusbar/index.js +80 -67
- package/style.css +1 -1
- package/terrainoperation/index.js +39 -7
- package/terrainprofileanalysis/index.js +43 -5
- package/toolbarapp/index.js +32440 -2337
- package/toolboxapp/index.js +32440 -2337
- package/typhoontrac/index.js +134 -16
- package/underground/index.js +8 -2
- package/videofusion/index.js +164 -79
- package/videoproject/index.js +77 -23
- package/viewshedanalysis/index.js +61 -14
- package/weathereffect/index.js +73 -18
- package/webgl.es.js +866 -16
- package/windyslicing/index.js +258 -54
- package/wireframesketch/index.js +25 -8
|
@@ -12,7 +12,7 @@ return /******/ (function() { // webpackBootstrap
|
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/
|
|
15
|
+
/***/ 4152:
|
|
16
16
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17
17
|
|
|
18
18
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76314);
|
|
@@ -21,7 +21,7 @@ return /******/ (function() { // webpackBootstrap
|
|
|
21
21
|
|
|
22
22
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
23
23
|
// Module
|
|
24
|
-
___CSS_LOADER_EXPORT___.push([module.id, "\n.simple-filter-select[data-v-
|
|
24
|
+
___CSS_LOADER_EXPORT___.push([module.id, "\n.simple-filter-select[data-v-8bb64ace] {\r\n width: 100%;\n}\n.option-content[data-v-8bb64ace] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 4px;\n}\n.option-text[data-v-8bb64ace] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.icon-class[data-v-8bb64ace] {\r\n font-size: 14px;\r\n padding: 4px;\n}\n.icon-class[data-v-8bb64ace]:hover {\r\n color: var(--kq-color-danger);\n}\n[data-v-8bb64ace] .kq-option:hover .delete-btn {\r\n opacity: 1;\n}\n[data-v-8bb64ace] .custom-select-popper {\r\n --kq-select-dropdown-item-padding: 4px 8px;\n}\n[data-v-8bb64ace] .kq-option {\r\n padding: 0 !important;\n}\r\n", ""]);
|
|
25
25
|
// Exports
|
|
26
26
|
/* harmony default export */ __webpack_exports__.A = (___CSS_LOADER_EXPORT___);
|
|
27
27
|
|
|
@@ -56,7 +56,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__22686__;
|
|
|
56
56
|
|
|
57
57
|
/***/ }),
|
|
58
58
|
|
|
59
|
-
/***/
|
|
59
|
+
/***/ 29371:
|
|
60
|
+
/***/ (function(module) {
|
|
61
|
+
|
|
62
|
+
module.exports = require("@element-plus/icons-vue");
|
|
63
|
+
|
|
64
|
+
/***/ }),
|
|
65
|
+
|
|
66
|
+
/***/ 33751:
|
|
67
|
+
/***/ (function(module) {
|
|
68
|
+
|
|
69
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
70
|
+
|
|
71
|
+
/***/ }),
|
|
72
|
+
|
|
73
|
+
/***/ 42975:
|
|
74
|
+
/***/ (function(module) {
|
|
75
|
+
|
|
76
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__42975__;
|
|
77
|
+
|
|
78
|
+
/***/ }),
|
|
79
|
+
|
|
80
|
+
/***/ 46066:
|
|
60
81
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
61
82
|
|
|
62
83
|
// ESM COMPAT FLAG
|
|
@@ -75,9 +96,9 @@ var filterConditionSelectvue_type_script_setup_true_lang_js = __webpack_require_
|
|
|
75
96
|
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
76
97
|
var injectStylesIntoStyleTag = __webpack_require__(85072);
|
|
77
98
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
|
|
78
|
-
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
79
|
-
var
|
|
80
|
-
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
99
|
+
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=8bb64ace&scoped=true&lang=css
|
|
100
|
+
var filterConditionSelectvue_type_style_index_0_id_8bb64ace_scoped_true_lang_css = __webpack_require__(4152);
|
|
101
|
+
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=8bb64ace&scoped=true&lang=css
|
|
81
102
|
|
|
82
103
|
|
|
83
104
|
|
|
@@ -86,12 +107,12 @@ var options = {};
|
|
|
86
107
|
options.insert = "head";
|
|
87
108
|
options.singleton = false;
|
|
88
109
|
|
|
89
|
-
var update = injectStylesIntoStyleTag_default()(
|
|
110
|
+
var update = injectStylesIntoStyleTag_default()(filterConditionSelectvue_type_style_index_0_id_8bb64ace_scoped_true_lang_css/* default */.A, options);
|
|
90
111
|
|
|
91
112
|
|
|
92
113
|
|
|
93
|
-
/* harmony default export */ var
|
|
94
|
-
;// ./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
114
|
+
/* harmony default export */ var buildpolylinemodel_filterConditionSelectvue_type_style_index_0_id_8bb64ace_scoped_true_lang_css = (filterConditionSelectvue_type_style_index_0_id_8bb64ace_scoped_true_lang_css/* default */.A.locals || {});
|
|
115
|
+
;// ./src/webgl/buildpolylinemodel/filterConditionSelect.vue?vue&type=style&index=0&id=8bb64ace&scoped=true&lang=css
|
|
95
116
|
|
|
96
117
|
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
|
|
97
118
|
var exportHelper = __webpack_require__(66262);
|
|
@@ -102,33 +123,12 @@ var exportHelper = __webpack_require__(66262);
|
|
|
102
123
|
;
|
|
103
124
|
|
|
104
125
|
|
|
105
|
-
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(filterConditionSelectvue_type_script_setup_true_lang_js/* default */.A, [['__scopeId',"data-v-
|
|
126
|
+
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(filterConditionSelectvue_type_script_setup_true_lang_js/* default */.A, [['__scopeId',"data-v-8bb64ace"]])
|
|
106
127
|
|
|
107
128
|
/* harmony default export */ var filterConditionSelect = (__exports__);
|
|
108
129
|
|
|
109
130
|
/***/ }),
|
|
110
131
|
|
|
111
|
-
/***/ 29371:
|
|
112
|
-
/***/ (function(module) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("@element-plus/icons-vue");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
|
-
/***/ 33751:
|
|
119
|
-
/***/ (function(module) {
|
|
120
|
-
|
|
121
|
-
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
122
|
-
|
|
123
|
-
/***/ }),
|
|
124
|
-
|
|
125
|
-
/***/ 42975:
|
|
126
|
-
/***/ (function(module) {
|
|
127
|
-
|
|
128
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__42975__;
|
|
129
|
-
|
|
130
|
-
/***/ }),
|
|
131
|
-
|
|
132
132
|
/***/ 48232:
|
|
133
133
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
134
134
|
|
|
@@ -145,12 +145,23 @@ var _useGlobalConfig = __webpack_require__(22686);
|
|
|
145
145
|
// BuildPolylineModelViewModel.js
|
|
146
146
|
|
|
147
147
|
class BuildPolylineModelViewModel {
|
|
148
|
+
// 国际化语言对象
|
|
149
|
+
/**
|
|
150
|
+
* @description 构造函数
|
|
151
|
+
* @param {Object} scenceView 三维场景视图
|
|
152
|
+
* @param {Object} formItem 表单配置项
|
|
153
|
+
*/
|
|
148
154
|
constructor(scenceView, formItem) {
|
|
149
155
|
this._options = {};
|
|
156
|
+
// 表单配置项
|
|
150
157
|
this._scenceView = null;
|
|
158
|
+
// 三维场景视图
|
|
151
159
|
this._layerData = null;
|
|
160
|
+
// 输入的 geojson 数据
|
|
152
161
|
this._polylineModel = null;
|
|
162
|
+
// 当前编辑的线模型
|
|
153
163
|
this._polylineModels = [];
|
|
164
|
+
// 生成的线模型集合
|
|
154
165
|
this._language = null;
|
|
155
166
|
this._scenceView = scenceView;
|
|
156
167
|
this._options = formItem;
|
|
@@ -160,7 +171,11 @@ class BuildPolylineModelViewModel {
|
|
|
160
171
|
this._language = locale;
|
|
161
172
|
}
|
|
162
173
|
|
|
163
|
-
|
|
174
|
+
/**
|
|
175
|
+
* @description 通过 key 获取已存在的线模型并执行回调
|
|
176
|
+
* @param {String} key 模型 id
|
|
177
|
+
* @param {Function} cb 回调函数
|
|
178
|
+
*/
|
|
164
179
|
getPolylineModel(key, cb) {
|
|
165
180
|
const primitives = this?._scenceView?._viewer?.scene?.primitives?._primitives ?? [];
|
|
166
181
|
this._polylineModel = primitives.find(element => element._key === key);
|
|
@@ -169,9 +184,15 @@ class BuildPolylineModelViewModel {
|
|
|
169
184
|
}
|
|
170
185
|
}
|
|
171
186
|
|
|
172
|
-
|
|
187
|
+
/**
|
|
188
|
+
* @description 参数变化处理,将变更同步至当前编辑模型
|
|
189
|
+
* @param {String} key 参数名
|
|
190
|
+
* @param {Object} editMode 编辑模式(add:新增,其他:编辑)
|
|
191
|
+
*/
|
|
173
192
|
paramsChanged(key, editMode) {
|
|
193
|
+
// 新增模式不处理参数变更
|
|
174
194
|
if (editMode.value === "add") return;
|
|
195
|
+
// 无编辑模型时提示并返回
|
|
175
196
|
if (!this._polylineModel) {
|
|
176
197
|
(0, _message.default)({
|
|
177
198
|
message: this._language.value.webgl.noEditModelData,
|
|
@@ -179,6 +200,7 @@ class BuildPolylineModelViewModel {
|
|
|
179
200
|
});
|
|
180
201
|
return;
|
|
181
202
|
}
|
|
203
|
+
// 参数处理映射表
|
|
182
204
|
const paramHandlers = {
|
|
183
205
|
customShape: () => this._handleCustomShape(),
|
|
184
206
|
shape: () => this._handleShape(key),
|
|
@@ -194,18 +216,26 @@ class BuildPolylineModelViewModel {
|
|
|
194
216
|
wallTopTexture: () => this._wallTexture(key),
|
|
195
217
|
groundHeight: () => this._groundHeight(key)
|
|
196
218
|
};
|
|
219
|
+
|
|
220
|
+
// 默认处理:直接赋值
|
|
197
221
|
const handler = paramHandlers[key] || (() => {
|
|
198
222
|
this._polylineModel[key] = this._options[key];
|
|
199
223
|
});
|
|
200
224
|
handler();
|
|
201
225
|
}
|
|
202
226
|
|
|
203
|
-
|
|
227
|
+
/**
|
|
228
|
+
* @description 生成线模型
|
|
229
|
+
* @param {String} type 模型类型
|
|
230
|
+
* @param {Function} cb 生成完成回调函数
|
|
231
|
+
*/
|
|
204
232
|
generated(type, cb) {
|
|
205
233
|
if (!this._validateInput(type)) return;
|
|
206
234
|
try {
|
|
207
235
|
this._polylineModels = [];
|
|
208
236
|
const features = this._getValidFeatures();
|
|
237
|
+
|
|
238
|
+
// 无有效要素数据时提示
|
|
209
239
|
if (!features?.length) {
|
|
210
240
|
_message.default.warning(this._language.value.webgl.noGeoJSONData);
|
|
211
241
|
return;
|
|
@@ -217,7 +247,11 @@ class BuildPolylineModelViewModel {
|
|
|
217
247
|
}
|
|
218
248
|
}
|
|
219
249
|
|
|
220
|
-
|
|
250
|
+
/**
|
|
251
|
+
* @description 校验输入数据是否有效
|
|
252
|
+
* @param {String} type 模型类型
|
|
253
|
+
* @returns {Boolean} 校验是否通过
|
|
254
|
+
*/
|
|
221
255
|
_validateInput(type) {
|
|
222
256
|
if (!this._layerData) {
|
|
223
257
|
_message.default.warning(this._language.value.webgl.noGeoJSONData);
|
|
@@ -225,10 +259,18 @@ class BuildPolylineModelViewModel {
|
|
|
225
259
|
}
|
|
226
260
|
return true;
|
|
227
261
|
}
|
|
262
|
+
|
|
263
|
+
// 获取过滤并处理后的有效要素数组
|
|
228
264
|
_getValidFeatures() {
|
|
229
265
|
const filteredData = _polylineModelUtils.DataProcessor.filterData(this._layerData, this._options.selectModelId);
|
|
230
266
|
return _polylineModelUtils.DataProcessor.processGeoJSON(filteredData);
|
|
231
267
|
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @description 遍历要素创建线模型
|
|
271
|
+
* @param {String} type 模型类型
|
|
272
|
+
* @param {Array} features 要素数组
|
|
273
|
+
*/
|
|
232
274
|
_createModels(type, features) {
|
|
233
275
|
features.forEach((feature, index) => {
|
|
234
276
|
const {
|
|
@@ -242,8 +284,18 @@ class BuildPolylineModelViewModel {
|
|
|
242
284
|
this._addModelToScene(type, config);
|
|
243
285
|
});
|
|
244
286
|
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @description 根据类型生成模型配置
|
|
290
|
+
* @param {String} type 模型类型
|
|
291
|
+
* @param {Object} properties 要素属性
|
|
292
|
+
* @param {Array} positions 坐标点数组
|
|
293
|
+
* @param {Number} index 要素索引
|
|
294
|
+
* @returns {Object} 模型配置对象
|
|
295
|
+
*/
|
|
245
296
|
_createModelConfig(type, properties, positions, index) {
|
|
246
297
|
const baseConfig = _polylineModelUtils.ModelConfigGenerator.getBaseConfig(type, properties, positions, index, this._options);
|
|
298
|
+
// 按模型类型生成特定配置
|
|
247
299
|
const typeConfigs = {
|
|
248
300
|
[_polylineModelUtils.MODEL_TYPES.ROAD]: _polylineModelUtils.ModelConfigGenerator.getRoadWallConfig(properties, positions, this._options),
|
|
249
301
|
[_polylineModelUtils.MODEL_TYPES.WALL]: _polylineModelUtils.ModelConfigGenerator.getRoadWallConfig(properties, positions, this._options),
|
|
@@ -256,6 +308,12 @@ class BuildPolylineModelViewModel {
|
|
|
256
308
|
...(typeConfigs[type] || {})
|
|
257
309
|
};
|
|
258
310
|
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @description 将模型添加到场景中
|
|
314
|
+
* @param {String} type 模型类型
|
|
315
|
+
* @param {Object} config 模型配置
|
|
316
|
+
*/
|
|
259
317
|
_addModelToScene(type, config) {
|
|
260
318
|
try {
|
|
261
319
|
//开启深度检测,放置飘
|
|
@@ -267,46 +325,68 @@ class BuildPolylineModelViewModel {
|
|
|
267
325
|
console.error(`创建 ${type} 模型失败:`, error);
|
|
268
326
|
}
|
|
269
327
|
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @description 触发生成完成回调
|
|
331
|
+
* @param {Function} cb 回调函数
|
|
332
|
+
*/
|
|
270
333
|
_invokeCallback(cb) {
|
|
271
334
|
if (typeof cb === "function" && this._polylineModels?.length > 0) {
|
|
272
335
|
cb(this._polylineModels);
|
|
273
336
|
}
|
|
274
337
|
}
|
|
275
338
|
|
|
276
|
-
//
|
|
339
|
+
// 处理自定义形状参数
|
|
277
340
|
_handleCustomShape() {
|
|
278
341
|
if (this._options.customShape) {
|
|
279
342
|
this._polylineModel.customShape = JSON.parse(this._options.customShape);
|
|
280
343
|
this._polylineModel.shape = "custom";
|
|
281
344
|
}
|
|
282
345
|
}
|
|
283
|
-
|
|
346
|
+
/**
|
|
347
|
+
* @description 处理形状参数变化
|
|
348
|
+
* @param {String} key 参数名
|
|
349
|
+
*/
|
|
284
350
|
_handleShape(key) {
|
|
285
351
|
const shape = this._options?.shape || this._polylineModel.shape;
|
|
286
352
|
const isFlowingType = ["circle", "semicircle"].includes(shape);
|
|
287
353
|
const isSimpleType = ["box", "arch", "concavity"].includes(shape);
|
|
288
354
|
this._polylineModel.shape = shape;
|
|
355
|
+
// 流动类型使用管道贴图
|
|
289
356
|
if (isFlowingType) {
|
|
290
357
|
this._handleImage("pipeImage");
|
|
291
358
|
} else if (isSimpleType) {
|
|
359
|
+
// 简单类型清空贴图
|
|
292
360
|
this._polylineModel.image = "null";
|
|
293
361
|
}
|
|
294
362
|
}
|
|
363
|
+
|
|
364
|
+
// 处理偏移参数
|
|
295
365
|
_handleOffset() {
|
|
296
366
|
this._polylineModel.offset = {
|
|
297
367
|
x: this._options.offsetX,
|
|
298
368
|
y: this._options.offsetY
|
|
299
369
|
};
|
|
300
370
|
}
|
|
371
|
+
|
|
372
|
+
// 处理模型名称参数
|
|
301
373
|
_handleModelName() {
|
|
302
374
|
this._polylineModel.label = this._options.ofModelName || this._polylineModel.label;
|
|
303
375
|
}
|
|
376
|
+
|
|
377
|
+
// 处理道路高度参数
|
|
304
378
|
_handleRoadHeight() {
|
|
305
379
|
this._polylineModel.height = this._options.roadHeight || this._polylineModel.height;
|
|
306
380
|
}
|
|
381
|
+
|
|
382
|
+
// 处理半径参数
|
|
307
383
|
_handleRadius() {
|
|
308
384
|
this._polylineModel.width = this._options.radius || this._polylineModel.width;
|
|
309
385
|
}
|
|
386
|
+
/**
|
|
387
|
+
* @description 处理地面高度参数,水系放样时更新 height
|
|
388
|
+
* @param {String} key 参数名
|
|
389
|
+
*/
|
|
310
390
|
_groundHeight(key) {
|
|
311
391
|
if (this._polylineModel?._modelingType == "waterLofting") {
|
|
312
392
|
this._polylineModel.height = this._options[key];
|
|
@@ -314,30 +394,49 @@ class BuildPolylineModelViewModel {
|
|
|
314
394
|
this._polylineModel.groundHeight = this._options[key];
|
|
315
395
|
}
|
|
316
396
|
}
|
|
397
|
+
// 处理水系宽度参数
|
|
317
398
|
_handleWaterWidth() {
|
|
318
399
|
this._polylineModel.width = this._options.waterWidth || this._polylineModel.width;
|
|
319
400
|
}
|
|
401
|
+
// 处理按尺寸重复参数
|
|
320
402
|
_repeatBySize() {
|
|
321
403
|
this._polylineModel.repeatBySize = this._options.repeatBySize == 0 ? true : false;
|
|
322
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* @description 处理贴图参数
|
|
407
|
+
* @param {String} key 参数名
|
|
408
|
+
*/
|
|
323
409
|
_handleImage(key) {
|
|
324
410
|
this._polylineModel.image = this._options[key] || "null";
|
|
325
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* @description 处理墙体纹理参数
|
|
414
|
+
* @param {String} key 参数名
|
|
415
|
+
*/
|
|
326
416
|
_wallTexture(key) {
|
|
327
417
|
this._polylineModel[key] = this._options[key] || "null";
|
|
328
418
|
}
|
|
329
|
-
//
|
|
419
|
+
// 清空模型数据
|
|
330
420
|
clear() {
|
|
331
421
|
this._layerData = null;
|
|
332
422
|
this._polylineModels = [];
|
|
333
423
|
this._polylineModel = null;
|
|
334
424
|
}
|
|
425
|
+
|
|
426
|
+
// 销毁并释放资源
|
|
335
427
|
destroy() {
|
|
336
428
|
this.clear();
|
|
337
429
|
}
|
|
430
|
+
|
|
431
|
+
// 导出已生成的模型集合
|
|
338
432
|
exportModels() {
|
|
339
433
|
return this._polylineModels;
|
|
340
434
|
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @description 导入模型数据并添加到场景
|
|
438
|
+
* @param {Array} jsons 模型 JSON 数据数组
|
|
439
|
+
*/
|
|
341
440
|
importModels(jsons) {
|
|
342
441
|
jsons.forEach(jsonData => {
|
|
343
442
|
try {
|
|
@@ -350,12 +449,35 @@ class BuildPolylineModelViewModel {
|
|
|
350
449
|
}
|
|
351
450
|
|
|
352
451
|
// 保持对外的工具方法接口
|
|
452
|
+
/**
|
|
453
|
+
* @description 获取字符串类型属性值
|
|
454
|
+
* @param {Object} properties 要素属性
|
|
455
|
+
* @param {String} fieldKey 字段映射键
|
|
456
|
+
* @param {String} propKey 属性键
|
|
457
|
+
* @param {String} defaultValue 默认值
|
|
458
|
+
* @returns {String} 属性值
|
|
459
|
+
*/
|
|
353
460
|
getStringValue(properties, fieldKey, propKey, defaultValue = "") {
|
|
354
461
|
return _polylineModelUtils.DataExtractor.getStringValue(properties, fieldKey, propKey, defaultValue, this._options);
|
|
355
462
|
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @description 获取数字类型属性值
|
|
466
|
+
* @param {Object} properties 要素属性
|
|
467
|
+
* @param {String} fieldKey 字段映射键
|
|
468
|
+
* @param {String} propKey 属性键
|
|
469
|
+
* @param {Number} defaultValue 默认值
|
|
470
|
+
* @returns {Number} 属性值
|
|
471
|
+
*/
|
|
356
472
|
getNumberValue(properties, fieldKey, propKey, defaultValue = 0) {
|
|
357
473
|
return _polylineModelUtils.DataExtractor.getNumberValue(properties, fieldKey, propKey, defaultValue, this._options);
|
|
358
474
|
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* @description 提取所有属性字段
|
|
478
|
+
* @param {Object} geojsonData geojson 数据
|
|
479
|
+
* @returns {Array} 属性字段数组
|
|
480
|
+
*/
|
|
359
481
|
extractPropertyFields(geojsonData) {
|
|
360
482
|
return _polylineModelUtils.DataExtractor.extractPropertyFields(geojsonData);
|
|
361
483
|
}
|
|
@@ -421,7 +543,7 @@ var _message = _interopRequireDefault(__webpack_require__(71323));
|
|
|
421
543
|
var _BuildPolylineModelViewModel = _interopRequireDefault(__webpack_require__(48232));
|
|
422
544
|
var _util = __webpack_require__(42975);
|
|
423
545
|
var _useGlobalConfig = __webpack_require__(22686);
|
|
424
|
-
var _filterConditionSelect = _interopRequireDefault(__webpack_require__(
|
|
546
|
+
var _filterConditionSelect = _interopRequireDefault(__webpack_require__(46066));
|
|
425
547
|
const _hoisted_1 = {
|
|
426
548
|
key: 0,
|
|
427
549
|
class: "spanTile"
|
|
@@ -535,7 +657,9 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
535
657
|
const emit = __emit;
|
|
536
658
|
// 获取组件传参
|
|
537
659
|
const props = __props;
|
|
660
|
+
// 当前模式(add:新增,edit:编辑)
|
|
538
661
|
const mode = (0, _vue.computed)(() => props?.settingParams?.mode ?? "add");
|
|
662
|
+
// 表单配置项
|
|
539
663
|
let formItem = (0, _vue.reactive)({
|
|
540
664
|
collapseValue: props?.settingParams?.collapseValue ?? "general",
|
|
541
665
|
// 默认展开属性设置
|
|
@@ -555,10 +679,15 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
555
679
|
offsetY: props?.settingParams?.offsetY ?? 0,
|
|
556
680
|
// 偏移y
|
|
557
681
|
offsetStep: props?.settingParams?.scaleStep ?? 0.1,
|
|
682
|
+
// 偏移步长
|
|
558
683
|
minOffset: props?.settingParams?.minOffset ?? -100,
|
|
684
|
+
// 最小偏移
|
|
559
685
|
maxOffset: props?.settingParams?.maxOffset ?? 100,
|
|
686
|
+
// 最大偏移
|
|
560
687
|
rotate: props?.settingParams?.rotate ?? 0,
|
|
688
|
+
// 旋转角度
|
|
561
689
|
rotateFields: props?.settingParams?.rotateFields ?? "",
|
|
690
|
+
// 旋转字段
|
|
562
691
|
color: props?.settingParams?.color ?? "#FFFFFF",
|
|
563
692
|
// 颜色
|
|
564
693
|
colorFields: props?.settingParams?.colorFields ?? "",
|
|
@@ -675,7 +804,9 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
675
804
|
});
|
|
676
805
|
// 纹理图片
|
|
677
806
|
let materials = (0, _vue.computed)(() => props?.materials || []);
|
|
807
|
+
// 重复模式选项
|
|
678
808
|
const repeatModes = (0, _vue.ref)([locale.value.webgl.actualSize, locale.value.webgl.repeatCount]);
|
|
809
|
+
// 管道类型选项
|
|
679
810
|
const pipelineTypes = (0, _vue.ref)([{
|
|
680
811
|
name: locale.value.webgl.circularPipe,
|
|
681
812
|
value: "circle"
|
|
@@ -692,6 +823,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
692
823
|
name: locale.value.webgl.concavePipe,
|
|
693
824
|
value: "concavity"
|
|
694
825
|
}]);
|
|
826
|
+
// 管道材质选项
|
|
695
827
|
const pipelineMaterials = (0, _vue.ref)([{
|
|
696
828
|
name: locale.value.webgl.circularPipe,
|
|
697
829
|
value: "circle"
|
|
@@ -701,10 +833,12 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
701
833
|
let boxRef = (0, _vue.ref)(null);
|
|
702
834
|
// 生成组件默认header
|
|
703
835
|
let headerTemp = (0, _vue.ref)();
|
|
704
|
-
let headerTempRef = (0, _vue.ref)();
|
|
705
|
-
let viewModel = null;
|
|
706
|
-
let modelingTypes = (0, _vue.ref)(null);
|
|
707
|
-
let propertyFieldsDef = (0, _vue.ref)([]);
|
|
836
|
+
let headerTempRef = (0, _vue.ref)(); // headerTemp 组件引用
|
|
837
|
+
let viewModel = null; // 业务逻辑 ViewModel 实例
|
|
838
|
+
let modelingTypes = (0, _vue.ref)(null); // 当前放样类型
|
|
839
|
+
let propertyFieldsDef = (0, _vue.ref)([]); // 属性字段定义列表
|
|
840
|
+
|
|
841
|
+
// 容器最大高度
|
|
708
842
|
const maxHeight = (0, _vue.computed)(() => props?.maxHeight ?? 605);
|
|
709
843
|
// 控制是否加滚动样式
|
|
710
844
|
const needScroll = (0, _vue.ref)(false);
|
|
@@ -712,11 +846,14 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
712
846
|
const scrollBox = (0, _vue.ref)(null);
|
|
713
847
|
// 监听元素尺寸变化(内容变化自动触发)
|
|
714
848
|
let resizeObserver = null;
|
|
849
|
+
// 组件挂载:初始化位置、监听、ViewModel 及滚动
|
|
715
850
|
(0, _vue.onMounted)(() => {
|
|
716
851
|
(0, _util.updatePosition)(boxRef.value, props);
|
|
852
|
+
// 监听位置变化更新组件定位
|
|
717
853
|
(0, _vue.watch)(() => props.position, (newVal, oldVal) => {
|
|
718
854
|
(0, _util.updatePosition)(boxRef.value, props);
|
|
719
855
|
});
|
|
856
|
+
// 监听模式变化重置折叠项
|
|
720
857
|
(0, _vue.watch)(mode, newMode => {
|
|
721
858
|
formItem.collapseValue = "general";
|
|
722
859
|
if (newMode == "add") modelingTypes.value = null;
|
|
@@ -724,11 +861,14 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
724
861
|
immediate: true
|
|
725
862
|
});
|
|
726
863
|
watchCreateHeaderTemp();
|
|
864
|
+
// 监听是否显示 header 变化
|
|
727
865
|
(0, _vue.watch)(() => props.showHeaderTemp, (newVal, oldVal) => {
|
|
728
866
|
(0, _vue.nextTick)(() => {
|
|
729
867
|
watchCreateHeaderTemp();
|
|
730
868
|
});
|
|
731
869
|
});
|
|
870
|
+
|
|
871
|
+
// 获取地图视图并初始化 ViewModel
|
|
732
872
|
_gisUtils.utils.getWebMap(props.mapTarget, scenceView => {
|
|
733
873
|
if (scenceView) {
|
|
734
874
|
viewModel = new _BuildPolylineModelViewModel.default(scenceView, formItem);
|
|
@@ -736,6 +876,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
736
876
|
});
|
|
737
877
|
initScroll();
|
|
738
878
|
});
|
|
879
|
+
// 初始化滚动监听
|
|
739
880
|
function initScroll() {
|
|
740
881
|
const el = scrollBox.value;
|
|
741
882
|
if (!el) return;
|
|
@@ -766,22 +907,28 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
766
907
|
headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.buildPolylineModel");
|
|
767
908
|
}
|
|
768
909
|
};
|
|
769
|
-
|
|
910
|
+
/**
|
|
911
|
+
* @description 参数切换,同步至 ViewModel 并触发变更处理
|
|
912
|
+
* @param {String} key 参数名
|
|
913
|
+
*/
|
|
770
914
|
function paramsChanged(key) {
|
|
771
915
|
if (!viewModel) return;
|
|
772
916
|
viewModel._options[key] = formItem[key];
|
|
773
917
|
viewModel.paramsChanged(key, mode);
|
|
918
|
+
// 编辑模式下模型名变更时通知父组件
|
|
774
919
|
if (mode.value == "edit" && key == "ofModelName") {
|
|
775
920
|
emit("changeModelName", formItem.ofModelName);
|
|
776
921
|
}
|
|
777
922
|
}
|
|
778
923
|
/**
|
|
779
|
-
* @description
|
|
924
|
+
* @description 初始化事件,根据传入数据回填表单或设置图层
|
|
925
|
+
* @param {Object|String} data 模型 id 或 geojson 数据
|
|
780
926
|
*/
|
|
781
927
|
function setData(data) {
|
|
782
928
|
if (data) {
|
|
783
929
|
if (!viewModel) return;
|
|
784
930
|
clear();
|
|
931
|
+
// 字符串类型:编辑模式,根据 id 获取已存在模型并回填表单
|
|
785
932
|
if (typeof data === "string") {
|
|
786
933
|
viewModel.getPolylineModel(data, item => {
|
|
787
934
|
const jsonData = item?.toJSON?.();
|
|
@@ -796,6 +943,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
796
943
|
style
|
|
797
944
|
} = jsonData;
|
|
798
945
|
modelingTypes.value = modelingType ?? modelingTypes.value;
|
|
946
|
+
// 校验图片地址有效性
|
|
799
947
|
const getValidImage = imagePath => imagePath && imagePath !== "null" && imagePath !== "undefined" ? imagePath : "";
|
|
800
948
|
Object.assign(formItem, {
|
|
801
949
|
// 通用参数回填
|
|
@@ -842,6 +990,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
842
990
|
});
|
|
843
991
|
});
|
|
844
992
|
} else {
|
|
993
|
+
// 对象类型:新增模式,设置图层数据并提取属性字段
|
|
845
994
|
viewModel._layerData = data;
|
|
846
995
|
let propertyFields = viewModel.extractPropertyFields(data);
|
|
847
996
|
if (propertyFields && propertyFields.length > 0) {
|
|
@@ -852,8 +1001,12 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
852
1001
|
console.log("重新传入数据");
|
|
853
1002
|
}
|
|
854
1003
|
}
|
|
855
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* @description 生成线模型
|
|
1006
|
+
* @param {String} type 模型类型
|
|
1007
|
+
*/
|
|
856
1008
|
function generated(type) {
|
|
1009
|
+
// 自定义放样需校验自定义形状
|
|
857
1010
|
if (type == "customLofting") {
|
|
858
1011
|
if (!formItem.customShape) {
|
|
859
1012
|
_message.default.warning(locale.value.webgl.noCustomData);
|
|
@@ -864,9 +1017,14 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
864
1017
|
emit("generatedEnd", data);
|
|
865
1018
|
});
|
|
866
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* @description 处理过滤条件变更
|
|
1022
|
+
* @param {String} condition 过滤条件
|
|
1023
|
+
*/
|
|
867
1024
|
const handleFilterChange = condition => {
|
|
868
1025
|
formItem.selectModelId = condition;
|
|
869
1026
|
};
|
|
1027
|
+
// 清空模型数据
|
|
870
1028
|
function clear() {
|
|
871
1029
|
viewModel?.clear();
|
|
872
1030
|
}
|
|
@@ -875,9 +1033,14 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
875
1033
|
clear();
|
|
876
1034
|
resizeObserver?.disconnect();
|
|
877
1035
|
});
|
|
1036
|
+
// 导出已生成的模型集合
|
|
878
1037
|
function exportModels() {
|
|
879
1038
|
return viewModel.exportModels();
|
|
880
1039
|
}
|
|
1040
|
+
/**
|
|
1041
|
+
* @description 导入模型数据
|
|
1042
|
+
* @param {Array} jsons 模型 JSON 数据数组
|
|
1043
|
+
*/
|
|
881
1044
|
function importModels(jsons) {
|
|
882
1045
|
return viewModel.importModels(jsons);
|
|
883
1046
|
}
|
|
@@ -3043,11 +3206,11 @@ var _default = exports.A = {
|
|
|
3043
3206
|
lang,
|
|
3044
3207
|
locale
|
|
3045
3208
|
} = (0, _useGlobalConfig.useLocale)();
|
|
3046
|
-
const selectRef = (0, _vue.ref)(null);
|
|
3209
|
+
const selectRef = (0, _vue.ref)(null); // 下拉选择组件引用
|
|
3047
3210
|
const props = __props;
|
|
3048
|
-
const selectedCondition = (0, _vue.ref)("");
|
|
3049
|
-
const filterConditions = (0, _vue.ref)([...props.initialConditions]);
|
|
3050
|
-
const selectKey = (0, _vue.ref)(0);
|
|
3211
|
+
const selectedCondition = (0, _vue.ref)(""); // 当前选中的过滤条件
|
|
3212
|
+
const filterConditions = (0, _vue.ref)([...props.initialConditions]); // 过滤条件列表
|
|
3213
|
+
const selectKey = (0, _vue.ref)(0); // 下拉组件 key,用于强制刷新
|
|
3051
3214
|
const emit = __emit;
|
|
3052
3215
|
|
|
3053
3216
|
// 监听初始条件变化
|
|
@@ -3060,24 +3223,37 @@ var _default = exports.A = {
|
|
|
3060
3223
|
immediate: true
|
|
3061
3224
|
});
|
|
3062
3225
|
|
|
3063
|
-
|
|
3226
|
+
/**
|
|
3227
|
+
* @description 处理选中/新增条件逻辑
|
|
3228
|
+
* @param {String} value 选中的条件值
|
|
3229
|
+
*/
|
|
3064
3230
|
const handleConditionChange = async value => {
|
|
3065
3231
|
if (!value) return;
|
|
3066
3232
|
const isExist = filterConditions.value.includes(value);
|
|
3233
|
+
// 新条件加入列表
|
|
3067
3234
|
if (!isExist) {
|
|
3068
3235
|
filterConditions.value.push(value);
|
|
3069
3236
|
await (0, _vue.nextTick)();
|
|
3070
3237
|
}
|
|
3071
3238
|
emit("condition-change", value);
|
|
3072
3239
|
};
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* @description 处理新建条件逻辑
|
|
3243
|
+
* @param {String} item 新建的条件值
|
|
3244
|
+
*/
|
|
3073
3245
|
const handleCreateCondition = async item => {
|
|
3074
3246
|
if (!item) return;
|
|
3075
3247
|
await handleConditionChange(item);
|
|
3076
3248
|
selectedCondition.value = item;
|
|
3077
3249
|
};
|
|
3078
|
-
|
|
3250
|
+
/**
|
|
3251
|
+
* @description 删除指定条件选项
|
|
3252
|
+
* @param {String} condition 待删除的条件
|
|
3253
|
+
*/
|
|
3079
3254
|
const handleDeleteOption = async condition => {
|
|
3080
3255
|
filterConditions.value = filterConditions.value.filter(item => item !== condition);
|
|
3256
|
+
// 删除的是当前选中项时清空选中
|
|
3081
3257
|
if (selectedCondition.value === condition) {
|
|
3082
3258
|
selectedCondition.value = "";
|
|
3083
3259
|
emit("condition-change", "");
|
|
@@ -3087,10 +3263,13 @@ var _default = exports.A = {
|
|
|
3087
3263
|
emit("option-delete", condition);
|
|
3088
3264
|
};
|
|
3089
3265
|
|
|
3090
|
-
|
|
3266
|
+
/**
|
|
3267
|
+
* @description 实时输入监听
|
|
3268
|
+
* @param {String} val 输入值
|
|
3269
|
+
*/
|
|
3091
3270
|
const handleInput = val => {};
|
|
3092
3271
|
|
|
3093
|
-
//
|
|
3272
|
+
// 清空选中条件
|
|
3094
3273
|
const clearSelection = () => {
|
|
3095
3274
|
selectedCondition.value = "";
|
|
3096
3275
|
};
|
|
@@ -3102,6 +3281,10 @@ var _default = exports.A = {
|
|
|
3102
3281
|
},
|
|
3103
3282
|
clearSelection,
|
|
3104
3283
|
getConditions: () => [...filterConditions.value],
|
|
3284
|
+
/**
|
|
3285
|
+
* @description 新增过滤条件
|
|
3286
|
+
* @param {String} condition 待新增的条件
|
|
3287
|
+
*/
|
|
3105
3288
|
addCondition: condition => {
|
|
3106
3289
|
if (condition && !filterConditions.value.includes(condition)) {
|
|
3107
3290
|
filterConditions.value.push(condition);
|
|
@@ -3550,11 +3733,21 @@ const MODEL_TYPES = exports.MODEL_TYPES = {
|
|
|
3550
3733
|
CUSTOM: "customLofting",
|
|
3551
3734
|
WATER: "waterLofting"
|
|
3552
3735
|
};
|
|
3736
|
+
|
|
3737
|
+
// 属性字段排除列表
|
|
3553
3738
|
const EXCLUDED_FIELDS = exports.EXCLUDED_FIELDS = ["oid", "kid", "id", "fid", "objectid", "smid", "sid"];
|
|
3554
3739
|
|
|
3555
3740
|
// 数据提取工具
|
|
3556
3741
|
class DataExtractor {
|
|
3557
|
-
|
|
3742
|
+
/**
|
|
3743
|
+
* @description 获取字符串类型属性值
|
|
3744
|
+
* @param {Object} properties 要素属性
|
|
3745
|
+
* @param {String} fieldKey 字段映射键
|
|
3746
|
+
* @param {String} propKey 属性键
|
|
3747
|
+
* @param {String} defaultValue 默认值
|
|
3748
|
+
* @param {Object} options 选项对象
|
|
3749
|
+
* @returns {String} 属性值
|
|
3750
|
+
*/
|
|
3558
3751
|
static getStringValue(properties, fieldKey, propKey, defaultValue = "", options = {}) {
|
|
3559
3752
|
const fieldName = options[fieldKey];
|
|
3560
3753
|
|
|
@@ -3577,7 +3770,15 @@ class DataExtractor {
|
|
|
3577
3770
|
return defaultValue;
|
|
3578
3771
|
}
|
|
3579
3772
|
|
|
3580
|
-
|
|
3773
|
+
/**
|
|
3774
|
+
* @description 获取数字类型属性值
|
|
3775
|
+
* @param {Object} properties 要素属性
|
|
3776
|
+
* @param {String} fieldKey 字段映射键
|
|
3777
|
+
* @param {String} propKey 属性键
|
|
3778
|
+
* @param {Number} defaultValue 默认值
|
|
3779
|
+
* @param {Object} options 选项对象
|
|
3780
|
+
* @returns {Number} 属性值
|
|
3781
|
+
*/
|
|
3581
3782
|
static getNumberValue(properties, fieldKey, propKey, defaultValue = 0, options = {}) {
|
|
3582
3783
|
const fieldName = options[fieldKey];
|
|
3583
3784
|
|
|
@@ -3601,7 +3802,11 @@ class DataExtractor {
|
|
|
3601
3802
|
return defaultValue;
|
|
3602
3803
|
}
|
|
3603
3804
|
|
|
3604
|
-
|
|
3805
|
+
/**
|
|
3806
|
+
* @description 提取所有属性字段
|
|
3807
|
+
* @param {Object} geojsonData geojson 数据
|
|
3808
|
+
* @returns {Array} 属性字段数组
|
|
3809
|
+
*/
|
|
3605
3810
|
static extractPropertyFields(geojsonData) {
|
|
3606
3811
|
const propertyFields = new Set();
|
|
3607
3812
|
geojsonData.features?.forEach(feature => {
|
|
@@ -3616,7 +3821,11 @@ class DataExtractor {
|
|
|
3616
3821
|
return Array.from(propertyFields);
|
|
3617
3822
|
}
|
|
3618
3823
|
|
|
3619
|
-
|
|
3824
|
+
/**
|
|
3825
|
+
* @description 提取线坐标
|
|
3826
|
+
* @param {Object} geometry 几何对象
|
|
3827
|
+
* @returns {Array} 坐标点数组
|
|
3828
|
+
*/
|
|
3620
3829
|
static extractLinePositions(geometry) {
|
|
3621
3830
|
const positions = [];
|
|
3622
3831
|
if (!geometry?.coordinates) return positions;
|
|
@@ -3644,7 +3853,15 @@ class DataExtractor {
|
|
|
3644
3853
|
// 模型配置
|
|
3645
3854
|
exports.DataExtractor = DataExtractor;
|
|
3646
3855
|
class ModelConfigGenerator {
|
|
3647
|
-
|
|
3856
|
+
/**
|
|
3857
|
+
* @description 获取通用配置参数
|
|
3858
|
+
* @param {String} type 模型类型
|
|
3859
|
+
* @param {Object} properties 要素属性
|
|
3860
|
+
* @param {Array} positions 坐标点数组
|
|
3861
|
+
* @param {Number} index 索引
|
|
3862
|
+
* @param {Object} options 选项对象
|
|
3863
|
+
* @returns {Object} 通用配置
|
|
3864
|
+
*/
|
|
3648
3865
|
static getBaseConfig(type, properties, positions, index, options) {
|
|
3649
3866
|
const key = (0, _util.guid)();
|
|
3650
3867
|
return {
|
|
@@ -3669,7 +3886,13 @@ class ModelConfigGenerator {
|
|
|
3669
3886
|
};
|
|
3670
3887
|
}
|
|
3671
3888
|
|
|
3672
|
-
|
|
3889
|
+
/**
|
|
3890
|
+
* @description 获取道路/墙体放样配置
|
|
3891
|
+
* @param {Object} properties 要素属性
|
|
3892
|
+
* @param {Array} positions 坐标点数组
|
|
3893
|
+
* @param {Object} options 选项对象
|
|
3894
|
+
* @returns {Object} 道路/墙体放样配置
|
|
3895
|
+
*/
|
|
3673
3896
|
static getRoadWallConfig(properties, positions, options) {
|
|
3674
3897
|
return {
|
|
3675
3898
|
geometry: {
|
|
@@ -3708,7 +3931,13 @@ class ModelConfigGenerator {
|
|
|
3708
3931
|
};
|
|
3709
3932
|
}
|
|
3710
3933
|
|
|
3711
|
-
|
|
3934
|
+
/**
|
|
3935
|
+
* @description 获取管道放样配置
|
|
3936
|
+
* @param {Object} properties 要素属性
|
|
3937
|
+
* @param {Array} positions 坐标点数组
|
|
3938
|
+
* @param {Object} options 选项对象
|
|
3939
|
+
* @returns {Object} 管道放样配置
|
|
3940
|
+
*/
|
|
3712
3941
|
static getPipelineConfig(properties, positions, options) {
|
|
3713
3942
|
const shape = options?.shape ?? properties?.shape ?? "circle";
|
|
3714
3943
|
const isFlowingType = ["circle", "semicircle"].includes(shape);
|
|
@@ -3740,7 +3969,13 @@ class ModelConfigGenerator {
|
|
|
3740
3969
|
};
|
|
3741
3970
|
}
|
|
3742
3971
|
|
|
3743
|
-
|
|
3972
|
+
/**
|
|
3973
|
+
* @description 获取自定义放样配置
|
|
3974
|
+
* @param {Object} properties 要素属性
|
|
3975
|
+
* @param {Array} positions 坐标点数组
|
|
3976
|
+
* @param {Object} options 选项对象
|
|
3977
|
+
* @returns {Object} 自定义放样配置
|
|
3978
|
+
*/
|
|
3744
3979
|
static getCustomLineConfig(properties, positions, options) {
|
|
3745
3980
|
return {
|
|
3746
3981
|
region: {
|
|
@@ -3769,7 +4004,13 @@ class ModelConfigGenerator {
|
|
|
3769
4004
|
};
|
|
3770
4005
|
}
|
|
3771
4006
|
|
|
3772
|
-
|
|
4007
|
+
/**
|
|
4008
|
+
* @description 获取水系放样配置
|
|
4009
|
+
* @param {Object} properties 要素属性
|
|
4010
|
+
* @param {Array} positions 坐标点数组
|
|
4011
|
+
* @param {Object} options 选项对象
|
|
4012
|
+
* @returns {Object} 水系放样配置
|
|
4013
|
+
*/
|
|
3773
4014
|
static getWaterConfig(properties, positions, options) {
|
|
3774
4015
|
return {
|
|
3775
4016
|
region: {
|
|
@@ -3795,7 +4036,13 @@ class ModelConfigGenerator {
|
|
|
3795
4036
|
};
|
|
3796
4037
|
}
|
|
3797
4038
|
|
|
3798
|
-
|
|
4039
|
+
/**
|
|
4040
|
+
* @description 私有方法,获取材质贴图
|
|
4041
|
+
* @param {String} type 模型类型
|
|
4042
|
+
* @param {Object} properties 要素属性
|
|
4043
|
+
* @param {Object} options 选项对象
|
|
4044
|
+
* @returns {String} 贴图地址
|
|
4045
|
+
*/
|
|
3799
4046
|
static _getMaterialImage(type, properties, options) {
|
|
3800
4047
|
switch (type) {
|
|
3801
4048
|
case MODEL_TYPES.WATER:
|
|
@@ -3804,7 +4051,13 @@ class ModelConfigGenerator {
|
|
|
3804
4051
|
return "null";
|
|
3805
4052
|
}
|
|
3806
4053
|
}
|
|
3807
|
-
|
|
4054
|
+
/**
|
|
4055
|
+
* @description 根据放样类型获取宽度参数值
|
|
4056
|
+
* @param {String} type 模型类型
|
|
4057
|
+
* @param {Object} properties 要素属性
|
|
4058
|
+
* @param {Object} options 选项对象
|
|
4059
|
+
* @returns {Number} 宽度
|
|
4060
|
+
*/
|
|
3808
4061
|
static _getWidth(type, properties, options) {
|
|
3809
4062
|
const widthMap = {
|
|
3810
4063
|
[MODEL_TYPES.PIPELINE]: DataExtractor.getNumberValue(properties, "radiusFields", "radius", 30, options),
|
|
@@ -3814,6 +4067,12 @@ class ModelConfigGenerator {
|
|
|
3814
4067
|
};
|
|
3815
4068
|
return widthMap[type] ?? widthMap.default;
|
|
3816
4069
|
}
|
|
4070
|
+
|
|
4071
|
+
/**
|
|
4072
|
+
* @description 解析自定义形状字符串,优先尝试 JSON.parse
|
|
4073
|
+
* @param {String} customShape 自定义形状字符串
|
|
4074
|
+
* @returns {*} 解析结果
|
|
4075
|
+
*/
|
|
3817
4076
|
static _parseCustomShape(customShape) {
|
|
3818
4077
|
if (!customShape) return null;
|
|
3819
4078
|
try {
|
|
@@ -3827,7 +4086,11 @@ class ModelConfigGenerator {
|
|
|
3827
4086
|
// 数据处理器
|
|
3828
4087
|
exports.ModelConfigGenerator = ModelConfigGenerator;
|
|
3829
4088
|
class DataProcessor {
|
|
3830
|
-
|
|
4089
|
+
/**
|
|
4090
|
+
* @description 处理GeoJSON数据
|
|
4091
|
+
* @param {Object} geojson geojson 数据
|
|
4092
|
+
* @returns {Array} 要素数组
|
|
4093
|
+
*/
|
|
3831
4094
|
static processGeoJSON(geojson) {
|
|
3832
4095
|
let features = [];
|
|
3833
4096
|
if (geojson.type === "FeatureCollection") {
|
|
@@ -3844,7 +4107,12 @@ class DataProcessor {
|
|
|
3844
4107
|
return features;
|
|
3845
4108
|
}
|
|
3846
4109
|
|
|
3847
|
-
|
|
4110
|
+
/**
|
|
4111
|
+
* @description 数据过滤
|
|
4112
|
+
* @param {Object} data geojson 数据
|
|
4113
|
+
* @param {String} filterStr 过滤条件字符串
|
|
4114
|
+
* @returns {Object} 过滤后的 geojson 数据
|
|
4115
|
+
*/
|
|
3848
4116
|
static filterData(data, filterStr) {
|
|
3849
4117
|
if (!filterStr || !data?.features) {
|
|
3850
4118
|
return data;
|
|
@@ -3859,6 +4127,8 @@ class DataProcessor {
|
|
|
3859
4127
|
return false;
|
|
3860
4128
|
}
|
|
3861
4129
|
const propValue = feature.properties[fieldName];
|
|
4130
|
+
|
|
4131
|
+
// 根据运算符判断是否保留该要素
|
|
3862
4132
|
switch (operator) {
|
|
3863
4133
|
case ">":
|
|
3864
4134
|
return propValue > numValue;
|
|
@@ -3886,6 +4156,12 @@ class DataProcessor {
|
|
|
3886
4156
|
// 模型创建器
|
|
3887
4157
|
exports.DataProcessor = DataProcessor;
|
|
3888
4158
|
class ModelCreator {
|
|
4159
|
+
/**
|
|
4160
|
+
* @description 根据类型创建模型实例
|
|
4161
|
+
* @param {String} type 模型类型
|
|
4162
|
+
* @param {Object} config 模型配置
|
|
4163
|
+
* @returns {Object} 模型实例
|
|
4164
|
+
*/
|
|
3889
4165
|
static createModelInstance(type, config) {
|
|
3890
4166
|
const modelConstructors = {
|
|
3891
4167
|
[MODEL_TYPES.ROAD]: Cesium.PMRegion3DWall,
|
|
@@ -3914,11 +4190,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3914
4190
|
value: true
|
|
3915
4191
|
}));
|
|
3916
4192
|
exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
|
|
3917
|
-
|
|
4193
|
+
const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
|
|
3918
4194
|
__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
|
|
3919
|
-
|
|
4195
|
+
const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
|
|
3920
4196
|
__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
|
|
3921
|
-
|
|
4197
|
+
const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
|
|
3922
4198
|
__webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
|
|
3923
4199
|
|
|
3924
4200
|
/***/ })
|