cesium-alpha-earth 1.0.21 → 1.0.23
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/dist/cesium-alpha-earth.css +534 -43
- package/dist/index.js +2454 -173
- package/dist/types/components/AreaMeasurement/index.d.ts +2 -0
- package/dist/types/components/AreaMeasurement/index.js +7 -0
- package/dist/types/components/AreaMeasurement/index.js.map +1 -0
- package/dist/types/components/DistanceMeasurement/index.d.ts +2 -0
- package/dist/types/components/DistanceMeasurement/index.js +7 -0
- package/dist/types/components/DistanceMeasurement/index.js.map +1 -0
- package/dist/types/components/HeightMeasurement/index.d.ts +2 -0
- package/dist/types/components/HeightMeasurement/index.js +7 -0
- package/dist/types/components/HeightMeasurement/index.js.map +1 -0
- package/dist/types/components/LayerController/index.d.ts +2 -0
- package/dist/types/components/LayerController/index.js +7 -0
- package/dist/types/components/LayerController/index.js.map +1 -0
- package/dist/types/components/SceneController/index.d.ts +2 -0
- package/dist/types/components/SceneController/index.js +7 -0
- package/dist/types/components/SceneController/index.js.map +1 -0
- package/dist/types/components/Search/index.d.ts +2 -0
- package/dist/types/components/Search/index.js +7 -0
- package/dist/types/components/Search/index.js.map +1 -0
- package/dist/types/components/toolBar/index.d.ts +2 -0
- package/dist/types/components/toolBar/index.js +8 -0
- package/dist/types/components/toolBar/index.js.map +1 -0
- package/dist/types/core/CesiumAlphaGeoJsonLayer/index.d.ts +1 -0
- package/dist/types/core/CesiumAlphaGeoJsonLayer/index.js +6 -3
- package/dist/types/core/CesiumAlphaGeoJsonLayer/index.js.map +1 -1
- package/dist/types/core/CesiumAlphaGeoJsonLayer/method/createGraphic.js +6 -4
- package/dist/types/core/CesiumAlphaGeoJsonLayer/method/createGraphic.js.map +1 -1
- package/dist/types/core/CesiumAlphaMeasure/MeasureArea.d.ts +41 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureArea.js +271 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureArea.js.map +1 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureDistance.d.ts +32 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureDistance.js +233 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureDistance.js.map +1 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureHeight.d.ts +25 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureHeight.js +147 -0
- package/dist/types/core/CesiumAlphaMeasure/MeasureHeight.js.map +1 -0
- package/dist/types/core/CesiumAlphaViewer/index.d.ts +2 -0
- package/dist/types/core/CesiumAlphaViewer/index.js +6 -0
- package/dist/types/core/CesiumAlphaViewer/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +8 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/util/analysisMethods/index.d.ts +1 -0
- package/dist/types/util/analysisMethods/index.js +8 -1
- package/dist/types/util/analysisMethods/index.js.map +1 -1
- package/dist/types/util/tooltip/index.d.ts +1 -1
- package/dist/types/util/tooltip/index.js +1 -1
- package/dist/types/util/tooltip/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, inject, ref, computed, unref, getCurrentScope, onScopeDispose, shallowRef, watchEffect, readonly, onMounted, nextTick, watch, isRef, warn, provide, mergeProps, renderSlot, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeStyle, normalizeClass, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, onBeforeUnmount, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text, Comment, Teleport as Teleport$1, onBeforeMount, onDeactivated, createTextVNode,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, inject, ref, computed, unref, getCurrentScope, onScopeDispose, shallowRef, watchEffect, readonly, onMounted, nextTick, watch, isRef, warn, provide, mergeProps, renderSlot, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeStyle, normalizeClass, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, onBeforeUnmount, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text, Comment, Teleport as Teleport$1, onBeforeMount, onDeactivated, createTextVNode, toRaw, vModelCheckbox, toRefs, renderList, withKeys, createSlots, resolveComponent, resolveDirective, toHandlerKey, vModelText, TransitionGroup, h as h$1, createApp, shallowReactive, isVNode, render as render$2 } from "vue";
|
|
2
2
|
function _mergeNamespaces(n, m2) {
|
|
3
3
|
for (var i = 0; i < m2.length; i++) {
|
|
4
4
|
const e = m2[i];
|
|
@@ -266102,6 +266102,26 @@ function bbox(geojson, options = {}) {
|
|
|
266102
266102
|
});
|
|
266103
266103
|
return result;
|
|
266104
266104
|
}
|
|
266105
|
+
function bboxPolygon(bbox2, options = {}) {
|
|
266106
|
+
const west = Number(bbox2[0]);
|
|
266107
|
+
const south = Number(bbox2[1]);
|
|
266108
|
+
const east = Number(bbox2[2]);
|
|
266109
|
+
const north = Number(bbox2[3]);
|
|
266110
|
+
if (bbox2.length === 6) {
|
|
266111
|
+
throw new Error(
|
|
266112
|
+
"@turf/bbox-polygon does not support BBox with 6 positions"
|
|
266113
|
+
);
|
|
266114
|
+
}
|
|
266115
|
+
const lowLeft = [west, south];
|
|
266116
|
+
const topLeft = [west, north];
|
|
266117
|
+
const topRight = [east, north];
|
|
266118
|
+
const lowRight = [east, south];
|
|
266119
|
+
return polygon(
|
|
266120
|
+
[[lowLeft, lowRight, topRight, topLeft, lowLeft]],
|
|
266121
|
+
options.properties,
|
|
266122
|
+
{ bbox: bbox2, id: options.id }
|
|
266123
|
+
);
|
|
266124
|
+
}
|
|
266105
266125
|
const epsilon$1 = 11102230246251565e-32;
|
|
266106
266126
|
const splitter = 134217729;
|
|
266107
266127
|
const resulterrbound = (3 + 8 * epsilon$1) * epsilon$1;
|
|
@@ -277688,7 +277708,7 @@ function unkinkPolygon(geojson) {
|
|
|
277688
277708
|
return featureCollection(features);
|
|
277689
277709
|
}
|
|
277690
277710
|
function createPoint(geoJsonLayer, geoJson, feature2, options) {
|
|
277691
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i
|
|
277711
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
277692
277712
|
let noid = nanoid$1();
|
|
277693
277713
|
let position = crsFunction(feature2.geometry.coordinates);
|
|
277694
277714
|
geoJsonLayer.addPoint({
|
|
@@ -277708,8 +277728,8 @@ function createPoint(geoJsonLayer, geoJson, feature2, options) {
|
|
|
277708
277728
|
scale: ((_f = options.point) == null ? void 0 : _f.scale) || 1,
|
|
277709
277729
|
sizeInMeters: ((_g = options.point) == null ? void 0 : _g.sizeInMeters) || false,
|
|
277710
277730
|
rotation: ((_h = options.point) == null ? void 0 : _h.rotation) || 0,
|
|
277711
|
-
color: Color$2.fromCssColorString(((_i = options.point) == null ? void 0 : _i.color) || "
|
|
277712
|
-
heightReference:
|
|
277731
|
+
color: Color$2.fromCssColorString(((_i = options.point) == null ? void 0 : _i.color) || ""),
|
|
277732
|
+
// heightReference:options.point?.clampToGround?HeightReference.CLAMP_TO_GROUND:HeightReference.NONE,
|
|
277713
277733
|
verticalOrigin: VerticalOrigin$1.BOTTOM
|
|
277714
277734
|
},
|
|
277715
277735
|
properties: feature2.properties
|
|
@@ -277727,6 +277747,7 @@ function createLineString(geoJsonLayer, geoJson, feature2, options) {
|
|
|
277727
277747
|
type: "Polyline",
|
|
277728
277748
|
id: noid,
|
|
277729
277749
|
positions,
|
|
277750
|
+
properties: feature2.properties,
|
|
277730
277751
|
style: {
|
|
277731
277752
|
...options.polyline
|
|
277732
277753
|
},
|
|
@@ -277774,6 +277795,7 @@ function createPolygon(geoJsonLayer, geoJson, feature2, options) {
|
|
|
277774
277795
|
type: "Polygon",
|
|
277775
277796
|
id: noid,
|
|
277776
277797
|
positions,
|
|
277798
|
+
properties: feature2.properties,
|
|
277777
277799
|
style: {
|
|
277778
277800
|
...options.polygon
|
|
277779
277801
|
},
|
|
@@ -278002,7 +278024,7 @@ let defaultLabelOption = {
|
|
|
278002
278024
|
fieldKey: void 0,
|
|
278003
278025
|
distanceDisplayCondition: new DistanceDisplayCondition(
|
|
278004
278026
|
0,
|
|
278005
|
-
|
|
278027
|
+
5e3
|
|
278006
278028
|
),
|
|
278007
278029
|
style: LabelStyle$1.FILL_AND_OUTLINE,
|
|
278008
278030
|
color: "rgb(255,100,100)",
|
|
@@ -278018,7 +278040,7 @@ let defaultPointOption = {
|
|
|
278018
278040
|
sizeInMeters: false,
|
|
278019
278041
|
rotation: 0,
|
|
278020
278042
|
label: defaultLabelOption,
|
|
278021
|
-
color:
|
|
278043
|
+
color: void 0,
|
|
278022
278044
|
distanceDisplayCondition: new DistanceDisplayCondition(
|
|
278023
278045
|
0,
|
|
278024
278046
|
Number.POSITIVE_INFINITY
|
|
@@ -278096,6 +278118,9 @@ class CesiumAlphaGeoJsonLayer {
|
|
|
278096
278118
|
get featureItem() {
|
|
278097
278119
|
return this._featureItem;
|
|
278098
278120
|
}
|
|
278121
|
+
get show() {
|
|
278122
|
+
return this._primitiveCollection.show;
|
|
278123
|
+
}
|
|
278099
278124
|
static async load(option) {
|
|
278100
278125
|
const layer = new CesiumAlphaGeoJsonLayer(option);
|
|
278101
278126
|
layer.show = option.show || true;
|
|
@@ -278239,15 +278264,30 @@ class CesiumAlphaGeoJsonLayer {
|
|
|
278239
278264
|
this.addFeatureItem(item);
|
|
278240
278265
|
}
|
|
278241
278266
|
addLabel(item, labelOption) {
|
|
278267
|
+
let text2 = void 0;
|
|
278242
278268
|
if (item.properties && labelOption.fieldKey) {
|
|
278243
|
-
item.properties[labelOption.fieldKey];
|
|
278269
|
+
text2 = item.properties[labelOption.fieldKey];
|
|
278244
278270
|
}
|
|
278271
|
+
let color = void 0;
|
|
278245
278272
|
if (labelOption.color) {
|
|
278246
|
-
labelOption.color;
|
|
278273
|
+
color = labelOption.color;
|
|
278247
278274
|
}
|
|
278248
|
-
{
|
|
278275
|
+
if (!text2) {
|
|
278249
278276
|
return;
|
|
278250
278277
|
}
|
|
278278
|
+
this._labelCollection.add({
|
|
278279
|
+
position: item.center.cartesian3,
|
|
278280
|
+
//@ts-ignore
|
|
278281
|
+
heightReference: item.style.heightReference,
|
|
278282
|
+
text: text2,
|
|
278283
|
+
distanceDisplayCondition: labelOption.distanceDisplayCondition,
|
|
278284
|
+
style: labelOption.style,
|
|
278285
|
+
font: labelOption.font,
|
|
278286
|
+
fillColor: Color$2.fromCssColorString(color || "rgb(255,0,0)"),
|
|
278287
|
+
verticalOrigin: VerticalOrigin$1.BOTTOM,
|
|
278288
|
+
horizontalOrigin: HorizontalOrigin$1.CENTER,
|
|
278289
|
+
pixelOffset: labelOption.pixelOffset
|
|
278290
|
+
});
|
|
278251
278291
|
}
|
|
278252
278292
|
addFeatureItem(item) {
|
|
278253
278293
|
this._featureItem.push(item);
|
|
@@ -278298,6 +278338,12 @@ class CesiumAlphaViewer {
|
|
|
278298
278338
|
this._modelDatasource = [];
|
|
278299
278339
|
this.viewer = createViewer(container, option);
|
|
278300
278340
|
}
|
|
278341
|
+
get layerDatasource() {
|
|
278342
|
+
return this._layerDatasource;
|
|
278343
|
+
}
|
|
278344
|
+
get modelDatasource() {
|
|
278345
|
+
return this._modelDatasource;
|
|
278346
|
+
}
|
|
278301
278347
|
//开启图层聚合
|
|
278302
278348
|
// public enableLayerCluster(layer: CesiumAlphaGeoJsonLayer) {
|
|
278303
278349
|
// layer._cluster = enableCluster(this, layer);
|
|
@@ -278594,6 +278640,22 @@ var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
278594
278640
|
}
|
|
278595
278641
|
});
|
|
278596
278642
|
var loading_default = loading_vue_vue_type_script_setup_true_lang_default;
|
|
278643
|
+
var menu_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
278644
|
+
name: "Menu",
|
|
278645
|
+
__name: "menu",
|
|
278646
|
+
setup(__props) {
|
|
278647
|
+
return (_ctx, _cache2) => (openBlock(), createElementBlock("svg", {
|
|
278648
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
278649
|
+
viewBox: "0 0 1024 1024"
|
|
278650
|
+
}, [
|
|
278651
|
+
createElementVNode("path", {
|
|
278652
|
+
fill: "currentColor",
|
|
278653
|
+
d: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"
|
|
278654
|
+
})
|
|
278655
|
+
]));
|
|
278656
|
+
}
|
|
278657
|
+
});
|
|
278658
|
+
var menu_default = menu_vue_vue_type_script_setup_true_lang_default;
|
|
278597
278659
|
var minus_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
278598
278660
|
name: "Minus",
|
|
278599
278661
|
__name: "minus",
|
|
@@ -278626,6 +278688,22 @@ var plus_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
278626
278688
|
}
|
|
278627
278689
|
});
|
|
278628
278690
|
var plus_default = plus_vue_vue_type_script_setup_true_lang_default;
|
|
278691
|
+
var search_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
278692
|
+
name: "Search",
|
|
278693
|
+
__name: "search",
|
|
278694
|
+
setup(__props) {
|
|
278695
|
+
return (_ctx, _cache2) => (openBlock(), createElementBlock("svg", {
|
|
278696
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
278697
|
+
viewBox: "0 0 1024 1024"
|
|
278698
|
+
}, [
|
|
278699
|
+
createElementVNode("path", {
|
|
278700
|
+
fill: "currentColor",
|
|
278701
|
+
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
278702
|
+
})
|
|
278703
|
+
]));
|
|
278704
|
+
}
|
|
278705
|
+
});
|
|
278706
|
+
var search_default = search_vue_vue_type_script_setup_true_lang_default;
|
|
278629
278707
|
var success_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
278630
278708
|
name: "SuccessFilled",
|
|
278631
278709
|
__name: "success-filled",
|
|
@@ -280250,6 +280328,7 @@ const isElement = (e) => {
|
|
|
280250
280328
|
return false;
|
|
280251
280329
|
return e instanceof Element;
|
|
280252
280330
|
};
|
|
280331
|
+
const isPropAbsent = (prop) => isNil(prop);
|
|
280253
280332
|
const isStringNumber = (val) => {
|
|
280254
280333
|
if (!isString$2(val)) {
|
|
280255
280334
|
return false;
|
|
@@ -281149,12 +281228,12 @@ const iconProps = buildProps({
|
|
|
281149
281228
|
type: String
|
|
281150
281229
|
}
|
|
281151
281230
|
});
|
|
281152
|
-
const __default__$
|
|
281231
|
+
const __default__$t = defineComponent({
|
|
281153
281232
|
name: "ElIcon",
|
|
281154
281233
|
inheritAttrs: false
|
|
281155
281234
|
});
|
|
281156
|
-
const _sfc_main$
|
|
281157
|
-
...__default__$
|
|
281235
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
281236
|
+
...__default__$t,
|
|
281158
281237
|
props: iconProps,
|
|
281159
281238
|
setup(__props) {
|
|
281160
281239
|
const props = __props;
|
|
@@ -281178,7 +281257,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
281178
281257
|
};
|
|
281179
281258
|
}
|
|
281180
281259
|
});
|
|
281181
|
-
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
281260
|
+
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$N, [["__file", "icon.vue"]]);
|
|
281182
281261
|
const ElIcon = withInstall(Icon);
|
|
281183
281262
|
const iconPropType = definePropType([
|
|
281184
281263
|
String,
|
|
@@ -281624,12 +281703,12 @@ function useCursor(input) {
|
|
|
281624
281703
|
}
|
|
281625
281704
|
return [recordCursor, setCursor];
|
|
281626
281705
|
}
|
|
281627
|
-
const __default__$
|
|
281706
|
+
const __default__$s = defineComponent({
|
|
281628
281707
|
name: "ElInput",
|
|
281629
281708
|
inheritAttrs: false
|
|
281630
281709
|
});
|
|
281631
|
-
const _sfc_main$
|
|
281632
|
-
...__default__$
|
|
281710
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
281711
|
+
...__default__$s,
|
|
281633
281712
|
props: inputProps,
|
|
281634
281713
|
emits: inputEmits,
|
|
281635
281714
|
setup(__props, { expose, emit }) {
|
|
@@ -282036,7 +282115,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
282036
282115
|
};
|
|
282037
282116
|
}
|
|
282038
282117
|
});
|
|
282039
|
-
var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282118
|
+
var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$M, [["__file", "input.vue"]]);
|
|
282040
282119
|
const ElInput = withInstall(Input);
|
|
282041
282120
|
const GAP = 4;
|
|
282042
282121
|
const BAR_MAP = {
|
|
@@ -282081,7 +282160,7 @@ const thumbProps = buildProps({
|
|
|
282081
282160
|
always: Boolean
|
|
282082
282161
|
});
|
|
282083
282162
|
const COMPONENT_NAME$5 = "Thumb";
|
|
282084
|
-
const _sfc_main$
|
|
282163
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
282085
282164
|
__name: "thumb",
|
|
282086
282165
|
props: thumbProps,
|
|
282087
282166
|
setup(__props) {
|
|
@@ -282200,7 +282279,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
282200
282279
|
};
|
|
282201
282280
|
}
|
|
282202
282281
|
});
|
|
282203
|
-
var Thumb = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282282
|
+
var Thumb = /* @__PURE__ */ _export_sfc$1(_sfc_main$L, [["__file", "thumb.vue"]]);
|
|
282204
282283
|
const barProps = buildProps({
|
|
282205
282284
|
always: {
|
|
282206
282285
|
type: Boolean,
|
|
@@ -282211,7 +282290,7 @@ const barProps = buildProps({
|
|
|
282211
282290
|
required: true
|
|
282212
282291
|
}
|
|
282213
282292
|
});
|
|
282214
|
-
const _sfc_main$
|
|
282293
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
282215
282294
|
__name: "bar",
|
|
282216
282295
|
props: barProps,
|
|
282217
282296
|
setup(__props, { expose }) {
|
|
@@ -282269,7 +282348,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
282269
282348
|
};
|
|
282270
282349
|
}
|
|
282271
282350
|
});
|
|
282272
|
-
var Bar = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282351
|
+
var Bar = /* @__PURE__ */ _export_sfc$1(_sfc_main$K, [["__file", "bar.vue"]]);
|
|
282273
282352
|
const scrollbarProps = buildProps({
|
|
282274
282353
|
height: {
|
|
282275
282354
|
type: [String, Number],
|
|
@@ -282324,11 +282403,11 @@ const scrollbarEmits = {
|
|
|
282324
282403
|
}) => [scrollTop, scrollLeft].every(isNumber$1)
|
|
282325
282404
|
};
|
|
282326
282405
|
const COMPONENT_NAME$4 = "ElScrollbar";
|
|
282327
|
-
const __default__$
|
|
282406
|
+
const __default__$r = defineComponent({
|
|
282328
282407
|
name: COMPONENT_NAME$4
|
|
282329
282408
|
});
|
|
282330
|
-
const _sfc_main$
|
|
282331
|
-
...__default__$
|
|
282409
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
282410
|
+
...__default__$r,
|
|
282332
282411
|
props: scrollbarProps,
|
|
282333
282412
|
emits: scrollbarEmits,
|
|
282334
282413
|
setup(__props, { expose, emit }) {
|
|
@@ -282482,7 +282561,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
282482
282561
|
};
|
|
282483
282562
|
}
|
|
282484
282563
|
});
|
|
282485
|
-
var Scrollbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282564
|
+
var Scrollbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$J, [["__file", "scrollbar.vue"]]);
|
|
282486
282565
|
const ElScrollbar = withInstall(Scrollbar);
|
|
282487
282566
|
const POPPER_INJECTION_KEY = Symbol("popper");
|
|
282488
282567
|
const POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
|
|
@@ -282503,12 +282582,12 @@ const popperProps = buildProps({
|
|
|
282503
282582
|
default: "tooltip"
|
|
282504
282583
|
}
|
|
282505
282584
|
});
|
|
282506
|
-
const __default__$
|
|
282585
|
+
const __default__$q = defineComponent({
|
|
282507
282586
|
name: "ElPopper",
|
|
282508
282587
|
inheritAttrs: false
|
|
282509
282588
|
});
|
|
282510
|
-
const _sfc_main$
|
|
282511
|
-
...__default__$
|
|
282589
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
282590
|
+
...__default__$q,
|
|
282512
282591
|
props: popperProps,
|
|
282513
282592
|
setup(__props, { expose }) {
|
|
282514
282593
|
const props = __props;
|
|
@@ -282531,19 +282610,19 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
282531
282610
|
};
|
|
282532
282611
|
}
|
|
282533
282612
|
});
|
|
282534
|
-
var Popper = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282613
|
+
var Popper = /* @__PURE__ */ _export_sfc$1(_sfc_main$I, [["__file", "popper.vue"]]);
|
|
282535
282614
|
const popperArrowProps = buildProps({
|
|
282536
282615
|
arrowOffset: {
|
|
282537
282616
|
type: Number,
|
|
282538
282617
|
default: 5
|
|
282539
282618
|
}
|
|
282540
282619
|
});
|
|
282541
|
-
const __default__$
|
|
282620
|
+
const __default__$p = defineComponent({
|
|
282542
282621
|
name: "ElPopperArrow",
|
|
282543
282622
|
inheritAttrs: false
|
|
282544
282623
|
});
|
|
282545
|
-
const _sfc_main$
|
|
282546
|
-
...__default__$
|
|
282624
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
282625
|
+
...__default__$p,
|
|
282547
282626
|
props: popperArrowProps,
|
|
282548
282627
|
setup(__props, { expose }) {
|
|
282549
282628
|
const props = __props;
|
|
@@ -282569,7 +282648,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
282569
282648
|
};
|
|
282570
282649
|
}
|
|
282571
282650
|
});
|
|
282572
|
-
var ElPopperArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282651
|
+
var ElPopperArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__file", "arrow.vue"]]);
|
|
282573
282652
|
const popperTriggerProps = buildProps({
|
|
282574
282653
|
virtualRef: {
|
|
282575
282654
|
type: definePropType(Object)
|
|
@@ -282701,12 +282780,12 @@ function wrapTextContent(s) {
|
|
|
282701
282780
|
"class": ns.e("content")
|
|
282702
282781
|
}, [s]);
|
|
282703
282782
|
}
|
|
282704
|
-
const __default__$
|
|
282783
|
+
const __default__$o = defineComponent({
|
|
282705
282784
|
name: "ElPopperTrigger",
|
|
282706
282785
|
inheritAttrs: false
|
|
282707
282786
|
});
|
|
282708
|
-
const _sfc_main$
|
|
282709
|
-
...__default__$
|
|
282787
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
282788
|
+
...__default__$o,
|
|
282710
282789
|
props: popperTriggerProps,
|
|
282711
282790
|
setup(__props, { expose }) {
|
|
282712
282791
|
const props = __props;
|
|
@@ -282817,7 +282896,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
282817
282896
|
};
|
|
282818
282897
|
}
|
|
282819
282898
|
});
|
|
282820
|
-
var ElPopperTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
282899
|
+
var ElPopperTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$G, [["__file", "trigger.vue"]]);
|
|
282821
282900
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
282822
282901
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
282823
282902
|
const FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
|
|
@@ -283008,7 +283087,7 @@ const useEscapeKeydown = (handler) => {
|
|
|
283008
283087
|
}
|
|
283009
283088
|
});
|
|
283010
283089
|
};
|
|
283011
|
-
const _sfc_main$
|
|
283090
|
+
const _sfc_main$F = defineComponent({
|
|
283012
283091
|
name: "ElFocusTrap",
|
|
283013
283092
|
inheritAttrs: false,
|
|
283014
283093
|
props: {
|
|
@@ -283250,10 +283329,10 @@ const _sfc_main$v = defineComponent({
|
|
|
283250
283329
|
};
|
|
283251
283330
|
}
|
|
283252
283331
|
});
|
|
283253
|
-
function _sfc_render$
|
|
283332
|
+
function _sfc_render$g(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
283254
283333
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
283255
283334
|
}
|
|
283256
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
283335
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$F, [["render", _sfc_render$g], ["__file", "focus-trap.vue"]]);
|
|
283257
283336
|
var E = "top", R = "bottom", W = "right", P = "left", me = "auto", G = [E, R, W, P], U$1 = "start", J = "end", Xe = "clippingParents", je = "viewport", K = "popper", Ye = "reference", De = G.reduce(function(t, e) {
|
|
283258
283337
|
return t.concat([e + "-" + U$1, e + "-" + J]);
|
|
283259
283338
|
}, []), Ee = [].concat(G, [me]).reduce(function(t, e) {
|
|
@@ -284159,11 +284238,11 @@ const usePopperContentDOM = (props, {
|
|
|
284159
284238
|
updateZIndex
|
|
284160
284239
|
};
|
|
284161
284240
|
};
|
|
284162
|
-
const __default__$
|
|
284241
|
+
const __default__$n = defineComponent({
|
|
284163
284242
|
name: "ElPopperContent"
|
|
284164
284243
|
});
|
|
284165
|
-
const _sfc_main$
|
|
284166
|
-
...__default__$
|
|
284244
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
284245
|
+
...__default__$n,
|
|
284167
284246
|
props: popperContentProps,
|
|
284168
284247
|
emits: popperContentEmits,
|
|
284169
284248
|
setup(__props, { expose, emit }) {
|
|
@@ -284279,7 +284358,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
284279
284358
|
};
|
|
284280
284359
|
}
|
|
284281
284360
|
});
|
|
284282
|
-
var ElPopperContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
284361
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$E, [["__file", "content.vue"]]);
|
|
284283
284362
|
const ElPopper = withInstall(Popper);
|
|
284284
284363
|
const TOOLTIP_INJECTION_KEY = Symbol("elTooltip");
|
|
284285
284364
|
function useTimeout() {
|
|
@@ -284546,11 +284625,11 @@ const composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPreve
|
|
|
284546
284625
|
};
|
|
284547
284626
|
return handleEvent;
|
|
284548
284627
|
};
|
|
284549
|
-
const __default__$
|
|
284628
|
+
const __default__$m = defineComponent({
|
|
284550
284629
|
name: "ElTooltipTrigger"
|
|
284551
284630
|
});
|
|
284552
|
-
const _sfc_main$
|
|
284553
|
-
...__default__$
|
|
284631
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
284632
|
+
...__default__$m,
|
|
284554
284633
|
props: useTooltipTriggerProps,
|
|
284555
284634
|
setup(__props, { expose }) {
|
|
284556
284635
|
const props = __props;
|
|
@@ -284609,7 +284688,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
284609
284688
|
};
|
|
284610
284689
|
}
|
|
284611
284690
|
});
|
|
284612
|
-
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
284691
|
+
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$D, [["__file", "trigger.vue"]]);
|
|
284613
284692
|
const teleportProps = buildProps({
|
|
284614
284693
|
to: {
|
|
284615
284694
|
type: definePropType([String, Object]),
|
|
@@ -284617,7 +284696,7 @@ const teleportProps = buildProps({
|
|
|
284617
284696
|
},
|
|
284618
284697
|
disabled: Boolean
|
|
284619
284698
|
});
|
|
284620
|
-
const _sfc_main$
|
|
284699
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
284621
284700
|
__name: "teleport",
|
|
284622
284701
|
props: teleportProps,
|
|
284623
284702
|
setup(__props) {
|
|
@@ -284631,7 +284710,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
284631
284710
|
};
|
|
284632
284711
|
}
|
|
284633
284712
|
});
|
|
284634
|
-
var Teleport = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
284713
|
+
var Teleport = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["__file", "teleport.vue"]]);
|
|
284635
284714
|
const ElTeleport = withInstall(Teleport);
|
|
284636
284715
|
const usePopperContainerId = () => {
|
|
284637
284716
|
const namespace = useGetDerivedNamespace();
|
|
@@ -284665,12 +284744,12 @@ const usePopperContainer = () => {
|
|
|
284665
284744
|
selector
|
|
284666
284745
|
};
|
|
284667
284746
|
};
|
|
284668
|
-
const __default__$
|
|
284747
|
+
const __default__$l = defineComponent({
|
|
284669
284748
|
name: "ElTooltipContent",
|
|
284670
284749
|
inheritAttrs: false
|
|
284671
284750
|
});
|
|
284672
|
-
const _sfc_main$
|
|
284673
|
-
...__default__$
|
|
284751
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
284752
|
+
...__default__$l,
|
|
284674
284753
|
props: useTooltipContentProps,
|
|
284675
284754
|
setup(__props, { expose }) {
|
|
284676
284755
|
const props = __props;
|
|
@@ -284844,12 +284923,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
284844
284923
|
};
|
|
284845
284924
|
}
|
|
284846
284925
|
});
|
|
284847
|
-
var ElTooltipContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
284848
|
-
const __default__$
|
|
284926
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$B, [["__file", "content.vue"]]);
|
|
284927
|
+
const __default__$k = defineComponent({
|
|
284849
284928
|
name: "ElTooltip"
|
|
284850
284929
|
});
|
|
284851
|
-
const _sfc_main$
|
|
284852
|
-
...__default__$
|
|
284930
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
284931
|
+
...__default__$k,
|
|
284853
284932
|
props: useTooltipProps,
|
|
284854
284933
|
emits: tooltipEmits,
|
|
284855
284934
|
setup(__props, { expose, emit }) {
|
|
@@ -284999,7 +285078,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
284999
285078
|
};
|
|
285000
285079
|
}
|
|
285001
285080
|
});
|
|
285002
|
-
var Tooltip$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
285081
|
+
var Tooltip$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__file", "tooltip.vue"]]);
|
|
285003
285082
|
const ElTooltip = withInstall(Tooltip$1);
|
|
285004
285083
|
const badgeProps = buildProps({
|
|
285005
285084
|
value: {
|
|
@@ -285033,11 +285112,11 @@ const badgeProps = buildProps({
|
|
|
285033
285112
|
type: String
|
|
285034
285113
|
}
|
|
285035
285114
|
});
|
|
285036
|
-
const __default__$
|
|
285115
|
+
const __default__$j = defineComponent({
|
|
285037
285116
|
name: "ElBadge"
|
|
285038
285117
|
});
|
|
285039
|
-
const _sfc_main$
|
|
285040
|
-
...__default__$
|
|
285118
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
285119
|
+
...__default__$j,
|
|
285041
285120
|
props: badgeProps,
|
|
285042
285121
|
setup(__props, { expose }) {
|
|
285043
285122
|
const props = __props;
|
|
@@ -285098,7 +285177,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
285098
285177
|
};
|
|
285099
285178
|
}
|
|
285100
285179
|
});
|
|
285101
|
-
var Badge = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
285180
|
+
var Badge = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__file", "badge.vue"]]);
|
|
285102
285181
|
const ElBadge = withInstall(Badge);
|
|
285103
285182
|
const buttonGroupContextKey = Symbol("buttonGroupContextKey");
|
|
285104
285183
|
const useDeprecated = ({ from, replacement, scope, version: version2, ref: ref2, type = "API" }, condition) => {
|
|
@@ -286168,11 +286247,11 @@ function useButtonCustomStyle(props) {
|
|
|
286168
286247
|
return styles;
|
|
286169
286248
|
});
|
|
286170
286249
|
}
|
|
286171
|
-
const __default__$
|
|
286250
|
+
const __default__$i = defineComponent({
|
|
286172
286251
|
name: "ElButton"
|
|
286173
286252
|
});
|
|
286174
|
-
const _sfc_main$
|
|
286175
|
-
...__default__$
|
|
286253
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
286254
|
+
...__default__$i,
|
|
286176
286255
|
props: buttonProps,
|
|
286177
286256
|
emits: buttonEmits,
|
|
286178
286257
|
setup(__props, { expose, emit }) {
|
|
@@ -286238,16 +286317,16 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
286238
286317
|
};
|
|
286239
286318
|
}
|
|
286240
286319
|
});
|
|
286241
|
-
var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
286320
|
+
var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$y, [["__file", "button.vue"]]);
|
|
286242
286321
|
const buttonGroupProps = {
|
|
286243
286322
|
size: buttonProps.size,
|
|
286244
286323
|
type: buttonProps.type
|
|
286245
286324
|
};
|
|
286246
|
-
const __default__$
|
|
286325
|
+
const __default__$h = defineComponent({
|
|
286247
286326
|
name: "ElButtonGroup"
|
|
286248
286327
|
});
|
|
286249
|
-
const _sfc_main$
|
|
286250
|
-
...__default__$
|
|
286328
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
286329
|
+
...__default__$h,
|
|
286251
286330
|
props: buttonGroupProps,
|
|
286252
286331
|
setup(__props) {
|
|
286253
286332
|
const props = __props;
|
|
@@ -286265,11 +286344,576 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
286265
286344
|
};
|
|
286266
286345
|
}
|
|
286267
286346
|
});
|
|
286268
|
-
var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
286347
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["__file", "button-group.vue"]]);
|
|
286269
286348
|
const ElButton = withInstall(Button, {
|
|
286270
286349
|
ButtonGroup
|
|
286271
286350
|
});
|
|
286272
286351
|
withNoopInstall(ButtonGroup);
|
|
286352
|
+
const checkboxProps = {
|
|
286353
|
+
modelValue: {
|
|
286354
|
+
type: [Number, String, Boolean],
|
|
286355
|
+
default: void 0
|
|
286356
|
+
},
|
|
286357
|
+
label: {
|
|
286358
|
+
type: [String, Boolean, Number, Object],
|
|
286359
|
+
default: void 0
|
|
286360
|
+
},
|
|
286361
|
+
value: {
|
|
286362
|
+
type: [String, Boolean, Number, Object],
|
|
286363
|
+
default: void 0
|
|
286364
|
+
},
|
|
286365
|
+
indeterminate: Boolean,
|
|
286366
|
+
disabled: Boolean,
|
|
286367
|
+
checked: Boolean,
|
|
286368
|
+
name: {
|
|
286369
|
+
type: String,
|
|
286370
|
+
default: void 0
|
|
286371
|
+
},
|
|
286372
|
+
trueValue: {
|
|
286373
|
+
type: [String, Number],
|
|
286374
|
+
default: void 0
|
|
286375
|
+
},
|
|
286376
|
+
falseValue: {
|
|
286377
|
+
type: [String, Number],
|
|
286378
|
+
default: void 0
|
|
286379
|
+
},
|
|
286380
|
+
trueLabel: {
|
|
286381
|
+
type: [String, Number],
|
|
286382
|
+
default: void 0
|
|
286383
|
+
},
|
|
286384
|
+
falseLabel: {
|
|
286385
|
+
type: [String, Number],
|
|
286386
|
+
default: void 0
|
|
286387
|
+
},
|
|
286388
|
+
id: {
|
|
286389
|
+
type: String,
|
|
286390
|
+
default: void 0
|
|
286391
|
+
},
|
|
286392
|
+
border: Boolean,
|
|
286393
|
+
size: useSizeProp,
|
|
286394
|
+
tabindex: [String, Number],
|
|
286395
|
+
validateEvent: {
|
|
286396
|
+
type: Boolean,
|
|
286397
|
+
default: true
|
|
286398
|
+
},
|
|
286399
|
+
...useAriaProps(["ariaControls"])
|
|
286400
|
+
};
|
|
286401
|
+
const checkboxEmits = {
|
|
286402
|
+
[UPDATE_MODEL_EVENT]: (val) => isString$2(val) || isNumber$1(val) || isBoolean$1(val),
|
|
286403
|
+
change: (val) => isString$2(val) || isNumber$1(val) || isBoolean$1(val)
|
|
286404
|
+
};
|
|
286405
|
+
const checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
|
|
286406
|
+
const useCheckboxDisabled = ({
|
|
286407
|
+
model,
|
|
286408
|
+
isChecked
|
|
286409
|
+
}) => {
|
|
286410
|
+
const checkboxGroup = inject(checkboxGroupContextKey, void 0);
|
|
286411
|
+
const isLimitDisabled = computed(() => {
|
|
286412
|
+
var _a2, _b;
|
|
286413
|
+
const max2 = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value;
|
|
286414
|
+
const min2 = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
|
|
286415
|
+
return !isUndefined$1(max2) && model.value.length >= max2 && !isChecked.value || !isUndefined$1(min2) && model.value.length <= min2 && isChecked.value;
|
|
286416
|
+
});
|
|
286417
|
+
const isDisabled = useFormDisabled(computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value));
|
|
286418
|
+
return {
|
|
286419
|
+
isDisabled,
|
|
286420
|
+
isLimitDisabled
|
|
286421
|
+
};
|
|
286422
|
+
};
|
|
286423
|
+
const useCheckboxEvent = (props, {
|
|
286424
|
+
model,
|
|
286425
|
+
isLimitExceeded,
|
|
286426
|
+
hasOwnLabel,
|
|
286427
|
+
isDisabled,
|
|
286428
|
+
isLabeledByFormItem
|
|
286429
|
+
}) => {
|
|
286430
|
+
const checkboxGroup = inject(checkboxGroupContextKey, void 0);
|
|
286431
|
+
const { formItem } = useFormItem();
|
|
286432
|
+
const { emit } = getCurrentInstance();
|
|
286433
|
+
function getLabeledValue(value) {
|
|
286434
|
+
var _a2, _b, _c, _d;
|
|
286435
|
+
return [true, props.trueValue, props.trueLabel].includes(value) ? (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true : (_d = (_c = props.falseValue) != null ? _c : props.falseLabel) != null ? _d : false;
|
|
286436
|
+
}
|
|
286437
|
+
function emitChangeEvent(checked, e) {
|
|
286438
|
+
emit("change", getLabeledValue(checked), e);
|
|
286439
|
+
}
|
|
286440
|
+
function handleChange(e) {
|
|
286441
|
+
if (isLimitExceeded.value)
|
|
286442
|
+
return;
|
|
286443
|
+
const target = e.target;
|
|
286444
|
+
emit("change", getLabeledValue(target.checked), e);
|
|
286445
|
+
}
|
|
286446
|
+
async function onClickRoot(e) {
|
|
286447
|
+
if (isLimitExceeded.value)
|
|
286448
|
+
return;
|
|
286449
|
+
if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
|
|
286450
|
+
const eventTargets = e.composedPath();
|
|
286451
|
+
const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
|
|
286452
|
+
if (!hasLabel) {
|
|
286453
|
+
model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
|
|
286454
|
+
await nextTick();
|
|
286455
|
+
emitChangeEvent(model.value, e);
|
|
286456
|
+
}
|
|
286457
|
+
}
|
|
286458
|
+
}
|
|
286459
|
+
const validateEvent = computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
|
|
286460
|
+
watch(() => props.modelValue, () => {
|
|
286461
|
+
if (validateEvent.value) {
|
|
286462
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
286463
|
+
}
|
|
286464
|
+
});
|
|
286465
|
+
return {
|
|
286466
|
+
handleChange,
|
|
286467
|
+
onClickRoot
|
|
286468
|
+
};
|
|
286469
|
+
};
|
|
286470
|
+
const useCheckboxModel = (props) => {
|
|
286471
|
+
const selfModel = ref(false);
|
|
286472
|
+
const { emit } = getCurrentInstance();
|
|
286473
|
+
const checkboxGroup = inject(checkboxGroupContextKey, void 0);
|
|
286474
|
+
const isGroup = computed(() => isUndefined$1(checkboxGroup) === false);
|
|
286475
|
+
const isLimitExceeded = ref(false);
|
|
286476
|
+
const model = computed({
|
|
286477
|
+
get() {
|
|
286478
|
+
var _a2, _b;
|
|
286479
|
+
return isGroup.value ? (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a2.value : (_b = props.modelValue) != null ? _b : selfModel.value;
|
|
286480
|
+
},
|
|
286481
|
+
set(val) {
|
|
286482
|
+
var _a2, _b;
|
|
286483
|
+
if (isGroup.value && isArray$2(val)) {
|
|
286484
|
+
isLimitExceeded.value = ((_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value) && val.length > model.value.length;
|
|
286485
|
+
isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val));
|
|
286486
|
+
} else {
|
|
286487
|
+
emit(UPDATE_MODEL_EVENT, val);
|
|
286488
|
+
selfModel.value = val;
|
|
286489
|
+
}
|
|
286490
|
+
}
|
|
286491
|
+
});
|
|
286492
|
+
return {
|
|
286493
|
+
model,
|
|
286494
|
+
isGroup,
|
|
286495
|
+
isLimitExceeded
|
|
286496
|
+
};
|
|
286497
|
+
};
|
|
286498
|
+
const useCheckboxStatus = (props, slots, { model }) => {
|
|
286499
|
+
const checkboxGroup = inject(checkboxGroupContextKey, void 0);
|
|
286500
|
+
const isFocused = ref(false);
|
|
286501
|
+
const actualValue = computed(() => {
|
|
286502
|
+
if (!isPropAbsent(props.value)) {
|
|
286503
|
+
return props.value;
|
|
286504
|
+
}
|
|
286505
|
+
return props.label;
|
|
286506
|
+
});
|
|
286507
|
+
const isChecked = computed(() => {
|
|
286508
|
+
const value = model.value;
|
|
286509
|
+
if (isBoolean$1(value)) {
|
|
286510
|
+
return value;
|
|
286511
|
+
} else if (isArray$2(value)) {
|
|
286512
|
+
if (isObject$2(actualValue.value)) {
|
|
286513
|
+
return value.map(toRaw).some((o) => isEqual(o, actualValue.value));
|
|
286514
|
+
} else {
|
|
286515
|
+
return value.map(toRaw).includes(actualValue.value);
|
|
286516
|
+
}
|
|
286517
|
+
} else if (value !== null && value !== void 0) {
|
|
286518
|
+
return value === props.trueValue || value === props.trueLabel;
|
|
286519
|
+
} else {
|
|
286520
|
+
return !!value;
|
|
286521
|
+
}
|
|
286522
|
+
});
|
|
286523
|
+
const checkboxButtonSize = useFormSize(computed(() => {
|
|
286524
|
+
var _a2;
|
|
286525
|
+
return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
|
|
286526
|
+
}), {
|
|
286527
|
+
prop: true
|
|
286528
|
+
});
|
|
286529
|
+
const checkboxSize = useFormSize(computed(() => {
|
|
286530
|
+
var _a2;
|
|
286531
|
+
return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
|
|
286532
|
+
}));
|
|
286533
|
+
const hasOwnLabel = computed(() => {
|
|
286534
|
+
return !!slots.default || !isPropAbsent(actualValue.value);
|
|
286535
|
+
});
|
|
286536
|
+
return {
|
|
286537
|
+
checkboxButtonSize,
|
|
286538
|
+
isChecked,
|
|
286539
|
+
isFocused,
|
|
286540
|
+
checkboxSize,
|
|
286541
|
+
hasOwnLabel,
|
|
286542
|
+
actualValue
|
|
286543
|
+
};
|
|
286544
|
+
};
|
|
286545
|
+
const useCheckbox = (props, slots) => {
|
|
286546
|
+
const { formItem: elFormItem } = useFormItem();
|
|
286547
|
+
const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
|
|
286548
|
+
const {
|
|
286549
|
+
isFocused,
|
|
286550
|
+
isChecked,
|
|
286551
|
+
checkboxButtonSize,
|
|
286552
|
+
checkboxSize,
|
|
286553
|
+
hasOwnLabel,
|
|
286554
|
+
actualValue
|
|
286555
|
+
} = useCheckboxStatus(props, slots, { model });
|
|
286556
|
+
const { isDisabled } = useCheckboxDisabled({ model, isChecked });
|
|
286557
|
+
const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
286558
|
+
formItemContext: elFormItem,
|
|
286559
|
+
disableIdGeneration: hasOwnLabel,
|
|
286560
|
+
disableIdManagement: isGroup
|
|
286561
|
+
});
|
|
286562
|
+
const { handleChange, onClickRoot } = useCheckboxEvent(props, {
|
|
286563
|
+
model,
|
|
286564
|
+
isLimitExceeded,
|
|
286565
|
+
hasOwnLabel,
|
|
286566
|
+
isDisabled,
|
|
286567
|
+
isLabeledByFormItem
|
|
286568
|
+
});
|
|
286569
|
+
const setStoreValue = () => {
|
|
286570
|
+
function addToStore() {
|
|
286571
|
+
var _a2, _b;
|
|
286572
|
+
if (isArray$2(model.value) && !model.value.includes(actualValue.value)) {
|
|
286573
|
+
model.value.push(actualValue.value);
|
|
286574
|
+
} else {
|
|
286575
|
+
model.value = (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true;
|
|
286576
|
+
}
|
|
286577
|
+
}
|
|
286578
|
+
props.checked && addToStore();
|
|
286579
|
+
};
|
|
286580
|
+
setStoreValue();
|
|
286581
|
+
useDeprecated({
|
|
286582
|
+
from: "label act as value",
|
|
286583
|
+
replacement: "value",
|
|
286584
|
+
version: "3.0.0",
|
|
286585
|
+
scope: "el-checkbox",
|
|
286586
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
286587
|
+
}, computed(() => isGroup.value && isPropAbsent(props.value)));
|
|
286588
|
+
useDeprecated({
|
|
286589
|
+
from: "true-label",
|
|
286590
|
+
replacement: "true-value",
|
|
286591
|
+
version: "3.0.0",
|
|
286592
|
+
scope: "el-checkbox",
|
|
286593
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
286594
|
+
}, computed(() => !!props.trueLabel));
|
|
286595
|
+
useDeprecated({
|
|
286596
|
+
from: "false-label",
|
|
286597
|
+
replacement: "false-value",
|
|
286598
|
+
version: "3.0.0",
|
|
286599
|
+
scope: "el-checkbox",
|
|
286600
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
286601
|
+
}, computed(() => !!props.falseLabel));
|
|
286602
|
+
return {
|
|
286603
|
+
inputId,
|
|
286604
|
+
isLabeledByFormItem,
|
|
286605
|
+
isChecked,
|
|
286606
|
+
isDisabled,
|
|
286607
|
+
isFocused,
|
|
286608
|
+
checkboxButtonSize,
|
|
286609
|
+
checkboxSize,
|
|
286610
|
+
hasOwnLabel,
|
|
286611
|
+
model,
|
|
286612
|
+
actualValue,
|
|
286613
|
+
handleChange,
|
|
286614
|
+
onClickRoot
|
|
286615
|
+
};
|
|
286616
|
+
};
|
|
286617
|
+
const __default__$g = defineComponent({
|
|
286618
|
+
name: "ElCheckbox"
|
|
286619
|
+
});
|
|
286620
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
286621
|
+
...__default__$g,
|
|
286622
|
+
props: checkboxProps,
|
|
286623
|
+
emits: checkboxEmits,
|
|
286624
|
+
setup(__props) {
|
|
286625
|
+
const props = __props;
|
|
286626
|
+
const slots = useSlots();
|
|
286627
|
+
const {
|
|
286628
|
+
inputId,
|
|
286629
|
+
isLabeledByFormItem,
|
|
286630
|
+
isChecked,
|
|
286631
|
+
isDisabled,
|
|
286632
|
+
isFocused,
|
|
286633
|
+
checkboxSize,
|
|
286634
|
+
hasOwnLabel,
|
|
286635
|
+
model,
|
|
286636
|
+
actualValue,
|
|
286637
|
+
handleChange,
|
|
286638
|
+
onClickRoot
|
|
286639
|
+
} = useCheckbox(props, slots);
|
|
286640
|
+
const ns = useNamespace("checkbox");
|
|
286641
|
+
const compKls = computed(() => {
|
|
286642
|
+
return [
|
|
286643
|
+
ns.b(),
|
|
286644
|
+
ns.m(checkboxSize.value),
|
|
286645
|
+
ns.is("disabled", isDisabled.value),
|
|
286646
|
+
ns.is("bordered", props.border),
|
|
286647
|
+
ns.is("checked", isChecked.value)
|
|
286648
|
+
];
|
|
286649
|
+
});
|
|
286650
|
+
const spanKls = computed(() => {
|
|
286651
|
+
return [
|
|
286652
|
+
ns.e("input"),
|
|
286653
|
+
ns.is("disabled", isDisabled.value),
|
|
286654
|
+
ns.is("checked", isChecked.value),
|
|
286655
|
+
ns.is("indeterminate", props.indeterminate),
|
|
286656
|
+
ns.is("focus", isFocused.value)
|
|
286657
|
+
];
|
|
286658
|
+
});
|
|
286659
|
+
return (_ctx, _cache2) => {
|
|
286660
|
+
return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
|
|
286661
|
+
class: normalizeClass(unref(compKls)),
|
|
286662
|
+
"aria-controls": _ctx.indeterminate ? _ctx.ariaControls : null,
|
|
286663
|
+
onClick: unref(onClickRoot)
|
|
286664
|
+
}, {
|
|
286665
|
+
default: withCtx(() => {
|
|
286666
|
+
var _a2, _b, _c, _d;
|
|
286667
|
+
return [
|
|
286668
|
+
createElementVNode("span", {
|
|
286669
|
+
class: normalizeClass(unref(spanKls))
|
|
286670
|
+
}, [
|
|
286671
|
+
_ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
|
|
286672
|
+
key: 0,
|
|
286673
|
+
id: unref(inputId),
|
|
286674
|
+
"onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
|
|
286675
|
+
class: normalizeClass(unref(ns).e("original")),
|
|
286676
|
+
type: "checkbox",
|
|
286677
|
+
indeterminate: _ctx.indeterminate,
|
|
286678
|
+
name: _ctx.name,
|
|
286679
|
+
tabindex: _ctx.tabindex,
|
|
286680
|
+
disabled: unref(isDisabled),
|
|
286681
|
+
"true-value": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true,
|
|
286682
|
+
"false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
|
|
286683
|
+
onChange: unref(handleChange),
|
|
286684
|
+
onFocus: ($event) => isFocused.value = true,
|
|
286685
|
+
onBlur: ($event) => isFocused.value = false,
|
|
286686
|
+
onClick: withModifiers(() => {
|
|
286687
|
+
}, ["stop"])
|
|
286688
|
+
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
286689
|
+
[vModelCheckbox, unref(model)]
|
|
286690
|
+
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
286691
|
+
key: 1,
|
|
286692
|
+
id: unref(inputId),
|
|
286693
|
+
"onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
|
|
286694
|
+
class: normalizeClass(unref(ns).e("original")),
|
|
286695
|
+
type: "checkbox",
|
|
286696
|
+
indeterminate: _ctx.indeterminate,
|
|
286697
|
+
disabled: unref(isDisabled),
|
|
286698
|
+
value: unref(actualValue),
|
|
286699
|
+
name: _ctx.name,
|
|
286700
|
+
tabindex: _ctx.tabindex,
|
|
286701
|
+
onChange: unref(handleChange),
|
|
286702
|
+
onFocus: ($event) => isFocused.value = true,
|
|
286703
|
+
onBlur: ($event) => isFocused.value = false,
|
|
286704
|
+
onClick: withModifiers(() => {
|
|
286705
|
+
}, ["stop"])
|
|
286706
|
+
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
286707
|
+
[vModelCheckbox, unref(model)]
|
|
286708
|
+
]),
|
|
286709
|
+
createElementVNode("span", {
|
|
286710
|
+
class: normalizeClass(unref(ns).e("inner"))
|
|
286711
|
+
}, null, 2)
|
|
286712
|
+
], 2),
|
|
286713
|
+
unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
|
|
286714
|
+
key: 0,
|
|
286715
|
+
class: normalizeClass(unref(ns).e("label"))
|
|
286716
|
+
}, [
|
|
286717
|
+
renderSlot(_ctx.$slots, "default"),
|
|
286718
|
+
!_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
286719
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
286720
|
+
], 64)) : createCommentVNode("v-if", true)
|
|
286721
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
286722
|
+
];
|
|
286723
|
+
}),
|
|
286724
|
+
_: 3
|
|
286725
|
+
}, 8, ["class", "aria-controls", "onClick"]);
|
|
286726
|
+
};
|
|
286727
|
+
}
|
|
286728
|
+
});
|
|
286729
|
+
var Checkbox = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["__file", "checkbox.vue"]]);
|
|
286730
|
+
const __default__$f = defineComponent({
|
|
286731
|
+
name: "ElCheckboxButton"
|
|
286732
|
+
});
|
|
286733
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
286734
|
+
...__default__$f,
|
|
286735
|
+
props: checkboxProps,
|
|
286736
|
+
emits: checkboxEmits,
|
|
286737
|
+
setup(__props) {
|
|
286738
|
+
const props = __props;
|
|
286739
|
+
const slots = useSlots();
|
|
286740
|
+
const {
|
|
286741
|
+
isFocused,
|
|
286742
|
+
isChecked,
|
|
286743
|
+
isDisabled,
|
|
286744
|
+
checkboxButtonSize,
|
|
286745
|
+
model,
|
|
286746
|
+
actualValue,
|
|
286747
|
+
handleChange
|
|
286748
|
+
} = useCheckbox(props, slots);
|
|
286749
|
+
const checkboxGroup = inject(checkboxGroupContextKey, void 0);
|
|
286750
|
+
const ns = useNamespace("checkbox");
|
|
286751
|
+
const activeStyle = computed(() => {
|
|
286752
|
+
var _a2, _b, _c, _d;
|
|
286753
|
+
const fillValue = (_b = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a2.value) != null ? _b : "";
|
|
286754
|
+
return {
|
|
286755
|
+
backgroundColor: fillValue,
|
|
286756
|
+
borderColor: fillValue,
|
|
286757
|
+
color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "",
|
|
286758
|
+
boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
|
|
286759
|
+
};
|
|
286760
|
+
});
|
|
286761
|
+
const labelKls = computed(() => {
|
|
286762
|
+
return [
|
|
286763
|
+
ns.b("button"),
|
|
286764
|
+
ns.bm("button", checkboxButtonSize.value),
|
|
286765
|
+
ns.is("disabled", isDisabled.value),
|
|
286766
|
+
ns.is("checked", isChecked.value),
|
|
286767
|
+
ns.is("focus", isFocused.value)
|
|
286768
|
+
];
|
|
286769
|
+
});
|
|
286770
|
+
return (_ctx, _cache2) => {
|
|
286771
|
+
var _a2, _b, _c, _d;
|
|
286772
|
+
return openBlock(), createElementBlock("label", {
|
|
286773
|
+
class: normalizeClass(unref(labelKls))
|
|
286774
|
+
}, [
|
|
286775
|
+
_ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
|
|
286776
|
+
key: 0,
|
|
286777
|
+
"onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
|
|
286778
|
+
class: normalizeClass(unref(ns).be("button", "original")),
|
|
286779
|
+
type: "checkbox",
|
|
286780
|
+
name: _ctx.name,
|
|
286781
|
+
tabindex: _ctx.tabindex,
|
|
286782
|
+
disabled: unref(isDisabled),
|
|
286783
|
+
"true-value": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true,
|
|
286784
|
+
"false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
|
|
286785
|
+
onChange: unref(handleChange),
|
|
286786
|
+
onFocus: ($event) => isFocused.value = true,
|
|
286787
|
+
onBlur: ($event) => isFocused.value = false,
|
|
286788
|
+
onClick: withModifiers(() => {
|
|
286789
|
+
}, ["stop"])
|
|
286790
|
+
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
286791
|
+
[vModelCheckbox, unref(model)]
|
|
286792
|
+
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
286793
|
+
key: 1,
|
|
286794
|
+
"onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
|
|
286795
|
+
class: normalizeClass(unref(ns).be("button", "original")),
|
|
286796
|
+
type: "checkbox",
|
|
286797
|
+
name: _ctx.name,
|
|
286798
|
+
tabindex: _ctx.tabindex,
|
|
286799
|
+
disabled: unref(isDisabled),
|
|
286800
|
+
value: unref(actualValue),
|
|
286801
|
+
onChange: unref(handleChange),
|
|
286802
|
+
onFocus: ($event) => isFocused.value = true,
|
|
286803
|
+
onBlur: ($event) => isFocused.value = false,
|
|
286804
|
+
onClick: withModifiers(() => {
|
|
286805
|
+
}, ["stop"])
|
|
286806
|
+
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
|
|
286807
|
+
[vModelCheckbox, unref(model)]
|
|
286808
|
+
]),
|
|
286809
|
+
_ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("span", {
|
|
286810
|
+
key: 2,
|
|
286811
|
+
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
286812
|
+
style: normalizeStyle(unref(isChecked) ? unref(activeStyle) : void 0)
|
|
286813
|
+
}, [
|
|
286814
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
286815
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
286816
|
+
])
|
|
286817
|
+
], 6)) : createCommentVNode("v-if", true)
|
|
286818
|
+
], 2);
|
|
286819
|
+
};
|
|
286820
|
+
}
|
|
286821
|
+
});
|
|
286822
|
+
var CheckboxButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__file", "checkbox-button.vue"]]);
|
|
286823
|
+
const checkboxGroupProps = buildProps({
|
|
286824
|
+
modelValue: {
|
|
286825
|
+
type: definePropType(Array),
|
|
286826
|
+
default: () => []
|
|
286827
|
+
},
|
|
286828
|
+
disabled: Boolean,
|
|
286829
|
+
min: Number,
|
|
286830
|
+
max: Number,
|
|
286831
|
+
size: useSizeProp,
|
|
286832
|
+
fill: String,
|
|
286833
|
+
textColor: String,
|
|
286834
|
+
tag: {
|
|
286835
|
+
type: String,
|
|
286836
|
+
default: "div"
|
|
286837
|
+
},
|
|
286838
|
+
validateEvent: {
|
|
286839
|
+
type: Boolean,
|
|
286840
|
+
default: true
|
|
286841
|
+
},
|
|
286842
|
+
...useAriaProps(["ariaLabel"])
|
|
286843
|
+
});
|
|
286844
|
+
const checkboxGroupEmits = {
|
|
286845
|
+
[UPDATE_MODEL_EVENT]: (val) => isArray$2(val),
|
|
286846
|
+
change: (val) => isArray$2(val)
|
|
286847
|
+
};
|
|
286848
|
+
const __default__$e = defineComponent({
|
|
286849
|
+
name: "ElCheckboxGroup"
|
|
286850
|
+
});
|
|
286851
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
286852
|
+
...__default__$e,
|
|
286853
|
+
props: checkboxGroupProps,
|
|
286854
|
+
emits: checkboxGroupEmits,
|
|
286855
|
+
setup(__props, { emit }) {
|
|
286856
|
+
const props = __props;
|
|
286857
|
+
const ns = useNamespace("checkbox");
|
|
286858
|
+
const { formItem } = useFormItem();
|
|
286859
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
286860
|
+
formItemContext: formItem
|
|
286861
|
+
});
|
|
286862
|
+
const changeEvent = async (value) => {
|
|
286863
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
286864
|
+
await nextTick();
|
|
286865
|
+
emit("change", value);
|
|
286866
|
+
};
|
|
286867
|
+
const modelValue = computed({
|
|
286868
|
+
get() {
|
|
286869
|
+
return props.modelValue;
|
|
286870
|
+
},
|
|
286871
|
+
set(val) {
|
|
286872
|
+
changeEvent(val);
|
|
286873
|
+
}
|
|
286874
|
+
});
|
|
286875
|
+
provide(checkboxGroupContextKey, {
|
|
286876
|
+
...pick(toRefs(props), [
|
|
286877
|
+
"size",
|
|
286878
|
+
"min",
|
|
286879
|
+
"max",
|
|
286880
|
+
"disabled",
|
|
286881
|
+
"validateEvent",
|
|
286882
|
+
"fill",
|
|
286883
|
+
"textColor"
|
|
286884
|
+
]),
|
|
286885
|
+
modelValue,
|
|
286886
|
+
changeEvent
|
|
286887
|
+
});
|
|
286888
|
+
watch(() => props.modelValue, () => {
|
|
286889
|
+
if (props.validateEvent) {
|
|
286890
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
286891
|
+
}
|
|
286892
|
+
});
|
|
286893
|
+
return (_ctx, _cache2) => {
|
|
286894
|
+
var _a2;
|
|
286895
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
286896
|
+
id: unref(groupId),
|
|
286897
|
+
class: normalizeClass(unref(ns).b("group")),
|
|
286898
|
+
role: "group",
|
|
286899
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
|
|
286900
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? (_a2 = unref(formItem)) == null ? void 0 : _a2.labelId : void 0
|
|
286901
|
+
}, {
|
|
286902
|
+
default: withCtx(() => [
|
|
286903
|
+
renderSlot(_ctx.$slots, "default")
|
|
286904
|
+
]),
|
|
286905
|
+
_: 3
|
|
286906
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
286907
|
+
};
|
|
286908
|
+
}
|
|
286909
|
+
});
|
|
286910
|
+
var CheckboxGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["__file", "checkbox-group.vue"]]);
|
|
286911
|
+
const ElCheckbox = withInstall(Checkbox, {
|
|
286912
|
+
CheckboxButton,
|
|
286913
|
+
CheckboxGroup
|
|
286914
|
+
});
|
|
286915
|
+
withNoopInstall(CheckboxButton);
|
|
286916
|
+
const ElCheckboxGroup = withNoopInstall(CheckboxGroup);
|
|
286273
286917
|
const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
286274
286918
|
const tagProps = buildProps({
|
|
286275
286919
|
type: {
|
|
@@ -286299,7 +286943,7 @@ const tagEmits = {
|
|
|
286299
286943
|
const __default__$d = defineComponent({
|
|
286300
286944
|
name: "ElTag"
|
|
286301
286945
|
});
|
|
286302
|
-
const _sfc_main$
|
|
286946
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
286303
286947
|
...__default__$d,
|
|
286304
286948
|
props: tagProps,
|
|
286305
286949
|
emits: tagEmits,
|
|
@@ -286387,7 +287031,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
286387
287031
|
};
|
|
286388
287032
|
}
|
|
286389
287033
|
});
|
|
286390
|
-
var Tag = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
287034
|
+
var Tag = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__file", "tag.vue"]]);
|
|
286391
287035
|
const ElTag = withInstall(Tag);
|
|
286392
287036
|
const nodeList = /* @__PURE__ */ new Map();
|
|
286393
287037
|
if (isClient) {
|
|
@@ -286662,7 +287306,7 @@ const COMPONENT_NAME$3 = "ElColorAlphaSlider";
|
|
|
286662
287306
|
const __default__$c = defineComponent({
|
|
286663
287307
|
name: COMPONENT_NAME$3
|
|
286664
287308
|
});
|
|
286665
|
-
const _sfc_main$
|
|
287309
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
286666
287310
|
...__default__$c,
|
|
286667
287311
|
props: alphaSliderProps,
|
|
286668
287312
|
setup(__props, { expose }) {
|
|
@@ -286715,8 +287359,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
286715
287359
|
};
|
|
286716
287360
|
}
|
|
286717
287361
|
});
|
|
286718
|
-
var AlphaSlider = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
286719
|
-
const _sfc_main$
|
|
287362
|
+
var AlphaSlider = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["__file", "alpha-slider.vue"]]);
|
|
287363
|
+
const _sfc_main$r = defineComponent({
|
|
286720
287364
|
name: "ElColorHueSlider",
|
|
286721
287365
|
props: {
|
|
286722
287366
|
color: {
|
|
@@ -286817,7 +287461,7 @@ const _sfc_main$k = defineComponent({
|
|
|
286817
287461
|
};
|
|
286818
287462
|
}
|
|
286819
287463
|
});
|
|
286820
|
-
function _sfc_render$
|
|
287464
|
+
function _sfc_render$f(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
286821
287465
|
return openBlock(), createElementBlock("div", {
|
|
286822
287466
|
class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("vertical", _ctx.vertical)])
|
|
286823
287467
|
}, [
|
|
@@ -286836,7 +287480,7 @@ function _sfc_render$8(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
286836
287480
|
}, null, 6)
|
|
286837
287481
|
], 2);
|
|
286838
287482
|
}
|
|
286839
|
-
var HueSlider = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
287483
|
+
var HueSlider = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["render", _sfc_render$f], ["__file", "hue-slider.vue"]]);
|
|
286840
287484
|
const colorPickerProps = buildProps({
|
|
286841
287485
|
modelValue: String,
|
|
286842
287486
|
id: String,
|
|
@@ -287153,7 +287797,7 @@ let Color$1 = class Color2 {
|
|
|
287153
287797
|
}
|
|
287154
287798
|
}
|
|
287155
287799
|
};
|
|
287156
|
-
const _sfc_main$
|
|
287800
|
+
const _sfc_main$q = defineComponent({
|
|
287157
287801
|
props: {
|
|
287158
287802
|
colors: {
|
|
287159
287803
|
type: Array,
|
|
@@ -287202,7 +287846,7 @@ const _sfc_main$j = defineComponent({
|
|
|
287202
287846
|
};
|
|
287203
287847
|
}
|
|
287204
287848
|
});
|
|
287205
|
-
function _sfc_render$
|
|
287849
|
+
function _sfc_render$e(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
287206
287850
|
return openBlock(), createElementBlock("div", {
|
|
287207
287851
|
class: normalizeClass(_ctx.ns.b())
|
|
287208
287852
|
}, [
|
|
@@ -287227,8 +287871,8 @@ function _sfc_render$7(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
287227
287871
|
], 2)
|
|
287228
287872
|
], 2);
|
|
287229
287873
|
}
|
|
287230
|
-
var Predefine = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
287231
|
-
const _sfc_main$
|
|
287874
|
+
var Predefine = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render$e], ["__file", "predefine.vue"]]);
|
|
287875
|
+
const _sfc_main$p = defineComponent({
|
|
287232
287876
|
name: "ElSlPanel",
|
|
287233
287877
|
props: {
|
|
287234
287878
|
color: {
|
|
@@ -287298,7 +287942,7 @@ const _sfc_main$i = defineComponent({
|
|
|
287298
287942
|
};
|
|
287299
287943
|
}
|
|
287300
287944
|
});
|
|
287301
|
-
function _sfc_render$
|
|
287945
|
+
function _sfc_render$d(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
287302
287946
|
return openBlock(), createElementBlock("div", {
|
|
287303
287947
|
class: normalizeClass(_ctx.ns.b()),
|
|
287304
287948
|
style: normalizeStyle({
|
|
@@ -287322,11 +287966,11 @@ function _sfc_render$6(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
287322
287966
|
], 6)
|
|
287323
287967
|
], 6);
|
|
287324
287968
|
}
|
|
287325
|
-
var SvPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
287969
|
+
var SvPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["render", _sfc_render$d], ["__file", "sv-panel.vue"]]);
|
|
287326
287970
|
const __default__$b = defineComponent({
|
|
287327
287971
|
name: "ElColorPicker"
|
|
287328
287972
|
});
|
|
287329
|
-
const _sfc_main$
|
|
287973
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
287330
287974
|
...__default__$b,
|
|
287331
287975
|
props: colorPickerProps,
|
|
287332
287976
|
emits: colorPickerEmits,
|
|
@@ -287701,7 +288345,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
287701
288345
|
};
|
|
287702
288346
|
}
|
|
287703
288347
|
});
|
|
287704
|
-
var ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
288348
|
+
var ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["__file", "color-picker.vue"]]);
|
|
287705
288349
|
const ElColorPicker = withInstall(ColorPicker);
|
|
287706
288350
|
const configProviderProps = buildProps({
|
|
287707
288351
|
a11y: {
|
|
@@ -287798,7 +288442,7 @@ const dividerProps = buildProps({
|
|
|
287798
288442
|
const __default__$a = defineComponent({
|
|
287799
288443
|
name: "ElDivider"
|
|
287800
288444
|
});
|
|
287801
|
-
const _sfc_main$
|
|
288445
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
287802
288446
|
...__default__$a,
|
|
287803
288447
|
props: dividerProps,
|
|
287804
288448
|
setup(__props) {
|
|
@@ -287825,12 +288469,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
287825
288469
|
};
|
|
287826
288470
|
}
|
|
287827
288471
|
});
|
|
287828
|
-
var Divider = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
288472
|
+
var Divider = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__file", "divider.vue"]]);
|
|
287829
288473
|
const ElDivider = withInstall(Divider);
|
|
287830
288474
|
const __default__$9 = defineComponent({
|
|
287831
288475
|
name: "ImgEmpty"
|
|
287832
288476
|
});
|
|
287833
|
-
const _sfc_main$
|
|
288477
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
287834
288478
|
...__default__$9,
|
|
287835
288479
|
setup(__props) {
|
|
287836
288480
|
const ns = useNamespace("empty");
|
|
@@ -287979,7 +288623,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
287979
288623
|
};
|
|
287980
288624
|
}
|
|
287981
288625
|
});
|
|
287982
|
-
var ImgEmpty = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
288626
|
+
var ImgEmpty = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["__file", "img-empty.vue"]]);
|
|
287983
288627
|
const emptyProps = buildProps({
|
|
287984
288628
|
image: {
|
|
287985
288629
|
type: String,
|
|
@@ -287994,7 +288638,7 @@ const emptyProps = buildProps({
|
|
|
287994
288638
|
const __default__$8 = defineComponent({
|
|
287995
288639
|
name: "ElEmpty"
|
|
287996
288640
|
});
|
|
287997
|
-
const _sfc_main$
|
|
288641
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
287998
288642
|
...__default__$8,
|
|
287999
288643
|
props: emptyProps,
|
|
288000
288644
|
setup(__props) {
|
|
@@ -288036,7 +288680,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
288036
288680
|
};
|
|
288037
288681
|
}
|
|
288038
288682
|
});
|
|
288039
|
-
var Empty = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
288683
|
+
var Empty = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["__file", "empty.vue"]]);
|
|
288040
288684
|
const ElEmpty = withInstall(Empty);
|
|
288041
288685
|
const inputNumberProps = buildProps({
|
|
288042
288686
|
id: {
|
|
@@ -288096,7 +288740,7 @@ const inputNumberEmits = {
|
|
|
288096
288740
|
const __default__$7 = defineComponent({
|
|
288097
288741
|
name: "ElInputNumber"
|
|
288098
288742
|
});
|
|
288099
|
-
const _sfc_main$
|
|
288743
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
288100
288744
|
...__default__$7,
|
|
288101
288745
|
props: inputNumberProps,
|
|
288102
288746
|
emits: inputNumberEmits,
|
|
@@ -288425,7 +289069,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
288425
289069
|
};
|
|
288426
289070
|
}
|
|
288427
289071
|
});
|
|
288428
|
-
var InputNumber = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
289072
|
+
var InputNumber = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__file", "input-number.vue"]]);
|
|
288429
289073
|
const ElInputNumber = withInstall(InputNumber);
|
|
288430
289074
|
function useCalcInputWidth() {
|
|
288431
289075
|
const calculatorRef = shallowRef();
|
|
@@ -288521,7 +289165,7 @@ function useOption(props, states) {
|
|
|
288521
289165
|
updateOption
|
|
288522
289166
|
};
|
|
288523
289167
|
}
|
|
288524
|
-
const _sfc_main$
|
|
289168
|
+
const _sfc_main$j = defineComponent({
|
|
288525
289169
|
name: "ElOption",
|
|
288526
289170
|
componentName: "ElOption",
|
|
288527
289171
|
props: {
|
|
@@ -288594,7 +289238,7 @@ const _sfc_main$c = defineComponent({
|
|
|
288594
289238
|
};
|
|
288595
289239
|
}
|
|
288596
289240
|
});
|
|
288597
|
-
function _sfc_render$
|
|
289241
|
+
function _sfc_render$c(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
288598
289242
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
288599
289243
|
id: _ctx.id,
|
|
288600
289244
|
class: normalizeClass(_ctx.containerKls),
|
|
@@ -288611,8 +289255,8 @@ function _sfc_render$5(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
288611
289255
|
[vShow, _ctx.visible]
|
|
288612
289256
|
]);
|
|
288613
289257
|
}
|
|
288614
|
-
var Option = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
288615
|
-
const _sfc_main$
|
|
289258
|
+
var Option = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$c], ["__file", "option.vue"]]);
|
|
289259
|
+
const _sfc_main$i = defineComponent({
|
|
288616
289260
|
name: "ElSelectDropdown",
|
|
288617
289261
|
componentName: "ElSelectDropdown",
|
|
288618
289262
|
setup() {
|
|
@@ -288639,7 +289283,7 @@ const _sfc_main$b = defineComponent({
|
|
|
288639
289283
|
};
|
|
288640
289284
|
}
|
|
288641
289285
|
});
|
|
288642
|
-
function _sfc_render$
|
|
289286
|
+
function _sfc_render$b(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
288643
289287
|
return openBlock(), createElementBlock("div", {
|
|
288644
289288
|
class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
|
|
288645
289289
|
style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
|
|
@@ -288659,7 +289303,7 @@ function _sfc_render$4(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
288659
289303
|
], 2)) : createCommentVNode("v-if", true)
|
|
288660
289304
|
], 6);
|
|
288661
289305
|
}
|
|
288662
|
-
var ElSelectMenu = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
289306
|
+
var ElSelectMenu = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$b], ["__file", "select-dropdown.vue"]]);
|
|
288663
289307
|
const useSelect = (props, emit) => {
|
|
288664
289308
|
const { t } = useLocale();
|
|
288665
289309
|
const contentId = useId();
|
|
@@ -289421,7 +290065,7 @@ const SelectProps = buildProps({
|
|
|
289421
290065
|
...useAriaProps(["ariaLabel"])
|
|
289422
290066
|
});
|
|
289423
290067
|
const COMPONENT_NAME$2 = "ElSelect";
|
|
289424
|
-
const _sfc_main$
|
|
290068
|
+
const _sfc_main$h = defineComponent({
|
|
289425
290069
|
name: COMPONENT_NAME$2,
|
|
289426
290070
|
componentName: COMPONENT_NAME$2,
|
|
289427
290071
|
components: {
|
|
@@ -289484,7 +290128,7 @@ const _sfc_main$a = defineComponent({
|
|
|
289484
290128
|
};
|
|
289485
290129
|
}
|
|
289486
290130
|
});
|
|
289487
|
-
function _sfc_render$
|
|
290131
|
+
function _sfc_render$a(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
289488
290132
|
const _component_el_tag = resolveComponent("el-tag");
|
|
289489
290133
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
289490
290134
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -289831,8 +290475,8 @@ function _sfc_render$3(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
289831
290475
|
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
289832
290476
|
]);
|
|
289833
290477
|
}
|
|
289834
|
-
var Select = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
289835
|
-
const _sfc_main$
|
|
290478
|
+
var Select = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$a], ["__file", "select.vue"]]);
|
|
290479
|
+
const _sfc_main$g = defineComponent({
|
|
289836
290480
|
name: "ElOptionGroup",
|
|
289837
290481
|
componentName: "ElOptionGroup",
|
|
289838
290482
|
props: {
|
|
@@ -289885,7 +290529,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
289885
290529
|
};
|
|
289886
290530
|
}
|
|
289887
290531
|
});
|
|
289888
|
-
function _sfc_render$
|
|
290532
|
+
function _sfc_render$9(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
289889
290533
|
return withDirectives((openBlock(), createElementBlock("ul", {
|
|
289890
290534
|
ref: "groupRef",
|
|
289891
290535
|
class: normalizeClass(_ctx.ns.be("group", "wrap"))
|
|
@@ -289904,7 +290548,7 @@ function _sfc_render$2(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
289904
290548
|
[vShow, _ctx.visible]
|
|
289905
290549
|
]);
|
|
289906
290550
|
}
|
|
289907
|
-
var OptionGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
290551
|
+
var OptionGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["render", _sfc_render$9], ["__file", "option-group.vue"]]);
|
|
289908
290552
|
const ElSelect = withInstall(Select, {
|
|
289909
290553
|
Option,
|
|
289910
290554
|
OptionGroup
|
|
@@ -289967,7 +290611,7 @@ const progressProps = buildProps({
|
|
|
289967
290611
|
const __default__$6 = defineComponent({
|
|
289968
290612
|
name: "ElProgress"
|
|
289969
290613
|
});
|
|
289970
|
-
const _sfc_main$
|
|
290614
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
289971
290615
|
...__default__$6,
|
|
289972
290616
|
props: progressProps,
|
|
289973
290617
|
setup(__props) {
|
|
@@ -290164,7 +290808,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
290164
290808
|
};
|
|
290165
290809
|
}
|
|
290166
290810
|
});
|
|
290167
|
-
var Progress = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
290811
|
+
var Progress = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__file", "progress.vue"]]);
|
|
290168
290812
|
const ElProgress = withInstall(Progress);
|
|
290169
290813
|
const isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
|
|
290170
290814
|
const switchProps = buildProps({
|
|
@@ -290237,7 +290881,7 @@ const COMPONENT_NAME$1 = "ElSwitch";
|
|
|
290237
290881
|
const __default__$5 = defineComponent({
|
|
290238
290882
|
name: COMPONENT_NAME$1
|
|
290239
290883
|
});
|
|
290240
|
-
const _sfc_main$
|
|
290884
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
290241
290885
|
...__default__$5,
|
|
290242
290886
|
props: switchProps,
|
|
290243
290887
|
emits: switchEmits,
|
|
@@ -290448,7 +291092,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
290448
291092
|
};
|
|
290449
291093
|
}
|
|
290450
291094
|
});
|
|
290451
|
-
var Switch = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
291095
|
+
var Switch = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__file", "switch.vue"]]);
|
|
290452
291096
|
const ElSwitch = withInstall(Switch);
|
|
290453
291097
|
const uploadContextKey = Symbol("uploadContextKey");
|
|
290454
291098
|
const SCOPE$1 = "ElUpload";
|
|
@@ -290654,7 +291298,7 @@ const uploadListEmits = {
|
|
|
290654
291298
|
const __default__$4 = defineComponent({
|
|
290655
291299
|
name: "ElUploadList"
|
|
290656
291300
|
});
|
|
290657
|
-
const _sfc_main$
|
|
291301
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
290658
291302
|
...__default__$4,
|
|
290659
291303
|
props: uploadListProps,
|
|
290660
291304
|
emits: uploadListEmits,
|
|
@@ -290815,7 +291459,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
290815
291459
|
};
|
|
290816
291460
|
}
|
|
290817
291461
|
});
|
|
290818
|
-
var UploadList = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
291462
|
+
var UploadList = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "upload-list.vue"]]);
|
|
290819
291463
|
const uploadDraggerProps = buildProps({
|
|
290820
291464
|
disabled: {
|
|
290821
291465
|
type: Boolean,
|
|
@@ -290829,7 +291473,7 @@ const COMPONENT_NAME = "ElUploadDrag";
|
|
|
290829
291473
|
const __default__$3 = defineComponent({
|
|
290830
291474
|
name: COMPONENT_NAME
|
|
290831
291475
|
});
|
|
290832
|
-
const _sfc_main$
|
|
291476
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
290833
291477
|
...__default__$3,
|
|
290834
291478
|
props: uploadDraggerProps,
|
|
290835
291479
|
emits: uploadDraggerEmits,
|
|
@@ -290865,7 +291509,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
290865
291509
|
};
|
|
290866
291510
|
}
|
|
290867
291511
|
});
|
|
290868
|
-
var UploadDragger = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
291512
|
+
var UploadDragger = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "upload-dragger.vue"]]);
|
|
290869
291513
|
const uploadContentProps = buildProps({
|
|
290870
291514
|
...uploadBaseProps,
|
|
290871
291515
|
beforeUpload: {
|
|
@@ -290901,7 +291545,7 @@ const __default__$2 = defineComponent({
|
|
|
290901
291545
|
name: "ElUploadContent",
|
|
290902
291546
|
inheritAttrs: false
|
|
290903
291547
|
});
|
|
290904
|
-
const _sfc_main$
|
|
291548
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
290905
291549
|
...__default__$2,
|
|
290906
291550
|
props: uploadContentProps,
|
|
290907
291551
|
setup(__props, { expose }) {
|
|
@@ -291083,7 +291727,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
291083
291727
|
};
|
|
291084
291728
|
}
|
|
291085
291729
|
});
|
|
291086
|
-
var UploadContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
291730
|
+
var UploadContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "upload-content.vue"]]);
|
|
291087
291731
|
const SCOPE = "ElUpload";
|
|
291088
291732
|
const revokeFileObjectURL = (file) => {
|
|
291089
291733
|
var _a2;
|
|
@@ -291215,7 +291859,7 @@ const useHandlers = (props, uploadRef) => {
|
|
|
291215
291859
|
const __default__$1 = defineComponent({
|
|
291216
291860
|
name: "ElUpload"
|
|
291217
291861
|
});
|
|
291218
|
-
const _sfc_main$
|
|
291862
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
291219
291863
|
...__default__$1,
|
|
291220
291864
|
props: uploadProps,
|
|
291221
291865
|
setup(__props, { expose }) {
|
|
@@ -291330,7 +291974,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
291330
291974
|
};
|
|
291331
291975
|
}
|
|
291332
291976
|
});
|
|
291333
|
-
var Upload = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
291977
|
+
var Upload = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "upload.vue"]]);
|
|
291334
291978
|
const ElUpload = withInstall(Upload);
|
|
291335
291979
|
function createLoadingComponent(options) {
|
|
291336
291980
|
let afterLeaveTimer;
|
|
@@ -291722,7 +292366,7 @@ const getOffsetOrSpace = (id, offset) => {
|
|
|
291722
292366
|
const __default__ = defineComponent({
|
|
291723
292367
|
name: "ElMessage"
|
|
291724
292368
|
});
|
|
291725
|
-
const _sfc_main$
|
|
292369
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
291726
292370
|
...__default__,
|
|
291727
292371
|
props: messageProps,
|
|
291728
292372
|
emits: messageEmits,
|
|
@@ -291855,7 +292499,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
291855
292499
|
};
|
|
291856
292500
|
}
|
|
291857
292501
|
});
|
|
291858
|
-
var MessageConstructor = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
292502
|
+
var MessageConstructor = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "message.vue"]]);
|
|
291859
292503
|
let seed = 1;
|
|
291860
292504
|
const normalizeOptions = (params2) => {
|
|
291861
292505
|
const options = !params2 || isString$2(params2) || isVNode(params2) || isFunction$3(params2) ? { message: params2 } : params2;
|
|
@@ -339851,6 +340495,13 @@ function getThreeGropObjectJsonPolygon(positions) {
|
|
|
339851
340495
|
animate();
|
|
339852
340496
|
return returnPromise;
|
|
339853
340497
|
}
|
|
340498
|
+
function calculateDistenceXYZ(vertices) {
|
|
340499
|
+
let totalLength = 0;
|
|
340500
|
+
for (let i = 0; i < vertices.length - 1; i++) {
|
|
340501
|
+
totalLength += Cartesian3.distance(vertices[i], vertices[i + 1]);
|
|
340502
|
+
}
|
|
340503
|
+
return totalLength;
|
|
340504
|
+
}
|
|
339854
340505
|
function calculateCentroidXYZ(vertices) {
|
|
339855
340506
|
const n = vertices.length;
|
|
339856
340507
|
let sumX = 0, sumY = 0, sumZ = 0, totalArea = 0;
|
|
@@ -339965,6 +340616,12 @@ function excavationAndfillinganalysis(planePositions, terrainPositions, sampling
|
|
|
339965
340616
|
excavationLinePositions
|
|
339966
340617
|
};
|
|
339967
340618
|
}
|
|
340619
|
+
function calculateAreaXYZ(vertices) {
|
|
340620
|
+
vertices.push(vertices[0]);
|
|
340621
|
+
let coordPositions = cartesianToDegrees(vertices);
|
|
340622
|
+
var polygonFeatures = polygon([coordPositions]);
|
|
340623
|
+
return area$1(polygonFeatures);
|
|
340624
|
+
}
|
|
339968
340625
|
class PrimitiveRotation {
|
|
339969
340626
|
constructor(viewer, privateObj, center2, fun) {
|
|
339970
340627
|
this.primitiveGeometry = null;
|
|
@@ -349584,7 +350241,7 @@ class Tooltip {
|
|
|
349584
350241
|
this.tooltip.style.display = "none";
|
|
349585
350242
|
}
|
|
349586
350243
|
}
|
|
349587
|
-
destroy() {
|
|
350244
|
+
destroy(_canvas2) {
|
|
349588
350245
|
if (this.handler) {
|
|
349589
350246
|
this.handler.destroy();
|
|
349590
350247
|
}
|
|
@@ -357587,7 +358244,7 @@ function unifiedheight(positions, height) {
|
|
|
357587
358244
|
});
|
|
357588
358245
|
return newPosition;
|
|
357589
358246
|
}
|
|
357590
|
-
const _sfc_main$
|
|
358247
|
+
const _sfc_main$8 = {
|
|
357591
358248
|
name: "ToolWellSiteSelection",
|
|
357592
358249
|
components: {
|
|
357593
358250
|
CircleClose: circle_close_default,
|
|
@@ -358033,6 +358690,12 @@ const _sfc_main$1 = {
|
|
|
358033
358690
|
removeAllAction();
|
|
358034
358691
|
resetAnalysis();
|
|
358035
358692
|
}
|
|
358693
|
+
function close() {
|
|
358694
|
+
reset();
|
|
358695
|
+
resetAnalysis();
|
|
358696
|
+
removeAllAction();
|
|
358697
|
+
ctx.emit("close", "WellSiteSelection");
|
|
358698
|
+
}
|
|
358036
358699
|
return {
|
|
358037
358700
|
loadWellSiteShp,
|
|
358038
358701
|
polygonShpObject,
|
|
@@ -358052,7 +358715,8 @@ const _sfc_main$1 = {
|
|
|
358052
358715
|
exportShp,
|
|
358053
358716
|
reset,
|
|
358054
358717
|
polygonHeight,
|
|
358055
|
-
changePositionsHeight
|
|
358718
|
+
changePositionsHeight,
|
|
358719
|
+
close
|
|
358056
358720
|
};
|
|
358057
358721
|
}
|
|
358058
358722
|
};
|
|
@@ -358065,24 +358729,25 @@ const _export_sfc = (sfc, props) => {
|
|
|
358065
358729
|
}
|
|
358066
358730
|
return target;
|
|
358067
358731
|
};
|
|
358068
|
-
const _hoisted_1$
|
|
358069
|
-
const _hoisted_2$
|
|
358070
|
-
const _hoisted_3$
|
|
358071
|
-
const _hoisted_4$
|
|
358072
|
-
const _hoisted_5$
|
|
358073
|
-
const _hoisted_6$1 = { class: "
|
|
358074
|
-
const _hoisted_7$1 = { class: "
|
|
358075
|
-
const _hoisted_8$1 = { class: "
|
|
358076
|
-
const _hoisted_9 = { class: "
|
|
358077
|
-
const _hoisted_10 = { class: "
|
|
358732
|
+
const _hoisted_1$8 = ["visible"];
|
|
358733
|
+
const _hoisted_2$8 = { class: "header" };
|
|
358734
|
+
const _hoisted_3$8 = { class: "container" };
|
|
358735
|
+
const _hoisted_4$7 = { class: "moveingSection" };
|
|
358736
|
+
const _hoisted_5$7 = { class: "load3DTiles" };
|
|
358737
|
+
const _hoisted_6$1 = { class: "importShp" };
|
|
358738
|
+
const _hoisted_7$1 = { class: "fileNameContainer" };
|
|
358739
|
+
const _hoisted_8$1 = { class: "polygonPosition" };
|
|
358740
|
+
const _hoisted_9 = { class: "samplingInterval" };
|
|
358741
|
+
const _hoisted_10 = { class: "sildloop" };
|
|
358078
358742
|
const _hoisted_11 = { class: "infoBox" };
|
|
358079
358743
|
const _hoisted_12 = { class: "infoBox" };
|
|
358080
|
-
const _hoisted_13 = { class: "
|
|
358744
|
+
const _hoisted_13 = { class: "infoBox" };
|
|
358081
358745
|
const _hoisted_14 = { class: "buttonDiv" };
|
|
358082
|
-
const _hoisted_15 = { class: "
|
|
358746
|
+
const _hoisted_15 = { class: "buttonDiv" };
|
|
358083
358747
|
const _hoisted_16 = { class: "colorPicke" };
|
|
358084
|
-
const _hoisted_17 = { class: "
|
|
358085
|
-
|
|
358748
|
+
const _hoisted_17 = { class: "colorPicke" };
|
|
358749
|
+
const _hoisted_18 = { class: "showLine" };
|
|
358750
|
+
function _sfc_render$8(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
358086
358751
|
const _component_CircleClose = resolveComponent("CircleClose");
|
|
358087
358752
|
const _component_ElButton = resolveComponent("ElButton");
|
|
358088
358753
|
const _component_ElInput = resolveComponent("ElInput");
|
|
@@ -358093,14 +358758,18 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358093
358758
|
const _component_el_switch = resolveComponent("el-switch");
|
|
358094
358759
|
return openBlock(), createElementBlock("div", {
|
|
358095
358760
|
class: "component-ui",
|
|
358096
|
-
style: normalizeStyle(_ctx.$props.style)
|
|
358761
|
+
style: normalizeStyle(_ctx.$props.style),
|
|
358762
|
+
visible: _ctx.$props.visible
|
|
358097
358763
|
}, [
|
|
358098
|
-
createElementVNode("div",
|
|
358764
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
358099
358765
|
_cache2[12] || (_cache2[12] = createElementVNode("span", null, "井场选址", -1)),
|
|
358100
|
-
createVNode(_component_CircleClose, {
|
|
358766
|
+
createVNode(_component_CircleClose, {
|
|
358767
|
+
class: "clostBth",
|
|
358768
|
+
onClick: $setup.close
|
|
358769
|
+
}, null, 8, ["onClick"])
|
|
358101
358770
|
]),
|
|
358102
|
-
createElementVNode("div",
|
|
358103
|
-
createElementVNode("div",
|
|
358771
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
358772
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
358104
358773
|
createElementVNode("section", {
|
|
358105
358774
|
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.transformAction())
|
|
358106
358775
|
}, _cache2[13] || (_cache2[13] = [
|
|
@@ -358127,7 +358796,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358127
358796
|
}, 8, ["onClick"])
|
|
358128
358797
|
])
|
|
358129
358798
|
]),
|
|
358130
|
-
createElementVNode("div",
|
|
358799
|
+
createElementVNode("div", _hoisted_5$7, [
|
|
358131
358800
|
_cache2[17] || (_cache2[17] = createElementVNode("span", null, "导入3Dtilest:", -1)),
|
|
358132
358801
|
createVNode(_component_ElInput, {
|
|
358133
358802
|
class: "modelUrl",
|
|
@@ -358148,9 +358817,9 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358148
358817
|
}, 8, ["onClick"])
|
|
358149
358818
|
])
|
|
358150
358819
|
]),
|
|
358151
|
-
createElementVNode("div",
|
|
358820
|
+
createElementVNode("div", _hoisted_6$1, [
|
|
358152
358821
|
_cache2[19] || (_cache2[19] = createElementVNode("span", null, "导入井场范围(shp):", -1)),
|
|
358153
|
-
createElementVNode("div",
|
|
358822
|
+
createElementVNode("div", _hoisted_7$1, toDisplayString($setup.polygonShpObject.fileName), 1),
|
|
358154
358823
|
createVNode(_component_el_upload, {
|
|
358155
358824
|
ref: "uploadRef",
|
|
358156
358825
|
multiple: false,
|
|
@@ -358171,7 +358840,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358171
358840
|
_: 1
|
|
358172
358841
|
}, 8, ["on-change"])
|
|
358173
358842
|
]),
|
|
358174
|
-
createElementVNode("div",
|
|
358843
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
358175
358844
|
_cache2[21] || (_cache2[21] = createElementVNode("span", null, "井口坐标:", -1)),
|
|
358176
358845
|
createElementVNode("div", null, [
|
|
358177
358846
|
createVNode(_component_ElInput, {
|
|
@@ -358192,7 +358861,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358192
358861
|
}, 8, ["onClick"])
|
|
358193
358862
|
])
|
|
358194
358863
|
]),
|
|
358195
|
-
createElementVNode("div",
|
|
358864
|
+
createElementVNode("div", _hoisted_9, [
|
|
358196
358865
|
_cache2[22] || (_cache2[22] = createElementVNode("span", null, "高度:", -1)),
|
|
358197
358866
|
createVNode(_component_el_input_number, {
|
|
358198
358867
|
class: "numberInput",
|
|
@@ -358201,7 +358870,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358201
358870
|
onChange: $setup.changePositionsHeight
|
|
358202
358871
|
}, null, 8, ["modelValue", "onChange"])
|
|
358203
358872
|
]),
|
|
358204
|
-
createElementVNode("div",
|
|
358873
|
+
createElementVNode("div", _hoisted_10, [
|
|
358205
358874
|
createElementVNode("div", null, [
|
|
358206
358875
|
createVNode(_component_ElButton, { onClick: $setup.resetSidloop }, {
|
|
358207
358876
|
default: withCtx(() => _cache2[23] || (_cache2[23] = [
|
|
@@ -358219,7 +358888,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358219
358888
|
}, 8, ["onClick"])
|
|
358220
358889
|
])
|
|
358221
358890
|
]),
|
|
358222
|
-
createElementVNode("div",
|
|
358891
|
+
createElementVNode("div", _hoisted_11, [
|
|
358223
358892
|
createElementVNode("section", null, [
|
|
358224
358893
|
_cache2[25] || (_cache2[25] = createElementVNode("span", null, "边坡填方量:", -1)),
|
|
358225
358894
|
createElementVNode("div", null, toDisplayString($setup.quantitative.sidloopFillNumber.toFixed(5)) + "m³", 1)
|
|
@@ -358229,7 +358898,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358229
358898
|
createElementVNode("div", null, toDisplayString($setup.quantitative.sidloopExcavationNumber.toFixed(5)) + "m³", 1)
|
|
358230
358899
|
])
|
|
358231
358900
|
]),
|
|
358232
|
-
createElementVNode("div",
|
|
358901
|
+
createElementVNode("div", _hoisted_12, [
|
|
358233
358902
|
createElementVNode("section", null, [
|
|
358234
358903
|
_cache2[27] || (_cache2[27] = createElementVNode("span", null, "井场填方量:", -1)),
|
|
358235
358904
|
createElementVNode("div", null, toDisplayString($setup.quantitative.wellSiteFillNumber.toFixed(5)) + "m³", 1)
|
|
@@ -358239,7 +358908,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358239
358908
|
createElementVNode("div", null, toDisplayString($setup.quantitative.wellSiteExcavationNumber.toFixed(5)) + "m³", 1)
|
|
358240
358909
|
])
|
|
358241
358910
|
]),
|
|
358242
|
-
createElementVNode("div",
|
|
358911
|
+
createElementVNode("div", _hoisted_13, [
|
|
358243
358912
|
createElementVNode("section", null, [
|
|
358244
358913
|
_cache2[29] || (_cache2[29] = createElementVNode("span", null, "总填方量:", -1)),
|
|
358245
358914
|
createElementVNode("div", null, toDisplayString($setup.quantitative.fillNumber) + "m³", 1)
|
|
@@ -358249,7 +358918,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358249
358918
|
createElementVNode("div", null, toDisplayString($setup.quantitative.excavationNumber) + "m³", 1)
|
|
358250
358919
|
])
|
|
358251
358920
|
]),
|
|
358252
|
-
createElementVNode("div",
|
|
358921
|
+
createElementVNode("div", _hoisted_14, [
|
|
358253
358922
|
createVNode(_component_ElButton, {
|
|
358254
358923
|
onClick: _cache2[5] || (_cache2[5] = ($event) => $setup.cutFillAnalysisAction("jc"))
|
|
358255
358924
|
}, {
|
|
@@ -358269,7 +358938,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358269
358938
|
__: [32]
|
|
358270
358939
|
})
|
|
358271
358940
|
]),
|
|
358272
|
-
createElementVNode("div",
|
|
358941
|
+
createElementVNode("div", _hoisted_15, [
|
|
358273
358942
|
createVNode(_component_ElButton, {
|
|
358274
358943
|
onClick: _cache2[7] || (_cache2[7] = ($event) => $setup.exportShp("jc"))
|
|
358275
358944
|
}, {
|
|
@@ -358289,7 +358958,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358289
358958
|
__: [34]
|
|
358290
358959
|
})
|
|
358291
358960
|
]),
|
|
358292
|
-
createElementVNode("section",
|
|
358961
|
+
createElementVNode("section", _hoisted_16, [
|
|
358293
358962
|
_cache2[35] || (_cache2[35] = createElementVNode("span", null, "填方线颜色:", -1)),
|
|
358294
358963
|
createVNode(_component_el_color_picker, {
|
|
358295
358964
|
"color-format": "rgb",
|
|
@@ -358297,7 +358966,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358297
358966
|
"onUpdate:modelValue": _cache2[9] || (_cache2[9] = ($event) => $setup.quantitative.fillLineColor = $event)
|
|
358298
358967
|
}, null, 8, ["modelValue"])
|
|
358299
358968
|
]),
|
|
358300
|
-
createElementVNode("section",
|
|
358969
|
+
createElementVNode("section", _hoisted_17, [
|
|
358301
358970
|
_cache2[36] || (_cache2[36] = createElementVNode("span", null, "挖方线颜色:", -1)),
|
|
358302
358971
|
createVNode(_component_el_color_picker, {
|
|
358303
358972
|
"color-format": "rgb",
|
|
@@ -358305,7 +358974,7 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358305
358974
|
"onUpdate:modelValue": _cache2[10] || (_cache2[10] = ($event) => $setup.quantitative.excavationLineColor = $event)
|
|
358306
358975
|
}, null, 8, ["modelValue"])
|
|
358307
358976
|
]),
|
|
358308
|
-
createElementVNode("section",
|
|
358977
|
+
createElementVNode("section", _hoisted_18, [
|
|
358309
358978
|
_cache2[37] || (_cache2[37] = createElementVNode("span", null, "线显隐:", -1)),
|
|
358310
358979
|
createElementVNode("div", null, [
|
|
358311
358980
|
createVNode(_component_el_switch, {
|
|
@@ -358319,11 +358988,11 @@ function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358319
358988
|
])
|
|
358320
358989
|
])
|
|
358321
358990
|
])
|
|
358322
|
-
],
|
|
358991
|
+
], 12, _hoisted_1$8);
|
|
358323
358992
|
}
|
|
358324
|
-
const Component$
|
|
358325
|
-
Component$
|
|
358326
|
-
app.component(Component$
|
|
358993
|
+
const Component$8 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-cca60a3d"]]);
|
|
358994
|
+
Component$8.install = (app) => {
|
|
358995
|
+
app.component(Component$8.name, Component$8);
|
|
358327
358996
|
};
|
|
358328
358997
|
const MATERIAL_TYPE = "CustomRadarWaveMaterial";
|
|
358329
358998
|
const SHADER_SOURCE = `
|
|
@@ -358517,7 +359186,7 @@ class TrackMatteq {
|
|
|
358517
359186
|
return positionArr;
|
|
358518
359187
|
}
|
|
358519
359188
|
}
|
|
358520
|
-
const _sfc_main = {
|
|
359189
|
+
const _sfc_main$7 = {
|
|
358521
359190
|
name: "SharedCampsite",
|
|
358522
359191
|
components: {
|
|
358523
359192
|
CircleClose: circle_close_default,
|
|
@@ -358734,14 +359403,14 @@ const _sfc_main = {
|
|
|
358734
359403
|
};
|
|
358735
359404
|
}
|
|
358736
359405
|
};
|
|
358737
|
-
const _hoisted_1 = { class: "header" };
|
|
358738
|
-
const _hoisted_2 = { class: "main-content" };
|
|
358739
|
-
const _hoisted_3 = { class: "form-item" };
|
|
358740
|
-
const _hoisted_4 = {
|
|
359406
|
+
const _hoisted_1$7 = { class: "header" };
|
|
359407
|
+
const _hoisted_2$7 = { class: "main-content" };
|
|
359408
|
+
const _hoisted_3$7 = { class: "form-item" };
|
|
359409
|
+
const _hoisted_4$6 = {
|
|
358741
359410
|
key: 0,
|
|
358742
359411
|
class: "form-item"
|
|
358743
359412
|
};
|
|
358744
|
-
const _hoisted_5 = {
|
|
359413
|
+
const _hoisted_5$6 = {
|
|
358745
359414
|
class: "form-item",
|
|
358746
359415
|
style: { "display": "flex", "gap": "10px" }
|
|
358747
359416
|
};
|
|
@@ -358754,7 +359423,7 @@ const _hoisted_8 = {
|
|
|
358754
359423
|
key: 1,
|
|
358755
359424
|
class: "empty-state"
|
|
358756
359425
|
};
|
|
358757
|
-
function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
359426
|
+
function _sfc_render$7(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
358758
359427
|
const _component_CircleClose = resolveComponent("CircleClose");
|
|
358759
359428
|
const _component_el_option = resolveComponent("el-option");
|
|
358760
359429
|
const _component_el_select = resolveComponent("el-select");
|
|
@@ -358768,15 +359437,15 @@ function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358768
359437
|
class: "component-ui",
|
|
358769
359438
|
style: normalizeStyle(_ctx.$props.style)
|
|
358770
359439
|
}, [
|
|
358771
|
-
createElementVNode("div", _hoisted_1, [
|
|
359440
|
+
createElementVNode("div", _hoisted_1$7, [
|
|
358772
359441
|
_cache2[2] || (_cache2[2] = createElementVNode("span", null, "共享营地", -1)),
|
|
358773
359442
|
createVNode(_component_CircleClose, {
|
|
358774
359443
|
class: "clostBth",
|
|
358775
359444
|
onClick: $setup.handleClose
|
|
358776
359445
|
}, null, 8, ["onClick"])
|
|
358777
359446
|
]),
|
|
358778
|
-
createElementVNode("div", _hoisted_2, [
|
|
358779
|
-
createElementVNode("div", _hoisted_3, [
|
|
359447
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
359448
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
358780
359449
|
createVNode(_component_el_select, {
|
|
358781
359450
|
modelValue: $setup.wellInfo,
|
|
358782
359451
|
"onUpdate:modelValue": _cache2[0] || (_cache2[0] = ($event) => $setup.wellInfo = $event),
|
|
@@ -358795,7 +359464,7 @@ function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358795
359464
|
_: 1
|
|
358796
359465
|
}, 8, ["modelValue", "onChange"])
|
|
358797
359466
|
]),
|
|
358798
|
-
$setup.wellInfo != "" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
359467
|
+
$setup.wellInfo != "" ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
358799
359468
|
createVNode(_component_el_input_number, {
|
|
358800
359469
|
modelValue: $setup.distance,
|
|
358801
359470
|
"onUpdate:modelValue": _cache2[1] || (_cache2[1] = ($event) => $setup.distance = $event),
|
|
@@ -358806,7 +359475,7 @@ function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358806
359475
|
}, null, 8, ["modelValue", "onChange"]),
|
|
358807
359476
|
_cache2[3] || (_cache2[3] = createElementVNode("span", { class: "suffix-dw" }, "公里", -1))
|
|
358808
359477
|
])) : createCommentVNode("", true),
|
|
358809
|
-
createElementVNode("div", _hoisted_5, [
|
|
359478
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
358810
359479
|
createVNode(_component_el_button, {
|
|
358811
359480
|
type: "primary",
|
|
358812
359481
|
plain: "",
|
|
@@ -358853,11 +359522,1623 @@ function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
|
358853
359522
|
])) : createCommentVNode("", true)
|
|
358854
359523
|
], 4)) : createCommentVNode("", true);
|
|
358855
359524
|
}
|
|
358856
|
-
const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a7c79e0c"]]);
|
|
359525
|
+
const Component$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-a7c79e0c"]]);
|
|
359526
|
+
Component$7.install = (app) => {
|
|
359527
|
+
app.component(Component$7.name, Component$7);
|
|
359528
|
+
};
|
|
359529
|
+
const _sfc_main$6 = {
|
|
359530
|
+
name: "ToolBar",
|
|
359531
|
+
props: {
|
|
359532
|
+
componentsOptions: {
|
|
359533
|
+
type: Array,
|
|
359534
|
+
default: []
|
|
359535
|
+
},
|
|
359536
|
+
earthView: {
|
|
359537
|
+
type: CesiumAlphaViewer,
|
|
359538
|
+
default: null
|
|
359539
|
+
}
|
|
359540
|
+
},
|
|
359541
|
+
setup(props, ctx) {
|
|
359542
|
+
let scrollInterval = null;
|
|
359543
|
+
let style = ref({});
|
|
359544
|
+
let currentComponent = ref();
|
|
359545
|
+
let componentsArray = ref(props.componentsOptions);
|
|
359546
|
+
let comProps = ref();
|
|
359547
|
+
componentsArray.value.forEach((com) => {
|
|
359548
|
+
com.visible = false;
|
|
359549
|
+
});
|
|
359550
|
+
function scrollLeft() {
|
|
359551
|
+
const dock = document.querySelector(".toolContent");
|
|
359552
|
+
if (dock) {
|
|
359553
|
+
scrollInterval = setInterval(() => {
|
|
359554
|
+
dock.scrollLeft -= 5;
|
|
359555
|
+
}, 10);
|
|
359556
|
+
}
|
|
359557
|
+
}
|
|
359558
|
+
function scrollRight() {
|
|
359559
|
+
const dock = document.querySelector(".toolContent");
|
|
359560
|
+
if (dock) {
|
|
359561
|
+
scrollInterval = setInterval(() => {
|
|
359562
|
+
dock.scrollLeft += 5;
|
|
359563
|
+
}, 10);
|
|
359564
|
+
}
|
|
359565
|
+
}
|
|
359566
|
+
function stopScroll() {
|
|
359567
|
+
clearInterval(scrollInterval);
|
|
359568
|
+
}
|
|
359569
|
+
function onMouseWheel(event) {
|
|
359570
|
+
const dock = document.querySelector(".toolContent");
|
|
359571
|
+
if (event.deltaY < 0) {
|
|
359572
|
+
if (dock) {
|
|
359573
|
+
dock.scrollLeft -= 15;
|
|
359574
|
+
}
|
|
359575
|
+
} else {
|
|
359576
|
+
if (dock) {
|
|
359577
|
+
dock.scrollLeft += 15;
|
|
359578
|
+
}
|
|
359579
|
+
}
|
|
359580
|
+
}
|
|
359581
|
+
function actionCom(item) {
|
|
359582
|
+
console.log(item, "item");
|
|
359583
|
+
comProps.value = void 0;
|
|
359584
|
+
allSetFalse();
|
|
359585
|
+
item.visible = true;
|
|
359586
|
+
if (item.style) {
|
|
359587
|
+
style.value = item.style;
|
|
359588
|
+
} else {
|
|
359589
|
+
style.value = {
|
|
359590
|
+
right: "20px",
|
|
359591
|
+
bottom: "20px",
|
|
359592
|
+
...style
|
|
359593
|
+
};
|
|
359594
|
+
}
|
|
359595
|
+
comProps.value = item.componentProps;
|
|
359596
|
+
}
|
|
359597
|
+
function allSetFalse() {
|
|
359598
|
+
componentsArray.value.forEach((com) => {
|
|
359599
|
+
com.visible = false;
|
|
359600
|
+
});
|
|
359601
|
+
}
|
|
359602
|
+
function closeFun(com) {
|
|
359603
|
+
allSetFalse();
|
|
359604
|
+
}
|
|
359605
|
+
return {
|
|
359606
|
+
scrollLeft,
|
|
359607
|
+
scrollRight,
|
|
359608
|
+
stopScroll,
|
|
359609
|
+
onMouseWheel,
|
|
359610
|
+
actionCom,
|
|
359611
|
+
currentComponent,
|
|
359612
|
+
style,
|
|
359613
|
+
closeFun,
|
|
359614
|
+
componentsArray,
|
|
359615
|
+
comProps
|
|
359616
|
+
};
|
|
359617
|
+
}
|
|
359618
|
+
};
|
|
359619
|
+
const _hoisted_1$6 = { class: "toolListContainer" };
|
|
359620
|
+
const _hoisted_2$6 = { class: "leftArrow" };
|
|
359621
|
+
const _hoisted_3$6 = ["onClick"];
|
|
359622
|
+
const _hoisted_4$5 = ["src"];
|
|
359623
|
+
const _hoisted_5$5 = { class: "rightArrow" };
|
|
359624
|
+
function _sfc_render$6(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
359625
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
359626
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
359627
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
359628
|
+
createElementVNode("span", {
|
|
359629
|
+
class: "arrow",
|
|
359630
|
+
onMousedown: _cache2[0] || (_cache2[0] = (...args) => $setup.scrollLeft && $setup.scrollLeft(...args)),
|
|
359631
|
+
onMouseup: _cache2[1] || (_cache2[1] = (...args) => $setup.stopScroll && $setup.stopScroll(...args))
|
|
359632
|
+
}, "◀", 32)
|
|
359633
|
+
]),
|
|
359634
|
+
createElementVNode("div", {
|
|
359635
|
+
class: "toolContent",
|
|
359636
|
+
onWheel: _cache2[2] || (_cache2[2] = (...args) => $setup.onMouseWheel && $setup.onMouseWheel(...args))
|
|
359637
|
+
}, [
|
|
359638
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.componentsArray, (item) => {
|
|
359639
|
+
return openBlock(), createElementBlock("section", {
|
|
359640
|
+
class: normalizeClass(["sectionStyle", item.visible ? "isActive" : ""]),
|
|
359641
|
+
onClick: ($event) => $setup.actionCom(item)
|
|
359642
|
+
}, [
|
|
359643
|
+
createElementVNode("img", {
|
|
359644
|
+
src: item.image
|
|
359645
|
+
}, null, 8, _hoisted_4$5),
|
|
359646
|
+
createElementVNode("span", null, toDisplayString(item.name), 1)
|
|
359647
|
+
], 10, _hoisted_3$6);
|
|
359648
|
+
}), 256))
|
|
359649
|
+
], 32),
|
|
359650
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
359651
|
+
createElementVNode("span", {
|
|
359652
|
+
class: "arrow",
|
|
359653
|
+
onMousedown: _cache2[3] || (_cache2[3] = (...args) => $setup.scrollRight && $setup.scrollRight(...args)),
|
|
359654
|
+
onMouseup: _cache2[4] || (_cache2[4] = (...args) => $setup.stopScroll && $setup.stopScroll(...args))
|
|
359655
|
+
}, "▶", 32)
|
|
359656
|
+
])
|
|
359657
|
+
]),
|
|
359658
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.componentsArray, (com) => {
|
|
359659
|
+
return openBlock(), createBlock(Transition, { mode: "out-in" }, {
|
|
359660
|
+
default: withCtx(() => [
|
|
359661
|
+
com.visible ? (openBlock(), createBlock(resolveDynamicComponent("Alpha" + com.key), {
|
|
359662
|
+
key: 0,
|
|
359663
|
+
visible: true,
|
|
359664
|
+
style: normalizeStyle($setup.style),
|
|
359665
|
+
earthView: $props.earthView,
|
|
359666
|
+
onClose: ($event) => $setup.closeFun(com),
|
|
359667
|
+
componentProps: $setup.comProps
|
|
359668
|
+
}, null, 40, ["style", "earthView", "onClose", "componentProps"])) : createCommentVNode("", true)
|
|
359669
|
+
]),
|
|
359670
|
+
_: 2
|
|
359671
|
+
}, 1024);
|
|
359672
|
+
}), 256))
|
|
359673
|
+
], 64);
|
|
359674
|
+
}
|
|
359675
|
+
const Component$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
359676
|
+
Component$6.install = (app) => {
|
|
359677
|
+
app.component(Component$6.name, Component$6);
|
|
359678
|
+
};
|
|
359679
|
+
class MeasureDistance {
|
|
359680
|
+
constructor(viewer) {
|
|
359681
|
+
this.isMeasure = false;
|
|
359682
|
+
this.viewer = viewer;
|
|
359683
|
+
this.initEvents();
|
|
359684
|
+
this.positions = [];
|
|
359685
|
+
this.tempPositions = [];
|
|
359686
|
+
this.vertexEntities = [];
|
|
359687
|
+
this.measureDistance = 0;
|
|
359688
|
+
}
|
|
359689
|
+
//初始化事件
|
|
359690
|
+
initEvents() {
|
|
359691
|
+
this.handler = new ScreenSpaceEventHandler(this.viewer.scene.canvas);
|
|
359692
|
+
this.MeasureStartEvent = new Event$2();
|
|
359693
|
+
this.MeasureEndEvent = new Event$2();
|
|
359694
|
+
}
|
|
359695
|
+
//激活
|
|
359696
|
+
activate() {
|
|
359697
|
+
this.deactivate();
|
|
359698
|
+
this.registerEvents();
|
|
359699
|
+
this.tooltipObj = new Tooltip(this.viewer, "请选取测量点,右键结束!!");
|
|
359700
|
+
this.isMeasure = true;
|
|
359701
|
+
this.measureDistance = 0;
|
|
359702
|
+
}
|
|
359703
|
+
//禁用
|
|
359704
|
+
deactivate() {
|
|
359705
|
+
if (!this.isMeasure) return;
|
|
359706
|
+
this.unRegisterEvents();
|
|
359707
|
+
this.isMeasure = false;
|
|
359708
|
+
this.tempPositions = [];
|
|
359709
|
+
this.positions = [];
|
|
359710
|
+
}
|
|
359711
|
+
//注册鼠标事件
|
|
359712
|
+
registerEvents() {
|
|
359713
|
+
this.leftClickEvent();
|
|
359714
|
+
this.rightClickEvent();
|
|
359715
|
+
this.mouseMoveEvent();
|
|
359716
|
+
}
|
|
359717
|
+
//鼠标移动事件
|
|
359718
|
+
mouseMoveEvent() {
|
|
359719
|
+
var _a2;
|
|
359720
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
359721
|
+
if (!this.isMeasure) return;
|
|
359722
|
+
let position = this.viewer.scene.pickPosition(e.endPosition);
|
|
359723
|
+
if (!position) {
|
|
359724
|
+
position = this.viewer.scene.camera.pickEllipsoid(e.startPosition, this.viewer.scene.globe.ellipsoid);
|
|
359725
|
+
}
|
|
359726
|
+
if (!position) return;
|
|
359727
|
+
this.handleMoveEvent(position);
|
|
359728
|
+
}, ScreenSpaceEventType$1.MOUSE_MOVE);
|
|
359729
|
+
}
|
|
359730
|
+
//处理鼠标移动
|
|
359731
|
+
handleMoveEvent(position) {
|
|
359732
|
+
if (this.positions.length < 1) return;
|
|
359733
|
+
this.tempPositions = this.positions.concat(position);
|
|
359734
|
+
}
|
|
359735
|
+
//右键事件
|
|
359736
|
+
rightClickEvent() {
|
|
359737
|
+
var _a2;
|
|
359738
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
359739
|
+
var _a3;
|
|
359740
|
+
(_a3 = this.tooltipObj) == null ? void 0 : _a3.destroy();
|
|
359741
|
+
this.tooltipObj = void 0;
|
|
359742
|
+
if (!this.isMeasure || this.positions.length < 1) {
|
|
359743
|
+
this.deactivate();
|
|
359744
|
+
this.clear();
|
|
359745
|
+
} else {
|
|
359746
|
+
this.createEndEntity();
|
|
359747
|
+
this.lineEntity.polyline = {
|
|
359748
|
+
//@ts-ignore
|
|
359749
|
+
positions: this.positions,
|
|
359750
|
+
//@ts-ignore
|
|
359751
|
+
width: 2,
|
|
359752
|
+
//@ts-ignore
|
|
359753
|
+
material: Color$2.YELLOW,
|
|
359754
|
+
//@ts-ignore
|
|
359755
|
+
depthFailMaterial: Color$2.YELLOW,
|
|
359756
|
+
//@ts-ignore
|
|
359757
|
+
clampToGround: true
|
|
359758
|
+
};
|
|
359759
|
+
this.measureEnd();
|
|
359760
|
+
}
|
|
359761
|
+
}, ScreenSpaceEventType$1.RIGHT_CLICK);
|
|
359762
|
+
}
|
|
359763
|
+
//测量结束
|
|
359764
|
+
measureEnd() {
|
|
359765
|
+
var _a2;
|
|
359766
|
+
this.deactivate();
|
|
359767
|
+
(_a2 = this.MeasureEndEvent) == null ? void 0 : _a2.raiseEvent(this.measureDistance);
|
|
359768
|
+
}
|
|
359769
|
+
//左键点击事件
|
|
359770
|
+
leftClickEvent() {
|
|
359771
|
+
var _a2;
|
|
359772
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
359773
|
+
let position = this.viewer.scene.pickPosition(e.position);
|
|
359774
|
+
if (!position) {
|
|
359775
|
+
const ellipsoid = this.viewer.scene.globe.ellipsoid;
|
|
359776
|
+
position = this.viewer.scene.camera.pickEllipsoid(e.position, ellipsoid);
|
|
359777
|
+
}
|
|
359778
|
+
if (!position) return;
|
|
359779
|
+
this.positions.push(position);
|
|
359780
|
+
if (this.positions.length == 1) {
|
|
359781
|
+
this.createLineEntity();
|
|
359782
|
+
this.createStartEntity();
|
|
359783
|
+
return;
|
|
359784
|
+
}
|
|
359785
|
+
this.createVertex();
|
|
359786
|
+
}, ScreenSpaceEventType$1.LEFT_CLICK);
|
|
359787
|
+
}
|
|
359788
|
+
//创建线节点
|
|
359789
|
+
createVertex() {
|
|
359790
|
+
let vertexEntity = this.viewer.entities.add({
|
|
359791
|
+
position: this.positions[this.positions.length - 1],
|
|
359792
|
+
id: "MeasureDistanceVertex" + this.positions[this.positions.length - 1],
|
|
359793
|
+
label: {
|
|
359794
|
+
text: calculateDistenceXYZ(this.positions) + "米",
|
|
359795
|
+
font: "normal 16px MicroSoft YaHei",
|
|
359796
|
+
verticalOrigin: VerticalOrigin$1.BOTTOM,
|
|
359797
|
+
style: LabelStyle$1.FILL_AND_OUTLINE,
|
|
359798
|
+
pixelOffset: new Cartesian2(0, -30),
|
|
359799
|
+
outlineWidth: 9,
|
|
359800
|
+
outlineColor: Color$2.RED,
|
|
359801
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
359802
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE
|
|
359803
|
+
},
|
|
359804
|
+
point: {
|
|
359805
|
+
color: Color$2.FUCHSIA,
|
|
359806
|
+
pixelSize: 8,
|
|
359807
|
+
disableDepthTestDistance: 500,
|
|
359808
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE
|
|
359809
|
+
}
|
|
359810
|
+
});
|
|
359811
|
+
this.vertexEntities.push(vertexEntity);
|
|
359812
|
+
this.measureDistance = calculateDistenceXYZ(this.positions);
|
|
359813
|
+
}
|
|
359814
|
+
//创建起点
|
|
359815
|
+
createStartEntity() {
|
|
359816
|
+
let vertexEntity = this.viewer.entities.add({
|
|
359817
|
+
position: this.positions[0],
|
|
359818
|
+
point: {
|
|
359819
|
+
color: Color$2.FUCHSIA,
|
|
359820
|
+
pixelSize: 6,
|
|
359821
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE
|
|
359822
|
+
}
|
|
359823
|
+
});
|
|
359824
|
+
this.vertexEntities.push(vertexEntity);
|
|
359825
|
+
}
|
|
359826
|
+
//创建终点节点
|
|
359827
|
+
createEndEntity() {
|
|
359828
|
+
let lastLabel = this.viewer.entities.getById("MeasureDistanceVertex" + this.positions[this.positions.length - 1]);
|
|
359829
|
+
if (lastLabel) {
|
|
359830
|
+
this.viewer.entities.remove(lastLabel);
|
|
359831
|
+
}
|
|
359832
|
+
if (this.moveVertexEntity) {
|
|
359833
|
+
this.viewer.entities.remove(this.moveVertexEntity);
|
|
359834
|
+
}
|
|
359835
|
+
let vertexEntity = this.viewer.entities.add({
|
|
359836
|
+
position: this.positions[this.positions.length - 1],
|
|
359837
|
+
label: {
|
|
359838
|
+
text: "总距离:" + calculateDistenceXYZ(this.positions) + "米",
|
|
359839
|
+
font: "normal 16px MicroSoft YaHei",
|
|
359840
|
+
verticalOrigin: VerticalOrigin$1.BOTTOM,
|
|
359841
|
+
style: LabelStyle$1.FILL_AND_OUTLINE,
|
|
359842
|
+
pixelOffset: new Cartesian2(0, -50),
|
|
359843
|
+
outlineWidth: 9,
|
|
359844
|
+
outlineColor: Color$2.RED,
|
|
359845
|
+
eyeOffset: new Cartesian3(0, 0, -10),
|
|
359846
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE,
|
|
359847
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
359848
|
+
},
|
|
359849
|
+
point: {
|
|
359850
|
+
color: Color$2.FUCHSIA,
|
|
359851
|
+
pixelSize: 6,
|
|
359852
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE
|
|
359853
|
+
}
|
|
359854
|
+
});
|
|
359855
|
+
this.vertexEntities.push(vertexEntity);
|
|
359856
|
+
}
|
|
359857
|
+
//创建线对象
|
|
359858
|
+
createLineEntity() {
|
|
359859
|
+
this.lineEntity = this.viewer.entities.add({
|
|
359860
|
+
polyline: {
|
|
359861
|
+
positions: new CallbackProperty((e) => {
|
|
359862
|
+
return this.tempPositions;
|
|
359863
|
+
}, false),
|
|
359864
|
+
width: 2,
|
|
359865
|
+
material: Color$2.YELLOW,
|
|
359866
|
+
depthFailMaterial: Color$2.YELLOW,
|
|
359867
|
+
clampToGround: true
|
|
359868
|
+
}
|
|
359869
|
+
});
|
|
359870
|
+
}
|
|
359871
|
+
//解除鼠标事件
|
|
359872
|
+
unRegisterEvents() {
|
|
359873
|
+
var _a2, _b, _c;
|
|
359874
|
+
(_a2 = this.handler) == null ? void 0 : _a2.removeInputAction(ScreenSpaceEventType$1.RIGHT_CLICK);
|
|
359875
|
+
(_b = this.handler) == null ? void 0 : _b.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK);
|
|
359876
|
+
(_c = this.handler) == null ? void 0 : _c.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE);
|
|
359877
|
+
}
|
|
359878
|
+
//清空绘制
|
|
359879
|
+
clear() {
|
|
359880
|
+
var _a2;
|
|
359881
|
+
(_a2 = this.tooltipObj) == null ? void 0 : _a2.destroy;
|
|
359882
|
+
this.tooltipObj = void 0;
|
|
359883
|
+
if (this.lineEntity) {
|
|
359884
|
+
this.viewer.entities.remove(this.lineEntity);
|
|
359885
|
+
this.lineEntity = void 0;
|
|
359886
|
+
}
|
|
359887
|
+
this.vertexEntities.forEach((item) => {
|
|
359888
|
+
this.viewer.entities.remove(item);
|
|
359889
|
+
});
|
|
359890
|
+
this.vertexEntities = [];
|
|
359891
|
+
}
|
|
359892
|
+
}
|
|
359893
|
+
const _sfc_main$5 = {
|
|
359894
|
+
name: "ToolDistanceMeasurement",
|
|
359895
|
+
props: {
|
|
359896
|
+
visible: {
|
|
359897
|
+
type: Boolean,
|
|
359898
|
+
default: false
|
|
359899
|
+
},
|
|
359900
|
+
earthView: {
|
|
359901
|
+
type: CesiumAlphaViewer,
|
|
359902
|
+
default: null
|
|
359903
|
+
},
|
|
359904
|
+
style: {
|
|
359905
|
+
type: Object
|
|
359906
|
+
}
|
|
359907
|
+
},
|
|
359908
|
+
components: {
|
|
359909
|
+
CircleClose: circle_close_default,
|
|
359910
|
+
ElButton
|
|
359911
|
+
},
|
|
359912
|
+
emits: ["close"],
|
|
359913
|
+
setup(props, ctx) {
|
|
359914
|
+
let visible = ref(false);
|
|
359915
|
+
let earthView = toRaw(props.earthView);
|
|
359916
|
+
let measureDistanceObj = ref(null);
|
|
359917
|
+
onMounted(() => {
|
|
359918
|
+
if (!earthView.viewer) {
|
|
359919
|
+
return;
|
|
359920
|
+
}
|
|
359921
|
+
visible.value = props.visible;
|
|
359922
|
+
watch(() => props.visible, (n, o) => {
|
|
359923
|
+
visible.value = props.visible;
|
|
359924
|
+
});
|
|
359925
|
+
});
|
|
359926
|
+
function actionDraw() {
|
|
359927
|
+
var _a2, _b;
|
|
359928
|
+
if (earthView.viewer) {
|
|
359929
|
+
measureDistanceObj.value = new MeasureDistance(earthView.viewer);
|
|
359930
|
+
(_a2 = measureDistanceObj.value) == null ? void 0 : _a2.clear();
|
|
359931
|
+
(_b = measureDistanceObj.value) == null ? void 0 : _b.activate();
|
|
359932
|
+
}
|
|
359933
|
+
}
|
|
359934
|
+
function clearDraw() {
|
|
359935
|
+
var _a2, _b;
|
|
359936
|
+
(_a2 = measureDistanceObj.value) == null ? void 0 : _a2.measureEnd();
|
|
359937
|
+
(_b = measureDistanceObj.value) == null ? void 0 : _b.clear();
|
|
359938
|
+
measureDistanceObj.value = null;
|
|
359939
|
+
}
|
|
359940
|
+
function reset() {
|
|
359941
|
+
var _a2, _b;
|
|
359942
|
+
(_a2 = measureDistanceObj.value) == null ? void 0 : _a2.measureEnd();
|
|
359943
|
+
(_b = measureDistanceObj.value) == null ? void 0 : _b.clear();
|
|
359944
|
+
visible.value = false;
|
|
359945
|
+
}
|
|
359946
|
+
function close() {
|
|
359947
|
+
reset();
|
|
359948
|
+
ctx.emit("close", "DistanceMeasurement");
|
|
359949
|
+
}
|
|
359950
|
+
onUnmounted(() => {
|
|
359951
|
+
reset();
|
|
359952
|
+
});
|
|
359953
|
+
return {
|
|
359954
|
+
visible,
|
|
359955
|
+
actionDraw,
|
|
359956
|
+
clearDraw,
|
|
359957
|
+
measureDistanceObj,
|
|
359958
|
+
close
|
|
359959
|
+
};
|
|
359960
|
+
}
|
|
359961
|
+
};
|
|
359962
|
+
const _hoisted_1$5 = { class: "header" };
|
|
359963
|
+
const _hoisted_2$5 = { class: "container" };
|
|
359964
|
+
const _hoisted_3$5 = { class: "actionSection" };
|
|
359965
|
+
const _hoisted_4$4 = { class: "actionSection" };
|
|
359966
|
+
const _hoisted_5$4 = { class: "actionSection" };
|
|
359967
|
+
function _sfc_render$5(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
359968
|
+
var _a2;
|
|
359969
|
+
const _component_CircleClose = resolveComponent("CircleClose");
|
|
359970
|
+
const _component_ElButton = resolveComponent("ElButton");
|
|
359971
|
+
return $setup.visible ? (openBlock(), createElementBlock("div", {
|
|
359972
|
+
key: 0,
|
|
359973
|
+
class: "measurement-ui",
|
|
359974
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
359975
|
+
}, [
|
|
359976
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
359977
|
+
_cache2[1] || (_cache2[1] = createElementVNode("span", null, "距离测量", -1)),
|
|
359978
|
+
createVNode(_component_CircleClose, {
|
|
359979
|
+
class: "closeBth",
|
|
359980
|
+
onClick: $setup.close
|
|
359981
|
+
}, null, 8, ["onClick"])
|
|
359982
|
+
]),
|
|
359983
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
359984
|
+
createElementVNode("section", _hoisted_3$5, [
|
|
359985
|
+
createVNode(_component_ElButton, {
|
|
359986
|
+
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.actionDraw())
|
|
359987
|
+
}, {
|
|
359988
|
+
default: withCtx(() => _cache2[2] || (_cache2[2] = [
|
|
359989
|
+
createTextVNode("开始选点")
|
|
359990
|
+
])),
|
|
359991
|
+
_: 1,
|
|
359992
|
+
__: [2]
|
|
359993
|
+
})
|
|
359994
|
+
]),
|
|
359995
|
+
createElementVNode("section", _hoisted_4$4, [
|
|
359996
|
+
createVNode(_component_ElButton, { onClick: $setup.clearDraw }, {
|
|
359997
|
+
default: withCtx(() => _cache2[3] || (_cache2[3] = [
|
|
359998
|
+
createTextVNode("清除绘制")
|
|
359999
|
+
])),
|
|
360000
|
+
_: 1,
|
|
360001
|
+
__: [3]
|
|
360002
|
+
}, 8, ["onClick"])
|
|
360003
|
+
]),
|
|
360004
|
+
createElementVNode("section", _hoisted_5$4, [
|
|
360005
|
+
_cache2[4] || (_cache2[4] = createElementVNode("span", null, "距离:", -1)),
|
|
360006
|
+
createElementVNode("span", null, toDisplayString((((_a2 = $setup.measureDistanceObj) == null ? void 0 : _a2.measureDistance) || 0) + "米"), 1)
|
|
360007
|
+
])
|
|
360008
|
+
])
|
|
360009
|
+
], 4)) : createCommentVNode("", true);
|
|
360010
|
+
}
|
|
360011
|
+
const Component$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-48647ecc"]]);
|
|
360012
|
+
Component$5.install = (app) => {
|
|
360013
|
+
app.component(Component$5.name, Component$5);
|
|
360014
|
+
};
|
|
360015
|
+
class MeasureArea {
|
|
360016
|
+
constructor(viewer) {
|
|
360017
|
+
this.handler = void 0;
|
|
360018
|
+
this.MeasureStartEvent = void 0;
|
|
360019
|
+
this.MeasureEndEvent = void 0;
|
|
360020
|
+
this.isMeasure = false;
|
|
360021
|
+
this.height = void 0;
|
|
360022
|
+
this.polygonEntity = void 0;
|
|
360023
|
+
this.mesureResultEntity = void 0;
|
|
360024
|
+
this.viewer = viewer;
|
|
360025
|
+
this.initEvents();
|
|
360026
|
+
this.positions = [];
|
|
360027
|
+
this.tempPositions = [];
|
|
360028
|
+
this.vertexEntities = [];
|
|
360029
|
+
this.labelEntity = void 0;
|
|
360030
|
+
this.measureArea = 0;
|
|
360031
|
+
}
|
|
360032
|
+
//初始化事件
|
|
360033
|
+
initEvents() {
|
|
360034
|
+
this.handler = new ScreenSpaceEventHandler(this.viewer.scene.canvas);
|
|
360035
|
+
this.MeasureStartEvent = new Event$2();
|
|
360036
|
+
this.MeasureEndEvent = new Event$2();
|
|
360037
|
+
}
|
|
360038
|
+
//激活
|
|
360039
|
+
activate() {
|
|
360040
|
+
this.tooltipObj = new Tooltip(this.viewer, "请选取面区域,右键结束!!");
|
|
360041
|
+
this.deactivate();
|
|
360042
|
+
this.registerEvents();
|
|
360043
|
+
this.isMeasure = true;
|
|
360044
|
+
this.measureArea = 0;
|
|
360045
|
+
}
|
|
360046
|
+
//注册鼠标事件
|
|
360047
|
+
registerEvents() {
|
|
360048
|
+
this.leftClickEvent();
|
|
360049
|
+
this.rightClickEvent();
|
|
360050
|
+
this.mouseMoveEvent();
|
|
360051
|
+
}
|
|
360052
|
+
//右键事件
|
|
360053
|
+
rightClickEvent() {
|
|
360054
|
+
var _a2;
|
|
360055
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
360056
|
+
var _a3;
|
|
360057
|
+
(_a3 = this.tooltipObj) == null ? void 0 : _a3.destroy();
|
|
360058
|
+
this.tooltipObj = void 0;
|
|
360059
|
+
if (!this.isMeasure || this.positions.length < 3) {
|
|
360060
|
+
this.deactivate();
|
|
360061
|
+
this.clear();
|
|
360062
|
+
} else {
|
|
360063
|
+
this.tempPositions = [...this.positions];
|
|
360064
|
+
this.polygonEntity.polyline = {
|
|
360065
|
+
//@ts-ignore
|
|
360066
|
+
positions: this.positions.concat(this.positions[0]),
|
|
360067
|
+
//@ts-ignore
|
|
360068
|
+
width: 2,
|
|
360069
|
+
//@ts-ignore
|
|
360070
|
+
material: Color$2.YELLOW,
|
|
360071
|
+
//@ts-ignore
|
|
360072
|
+
clampToGround: true,
|
|
360073
|
+
depthFailMaterial: new PolylineDashMaterialProperty({
|
|
360074
|
+
color: Color$2.YELLOW
|
|
360075
|
+
})
|
|
360076
|
+
};
|
|
360077
|
+
this.polygonEntity.polygon.hierarchy = new PolygonHierarchy(this.tempPositions);
|
|
360078
|
+
this.mesureResultEntity.position = this.viewer.scene.clampToHeight(this.getCenterPosition());
|
|
360079
|
+
this.mesureResultEntity.label.text = "总面积" + calculateAreaXYZ(this.positions) + "平方米";
|
|
360080
|
+
this.measureArea = calculateAreaXYZ(this.tempPositions);
|
|
360081
|
+
this.measureEnd();
|
|
360082
|
+
}
|
|
360083
|
+
}, ScreenSpaceEventType$1.RIGHT_CLICK);
|
|
360084
|
+
}
|
|
360085
|
+
//测量结束
|
|
360086
|
+
measureEnd() {
|
|
360087
|
+
var _a2;
|
|
360088
|
+
this.deactivate();
|
|
360089
|
+
(_a2 = this.MeasureEndEvent) == null ? void 0 : _a2.raiseEvent(this.measureArea);
|
|
360090
|
+
}
|
|
360091
|
+
//鼠标移动事件
|
|
360092
|
+
mouseMoveEvent() {
|
|
360093
|
+
var _a2;
|
|
360094
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
360095
|
+
if (!this.isMeasure) return;
|
|
360096
|
+
let position = this.viewer.scene.pickPosition(e.endPosition);
|
|
360097
|
+
if (!position) {
|
|
360098
|
+
position = this.viewer.scene.camera.pickEllipsoid(e.startPosition, this.viewer.scene.globe.ellipsoid);
|
|
360099
|
+
}
|
|
360100
|
+
if (!position) return;
|
|
360101
|
+
this.handleMoveEvent(position);
|
|
360102
|
+
}, ScreenSpaceEventType$1.MOUSE_MOVE);
|
|
360103
|
+
}
|
|
360104
|
+
//处理鼠标移动
|
|
360105
|
+
handleMoveEvent(position) {
|
|
360106
|
+
if (this.positions.length < 1) return;
|
|
360107
|
+
this.tempPositions = this.positions.concat(position);
|
|
360108
|
+
if (this.tempPositions.length >= 3 && !this.mesureResultEntity) {
|
|
360109
|
+
this.createResultLabel();
|
|
360110
|
+
this.measureArea = calculateAreaXYZ(this.tempPositions);
|
|
360111
|
+
}
|
|
360112
|
+
}
|
|
360113
|
+
//测量结果标签
|
|
360114
|
+
createResultLabel() {
|
|
360115
|
+
this.mesureResultEntity = this.viewer.entities.add({
|
|
360116
|
+
position: new CallbackPositionProperty((e) => {
|
|
360117
|
+
return this.positions[0];
|
|
360118
|
+
}, false),
|
|
360119
|
+
label: {
|
|
360120
|
+
text: new CallbackProperty((e) => {
|
|
360121
|
+
if (this.tempPositions.length > 2) {
|
|
360122
|
+
return "面积" + calculateAreaXYZ(this.tempPositions) + "平方米";
|
|
360123
|
+
}
|
|
360124
|
+
}, false),
|
|
360125
|
+
font: "normal 12px MicroSoft YaHei",
|
|
360126
|
+
style: LabelStyle$1.FILL_AND_OUTLINE,
|
|
360127
|
+
outlineWidth: 9,
|
|
360128
|
+
outlineColor: Color$2.YELLOW,
|
|
360129
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
360130
|
+
// heightReference: HeightReference.CLAMP_TO_3D_TILE
|
|
360131
|
+
}
|
|
360132
|
+
});
|
|
360133
|
+
}
|
|
360134
|
+
//获取节点的中心点
|
|
360135
|
+
getCenterPosition() {
|
|
360136
|
+
let points2 = [];
|
|
360137
|
+
if (this.tempPositions.length < 3) return this.tempPositions[0];
|
|
360138
|
+
this.tempPositions.forEach((position) => {
|
|
360139
|
+
const point3d = this.cartesian3ToPoint3D(position);
|
|
360140
|
+
points2.push([point3d.x, point3d.y]);
|
|
360141
|
+
});
|
|
360142
|
+
let geo = lineString(points2);
|
|
360143
|
+
let bbox$1 = bbox(geo);
|
|
360144
|
+
let bboxPolygon$1 = bboxPolygon(bbox$1);
|
|
360145
|
+
let pointOnFeature = center(bboxPolygon$1);
|
|
360146
|
+
let lonLat = pointOnFeature.geometry.coordinates;
|
|
360147
|
+
return Cartesian3.fromDegrees(lonLat[0], lonLat[1], this.height || 0 + 0.3);
|
|
360148
|
+
}
|
|
360149
|
+
//左键点击事件
|
|
360150
|
+
leftClickEvent() {
|
|
360151
|
+
var _a2;
|
|
360152
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
360153
|
+
let position = this.viewer.scene.pickPosition(e.position);
|
|
360154
|
+
if (!position) {
|
|
360155
|
+
const ellipsoid = this.viewer.scene.globe.ellipsoid;
|
|
360156
|
+
position = this.viewer.scene.camera.pickEllipsoid(e.position, ellipsoid);
|
|
360157
|
+
}
|
|
360158
|
+
if (!position) return;
|
|
360159
|
+
this.positions.push(position);
|
|
360160
|
+
if (this.positions.length == 1) {
|
|
360161
|
+
this.createPolygonEntity();
|
|
360162
|
+
}
|
|
360163
|
+
this.createVertex();
|
|
360164
|
+
}, ScreenSpaceEventType$1.LEFT_CLICK);
|
|
360165
|
+
}
|
|
360166
|
+
//创建面对象
|
|
360167
|
+
createPolygonEntity() {
|
|
360168
|
+
this.polygonEntity = this.viewer.entities.add({
|
|
360169
|
+
polygon: {
|
|
360170
|
+
hierarchy: new CallbackProperty((e) => {
|
|
360171
|
+
return new PolygonHierarchy(this.tempPositions);
|
|
360172
|
+
}, false),
|
|
360173
|
+
material: Color$2.RED.withAlpha(0.4),
|
|
360174
|
+
heightReference: HeightReference$1.CLAMP_TO_3D_TILE
|
|
360175
|
+
},
|
|
360176
|
+
polyline: {
|
|
360177
|
+
positions: new CallbackProperty((e) => {
|
|
360178
|
+
return this.tempPositions.concat(this.tempPositions[0]);
|
|
360179
|
+
}, false),
|
|
360180
|
+
width: 1,
|
|
360181
|
+
material: new PolylineDashMaterialProperty({
|
|
360182
|
+
color: Color$2.YELLOW
|
|
360183
|
+
}),
|
|
360184
|
+
depthFailMaterial: new PolylineDashMaterialProperty({
|
|
360185
|
+
color: Color$2.YELLOW
|
|
360186
|
+
}),
|
|
360187
|
+
clampToGround: true
|
|
360188
|
+
}
|
|
360189
|
+
});
|
|
360190
|
+
}
|
|
360191
|
+
//创建节点
|
|
360192
|
+
createVertex() {
|
|
360193
|
+
let vertexEntity = this.viewer.entities.add({
|
|
360194
|
+
position: this.positions[this.positions.length - 1],
|
|
360195
|
+
point: {
|
|
360196
|
+
color: Color$2.FUCHSIA,
|
|
360197
|
+
pixelSize: 8
|
|
360198
|
+
}
|
|
360199
|
+
});
|
|
360200
|
+
this.vertexEntities.push(vertexEntity);
|
|
360201
|
+
}
|
|
360202
|
+
//统一节点的高度
|
|
360203
|
+
unifiedHeight(positions, height) {
|
|
360204
|
+
if (!height) height = this.getPositionHeight(positions[0]);
|
|
360205
|
+
let point3d;
|
|
360206
|
+
for (let i = 0; i < positions.length; i++) {
|
|
360207
|
+
const element = positions[i];
|
|
360208
|
+
point3d = this.cartesian3ToPoint3D(element);
|
|
360209
|
+
positions[i] = Cartesian3.fromDegrees(point3d.x, point3d.y, height);
|
|
360210
|
+
}
|
|
360211
|
+
return height;
|
|
360212
|
+
}
|
|
360213
|
+
cartesian3ToPoint3D(position) {
|
|
360214
|
+
const cartographic2 = Cartographic.fromCartesian(position);
|
|
360215
|
+
const lon = CesiumMath.toDegrees(cartographic2.longitude);
|
|
360216
|
+
const lat = CesiumMath.toDegrees(cartographic2.latitude);
|
|
360217
|
+
return { x: lon, y: lat, z: cartographic2.height };
|
|
360218
|
+
}
|
|
360219
|
+
//获取某个点的高度
|
|
360220
|
+
getPositionHeight(position) {
|
|
360221
|
+
const cartographic2 = Cartographic.fromCartesian(position);
|
|
360222
|
+
return cartographic2.height;
|
|
360223
|
+
}
|
|
360224
|
+
//禁用
|
|
360225
|
+
deactivate() {
|
|
360226
|
+
if (!this.isMeasure) return;
|
|
360227
|
+
this.unRegisterEvents();
|
|
360228
|
+
this.isMeasure = false;
|
|
360229
|
+
this.tempPositions = [];
|
|
360230
|
+
this.positions = [];
|
|
360231
|
+
this.height = void 0;
|
|
360232
|
+
}
|
|
360233
|
+
//解除鼠标事件
|
|
360234
|
+
unRegisterEvents() {
|
|
360235
|
+
if (this.handler) {
|
|
360236
|
+
this.handler.removeInputAction(ScreenSpaceEventType$1.RIGHT_CLICK);
|
|
360237
|
+
this.handler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK);
|
|
360238
|
+
this.handler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE);
|
|
360239
|
+
}
|
|
360240
|
+
}
|
|
360241
|
+
//清空绘制
|
|
360242
|
+
clear() {
|
|
360243
|
+
var _a2;
|
|
360244
|
+
(_a2 = this.tooltipObj) == null ? void 0 : _a2.destroy();
|
|
360245
|
+
this.tooltipObj = void 0;
|
|
360246
|
+
if (this.polygonEntity) {
|
|
360247
|
+
this.viewer.entities.remove(this.polygonEntity);
|
|
360248
|
+
this.polygonEntity = void 0;
|
|
360249
|
+
}
|
|
360250
|
+
this.vertexEntities.forEach((item) => {
|
|
360251
|
+
this.viewer.entities.remove(item);
|
|
360252
|
+
});
|
|
360253
|
+
this.vertexEntities = [];
|
|
360254
|
+
if (this.mesureResultEntity) {
|
|
360255
|
+
this.viewer.entities.remove(this.mesureResultEntity);
|
|
360256
|
+
this.mesureResultEntity = void 0;
|
|
360257
|
+
}
|
|
360258
|
+
this.height = void 0;
|
|
360259
|
+
}
|
|
360260
|
+
}
|
|
360261
|
+
const _sfc_main$4 = {
|
|
360262
|
+
name: "ToolAreaMeasurement",
|
|
360263
|
+
props: {
|
|
360264
|
+
visible: {
|
|
360265
|
+
type: Boolean,
|
|
360266
|
+
default: false
|
|
360267
|
+
},
|
|
360268
|
+
earthView: {
|
|
360269
|
+
type: CesiumAlphaViewer,
|
|
360270
|
+
default: null
|
|
360271
|
+
},
|
|
360272
|
+
style: {
|
|
360273
|
+
type: Object
|
|
360274
|
+
}
|
|
360275
|
+
},
|
|
360276
|
+
components: {
|
|
360277
|
+
CircleClose: circle_close_default,
|
|
360278
|
+
ElButton
|
|
360279
|
+
},
|
|
360280
|
+
emits: ["close"],
|
|
360281
|
+
setup(props, ctx) {
|
|
360282
|
+
let visible = ref(false);
|
|
360283
|
+
let earthView = toRaw(props.earthView);
|
|
360284
|
+
let areaNumber = ref(0);
|
|
360285
|
+
let measureAreaObject = ref(null);
|
|
360286
|
+
onMounted(() => {
|
|
360287
|
+
visible.value = props.visible;
|
|
360288
|
+
watch(() => props.visible, (n, o) => {
|
|
360289
|
+
visible.value = props.visible;
|
|
360290
|
+
});
|
|
360291
|
+
if (!earthView.viewer) {
|
|
360292
|
+
return;
|
|
360293
|
+
}
|
|
360294
|
+
measureAreaObject.value = new MeasureArea(earthView.viewer);
|
|
360295
|
+
});
|
|
360296
|
+
function actionMeasurement() {
|
|
360297
|
+
var _a2, _b;
|
|
360298
|
+
(_a2 = measureAreaObject.value) == null ? void 0 : _a2.clear();
|
|
360299
|
+
(_b = measureAreaObject.value) == null ? void 0 : _b.activate();
|
|
360300
|
+
}
|
|
360301
|
+
function clearDraw() {
|
|
360302
|
+
var _a2;
|
|
360303
|
+
(_a2 = measureAreaObject.value) == null ? void 0 : _a2.clear();
|
|
360304
|
+
}
|
|
360305
|
+
function reset() {
|
|
360306
|
+
var _a2;
|
|
360307
|
+
(_a2 = measureAreaObject.value) == null ? void 0 : _a2.clear();
|
|
360308
|
+
measureAreaObject.value = null;
|
|
360309
|
+
visible.value = false;
|
|
360310
|
+
}
|
|
360311
|
+
function close() {
|
|
360312
|
+
reset();
|
|
360313
|
+
ctx.emit("close", "AreaMeasurement");
|
|
360314
|
+
}
|
|
360315
|
+
onUnmounted(() => {
|
|
360316
|
+
reset();
|
|
360317
|
+
});
|
|
360318
|
+
return {
|
|
360319
|
+
visible,
|
|
360320
|
+
close,
|
|
360321
|
+
actionMeasurement,
|
|
360322
|
+
clearDraw,
|
|
360323
|
+
areaNumber,
|
|
360324
|
+
measureAreaObject
|
|
360325
|
+
};
|
|
360326
|
+
}
|
|
360327
|
+
};
|
|
360328
|
+
const _hoisted_1$4 = { class: "header" };
|
|
360329
|
+
const _hoisted_2$4 = { class: "container" };
|
|
360330
|
+
const _hoisted_3$4 = { class: "actionSection" };
|
|
360331
|
+
const _hoisted_4$3 = { class: "actionSection" };
|
|
360332
|
+
const _hoisted_5$3 = { class: "actionSection" };
|
|
360333
|
+
function _sfc_render$4(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
360334
|
+
var _a2;
|
|
360335
|
+
const _component_CircleClose = resolveComponent("CircleClose");
|
|
360336
|
+
const _component_ElButton = resolveComponent("ElButton");
|
|
360337
|
+
return $setup.visible ? (openBlock(), createElementBlock("div", {
|
|
360338
|
+
key: 0,
|
|
360339
|
+
class: "component-ui",
|
|
360340
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
360341
|
+
}, [
|
|
360342
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
360343
|
+
_cache2[1] || (_cache2[1] = createElementVNode("span", null, "面积测量", -1)),
|
|
360344
|
+
createVNode(_component_CircleClose, {
|
|
360345
|
+
class: "closeBth",
|
|
360346
|
+
onClick: $setup.close
|
|
360347
|
+
}, null, 8, ["onClick"])
|
|
360348
|
+
]),
|
|
360349
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
360350
|
+
createElementVNode("section", _hoisted_3$4, [
|
|
360351
|
+
createVNode(_component_ElButton, {
|
|
360352
|
+
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.actionMeasurement())
|
|
360353
|
+
}, {
|
|
360354
|
+
default: withCtx(() => _cache2[2] || (_cache2[2] = [
|
|
360355
|
+
createTextVNode("开始选点")
|
|
360356
|
+
])),
|
|
360357
|
+
_: 1,
|
|
360358
|
+
__: [2]
|
|
360359
|
+
})
|
|
360360
|
+
]),
|
|
360361
|
+
createElementVNode("section", _hoisted_4$3, [
|
|
360362
|
+
createVNode(_component_ElButton, { onClick: $setup.clearDraw }, {
|
|
360363
|
+
default: withCtx(() => _cache2[3] || (_cache2[3] = [
|
|
360364
|
+
createTextVNode("清除绘制")
|
|
360365
|
+
])),
|
|
360366
|
+
_: 1,
|
|
360367
|
+
__: [3]
|
|
360368
|
+
}, 8, ["onClick"])
|
|
360369
|
+
]),
|
|
360370
|
+
createElementVNode("section", _hoisted_5$3, [
|
|
360371
|
+
_cache2[4] || (_cache2[4] = createElementVNode("span", null, "面积:", -1)),
|
|
360372
|
+
createElementVNode("span", null, toDisplayString((((_a2 = $setup.measureAreaObject) == null ? void 0 : _a2.measureArea) || 0) + "平方米"), 1)
|
|
360373
|
+
])
|
|
360374
|
+
])
|
|
360375
|
+
], 4)) : createCommentVNode("", true);
|
|
360376
|
+
}
|
|
360377
|
+
const Component$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-738655d9"]]);
|
|
360378
|
+
Component$4.install = (app) => {
|
|
360379
|
+
app.component(Component$4.name, Component$4);
|
|
360380
|
+
};
|
|
360381
|
+
class HeightMeasurement {
|
|
360382
|
+
constructor(viewer) {
|
|
360383
|
+
this.height = 0;
|
|
360384
|
+
this.isMeasure = false;
|
|
360385
|
+
this.viewer = viewer;
|
|
360386
|
+
this.initEvents();
|
|
360387
|
+
}
|
|
360388
|
+
//初始化事件
|
|
360389
|
+
initEvents() {
|
|
360390
|
+
this.handler = new ScreenSpaceEventHandler(this.viewer.scene.canvas);
|
|
360391
|
+
}
|
|
360392
|
+
//开始执行事件
|
|
360393
|
+
active() {
|
|
360394
|
+
this.tooltipObj = new Tooltip(this.viewer, "请选择对高点与最低点,右键清除!!");
|
|
360395
|
+
this.isMeasure = true;
|
|
360396
|
+
this.leftClickEvent();
|
|
360397
|
+
this.rightClickEvent();
|
|
360398
|
+
}
|
|
360399
|
+
rightClickEvent() {
|
|
360400
|
+
var _a2;
|
|
360401
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
360402
|
+
this.destroy();
|
|
360403
|
+
}, ScreenSpaceEventType$1.RIGHT_CLICK);
|
|
360404
|
+
}
|
|
360405
|
+
//左键点击事件
|
|
360406
|
+
leftClickEvent() {
|
|
360407
|
+
var _a2;
|
|
360408
|
+
(_a2 = this.handler) == null ? void 0 : _a2.setInputAction((e) => {
|
|
360409
|
+
if (this.lowestPoint && this.highestPoint) {
|
|
360410
|
+
this.reset();
|
|
360411
|
+
}
|
|
360412
|
+
let position = this.viewer.scene.pickPosition(e.position);
|
|
360413
|
+
if (!position) {
|
|
360414
|
+
const ellipsoid = this.viewer.scene.globe.ellipsoid;
|
|
360415
|
+
position = this.viewer.scene.camera.pickEllipsoid(e.position, ellipsoid);
|
|
360416
|
+
}
|
|
360417
|
+
if (!position) return;
|
|
360418
|
+
if (!this.highestPoint) {
|
|
360419
|
+
this.highestPoint = position;
|
|
360420
|
+
this.highestPointEntity = this.createPoint(position);
|
|
360421
|
+
} else {
|
|
360422
|
+
this.lowestPoint = position;
|
|
360423
|
+
this.lowestPointEntity = this.createPoint(position);
|
|
360424
|
+
}
|
|
360425
|
+
if (this.highestPoint && this.lowestPoint) {
|
|
360426
|
+
this.createLines();
|
|
360427
|
+
this.createLabel();
|
|
360428
|
+
}
|
|
360429
|
+
}, ScreenSpaceEventType$1.LEFT_CLICK);
|
|
360430
|
+
}
|
|
360431
|
+
//创建点
|
|
360432
|
+
createPoint(position) {
|
|
360433
|
+
return this.viewer.entities.add({
|
|
360434
|
+
position,
|
|
360435
|
+
point: {
|
|
360436
|
+
pixelSize: 10,
|
|
360437
|
+
// 点的大小(像素)
|
|
360438
|
+
color: Color$2.RED
|
|
360439
|
+
// 点的颜色
|
|
360440
|
+
}
|
|
360441
|
+
});
|
|
360442
|
+
}
|
|
360443
|
+
//创建相关连线
|
|
360444
|
+
createLines() {
|
|
360445
|
+
let pointA = this.highestPoint;
|
|
360446
|
+
let pointB = this.lowestPoint;
|
|
360447
|
+
if (pointA && pointB) {
|
|
360448
|
+
let getPointAHeight = Cartographic.fromCartesian(pointB);
|
|
360449
|
+
let clonePointC = Cartographic.fromCartesian(Cartesian3.clone(pointA));
|
|
360450
|
+
clonePointC.height = getPointAHeight.height;
|
|
360451
|
+
let pointC = Cartesian3.fromRadians(clonePointC.longitude, clonePointC.latitude, clonePointC.height);
|
|
360452
|
+
this.lineEntity = this.viewer.entities.add(
|
|
360453
|
+
{
|
|
360454
|
+
polyline: {
|
|
360455
|
+
positions: [pointA, pointB, pointC, pointA],
|
|
360456
|
+
width: 2,
|
|
360457
|
+
// 线宽
|
|
360458
|
+
material: Color$2.RED,
|
|
360459
|
+
depthFailMaterial: new PolylineOutlineMaterialProperty({
|
|
360460
|
+
// 当线条位于地形之下时的材质
|
|
360461
|
+
color: Color$2.BLUE
|
|
360462
|
+
// 使用半透明的红色以达到透视效果
|
|
360463
|
+
})
|
|
360464
|
+
}
|
|
360465
|
+
}
|
|
360466
|
+
);
|
|
360467
|
+
}
|
|
360468
|
+
}
|
|
360469
|
+
//创建标注
|
|
360470
|
+
createLabel() {
|
|
360471
|
+
if (!this.highestPoint || !this.lowestPoint) {
|
|
360472
|
+
return;
|
|
360473
|
+
}
|
|
360474
|
+
let pointAheight = Cartographic.fromCartesian(this.highestPoint).height;
|
|
360475
|
+
let pointBheight = Cartographic.fromCartesian(this.lowestPoint).height;
|
|
360476
|
+
this.height = window.Math.abs(pointAheight - pointBheight);
|
|
360477
|
+
this.labelEntity = this.viewer.entities.add({
|
|
360478
|
+
position: this.highestPoint,
|
|
360479
|
+
// 经纬度 + 高度
|
|
360480
|
+
label: {
|
|
360481
|
+
text: this.height + "米",
|
|
360482
|
+
// 标签文字
|
|
360483
|
+
font: "20px sans-serif",
|
|
360484
|
+
// 字体大小和样式
|
|
360485
|
+
fillColor: Color$2.YELLOW,
|
|
360486
|
+
// 文字颜色
|
|
360487
|
+
outlineColor: Color$2.BLACK,
|
|
360488
|
+
// 轮廓颜色
|
|
360489
|
+
outlineWidth: 2,
|
|
360490
|
+
// 轮廓宽度
|
|
360491
|
+
style: LabelStyle$1.FILL_AND_OUTLINE,
|
|
360492
|
+
// 文字填充+描边
|
|
360493
|
+
pixelOffset: new Cartesian2(0, -20),
|
|
360494
|
+
// 像素偏移(调整位置)
|
|
360495
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
360496
|
+
}
|
|
360497
|
+
});
|
|
360498
|
+
}
|
|
360499
|
+
//重置
|
|
360500
|
+
reset() {
|
|
360501
|
+
this.highestPoint = void 0;
|
|
360502
|
+
this.lowestPoint = void 0;
|
|
360503
|
+
if (this.lineEntity) {
|
|
360504
|
+
this.viewer.entities.remove(this.lineEntity);
|
|
360505
|
+
this.lineEntity = void 0;
|
|
360506
|
+
}
|
|
360507
|
+
if (this.lowestPointEntity) {
|
|
360508
|
+
this.viewer.entities.remove(this.lowestPointEntity);
|
|
360509
|
+
this.lowestPointEntity = void 0;
|
|
360510
|
+
}
|
|
360511
|
+
if (this.highestPointEntity) {
|
|
360512
|
+
this.viewer.entities.remove(this.highestPointEntity);
|
|
360513
|
+
this.highestPointEntity = void 0;
|
|
360514
|
+
}
|
|
360515
|
+
if (this.labelEntity) {
|
|
360516
|
+
this.viewer.entities.remove(this.labelEntity);
|
|
360517
|
+
this.labelEntity = void 0;
|
|
360518
|
+
}
|
|
360519
|
+
this.height = 0;
|
|
360520
|
+
}
|
|
360521
|
+
destroy() {
|
|
360522
|
+
if (this.tooltipObj) {
|
|
360523
|
+
this.tooltipObj.destroy(this.viewer.canvas);
|
|
360524
|
+
this.tooltipObj = void 0;
|
|
360525
|
+
}
|
|
360526
|
+
this.reset();
|
|
360527
|
+
if (this.handler) {
|
|
360528
|
+
this.handler.destroy();
|
|
360529
|
+
this.handler = void 0;
|
|
360530
|
+
}
|
|
360531
|
+
}
|
|
360532
|
+
}
|
|
360533
|
+
const _sfc_main$3 = {
|
|
360534
|
+
name: "ToolHeightMeasurement",
|
|
360535
|
+
props: {
|
|
360536
|
+
visible: {
|
|
360537
|
+
type: Boolean,
|
|
360538
|
+
default: false
|
|
360539
|
+
},
|
|
360540
|
+
earthView: {
|
|
360541
|
+
type: CesiumAlphaViewer,
|
|
360542
|
+
default: null
|
|
360543
|
+
},
|
|
360544
|
+
style: {
|
|
360545
|
+
type: Object
|
|
360546
|
+
}
|
|
360547
|
+
},
|
|
360548
|
+
components: {
|
|
360549
|
+
CircleClose: circle_close_default,
|
|
360550
|
+
ElButton
|
|
360551
|
+
},
|
|
360552
|
+
emits: ["close"],
|
|
360553
|
+
setup(props, ctx) {
|
|
360554
|
+
let visible = ref(false);
|
|
360555
|
+
let earthView = toRaw(props.earthView);
|
|
360556
|
+
let measureHeightObj = ref(null);
|
|
360557
|
+
onMounted(() => {
|
|
360558
|
+
if (!earthView.viewer) {
|
|
360559
|
+
return;
|
|
360560
|
+
}
|
|
360561
|
+
visible.value = props.visible;
|
|
360562
|
+
watch(
|
|
360563
|
+
() => props.visible,
|
|
360564
|
+
(n, o) => {
|
|
360565
|
+
visible.value = props.visible;
|
|
360566
|
+
}
|
|
360567
|
+
);
|
|
360568
|
+
});
|
|
360569
|
+
function actionDraw() {
|
|
360570
|
+
if (!earthView.viewer) {
|
|
360571
|
+
return;
|
|
360572
|
+
}
|
|
360573
|
+
measureHeightObj.value = new HeightMeasurement(earthView.viewer);
|
|
360574
|
+
measureHeightObj.value.active();
|
|
360575
|
+
}
|
|
360576
|
+
function reset() {
|
|
360577
|
+
var _a2;
|
|
360578
|
+
(_a2 = measureHeightObj.value) == null ? void 0 : _a2.destroy();
|
|
360579
|
+
}
|
|
360580
|
+
function close() {
|
|
360581
|
+
reset();
|
|
360582
|
+
visible.value = false;
|
|
360583
|
+
ctx.emit("close", "HeightMeasurement");
|
|
360584
|
+
}
|
|
360585
|
+
onUnmounted(() => {
|
|
360586
|
+
reset();
|
|
360587
|
+
});
|
|
360588
|
+
return {
|
|
360589
|
+
visible,
|
|
360590
|
+
close,
|
|
360591
|
+
actionDraw,
|
|
360592
|
+
reset,
|
|
360593
|
+
measureHeightObj
|
|
360594
|
+
};
|
|
360595
|
+
}
|
|
360596
|
+
};
|
|
360597
|
+
const _hoisted_1$3 = { class: "header" };
|
|
360598
|
+
const _hoisted_2$3 = { class: "container" };
|
|
360599
|
+
const _hoisted_3$3 = { class: "actionSection" };
|
|
360600
|
+
const _hoisted_4$2 = { class: "actionSection" };
|
|
360601
|
+
const _hoisted_5$2 = { class: "actionSection" };
|
|
360602
|
+
function _sfc_render$3(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
360603
|
+
var _a2;
|
|
360604
|
+
const _component_CircleClose = resolveComponent("CircleClose");
|
|
360605
|
+
const _component_ElButton = resolveComponent("ElButton");
|
|
360606
|
+
return $setup.visible ? (openBlock(), createElementBlock("div", {
|
|
360607
|
+
key: 0,
|
|
360608
|
+
class: "component-ui",
|
|
360609
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
360610
|
+
}, [
|
|
360611
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
360612
|
+
_cache2[1] || (_cache2[1] = createElementVNode("span", null, "高度测量", -1)),
|
|
360613
|
+
createVNode(_component_CircleClose, {
|
|
360614
|
+
class: "closeBth",
|
|
360615
|
+
onClick: $setup.close
|
|
360616
|
+
}, null, 8, ["onClick"])
|
|
360617
|
+
]),
|
|
360618
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
360619
|
+
createElementVNode("section", _hoisted_3$3, [
|
|
360620
|
+
createVNode(_component_ElButton, {
|
|
360621
|
+
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.actionDraw())
|
|
360622
|
+
}, {
|
|
360623
|
+
default: withCtx(() => _cache2[2] || (_cache2[2] = [
|
|
360624
|
+
createTextVNode("开始选点")
|
|
360625
|
+
])),
|
|
360626
|
+
_: 1,
|
|
360627
|
+
__: [2]
|
|
360628
|
+
})
|
|
360629
|
+
]),
|
|
360630
|
+
createElementVNode("section", _hoisted_4$2, [
|
|
360631
|
+
createVNode(_component_ElButton, { onClick: $setup.reset }, {
|
|
360632
|
+
default: withCtx(() => _cache2[3] || (_cache2[3] = [
|
|
360633
|
+
createTextVNode("清除绘制")
|
|
360634
|
+
])),
|
|
360635
|
+
_: 1,
|
|
360636
|
+
__: [3]
|
|
360637
|
+
}, 8, ["onClick"])
|
|
360638
|
+
]),
|
|
360639
|
+
createElementVNode("section", _hoisted_5$2, [
|
|
360640
|
+
_cache2[4] || (_cache2[4] = createElementVNode("span", null, "高度:", -1)),
|
|
360641
|
+
createElementVNode("span", null, toDisplayString((((_a2 = $setup.measureHeightObj) == null ? void 0 : _a2.height) || 0) + "米"), 1)
|
|
360642
|
+
])
|
|
360643
|
+
])
|
|
360644
|
+
], 4)) : createCommentVNode("", true);
|
|
360645
|
+
}
|
|
360646
|
+
const Component$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-93920b20"]]);
|
|
360647
|
+
Component$3.install = (app) => {
|
|
360648
|
+
app.component(Component$3.name, Component$3);
|
|
360649
|
+
};
|
|
360650
|
+
const _sfc_main$2 = {
|
|
360651
|
+
name: "SceneController",
|
|
360652
|
+
components: {
|
|
360653
|
+
Menu: menu_default,
|
|
360654
|
+
ElTooltip
|
|
360655
|
+
},
|
|
360656
|
+
emits: ["sceneLoad", "changeScene"],
|
|
360657
|
+
props: {
|
|
360658
|
+
visible: {
|
|
360659
|
+
type: Boolean,
|
|
360660
|
+
default: false
|
|
360661
|
+
},
|
|
360662
|
+
earthView: {
|
|
360663
|
+
type: CesiumAlphaViewer,
|
|
360664
|
+
default: null
|
|
360665
|
+
},
|
|
360666
|
+
style: {
|
|
360667
|
+
type: Object
|
|
360668
|
+
},
|
|
360669
|
+
sceneInfo: {
|
|
360670
|
+
type: Array,
|
|
360671
|
+
default: []
|
|
360672
|
+
}
|
|
360673
|
+
},
|
|
360674
|
+
setup(props, ctx) {
|
|
360675
|
+
let earthViewer = props.earthView;
|
|
360676
|
+
let sceneInfo = ref(props.sceneInfo);
|
|
360677
|
+
let visibleStatus = ref(false);
|
|
360678
|
+
let loading2 = null;
|
|
360679
|
+
onMounted(() => {
|
|
360680
|
+
loadScene2(sceneInfo.value[0].sceneId);
|
|
360681
|
+
watch(() => props.sceneInfo, (n) => {
|
|
360682
|
+
sceneInfo.value = n;
|
|
360683
|
+
loadScene2(sceneInfo.value[0].sceneId);
|
|
360684
|
+
});
|
|
360685
|
+
});
|
|
360686
|
+
async function loadScene2(sceneId) {
|
|
360687
|
+
var _a2;
|
|
360688
|
+
ctx.emit("changeScene", sceneId);
|
|
360689
|
+
loading2 = ElLoading.service({
|
|
360690
|
+
target: ((_a2 = earthViewer.viewer) == null ? void 0 : _a2.canvas.parentElement) || void 0,
|
|
360691
|
+
lock: true,
|
|
360692
|
+
text: "图层渲染中...",
|
|
360693
|
+
fullscreen: true,
|
|
360694
|
+
background: "rgba(0, 0, 0, 0.5)",
|
|
360695
|
+
customClass: "test"
|
|
360696
|
+
});
|
|
360697
|
+
earthViewer.resetScene();
|
|
360698
|
+
let element = sceneInfo.value.find((scene) => {
|
|
360699
|
+
return scene.sceneId == sceneId;
|
|
360700
|
+
});
|
|
360701
|
+
if (element == null ? void 0 : element.layer) {
|
|
360702
|
+
await earthViewer.loadGeoJsonLayer(element == null ? void 0 : element.layer);
|
|
360703
|
+
}
|
|
360704
|
+
if (element == null ? void 0 : element.model) {
|
|
360705
|
+
await earthViewer.load3DtilestModel(element == null ? void 0 : element.model);
|
|
360706
|
+
}
|
|
360707
|
+
ctx.emit("sceneLoad", element == null ? void 0 : element.sceneId);
|
|
360708
|
+
loading2.close();
|
|
360709
|
+
}
|
|
360710
|
+
return {
|
|
360711
|
+
sceneInfo,
|
|
360712
|
+
visibleStatus,
|
|
360713
|
+
loadScene: loadScene2
|
|
360714
|
+
};
|
|
360715
|
+
}
|
|
360716
|
+
};
|
|
360717
|
+
const _hoisted_1$2 = { key: 0 };
|
|
360718
|
+
const _hoisted_2$2 = ["onClick"];
|
|
360719
|
+
const _hoisted_3$2 = ["src"];
|
|
360720
|
+
function _sfc_render$2(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
360721
|
+
const _component_Menu = resolveComponent("Menu");
|
|
360722
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
360723
|
+
return _ctx.$props.visible ? (openBlock(), createElementBlock("div", {
|
|
360724
|
+
key: 0,
|
|
360725
|
+
class: "component-ui",
|
|
360726
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
360727
|
+
}, [
|
|
360728
|
+
createVNode(_component_el_tooltip, {
|
|
360729
|
+
class: "box-item",
|
|
360730
|
+
effect: "dark",
|
|
360731
|
+
content: "场景控制",
|
|
360732
|
+
placement: "top"
|
|
360733
|
+
}, {
|
|
360734
|
+
default: withCtx(() => [
|
|
360735
|
+
createElementVNode("section", {
|
|
360736
|
+
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.visibleStatus = !$setup.visibleStatus)
|
|
360737
|
+
}, [
|
|
360738
|
+
createVNode(_component_Menu, { class: "icon" })
|
|
360739
|
+
])
|
|
360740
|
+
]),
|
|
360741
|
+
_: 1
|
|
360742
|
+
}),
|
|
360743
|
+
createVNode(Transition, { name: "slide-fade" }, {
|
|
360744
|
+
default: withCtx(() => [
|
|
360745
|
+
$setup.visibleStatus ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
360746
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.sceneInfo, (item) => {
|
|
360747
|
+
return openBlock(), createBlock(_component_el_tooltip, {
|
|
360748
|
+
effect: "dark",
|
|
360749
|
+
content: item.sceneName,
|
|
360750
|
+
placement: "top"
|
|
360751
|
+
}, {
|
|
360752
|
+
default: withCtx(() => [
|
|
360753
|
+
createElementVNode("section", {
|
|
360754
|
+
class: "box-item",
|
|
360755
|
+
onClick: ($event) => $setup.loadScene(item.sceneId)
|
|
360756
|
+
}, [
|
|
360757
|
+
createElementVNode("img", {
|
|
360758
|
+
class: "icon",
|
|
360759
|
+
src: item.sceneImg
|
|
360760
|
+
}, null, 8, _hoisted_3$2)
|
|
360761
|
+
], 8, _hoisted_2$2)
|
|
360762
|
+
]),
|
|
360763
|
+
_: 2
|
|
360764
|
+
}, 1032, ["content"]);
|
|
360765
|
+
}), 256))
|
|
360766
|
+
])) : createCommentVNode("", true)
|
|
360767
|
+
]),
|
|
360768
|
+
_: 1
|
|
360769
|
+
})
|
|
360770
|
+
], 4)) : createCommentVNode("", true);
|
|
360771
|
+
}
|
|
360772
|
+
const Component$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-a2447328"]]);
|
|
360773
|
+
Component$2.install = (app) => {
|
|
360774
|
+
app.component(Component$2.name, Component$2);
|
|
360775
|
+
};
|
|
360776
|
+
const _sfc_main$1 = {
|
|
360777
|
+
name: "ToolLayerController",
|
|
360778
|
+
props: {
|
|
360779
|
+
visible: {
|
|
360780
|
+
type: Boolean,
|
|
360781
|
+
default: false
|
|
360782
|
+
},
|
|
360783
|
+
earthView: {
|
|
360784
|
+
type: CesiumAlphaViewer,
|
|
360785
|
+
default: null
|
|
360786
|
+
},
|
|
360787
|
+
style: {
|
|
360788
|
+
type: Object
|
|
360789
|
+
}
|
|
360790
|
+
},
|
|
360791
|
+
components: {
|
|
360792
|
+
CircleClose: circle_close_default,
|
|
360793
|
+
ElButton,
|
|
360794
|
+
Search: search_default,
|
|
360795
|
+
ElInput,
|
|
360796
|
+
ElCheckboxGroup,
|
|
360797
|
+
ElCheckbox,
|
|
360798
|
+
ElEmpty
|
|
360799
|
+
},
|
|
360800
|
+
emits: ["close"],
|
|
360801
|
+
setup(props, ctx) {
|
|
360802
|
+
let visible = ref(false);
|
|
360803
|
+
let earthView = toRaw(props.earthView);
|
|
360804
|
+
let searchInput = ref("");
|
|
360805
|
+
let layerInfoArray = ref([]);
|
|
360806
|
+
onMounted(() => {
|
|
360807
|
+
visible.value = props.visible;
|
|
360808
|
+
layerInfoArray.value = initLayers();
|
|
360809
|
+
watch(() => props.visible, (n, o) => {
|
|
360810
|
+
visible.value = props.visible;
|
|
360811
|
+
});
|
|
360812
|
+
});
|
|
360813
|
+
function initLayers() {
|
|
360814
|
+
let initLayers2 = [];
|
|
360815
|
+
earthView.layerDatasource.forEach((layer) => {
|
|
360816
|
+
console.log(layer, "lase");
|
|
360817
|
+
initLayers2.push({
|
|
360818
|
+
layerId: layer.uid,
|
|
360819
|
+
layerName: layer.name || "",
|
|
360820
|
+
layerShow: layer.show,
|
|
360821
|
+
layerPrimitive: layer.primitiveCollection
|
|
360822
|
+
});
|
|
360823
|
+
});
|
|
360824
|
+
return initLayers2;
|
|
360825
|
+
}
|
|
360826
|
+
function searchLayer() {
|
|
360827
|
+
let layersList = initLayers();
|
|
360828
|
+
if (searchInput.value.length > 0) {
|
|
360829
|
+
layerInfoArray.value = layersList.filter((layerInfo) => {
|
|
360830
|
+
return layerInfo.layerName.toLowerCase().includes(searchInput.value.toLowerCase());
|
|
360831
|
+
});
|
|
360832
|
+
} else {
|
|
360833
|
+
layerInfoArray.value = layersList;
|
|
360834
|
+
}
|
|
360835
|
+
}
|
|
360836
|
+
function changeVisible(layerInfo) {
|
|
360837
|
+
let element = lodashExports.find(props.earthView.layerDatasource, { "uid": layerInfo.layerId });
|
|
360838
|
+
if (element) {
|
|
360839
|
+
element.show = layerInfo.layerShow;
|
|
360840
|
+
}
|
|
360841
|
+
}
|
|
360842
|
+
function close() {
|
|
360843
|
+
ctx.emit("close", "LayerController");
|
|
360844
|
+
}
|
|
360845
|
+
return {
|
|
360846
|
+
visible,
|
|
360847
|
+
close,
|
|
360848
|
+
searchInput,
|
|
360849
|
+
Search: search_default,
|
|
360850
|
+
layerInfoArray,
|
|
360851
|
+
changeVisible,
|
|
360852
|
+
searchLayer
|
|
360853
|
+
};
|
|
360854
|
+
}
|
|
360855
|
+
};
|
|
360856
|
+
const _hoisted_1$1 = { class: "header" };
|
|
360857
|
+
const _hoisted_2$1 = { class: "container" };
|
|
360858
|
+
const _hoisted_3$1 = { class: "searchInput" };
|
|
360859
|
+
const _hoisted_4$1 = { class: "layerContainer" };
|
|
360860
|
+
const _hoisted_5$1 = { class: "section" };
|
|
360861
|
+
function _sfc_render$1(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
360862
|
+
const _component_CircleClose = resolveComponent("CircleClose");
|
|
360863
|
+
const _component_el_input = resolveComponent("el-input");
|
|
360864
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
360865
|
+
const _component_el_empty = resolveComponent("el-empty");
|
|
360866
|
+
return openBlock(), createBlock(Transition, { name: "slide-fade" }, {
|
|
360867
|
+
default: withCtx(() => [
|
|
360868
|
+
$setup.visible ? (openBlock(), createElementBlock("div", {
|
|
360869
|
+
key: 0,
|
|
360870
|
+
class: "component-ui",
|
|
360871
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
360872
|
+
}, [
|
|
360873
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
360874
|
+
_cache2[1] || (_cache2[1] = createElementVNode("span", null, "图层控制", -1)),
|
|
360875
|
+
createVNode(_component_CircleClose, {
|
|
360876
|
+
class: "closeBth",
|
|
360877
|
+
onClick: $setup.close
|
|
360878
|
+
}, null, 8, ["onClick"])
|
|
360879
|
+
]),
|
|
360880
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
360881
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
360882
|
+
_cache2[2] || (_cache2[2] = createElementVNode("span", null, "搜索:", -1)),
|
|
360883
|
+
createVNode(_component_el_input, {
|
|
360884
|
+
modelValue: $setup.searchInput,
|
|
360885
|
+
"onUpdate:modelValue": _cache2[0] || (_cache2[0] = ($event) => $setup.searchInput = $event),
|
|
360886
|
+
placeholder: "搜索图层",
|
|
360887
|
+
class: "searchComponent",
|
|
360888
|
+
"suffix-icon": $setup.Search,
|
|
360889
|
+
onInput: $setup.searchLayer
|
|
360890
|
+
}, null, 8, ["modelValue", "suffix-icon", "onInput"])
|
|
360891
|
+
]),
|
|
360892
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
360893
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.layerInfoArray, (layer) => {
|
|
360894
|
+
return openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
360895
|
+
(openBlock(), createBlock(_component_el_checkbox, {
|
|
360896
|
+
class: "checkboxStyle",
|
|
360897
|
+
key: layer.layerId,
|
|
360898
|
+
label: layer.layerName,
|
|
360899
|
+
value: layer.layerId,
|
|
360900
|
+
modelValue: layer.layerShow,
|
|
360901
|
+
"onUpdate:modelValue": ($event) => layer.layerShow = $event,
|
|
360902
|
+
onChange: ($event) => $setup.changeVisible(layer)
|
|
360903
|
+
}, {
|
|
360904
|
+
default: withCtx(() => [
|
|
360905
|
+
createTextVNode(toDisplayString(layer.layerName), 1)
|
|
360906
|
+
]),
|
|
360907
|
+
_: 2
|
|
360908
|
+
}, 1032, ["label", "value", "modelValue", "onUpdate:modelValue", "onChange"]))
|
|
360909
|
+
]);
|
|
360910
|
+
}), 256)),
|
|
360911
|
+
$setup.layerInfoArray.length == 0 ? (openBlock(), createBlock(_component_el_empty, {
|
|
360912
|
+
key: 0,
|
|
360913
|
+
description: "当前无图层!"
|
|
360914
|
+
})) : createCommentVNode("", true)
|
|
360915
|
+
])
|
|
360916
|
+
])
|
|
360917
|
+
], 4)) : createCommentVNode("", true)
|
|
360918
|
+
]),
|
|
360919
|
+
_: 1
|
|
360920
|
+
});
|
|
360921
|
+
}
|
|
360922
|
+
const Component$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-1bb73d0e"]]);
|
|
360923
|
+
Component$1.install = (app) => {
|
|
360924
|
+
app.component(Component$1.name, Component$1);
|
|
360925
|
+
};
|
|
360926
|
+
const _sfc_main = {
|
|
360927
|
+
name: "Search",
|
|
360928
|
+
components: {
|
|
360929
|
+
ElSelect,
|
|
360930
|
+
ElOption,
|
|
360931
|
+
ArrowDown: arrow_down_default,
|
|
360932
|
+
ZoomIn: zoom_in_default,
|
|
360933
|
+
ElInput,
|
|
360934
|
+
ElButton
|
|
360935
|
+
},
|
|
360936
|
+
props: {
|
|
360937
|
+
visible: {
|
|
360938
|
+
type: Boolean,
|
|
360939
|
+
default: false
|
|
360940
|
+
},
|
|
360941
|
+
earthView: {
|
|
360942
|
+
type: CesiumAlphaViewer,
|
|
360943
|
+
default: null
|
|
360944
|
+
},
|
|
360945
|
+
style: {
|
|
360946
|
+
type: Object
|
|
360947
|
+
}
|
|
360948
|
+
},
|
|
360949
|
+
setup(props, ctx) {
|
|
360950
|
+
let earthViewer = toRaw(props.earthView);
|
|
360951
|
+
let selectLayerValue = ref();
|
|
360952
|
+
let layerOptions = ref([]);
|
|
360953
|
+
let searchInput = ref("");
|
|
360954
|
+
let resultOption = ref([]);
|
|
360955
|
+
let layerShow = ref(false);
|
|
360956
|
+
let selectedFeature = ref();
|
|
360957
|
+
let featureResults = ref([]);
|
|
360958
|
+
onMounted(() => {
|
|
360959
|
+
layerOptions.value = earthViewer.layerDatasource;
|
|
360960
|
+
});
|
|
360961
|
+
function searchFun(e) {
|
|
360962
|
+
const regex2 = new RegExp(e, "i");
|
|
360963
|
+
featureResults.value = [];
|
|
360964
|
+
if (selectLayerValue.value) {
|
|
360965
|
+
console.log(selectLayerValue.value, "selectLayerValue.value");
|
|
360966
|
+
selectLayerValue.value._featureItem.forEach((item) => {
|
|
360967
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
360968
|
+
if (item.properties) {
|
|
360969
|
+
let fieldsValue = item.properties[((_c = (_b = (_a2 = selectLayerValue.value) == null ? void 0 : _a2.option.point) == null ? void 0 : _b.label) == null ? void 0 : _c.fieldKey) || ((_f = (_e = (_d = selectLayerValue.value) == null ? void 0 : _d.option.polygon) == null ? void 0 : _e.label) == null ? void 0 : _f.fieldKey) || ((_i = (_h = (_g = selectLayerValue.value) == null ? void 0 : _g.option.polyline) == null ? void 0 : _h.label) == null ? void 0 : _i.fieldKey) || "INDEXNAME"];
|
|
360970
|
+
let ispush = regex2.test(fieldsValue);
|
|
360971
|
+
if (ispush) {
|
|
360972
|
+
featureResults.value.push({
|
|
360973
|
+
label: fieldsValue,
|
|
360974
|
+
value: item.id
|
|
360975
|
+
});
|
|
360976
|
+
}
|
|
360977
|
+
}
|
|
360978
|
+
});
|
|
360979
|
+
} else {
|
|
360980
|
+
earthViewer.layerDatasource.forEach((layer) => {
|
|
360981
|
+
if (!layer.show) {
|
|
360982
|
+
return;
|
|
360983
|
+
}
|
|
360984
|
+
layer.featureItem.forEach((item) => {
|
|
360985
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
360986
|
+
if (item.properties) {
|
|
360987
|
+
let fieldsValue = item.properties[((_c = (_b = (_a2 = selectLayerValue.value) == null ? void 0 : _a2.option.point) == null ? void 0 : _b.label) == null ? void 0 : _c.fieldKey) || ((_f = (_e = (_d = selectLayerValue.value) == null ? void 0 : _d.option.polygon) == null ? void 0 : _e.label) == null ? void 0 : _f.fieldKey) || "INDEXNAME"];
|
|
360988
|
+
let ispush = regex2.test(fieldsValue);
|
|
360989
|
+
if (ispush) {
|
|
360990
|
+
featureResults.value.push({
|
|
360991
|
+
label: fieldsValue,
|
|
360992
|
+
value: item.id
|
|
360993
|
+
});
|
|
360994
|
+
}
|
|
360995
|
+
}
|
|
360996
|
+
});
|
|
360997
|
+
});
|
|
360998
|
+
}
|
|
360999
|
+
}
|
|
361000
|
+
function changeSelect(uid) {
|
|
361001
|
+
var _a2, _b;
|
|
361002
|
+
if (selectLayerValue.value) {
|
|
361003
|
+
let res = selectLayerValue.value.findFeatureById(uid);
|
|
361004
|
+
if ((res == null ? void 0 : res.type) == "Point") {
|
|
361005
|
+
if ((_a2 = res.center) == null ? void 0 : _a2.cartesian3) {
|
|
361006
|
+
let bound = BoundingSphere.fromPoints([(_b = res.center) == null ? void 0 : _b.cartesian3]);
|
|
361007
|
+
earthViewer.goTo(bound);
|
|
361008
|
+
}
|
|
361009
|
+
}
|
|
361010
|
+
if ((res == null ? void 0 : res.type) == "Polygon") {
|
|
361011
|
+
let bound = BoundingSphere.fromPoints(res.positions);
|
|
361012
|
+
earthViewer.goTo(bound);
|
|
361013
|
+
}
|
|
361014
|
+
if ((res == null ? void 0 : res.type) == "Polyline") {
|
|
361015
|
+
let bound = BoundingSphere.fromPoints(res.positions);
|
|
361016
|
+
earthViewer.goTo(bound);
|
|
361017
|
+
}
|
|
361018
|
+
} else {
|
|
361019
|
+
earthViewer.layerDatasource.forEach((layer) => {
|
|
361020
|
+
var _a3, _b2;
|
|
361021
|
+
let res = layer.findFeatureById(uid);
|
|
361022
|
+
if ((res == null ? void 0 : res.type) == "Point") {
|
|
361023
|
+
if ((_a3 = res.center) == null ? void 0 : _a3.cartesian3) {
|
|
361024
|
+
let bound = BoundingSphere.fromPoints([(_b2 = res.center) == null ? void 0 : _b2.cartesian3]);
|
|
361025
|
+
earthViewer.goTo(bound);
|
|
361026
|
+
}
|
|
361027
|
+
}
|
|
361028
|
+
if ((res == null ? void 0 : res.type) == "Polygon") {
|
|
361029
|
+
let bound = BoundingSphere.fromPoints(res.positions);
|
|
361030
|
+
earthViewer.goTo(bound);
|
|
361031
|
+
}
|
|
361032
|
+
if ((res == null ? void 0 : res.type) == "Polyline") {
|
|
361033
|
+
let bound = BoundingSphere.fromPoints(res.positions);
|
|
361034
|
+
earthViewer.goTo(bound);
|
|
361035
|
+
}
|
|
361036
|
+
});
|
|
361037
|
+
}
|
|
361038
|
+
selectedFeature.value = void 0;
|
|
361039
|
+
}
|
|
361040
|
+
function selectedLayer(layer) {
|
|
361041
|
+
featureResults.value = [];
|
|
361042
|
+
selectLayerValue.value = layer;
|
|
361043
|
+
}
|
|
361044
|
+
return {
|
|
361045
|
+
selectLayerValue,
|
|
361046
|
+
layerOptions,
|
|
361047
|
+
searchInput,
|
|
361048
|
+
resultOption,
|
|
361049
|
+
layerShow,
|
|
361050
|
+
selectedLayer,
|
|
361051
|
+
searchFun,
|
|
361052
|
+
selectedFeature,
|
|
361053
|
+
featureResults,
|
|
361054
|
+
changeSelect
|
|
361055
|
+
};
|
|
361056
|
+
}
|
|
361057
|
+
};
|
|
361058
|
+
const _hoisted_1 = { class: "textSpan" };
|
|
361059
|
+
const _hoisted_2 = {
|
|
361060
|
+
key: 0,
|
|
361061
|
+
class: "dropDownLayer"
|
|
361062
|
+
};
|
|
361063
|
+
const _hoisted_3 = ["onClick"];
|
|
361064
|
+
const _hoisted_4 = { class: "rightInput" };
|
|
361065
|
+
const _hoisted_5 = { class: "endSearchBth" };
|
|
361066
|
+
function _sfc_render(_ctx, _cache2, $props, $setup, $data, $options) {
|
|
361067
|
+
const _component_ArrowDown = resolveComponent("ArrowDown");
|
|
361068
|
+
const _component_el_option = resolveComponent("el-option");
|
|
361069
|
+
const _component_el_select = resolveComponent("el-select");
|
|
361070
|
+
const _component_ZoomIn = resolveComponent("ZoomIn");
|
|
361071
|
+
return openBlock(), createElementBlock("div", {
|
|
361072
|
+
class: "container",
|
|
361073
|
+
style: normalizeStyle(_ctx.$props.style)
|
|
361074
|
+
}, [
|
|
361075
|
+
createElementVNode("section", {
|
|
361076
|
+
class: "leftSelect",
|
|
361077
|
+
onMouseover: _cache2[1] || (_cache2[1] = ($event) => $setup.layerShow = true),
|
|
361078
|
+
onMouseleave: _cache2[2] || (_cache2[2] = ($event) => $setup.layerShow = false)
|
|
361079
|
+
}, [
|
|
361080
|
+
createElementVNode("span", _hoisted_1, toDisplayString($setup.selectLayerValue == void 0 ? "全部" : $setup.selectLayerValue.name), 1),
|
|
361081
|
+
createVNode(_component_ArrowDown, { class: "icon" }),
|
|
361082
|
+
createVNode(Transition, null, {
|
|
361083
|
+
default: withCtx(() => [
|
|
361084
|
+
$setup.layerShow ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
361085
|
+
createElementVNode("section", {
|
|
361086
|
+
class: "layerInfoContainer",
|
|
361087
|
+
onClick: _cache2[0] || (_cache2[0] = ($event) => $setup.selectedLayer(void 0))
|
|
361088
|
+
}, _cache2[4] || (_cache2[4] = [
|
|
361089
|
+
createElementVNode("span", null, "全部", -1)
|
|
361090
|
+
])),
|
|
361091
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.layerOptions, (layer) => {
|
|
361092
|
+
return openBlock(), createElementBlock("section", {
|
|
361093
|
+
class: "layerInfoContainer",
|
|
361094
|
+
onClick: ($event) => $setup.selectedLayer(layer)
|
|
361095
|
+
}, [
|
|
361096
|
+
createElementVNode("span", null, toDisplayString(layer.name), 1)
|
|
361097
|
+
], 8, _hoisted_3);
|
|
361098
|
+
}), 256))
|
|
361099
|
+
])) : createCommentVNode("", true)
|
|
361100
|
+
]),
|
|
361101
|
+
_: 1
|
|
361102
|
+
})
|
|
361103
|
+
], 32),
|
|
361104
|
+
createElementVNode("section", _hoisted_4, [
|
|
361105
|
+
createVNode(_component_el_select, {
|
|
361106
|
+
class: "elSelect",
|
|
361107
|
+
modelValue: $setup.selectedFeature,
|
|
361108
|
+
"onUpdate:modelValue": _cache2[3] || (_cache2[3] = ($event) => $setup.selectedFeature = $event),
|
|
361109
|
+
filterable: "",
|
|
361110
|
+
remote: "",
|
|
361111
|
+
"reserve-keyword": "",
|
|
361112
|
+
placeholder: "请输入要素名称",
|
|
361113
|
+
"remote-method": $setup.searchFun,
|
|
361114
|
+
onChange: $setup.changeSelect,
|
|
361115
|
+
empty: "'当前无要素'"
|
|
361116
|
+
}, {
|
|
361117
|
+
empty: withCtx(() => _cache2[5] || (_cache2[5] = [
|
|
361118
|
+
createElementVNode("span", null, "没有找到该要素!!", -1)
|
|
361119
|
+
])),
|
|
361120
|
+
default: withCtx(() => [
|
|
361121
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.featureResults.slice(0, 20), (item) => {
|
|
361122
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
361123
|
+
key: item.value,
|
|
361124
|
+
label: item.label,
|
|
361125
|
+
value: item.value
|
|
361126
|
+
}, null, 8, ["label", "value"]);
|
|
361127
|
+
}), 128))
|
|
361128
|
+
]),
|
|
361129
|
+
_: 1
|
|
361130
|
+
}, 8, ["modelValue", "remote-method", "onChange"])
|
|
361131
|
+
]),
|
|
361132
|
+
createElementVNode("section", _hoisted_5, [
|
|
361133
|
+
createVNode(_component_ZoomIn, { class: "icon" })
|
|
361134
|
+
])
|
|
361135
|
+
], 4);
|
|
361136
|
+
}
|
|
361137
|
+
const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6d886800"]]);
|
|
358857
361138
|
Component.install = (app) => {
|
|
358858
361139
|
app.component(Component.name, Component);
|
|
358859
361140
|
};
|
|
358860
|
-
let comps = [Component$1, Component];
|
|
361141
|
+
let comps = [Component$8, Component$7, Component$6, Component$5, Component$4, Component$3, Component$2, Component$1, Component];
|
|
358861
361142
|
const AlphaCesiumComponent = (Vue) => {
|
|
358862
361143
|
comps.map((component) => {
|
|
358863
361144
|
Vue.component("Alpha" + component.name, component);
|