@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/modelselect/index.js
CHANGED
|
@@ -2,129 +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 */ ModelSelectViewModel; }
|
|
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 ModelSelectViewModel {
|
|
15
|
-
//三维viewer对象
|
|
16
|
-
//屏幕空间事件处理程序三维对象
|
|
17
|
-
//拾取状态
|
|
18
|
-
//高亮三维对象
|
|
19
|
-
//高亮颜色
|
|
20
|
-
constructor(scenceView, pickCallFunc) {
|
|
21
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
|
|
22
|
-
|
|
23
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_handler", null);
|
|
24
|
-
|
|
25
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_isPick", false);
|
|
26
|
-
|
|
27
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_highlight", null);
|
|
28
|
-
|
|
29
|
-
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_highlightColor", "#FF0000");
|
|
30
|
-
|
|
31
|
-
this._viewer = scenceView._viewer;
|
|
32
|
-
this._drawManager = scenceView._drawManager;
|
|
33
|
-
this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);
|
|
34
|
-
let that = this;
|
|
35
|
-
|
|
36
|
-
this._handler.setInputAction(function (movement) {
|
|
37
|
-
if (that._isPick) {
|
|
38
|
-
that.clearHighlight();
|
|
39
|
-
|
|
40
|
-
let pickedObject = that._viewer.scene.pick(movement.position); // console.log(pickedObject);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (pickedObject) {
|
|
44
|
-
if (pickedObject instanceof Cesium.Cesium3DTileFeature) {
|
|
45
|
-
let properties = pickedObject.getPropertyNames() || []; // console.log(properties);
|
|
46
|
-
|
|
47
|
-
that._highlight = {
|
|
48
|
-
object: pickedObject.pickId.object,
|
|
49
|
-
color: pickedObject.pickId.object.color
|
|
50
|
-
};
|
|
51
|
-
pickedObject.pickId.object.color = Cesium.Color.fromCssColorString(that._highlightColor);
|
|
52
|
-
let attrs = {};
|
|
53
|
-
properties.forEach(prop => {
|
|
54
|
-
attrs[prop] = pickedObject.getProperty(prop);
|
|
55
|
-
});
|
|
56
|
-
pickCallFunc && pickCallFunc(pickedObject.tileset.name || "LayerName", attrs); // if (properties.indexOf(that._modeFiled) > -1) {
|
|
57
|
-
// let id = pickedObject.getProperty(that._modeFiled);
|
|
58
|
-
// // that.clear();
|
|
59
|
-
// that._highlight = new Cesium.Kq3dHighlight({
|
|
60
|
-
// viewer: that._viewer,
|
|
61
|
-
// tileset: pickedObject.tileset,
|
|
62
|
-
// attrName: that._modeFiled,
|
|
63
|
-
// attrValue: [id],
|
|
64
|
-
// color: [Cesium.Color.RED]
|
|
65
|
-
// });
|
|
66
|
-
// let attrs = {};
|
|
67
|
-
// properties.forEach(prop => {
|
|
68
|
-
// attrs[prop] = pickedObject.getProperty(prop);
|
|
69
|
-
// });
|
|
70
|
-
// pickCallFunc && pickCallFunc(pickedObject.tileset.name || "LayerName", attrs);
|
|
71
|
-
// } else {
|
|
72
|
-
// console.log("Feature has no id attribute!");
|
|
73
|
-
// }
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
setCursor(style) {
|
|
81
|
-
this._viewer.canvas.style.cursor = style;
|
|
82
|
-
} //拾取
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
pick() {
|
|
86
|
-
// 判断是否添加了模型
|
|
87
|
-
var flag = false;
|
|
88
|
-
var models = this._viewer.scene.primitives._primitives;
|
|
89
|
-
|
|
90
|
-
for (let i = 0; i < models.length; i++) {
|
|
91
|
-
if (models[i]._url) {
|
|
92
|
-
flag = true;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (flag) {
|
|
97
|
-
this.setCursor("crosshair");
|
|
98
|
-
this._isPick = true;
|
|
99
|
-
} else {
|
|
100
|
-
throw "请添加模型后拾取!";
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
clearHighlight() {
|
|
105
|
-
if (this._highlight) {
|
|
106
|
-
this._highlight.object.color = this._highlight.color;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
this._highlight = null;
|
|
110
|
-
} //清除
|
|
111
8
|
|
|
9
|
+
// EXPORTS
|
|
10
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
"Z": function() { return /* binding */ message; }
|
|
12
|
+
});
|
|
112
13
|
|
|
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
|
-
this.setCursor("default");
|
|
118
|
-
this._isPick = false;
|
|
119
|
-
} //销毁
|
|
120
21
|
|
|
121
22
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
23
|
+
es_namespaceObject.ElMessage.install = (Vue, opts) => {
|
|
24
|
+
init_js_default()(Vue, opts);
|
|
25
|
+
Vue.component("KqMessage", es_namespaceObject.ElMessage);
|
|
26
|
+
};
|
|
126
27
|
|
|
127
|
-
|
|
28
|
+
/* harmony default export */ var message = (es_namespaceObject.ElMessage);
|
|
128
29
|
|
|
129
30
|
/***/ }),
|
|
130
31
|
|
|
@@ -262,7 +163,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
262
163
|
|
|
263
164
|
// EXPORTS
|
|
264
165
|
__webpack_require__.d(__webpack_exports__, {
|
|
265
|
-
"ModelSelectViewModel": function() { return /* reexport */ ModelSelectViewModel
|
|
166
|
+
"ModelSelectViewModel": function() { return /* reexport */ ModelSelectViewModel; },
|
|
266
167
|
"default": function() { return /* reexport */ ModelSelect; }
|
|
267
168
|
});
|
|
268
169
|
|
|
@@ -270,8 +171,131 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
270
171
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
|
|
271
172
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
|
|
272
173
|
var gis_utils_ = __webpack_require__(826);
|
|
273
|
-
// EXTERNAL MODULE: ./
|
|
274
|
-
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/modelselect/ModelSelectViewModel.js
|
|
179
|
+
|
|
180
|
+
//模型拾取逻辑类
|
|
181
|
+
|
|
182
|
+
class ModelSelectViewModel {
|
|
183
|
+
//三维viewer对象
|
|
184
|
+
//屏幕空间事件处理程序三维对象
|
|
185
|
+
//拾取状态
|
|
186
|
+
//高亮三维对象
|
|
187
|
+
//高亮颜色
|
|
188
|
+
constructor(scenceView, pickCallFunc) {
|
|
189
|
+
(0,defineProperty/* default */.Z)(this, "_viewer", null);
|
|
190
|
+
|
|
191
|
+
(0,defineProperty/* default */.Z)(this, "_handler", null);
|
|
192
|
+
|
|
193
|
+
(0,defineProperty/* default */.Z)(this, "_isPick", false);
|
|
194
|
+
|
|
195
|
+
(0,defineProperty/* default */.Z)(this, "_highlight", null);
|
|
196
|
+
|
|
197
|
+
(0,defineProperty/* default */.Z)(this, "_highlightColor", "#FF0000");
|
|
198
|
+
|
|
199
|
+
this._viewer = scenceView._viewer;
|
|
200
|
+
this._drawManager = scenceView._drawManager;
|
|
201
|
+
this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);
|
|
202
|
+
let that = this;
|
|
203
|
+
|
|
204
|
+
this._handler.setInputAction(function (movement) {
|
|
205
|
+
if (that._isPick) {
|
|
206
|
+
that.clearHighlight();
|
|
207
|
+
|
|
208
|
+
let pickedObject = that._viewer.scene.pick(movement.position); // console.log(pickedObject);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
if (pickedObject) {
|
|
212
|
+
if (pickedObject instanceof Cesium.Cesium3DTileFeature) {
|
|
213
|
+
let properties = pickedObject.getPropertyNames() || []; // console.log(properties);
|
|
214
|
+
|
|
215
|
+
that._highlight = {
|
|
216
|
+
object: pickedObject.pickId.object,
|
|
217
|
+
color: pickedObject.pickId.object.color
|
|
218
|
+
};
|
|
219
|
+
pickedObject.pickId.object.color = Cesium.Color.fromCssColorString(that._highlightColor);
|
|
220
|
+
let attrs = {};
|
|
221
|
+
properties.forEach(prop => {
|
|
222
|
+
attrs[prop] = pickedObject.getProperty(prop);
|
|
223
|
+
});
|
|
224
|
+
pickCallFunc && pickCallFunc(pickedObject.tileset.name || "LayerName", attrs); // if (properties.indexOf(that._modeFiled) > -1) {
|
|
225
|
+
// let id = pickedObject.getProperty(that._modeFiled);
|
|
226
|
+
// // that.clear();
|
|
227
|
+
// that._highlight = new Cesium.Kq3dHighlight({
|
|
228
|
+
// viewer: that._viewer,
|
|
229
|
+
// tileset: pickedObject.tileset,
|
|
230
|
+
// attrName: that._modeFiled,
|
|
231
|
+
// attrValue: [id],
|
|
232
|
+
// color: [Cesium.Color.RED]
|
|
233
|
+
// });
|
|
234
|
+
// let attrs = {};
|
|
235
|
+
// properties.forEach(prop => {
|
|
236
|
+
// attrs[prop] = pickedObject.getProperty(prop);
|
|
237
|
+
// });
|
|
238
|
+
// pickCallFunc && pickCallFunc(pickedObject.tileset.name || "LayerName", attrs);
|
|
239
|
+
// } else {
|
|
240
|
+
// console.log("Feature has no id attribute!");
|
|
241
|
+
// }
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
setCursor(style) {
|
|
249
|
+
this._viewer.canvas.style.cursor = style;
|
|
250
|
+
} //拾取
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
pick() {
|
|
254
|
+
// 判断是否添加了模型
|
|
255
|
+
var flag = false;
|
|
256
|
+
var models = this._viewer.scene.primitives._primitives;
|
|
257
|
+
|
|
258
|
+
for (let i = 0; i < models.length; i++) {
|
|
259
|
+
if (models[i]._url) {
|
|
260
|
+
flag = true;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (flag) {
|
|
265
|
+
this.setCursor("crosshair");
|
|
266
|
+
this._isPick = true;
|
|
267
|
+
} else {
|
|
268
|
+
(0,message/* default */.Z)({
|
|
269
|
+
message: "请添加模型后拾取!",
|
|
270
|
+
type: "warning"
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
clearHighlight() {
|
|
276
|
+
if (this._highlight) {
|
|
277
|
+
this._highlight.object.color = this._highlight.color;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
this._highlight = null;
|
|
281
|
+
} //清除
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
clear() {
|
|
285
|
+
this.clearHighlight(); // this._highlight && this._highlight.remove();
|
|
286
|
+
// this._highlight = null;
|
|
287
|
+
|
|
288
|
+
this.setCursor("default");
|
|
289
|
+
this._isPick = false;
|
|
290
|
+
} //销毁
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
destroy() {
|
|
294
|
+
this.clear();
|
|
295
|
+
this._handler && this._handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
}
|
|
275
299
|
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
|
|
276
300
|
var client_icons_vue_ = __webpack_require__(348);
|
|
277
301
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
@@ -388,7 +412,7 @@ const __default__ = {
|
|
|
388
412
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
389
413
|
if (scenceView) {
|
|
390
414
|
language.value = scenceView._language;
|
|
391
|
-
viewModel = new ModelSelectViewModel
|
|
415
|
+
viewModel = new ModelSelectViewModel(scenceView, pickCallFunc);
|
|
392
416
|
viewModel._highlightColor = props.highlightColor;
|
|
393
417
|
}
|
|
394
418
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kq3d-model-select{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-model-select .kq3d-model-select-box{height:calc(100% - 35px)}.kq3d-model-select .kq3d-model-select-box .title span{font-weight:700;color:var(--kq-text-color-primary)}.kq3d-model-select .modelTable{width:100%;height:calc(100% - 70px);background-color:var(--kq-bg-color);pointer-events:auto}.kq3d-model-select .kq-row{margin-bottom:8px}.kq3d-model-select .footer-buttons{text-align:right}
|
|
1
|
+
.kq3d-model-select{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;width:300px;height:400px;background-color:var(--kq-bg-color)}.kq3d-model-select .kq3d-model-select-box{height:calc(100% - 35px)}.kq3d-model-select .kq3d-model-select-box .title span{font-weight:700;color:var(--kq-text-color-primary)}.kq3d-model-select .modelTable{width:100%;height:calc(100% - 70px);background-color:var(--kq-bg-color);pointer-events:auto}.kq3d-model-select .kq-row{margin-bottom:8px}.kq3d-model-select .footer-buttons{text-align:right}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.2.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.2.8-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"9.2.0-beta.36","xlsx":"^0.18.5","css-vars-ponyfill":"^2.4.8","html2canvas":"^1.4.1","xe-utils":"^3.5.4"}}
|