@kq_npm/client3d_webgl_vue 3.2.6-beta → 3.2.8-beta
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/aspectanalysis/index.js +122 -91
- package/boxclip/index.js +182 -158
- package/clientPrint/index.js +27 -77
- package/excavatefillanalysis/index.js +149 -118
- package/floodanalysis/index.js +48 -5
- package/gpuspatialquery/index.js +188 -164
- package/index.js +158 -101
- package/isolineanalysis/index.js +34 -1
- package/modelselect/index.js +143 -119
- package/modelselect/style/modelselect.css +1 -1
- package/package.json +1 -1
- package/planeclip/index.js +182 -158
- package/scenceview/index.js +403 -416
- package/shadowanalysis/index.js +185 -161
- package/skylineanalysis/index.js +185 -158
- package/slopeanalysis/index.js +56 -16
- package/style.css +1 -1
- package/terrainoperation/index.js +195 -164
package/clientPrint/index.js
CHANGED
|
@@ -2,29 +2,6 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ 9821:
|
|
6
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
-
|
|
8
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
/* harmony export */ "Z": function() { return /* binding */ ClientPrintViewModel; }
|
|
10
|
-
/* harmony export */ });
|
|
11
|
-
/**
|
|
12
|
-
* @class ClientPrintViewModel
|
|
13
|
-
* @classdesc 客户端打印
|
|
14
|
-
*/
|
|
15
|
-
class ClientPrintViewModel {
|
|
16
|
-
constructor() {}
|
|
17
|
-
/**
|
|
18
|
-
* 销毁执行方法。
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
destroy() {}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/***/ }),
|
|
27
|
-
|
|
28
5
|
/***/ 8422:
|
|
29
6
|
/***/ (function(module) {
|
|
30
7
|
|
|
@@ -46,13 +23,6 @@ module.exports = require("@kq_npm/client_common_vue/_types/global-event");
|
|
|
46
23
|
|
|
47
24
|
/***/ }),
|
|
48
25
|
|
|
49
|
-
/***/ 9702:
|
|
50
|
-
/***/ (function(module) {
|
|
51
|
-
|
|
52
|
-
module.exports = require("@kq_npm/client_common_vue/_utils/const-image");
|
|
53
|
-
|
|
54
|
-
/***/ }),
|
|
55
|
-
|
|
56
26
|
/***/ 5406:
|
|
57
27
|
/***/ (function(module) {
|
|
58
28
|
|
|
@@ -143,7 +113,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
143
113
|
|
|
144
114
|
// EXPORTS
|
|
145
115
|
__webpack_require__.d(__webpack_exports__, {
|
|
146
|
-
"ClientPrint3dViewModel": function() { return /* reexport */ ClientPrintViewModel/* default */.Z; },
|
|
147
116
|
"default": function() { return /* reexport */ ClientPrint; }
|
|
148
117
|
});
|
|
149
118
|
|
|
@@ -151,15 +120,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
151
120
|
var es_array_includes_js_ = __webpack_require__(3600);
|
|
152
121
|
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
153
122
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
|
|
154
|
-
// EXTERNAL MODULE: ./src/webgl/clientPrint/ClientPrintViewModel.js
|
|
155
|
-
var ClientPrintViewModel = __webpack_require__(9821);
|
|
156
123
|
;// CONCATENATED MODULE: external "html2canvas"
|
|
157
124
|
var external_html2canvas_namespaceObject = require("html2canvas");
|
|
158
125
|
var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_namespaceObject);
|
|
159
126
|
// EXTERNAL MODULE: external "@element-plus/icons-vue"
|
|
160
127
|
var icons_vue_ = __webpack_require__(8422);
|
|
161
|
-
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/const-image"
|
|
162
|
-
var const_image_ = __webpack_require__(9702);
|
|
163
128
|
;// CONCATENATED MODULE: external "vue3-print-nb"
|
|
164
129
|
var external_vue3_print_nb_namespaceObject = require("vue3-print-nb");
|
|
165
130
|
var external_vue3_print_nb_default = /*#__PURE__*/__webpack_require__.n(external_vue3_print_nb_namespaceObject);
|
|
@@ -304,28 +269,15 @@ const _hoisted_41 = {
|
|
|
304
269
|
class: "baseImage"
|
|
305
270
|
};
|
|
306
271
|
const _hoisted_42 = ["src"];
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
"width": "100%",
|
|
311
|
-
"height": "100%",
|
|
312
|
-
"position": "absolute",
|
|
313
|
-
"index": "1000"
|
|
314
|
-
}
|
|
315
|
-
}, null, -1
|
|
316
|
-
/* HOISTED */
|
|
317
|
-
);
|
|
318
|
-
|
|
319
|
-
const _hoisted_44 = ["src"];
|
|
320
|
-
const _hoisted_45 = ["id"];
|
|
321
|
-
const _hoisted_46 = ["onClick"];
|
|
322
|
-
const _hoisted_47 = {
|
|
272
|
+
const _hoisted_43 = ["id"];
|
|
273
|
+
const _hoisted_44 = ["onClick"];
|
|
274
|
+
const _hoisted_45 = {
|
|
323
275
|
class: "kq3d-client-print-infomationContainer"
|
|
324
276
|
};
|
|
325
|
-
const
|
|
277
|
+
const _hoisted_46 = {
|
|
326
278
|
class: "kq3d-client-print-systemTime"
|
|
327
279
|
};
|
|
328
|
-
const
|
|
280
|
+
const _hoisted_47 = {
|
|
329
281
|
class: "kq3d-client-print-companyName"
|
|
330
282
|
};
|
|
331
283
|
|
|
@@ -333,8 +285,6 @@ const _hoisted_49 = {
|
|
|
333
285
|
|
|
334
286
|
|
|
335
287
|
|
|
336
|
-
|
|
337
|
-
|
|
338
288
|
const __default__ = {
|
|
339
289
|
name: "Kq3dClientPrint"
|
|
340
290
|
};
|
|
@@ -376,6 +326,10 @@ const __default__ = {
|
|
|
376
326
|
scenceInfo: Object,
|
|
377
327
|
// 默认显示的图层组名称
|
|
378
328
|
defaultShowLayerNames: Array,
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* showToolButtons - 是否显示工具栏按钮
|
|
332
|
+
*/
|
|
379
333
|
showToolButtons: {
|
|
380
334
|
type: Boolean,
|
|
381
335
|
default: true
|
|
@@ -395,8 +349,7 @@ const __default__ = {
|
|
|
395
349
|
setup(__props, {
|
|
396
350
|
expose
|
|
397
351
|
}) {
|
|
398
|
-
const props = __props;
|
|
399
|
-
let viewModel = null; // 标题的数据
|
|
352
|
+
const props = __props; // 标题的数据
|
|
400
353
|
|
|
401
354
|
let setTitleDataform = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({
|
|
402
355
|
style: {
|
|
@@ -535,9 +488,7 @@ const __default__ = {
|
|
|
535
488
|
let papAnchor = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("纵向"); // 默认
|
|
536
489
|
// 图片格式
|
|
537
490
|
|
|
538
|
-
let imageType = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("png");
|
|
539
|
-
|
|
540
|
-
let map2_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); //图例对象
|
|
491
|
+
let imageType = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("png"); //图例对象
|
|
541
492
|
|
|
542
493
|
let lengend_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 图例窗口显示与隐藏
|
|
543
494
|
|
|
@@ -559,7 +510,8 @@ const __default__ = {
|
|
|
559
510
|
let systemTime = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(""); // 公司名
|
|
560
511
|
|
|
561
512
|
let companyName = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("");
|
|
562
|
-
let printState = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
|
|
513
|
+
let printState = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
|
|
514
|
+
let printViewer = null; // 打印对象
|
|
563
515
|
|
|
564
516
|
let printObj = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({
|
|
565
517
|
id: "printMap",
|
|
@@ -582,7 +534,6 @@ const __default__ = {
|
|
|
582
534
|
|
|
583
535
|
global_event_default().setDefaultMapInfo("scencePrint", "cesium", null);
|
|
584
536
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
|
|
585
|
-
viewModel = new ClientPrintViewModel/* default */.Z();
|
|
586
537
|
setTitleDataform.value.data.title = props.printTitle;
|
|
587
538
|
companyName.value = props.companyName;
|
|
588
539
|
sizelist.value = [];
|
|
@@ -598,6 +549,7 @@ const __default__ = {
|
|
|
598
549
|
initControl();
|
|
599
550
|
global_event_default().getWebMapByMapTarget("scencePrint", scenceView => {
|
|
600
551
|
if (scenceView && scenceView._viewer) {
|
|
552
|
+
printViewer = scenceView._viewer;
|
|
601
553
|
cameraToImage = new Cesium.Kq3dCanvasToImage(scenceView._viewer._container, {
|
|
602
554
|
viewer: scenceView._viewer,
|
|
603
555
|
canvas: scenceView._viewer.scene.canvas
|
|
@@ -607,7 +559,6 @@ const __default__ = {
|
|
|
607
559
|
});
|
|
608
560
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
|
|
609
561
|
destroy();
|
|
610
|
-
viewModel = null;
|
|
611
562
|
});
|
|
612
563
|
/**
|
|
613
564
|
* 获取当前时间
|
|
@@ -662,6 +613,10 @@ const __default__ = {
|
|
|
662
613
|
|
|
663
614
|
return yearCNStr + nonthCNStr + dayCNStr;
|
|
664
615
|
}
|
|
616
|
+
|
|
617
|
+
function changStatusBar() {
|
|
618
|
+
if (printViewer) printViewer.statusBar.show = scalesShow.value;
|
|
619
|
+
}
|
|
665
620
|
/**
|
|
666
621
|
* 显示切换
|
|
667
622
|
* @param {string} type
|
|
@@ -865,7 +820,6 @@ const __default__ = {
|
|
|
865
820
|
|
|
866
821
|
function moveWin(event) {
|
|
867
822
|
event = event || window.event;
|
|
868
|
-
map2_ref.value.getWebMap().map.dragging.disable();
|
|
869
823
|
var x = event.pageX;
|
|
870
824
|
var y = event.pageY;
|
|
871
825
|
|
|
@@ -1197,7 +1151,6 @@ const __default__ = {
|
|
|
1197
1151
|
labelValue: ""
|
|
1198
1152
|
}
|
|
1199
1153
|
};
|
|
1200
|
-
viewModel.destroy();
|
|
1201
1154
|
} // 抛出方法 外部调用
|
|
1202
1155
|
|
|
1203
1156
|
|
|
@@ -1239,6 +1192,8 @@ const __default__ = {
|
|
|
1239
1192
|
|
|
1240
1193
|
const _component_kq_legend = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-legend");
|
|
1241
1194
|
|
|
1195
|
+
const _component_kq3d_compass = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq3d-compass");
|
|
1196
|
+
|
|
1242
1197
|
const _component_kq_scence_view = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-scence-view");
|
|
1243
1198
|
|
|
1244
1199
|
const _component_kq_scrollbar = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-scrollbar");
|
|
@@ -1376,7 +1331,8 @@ const __default__ = {
|
|
|
1376
1331
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_checkbox, {
|
|
1377
1332
|
class: "btnStyle",
|
|
1378
1333
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(scalesShow),
|
|
1379
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(scalesShow) ? scalesShow.value = $event : scalesShow = $event)
|
|
1334
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(scalesShow) ? scalesShow.value = $event : scalesShow = $event),
|
|
1335
|
+
onChange: changStatusBar
|
|
1380
1336
|
}, {
|
|
1381
1337
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [_hoisted_9]),
|
|
1382
1338
|
_: 1
|
|
@@ -2171,12 +2127,7 @@ const __default__ = {
|
|
|
2171
2127
|
onMouseover: setdragCursor,
|
|
2172
2128
|
onMousedown: dragTl,
|
|
2173
2129
|
id: "divcompassDiv"
|
|
2174
|
-
}, [
|
|
2175
|
-
class: "kq3d-client-print-compassImgStyle",
|
|
2176
|
-
src: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(const_image_.COMMPASS_URL)
|
|
2177
|
-
}, null, 8
|
|
2178
|
-
/* PROPS */
|
|
2179
|
-
, _hoisted_44)], 544
|
|
2130
|
+
}, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq3d_compass)], 544
|
|
2180
2131
|
/* HYDRATE_EVENTS, NEED_PATCH */
|
|
2181
2132
|
), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(compassShow)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 文本标注 "), ((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)(setLabelData).value, item => {
|
|
2182
2133
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)(((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", {
|
|
@@ -2212,9 +2163,9 @@ const __default__ = {
|
|
|
2212
2163
|
|
|
2213
2164
|
})], 8
|
|
2214
2165
|
/* PROPS */
|
|
2215
|
-
,
|
|
2166
|
+
, _hoisted_44)], 40
|
|
2216
2167
|
/* PROPS, HYDRATE_EVENTS */
|
|
2217
|
-
,
|
|
2168
|
+
, _hoisted_43)), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, item.data.isShow]]);
|
|
2218
2169
|
}), 128
|
|
2219
2170
|
/* KEYED_FRAGMENT */
|
|
2220
2171
|
))]),
|
|
@@ -2225,9 +2176,9 @@ const __default__ = {
|
|
|
2225
2176
|
/* PROPS */
|
|
2226
2177
|
, ["options", "service", "scenceInfo", "showToolButtons", "defaultShowLayerNames", "toolButtonsPosition", "showLogo"])], 512
|
|
2227
2178
|
/* NEED_PATCH */
|
|
2228
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div",
|
|
2179
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_45, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_46, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, "日期:" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(systemTime)), 1
|
|
2229
2180
|
/* TEXT */
|
|
2230
|
-
)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div",
|
|
2181
|
+
)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_47, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, "公司:" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(companyName)), 1
|
|
2231
2182
|
/* TEXT */
|
|
2232
2183
|
)])])], 512
|
|
2233
2184
|
/* NEED_PATCH */
|
|
@@ -2260,7 +2211,6 @@ var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
|
|
|
2260
2211
|
|
|
2261
2212
|
|
|
2262
2213
|
|
|
2263
|
-
|
|
2264
2214
|
ClientPrint.install = (Vue, opts) => {
|
|
2265
2215
|
init_js_default()(Vue, opts);
|
|
2266
2216
|
Vue.component(ClientPrint.name, ClientPrint);
|
|
@@ -2,128 +2,30 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 909:
|
|
6
6
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
|
|
8
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
/* harmony export */ "Z": function() { return /* binding */ ExcavateFillAnalysisViewModel; }
|
|
10
|
-
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
|
|
12
|
-
|
|
13
|
-
//填挖方分析逻辑类
|
|
14
|
-
class ExcavateFillAnalysisViewModel {
|
|
15
|
-
//填挖方分析三维对象
|
|
16
|
-
//绘制管理对象
|
|
17
|
-
//填挖方分析存储参数对象
|
|
18
|
-
//绘制完成监听事件
|
|
19
|
-
constructor(scenceView, options, callback) {
|
|
20
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_excavateFillAnalysis", null);
|
|
21
|
-
|
|
22
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_drawManager", null);
|
|
23
|
-
|
|
24
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
|
|
25
|
-
|
|
26
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_removeEventListener", null);
|
|
27
|
-
|
|
28
|
-
options.viewer = scenceView._viewer;
|
|
29
|
-
options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
30
|
-
|
|
31
|
-
if (options.cutColor) {
|
|
32
|
-
options.cutColor = Cesium.Color.fromCssColorString(options.cutColor).withAlpha(0.7);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (options.fillColor) {
|
|
36
|
-
options.fillColor = Cesium.Color.fromCssColorString(options.fillColor).withAlpha(0.7);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
this._options = options;
|
|
40
|
-
this._drawManager = scenceView._drawManager;
|
|
41
|
-
var that = this;
|
|
42
|
-
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
43
|
-
if (shape) {
|
|
44
|
-
options.positions = that.coordinateTransform(shape._controlPoints);
|
|
45
|
-
that._excavateFillAnalysis = new Cesium.Kq3dCutFill(options);
|
|
46
|
-
|
|
47
|
-
that._drawManager.clear();
|
|
48
|
-
|
|
49
|
-
callback && callback(); // callback && setTimeout(callback, 1500);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
} // 处理绘制坐标,转成二维坐标
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
coordinateTransform(points) {
|
|
56
|
-
let cutPoints = points.map(function (point) {
|
|
57
|
-
let cartesPh = Cesium.Cartographic.fromCartesian(point);
|
|
58
|
-
cartesPh.longitude = cartesPh.longitude / Math.PI * 180;
|
|
59
|
-
cartesPh.latitude = cartesPh.latitude / Math.PI * 180;
|
|
60
|
-
let map = {
|
|
61
|
-
longitude: cartesPh.longitude,
|
|
62
|
-
latitude: cartesPh.latitude,
|
|
63
|
-
height: cartesPh.height
|
|
64
|
-
};
|
|
65
|
-
return map;
|
|
66
|
-
});
|
|
67
|
-
return cutPoints;
|
|
68
|
-
} //开始分析
|
|
69
|
-
|
|
70
8
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
clampToGround: true
|
|
76
|
-
});
|
|
77
|
-
} else {
|
|
78
|
-
throw "请加载地形后分析!";
|
|
79
|
-
}
|
|
80
|
-
} //清除全部结果
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
clear() {
|
|
84
|
-
this._drawManager.stopDraw();
|
|
85
|
-
|
|
86
|
-
this._excavateFillAnalysis && this._excavateFillAnalysis.removeAll();
|
|
87
|
-
} //销毁
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
destroy() {
|
|
91
|
-
this.clear(); // this._excavateFillAnalysis && this._excavateFillAnalysis.destroy();
|
|
92
|
-
|
|
93
|
-
this._excavateFillAnalysis = null; //移除监听事件
|
|
94
|
-
|
|
95
|
-
this._removeEventListener && this._removeEventListener();
|
|
96
|
-
this._removeEventListener = null;
|
|
97
|
-
} //设置基准高度
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setReferenceHeight(height) {
|
|
101
|
-
this._options.referenceHeight = Number(height);
|
|
102
|
-
|
|
103
|
-
if (this._excavateFillAnalysis) {
|
|
104
|
-
this._excavateFillAnalysis.referenceHeight = Number(height);
|
|
105
|
-
}
|
|
106
|
-
} //设置挖方颜色
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
setCutColor(cutColor) {
|
|
110
|
-
this._options.cutColor = Cesium.Color.fromCssColorString(cutColor).withAlpha(0.7);
|
|
9
|
+
// EXPORTS
|
|
10
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
"Z": function() { return /* binding */ message; }
|
|
12
|
+
});
|
|
111
13
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
14
|
+
;// CONCATENATED MODULE: external "element-plus/es"
|
|
15
|
+
var es_namespaceObject = require("element-plus/es");
|
|
16
|
+
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
|
|
17
|
+
var init_js_ = __webpack_require__(5406);
|
|
18
|
+
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
|
|
19
|
+
;// CONCATENATED MODULE: ./src/common/_ui/message/index.js
|
|
116
20
|
|
|
117
21
|
|
|
118
|
-
setFillColor(fillColor) {
|
|
119
|
-
this._options.fillColor = Cesium.Color.fromCssColorString(fillColor).withAlpha(0.7);
|
|
120
22
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
23
|
+
es_namespaceObject.ElMessage.install = (Vue, opts) => {
|
|
24
|
+
init_js_default()(Vue, opts);
|
|
25
|
+
Vue.component("KqMessage", es_namespaceObject.ElMessage);
|
|
26
|
+
};
|
|
125
27
|
|
|
126
|
-
|
|
28
|
+
/* harmony default export */ var message = (es_namespaceObject.ElMessage);
|
|
127
29
|
|
|
128
30
|
/***/ }),
|
|
129
31
|
|
|
@@ -261,7 +163,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
261
163
|
|
|
262
164
|
// EXPORTS
|
|
263
165
|
__webpack_require__.d(__webpack_exports__, {
|
|
264
|
-
"ExcavateFillAnalysisViewModel": function() { return /* reexport */ ExcavateFillAnalysisViewModel
|
|
166
|
+
"ExcavateFillAnalysisViewModel": function() { return /* reexport */ ExcavateFillAnalysisViewModel; },
|
|
265
167
|
"default": function() { return /* reexport */ ExcavateFillAnalysis; }
|
|
266
168
|
});
|
|
267
169
|
|
|
@@ -269,8 +171,137 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
269
171
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
|
|
270
172
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
|
|
271
173
|
var gis_utils_ = __webpack_require__(826);
|
|
272
|
-
// EXTERNAL MODULE: ./
|
|
273
|
-
var
|
|
174
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
175
|
+
var defineProperty = __webpack_require__(8270);
|
|
176
|
+
// EXTERNAL MODULE: ./src/common/_ui/message/index.js + 1 modules
|
|
177
|
+
var message = __webpack_require__(909);
|
|
178
|
+
;// CONCATENATED MODULE: ./src/webgl/excavatefillanalysis/ExcavateFillAnalysisViewModel.js
|
|
179
|
+
|
|
180
|
+
//填挖方分析逻辑类
|
|
181
|
+
|
|
182
|
+
class ExcavateFillAnalysisViewModel {
|
|
183
|
+
//填挖方分析三维对象
|
|
184
|
+
//绘制管理对象
|
|
185
|
+
//填挖方分析存储参数对象
|
|
186
|
+
//绘制完成监听事件
|
|
187
|
+
constructor(scenceView, options, callback) {
|
|
188
|
+
(0,defineProperty/* default */.Z)(this, "_excavateFillAnalysis", null);
|
|
189
|
+
|
|
190
|
+
(0,defineProperty/* default */.Z)(this, "_drawManager", null);
|
|
191
|
+
|
|
192
|
+
(0,defineProperty/* default */.Z)(this, "_options", null);
|
|
193
|
+
|
|
194
|
+
(0,defineProperty/* default */.Z)(this, "_removeEventListener", null);
|
|
195
|
+
|
|
196
|
+
options.viewer = scenceView._viewer;
|
|
197
|
+
options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
198
|
+
|
|
199
|
+
if (options.cutColor) {
|
|
200
|
+
options.cutColor = Cesium.Color.fromCssColorString(options.cutColor).withAlpha(0.7);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (options.fillColor) {
|
|
204
|
+
options.fillColor = Cesium.Color.fromCssColorString(options.fillColor).withAlpha(0.7);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
this._options = options;
|
|
208
|
+
this._drawManager = scenceView._drawManager;
|
|
209
|
+
var that = this;
|
|
210
|
+
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
211
|
+
if (shape) {
|
|
212
|
+
options.positions = that.coordinateTransform(shape._controlPoints);
|
|
213
|
+
that._excavateFillAnalysis = new Cesium.Kq3dCutFill(options);
|
|
214
|
+
|
|
215
|
+
that._drawManager.clear();
|
|
216
|
+
|
|
217
|
+
callback && callback(); // callback && setTimeout(callback, 1500);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
} // 处理绘制坐标,转成二维坐标
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
coordinateTransform(points) {
|
|
224
|
+
let cutPoints = points.map(function (point) {
|
|
225
|
+
let cartesPh = Cesium.Cartographic.fromCartesian(point);
|
|
226
|
+
cartesPh.longitude = cartesPh.longitude / Math.PI * 180;
|
|
227
|
+
cartesPh.latitude = cartesPh.latitude / Math.PI * 180;
|
|
228
|
+
let map = {
|
|
229
|
+
longitude: cartesPh.longitude,
|
|
230
|
+
latitude: cartesPh.latitude,
|
|
231
|
+
height: cartesPh.height
|
|
232
|
+
};
|
|
233
|
+
return map;
|
|
234
|
+
});
|
|
235
|
+
return cutPoints;
|
|
236
|
+
} //开始分析
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
start() {
|
|
240
|
+
// 判断是否添加了地形
|
|
241
|
+
if (this._options.viewer.terrainProvider.availability) {
|
|
242
|
+
if (this._options.viewer.terrainProvider instanceof Cesium.CesiumTerrainProvider) {
|
|
243
|
+
this._drawManager.startDraw("polygon", {
|
|
244
|
+
clampToGround: true
|
|
245
|
+
});
|
|
246
|
+
} else {
|
|
247
|
+
(0,message/* default */.Z)({
|
|
248
|
+
message: "只支持STK类型的地形分析!",
|
|
249
|
+
type: "warning"
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
(0,message/* default */.Z)({
|
|
254
|
+
message: "请加载地形后分析!",
|
|
255
|
+
type: "warning"
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
} //清除全部结果
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
clear() {
|
|
262
|
+
this._drawManager.stopDraw();
|
|
263
|
+
|
|
264
|
+
this._excavateFillAnalysis && this._excavateFillAnalysis.removeAll();
|
|
265
|
+
} //销毁
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
destroy() {
|
|
269
|
+
this.clear(); // this._excavateFillAnalysis && this._excavateFillAnalysis.destroy();
|
|
270
|
+
|
|
271
|
+
this._excavateFillAnalysis = null; //移除监听事件
|
|
272
|
+
|
|
273
|
+
this._removeEventListener && this._removeEventListener();
|
|
274
|
+
this._removeEventListener = null;
|
|
275
|
+
} //设置基准高度
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
setReferenceHeight(height) {
|
|
279
|
+
this._options.referenceHeight = Number(height);
|
|
280
|
+
|
|
281
|
+
if (this._excavateFillAnalysis) {
|
|
282
|
+
this._excavateFillAnalysis.referenceHeight = Number(height);
|
|
283
|
+
}
|
|
284
|
+
} //设置挖方颜色
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
setCutColor(cutColor) {
|
|
288
|
+
this._options.cutColor = Cesium.Color.fromCssColorString(cutColor).withAlpha(0.7);
|
|
289
|
+
|
|
290
|
+
if (this._excavateFillAnalysis) {
|
|
291
|
+
this._excavateFillAnalysis.cutColor = this._options.cutColor;
|
|
292
|
+
}
|
|
293
|
+
} //设置填方颜色
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
setFillColor(fillColor) {
|
|
297
|
+
this._options.fillColor = Cesium.Color.fromCssColorString(fillColor).withAlpha(0.7);
|
|
298
|
+
|
|
299
|
+
if (this._excavateFillAnalysis) {
|
|
300
|
+
this._excavateFillAnalysis.fillColor = this._options.fillColor;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
}
|
|
274
305
|
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
|
|
275
306
|
var client_icons_vue_ = __webpack_require__(348);
|
|
276
307
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
@@ -399,7 +430,7 @@ const __default__ = {
|
|
|
399
430
|
cutColor: formItem.excavateColor,
|
|
400
431
|
fillColor: formItem.fillColor
|
|
401
432
|
};
|
|
402
|
-
viewModel = new ExcavateFillAnalysisViewModel
|
|
433
|
+
viewModel = new ExcavateFillAnalysisViewModel(scenceView, options, function () {
|
|
403
434
|
setTimeout(() => {
|
|
404
435
|
showResult.value = true;
|
|
405
436
|
const cutVolumn = viewModel._excavateFillAnalysis.cutVolumn;
|
package/floodanalysis/index.js
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
+
/***/ 909:
|
|
6
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// EXPORTS
|
|
10
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
"Z": function() { return /* binding */ message; }
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
;// CONCATENATED MODULE: external "element-plus/es"
|
|
15
|
+
var es_namespaceObject = require("element-plus/es");
|
|
16
|
+
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
|
|
17
|
+
var init_js_ = __webpack_require__(5406);
|
|
18
|
+
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
|
|
19
|
+
;// CONCATENATED MODULE: ./src/common/_ui/message/index.js
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
es_namespaceObject.ElMessage.install = (Vue, opts) => {
|
|
24
|
+
init_js_default()(Vue, opts);
|
|
25
|
+
Vue.component("KqMessage", es_namespaceObject.ElMessage);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/* harmony default export */ var message = (es_namespaceObject.ElMessage);
|
|
29
|
+
|
|
30
|
+
/***/ }),
|
|
31
|
+
|
|
5
32
|
/***/ 348:
|
|
6
33
|
/***/ (function(module) {
|
|
7
34
|
|
|
@@ -155,10 +182,13 @@ var gis_utils_ = __webpack_require__(826);
|
|
|
155
182
|
var defineProperty = __webpack_require__(8270);
|
|
156
183
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/const-image"
|
|
157
184
|
var const_image_ = __webpack_require__(9702);
|
|
185
|
+
// EXTERNAL MODULE: ./src/common/_ui/message/index.js + 1 modules
|
|
186
|
+
var message = __webpack_require__(909);
|
|
158
187
|
;// CONCATENATED MODULE: ./src/webgl/floodanalysis/FloodAnalysisViewModel.js
|
|
159
188
|
|
|
160
189
|
//地形淹没分析逻辑类
|
|
161
190
|
|
|
191
|
+
|
|
162
192
|
class FloodAnalysisViewModel {
|
|
163
193
|
//地形淹没三维对象
|
|
164
194
|
//模型淹没三维对象
|
|
@@ -261,11 +291,21 @@ class FloodAnalysisViewModel {
|
|
|
261
291
|
// 判断是否添加了地形
|
|
262
292
|
if (this._mode === 0) {
|
|
263
293
|
if (this._floodModelAnalysis.viewer.terrainProvider.availability) {
|
|
264
|
-
this.
|
|
265
|
-
|
|
266
|
-
|
|
294
|
+
if (this._floodModelAnalysis.viewer.terrainProvider instanceof Cesium.CesiumTerrainProvider) {
|
|
295
|
+
this.clear();
|
|
296
|
+
|
|
297
|
+
this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
|
|
298
|
+
} else {
|
|
299
|
+
(0,message/* default */.Z)({
|
|
300
|
+
message: "只支持STK类型的地形分析!",
|
|
301
|
+
type: "warning"
|
|
302
|
+
});
|
|
303
|
+
}
|
|
267
304
|
} else {
|
|
268
|
-
|
|
305
|
+
(0,message/* default */.Z)({
|
|
306
|
+
message: "请加载地形后分析!",
|
|
307
|
+
type: "warning"
|
|
308
|
+
});
|
|
269
309
|
}
|
|
270
310
|
} else if (this._mode === 1) {
|
|
271
311
|
var modelFlag = false;
|
|
@@ -283,7 +323,10 @@ class FloodAnalysisViewModel {
|
|
|
283
323
|
|
|
284
324
|
this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
|
|
285
325
|
} else {
|
|
286
|
-
|
|
326
|
+
(0,message/* default */.Z)({
|
|
327
|
+
message: "请添加模型后分析!",
|
|
328
|
+
type: "warning"
|
|
329
|
+
});
|
|
287
330
|
}
|
|
288
331
|
}
|
|
289
332
|
} //清除全部结果
|