@kq_npm/client3d_webgl_vue 3.0.7-beta → 3.0.9-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/adddata/index.js +290 -319
- package/adddata/style/adddata.css +1 -1
- package/aspectanalysis/index.js +47 -179
- package/aspectanalysis/style/aspectanalysis.css +1 -1
- package/baseterraingallery/index.js +39 -177
- package/baseterraingallery/style/baseterraingallery.css +1 -1
- package/boxclip/index.js +50 -182
- package/boxclip/style/boxclip.css +1 -1
- package/excavatefillanalysis/index.js +57 -189
- package/excavatefillanalysis/style/excavatefillanalysis.css +1 -1
- package/flight/index.js +42 -177
- package/floodanalysis/index.js +64 -199
- package/floodanalysis/style/floodanalysis.css +1 -1
- package/gpuspatialquery/index.js +47 -179
- package/gpuspatialquery/style/gpuspatialquery.css +1 -1
- package/headertemp/index.js +34 -83
- package/index.js +1378 -733
- package/isolineanalysis/index.js +75 -207
- package/isolineanalysis/style/isolineanalysis.css +1 -1
- package/measure/index.js +42 -177
- package/modelselect/index.js +49 -182
- package/modelselect/style/modelselect.css +1 -1
- package/package.json +1 -1
- package/particleeffect/index.js +45 -178
- package/particleeffect/style/particleeffect.css +1 -1
- package/planeclip/index.js +51 -183
- package/planeclip/style/planeclip.css +1 -1
- package/profileanalysis/index.js +50 -182
- package/profileanalysis/style/profileanalysis.css +1 -1
- package/roller/index.js +43 -188
- package/scenceview/index.js +1477 -851
- package/screenshot/index.js +47 -179
- package/screenshot/style/screenshot.css +1 -1
- package/shadowanalysis/index.js +58 -190
- package/shadowanalysis/style/shadowanalysis.css +1 -1
- package/sightlineanalysis/index.js +46 -179
- package/sightlineanalysis/style/sightlineanalysis.css +1 -1
- package/skylineanalysis/index.js +49 -181
- package/skylineanalysis/style/skylineanalysis.css +1 -1
- package/slopeanalysis/index.js +62 -194
- package/slopeanalysis/style/slopeanalysis.css +1 -1
- package/style.css +1 -1
- package/terrainoperation/index.js +53 -185
- package/terrainoperation/style/terrainoperation.css +1 -1
- package/underground/index.js +32 -20
- package/viewshedanalysis/index.js +45 -178
- package/viewshedanalysis/style/viewshedanalysis.css +1 -1
- package/weathereffect/index.js +48 -180
- package/weathereffect/style/weathereffect.css +1 -1
package/adddata/index.js
CHANGED
|
@@ -27,169 +27,6 @@ es_namespaceObject.ElMessage.install = (Vue, opts) => {
|
|
|
27
27
|
|
|
28
28
|
/* harmony default export */ var message = (es_namespaceObject.ElMessage);
|
|
29
29
|
|
|
30
|
-
/***/ }),
|
|
31
|
-
|
|
32
|
-
/***/ 519:
|
|
33
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// EXPORTS
|
|
37
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
38
|
-
"default": function() { return /* reexport */ HeaderTemp; }
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
42
|
-
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
|
|
43
|
-
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
44
|
-
var util_ = __webpack_require__(9519);
|
|
45
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/headertemp/HeaderTemp.vue?vue&type=script&setup=true&lang=js
|
|
46
|
-
|
|
47
|
-
const _hoisted_1 = {
|
|
48
|
-
class: "kq-control-header-temp"
|
|
49
|
-
};
|
|
50
|
-
const _hoisted_2 = {
|
|
51
|
-
class: "_title"
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const __default__ = {
|
|
56
|
-
name: "Kq3dHeaderTemp"
|
|
57
|
-
};
|
|
58
|
-
/* harmony default export */ var HeaderTempvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
|
|
59
|
-
props: {
|
|
60
|
-
// 是否显示阴影效果
|
|
61
|
-
showShadow: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: true
|
|
64
|
-
},
|
|
65
|
-
// HeaderTemp标题
|
|
66
|
-
headerTempTitle: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: ""
|
|
69
|
-
},
|
|
70
|
-
// HeaderTemp图标
|
|
71
|
-
headerTempIcon: {
|
|
72
|
-
type: Object
|
|
73
|
-
},
|
|
74
|
-
// HeaderTemp是否折叠
|
|
75
|
-
isCollapse: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false
|
|
78
|
-
},
|
|
79
|
-
// HeaderTemp Title&Icon的位置
|
|
80
|
-
isRight: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: true
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
setup(__props, {
|
|
87
|
-
expose
|
|
88
|
-
}) {
|
|
89
|
-
const props = __props;
|
|
90
|
-
const proxy = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)(); // 获取组件传参
|
|
91
|
-
// 图标组件
|
|
92
|
-
|
|
93
|
-
let iconBtn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
94
|
-
let isCollapse = props.isCollapse;
|
|
95
|
-
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
|
|
96
|
-
iconBtn.value = props.headerTempIcon;
|
|
97
|
-
let dom = proxy.parent.vnode.el;
|
|
98
|
-
|
|
99
|
-
if (!props.isRight) {
|
|
100
|
-
(0,util_.addClass)(dom, ["kq-is-show", "kq-is-left"]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (isCollapse) {
|
|
104
|
-
if (props.showShadow) {
|
|
105
|
-
(0,util_.addClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
|
|
106
|
-
(0,util_.removeClass)(dom, ["kq-is-show", "kq-box-shadow"]);
|
|
107
|
-
} else {
|
|
108
|
-
(0,util_.addClass)(dom, "kq-is-hide");
|
|
109
|
-
(0,util_.removeClass)(dom, "kq-is-show");
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
if (props.showShadow) {
|
|
113
|
-
(0,util_.removeClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
|
|
114
|
-
(0,util_.addClass)(dom, ["kq-is-show", "kq-box-shadow"]);
|
|
115
|
-
} else {
|
|
116
|
-
(0,util_.removeClass)(dom, "kq-is-hide");
|
|
117
|
-
(0,util_.addClass)(dom, "kq-is-show");
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}); // 图标按钮点击事件
|
|
121
|
-
|
|
122
|
-
function btnClick() {
|
|
123
|
-
isCollapse = !isCollapse;
|
|
124
|
-
let dom = proxy.parent.vnode.el;
|
|
125
|
-
|
|
126
|
-
if (isCollapse) {
|
|
127
|
-
// 折叠
|
|
128
|
-
if (props.showShadow) {
|
|
129
|
-
(0,util_.addClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
|
|
130
|
-
(0,util_.removeClass)(dom, ["kq-is-show", "kq-box-shadow"]);
|
|
131
|
-
} else {
|
|
132
|
-
(0,util_.addClass)(dom, "kq-is-hide");
|
|
133
|
-
(0,util_.removeClass)(dom, "kq-is-show");
|
|
134
|
-
}
|
|
135
|
-
} else {
|
|
136
|
-
// 展开
|
|
137
|
-
if (props.showShadow) {
|
|
138
|
-
(0,util_.addClass)(dom, ["kq-is-show", "kq-box-shadow"]);
|
|
139
|
-
(0,util_.removeClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
|
|
140
|
-
} else {
|
|
141
|
-
(0,util_.addClass)(dom, "kq-is-show");
|
|
142
|
-
(0,util_.removeClass)(dom, "kq-is-hide");
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
expose({
|
|
148
|
-
btnClick
|
|
149
|
-
});
|
|
150
|
-
return (_ctx, _cache) => {
|
|
151
|
-
const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon");
|
|
152
|
-
|
|
153
|
-
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("h4", _hoisted_2, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(__props.headerTempTitle), 1
|
|
154
|
-
/* TEXT */
|
|
155
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
|
|
156
|
-
class: "_btn kq-control-header-temp_btn",
|
|
157
|
-
onClick: btnClick
|
|
158
|
-
}, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
|
|
159
|
-
size: 16
|
|
160
|
-
}, {
|
|
161
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(iconBtn))))]),
|
|
162
|
-
_: 1
|
|
163
|
-
/* STABLE */
|
|
164
|
-
|
|
165
|
-
})])]);
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
}));
|
|
170
|
-
;// CONCATENATED MODULE: ./src/webgl/headertemp/HeaderTemp.vue?vue&type=script&setup=true&lang=js
|
|
171
|
-
|
|
172
|
-
;// CONCATENATED MODULE: ./src/webgl/headertemp/HeaderTemp.vue
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const __exports__ = HeaderTempvue_type_script_setup_true_lang_js;
|
|
177
|
-
|
|
178
|
-
/* harmony default export */ var HeaderTemp = (__exports__);
|
|
179
|
-
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
|
|
180
|
-
var init_js_ = __webpack_require__(5406);
|
|
181
|
-
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
|
|
182
|
-
;// CONCATENATED MODULE: ./src/webgl/headertemp/index.js
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
HeaderTemp.install = (Vue, opts) => {
|
|
187
|
-
init_js_default()(Vue, opts);
|
|
188
|
-
Vue.component(HeaderTemp.name, HeaderTemp);
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
30
|
/***/ }),
|
|
194
31
|
|
|
195
32
|
/***/ 8422:
|
|
@@ -423,183 +260,271 @@ class AddDataViewModel {
|
|
|
423
260
|
this._layerManager = scenceView._layerManager;
|
|
424
261
|
this._geojsonStyle.billboard.image = options.billboardImage;
|
|
425
262
|
this._language = scenceView._language;
|
|
263
|
+
this._geometryServerUrl = options.geometryServerUrl;
|
|
264
|
+
this._geometryServerToken = options.geometryServerToken;
|
|
426
265
|
} //解析文件
|
|
427
266
|
|
|
428
267
|
|
|
429
|
-
parseFile(file,
|
|
430
|
-
var reader = new FileReader();
|
|
431
|
-
reader.readAsText(file); //文本
|
|
432
|
-
//readAsDataURL(file); //base64 图片
|
|
433
|
-
//readAsArrayBuffer(file); //原始二进制数据
|
|
434
|
-
//readAsBinaryString(file);//二进制字符串
|
|
435
|
-
//reader.readAsBinaryString(file);
|
|
436
|
-
|
|
268
|
+
parseFile(file, cb) {
|
|
437
269
|
var that = this;
|
|
438
|
-
|
|
439
|
-
reader.onload = function (event) {
|
|
440
|
-
var ret = event.target.result;
|
|
270
|
+
return new Promise((resolve, reject) => {
|
|
441
271
|
var ext = file.name.replace(/.+\./, "").toLowerCase(); //文件扩展名
|
|
442
272
|
|
|
443
273
|
var name = file.name.replace(/(.*\/)*([^.]+).*/gi, "$2"); //文件名
|
|
444
274
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
275
|
+
if (ext === "zip") {
|
|
276
|
+
(0,util_.uploadSHP)(that._geometryServerUrl, file, that._geometryServerToken, null, function (res) {
|
|
277
|
+
if (res) {
|
|
278
|
+
if (res.srs) {
|
|
279
|
+
//返回的geojson数据已经做了处理,返回数据坐标系为4326
|
|
280
|
+
delete res.srs;
|
|
281
|
+
}
|
|
451
282
|
|
|
452
|
-
|
|
453
|
-
|
|
283
|
+
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
284
|
+
ds.load(res, that._geojsonStyle).then(ds => {
|
|
285
|
+
ds.entities.values.forEach(entity => {
|
|
286
|
+
if (entity.polygon) {
|
|
287
|
+
entity.polyline = {
|
|
288
|
+
positions: entity.polygon.hierarchy._value.positions,
|
|
289
|
+
width: that._geojsonStyle.polygon.outlineWidth,
|
|
290
|
+
material: that._geojsonStyle.polygon.outlineColor
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
});
|
|
454
294
|
|
|
455
|
-
|
|
456
|
-
ret = data;
|
|
457
|
-
}
|
|
458
|
-
} catch (e) {}
|
|
295
|
+
that._viewer.dataSources.add(ds);
|
|
459
296
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
297
|
+
ds.autoAvoid(that._viewer);
|
|
298
|
+
|
|
299
|
+
that._viewer.flyTo(ds);
|
|
300
|
+
|
|
301
|
+
resolve("success");
|
|
302
|
+
var layer = {
|
|
303
|
+
guid: ds.guid,
|
|
304
|
+
name: name,
|
|
305
|
+
visible: true,
|
|
306
|
+
serverType: "datasource",
|
|
307
|
+
lsType: "ls"
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
that._layerManager.addTempLayerNode(layer);
|
|
311
|
+
|
|
312
|
+
cb && cb(layer);
|
|
470
313
|
});
|
|
314
|
+
} else {
|
|
315
|
+
reject(file.name + " service parse error.");
|
|
316
|
+
cb && cb("error");
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
} else if (ext === "txt") {
|
|
320
|
+
let dataUrl = that._geometryServerUrl + (that._geometryServerToken ? "?ua_token=" + that._geometryServerToken : "");
|
|
321
|
+
(0,util_.readTxT)(file, dataUrl, "4326", res => {
|
|
322
|
+
if (res) {
|
|
323
|
+
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
324
|
+
ds.load(res, that._geojsonStyle).then(ds => {
|
|
325
|
+
ds.entities.values.forEach(entity => {
|
|
326
|
+
if (entity.polygon) {
|
|
327
|
+
entity.polyline = {
|
|
328
|
+
positions: entity.polygon.hierarchy._value.positions,
|
|
329
|
+
width: that._geojsonStyle.polygon.outlineWidth,
|
|
330
|
+
material: that._geojsonStyle.polygon.outlineColor
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
});
|
|
471
334
|
|
|
472
|
-
|
|
335
|
+
that._viewer.dataSources.add(ds);
|
|
473
336
|
|
|
474
|
-
|
|
337
|
+
ds.autoAvoid(that._viewer);
|
|
475
338
|
|
|
476
|
-
|
|
339
|
+
that._viewer.flyTo(ds);
|
|
477
340
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
341
|
+
resolve("success");
|
|
342
|
+
var layer = {
|
|
343
|
+
guid: ds.guid,
|
|
344
|
+
name: name,
|
|
345
|
+
visible: true,
|
|
346
|
+
serverType: "datasource",
|
|
347
|
+
lsType: "ls"
|
|
348
|
+
};
|
|
485
349
|
|
|
486
|
-
|
|
350
|
+
that._layerManager.addTempLayerNode(layer);
|
|
487
351
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
352
|
+
cb && cb(layer);
|
|
353
|
+
});
|
|
354
|
+
} else {
|
|
355
|
+
reject(file.name + " service parse error.");
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
} else {
|
|
359
|
+
var reader = new FileReader();
|
|
360
|
+
reader.readAsText(file); //文本
|
|
361
|
+
//readAsDataURL(file); //base64 图片
|
|
362
|
+
//readAsArrayBuffer(file); //原始二进制数据
|
|
363
|
+
//readAsBinaryString(file);//二进制字符串
|
|
364
|
+
//reader.readAsBinaryString(file);
|
|
365
|
+
|
|
366
|
+
reader.onload = function (event) {
|
|
367
|
+
var ret = event.target.result;
|
|
368
|
+
|
|
369
|
+
switch (ext) {
|
|
370
|
+
case "json":
|
|
371
|
+
case "geojson":
|
|
372
|
+
case "topojson":
|
|
373
|
+
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
374
|
+
ret = ret.substring(ret.indexOf("{"));
|
|
375
|
+
|
|
376
|
+
try {
|
|
377
|
+
var data = JSON.parse(ret);
|
|
378
|
+
|
|
379
|
+
if (typeof data == "object" && data) {
|
|
380
|
+
ret = data;
|
|
381
|
+
}
|
|
382
|
+
} catch (e) {}
|
|
383
|
+
|
|
384
|
+
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
385
|
+
ds.load(ret, that._geojsonStyle).then(ds => {
|
|
386
|
+
ds.entities.values.forEach(entity => {
|
|
387
|
+
if (entity.polygon) {
|
|
388
|
+
entity.polyline = {
|
|
389
|
+
positions: entity.polygon.hierarchy._value.positions,
|
|
390
|
+
width: that._geojsonStyle.polygon.outlineWidth,
|
|
391
|
+
material: that._geojsonStyle.polygon.outlineColor
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
});
|
|
491
395
|
|
|
492
|
-
|
|
493
|
-
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
494
|
-
var options = {
|
|
495
|
-
name: name,
|
|
496
|
-
camera: that._viewer.scene.camera,
|
|
497
|
-
canvas: that._viewer.scene.canvas
|
|
498
|
-
};
|
|
499
|
-
var ds = new Cesium.KmlDataSource(options);
|
|
500
|
-
var data = new Blob([ret], {
|
|
501
|
-
type: "text/xml"
|
|
502
|
-
});
|
|
503
|
-
ds.load(data).then(ds => {
|
|
504
|
-
that._viewer.dataSources.add(ds);
|
|
396
|
+
that._viewer.dataSources.add(ds);
|
|
505
397
|
|
|
506
|
-
|
|
398
|
+
ds.autoAvoid(that._viewer);
|
|
507
399
|
|
|
508
|
-
|
|
509
|
-
guid: ds.guid,
|
|
510
|
-
name: name,
|
|
511
|
-
visible: true,
|
|
512
|
-
serverType: "datasource",
|
|
513
|
-
lsType: "ls"
|
|
514
|
-
};
|
|
400
|
+
that._viewer.flyTo(ds);
|
|
515
401
|
|
|
516
|
-
|
|
402
|
+
resolve("success");
|
|
403
|
+
var layer = {
|
|
404
|
+
guid: ds.guid,
|
|
405
|
+
name: name,
|
|
406
|
+
visible: true,
|
|
407
|
+
serverType: "datasource",
|
|
408
|
+
lsType: "ls"
|
|
409
|
+
};
|
|
517
410
|
|
|
518
|
-
|
|
519
|
-
});
|
|
520
|
-
break;
|
|
411
|
+
that._layerManager.addTempLayerNode(layer);
|
|
521
412
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
camera: that._viewer.scene.camera,
|
|
526
|
-
canvas: that._viewer.scene.canvas
|
|
527
|
-
};
|
|
528
|
-
var ds = new Cesium.KmlDataSource(options);
|
|
529
|
-
ds.load(file).then(ds => {
|
|
530
|
-
that._viewer.dataSources.add(ds);
|
|
413
|
+
cb && cb(layer);
|
|
414
|
+
});
|
|
415
|
+
break;
|
|
531
416
|
|
|
532
|
-
|
|
417
|
+
case "kml":
|
|
418
|
+
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
419
|
+
var options = {
|
|
420
|
+
name: name,
|
|
421
|
+
camera: that._viewer.scene.camera,
|
|
422
|
+
canvas: that._viewer.scene.canvas
|
|
423
|
+
};
|
|
424
|
+
var ds = new Cesium.KmlDataSource(options);
|
|
425
|
+
var data = new Blob([ret], {
|
|
426
|
+
type: "text/xml"
|
|
427
|
+
});
|
|
428
|
+
ds.load(data).then(ds => {
|
|
429
|
+
that._viewer.dataSources.add(ds);
|
|
533
430
|
|
|
534
|
-
|
|
535
|
-
guid: ds.guid,
|
|
536
|
-
name: name,
|
|
537
|
-
visible: true,
|
|
538
|
-
serverType: "datasource",
|
|
539
|
-
lsType: "ls"
|
|
540
|
-
};
|
|
431
|
+
that._viewer.flyTo(ds);
|
|
541
432
|
|
|
542
|
-
|
|
433
|
+
resolve("success");
|
|
434
|
+
var layer = {
|
|
435
|
+
guid: ds.guid,
|
|
436
|
+
name: name,
|
|
437
|
+
visible: true,
|
|
438
|
+
serverType: "datasource",
|
|
439
|
+
lsType: "ls"
|
|
440
|
+
};
|
|
543
441
|
|
|
544
|
-
|
|
545
|
-
});
|
|
546
|
-
break;
|
|
442
|
+
that._layerManager.addTempLayerNode(layer);
|
|
547
443
|
|
|
548
|
-
|
|
549
|
-
|
|
444
|
+
cb && cb(layer);
|
|
445
|
+
});
|
|
446
|
+
break;
|
|
550
447
|
|
|
551
|
-
|
|
552
|
-
|
|
448
|
+
case "kmz":
|
|
449
|
+
var options = {
|
|
450
|
+
name: name,
|
|
451
|
+
camera: that._viewer.scene.camera,
|
|
452
|
+
canvas: that._viewer.scene.canvas
|
|
453
|
+
};
|
|
454
|
+
var ds = new Cesium.KmlDataSource(options);
|
|
455
|
+
ds.load(file).then(ds => {
|
|
456
|
+
that._viewer.dataSources.add(ds);
|
|
553
457
|
|
|
554
|
-
|
|
555
|
-
ret = data;
|
|
556
|
-
}
|
|
557
|
-
} catch (e) {}
|
|
458
|
+
that._viewer.flyTo(ds);
|
|
558
459
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
460
|
+
resolve("success");
|
|
461
|
+
var layer = {
|
|
462
|
+
guid: ds.guid,
|
|
463
|
+
name: name,
|
|
464
|
+
visible: true,
|
|
465
|
+
serverType: "datasource",
|
|
466
|
+
lsType: "ls"
|
|
467
|
+
};
|
|
563
468
|
|
|
564
|
-
|
|
565
|
-
guid: ds.guid,
|
|
566
|
-
name: name,
|
|
567
|
-
visible: true,
|
|
568
|
-
serverType: "datasource",
|
|
569
|
-
lsType: "ls"
|
|
570
|
-
};
|
|
469
|
+
that._layerManager.addTempLayerNode(layer);
|
|
571
470
|
|
|
572
|
-
|
|
471
|
+
cb && cb(layer);
|
|
472
|
+
});
|
|
473
|
+
break;
|
|
573
474
|
|
|
574
|
-
|
|
575
|
-
|
|
475
|
+
case "czml":
|
|
476
|
+
ret = ret.replace(/(^\s*)|(\s*$)/, "");
|
|
576
477
|
|
|
577
|
-
|
|
478
|
+
try {
|
|
479
|
+
var data = JSON.parse(ret);
|
|
578
480
|
|
|
579
|
-
|
|
580
|
-
|
|
481
|
+
if (typeof data == "object" && data) {
|
|
482
|
+
ret = data;
|
|
483
|
+
}
|
|
484
|
+
} catch (e) {}
|
|
581
485
|
|
|
582
|
-
|
|
583
|
-
|
|
486
|
+
that._viewer.dataSources.add(Cesium.CzmlDataSource.load(ret, {
|
|
487
|
+
name: name
|
|
488
|
+
})).then(ds => {
|
|
489
|
+
that._viewer.flyTo(ds);
|
|
584
490
|
|
|
585
|
-
|
|
586
|
-
|
|
491
|
+
resolve("success");
|
|
492
|
+
var layer = {
|
|
493
|
+
guid: ds.guid,
|
|
494
|
+
name: name,
|
|
495
|
+
visible: true,
|
|
496
|
+
serverType: "datasource",
|
|
497
|
+
lsType: "ls"
|
|
498
|
+
};
|
|
587
499
|
|
|
588
|
-
|
|
589
|
-
case "xlsx":
|
|
590
|
-
break;
|
|
500
|
+
that._layerManager.addTempLayerNode(layer);
|
|
591
501
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
502
|
+
cb && cb(layer);
|
|
503
|
+
});
|
|
595
504
|
|
|
596
|
-
|
|
597
|
-
};
|
|
505
|
+
break;
|
|
598
506
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
507
|
+
case "txt":
|
|
508
|
+
break;
|
|
509
|
+
|
|
510
|
+
case "csv":
|
|
511
|
+
break;
|
|
512
|
+
|
|
513
|
+
case "xls":
|
|
514
|
+
case "xlsx":
|
|
515
|
+
break;
|
|
516
|
+
|
|
517
|
+
default:
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
reader.onerror = function () {
|
|
523
|
+
console.log(file.name + " read error.");
|
|
524
|
+
reject(file.name + " read error.");
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
});
|
|
603
528
|
} //解析数据源
|
|
604
529
|
|
|
605
530
|
|
|
@@ -1144,8 +1069,6 @@ class AddDataViewModel {
|
|
|
1144
1069
|
}
|
|
1145
1070
|
|
|
1146
1071
|
}
|
|
1147
|
-
// EXTERNAL MODULE: ./src/webgl/headertemp/index.js + 3 modules
|
|
1148
|
-
var headertemp = __webpack_require__(519);
|
|
1149
1072
|
;// 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
|
|
1150
1073
|
|
|
1151
1074
|
const _hoisted_1 = {
|
|
@@ -1200,6 +1123,21 @@ const __default__ = {
|
|
|
1200
1123
|
type: Boolean,
|
|
1201
1124
|
default: true
|
|
1202
1125
|
},
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* 例:"center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
|
|
1129
|
+
*/
|
|
1130
|
+
position: [String, Object],
|
|
1131
|
+
// 几何服务地址前缀,例:http://support.kqgeo.com:29800/geometry-proxy/kqgis/rest/services/geometry
|
|
1132
|
+
geometryServerUrl: {
|
|
1133
|
+
type: String,
|
|
1134
|
+
required: true
|
|
1135
|
+
},
|
|
1136
|
+
// 几何服务token,例:eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob3N0IiwiY3JlYXRlZCI6MTY1NTk2MzU1NzUyMywiZXhwIjoxNzY3MTEwNDAwfQ.BiNOr6vL6liHzlMK89XSvqmFY9fuWiYqDEwYmWxk-6vFKBgLeMC8FloBXyKcxOCl9Rd28y_pX4PhVRYP5cZTwA
|
|
1137
|
+
geometryServerToken: {
|
|
1138
|
+
type: String,
|
|
1139
|
+
required: true
|
|
1140
|
+
},
|
|
1203
1141
|
// 当前展示的tab标签页
|
|
1204
1142
|
activeName: {
|
|
1205
1143
|
type: String,
|
|
@@ -1252,7 +1190,8 @@ const __default__ = {
|
|
|
1252
1190
|
});
|
|
1253
1191
|
let upload_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
1254
1192
|
let upload_btn_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
1255
|
-
let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
|
|
1193
|
+
let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
|
|
1194
|
+
let loadingFile = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false); // 获取组件传参
|
|
1256
1195
|
|
|
1257
1196
|
let operatorArray = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
|
|
1258
1197
|
let array = [];
|
|
@@ -1273,9 +1212,22 @@ const __default__ = {
|
|
|
1273
1212
|
}
|
|
1274
1213
|
|
|
1275
1214
|
return flag;
|
|
1276
|
-
});
|
|
1215
|
+
}); // 组件容器Ref
|
|
1216
|
+
|
|
1217
|
+
let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
|
|
1218
|
+
|
|
1219
|
+
let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
|
|
1220
|
+
let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
|
|
1277
1221
|
let viewModel = null;
|
|
1278
1222
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
|
|
1223
|
+
(0,util_.updatePosition)(boxRef.value, props);
|
|
1224
|
+
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
|
|
1225
|
+
(0,util_.updatePosition)(boxRef.value, props);
|
|
1226
|
+
});
|
|
1227
|
+
watchCreateHeaderTemp();
|
|
1228
|
+
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.showHeaderTemp, (newVal, oldVal) => {
|
|
1229
|
+
watchCreateHeaderTemp();
|
|
1230
|
+
});
|
|
1279
1231
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
1280
1232
|
if (scenceView) {
|
|
1281
1233
|
language.value = scenceView._language;
|
|
@@ -1387,12 +1339,25 @@ const __default__ = {
|
|
|
1387
1339
|
];
|
|
1388
1340
|
dataSourceType.value = dataSourceTypeList.value[0];
|
|
1389
1341
|
let options = {
|
|
1390
|
-
billboardImage: const_image_.BILLBOARD_IMAGE_URL
|
|
1342
|
+
billboardImage: const_image_.BILLBOARD_IMAGE_URL,
|
|
1343
|
+
geometryServerUrl: props.geometryServerUrl,
|
|
1344
|
+
geometryServerToken: props.geometryServerToken
|
|
1391
1345
|
};
|
|
1392
1346
|
viewModel = new AddDataViewModel(scenceView, options);
|
|
1393
1347
|
}
|
|
1394
1348
|
});
|
|
1395
|
-
});
|
|
1349
|
+
});
|
|
1350
|
+
/**
|
|
1351
|
+
* @description 监听header生成
|
|
1352
|
+
*/
|
|
1353
|
+
|
|
1354
|
+
const watchCreateHeaderTemp = () => {
|
|
1355
|
+
if (props.showHeaderTemp) {
|
|
1356
|
+
// 生成headerTemp
|
|
1357
|
+
headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
|
|
1358
|
+
}
|
|
1359
|
+
}; // 切换tab页
|
|
1360
|
+
|
|
1396
1361
|
|
|
1397
1362
|
function handleChange(pane) {} // 切换类型
|
|
1398
1363
|
|
|
@@ -1426,8 +1391,14 @@ const __default__ = {
|
|
|
1426
1391
|
|
|
1427
1392
|
|
|
1428
1393
|
function loadFiles() {
|
|
1394
|
+
loadingFile.value = true;
|
|
1395
|
+
let promiseList = [];
|
|
1429
1396
|
fileList.value.forEach(file => {
|
|
1430
|
-
viewModel.parseFile(file.raw,
|
|
1397
|
+
promiseList.push(viewModel.parseFile(file.raw, props.loadCallback));
|
|
1398
|
+
});
|
|
1399
|
+
Promise.all(promiseList).then(() => {
|
|
1400
|
+
removeFiles();
|
|
1401
|
+
loadingFile.value = false;
|
|
1431
1402
|
});
|
|
1432
1403
|
} //加载URL
|
|
1433
1404
|
|
|
@@ -1477,17 +1448,16 @@ const __default__ = {
|
|
|
1477
1448
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
|
|
1478
1449
|
class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq3d-add-data", {
|
|
1479
1450
|
'kq-box-shadow': __props.showShadow
|
|
1480
|
-
}])
|
|
1481
|
-
|
|
1451
|
+
}]),
|
|
1452
|
+
ref_key: "boxRef",
|
|
1453
|
+
ref: boxRef
|
|
1454
|
+
}, [__props.showHeaderTemp ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headerTemp)), {
|
|
1482
1455
|
key: 0,
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
}, null, 8
|
|
1489
|
-
/* PROPS */
|
|
1490
|
-
, ["showShadow", "headerTempTitle", "headerTempIcon", "isCollapse", "isRight"])) : (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, {
|
|
1456
|
+
ref_key: "headerTempRef",
|
|
1457
|
+
ref: headerTempRef
|
|
1458
|
+
}, null, 512
|
|
1459
|
+
/* NEED_PATCH */
|
|
1460
|
+
)) : (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, {
|
|
1491
1461
|
modelValue: props.activeName,
|
|
1492
1462
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => props.activeName = $event),
|
|
1493
1463
|
onTabChange: handleChange
|
|
@@ -1497,7 +1467,7 @@ const __default__ = {
|
|
|
1497
1467
|
name: "upload"
|
|
1498
1468
|
}, {
|
|
1499
1469
|
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, {
|
|
1500
|
-
class: ""
|
|
1470
|
+
class: "kq3d-add-data-title"
|
|
1501
1471
|
}, {
|
|
1502
1472
|
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
|
|
1503
1473
|
/* TEXT */
|
|
@@ -1521,7 +1491,7 @@ const __default__ = {
|
|
|
1521
1491
|
"auto-upload": false,
|
|
1522
1492
|
"file-list": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList),
|
|
1523
1493
|
"onUpdate:file-list": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(fileList) ? fileList.value = $event : fileList = $event),
|
|
1524
|
-
accept: ".geojson,.topojson,.json,.kml,.kmz,.czml",
|
|
1494
|
+
accept: ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.txt",
|
|
1525
1495
|
"on-change": changeFile,
|
|
1526
1496
|
ref_key: "upload_ref",
|
|
1527
1497
|
ref: upload_ref
|
|
@@ -1589,7 +1559,7 @@ const __default__ = {
|
|
|
1589
1559
|
action: "",
|
|
1590
1560
|
"show-file-list": false,
|
|
1591
1561
|
"auto-upload": false,
|
|
1592
|
-
accept: ".geojson,.topojson,.json,.kml,.kmz,.czml",
|
|
1562
|
+
accept: ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.txt",
|
|
1593
1563
|
ref_key: "upload_btn_ref",
|
|
1594
1564
|
ref: upload_btn_ref,
|
|
1595
1565
|
class: "kq3d-add-data-footer-upload",
|
|
@@ -1630,7 +1600,8 @@ const __default__ = {
|
|
|
1630
1600
|
onClick: _cache[2] || (_cache[2] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => loadFiles(), ["stop"])),
|
|
1631
1601
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles,
|
|
1632
1602
|
type: "primary",
|
|
1633
|
-
disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(disabled)
|
|
1603
|
+
disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(disabled),
|
|
1604
|
+
loading: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(loadingFile)
|
|
1634
1605
|
}, {
|
|
1635
1606
|
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
|
|
1636
1607
|
/* TEXT */
|
|
@@ -1640,7 +1611,7 @@ const __default__ = {
|
|
|
1640
1611
|
|
|
1641
1612
|
}, 8
|
|
1642
1613
|
/* PROPS */
|
|
1643
|
-
, ["title", "disabled"])])])]),
|
|
1614
|
+
, ["title", "disabled", "loading"])])])]),
|
|
1644
1615
|
_: 3
|
|
1645
1616
|
/* FORWARDED */
|
|
1646
1617
|
|