@kq_npm/client3d_webgl_vue 4.5.29-beta → 4.5.30
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 +518 -262
- package/adddata/style/adddata.css +1 -1
- package/aspectanalysis/index.js +201 -123
- package/baseterraingallery/index.js +123 -94
- package/baseterraingallery/style/baseterraingallery.css +1 -1
- package/boxclip/index.js +442 -249
- package/clientPrint/index.js +27088 -14116
- package/clientPrint/style/clientPrint.css +1 -1
- package/comparemap/index.js +243 -213
- package/compass/index.js +68 -74
- package/excavatefillanalysis/index.js +225 -143
- package/fixedzoomin/index.js +82 -72
- package/fixedzoomout/index.js +80 -71
- package/flight/index.js +371 -257
- package/flight/style/flight.css +1 -1
- package/floodanalysis/index.js +347 -199
- package/geologicalbodyanalysis/index.js +260 -166
- package/gpuspatialquery/index.js +359 -198
- package/hawkeye/index.js +100 -131
- package/headertemp/index.js +25 -14
- package/heatmap3d/index.js +678 -366
- package/heatmap3d/style/heatmap3d.css +1 -1
- package/index.js +20310 -7159
- package/isolineanalysis/index.js +1202 -504
- package/light/index.js +494 -349
- package/limitheightanalysis/index.js +223 -159
- package/measure/index.js +353 -198
- package/modelFlat/index.js +204 -167
- package/modelexcavate/index.js +191 -130
- package/modelfilter/index.js +271 -179
- package/modelprofileanalysis/index.js +316 -206
- package/modelselect/index.js +147 -142
- package/package.json +1 -1
- package/particleeffect/index.js +403 -225
- package/planeclip/index.js +300 -198
- package/resetview/index.js +52 -66
- package/roller/index.js +372 -304
- package/scaneffect/index.js +537 -230
- package/sceneadvancedtoimage/index.js +358 -205
- package/sceneadvancedtoimage/style/sceneadvancedtoimage.css +1 -1
- package/sceneapp/index.js +27088 -14116
- package/sceneset/index.js +864 -350
- package/scenetohdimage/index.js +297 -159
- package/scenetohdimage/style/scenetohdimage.css +1 -1
- package/sceneview/index.js +27088 -14116
- package/sceneview/style/sceneview.css +1 -1
- package/screenshot/index.js +301 -257
- package/shadowanalysis/index.js +405 -217
- package/sightlineanalysis/index.js +271 -183
- package/sightlineanalysis/style/divpoint.css +1 -1
- package/skylineanalysis/index.js +308 -160
- package/slopeanalysis/index.js +397 -227
- package/slopeaspectanalysis/index.js +485 -259
- package/statusbar/index.js +65 -88
- package/style.css +1 -1
- package/terrainoperation/index.js +237 -176
- package/terrainprofileanalysis/index.js +138 -120
- package/typhoontrac/index.js +970 -234
- package/typhoontrac/style/typhoontrac.css +1 -1
- package/underground/index.js +61 -70
- package/videofusion/index.js +488 -265
- package/videoproject/index.js +490 -271
- package/viewshedanalysis/index.js +255 -151
- package/weathereffect/index.js +317 -166
- package/windyslicing/index.js +1947 -0
- package/windyslicing/style/index.js +3 -0
- package/windyslicing/style/windyslicing.css +1 -0
- package/wireframesketch/index.js +142 -110
package/adddata/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
3
|
module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/const-image"], factory);
|
|
6
|
-
else
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/const-image"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"));
|
|
8
|
+
else
|
|
9
|
+
root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/const-image"]);
|
|
10
10
|
})(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__3217__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__6277__) {
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
@@ -25,10 +25,12 @@ return /******/ (function() { // webpackBootstrap
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage.install = (Vue, opts) => {
|
|
29
30
|
_init__WEBPACK_IMPORTED_MODULE_1___default()(Vue, opts);
|
|
30
31
|
Vue.component("KqMessage", element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);
|
|
31
32
|
};
|
|
33
|
+
|
|
32
34
|
/* harmony default export */ __webpack_exports__["Z"] = (element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);
|
|
33
35
|
|
|
34
36
|
/***/ }),
|
|
@@ -47,52 +49,10 @@ module.exports = require("@kq_npm/client_icons_vue");
|
|
|
47
49
|
|
|
48
50
|
/***/ }),
|
|
49
51
|
|
|
50
|
-
/***/
|
|
51
|
-
/***/ (function(module) {
|
|
52
|
-
|
|
53
|
-
module.exports = require("core-js/modules/es.array.push.js");
|
|
54
|
-
|
|
55
|
-
/***/ }),
|
|
56
|
-
|
|
57
|
-
/***/ 8470:
|
|
58
|
-
/***/ (function(module) {
|
|
59
|
-
|
|
60
|
-
module.exports = require("core-js/modules/esnext.iterator.constructor.js");
|
|
61
|
-
|
|
62
|
-
/***/ }),
|
|
63
|
-
|
|
64
|
-
/***/ 2753:
|
|
52
|
+
/***/ 3600:
|
|
65
53
|
/***/ (function(module) {
|
|
66
54
|
|
|
67
|
-
module.exports = require("core-js/modules/
|
|
68
|
-
|
|
69
|
-
/***/ }),
|
|
70
|
-
|
|
71
|
-
/***/ 1058:
|
|
72
|
-
/***/ (function(module) {
|
|
73
|
-
|
|
74
|
-
module.exports = require("core-js/modules/esnext.iterator.for-each.js");
|
|
75
|
-
|
|
76
|
-
/***/ }),
|
|
77
|
-
|
|
78
|
-
/***/ 4360:
|
|
79
|
-
/***/ (function(module) {
|
|
80
|
-
|
|
81
|
-
module.exports = require("core-js/modules/web.url-search-params.delete.js");
|
|
82
|
-
|
|
83
|
-
/***/ }),
|
|
84
|
-
|
|
85
|
-
/***/ 8824:
|
|
86
|
-
/***/ (function(module) {
|
|
87
|
-
|
|
88
|
-
module.exports = require("core-js/modules/web.url-search-params.has.js");
|
|
89
|
-
|
|
90
|
-
/***/ }),
|
|
91
|
-
|
|
92
|
-
/***/ 2936:
|
|
93
|
-
/***/ (function(module) {
|
|
94
|
-
|
|
95
|
-
module.exports = require("core-js/modules/web.url-search-params.size.js");
|
|
55
|
+
module.exports = require("core-js/modules/es.array.includes.js");
|
|
96
56
|
|
|
97
57
|
/***/ }),
|
|
98
58
|
|
|
@@ -152,59 +112,27 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;
|
|
|
152
112
|
|
|
153
113
|
/***/ }),
|
|
154
114
|
|
|
155
|
-
/***/
|
|
115
|
+
/***/ 8270:
|
|
156
116
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
157
117
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
172
|
-
}, _typeof(o);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
176
|
-
|
|
177
|
-
function toPrimitive(t, r) {
|
|
178
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
179
|
-
var e = t[Symbol.toPrimitive];
|
|
180
|
-
if (void 0 !== e) {
|
|
181
|
-
var i = e.call(t, r || "default");
|
|
182
|
-
if ("object" != _typeof(i)) return i;
|
|
183
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
118
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
119
|
+
/* harmony export */ "Z": function() { return /* binding */ _defineProperty; }
|
|
120
|
+
/* harmony export */ });
|
|
121
|
+
function _defineProperty(obj, key, value) {
|
|
122
|
+
if (key in obj) {
|
|
123
|
+
Object.defineProperty(obj, key, {
|
|
124
|
+
value: value,
|
|
125
|
+
enumerable: true,
|
|
126
|
+
configurable: true,
|
|
127
|
+
writable: true
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
obj[key] = value;
|
|
184
131
|
}
|
|
185
|
-
return ("string" === r ? String : Number)(t);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
189
|
-
|
|
190
132
|
|
|
191
|
-
|
|
192
|
-
var i = toPrimitive(t, "string");
|
|
193
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
133
|
+
return obj;
|
|
194
134
|
}
|
|
195
135
|
|
|
196
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
197
|
-
|
|
198
|
-
function _defineProperty(e, r, t) {
|
|
199
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
200
|
-
value: t,
|
|
201
|
-
enumerable: !0,
|
|
202
|
-
configurable: !0,
|
|
203
|
-
writable: !0
|
|
204
|
-
}) : e[r] = t, e;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
136
|
/***/ })
|
|
209
137
|
|
|
210
138
|
/******/ });
|
|
@@ -287,12 +215,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
287
215
|
"default": function() { return /* reexport */ AddData; }
|
|
288
216
|
});
|
|
289
217
|
|
|
290
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.
|
|
291
|
-
var
|
|
292
|
-
// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.constructor.js"
|
|
293
|
-
var esnext_iterator_constructor_js_ = __webpack_require__(8470);
|
|
294
|
-
// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.for-each.js"
|
|
295
|
-
var esnext_iterator_for_each_js_ = __webpack_require__(1058);
|
|
218
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.includes.js"
|
|
219
|
+
var es_array_includes_js_ = __webpack_require__(3600);
|
|
296
220
|
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
297
221
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(1895);
|
|
298
222
|
// EXTERNAL MODULE: external "@element-plus/icons-vue"
|
|
@@ -301,16 +225,8 @@ var icons_vue_ = __webpack_require__(8422);
|
|
|
301
225
|
var client_icons_vue_ = __webpack_require__(348);
|
|
302
226
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
|
|
303
227
|
var gis_utils_ = __webpack_require__(7135);
|
|
304
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
305
|
-
var defineProperty = __webpack_require__(
|
|
306
|
-
// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.filter.js"
|
|
307
|
-
var esnext_iterator_filter_js_ = __webpack_require__(2753);
|
|
308
|
-
// EXTERNAL MODULE: external "core-js/modules/web.url-search-params.delete.js"
|
|
309
|
-
var web_url_search_params_delete_js_ = __webpack_require__(4360);
|
|
310
|
-
// EXTERNAL MODULE: external "core-js/modules/web.url-search-params.has.js"
|
|
311
|
-
var web_url_search_params_has_js_ = __webpack_require__(8824);
|
|
312
|
-
// EXTERNAL MODULE: external "core-js/modules/web.url-search-params.size.js"
|
|
313
|
-
var web_url_search_params_size_js_ = __webpack_require__(2936);
|
|
228
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
229
|
+
var defineProperty = __webpack_require__(8270);
|
|
314
230
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/webmapservice"
|
|
315
231
|
var webmapservice_ = __webpack_require__(3217);
|
|
316
232
|
var webmapservice_default = /*#__PURE__*/__webpack_require__.n(webmapservice_);
|
|
@@ -326,12 +242,6 @@ var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_pap
|
|
|
326
242
|
;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
|
|
327
243
|
|
|
328
244
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
245
|
/*
|
|
336
246
|
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
337
247
|
* All rights reserved.
|
|
@@ -340,14 +250,16 @@ var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_pap
|
|
|
340
250
|
|
|
341
251
|
|
|
342
252
|
|
|
253
|
+
//添加数据逻辑类
|
|
343
254
|
|
|
344
|
-
|
|
345
|
-
//添加数据逻辑类
|
|
346
255
|
class AddDataViewModel {
|
|
347
256
|
constructor(scenceView, options) {
|
|
348
257
|
(0,defineProperty/* default */.Z)(this, "_viewer", null);
|
|
258
|
+
|
|
349
259
|
(0,defineProperty/* default */.Z)(this, "_layerManager", null);
|
|
260
|
+
|
|
350
261
|
(0,defineProperty/* default */.Z)(this, "_language", null);
|
|
262
|
+
|
|
351
263
|
(0,defineProperty/* default */.Z)(this, "_geojsonStyle", {
|
|
352
264
|
label: {
|
|
353
265
|
express: "name",
|
|
@@ -361,15 +273,15 @@ class AddDataViewModel {
|
|
|
361
273
|
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
362
274
|
eyeOffset: Cesium.Cartesian3.ZERO,
|
|
363
275
|
pixelOffset: new Cesium.Cartesian2(0, -8),
|
|
364
|
-
disableDepthTestDistance: 10000000
|
|
365
|
-
|
|
276
|
+
disableDepthTestDistance: 10000000 // disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
277
|
+
|
|
366
278
|
},
|
|
367
279
|
billboard: {
|
|
368
280
|
image: const_image_.BILLBOARD_IMAGE_URL,
|
|
369
281
|
width: 12,
|
|
370
282
|
height: 12,
|
|
371
|
-
disableDepthTestDistance: 10000000
|
|
372
|
-
|
|
283
|
+
disableDepthTestDistance: 10000000 // disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
284
|
+
|
|
373
285
|
},
|
|
374
286
|
polyline: {
|
|
375
287
|
width: 2.0,
|
|
@@ -384,20 +296,23 @@ class AddDataViewModel {
|
|
|
384
296
|
perPositionHeight: false
|
|
385
297
|
}
|
|
386
298
|
});
|
|
299
|
+
|
|
387
300
|
this._viewer = scenceView._viewer;
|
|
388
301
|
this._layerManager = scenceView._layerManager;
|
|
389
302
|
this._language = scenceView._language;
|
|
390
303
|
this._geometryServerUrl = options.geometryServerUrl;
|
|
391
304
|
this._geometryServerToken = options.geometryServerToken;
|
|
392
305
|
if (options.geojsonStyle) this._geojsonStyle = Object.assign({}, this._geojsonStyle, options.geojsonStyle);
|
|
393
|
-
}
|
|
306
|
+
} //解析文件
|
|
307
|
+
|
|
394
308
|
|
|
395
|
-
//解析文件
|
|
396
309
|
parseFile(file, cb) {
|
|
397
310
|
var that = this;
|
|
398
311
|
return new Promise((resolve, reject) => {
|
|
399
312
|
var ext = file.name.replace(/.+\./, "").toLowerCase(); //文件扩展名
|
|
313
|
+
|
|
400
314
|
var name = file.name.replace(/(.*\/)*([^.]+).*/gi, "$2"); //文件名
|
|
315
|
+
|
|
401
316
|
if (ext === "zip") {
|
|
402
317
|
(0,util_.uploadSHP)(file, function (res) {
|
|
403
318
|
if (res) {
|
|
@@ -413,8 +328,10 @@ class AddDataViewModel {
|
|
|
413
328
|
};
|
|
414
329
|
}
|
|
415
330
|
});
|
|
416
|
-
|
|
417
|
-
// ds.autoAvoid(that._viewer);
|
|
331
|
+
|
|
332
|
+
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
333
|
+
|
|
334
|
+
|
|
418
335
|
that.flyToLayer(ds);
|
|
419
336
|
resolve("success");
|
|
420
337
|
var layer = {
|
|
@@ -427,7 +344,9 @@ class AddDataViewModel {
|
|
|
427
344
|
addType: "geojson",
|
|
428
345
|
shapeType: that._layerManager.getShapeType(ds)
|
|
429
346
|
};
|
|
347
|
+
|
|
430
348
|
that._layerManager.addTempLayerNode(layer);
|
|
349
|
+
|
|
431
350
|
cb && cb(layer);
|
|
432
351
|
});
|
|
433
352
|
} else {
|
|
@@ -451,8 +370,10 @@ class AddDataViewModel {
|
|
|
451
370
|
};
|
|
452
371
|
}
|
|
453
372
|
});
|
|
454
|
-
|
|
455
|
-
// ds.autoAvoid(that._viewer);
|
|
373
|
+
|
|
374
|
+
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
375
|
+
|
|
376
|
+
|
|
456
377
|
that.flyToLayer(ds);
|
|
457
378
|
resolve("success");
|
|
458
379
|
var layer = {
|
|
@@ -465,7 +386,9 @@ class AddDataViewModel {
|
|
|
465
386
|
addType: "geojson",
|
|
466
387
|
shapeType: that._layerManager.getShapeType(ds)
|
|
467
388
|
};
|
|
389
|
+
|
|
468
390
|
that._layerManager.addTempLayerNode(layer);
|
|
391
|
+
|
|
469
392
|
cb && cb(layer);
|
|
470
393
|
});
|
|
471
394
|
} else {
|
|
@@ -483,11 +406,13 @@ class AddDataViewModel {
|
|
|
483
406
|
type: "FeatureCollection",
|
|
484
407
|
features: []
|
|
485
408
|
};
|
|
409
|
+
|
|
486
410
|
for (var i = 0; i < features.length; i++) {
|
|
487
411
|
let item = features[i];
|
|
488
412
|
let lat = null;
|
|
489
413
|
let lng = null;
|
|
490
414
|
let properties = {};
|
|
415
|
+
|
|
491
416
|
for (var j in item) {
|
|
492
417
|
if (j.toUpperCase().indexOf("LAT") != -1) {
|
|
493
418
|
lat = item[j];
|
|
@@ -500,8 +425,9 @@ class AddDataViewModel {
|
|
|
500
425
|
} else {
|
|
501
426
|
properties[j] = item[j];
|
|
502
427
|
}
|
|
503
|
-
}
|
|
504
|
-
|
|
428
|
+
} // 点数据
|
|
429
|
+
|
|
430
|
+
|
|
505
431
|
if (lat && lng) {
|
|
506
432
|
let _point = {
|
|
507
433
|
type: "Feature",
|
|
@@ -511,9 +437,11 @@ class AddDataViewModel {
|
|
|
511
437
|
},
|
|
512
438
|
properties: properties
|
|
513
439
|
};
|
|
440
|
+
|
|
514
441
|
_featureCollection.features.push(_point);
|
|
515
442
|
} else {}
|
|
516
443
|
}
|
|
444
|
+
|
|
517
445
|
if (_featureCollection.features.length > 0) {
|
|
518
446
|
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
519
447
|
ds.load(_featureCollection, that._geojsonStyle).then(ds => {
|
|
@@ -527,7 +455,9 @@ class AddDataViewModel {
|
|
|
527
455
|
};
|
|
528
456
|
}
|
|
529
457
|
});
|
|
458
|
+
|
|
530
459
|
that._viewer.dataSources.add(ds);
|
|
460
|
+
|
|
531
461
|
that.flyToLayer(ds);
|
|
532
462
|
resolve("success");
|
|
533
463
|
var layer = {
|
|
@@ -540,7 +470,9 @@ class AddDataViewModel {
|
|
|
540
470
|
addType: "geojson",
|
|
541
471
|
shapeType: that._layerManager.getShapeType(ds)
|
|
542
472
|
};
|
|
473
|
+
|
|
543
474
|
that._layerManager.addTempLayerNode(layer);
|
|
475
|
+
|
|
544
476
|
cb && cb(layer);
|
|
545
477
|
});
|
|
546
478
|
} else {
|
|
@@ -563,7 +495,9 @@ class AddDataViewModel {
|
|
|
563
495
|
};
|
|
564
496
|
}
|
|
565
497
|
});
|
|
498
|
+
|
|
566
499
|
that._viewer.dataSources.add(ds);
|
|
500
|
+
|
|
567
501
|
that.flyToLayer(ds);
|
|
568
502
|
resolve("success");
|
|
569
503
|
var layer = {
|
|
@@ -576,7 +510,9 @@ class AddDataViewModel {
|
|
|
576
510
|
addType: "geojson",
|
|
577
511
|
shapeType: that._layerManager.getShapeType(ds)
|
|
578
512
|
};
|
|
513
|
+
|
|
579
514
|
that._layerManager.addTempLayerNode(layer);
|
|
515
|
+
|
|
580
516
|
cb && cb(layer);
|
|
581
517
|
});
|
|
582
518
|
} else {
|
|
@@ -591,9 +527,11 @@ class AddDataViewModel {
|
|
|
591
527
|
if (res.features && res.features.type === "processFailed") {
|
|
592
528
|
reject(file.uid);
|
|
593
529
|
}
|
|
530
|
+
|
|
594
531
|
if (res.srs) {
|
|
595
532
|
delete res.srs;
|
|
596
533
|
}
|
|
534
|
+
|
|
597
535
|
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
598
536
|
ds.load(res, that._geojsonStyle).then(ds => {
|
|
599
537
|
ds.entities.values.forEach(entity => {
|
|
@@ -606,7 +544,9 @@ class AddDataViewModel {
|
|
|
606
544
|
};
|
|
607
545
|
}
|
|
608
546
|
});
|
|
547
|
+
|
|
609
548
|
that._viewer.dataSources.add(ds);
|
|
549
|
+
|
|
610
550
|
that.flyToLayer(ds);
|
|
611
551
|
resolve("success");
|
|
612
552
|
var layer = {
|
|
@@ -619,7 +559,9 @@ class AddDataViewModel {
|
|
|
619
559
|
addType: "geojson",
|
|
620
560
|
shapeType: that._layerManager.getShapeType(ds)
|
|
621
561
|
};
|
|
562
|
+
|
|
622
563
|
that._layerManager.addTempLayerNode(layer);
|
|
564
|
+
|
|
623
565
|
cb && cb(layer);
|
|
624
566
|
});
|
|
625
567
|
} else {
|
|
@@ -633,31 +575,36 @@ class AddDataViewModel {
|
|
|
633
575
|
//readAsArrayBuffer(file); //原始二进制数据
|
|
634
576
|
//readAsBinaryString(file);//二进制字符串
|
|
635
577
|
//reader.readAsBinaryString(file);
|
|
578
|
+
|
|
636
579
|
reader.onload = function (event) {
|
|
637
580
|
var ret = event.target.result;
|
|
581
|
+
|
|
638
582
|
switch (ext) {
|
|
639
583
|
case "json":
|
|
640
584
|
case "geojson":
|
|
641
585
|
case "topojson":
|
|
642
586
|
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
643
587
|
ret = ret.substring(ret.indexOf("{"));
|
|
588
|
+
|
|
644
589
|
try {
|
|
645
590
|
var data = JSON.parse(ret);
|
|
591
|
+
|
|
646
592
|
if (typeof data == "object" && data) {
|
|
647
593
|
ret = data;
|
|
648
594
|
}
|
|
649
595
|
} catch (e) {}
|
|
650
|
-
|
|
651
|
-
|
|
596
|
+
|
|
597
|
+
var style = { ...that._geojsonStyle
|
|
652
598
|
};
|
|
653
599
|
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
654
|
-
var addType = "geojson";
|
|
655
|
-
|
|
600
|
+
var addType = "geojson"; // 判断是否是arcgis格式的json数据
|
|
601
|
+
|
|
656
602
|
if (ret.geometryType) {
|
|
657
603
|
ds = new Cesium.Kq3dEsriGeoJsonDataSource(name);
|
|
658
604
|
style.label.express = "NAME";
|
|
659
605
|
addType = "arcjson";
|
|
660
606
|
}
|
|
607
|
+
|
|
661
608
|
ds.load(ret, style).then(ds => {
|
|
662
609
|
ds.entities.values.forEach(entity => {
|
|
663
610
|
if (entity.polygon) {
|
|
@@ -669,8 +616,10 @@ class AddDataViewModel {
|
|
|
669
616
|
};
|
|
670
617
|
}
|
|
671
618
|
});
|
|
672
|
-
|
|
673
|
-
// ds.autoAvoid(that._viewer);
|
|
619
|
+
|
|
620
|
+
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
621
|
+
|
|
622
|
+
|
|
674
623
|
that.flyToLayer(ds);
|
|
675
624
|
resolve("success");
|
|
676
625
|
var layer = {
|
|
@@ -683,10 +632,13 @@ class AddDataViewModel {
|
|
|
683
632
|
addType: addType,
|
|
684
633
|
shapeType: that._layerManager.getShapeType(ds)
|
|
685
634
|
};
|
|
635
|
+
|
|
686
636
|
that._layerManager.addTempLayerNode(layer);
|
|
637
|
+
|
|
687
638
|
cb && cb(layer);
|
|
688
639
|
});
|
|
689
640
|
break;
|
|
641
|
+
|
|
690
642
|
case "kml":
|
|
691
643
|
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
692
644
|
var options = {
|
|
@@ -700,6 +652,7 @@ class AddDataViewModel {
|
|
|
700
652
|
});
|
|
701
653
|
ds.load(data).then(ds => {
|
|
702
654
|
that._viewer.dataSources.add(ds);
|
|
655
|
+
|
|
703
656
|
that.flyToLayer(ds);
|
|
704
657
|
resolve("success");
|
|
705
658
|
var layer = {
|
|
@@ -711,10 +664,13 @@ class AddDataViewModel {
|
|
|
711
664
|
url: data,
|
|
712
665
|
addType: "kml"
|
|
713
666
|
};
|
|
667
|
+
|
|
714
668
|
that._layerManager.addTempLayerNode(layer);
|
|
669
|
+
|
|
715
670
|
cb && cb(layer);
|
|
716
671
|
});
|
|
717
672
|
break;
|
|
673
|
+
|
|
718
674
|
case "kmz":
|
|
719
675
|
var options = {
|
|
720
676
|
name: name,
|
|
@@ -724,6 +680,7 @@ class AddDataViewModel {
|
|
|
724
680
|
var ds = new Cesium.KmlDataSource(options);
|
|
725
681
|
ds.load(file).then(ds => {
|
|
726
682
|
that._viewer.dataSources.add(ds);
|
|
683
|
+
|
|
727
684
|
that.flyToLayer(ds);
|
|
728
685
|
resolve("success");
|
|
729
686
|
var layer = {
|
|
@@ -735,25 +692,34 @@ class AddDataViewModel {
|
|
|
735
692
|
url: file,
|
|
736
693
|
addType: "kml"
|
|
737
694
|
};
|
|
695
|
+
|
|
738
696
|
that._layerManager.addTempLayerNode(layer);
|
|
697
|
+
|
|
739
698
|
cb && cb(layer);
|
|
740
699
|
});
|
|
741
700
|
break;
|
|
701
|
+
|
|
742
702
|
case "czml":
|
|
743
703
|
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
704
|
+
|
|
744
705
|
try {
|
|
745
706
|
var data = JSON.parse(ret);
|
|
707
|
+
|
|
746
708
|
if (typeof data == "object" && data) {
|
|
747
709
|
ret = data;
|
|
748
710
|
}
|
|
749
711
|
} catch (e) {}
|
|
712
|
+
|
|
750
713
|
if (that._viewer.timeline.container.style.display != 'block') {
|
|
751
714
|
that._viewer.bottomContainer.style.bottom = '15px';
|
|
752
715
|
that._viewer.timeline.container.style.display = 'block';
|
|
753
716
|
that._viewer.animation.container.style.display = 'block';
|
|
717
|
+
|
|
754
718
|
that._viewer.animation.resize();
|
|
719
|
+
|
|
755
720
|
that._viewer.clock.shouldAnimate = true;
|
|
756
721
|
}
|
|
722
|
+
|
|
757
723
|
that._viewer.dataSources.add(Cesium.CzmlDataSource.load(ret, {
|
|
758
724
|
name: name
|
|
759
725
|
})).then(ds => {
|
|
@@ -768,39 +734,53 @@ class AddDataViewModel {
|
|
|
768
734
|
url: ret,
|
|
769
735
|
addType: "czml"
|
|
770
736
|
};
|
|
737
|
+
|
|
771
738
|
that._layerManager.addTempLayerNode(layer);
|
|
739
|
+
|
|
772
740
|
cb && cb(layer);
|
|
773
741
|
});
|
|
742
|
+
|
|
774
743
|
break;
|
|
744
|
+
|
|
775
745
|
case "kqgeobody":
|
|
776
746
|
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
747
|
+
|
|
777
748
|
try {
|
|
778
749
|
let data = JSON.parse(ret);
|
|
750
|
+
|
|
779
751
|
if (Array.isArray(data)) {
|
|
780
752
|
ret = data;
|
|
781
753
|
}
|
|
782
754
|
} catch (e) {}
|
|
755
|
+
|
|
783
756
|
let geology = new Cesium.Kq3dGeologyBody({
|
|
784
757
|
viewer: that._viewer
|
|
785
758
|
});
|
|
786
759
|
geology.name = name;
|
|
760
|
+
|
|
787
761
|
that._viewer.geologyBodyCollection.push(geology);
|
|
762
|
+
|
|
788
763
|
geology.createGeology(ret).then(function (geobody) {
|
|
789
764
|
if (!geobody.viewer.scene.primitives.contains(geobody.geologyPrimitives)) {
|
|
790
765
|
geobody.geologyPrimitives = geobody.viewer.scene.primitives.add(geobody.geologyPrimitiveCollection);
|
|
791
766
|
}
|
|
767
|
+
|
|
792
768
|
let boundingSpheres = [];
|
|
769
|
+
|
|
793
770
|
geobody.geologyPrimitives._primitives.forEach(primitive => {
|
|
794
771
|
if (primitive.geometryInstances.geometry.boundingSphere) {
|
|
795
772
|
boundingSpheres = boundingSpheres.concat(primitive.geometryInstances.geometry.boundingSphere);
|
|
796
773
|
}
|
|
797
774
|
});
|
|
775
|
+
|
|
798
776
|
if (boundingSpheres.length > 0) {
|
|
799
777
|
let boundingSphere = Cesium.BoundingSphere.fromBoundingSpheres(boundingSpheres);
|
|
778
|
+
|
|
800
779
|
that._viewer.camera.flyToBoundingSphere(boundingSphere, {
|
|
801
780
|
offset: new Cesium.HeadingPitchRange(0.0, Cesium.Math.toRadians(-90.0), boundingSphere.radius * 3)
|
|
802
781
|
});
|
|
803
782
|
}
|
|
783
|
+
|
|
804
784
|
resolve("success");
|
|
805
785
|
var layer = {
|
|
806
786
|
guid: geology.geologyPrimitiveCollection._guid,
|
|
@@ -811,27 +791,33 @@ class AddDataViewModel {
|
|
|
811
791
|
url: ret,
|
|
812
792
|
addType: "kqgeobody"
|
|
813
793
|
};
|
|
794
|
+
|
|
814
795
|
that._layerManager.addTempLayerNode(layer);
|
|
796
|
+
|
|
815
797
|
cb && cb(layer);
|
|
816
798
|
});
|
|
817
799
|
break;
|
|
800
|
+
|
|
818
801
|
default:
|
|
819
802
|
break;
|
|
820
803
|
}
|
|
821
804
|
};
|
|
805
|
+
|
|
822
806
|
reader.onerror = function () {
|
|
823
807
|
console.log(file.name + " read error.");
|
|
824
808
|
reject(file.name + " read error.");
|
|
825
809
|
};
|
|
826
810
|
}
|
|
827
811
|
});
|
|
828
|
-
}
|
|
812
|
+
} //解析数据源
|
|
813
|
+
|
|
829
814
|
|
|
830
|
-
//解析数据源
|
|
831
815
|
parseDataSource(options, cb, loadCustom) {
|
|
832
816
|
options = options || {};
|
|
817
|
+
|
|
833
818
|
if (options.url && options.url !== "") {
|
|
834
819
|
let url = options.url;
|
|
820
|
+
|
|
835
821
|
if (options.type === "stkterrain") {
|
|
836
822
|
if (url.indexOf("?") > 0) {
|
|
837
823
|
url = url.replace("?", "layer.json?");
|
|
@@ -839,6 +825,7 @@ class AddDataViewModel {
|
|
|
839
825
|
url += "layer.json";
|
|
840
826
|
}
|
|
841
827
|
}
|
|
828
|
+
|
|
842
829
|
try {
|
|
843
830
|
new URL(url);
|
|
844
831
|
} catch (error) {
|
|
@@ -848,10 +835,12 @@ class AddDataViewModel {
|
|
|
848
835
|
});
|
|
849
836
|
return;
|
|
850
837
|
}
|
|
838
|
+
|
|
851
839
|
if (options.type === "kml") {
|
|
852
840
|
this.parseService(options, cb, loadCustom);
|
|
853
841
|
return;
|
|
854
842
|
}
|
|
843
|
+
|
|
855
844
|
fetch(url).then(data => {
|
|
856
845
|
return data;
|
|
857
846
|
}).then(data => {
|
|
@@ -877,21 +866,24 @@ class AddDataViewModel {
|
|
|
877
866
|
type: "warning"
|
|
878
867
|
});
|
|
879
868
|
}
|
|
880
|
-
}
|
|
869
|
+
} //解析服务
|
|
870
|
+
|
|
881
871
|
|
|
882
|
-
//解析服务
|
|
883
872
|
parseService(options, cb, loadCustom) {
|
|
884
873
|
let that = this;
|
|
885
874
|
let url = options.url;
|
|
886
875
|
let type = options.type || "";
|
|
887
876
|
type = type.toLowerCase();
|
|
888
877
|
let name = options.name;
|
|
878
|
+
|
|
889
879
|
if (!name || name === "") {
|
|
890
880
|
let ext;
|
|
881
|
+
|
|
891
882
|
if (url.lastIndexOf(".") > url.lastIndexOf("/")) {
|
|
892
883
|
ext = url.substring(url.lastIndexOf(".") + 1);
|
|
893
884
|
ext = ext.toLowerCase();
|
|
894
885
|
}
|
|
886
|
+
|
|
895
887
|
if (["kml", "kmz", "czml", "geojson", "json", "topojson"].indexOf(ext) > -1) {
|
|
896
888
|
name = url.substring(url.lastIndexOf("/") + 1);
|
|
897
889
|
} else {
|
|
@@ -901,7 +893,9 @@ class AddDataViewModel {
|
|
|
901
893
|
}
|
|
902
894
|
}
|
|
903
895
|
}
|
|
896
|
+
|
|
904
897
|
let node, layer;
|
|
898
|
+
|
|
905
899
|
switch (type) {
|
|
906
900
|
case "kq3dimageryfile":
|
|
907
901
|
//影像瓦片文件
|
|
@@ -919,16 +913,21 @@ class AddDataViewModel {
|
|
|
919
913
|
url: url,
|
|
920
914
|
addType: type
|
|
921
915
|
};
|
|
916
|
+
|
|
922
917
|
this._layerManager.addTempLayerNode(node);
|
|
918
|
+
|
|
923
919
|
cb && cb(node);
|
|
924
920
|
break;
|
|
921
|
+
|
|
925
922
|
case "obterrain":
|
|
926
923
|
//ob地形瓦片文件
|
|
927
924
|
layer = new Cesium.Kq3dFileTerrainProvider({
|
|
928
925
|
name: name,
|
|
929
926
|
url: url
|
|
930
927
|
});
|
|
928
|
+
|
|
931
929
|
this._layerManager.setTerrain(layer);
|
|
930
|
+
|
|
932
931
|
this.flyToLayer(layer);
|
|
933
932
|
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
934
933
|
node = {
|
|
@@ -940,10 +939,14 @@ class AddDataViewModel {
|
|
|
940
939
|
url: url,
|
|
941
940
|
addType: type
|
|
942
941
|
};
|
|
942
|
+
|
|
943
943
|
this._layerManager.addTempLayerNode(node);
|
|
944
|
+
|
|
944
945
|
this._layerManager._terrainProviders.push(layer);
|
|
946
|
+
|
|
945
947
|
cb && cb(node);
|
|
946
948
|
break;
|
|
949
|
+
|
|
947
950
|
case "stkterrain":
|
|
948
951
|
//stk地形瓦片文件
|
|
949
952
|
layer = new Cesium.CesiumTerrainProvider({
|
|
@@ -953,7 +956,9 @@ class AddDataViewModel {
|
|
|
953
956
|
requestWaterMask: false
|
|
954
957
|
});
|
|
955
958
|
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
959
|
+
|
|
956
960
|
this._layerManager.setTerrain(layer);
|
|
961
|
+
|
|
957
962
|
this.flyToLayer(layer);
|
|
958
963
|
node = {
|
|
959
964
|
guid: layer.guid,
|
|
@@ -964,15 +969,20 @@ class AddDataViewModel {
|
|
|
964
969
|
url: url,
|
|
965
970
|
addType: type
|
|
966
971
|
};
|
|
972
|
+
|
|
967
973
|
this._layerManager.addTempLayerNode(node);
|
|
974
|
+
|
|
968
975
|
this._layerManager._terrainProviders.push(layer);
|
|
976
|
+
|
|
969
977
|
cb && cb(node);
|
|
970
978
|
break;
|
|
979
|
+
|
|
971
980
|
case "3dtiles":
|
|
972
981
|
var tileset = this._viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
973
982
|
name: name,
|
|
974
983
|
url: url
|
|
975
984
|
}));
|
|
985
|
+
|
|
976
986
|
this.flyToLayer(tileset);
|
|
977
987
|
node = {
|
|
978
988
|
guid: tileset.guid,
|
|
@@ -983,18 +993,22 @@ class AddDataViewModel {
|
|
|
983
993
|
url: url,
|
|
984
994
|
addType: type
|
|
985
995
|
};
|
|
996
|
+
|
|
986
997
|
this._layerManager.addTempLayerNode(node);
|
|
998
|
+
|
|
987
999
|
cb && cb(node);
|
|
988
1000
|
break;
|
|
1001
|
+
|
|
989
1002
|
case "kqgis3dserver":
|
|
990
1003
|
// KQGIS 三维服务
|
|
991
|
-
var geojsonStyle0 = {
|
|
992
|
-
...this._geojsonStyle
|
|
1004
|
+
var geojsonStyle0 = { ...this._geojsonStyle
|
|
993
1005
|
};
|
|
1006
|
+
|
|
994
1007
|
this._viewer.addKq3dServerLayerGroupExt(url, {
|
|
995
1008
|
geojsonStyle: geojsonStyle0
|
|
996
1009
|
}).then(group => {
|
|
997
1010
|
var layers = group._addedLayers || group._layers;
|
|
1011
|
+
|
|
998
1012
|
if (layers && layers.length > 0) {
|
|
999
1013
|
node = {
|
|
1000
1014
|
guid: group.guid,
|
|
@@ -1005,6 +1019,7 @@ class AddDataViewModel {
|
|
|
1005
1019
|
var serverType = "";
|
|
1006
1020
|
var addType = "";
|
|
1007
1021
|
let promiseList = [];
|
|
1022
|
+
|
|
1008
1023
|
for (var i = 0; i < layers.length; i++) {
|
|
1009
1024
|
if (layers[i] instanceof Cesium.Cesium3DTileset) {
|
|
1010
1025
|
serverType = "3dtiles";
|
|
@@ -1018,11 +1033,13 @@ class AddDataViewModel {
|
|
|
1018
1033
|
serverType = "terrainprovider";
|
|
1019
1034
|
addType = "obterrain";
|
|
1020
1035
|
url = layers[i]._originUrl + layers[i]._urlPramas;
|
|
1036
|
+
|
|
1021
1037
|
this._layerManager._terrainProviders.push(layers[i]);
|
|
1022
1038
|
} else if (layers[i] instanceof Cesium.CesiumTerrainProvider) {
|
|
1023
1039
|
serverType = "terrainprovider";
|
|
1024
1040
|
addType = "stkterrain";
|
|
1025
1041
|
url = layers[i]._originUrl;
|
|
1042
|
+
|
|
1026
1043
|
this._layerManager._terrainProviders.push(layers[i]);
|
|
1027
1044
|
} else if (layers[i] instanceof Cesium.Kq3dGeoJsonDataSource) {
|
|
1028
1045
|
serverType = "datasource";
|
|
@@ -1041,10 +1058,11 @@ class AddDataViewModel {
|
|
|
1041
1058
|
};
|
|
1042
1059
|
}
|
|
1043
1060
|
});
|
|
1044
|
-
let shapeType = "";
|
|
1045
|
-
|
|
1061
|
+
let shapeType = ""; // 判断geojson点线面类型
|
|
1062
|
+
|
|
1046
1063
|
if (ds.entities.values.length > 0) {
|
|
1047
1064
|
let entity = ds.entities.values[0];
|
|
1065
|
+
|
|
1048
1066
|
if (entity.polygon) {
|
|
1049
1067
|
shapeType = "polygon";
|
|
1050
1068
|
} else if (entity.polyline) {
|
|
@@ -1053,6 +1071,7 @@ class AddDataViewModel {
|
|
|
1053
1071
|
shapeType = "point";
|
|
1054
1072
|
}
|
|
1055
1073
|
}
|
|
1074
|
+
|
|
1056
1075
|
let dsChild = {
|
|
1057
1076
|
guid: ds.guid,
|
|
1058
1077
|
name: ds._name,
|
|
@@ -1072,6 +1091,7 @@ class AddDataViewModel {
|
|
|
1072
1091
|
addType = "s3m";
|
|
1073
1092
|
url = layers[i]._url;
|
|
1074
1093
|
}
|
|
1094
|
+
|
|
1075
1095
|
if (serverType !== "datasource") {
|
|
1076
1096
|
if (!layers[i].guid) layers[i].guid = Cesium.createGuid();
|
|
1077
1097
|
node.children.push({
|
|
@@ -1084,14 +1104,19 @@ class AddDataViewModel {
|
|
|
1084
1104
|
});
|
|
1085
1105
|
}
|
|
1086
1106
|
}
|
|
1107
|
+
|
|
1087
1108
|
Promise.all(promiseList).then(() => {
|
|
1088
1109
|
this.flyToLayer(layers[0]);
|
|
1110
|
+
|
|
1089
1111
|
this._layerManager.addTempLayerNode(node);
|
|
1112
|
+
|
|
1090
1113
|
cb && cb(node);
|
|
1091
1114
|
});
|
|
1092
1115
|
}
|
|
1093
1116
|
});
|
|
1117
|
+
|
|
1094
1118
|
break;
|
|
1119
|
+
|
|
1095
1120
|
case "kqgisimageserver":
|
|
1096
1121
|
// KQGIS 影像服务
|
|
1097
1122
|
node = {
|
|
@@ -1104,6 +1129,7 @@ class AddDataViewModel {
|
|
|
1104
1129
|
service.init(result => {
|
|
1105
1130
|
if (result.resultcode === "success") {
|
|
1106
1131
|
let list = service.collectionInfoList;
|
|
1132
|
+
|
|
1107
1133
|
if (list && list.length > 0) {
|
|
1108
1134
|
list.forEach(item => {
|
|
1109
1135
|
layer = that._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dKQGISServerImageryProviderExt({
|
|
@@ -1121,10 +1147,13 @@ class AddDataViewModel {
|
|
|
1121
1147
|
addType: type,
|
|
1122
1148
|
layerName: item.collectionName,
|
|
1123
1149
|
type: "Image" // 图层树显示图标使用
|
|
1150
|
+
|
|
1124
1151
|
});
|
|
1125
1152
|
});
|
|
1126
1153
|
this.flyToLayer(layer);
|
|
1154
|
+
|
|
1127
1155
|
this._layerManager.addTempLayerNode(node);
|
|
1156
|
+
|
|
1128
1157
|
cb && cb(node);
|
|
1129
1158
|
}
|
|
1130
1159
|
} else {
|
|
@@ -1132,6 +1161,7 @@ class AddDataViewModel {
|
|
|
1132
1161
|
}
|
|
1133
1162
|
});
|
|
1134
1163
|
break;
|
|
1164
|
+
|
|
1135
1165
|
case "kqgisdataserver":
|
|
1136
1166
|
// KQGIS 数据服务
|
|
1137
1167
|
this.addDataServer(url).then(children => {
|
|
@@ -1142,10 +1172,13 @@ class AddDataViewModel {
|
|
|
1142
1172
|
children: children,
|
|
1143
1173
|
lsType: "ls"
|
|
1144
1174
|
};
|
|
1175
|
+
|
|
1145
1176
|
this._layerManager.addTempLayerNode(node, 1);
|
|
1177
|
+
|
|
1146
1178
|
cb && cb(node);
|
|
1147
1179
|
});
|
|
1148
1180
|
break;
|
|
1181
|
+
|
|
1149
1182
|
case "kqgismapserver":
|
|
1150
1183
|
// KQGIS 地图服务
|
|
1151
1184
|
if (loadCustom) {
|
|
@@ -1155,19 +1188,22 @@ class AddDataViewModel {
|
|
|
1155
1188
|
});
|
|
1156
1189
|
return;
|
|
1157
1190
|
}
|
|
1191
|
+
|
|
1158
1192
|
node = {
|
|
1159
1193
|
guid: Cesium.createGuid(),
|
|
1160
1194
|
name: name,
|
|
1161
1195
|
children: [],
|
|
1162
1196
|
lsType: "ls"
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1197
|
+
}; //使用二维方式解析服务
|
|
1198
|
+
|
|
1165
1199
|
let serverName = url.split("services/")[1].split("/")[0];
|
|
1166
1200
|
let serverUrl = url.split("services/")[0] + "services/";
|
|
1167
1201
|
let token;
|
|
1202
|
+
|
|
1168
1203
|
if (url.indexOf("ua_token") != -1) {
|
|
1169
1204
|
token = url.split("ua_token=")[1].split("&")[0];
|
|
1170
1205
|
}
|
|
1206
|
+
|
|
1171
1207
|
let webMapService = new (webmapservice_default())(serverName, {
|
|
1172
1208
|
token: token,
|
|
1173
1209
|
serviceUrl: serverUrl
|
|
@@ -1180,12 +1216,13 @@ class AddDataViewModel {
|
|
|
1180
1216
|
});
|
|
1181
1217
|
return;
|
|
1182
1218
|
}
|
|
1219
|
+
|
|
1183
1220
|
mapInfo = mapInfo.result;
|
|
1184
1221
|
let mapServerInfo = (0,util_.formatKQMapInfo)(mapInfo, serverUrl, serverName, token, null, true);
|
|
1185
1222
|
let showLayers = [];
|
|
1186
1223
|
showLayers = showLayers.concat(mapServerInfo.layers_show);
|
|
1187
|
-
showLayers.reverse();
|
|
1188
|
-
|
|
1224
|
+
showLayers.reverse(); //获取图层筛选类型时用
|
|
1225
|
+
|
|
1189
1226
|
showLayers.forEach(layer => {
|
|
1190
1227
|
layer.sourceType = "kqserver";
|
|
1191
1228
|
});
|
|
@@ -1199,8 +1236,10 @@ class AddDataViewModel {
|
|
|
1199
1236
|
show: layer.visible
|
|
1200
1237
|
});
|
|
1201
1238
|
imageryLayer._guid = layer.guid;
|
|
1239
|
+
|
|
1202
1240
|
this._viewer.imageryLayers.add(imageryLayer);
|
|
1203
1241
|
}, this);
|
|
1242
|
+
|
|
1204
1243
|
if (mapInfo.rect84) {
|
|
1205
1244
|
if (mapInfo.rect84 instanceof Array) {
|
|
1206
1245
|
this._viewer.camera.flyTo({
|
|
@@ -1212,21 +1251,26 @@ class AddDataViewModel {
|
|
|
1212
1251
|
});
|
|
1213
1252
|
}
|
|
1214
1253
|
}
|
|
1254
|
+
|
|
1215
1255
|
setChildrenAddType(mapServerInfo.layerTreeData, type);
|
|
1216
1256
|
mapServerInfo.layerTreeData.forEach(layerData => {
|
|
1217
1257
|
layerData.url = url;
|
|
1218
1258
|
node.children.push(layerData);
|
|
1219
1259
|
});
|
|
1260
|
+
|
|
1220
1261
|
this._layerManager.addTempLayerNode(node, 1);
|
|
1262
|
+
|
|
1221
1263
|
cb && cb(node);
|
|
1222
1264
|
});
|
|
1223
1265
|
break;
|
|
1266
|
+
|
|
1224
1267
|
case "arcgismapserver":
|
|
1225
1268
|
// ARCGIS 地图服务
|
|
1226
1269
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dArcGISMapServerImageryProvider({
|
|
1227
1270
|
name: name,
|
|
1228
1271
|
url: url,
|
|
1229
1272
|
usePreCachedTilesIfAvailable: false //使用export请求可支持自定义比例尺
|
|
1273
|
+
|
|
1230
1274
|
}));
|
|
1231
1275
|
this.flyToLayer(layer);
|
|
1232
1276
|
node = {
|
|
@@ -1238,9 +1282,12 @@ class AddDataViewModel {
|
|
|
1238
1282
|
url: url,
|
|
1239
1283
|
addType: type
|
|
1240
1284
|
};
|
|
1285
|
+
|
|
1241
1286
|
this._layerManager.addTempLayerNode(node);
|
|
1287
|
+
|
|
1242
1288
|
cb && cb(node);
|
|
1243
1289
|
break;
|
|
1290
|
+
|
|
1244
1291
|
case "mvt":
|
|
1245
1292
|
// 矢量瓦片
|
|
1246
1293
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dMvtImageryProviderExt({
|
|
@@ -1257,10 +1304,14 @@ class AddDataViewModel {
|
|
|
1257
1304
|
url: url,
|
|
1258
1305
|
addType: type,
|
|
1259
1306
|
renderType: "vectortile" // 图层树显示图标使用
|
|
1307
|
+
|
|
1260
1308
|
};
|
|
1309
|
+
|
|
1261
1310
|
this._layerManager.addTempLayerNode(node);
|
|
1311
|
+
|
|
1262
1312
|
cb && cb(node);
|
|
1263
1313
|
break;
|
|
1314
|
+
|
|
1264
1315
|
case "kqgisdataflowserver":
|
|
1265
1316
|
// KQGIS 数据流服务
|
|
1266
1317
|
let guid = Cesium.createGuid();
|
|
@@ -1284,10 +1335,14 @@ class AddDataViewModel {
|
|
|
1284
1335
|
url: url,
|
|
1285
1336
|
addType: type
|
|
1286
1337
|
};
|
|
1338
|
+
|
|
1287
1339
|
this._layerManager.addTempLayerNode(node);
|
|
1340
|
+
|
|
1288
1341
|
this._layerManager._dataFlowLayerList.push(layer);
|
|
1342
|
+
|
|
1289
1343
|
cb && cb(node);
|
|
1290
1344
|
break;
|
|
1345
|
+
|
|
1291
1346
|
case "wms":
|
|
1292
1347
|
this._viewer.addWMSLayerGroup(url).then(group => {
|
|
1293
1348
|
node = {
|
|
@@ -1296,13 +1351,16 @@ class AddDataViewModel {
|
|
|
1296
1351
|
children: [],
|
|
1297
1352
|
lsType: "ls",
|
|
1298
1353
|
serverType: "ogcwms" //图层树显示图标使用
|
|
1354
|
+
|
|
1299
1355
|
};
|
|
1300
1356
|
var layers = group._addedLayers || group._layers;
|
|
1357
|
+
|
|
1301
1358
|
if (layers) {
|
|
1302
1359
|
for (var i = layers.length - 1; i >= 0; i--) {
|
|
1303
1360
|
if (i === 0) {
|
|
1304
1361
|
this.flyToLayer(layers[i]);
|
|
1305
1362
|
}
|
|
1363
|
+
|
|
1306
1364
|
node.children.push({
|
|
1307
1365
|
guid: layers[i].guid,
|
|
1308
1366
|
name: layers[i].name,
|
|
@@ -1314,12 +1372,17 @@ class AddDataViewModel {
|
|
|
1314
1372
|
});
|
|
1315
1373
|
}
|
|
1316
1374
|
}
|
|
1375
|
+
|
|
1317
1376
|
this._layerManager.addTempLayerNode(node);
|
|
1377
|
+
|
|
1318
1378
|
cb && cb(node);
|
|
1319
1379
|
});
|
|
1380
|
+
|
|
1320
1381
|
break;
|
|
1382
|
+
|
|
1321
1383
|
case "wmts":
|
|
1322
1384
|
case "kqgistileserver": // KQGIS 瓦片服务
|
|
1385
|
+
|
|
1323
1386
|
case "kqgisaggregationserver":
|
|
1324
1387
|
// KQGIS 聚合服务
|
|
1325
1388
|
if (type === "kqgistileserver") {
|
|
@@ -1329,7 +1392,9 @@ class AddDataViewModel {
|
|
|
1329
1392
|
url += "/wmts";
|
|
1330
1393
|
}
|
|
1331
1394
|
}
|
|
1395
|
+
|
|
1332
1396
|
let defaultName = "wmts";
|
|
1397
|
+
|
|
1333
1398
|
this._viewer.addWMTSLayerGroup(url).then(group => {
|
|
1334
1399
|
// if(type === "kqgistileserver") defaultName = name;
|
|
1335
1400
|
if (type === "kqgisaggregationserver") defaultName = "aggregation";
|
|
@@ -1339,16 +1404,20 @@ class AddDataViewModel {
|
|
|
1339
1404
|
children: [],
|
|
1340
1405
|
lsType: "ls"
|
|
1341
1406
|
};
|
|
1407
|
+
|
|
1342
1408
|
if (type === "wmts") {
|
|
1343
1409
|
//图层树显示图标使用
|
|
1344
1410
|
node.serverType = "ogcwmts";
|
|
1345
1411
|
}
|
|
1412
|
+
|
|
1346
1413
|
var layers = group._addedLayers || group._layers;
|
|
1414
|
+
|
|
1347
1415
|
if (layers) {
|
|
1348
1416
|
for (var i = layers.length - 1; i >= 0; i--) {
|
|
1349
1417
|
if (i === 0) {
|
|
1350
1418
|
this.flyToLayer(layers[i]);
|
|
1351
1419
|
}
|
|
1420
|
+
|
|
1352
1421
|
node.children.push({
|
|
1353
1422
|
guid: layers[i].guid,
|
|
1354
1423
|
name: layers[i].name,
|
|
@@ -1360,10 +1429,14 @@ class AddDataViewModel {
|
|
|
1360
1429
|
});
|
|
1361
1430
|
}
|
|
1362
1431
|
}
|
|
1432
|
+
|
|
1363
1433
|
this._layerManager.addTempLayerNode(node);
|
|
1434
|
+
|
|
1364
1435
|
cb && cb(node);
|
|
1365
1436
|
});
|
|
1437
|
+
|
|
1366
1438
|
break;
|
|
1439
|
+
|
|
1367
1440
|
case "wfs":
|
|
1368
1441
|
var wfsProvider = new Cesium.Kq3dWebFeatureServiceProvider({
|
|
1369
1442
|
url: url,
|
|
@@ -1372,8 +1445,9 @@ class AddDataViewModel {
|
|
|
1372
1445
|
wfsProvider.load().then(function (data) {
|
|
1373
1446
|
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
1374
1447
|
ds.load(data, that._geojsonStyle).then(ds => {
|
|
1375
|
-
that._viewer.dataSources.add(ds);
|
|
1376
|
-
|
|
1448
|
+
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
1449
|
+
|
|
1450
|
+
|
|
1377
1451
|
that.flyToLayer(ds);
|
|
1378
1452
|
node = {
|
|
1379
1453
|
guid: ds.guid,
|
|
@@ -1384,11 +1458,14 @@ class AddDataViewModel {
|
|
|
1384
1458
|
url: url,
|
|
1385
1459
|
addType: type
|
|
1386
1460
|
};
|
|
1461
|
+
|
|
1387
1462
|
that._layerManager.addTempLayerNode(node);
|
|
1463
|
+
|
|
1388
1464
|
cb && cb(node);
|
|
1389
1465
|
});
|
|
1390
1466
|
});
|
|
1391
1467
|
break;
|
|
1468
|
+
|
|
1392
1469
|
case "geojson":
|
|
1393
1470
|
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
1394
1471
|
ds.load(url, this._geojsonStyle).then(ds => {
|
|
@@ -1402,8 +1479,10 @@ class AddDataViewModel {
|
|
|
1402
1479
|
};
|
|
1403
1480
|
}
|
|
1404
1481
|
}, this);
|
|
1405
|
-
|
|
1406
|
-
// ds.autoAvoid(this._viewer);
|
|
1482
|
+
|
|
1483
|
+
this._viewer.dataSources.add(ds); // ds.autoAvoid(this._viewer);
|
|
1484
|
+
|
|
1485
|
+
|
|
1407
1486
|
that.flyToLayer(ds);
|
|
1408
1487
|
node = {
|
|
1409
1488
|
guid: ds.guid,
|
|
@@ -1415,14 +1494,16 @@ class AddDataViewModel {
|
|
|
1415
1494
|
addType: type,
|
|
1416
1495
|
shapeType: this._layerManager.getShapeType(ds)
|
|
1417
1496
|
};
|
|
1497
|
+
|
|
1418
1498
|
this._layerManager.addTempLayerNode(node);
|
|
1499
|
+
|
|
1419
1500
|
cb && cb(node);
|
|
1420
1501
|
});
|
|
1421
1502
|
break;
|
|
1503
|
+
|
|
1422
1504
|
case "arcjson":
|
|
1423
1505
|
var ds = new Cesium.Kq3dEsriGeoJsonDataSource(name);
|
|
1424
|
-
var geojsonStyle = {
|
|
1425
|
-
...this._geojsonStyle
|
|
1506
|
+
var geojsonStyle = { ...this._geojsonStyle
|
|
1426
1507
|
};
|
|
1427
1508
|
geojsonStyle.label.express = "NAME";
|
|
1428
1509
|
ds.load(url, geojsonStyle).then(ds => {
|
|
@@ -1436,7 +1517,9 @@ class AddDataViewModel {
|
|
|
1436
1517
|
};
|
|
1437
1518
|
}
|
|
1438
1519
|
}, this);
|
|
1520
|
+
|
|
1439
1521
|
this._viewer.dataSources.add(ds);
|
|
1522
|
+
|
|
1440
1523
|
that.flyToLayer(ds);
|
|
1441
1524
|
node = {
|
|
1442
1525
|
guid: ds.guid,
|
|
@@ -1448,10 +1531,13 @@ class AddDataViewModel {
|
|
|
1448
1531
|
addType: type,
|
|
1449
1532
|
shapeType: this._layerManager.getShapeType(ds)
|
|
1450
1533
|
};
|
|
1534
|
+
|
|
1451
1535
|
this._layerManager.addTempLayerNode(node);
|
|
1536
|
+
|
|
1452
1537
|
cb && cb(node);
|
|
1453
1538
|
});
|
|
1454
1539
|
break;
|
|
1540
|
+
|
|
1455
1541
|
case "kml":
|
|
1456
1542
|
var ds = new Cesium.KmlDataSource({
|
|
1457
1543
|
name: name,
|
|
@@ -1460,6 +1546,7 @@ class AddDataViewModel {
|
|
|
1460
1546
|
});
|
|
1461
1547
|
ds.load(url).then(ds => {
|
|
1462
1548
|
this._viewer.dataSources.add(ds);
|
|
1549
|
+
|
|
1463
1550
|
that.flyToLayer(ds);
|
|
1464
1551
|
node = {
|
|
1465
1552
|
guid: ds.guid,
|
|
@@ -1470,14 +1557,18 @@ class AddDataViewModel {
|
|
|
1470
1557
|
url: url,
|
|
1471
1558
|
addType: type
|
|
1472
1559
|
};
|
|
1560
|
+
|
|
1473
1561
|
this._layerManager.addTempLayerNode(node);
|
|
1562
|
+
|
|
1474
1563
|
cb && cb(node);
|
|
1475
1564
|
});
|
|
1476
1565
|
break;
|
|
1566
|
+
|
|
1477
1567
|
case "czml":
|
|
1478
1568
|
var ds = new Cesium.CzmlDataSource(name);
|
|
1479
1569
|
ds.load(url).then(ds => {
|
|
1480
1570
|
this._viewer.dataSources.add(ds);
|
|
1571
|
+
|
|
1481
1572
|
that.flyToLayer(ds);
|
|
1482
1573
|
node = {
|
|
1483
1574
|
guid: ds.guid,
|
|
@@ -1488,10 +1579,13 @@ class AddDataViewModel {
|
|
|
1488
1579
|
url: url,
|
|
1489
1580
|
addType: type
|
|
1490
1581
|
};
|
|
1582
|
+
|
|
1491
1583
|
this._layerManager.addTempLayerNode(node);
|
|
1584
|
+
|
|
1492
1585
|
cb && cb(node);
|
|
1493
1586
|
});
|
|
1494
1587
|
break;
|
|
1588
|
+
|
|
1495
1589
|
case "s3m":
|
|
1496
1590
|
layer = this._viewer.scene.primitives.add(new Cesium.Kq3dS3MTilesLayer({
|
|
1497
1591
|
context: this._viewer.scene._context,
|
|
@@ -1510,27 +1604,33 @@ class AddDataViewModel {
|
|
|
1510
1604
|
url: url,
|
|
1511
1605
|
addType: type
|
|
1512
1606
|
};
|
|
1607
|
+
|
|
1513
1608
|
this._layerManager.addTempLayerNode(node);
|
|
1609
|
+
|
|
1514
1610
|
cb && cb(node);
|
|
1515
1611
|
break;
|
|
1612
|
+
|
|
1516
1613
|
default:
|
|
1517
1614
|
break;
|
|
1518
1615
|
}
|
|
1519
|
-
}
|
|
1616
|
+
} // 添加数据服务
|
|
1617
|
+
|
|
1520
1618
|
|
|
1521
|
-
// 添加数据服务
|
|
1522
1619
|
addDataServer(url) {
|
|
1523
1620
|
return new Promise((resolve, reject) => {
|
|
1524
1621
|
Cesium.Kq3dService.datasourceService(url).getDatasources(async e => {
|
|
1525
1622
|
if (e.result.resultcode === "success") {
|
|
1526
1623
|
let datasourceList = e.result.result.datasources;
|
|
1624
|
+
|
|
1527
1625
|
if (datasourceList) {
|
|
1528
1626
|
let nodes = [];
|
|
1627
|
+
|
|
1529
1628
|
for (let i = 0; i < datasourceList.length; i++) {
|
|
1530
1629
|
let datasetList = await this._getDatasetList(url, datasourceList[i].datasourceName);
|
|
1531
1630
|
if (!datasetList || datasetList.length === 0) continue;
|
|
1532
1631
|
await this._addDataSets(url, datasourceList[i].datasourceName, datasetList, nodes);
|
|
1533
1632
|
}
|
|
1633
|
+
|
|
1534
1634
|
resolve(nodes);
|
|
1535
1635
|
} else {
|
|
1536
1636
|
reject([]);
|
|
@@ -1545,6 +1645,7 @@ class AddDataViewModel {
|
|
|
1545
1645
|
});
|
|
1546
1646
|
});
|
|
1547
1647
|
}
|
|
1648
|
+
|
|
1548
1649
|
_getDatasetList(url, datasourceName) {
|
|
1549
1650
|
let params = new window.KqGIS.Data.GetDatasetsInfoParams({
|
|
1550
1651
|
datasourceName: datasourceName
|
|
@@ -1562,18 +1663,19 @@ class AddDataViewModel {
|
|
|
1562
1663
|
reject([]);
|
|
1563
1664
|
});
|
|
1564
1665
|
});
|
|
1565
|
-
}
|
|
1666
|
+
} // 加载数据集
|
|
1667
|
+
|
|
1566
1668
|
|
|
1567
|
-
// 加载数据集
|
|
1568
1669
|
async _addDataSets(url, datasourceName, datasetList, nodes) {
|
|
1569
1670
|
let dataSourceNode = {
|
|
1570
1671
|
guid: window.Cesium.createGuid(),
|
|
1571
1672
|
name: datasourceName,
|
|
1572
1673
|
visible: true,
|
|
1573
1674
|
children: []
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1675
|
+
}; // 获取数据集类型数据
|
|
1676
|
+
|
|
1576
1677
|
const datasetArr = datasetList.filter(o => o['isParentDataset'] === true);
|
|
1678
|
+
|
|
1577
1679
|
if (datasetArr.length === 0) {
|
|
1578
1680
|
await this._addFeatures(url, datasourceName, datasetList, dataSourceNode);
|
|
1579
1681
|
} else {
|
|
@@ -1585,20 +1687,23 @@ class AddDataViewModel {
|
|
|
1585
1687
|
children: []
|
|
1586
1688
|
});
|
|
1587
1689
|
});
|
|
1690
|
+
|
|
1588
1691
|
for (let i = 0; i < dataSourceNode.children.length; i++) {
|
|
1589
1692
|
const datasetChild = datasetList.filter(o => o['parentDatasetName'] === dataSourceNode.children[i].name);
|
|
1590
1693
|
await this._addFeatures(url, datasourceName, datasetChild, dataSourceNode.children[i]);
|
|
1591
1694
|
}
|
|
1592
1695
|
}
|
|
1696
|
+
|
|
1593
1697
|
nodes.push(dataSourceNode);
|
|
1594
|
-
}
|
|
1698
|
+
} // 加载要素
|
|
1699
|
+
|
|
1595
1700
|
|
|
1596
|
-
// 加载要素
|
|
1597
1701
|
async _addFeatures(url, datasourceName, datasetList, parentNode) {
|
|
1598
1702
|
let promises = [];
|
|
1703
|
+
|
|
1599
1704
|
for (let i = 0; i < datasetList.length; i++) {
|
|
1600
|
-
const dataset = datasetList[i];
|
|
1601
|
-
|
|
1705
|
+
const dataset = datasetList[i]; // 获取数据集数据
|
|
1706
|
+
|
|
1602
1707
|
const featureData = await this._getFeatureList(url, datasourceName, dataset.datasetName);
|
|
1603
1708
|
var ds = new Cesium.Kq3dGeoJsonDataSource(featureData.datasetName);
|
|
1604
1709
|
let promise = ds.load(featureData.features, this._geojsonStyle).then(ds => {
|
|
@@ -1612,7 +1717,9 @@ class AddDataViewModel {
|
|
|
1612
1717
|
};
|
|
1613
1718
|
}
|
|
1614
1719
|
}, this);
|
|
1720
|
+
|
|
1615
1721
|
this._viewer.dataSources.add(ds);
|
|
1722
|
+
|
|
1616
1723
|
parentNode.children.push({
|
|
1617
1724
|
guid: ds.guid,
|
|
1618
1725
|
name: featureData.datasetName,
|
|
@@ -1623,17 +1730,21 @@ class AddDataViewModel {
|
|
|
1623
1730
|
addType: 'geojson',
|
|
1624
1731
|
shapeType: featureData.geometryType
|
|
1625
1732
|
});
|
|
1733
|
+
|
|
1626
1734
|
this._layerManager._layerListData.push(parentNode.children[i]);
|
|
1735
|
+
|
|
1627
1736
|
if (i == 0) this.flyToLayer(ds);
|
|
1628
1737
|
});
|
|
1629
1738
|
promises.push(promise);
|
|
1630
1739
|
}
|
|
1740
|
+
|
|
1631
1741
|
return new Promise(resolve => {
|
|
1632
1742
|
Promise.all(promises).then(() => {
|
|
1633
1743
|
resolve();
|
|
1634
1744
|
});
|
|
1635
1745
|
});
|
|
1636
1746
|
}
|
|
1747
|
+
|
|
1637
1748
|
_getFeatureList(url, datasourceName, datasetName) {
|
|
1638
1749
|
let params = new window.KqGIS.Data.GetFeaturesParamsBase({
|
|
1639
1750
|
datasourceName: datasourceName,
|
|
@@ -1657,8 +1768,10 @@ class AddDataViewModel {
|
|
|
1657
1768
|
});
|
|
1658
1769
|
});
|
|
1659
1770
|
}
|
|
1771
|
+
|
|
1660
1772
|
flyToLayer(layer) {
|
|
1661
1773
|
let viewer = this._viewer;
|
|
1774
|
+
|
|
1662
1775
|
if (layer instanceof Cesium.ImageryLayer) {
|
|
1663
1776
|
layer.getViewableRectangle().then(function (rectangle) {
|
|
1664
1777
|
viewer.camera.flyTo({
|
|
@@ -1699,12 +1812,13 @@ class AddDataViewModel {
|
|
|
1699
1812
|
});
|
|
1700
1813
|
}
|
|
1701
1814
|
}
|
|
1702
|
-
}
|
|
1703
1815
|
|
|
1704
|
-
// 设置子节点addType属性
|
|
1816
|
+
} // 设置子节点addType属性
|
|
1817
|
+
|
|
1705
1818
|
function setChildrenAddType(nodeList, addType) {
|
|
1706
1819
|
for (let i = 0; i < nodeList.length; i++) {
|
|
1707
1820
|
const node = nodeList[i];
|
|
1821
|
+
|
|
1708
1822
|
if (node.children) {
|
|
1709
1823
|
setChildrenAddType(node.children, addType);
|
|
1710
1824
|
} else {
|
|
@@ -1714,9 +1828,7 @@ function setChildrenAddType(nodeList, addType) {
|
|
|
1714
1828
|
}
|
|
1715
1829
|
// EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
|
|
1716
1830
|
var vue_i18n_cjs_js_ = __webpack_require__(7080);
|
|
1717
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/adddata/AddData.vue?vue&type=script&setup=true&lang=js
|
|
1718
|
-
|
|
1719
|
-
|
|
1831
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/adddata/AddData.vue?vue&type=script&setup=true&lang=js
|
|
1720
1832
|
|
|
1721
1833
|
|
|
1722
1834
|
const _hoisted_1 = {
|
|
@@ -1770,6 +1882,7 @@ const __default__ = {
|
|
|
1770
1882
|
type: Boolean,
|
|
1771
1883
|
default: true
|
|
1772
1884
|
},
|
|
1885
|
+
|
|
1773
1886
|
/**
|
|
1774
1887
|
* 例:"center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
|
|
1775
1888
|
*/
|
|
@@ -1832,6 +1945,7 @@ const __default__ = {
|
|
|
1832
1945
|
type: String
|
|
1833
1946
|
}
|
|
1834
1947
|
},
|
|
1948
|
+
|
|
1835
1949
|
setup(__props, {
|
|
1836
1950
|
expose: __expose
|
|
1837
1951
|
}) {
|
|
@@ -1841,9 +1955,8 @@ const __default__ = {
|
|
|
1841
1955
|
proxy
|
|
1842
1956
|
} = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
|
|
1843
1957
|
let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
|
|
1844
|
-
let selectTypeIndex = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
|
|
1958
|
+
let selectTypeIndex = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0); //选择的数据源类型
|
|
1845
1959
|
|
|
1846
|
-
//选择的数据源类型
|
|
1847
1960
|
let dataSourceType = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
|
|
1848
1961
|
let dataSource = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({
|
|
1849
1962
|
url: "",
|
|
@@ -1852,38 +1965,37 @@ const __default__ = {
|
|
|
1852
1965
|
let upload_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
1853
1966
|
let upload_btn_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
1854
1967
|
let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
|
|
1855
|
-
let loadingFile = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
|
|
1856
|
-
|
|
1857
|
-
// 获取组件传参
|
|
1858
|
-
|
|
1968
|
+
let loadingFile = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false); // 获取组件传参
|
|
1859
1969
|
//URL服务支持的数据源类型
|
|
1970
|
+
|
|
1860
1971
|
let dataSourceTypeList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(setDataSourceType());
|
|
1861
1972
|
let operatorArray = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
|
|
1862
1973
|
let array = [];
|
|
1863
1974
|
let list = [...fileList.value];
|
|
1864
1975
|
let len = list.length;
|
|
1976
|
+
|
|
1865
1977
|
for (let i = 0, j = 0; i < len; i += 3, j++) {
|
|
1866
1978
|
array[j] = list.splice(0, 3);
|
|
1867
1979
|
}
|
|
1980
|
+
|
|
1868
1981
|
return array;
|
|
1869
1982
|
});
|
|
1870
1983
|
let disabled = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
|
|
1871
1984
|
let flag = true;
|
|
1985
|
+
|
|
1872
1986
|
if (fileList.value.length > 0) {
|
|
1873
1987
|
flag = false;
|
|
1874
1988
|
}
|
|
1989
|
+
|
|
1875
1990
|
return flag;
|
|
1876
|
-
});
|
|
1991
|
+
}); // 组件容器Ref
|
|
1877
1992
|
|
|
1878
|
-
//
|
|
1879
|
-
let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
1993
|
+
let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
|
|
1880
1994
|
|
|
1881
|
-
// 生成组件默认header
|
|
1882
1995
|
let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
|
|
1883
1996
|
let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
|
|
1884
|
-
let viewModel = null;
|
|
1997
|
+
let viewModel = null; // 国际化
|
|
1885
1998
|
|
|
1886
|
-
// 国际化
|
|
1887
1999
|
let {
|
|
1888
2000
|
locale,
|
|
1889
2001
|
messages
|
|
@@ -1895,9 +2007,9 @@ const __default__ = {
|
|
|
1895
2007
|
dataSourceTypeList.value = setDataSourceType();
|
|
1896
2008
|
dataSourceType.value = dataSourceTypeList.value[selectTypeIndex.value];
|
|
1897
2009
|
});
|
|
2010
|
+
|
|
1898
2011
|
function setDataSourceType() {
|
|
1899
|
-
let types = [
|
|
1900
|
-
// {
|
|
2012
|
+
let types = [// {
|
|
1901
2013
|
// type: 'kq3dimageryfile',
|
|
1902
2014
|
// name: language.value.ImagertyTileFile,
|
|
1903
2015
|
// namePlaceholder: language.value.optional,
|
|
@@ -2025,17 +2137,22 @@ const __default__ = {
|
|
|
2025
2137
|
namePlaceholder: language.value.optional,
|
|
2026
2138
|
urlPlaceholder: language.value.format +': http://<host>:<port>/xxx/<servername>/xxx.czml',
|
|
2027
2139
|
description: language.value.imagertyCZMLdescription
|
|
2028
|
-
}*/
|
|
2140
|
+
}*/
|
|
2141
|
+
];
|
|
2142
|
+
|
|
2029
2143
|
if (props.hideServiceTypes) {
|
|
2030
2144
|
let indexList = props.hideServiceTypes.split(",");
|
|
2145
|
+
|
|
2031
2146
|
for (let i = types.length - 1; i >= 0; i--) {
|
|
2032
2147
|
if (indexList.includes(i.toString())) {
|
|
2033
2148
|
types.splice(i, 1);
|
|
2034
2149
|
}
|
|
2035
2150
|
}
|
|
2036
2151
|
}
|
|
2152
|
+
|
|
2037
2153
|
return types;
|
|
2038
2154
|
}
|
|
2155
|
+
|
|
2039
2156
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
|
|
2040
2157
|
(0,util_.updatePosition)(boxRef.value, props);
|
|
2041
2158
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
|
|
@@ -2058,49 +2175,49 @@ const __default__ = {
|
|
|
2058
2175
|
}
|
|
2059
2176
|
});
|
|
2060
2177
|
});
|
|
2061
|
-
|
|
2062
2178
|
/**
|
|
2063
2179
|
* @description 监听header生成
|
|
2064
2180
|
*/
|
|
2181
|
+
|
|
2065
2182
|
const watchCreateHeaderTemp = () => {
|
|
2066
2183
|
if (props.showHeaderTemp) {
|
|
2067
2184
|
// 生成headerTemp
|
|
2068
2185
|
headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, addDataTitle);
|
|
2069
2186
|
}
|
|
2070
|
-
};
|
|
2187
|
+
}; // 切换tab页
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
function handleChange(pane) {} // 切换类型
|
|
2071
2191
|
|
|
2072
|
-
// 切换tab页
|
|
2073
|
-
function handleChange(pane) {}
|
|
2074
2192
|
|
|
2075
|
-
// 切换类型
|
|
2076
2193
|
function changeType(index) {
|
|
2077
2194
|
dataSourceType.value = dataSourceTypeList.value[index];
|
|
2078
2195
|
dataSource.url = "";
|
|
2079
2196
|
dataSource.name = "";
|
|
2080
|
-
}
|
|
2197
|
+
} //选择文件
|
|
2198
|
+
|
|
2081
2199
|
|
|
2082
|
-
//选择文件
|
|
2083
2200
|
function changeFile(file) {
|
|
2084
2201
|
fileList.value.push(file);
|
|
2085
|
-
}
|
|
2202
|
+
} // 删除文件
|
|
2203
|
+
|
|
2086
2204
|
|
|
2087
|
-
// 删除文件
|
|
2088
2205
|
function removeFile(file) {
|
|
2089
2206
|
fileList.value.forEach((item, index) => {
|
|
2090
2207
|
if (item.uid === file.uid) {
|
|
2091
2208
|
fileList.value.splice(index, 1);
|
|
2092
2209
|
}
|
|
2093
2210
|
});
|
|
2094
|
-
}
|
|
2211
|
+
} //清空所有文件
|
|
2212
|
+
|
|
2095
2213
|
|
|
2096
|
-
//清空所有文件
|
|
2097
2214
|
function removeFiles() {
|
|
2098
2215
|
upload_ref.value.$refs.child.clearFiles();
|
|
2099
2216
|
upload_btn_ref.value.$refs.child.clearFiles();
|
|
2100
2217
|
fileList.value = [];
|
|
2101
|
-
}
|
|
2218
|
+
} //加载文件
|
|
2219
|
+
|
|
2102
2220
|
|
|
2103
|
-
//加载文件
|
|
2104
2221
|
function loadFiles() {
|
|
2105
2222
|
loadingFile.value = true;
|
|
2106
2223
|
let promiseList = [];
|
|
@@ -2111,39 +2228,53 @@ const __default__ = {
|
|
|
2111
2228
|
removeFiles();
|
|
2112
2229
|
loadingFile.value = false;
|
|
2113
2230
|
});
|
|
2114
|
-
}
|
|
2231
|
+
} //加载URL
|
|
2232
|
+
|
|
2115
2233
|
|
|
2116
|
-
//加载URL
|
|
2117
2234
|
function loadURL() {
|
|
2118
2235
|
viewModel.parseDataSource({
|
|
2119
2236
|
type: dataSourceType.value.type,
|
|
2120
2237
|
url: dataSource.url,
|
|
2121
2238
|
name: dataSource.name
|
|
2122
2239
|
}, props.loadCallback, props.loadCustom);
|
|
2123
|
-
}
|
|
2240
|
+
} // 重置
|
|
2241
|
+
|
|
2124
2242
|
|
|
2125
|
-
// 重置
|
|
2126
2243
|
function reset() {
|
|
2127
2244
|
dataSource.url = "";
|
|
2128
2245
|
dataSource.name = "";
|
|
2129
|
-
}
|
|
2246
|
+
} // 销毁
|
|
2247
|
+
|
|
2130
2248
|
|
|
2131
|
-
// 销毁
|
|
2132
2249
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {});
|
|
2250
|
+
|
|
2133
2251
|
__expose({});
|
|
2252
|
+
|
|
2134
2253
|
return (_ctx, _cache) => {
|
|
2135
2254
|
const _component_kq_row = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-row");
|
|
2255
|
+
|
|
2136
2256
|
const _component_kq_upload = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-upload");
|
|
2257
|
+
|
|
2137
2258
|
const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon");
|
|
2259
|
+
|
|
2138
2260
|
const _component_kq_col = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-col");
|
|
2261
|
+
|
|
2139
2262
|
const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button");
|
|
2263
|
+
|
|
2140
2264
|
const _component_kq_tab_pane = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-tab-pane");
|
|
2265
|
+
|
|
2141
2266
|
const _component_kq_option = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-option");
|
|
2267
|
+
|
|
2142
2268
|
const _component_kq_select = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-select");
|
|
2269
|
+
|
|
2143
2270
|
const _component_kq_form_item = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-form-item");
|
|
2271
|
+
|
|
2144
2272
|
const _component_kq_input = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-input");
|
|
2273
|
+
|
|
2145
2274
|
const _component_kq_form = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-form");
|
|
2275
|
+
|
|
2146
2276
|
const _component_kq_tabs = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-tabs");
|
|
2277
|
+
|
|
2147
2278
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
|
|
2148
2279
|
class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq3d-add-data", {
|
|
2149
2280
|
'kq-box-shadow': __props.showShadow
|
|
@@ -2154,7 +2285,9 @@ const __default__ = {
|
|
|
2154
2285
|
key: 0,
|
|
2155
2286
|
ref_key: "headerTempRef",
|
|
2156
2287
|
ref: headerTempRef
|
|
2157
|
-
}, null, 512
|
|
2288
|
+
}, null, 512
|
|
2289
|
+
/* NEED_PATCH */
|
|
2290
|
+
)) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_tabs, {
|
|
2158
2291
|
modelValue: props.activeName,
|
|
2159
2292
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => props.activeName = $event),
|
|
2160
2293
|
onTabChange: handleChange
|
|
@@ -2166,13 +2299,21 @@ const __default__ = {
|
|
|
2166
2299
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
|
|
2167
2300
|
class: "kq3d-add-data-title"
|
|
2168
2301
|
}, {
|
|
2169
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).fileFormatDescription), 1
|
|
2170
|
-
|
|
2302
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).fileFormatDescription), 1
|
|
2303
|
+
/* TEXT */
|
|
2304
|
+
)]),
|
|
2305
|
+
_: 1
|
|
2306
|
+
/* STABLE */
|
|
2307
|
+
|
|
2171
2308
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
|
|
2172
2309
|
class: "kq3d-add-data-tip"
|
|
2173
2310
|
}, {
|
|
2174
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).fileFormatDescriptionTips), 1
|
|
2175
|
-
|
|
2311
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).fileFormatDescriptionTips), 1
|
|
2312
|
+
/* TEXT */
|
|
2313
|
+
)]),
|
|
2314
|
+
_: 1
|
|
2315
|
+
/* STABLE */
|
|
2316
|
+
|
|
2176
2317
|
})]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" <div>\r\n <kq-row>{{ language.coordinateSystemDescription }}</kq-row>\r\n <kq-row class=\"kq3d-add-data-tip\">{{ language.coordinateSystemDescriptionTips }}</kq-row>\r\n </div> "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_upload, {
|
|
2177
2318
|
drag: "",
|
|
2178
2319
|
action: "",
|
|
@@ -2185,9 +2326,15 @@ const __default__ = {
|
|
|
2185
2326
|
ref_key: "upload_ref",
|
|
2186
2327
|
ref: upload_ref
|
|
2187
2328
|
}, {
|
|
2188
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).dragFileToArea), 1
|
|
2189
|
-
|
|
2190
|
-
|
|
2329
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).dragFileToArea), 1
|
|
2330
|
+
/* TEXT */
|
|
2331
|
+
)]),
|
|
2332
|
+
_: 1
|
|
2333
|
+
/* STABLE */
|
|
2334
|
+
|
|
2335
|
+
}, 8
|
|
2336
|
+
/* PROPS */
|
|
2337
|
+
, ["file-list", "accept"]), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList).length === 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_4, [((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)(operatorArray), (rowItem, i) => {
|
|
2191
2338
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_row, {
|
|
2192
2339
|
key: i,
|
|
2193
2340
|
gutter: 20
|
|
@@ -2201,22 +2348,44 @@ const __default__ = {
|
|
|
2201
2348
|
class: "kq3d-add-data-doc"
|
|
2202
2349
|
}, {
|
|
2203
2350
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.Document))]),
|
|
2204
|
-
_: 1
|
|
2351
|
+
_: 1
|
|
2352
|
+
/* STABLE */
|
|
2353
|
+
|
|
2205
2354
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", {
|
|
2206
2355
|
title: file.name
|
|
2207
|
-
}, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(file.name), 9
|
|
2356
|
+
}, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(file.name), 9
|
|
2357
|
+
/* TEXT, PROPS */
|
|
2358
|
+
, _hoisted_6), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
|
|
2208
2359
|
class: "kq3d-add-data-close",
|
|
2209
2360
|
onClick: $event => removeFile(file)
|
|
2210
2361
|
}, {
|
|
2211
2362
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.CircleClose))]),
|
|
2212
|
-
_: 2
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2363
|
+
_: 2
|
|
2364
|
+
/* DYNAMIC */
|
|
2365
|
+
|
|
2366
|
+
}, 1032
|
|
2367
|
+
/* PROPS, DYNAMIC_SLOTS */
|
|
2368
|
+
, ["onClick"])])]),
|
|
2369
|
+
_: 2
|
|
2370
|
+
/* DYNAMIC */
|
|
2371
|
+
|
|
2372
|
+
}, 1024
|
|
2373
|
+
/* DYNAMIC_SLOTS */
|
|
2374
|
+
);
|
|
2375
|
+
}), 128
|
|
2376
|
+
/* KEYED_FRAGMENT */
|
|
2377
|
+
))]),
|
|
2378
|
+
_: 2
|
|
2379
|
+
/* DYNAMIC */
|
|
2380
|
+
|
|
2381
|
+
}, 1024
|
|
2382
|
+
/* DYNAMIC_SLOTS */
|
|
2383
|
+
);
|
|
2384
|
+
}), 128
|
|
2385
|
+
/* KEYED_FRAGMENT */
|
|
2386
|
+
))], 512
|
|
2387
|
+
/* NEED_PATCH */
|
|
2388
|
+
), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList).length > 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_7, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "loadingFilesSwitch"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_8, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_upload, {
|
|
2220
2389
|
action: "",
|
|
2221
2390
|
"show-file-list": false,
|
|
2222
2391
|
"auto-upload": false,
|
|
@@ -2230,29 +2399,55 @@ const __default__ = {
|
|
|
2230
2399
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).selectFiles,
|
|
2231
2400
|
type: "primary"
|
|
2232
2401
|
}, {
|
|
2233
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).selectFiles), 1
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2402
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).selectFiles), 1
|
|
2403
|
+
/* TEXT */
|
|
2404
|
+
)]),
|
|
2405
|
+
_: 1
|
|
2406
|
+
/* STABLE */
|
|
2407
|
+
|
|
2408
|
+
}, 8
|
|
2409
|
+
/* PROPS */
|
|
2410
|
+
, ["title"])]),
|
|
2411
|
+
_: 1
|
|
2412
|
+
/* STABLE */
|
|
2413
|
+
|
|
2414
|
+
}, 8
|
|
2415
|
+
/* PROPS */
|
|
2416
|
+
, ["accept"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
2238
2417
|
onClick: _cache[1] || (_cache[1] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => removeFiles(), ["stop"])),
|
|
2239
2418
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).clearFiles,
|
|
2240
2419
|
type: "primary"
|
|
2241
2420
|
}, {
|
|
2242
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).clearFiles), 1
|
|
2243
|
-
|
|
2244
|
-
|
|
2421
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).clearFiles), 1
|
|
2422
|
+
/* TEXT */
|
|
2423
|
+
)]),
|
|
2424
|
+
_: 1
|
|
2425
|
+
/* STABLE */
|
|
2426
|
+
|
|
2427
|
+
}, 8
|
|
2428
|
+
/* PROPS */
|
|
2429
|
+
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
2245
2430
|
onClick: _cache[2] || (_cache[2] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => loadFiles(), ["stop"])),
|
|
2246
2431
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles,
|
|
2247
2432
|
type: "primary",
|
|
2248
2433
|
disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(disabled),
|
|
2249
2434
|
loading: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(loadingFile)
|
|
2250
2435
|
}, {
|
|
2251
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles), 1
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2436
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles), 1
|
|
2437
|
+
/* TEXT */
|
|
2438
|
+
)]),
|
|
2439
|
+
_: 1
|
|
2440
|
+
/* STABLE */
|
|
2441
|
+
|
|
2442
|
+
}, 8
|
|
2443
|
+
/* PROPS */
|
|
2444
|
+
, ["title", "disabled", "loading"])])])]),
|
|
2445
|
+
_: 3
|
|
2446
|
+
/* FORWARDED */
|
|
2447
|
+
|
|
2448
|
+
}, 8
|
|
2449
|
+
/* PROPS */
|
|
2450
|
+
, ["label"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_tab_pane, {
|
|
2256
2451
|
label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).urlData,
|
|
2257
2452
|
name: "url"
|
|
2258
2453
|
}, {
|
|
@@ -2274,13 +2469,29 @@ const __default__ = {
|
|
|
2274
2469
|
key: item.name,
|
|
2275
2470
|
label: item.name,
|
|
2276
2471
|
value: index
|
|
2277
|
-
}, null, 8
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2472
|
+
}, null, 8
|
|
2473
|
+
/* PROPS */
|
|
2474
|
+
, ["label", "value"]);
|
|
2475
|
+
}), 128
|
|
2476
|
+
/* KEYED_FRAGMENT */
|
|
2477
|
+
))]),
|
|
2478
|
+
_: 1
|
|
2479
|
+
/* STABLE */
|
|
2480
|
+
|
|
2481
|
+
}, 8
|
|
2482
|
+
/* PROPS */
|
|
2483
|
+
, ["modelValue"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_9, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSourceType).description), 1
|
|
2484
|
+
/* TEXT */
|
|
2485
|
+
)]),
|
|
2486
|
+
_: 1
|
|
2487
|
+
/* STABLE */
|
|
2488
|
+
|
|
2489
|
+
}, 8
|
|
2490
|
+
/* PROPS */
|
|
2491
|
+
, ["label"])]),
|
|
2492
|
+
_: 1
|
|
2493
|
+
/* STABLE */
|
|
2494
|
+
|
|
2284
2495
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
|
|
2285
2496
|
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_form_item, {
|
|
2286
2497
|
label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).url
|
|
@@ -2289,10 +2500,20 @@ const __default__ = {
|
|
|
2289
2500
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSource).url,
|
|
2290
2501
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSource).url = $event),
|
|
2291
2502
|
placeholder: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSourceType).urlPlaceholder
|
|
2292
|
-
}, null, 8
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2503
|
+
}, null, 8
|
|
2504
|
+
/* PROPS */
|
|
2505
|
+
, ["modelValue", "placeholder"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_10, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSourceType).urlPlaceholder), 1
|
|
2506
|
+
/* TEXT */
|
|
2507
|
+
)]),
|
|
2508
|
+
_: 1
|
|
2509
|
+
/* STABLE */
|
|
2510
|
+
|
|
2511
|
+
}, 8
|
|
2512
|
+
/* PROPS */
|
|
2513
|
+
, ["label"])]),
|
|
2514
|
+
_: 1
|
|
2515
|
+
/* STABLE */
|
|
2516
|
+
|
|
2296
2517
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
|
|
2297
2518
|
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_form_item, {
|
|
2298
2519
|
label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).nodeName
|
|
@@ -2301,32 +2522,65 @@ const __default__ = {
|
|
|
2301
2522
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSource).name,
|
|
2302
2523
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSource).name = $event),
|
|
2303
2524
|
placeholder: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSourceType).namePlaceholder
|
|
2304
|
-
}, null, 8
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2525
|
+
}, null, 8
|
|
2526
|
+
/* PROPS */
|
|
2527
|
+
, ["modelValue", "placeholder"])]),
|
|
2528
|
+
_: 1
|
|
2529
|
+
/* STABLE */
|
|
2530
|
+
|
|
2531
|
+
}, 8
|
|
2532
|
+
/* PROPS */
|
|
2533
|
+
, ["label"])]),
|
|
2534
|
+
_: 1
|
|
2535
|
+
/* STABLE */
|
|
2536
|
+
|
|
2308
2537
|
})]),
|
|
2309
|
-
_: 1
|
|
2538
|
+
_: 1
|
|
2539
|
+
/* STABLE */
|
|
2540
|
+
|
|
2310
2541
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_11, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "loadingURLSwitch"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_12, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
2311
2542
|
onClick: _cache[6] || (_cache[6] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => loadURL(), ["stop"])),
|
|
2312
2543
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles,
|
|
2313
2544
|
type: "primary"
|
|
2314
2545
|
}, {
|
|
2315
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles), 1
|
|
2316
|
-
|
|
2317
|
-
|
|
2546
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles), 1
|
|
2547
|
+
/* TEXT */
|
|
2548
|
+
)]),
|
|
2549
|
+
_: 1
|
|
2550
|
+
/* STABLE */
|
|
2551
|
+
|
|
2552
|
+
}, 8
|
|
2553
|
+
/* PROPS */
|
|
2554
|
+
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
2318
2555
|
onClick: _cache[7] || (_cache[7] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => reset(), ["stop"])),
|
|
2319
2556
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).reset
|
|
2320
2557
|
}, {
|
|
2321
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).reset), 1
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2558
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).reset), 1
|
|
2559
|
+
/* TEXT */
|
|
2560
|
+
)]),
|
|
2561
|
+
_: 1
|
|
2562
|
+
/* STABLE */
|
|
2563
|
+
|
|
2564
|
+
}, 8
|
|
2565
|
+
/* PROPS */
|
|
2566
|
+
, ["title"])])])]),
|
|
2567
|
+
_: 3
|
|
2568
|
+
/* FORWARDED */
|
|
2569
|
+
|
|
2570
|
+
}, 8
|
|
2571
|
+
/* PROPS */
|
|
2572
|
+
, ["label"])])]),
|
|
2573
|
+
_: 3
|
|
2574
|
+
/* FORWARDED */
|
|
2575
|
+
|
|
2576
|
+
}, 8
|
|
2577
|
+
/* PROPS */
|
|
2578
|
+
, ["modelValue"])], 2
|
|
2579
|
+
/* CLASS */
|
|
2580
|
+
);
|
|
2328
2581
|
};
|
|
2329
2582
|
}
|
|
2583
|
+
|
|
2330
2584
|
}));
|
|
2331
2585
|
;// CONCATENATED MODULE: ./src/webgl/adddata/AddData.vue?vue&type=script&setup=true&lang=js
|
|
2332
2586
|
|
|
@@ -2348,11 +2602,13 @@ var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
|
|
|
2348
2602
|
|
|
2349
2603
|
|
|
2350
2604
|
|
|
2605
|
+
|
|
2351
2606
|
AddData.install = (Vue, opts) => {
|
|
2352
2607
|
init_js_default()(Vue, opts);
|
|
2353
2608
|
Vue.component(AddData.name, AddData);
|
|
2354
2609
|
};
|
|
2355
2610
|
|
|
2611
|
+
|
|
2356
2612
|
}();
|
|
2357
2613
|
/******/ return __webpack_exports__;
|
|
2358
2614
|
/******/ })()
|