qy-vue-plugins 1.0.3 → 1.0.4
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, createElementBlock as g, openBlock as r, createElementVNode as s, unref as a, computed as Q, normalizeClass as M, createCommentVNode as b, normalizeStyle as Ge, renderSlot as X, createVNode as p, toDisplayString as B, useTemplateRef as Oe, ref as v, watch as je, provide as E, onMounted as Ae, onUnmounted as We, Fragment as z, Transition as Je, withCtx as T, renderList as he, createBlock as R, createTextVNode as H } from "vue";
|
|
2
2
|
import { MoreFilled as Xe, Folder as He, FolderOpened as Ye, Filter as Ze } from "@element-plus/icons-vue";
|
|
3
|
-
import { d as ge, c as ke, s as _e, a as
|
|
3
|
+
import { d as ge, c as ke, s as _e, a as Te, b as Le, e as P, t as Y, l as Qe } from "../../chunks/EventKeys-DZ_Hahro.js";
|
|
4
4
|
import { d as el, r as ll, s as tl, g as al, p as sl } from "../../chunks/ProvideKeys-CBXsWszp.js";
|
|
5
5
|
import { u as ol } from "../../chunks/mapStore-Eu13mnJg.js";
|
|
6
6
|
import nl from "../widgets/LegendPoint.mjs";
|
|
@@ -12,131 +12,132 @@ import fl from "../widgets/LegendPopInterestPoint.mjs";
|
|
|
12
12
|
import pl from "../widgets/LegendPopLine.mjs";
|
|
13
13
|
import dl from "../widgets/ShapeDialog.mjs";
|
|
14
14
|
import ml from "../widgets/TopicItemPop.mjs";
|
|
15
|
-
import { ElCheckboxGroup as yl, ElCollapse as vl, ElCollapseItem as hl, ElCheckbox as gl, ElButton as kl, ElIcon as Z, ElMessage as
|
|
15
|
+
import { ElCheckboxGroup as yl, ElCollapse as vl, ElCollapseItem as hl, ElCheckbox as gl, ElButton as kl, ElIcon as Z, ElMessage as $ } from "element-plus";
|
|
16
16
|
import _l from "../widgets/LayerDialog.mjs";
|
|
17
|
-
import { storeToRefs as
|
|
18
|
-
import { M as
|
|
17
|
+
import { storeToRefs as Tl } from "pinia";
|
|
18
|
+
import { M as Ll } from "../../chunks/mapSetting-B1a88k-v.js";
|
|
19
19
|
import { b as Cl } from "../../chunks/index-Cyrc4mj-.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { u as El } from "../../chunks/
|
|
23
|
-
import {
|
|
24
|
-
|
|
20
|
+
import { E as wl } from "../../chunks/index-Cv_K9rbv.js";
|
|
21
|
+
import { _ as Ce, u as xl, w as Pl } from "../../chunks/aria-BEkkcjlH.js";
|
|
22
|
+
import { u as we, q as Sl, w as El } from "../../chunks/style-COMeMpO8.js";
|
|
23
|
+
import { u as Rl } from "../../chunks/index-_At9ftZd.js";
|
|
24
|
+
import { _ as $l } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
25
|
+
const Dl = V({
|
|
25
26
|
name: "ImgEmpty"
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
setup(
|
|
29
|
-
const m = we("empty"), k =
|
|
30
|
-
return (x,
|
|
27
|
+
}), Nl = /* @__PURE__ */ V({
|
|
28
|
+
...Dl,
|
|
29
|
+
setup(q) {
|
|
30
|
+
const m = we("empty"), k = xl();
|
|
31
|
+
return (x, D) => (r(), g("svg", {
|
|
31
32
|
viewBox: "0 0 79 86",
|
|
32
33
|
version: "1.1",
|
|
33
34
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
35
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id: `linearGradient-1-${
|
|
37
|
+
s("defs", null, [
|
|
38
|
+
s("linearGradient", {
|
|
39
|
+
id: `linearGradient-1-${a(k)}`,
|
|
39
40
|
x1: "38.8503086%",
|
|
40
41
|
y1: "0%",
|
|
41
42
|
x2: "61.1496914%",
|
|
42
43
|
y2: "100%"
|
|
43
44
|
}, [
|
|
44
|
-
|
|
45
|
-
"stop-color": `var(${
|
|
45
|
+
s("stop", {
|
|
46
|
+
"stop-color": `var(${a(m).cssVarBlockName("fill-color-1")})`,
|
|
46
47
|
offset: "0%"
|
|
47
48
|
}, null, 8, ["stop-color"]),
|
|
48
|
-
|
|
49
|
-
"stop-color": `var(${
|
|
49
|
+
s("stop", {
|
|
50
|
+
"stop-color": `var(${a(m).cssVarBlockName("fill-color-4")})`,
|
|
50
51
|
offset: "100%"
|
|
51
52
|
}, null, 8, ["stop-color"])
|
|
52
53
|
], 8, ["id"]),
|
|
53
|
-
|
|
54
|
-
id: `linearGradient-2-${
|
|
54
|
+
s("linearGradient", {
|
|
55
|
+
id: `linearGradient-2-${a(k)}`,
|
|
55
56
|
x1: "0%",
|
|
56
57
|
y1: "9.5%",
|
|
57
58
|
x2: "100%",
|
|
58
59
|
y2: "90.5%"
|
|
59
60
|
}, [
|
|
60
|
-
|
|
61
|
-
"stop-color": `var(${
|
|
61
|
+
s("stop", {
|
|
62
|
+
"stop-color": `var(${a(m).cssVarBlockName("fill-color-1")})`,
|
|
62
63
|
offset: "0%"
|
|
63
64
|
}, null, 8, ["stop-color"]),
|
|
64
|
-
|
|
65
|
-
"stop-color": `var(${
|
|
65
|
+
s("stop", {
|
|
66
|
+
"stop-color": `var(${a(m).cssVarBlockName("fill-color-6")})`,
|
|
66
67
|
offset: "100%"
|
|
67
68
|
}, null, 8, ["stop-color"])
|
|
68
69
|
], 8, ["id"]),
|
|
69
|
-
|
|
70
|
-
id: `path-3-${
|
|
70
|
+
s("rect", {
|
|
71
|
+
id: `path-3-${a(k)}`,
|
|
71
72
|
x: "0",
|
|
72
73
|
y: "0",
|
|
73
74
|
width: "17",
|
|
74
75
|
height: "36"
|
|
75
76
|
}, null, 8, ["id"])
|
|
76
77
|
]),
|
|
77
|
-
|
|
78
|
+
s("g", {
|
|
78
79
|
stroke: "none",
|
|
79
80
|
"stroke-width": "1",
|
|
80
81
|
fill: "none",
|
|
81
82
|
"fill-rule": "evenodd"
|
|
82
83
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
s("g", { transform: "translate(-1268.000000, -535.000000)" }, [
|
|
85
|
+
s("g", { transform: "translate(1268.000000, 535.000000)" }, [
|
|
86
|
+
s("path", {
|
|
86
87
|
d: "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
|
|
87
|
-
fill: `var(${
|
|
88
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-3")})`
|
|
88
89
|
}, null, 8, ["fill"]),
|
|
89
|
-
|
|
90
|
-
fill: `var(${
|
|
90
|
+
s("polygon", {
|
|
91
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-7")})`,
|
|
91
92
|
transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
|
|
92
93
|
points: "13 58 53 58 42 45 2 45"
|
|
93
94
|
}, null, 8, ["fill"]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
fill: `var(${
|
|
95
|
+
s("g", { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" }, [
|
|
96
|
+
s("polygon", {
|
|
97
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-7")})`,
|
|
97
98
|
transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
|
|
98
99
|
points: "2.84078316e-14 3 18 3 23 7 5 7"
|
|
99
100
|
}, null, 8, ["fill"]),
|
|
100
|
-
|
|
101
|
-
fill: `var(${
|
|
101
|
+
s("polygon", {
|
|
102
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-5")})`,
|
|
102
103
|
points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
|
|
103
104
|
}, null, 8, ["fill"]),
|
|
104
|
-
|
|
105
|
-
fill: `url(#linearGradient-1-${
|
|
105
|
+
s("rect", {
|
|
106
|
+
fill: `url(#linearGradient-1-${a(k)})`,
|
|
106
107
|
transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
|
|
107
108
|
x: "38",
|
|
108
109
|
y: "7",
|
|
109
110
|
width: "17",
|
|
110
111
|
height: "36"
|
|
111
112
|
}, null, 8, ["fill"]),
|
|
112
|
-
|
|
113
|
-
fill: `var(${
|
|
113
|
+
s("polygon", {
|
|
114
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-2")})`,
|
|
114
115
|
transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
|
|
115
116
|
points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
|
|
116
117
|
}, null, 8, ["fill"])
|
|
117
118
|
]),
|
|
118
|
-
|
|
119
|
-
fill: `url(#linearGradient-2-${
|
|
119
|
+
s("rect", {
|
|
120
|
+
fill: `url(#linearGradient-2-${a(k)})`,
|
|
120
121
|
x: "13",
|
|
121
122
|
y: "45",
|
|
122
123
|
width: "40",
|
|
123
124
|
height: "36"
|
|
124
125
|
}, null, 8, ["fill"]),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
fill: `var(${
|
|
126
|
+
s("g", { transform: "translate(53.000000, 45.000000)" }, [
|
|
127
|
+
s("use", {
|
|
128
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-8")})`,
|
|
128
129
|
transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
|
|
129
|
-
"xlink:href": `#path-3-${
|
|
130
|
+
"xlink:href": `#path-3-${a(k)}`
|
|
130
131
|
}, null, 8, ["fill", "xlink:href"]),
|
|
131
|
-
|
|
132
|
-
fill: `var(${
|
|
133
|
-
mask: `url(#mask-4-${
|
|
132
|
+
s("polygon", {
|
|
133
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-9")})`,
|
|
134
|
+
mask: `url(#mask-4-${a(k)})`,
|
|
134
135
|
transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
|
|
135
136
|
points: "7 0 24 0 20 18 7 16.5"
|
|
136
137
|
}, null, 8, ["fill", "mask"])
|
|
137
138
|
]),
|
|
138
|
-
|
|
139
|
-
fill: `var(${
|
|
139
|
+
s("polygon", {
|
|
140
|
+
fill: `var(${a(m).cssVarBlockName("fill-color-2")})`,
|
|
140
141
|
transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
|
|
141
142
|
points: "62 45 79 45 70 58 53 58"
|
|
142
143
|
}, null, 8, ["fill"])
|
|
@@ -146,8 +147,8 @@ const $l = b({
|
|
|
146
147
|
]));
|
|
147
148
|
}
|
|
148
149
|
});
|
|
149
|
-
var
|
|
150
|
-
const
|
|
150
|
+
var Bl = /* @__PURE__ */ Ce(Nl, [["__file", "img-empty.vue"]]);
|
|
151
|
+
const bl = Sl({
|
|
151
152
|
image: {
|
|
152
153
|
type: String,
|
|
153
154
|
default: ""
|
|
@@ -157,71 +158,71 @@ const Bl = Pl({
|
|
|
157
158
|
type: String,
|
|
158
159
|
default: ""
|
|
159
160
|
}
|
|
160
|
-
}),
|
|
161
|
+
}), Vl = V({
|
|
161
162
|
name: "ElEmpty"
|
|
162
|
-
}),
|
|
163
|
-
...
|
|
164
|
-
props:
|
|
165
|
-
setup(
|
|
166
|
-
const m =
|
|
167
|
-
width:
|
|
163
|
+
}), ql = /* @__PURE__ */ V({
|
|
164
|
+
...Vl,
|
|
165
|
+
props: bl,
|
|
166
|
+
setup(q) {
|
|
167
|
+
const m = q, { t: k } = Rl(), x = we("empty"), D = Q(() => m.description || k("el.table.emptyText")), K = Q(() => ({
|
|
168
|
+
width: El(m.imageSize)
|
|
168
169
|
}));
|
|
169
|
-
return (_, ee) => (
|
|
170
|
-
class: M(
|
|
170
|
+
return (_, ee) => (r(), g("div", {
|
|
171
|
+
class: M(a(x).b())
|
|
171
172
|
}, [
|
|
172
|
-
|
|
173
|
-
class: M(
|
|
174
|
-
style: Ge(
|
|
173
|
+
s("div", {
|
|
174
|
+
class: M(a(x).e("image")),
|
|
175
|
+
style: Ge(a(K))
|
|
175
176
|
}, [
|
|
176
|
-
_.image ? (
|
|
177
|
+
_.image ? (r(), g("img", {
|
|
177
178
|
key: 0,
|
|
178
179
|
src: _.image,
|
|
179
180
|
ondragstart: "return false"
|
|
180
181
|
}, null, 8, ["src"])) : X(_.$slots, "image", { key: 1 }, () => [
|
|
181
|
-
p(
|
|
182
|
+
p(Bl)
|
|
182
183
|
])
|
|
183
184
|
], 6),
|
|
184
|
-
|
|
185
|
-
class: M(
|
|
185
|
+
s("div", {
|
|
186
|
+
class: M(a(x).e("description"))
|
|
186
187
|
}, [
|
|
187
|
-
_.$slots.description ? X(_.$slots, "description", { key: 0 }) : (
|
|
188
|
+
_.$slots.description ? X(_.$slots, "description", { key: 0 }) : (r(), g("p", { key: 1 }, B(a(D)), 1))
|
|
188
189
|
], 2),
|
|
189
|
-
_.$slots.default ? (
|
|
190
|
+
_.$slots.default ? (r(), g("div", {
|
|
190
191
|
key: 0,
|
|
191
|
-
class: M(
|
|
192
|
+
class: M(a(x).e("bottom"))
|
|
192
193
|
}, [
|
|
193
194
|
X(_.$slots, "default")
|
|
194
|
-
], 2)) :
|
|
195
|
+
], 2)) : b("v-if", !0)
|
|
195
196
|
], 2));
|
|
196
197
|
}
|
|
197
198
|
});
|
|
198
|
-
var
|
|
199
|
-
const
|
|
199
|
+
var Il = /* @__PURE__ */ Ce(ql, [["__file", "empty.vue"]]);
|
|
200
|
+
const Ul = Pl(Il), Fl = {
|
|
200
201
|
key: 0,
|
|
201
202
|
class: "topic-list-content"
|
|
202
|
-
},
|
|
203
|
+
}, Ml = { class: "qy-flex-between" }, zl = {
|
|
203
204
|
class: "qy-flex-center",
|
|
204
205
|
style: { gap: "5px" }
|
|
205
|
-
},
|
|
206
|
+
}, Kl = { style: { display: "inline-flex" } }, Gl = { class: "topic-menu-item" }, Ol = {
|
|
206
207
|
class: "qy-flex-center",
|
|
207
208
|
style: { gap: "5px" }
|
|
208
|
-
},
|
|
209
|
+
}, jl = { class: "qy-flex-row qy-flex-between" }, Al = {
|
|
209
210
|
class: "qy-flex-row qy-flex-align",
|
|
210
211
|
style: { margin: "5px 0", gap: "5px" }
|
|
211
|
-
},
|
|
212
|
+
}, Wl = {
|
|
212
213
|
key: 1,
|
|
213
214
|
class: "research-type"
|
|
214
|
-
},
|
|
215
|
+
}, Jl = {
|
|
215
216
|
key: 1,
|
|
216
217
|
class: "qy-flex-center",
|
|
217
218
|
style: { height: "30px", color: "#999", "font-size": "12px" }
|
|
218
|
-
},
|
|
219
|
+
}, Xl = {
|
|
219
220
|
key: 0,
|
|
220
221
|
class: "loading-text"
|
|
221
|
-
},
|
|
222
|
+
}, Hl = {
|
|
222
223
|
key: 1,
|
|
223
224
|
class: "qyuan icon-empty"
|
|
224
|
-
},
|
|
225
|
+
}, Yl = { key: 1 }, Zl = /* @__PURE__ */ V({
|
|
225
226
|
__name: "mapTopic",
|
|
226
227
|
props: {
|
|
227
228
|
onDelete: { type: Function },
|
|
@@ -239,56 +240,56 @@ const Il = xl(ql), Ul = {
|
|
|
239
240
|
dialogConfig: {}
|
|
240
241
|
},
|
|
241
242
|
emits: ["openFilterDialog"],
|
|
242
|
-
setup(
|
|
243
|
-
const x = Oe("mapSettingRef"),
|
|
243
|
+
setup(q, { expose: m, emit: k }) {
|
|
244
|
+
const x = Oe("mapSettingRef"), D = ol(), K = v(D.topicWidth || 300), _ = v(!1), ee = v(0), xe = v(0), { topicVisible: le, topTopicList: Pe } = Tl(D), te = v(null);
|
|
244
245
|
te.value;
|
|
245
|
-
const G = v(), ae = v(), O = v(), j = v(), se = v(), oe = v(), u = v([]), f = v([]), ne = Q(() => u.value.filter((e) => e.layerType == "topic").sort((e, l) => e.id > l.id ? 1 : -1)), ie = (e) => u.value.filter((
|
|
246
|
+
const G = v(), ae = v(), O = v(), j = v(), se = v(), oe = v(), u = v([]), f = v([]), ne = Q(() => u.value.filter((e) => e.layerType == "topic").sort((e, l) => e.id > l.id ? 1 : -1)), ie = (e) => u.value.filter((o) => o.pid === e), Se = () => {
|
|
246
247
|
le.value = !0;
|
|
247
248
|
}, Ee = () => {
|
|
248
249
|
le.value = !1;
|
|
249
250
|
}, re = (e) => {
|
|
250
251
|
if (!_.value) return;
|
|
251
252
|
const l = xe.value + (e.clientX - ee.value);
|
|
252
|
-
l >= 200 && l <= 600 && (K.value = l,
|
|
253
|
+
l >= 200 && l <= 600 && (K.value = l, D.setTopicWidth(l));
|
|
253
254
|
}, ce = () => {
|
|
254
255
|
_.value = !1, document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ce);
|
|
255
256
|
}, Re = (e) => {
|
|
256
257
|
const l = new Set(e.map((n) => n.id));
|
|
257
258
|
for (const n of L.value)
|
|
258
259
|
l.has(n) || L.value.delete(n);
|
|
259
|
-
if (y.value = [],
|
|
260
|
+
if (y.value = [], C.value = {}, L.value.clear(), u.value = [...e], e.filter((n) => n.defaultChecked === 1).forEach((n) => {
|
|
260
261
|
f.value.indexOf(n.id) === -1 && f.value.push(n.id), d && P.emit({ mapRootId: d, topic: n, visible: !0 });
|
|
261
262
|
}), A && e.length > 0) {
|
|
262
263
|
const n = e.map(
|
|
263
|
-
(
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
266
|
-
L.value.add(String(
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
f.value.indexOf(
|
|
264
|
+
(c) => A(c.id).then((i) => {
|
|
265
|
+
const S = i?.data?.list || [];
|
|
266
|
+
if (S.length === 0) return;
|
|
267
|
+
L.value.add(String(c.id));
|
|
268
|
+
const t = new Set(u.value.map((w) => w.id)), h = S.filter((w) => !t.has(w.id));
|
|
269
|
+
h.length !== 0 && (u.value.push(...h), y.value.push(...h), h.filter((w) => w.defaultChecked === 1).forEach((w) => {
|
|
270
|
+
f.value.indexOf(w.id) === -1 && f.value.push(w.id), d && P.emit({ mapRootId: d, topic: w, visible: !0 });
|
|
270
271
|
}));
|
|
271
|
-
}).catch((
|
|
272
|
-
console.error(`加载父专题 ${
|
|
272
|
+
}).catch((i) => {
|
|
273
|
+
console.error(`加载父专题 ${c.id} 的子数据失败:`, i);
|
|
273
274
|
})
|
|
274
275
|
);
|
|
275
276
|
Promise.allSettled(n).then(() => {
|
|
276
277
|
u.value = [...u.value], y.value = [...y.value];
|
|
277
278
|
});
|
|
278
279
|
}
|
|
279
|
-
},
|
|
280
|
+
}, N = q;
|
|
280
281
|
je(
|
|
281
|
-
() =>
|
|
282
|
+
() => N.mapLayerEntity,
|
|
282
283
|
() => {
|
|
283
284
|
ye();
|
|
284
285
|
},
|
|
285
286
|
{ deep: !0 }
|
|
286
287
|
);
|
|
287
288
|
const {
|
|
288
|
-
onDelete:
|
|
289
|
-
onUpdate:
|
|
289
|
+
onDelete: I,
|
|
290
|
+
onUpdate: U,
|
|
290
291
|
shpUploadUrl: $e,
|
|
291
|
-
onDefaultTopicClick:
|
|
292
|
+
onDefaultTopicClick: Ql,
|
|
292
293
|
checkPermissions: De,
|
|
293
294
|
// isShowHeader = true,
|
|
294
295
|
mapRootId: d,
|
|
@@ -296,57 +297,57 @@ const Il = xl(ql), Ul = {
|
|
|
296
297
|
researchDataRequest: fe,
|
|
297
298
|
subTopicListRequest: A,
|
|
298
299
|
researchTypes: Ne
|
|
299
|
-
} =
|
|
300
|
-
d &&
|
|
300
|
+
} = N;
|
|
301
|
+
d && E("mapRootId", d);
|
|
301
302
|
const pe = (e) => {
|
|
302
303
|
if (!e.pid && e.layerType === "topic") {
|
|
303
|
-
L.value.delete(e.id), delete
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
const n = y.value.filter((
|
|
307
|
-
y.value = y.value.filter((
|
|
304
|
+
L.value.delete(e.id), delete C.value[e.id];
|
|
305
|
+
const o = F.value.indexOf(e.id);
|
|
306
|
+
o > -1 && F.value.splice(o, 1);
|
|
307
|
+
const n = y.value.filter((c) => c.pid === e.id);
|
|
308
|
+
y.value = y.value.filter((c) => c.pid !== e.id), n.forEach((c) => {
|
|
308
309
|
d && P.emit({
|
|
309
310
|
mapRootId: d,
|
|
310
|
-
topic:
|
|
311
|
+
topic: c,
|
|
311
312
|
visible: !1
|
|
312
|
-
}), f.value = f.value.filter((
|
|
313
|
-
}),
|
|
313
|
+
}), f.value = f.value.filter((i) => i !== c.id);
|
|
314
|
+
}), I && I(e);
|
|
314
315
|
} else {
|
|
315
316
|
d && P.emit({
|
|
316
317
|
mapRootId: d,
|
|
317
318
|
topic: e,
|
|
318
319
|
visible: !1
|
|
319
320
|
}), f.value = f.value.filter((n) => n !== e.id);
|
|
320
|
-
const
|
|
321
|
-
|
|
321
|
+
const o = y.value.findIndex((n) => n.id === e.id);
|
|
322
|
+
o > -1 && y.value.splice(o, 1), I && I(e);
|
|
322
323
|
}
|
|
323
324
|
};
|
|
324
325
|
ge.on(pe);
|
|
325
326
|
const Be = (e) => {
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
if (s.length === 0)
|
|
329
|
-
return;
|
|
330
|
-
const n = new Set(u.value.map((i) => i.id)), o = s.filter((i) => !n.has(i.id));
|
|
327
|
+
C.value[e] || (L.value.add(e), C.value[e] = !0, A?.call(null, e)?.then((l) => {
|
|
328
|
+
const o = l?.data?.list || [];
|
|
331
329
|
if (o.length === 0)
|
|
332
330
|
return;
|
|
333
|
-
u.value.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
331
|
+
const n = new Set(u.value.map((t) => t.id)), c = o.filter((t) => !n.has(t.id));
|
|
332
|
+
if (c.length === 0)
|
|
333
|
+
return;
|
|
334
|
+
u.value.push(...c);
|
|
335
|
+
const i = new Set(y.value.map((t) => t.id)), S = c.filter((t) => !i.has(t.id));
|
|
336
|
+
y.value.push(...S), u.value = [...u.value], y.value = [...y.value], S.filter((t) => t.defaultChecked === 1).forEach((t) => {
|
|
337
|
+
console.log("处理默认勾选的子图层:", t), f.value.indexOf(t.id) === -1 && f.value.push(t.id), d && P.emit({
|
|
337
338
|
mapRootId: d,
|
|
338
|
-
topic:
|
|
339
|
+
topic: t,
|
|
339
340
|
visible: !0
|
|
340
341
|
});
|
|
341
342
|
});
|
|
342
343
|
}).catch((l) => {
|
|
343
|
-
console.error(` ✗ 加载父专题 ${e} 的子数据失败:`, l),
|
|
344
|
+
console.error(` ✗ 加载父专题 ${e} 的子数据失败:`, l), $.error("加载子专题数据失败,请稍后重试"), L.value.delete(e);
|
|
344
345
|
}).finally(() => {
|
|
345
|
-
|
|
346
|
+
C.value[e] = !1, console.log(" ← 加载完成");
|
|
346
347
|
}));
|
|
347
348
|
}, de = (e) => {
|
|
348
|
-
|
|
349
|
-
const l = u.value.find((
|
|
349
|
+
U && U(e);
|
|
350
|
+
const l = u.value.find((o) => o.id === e.id);
|
|
350
351
|
l ? (Object.assign(l, e), u.value = [...u.value]) : (u.value.push(e), e.pid && y.value.push(e)), u.value = [...u.value], y.value = [...y.value], e.defaultChecked === 0 && f.value.includes(e.id) ? (console.log("默认加载改为关闭,取消勾选并隐藏图层:", e.id), d && P.emit({
|
|
351
352
|
mapRootId: d,
|
|
352
353
|
topic: l ?? e,
|
|
@@ -369,12 +370,12 @@ const Il = xl(ql), Ul = {
|
|
|
369
370
|
mapRootId: d,
|
|
370
371
|
topic: l,
|
|
371
372
|
visible: !!e
|
|
372
|
-
}), l.defaultChecked = e ? 1 : 0,
|
|
373
|
-
}, L = v(/* @__PURE__ */ new Set()), y = v([]),
|
|
373
|
+
}), l.defaultChecked = e ? 1 : 0, U && U({ ...l });
|
|
374
|
+
}, L = v(/* @__PURE__ */ new Set()), y = v([]), C = v({}), F = v([]), Ke = (e) => {
|
|
374
375
|
if (!Array.isArray(e)) return;
|
|
375
|
-
const l = e.filter((
|
|
376
|
-
|
|
377
|
-
typeof
|
|
376
|
+
const l = e.filter((o) => typeof o == "string");
|
|
377
|
+
F.value = l, e.forEach((o) => {
|
|
378
|
+
typeof o == "string" && (L.value.has(o) || C.value[o] || Be(o));
|
|
378
379
|
});
|
|
379
380
|
};
|
|
380
381
|
m({
|
|
@@ -385,166 +386,174 @@ const Il = xl(ql), Ul = {
|
|
|
385
386
|
showTopicList: Se,
|
|
386
387
|
hideTopicList: Ee,
|
|
387
388
|
selectTopics: f,
|
|
388
|
-
loadingStates:
|
|
389
|
+
loadingStates: C
|
|
389
390
|
// 暴露加载状态供外部使用
|
|
390
391
|
});
|
|
391
392
|
const W = (e, l) => {
|
|
392
393
|
e.stopPropagation(), J({ e, layer: l });
|
|
393
394
|
}, J = ({ e, layer: l }) => {
|
|
394
|
-
e.stopPropagation(), Y.emit(e), l.layerType == "geojson" ? j.value?.open(l, []) : l.layerType == "species-group" ? G.value?.show(l) : l.layerType == "sample-group" ? l.layerShapes == "point" ? G.value?.show(l) : l.layerShapes == "line" && O.value?.show(l) : l.layerType == "track" ? O.value?.show(l) : l.layerType == "interest-point" ? ae.value?.show(l) : l.layerType == "shp" || l.layerType == "kml" || l.layerType == "kmz" ? l.dbfUrl ? fetch(l.dbfUrl).then((
|
|
395
|
-
console.log("geojson",
|
|
396
|
-
const n =
|
|
397
|
-
id:
|
|
398
|
-
data: JSON.stringify(
|
|
395
|
+
e.stopPropagation(), Y.emit(e), l.layerType == "geojson" ? j.value?.open(l, []) : l.layerType == "species-group" ? G.value?.show(l) : l.layerType == "sample-group" ? l.layerShapes == "point" ? G.value?.show(l) : l.layerShapes == "line" && O.value?.show(l) : l.layerType == "track" ? O.value?.show(l) : l.layerType == "interest-point" ? ae.value?.show(l) : l.layerType == "shp" || l.layerType == "kml" || l.layerType == "kmz" ? l.dbfUrl ? fetch(l.dbfUrl).then((o) => o.json()).then((o) => {
|
|
396
|
+
console.log("geojson", o);
|
|
397
|
+
const n = o.map((c, i) => ({
|
|
398
|
+
id: i,
|
|
399
|
+
data: JSON.stringify(c),
|
|
399
400
|
source_id: l.sourceId
|
|
400
401
|
}));
|
|
401
402
|
console.log("dbfData", n), j.value?.open(l, n);
|
|
402
|
-
}).catch((
|
|
403
|
-
console.error("解析 GeoJSON 数据失败:",
|
|
404
|
-
}) :
|
|
405
|
-
}, me = ({ action: e, pid: l, layer:
|
|
406
|
-
oe.value?.open(e, l,
|
|
403
|
+
}).catch((o) => {
|
|
404
|
+
console.error("解析 GeoJSON 数据失败:", o), $.error("加载地理数据失败");
|
|
405
|
+
}) : $.error("没有找到 dbfUrl,请上传正确数据") : l.layerType == "tif";
|
|
406
|
+
}, me = ({ action: e, pid: l, layer: o }) => {
|
|
407
|
+
oe.value?.open(e, l, o);
|
|
407
408
|
}, ye = () => {
|
|
408
|
-
if (
|
|
409
|
+
if (N.mapLayerEntity) {
|
|
409
410
|
let e;
|
|
410
|
-
Array.isArray(
|
|
411
|
+
Array.isArray(N.mapLayerEntity) ? e = N.mapLayerEntity.find((l) => l.layerType === "map-layer") : e = N.mapLayerEntity, e && x.value?.setMapConfig(e);
|
|
411
412
|
}
|
|
412
413
|
}, ve = ({ keyword: e, mapRootId: l }) => {
|
|
413
414
|
if (!f.value || f.value.length === 0) {
|
|
414
|
-
|
|
415
|
+
$.warning("请先勾选左侧树结构中的数据到地图上");
|
|
415
416
|
return;
|
|
416
417
|
}
|
|
417
|
-
const
|
|
418
|
+
const o = e.toLowerCase(), n = u.value.find((c) => c.layerName?.toLowerCase().includes(o) && f.value.includes(c.id));
|
|
418
419
|
n ? (Qe.emit({
|
|
419
420
|
mapRootId: l,
|
|
420
421
|
layer: n
|
|
421
|
-
}),
|
|
422
|
-
(
|
|
423
|
-
) ?
|
|
422
|
+
}), $.success(`已定位到图层:${n.layerName}`)) : u.value.some(
|
|
423
|
+
(i) => i.layerName?.toLowerCase().includes(o) && !f.value.includes(i.id)
|
|
424
|
+
) ? $.warning("找到匹配的图层,但未勾选到地图上,请先勾选该图层") : $.warning("未找到匹配的图层,请检查关键词或勾选更多数据");
|
|
424
425
|
};
|
|
425
426
|
return Ae(() => {
|
|
426
|
-
_e.on(J),
|
|
427
|
+
_e.on(J), Te.on(me), Le.on(ve), ye();
|
|
427
428
|
}), We(() => {
|
|
428
|
-
document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ce), _e.off(J),
|
|
429
|
-
}), ue &&
|
|
430
|
-
const
|
|
431
|
-
return
|
|
429
|
+
document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ce), _e.off(J), Te.off(me), Le.off(ve), ke.off(de), ge.off(pe), L.value.clear(), y.value = [], u.value = [], C.value = {}, F.value = [];
|
|
430
|
+
}), ue && E(el, ue), fe && E(ll, fe), E(tl, f), E("shpUploadUrl", $e), E(al, u), E(sl, De || (() => !0)), (e, l) => {
|
|
431
|
+
const o = wl, n = Cl, c = Ul;
|
|
432
|
+
return r(), g(z, null, [
|
|
432
433
|
p(Je, {
|
|
433
434
|
name: "fade",
|
|
434
435
|
mode: "out-in"
|
|
435
436
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
|
|
437
|
+
default: T(() => [
|
|
438
|
+
s("div", {
|
|
438
439
|
class: "map-topic-list qy-flex-col",
|
|
439
440
|
onClick: Ve
|
|
440
441
|
}, [
|
|
441
|
-
ne.value.length > 0 ? (
|
|
442
|
-
p(
|
|
443
|
-
default:
|
|
444
|
-
p(
|
|
442
|
+
ne.value.length > 0 ? (r(), g("div", Fl, [
|
|
443
|
+
p(n, null, {
|
|
444
|
+
default: T(() => [
|
|
445
|
+
p(a(yl), {
|
|
445
446
|
modelValue: f.value,
|
|
446
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
447
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => f.value = i)
|
|
447
448
|
}, {
|
|
448
|
-
default:
|
|
449
|
-
p(
|
|
449
|
+
default: T(() => [
|
|
450
|
+
p(a(vl), {
|
|
450
451
|
"expand-icon-position": "left",
|
|
451
452
|
onChange: Ke
|
|
452
453
|
}, {
|
|
453
|
-
default:
|
|
454
|
-
(
|
|
455
|
-
key:
|
|
456
|
-
name:
|
|
454
|
+
default: T(() => [
|
|
455
|
+
(r(!0), g(z, null, he(ne.value, (i, S) => (r(), R(a(hl), {
|
|
456
|
+
key: S,
|
|
457
|
+
name: i.id
|
|
457
458
|
}, {
|
|
458
|
-
title:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
title: T(({ isActive: t }) => [
|
|
460
|
+
s("div", Ml, [
|
|
461
|
+
s("div", zl, [
|
|
462
|
+
t ? (r(), R(a(Z), {
|
|
462
463
|
key: 1,
|
|
463
464
|
size: "16"
|
|
464
465
|
}, {
|
|
465
|
-
default:
|
|
466
|
-
p(
|
|
466
|
+
default: T(() => [
|
|
467
|
+
p(a(Ye))
|
|
467
468
|
]),
|
|
468
469
|
_: 1
|
|
469
|
-
})) : (
|
|
470
|
+
})) : (r(), R(a(Z), {
|
|
470
471
|
key: 0,
|
|
471
472
|
size: "16"
|
|
472
473
|
}, {
|
|
473
|
-
default:
|
|
474
|
-
p(
|
|
474
|
+
default: T(() => [
|
|
475
|
+
p(a(He))
|
|
475
476
|
]),
|
|
476
477
|
_: 1
|
|
477
478
|
})),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
s("div", Kl, [
|
|
480
|
+
p(o, {
|
|
481
|
+
content: i.layerName,
|
|
482
|
+
placement: "top"
|
|
483
|
+
}, {
|
|
484
|
+
default: T(() => [
|
|
485
|
+
s("span", Gl, B(i.layerName), 1)
|
|
486
|
+
]),
|
|
487
|
+
_: 2
|
|
488
|
+
}, 1032, ["content"]),
|
|
489
|
+
s("span", null, "(" + B(i.subCount) + ")", 1)
|
|
481
490
|
])
|
|
482
491
|
]),
|
|
483
|
-
|
|
484
|
-
|
|
492
|
+
s("div", Ol, [
|
|
493
|
+
i.layerName === "物种分布点位" ? (r(), R(a(Z), {
|
|
485
494
|
key: 0,
|
|
486
495
|
class: "filter-icon",
|
|
487
496
|
size: "18",
|
|
488
|
-
onClick: (
|
|
497
|
+
onClick: (h) => Ie(i, h)
|
|
489
498
|
}, {
|
|
490
|
-
default:
|
|
491
|
-
p(
|
|
499
|
+
default: T(() => [
|
|
500
|
+
p(a(Ze))
|
|
492
501
|
]),
|
|
493
502
|
_: 1
|
|
494
|
-
}, 8, ["onClick"])) :
|
|
503
|
+
}, 8, ["onClick"])) : b("", !0)
|
|
495
504
|
])
|
|
496
505
|
])
|
|
497
506
|
]),
|
|
498
|
-
default:
|
|
499
|
-
ie(
|
|
500
|
-
key:
|
|
507
|
+
default: T(() => [
|
|
508
|
+
ie(i.id).length ? (r(!0), g(z, { key: 0 }, he(ie(i.id), (t) => (r(), g("div", {
|
|
509
|
+
key: t.id,
|
|
501
510
|
class: "sub-topic-item"
|
|
502
511
|
}, [
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
p(
|
|
506
|
-
value:
|
|
507
|
-
onChange: (
|
|
512
|
+
s("div", jl, [
|
|
513
|
+
s("div", Al, [
|
|
514
|
+
p(a(gl), {
|
|
515
|
+
value: t.id,
|
|
516
|
+
onChange: (h) => ze(h, t)
|
|
508
517
|
}, null, 8, ["value", "onChange"]),
|
|
509
|
-
Ue(
|
|
518
|
+
Ue(t) ? (r(), R(nl, {
|
|
510
519
|
key: 0,
|
|
511
|
-
"layer-paint-config":
|
|
512
|
-
"layer-type":
|
|
520
|
+
"layer-paint-config": t.layerPaintConfig || t.customLayerConfig,
|
|
521
|
+
"layer-type": t.layerType,
|
|
513
522
|
class: "legend-clickable",
|
|
514
|
-
onClick: (
|
|
515
|
-
}, null, 8, ["layer-paint-config", "layer-type", "onClick"])) : Fe(
|
|
523
|
+
onClick: (h) => W(h, t)
|
|
524
|
+
}, null, 8, ["layer-paint-config", "layer-type", "onClick"])) : Fe(t) ? (r(), R(il, {
|
|
516
525
|
key: 1,
|
|
517
|
-
topic:
|
|
526
|
+
topic: t,
|
|
518
527
|
class: "legend-clickable",
|
|
519
|
-
onClick: (
|
|
520
|
-
}, null, 8, ["topic", "onClick"])) : Me(
|
|
528
|
+
onClick: (h) => W(h, t)
|
|
529
|
+
}, null, 8, ["topic", "onClick"])) : Me(t) ? (r(), R(rl, {
|
|
521
530
|
key: 2,
|
|
522
|
-
topic:
|
|
531
|
+
topic: t,
|
|
523
532
|
class: "legend-clickable",
|
|
524
|
-
onClick: (
|
|
525
|
-
}, null, 8, ["topic", "onClick"])) :
|
|
526
|
-
|
|
527
|
-
H(
|
|
528
|
-
|
|
529
|
-
H(" (" +
|
|
530
|
-
], 64)) :
|
|
531
|
-
|
|
533
|
+
onClick: (h) => W(h, t)
|
|
534
|
+
}, null, 8, ["topic", "onClick"])) : b("", !0),
|
|
535
|
+
s("span", null, [
|
|
536
|
+
H(B(t.layerName) + " ", 1),
|
|
537
|
+
i.layerName == "物种分布点位" ? (r(), g(z, { key: 0 }, [
|
|
538
|
+
H(" (" + B(t.pointInfo?.length || 0) + ") ", 1)
|
|
539
|
+
], 64)) : b("", !0),
|
|
540
|
+
i.layerName == "样地样线分布" ? (r(), g("span", Wl, B(t.researchType ? a(Ne)[t.researchType] : ""), 1)) : b("", !0)
|
|
532
541
|
])
|
|
533
542
|
]),
|
|
534
|
-
p(
|
|
543
|
+
p(a(kl), {
|
|
535
544
|
style: { display: "none" },
|
|
536
545
|
size: "small",
|
|
537
546
|
type: "default",
|
|
538
547
|
circle: "",
|
|
539
|
-
onClick: (
|
|
540
|
-
icon:
|
|
548
|
+
onClick: (h) => be(h, t),
|
|
549
|
+
icon: a(Xe)
|
|
541
550
|
}, null, 8, ["onClick", "icon"])
|
|
542
551
|
])
|
|
543
|
-
]))), 128)) : (
|
|
544
|
-
|
|
545
|
-
|
|
552
|
+
]))), 128)) : (r(), g("div", Jl, [
|
|
553
|
+
C.value[i.id] ? (r(), g("span", Xl, [...l[1] || (l[1] = [
|
|
554
|
+
s("i", { class: "el-icon-loading" }, null, -1),
|
|
546
555
|
H(" 加载中... ", -1)
|
|
547
|
-
])])) : (
|
|
556
|
+
])])) : (r(), g("span", Hl, "暂无数据"))
|
|
548
557
|
]))
|
|
549
558
|
]),
|
|
550
559
|
_: 2
|
|
@@ -558,8 +567,8 @@ const Il = xl(ql), Ul = {
|
|
|
558
567
|
]),
|
|
559
568
|
_: 1
|
|
560
569
|
})
|
|
561
|
-
])) : (
|
|
562
|
-
p(
|
|
570
|
+
])) : (r(), g("div", Yl, [
|
|
571
|
+
p(c, { description: "请点击“新增”按钮,添加地理数据" })
|
|
563
572
|
]))
|
|
564
573
|
])
|
|
565
574
|
]),
|
|
@@ -593,14 +602,14 @@ const Il = xl(ql), Ul = {
|
|
|
593
602
|
ref_key: "layerDialogRef",
|
|
594
603
|
ref: oe
|
|
595
604
|
}, null, 512),
|
|
596
|
-
p(
|
|
605
|
+
p(Ll, {
|
|
597
606
|
ref_key: "mapSettingRef",
|
|
598
607
|
ref: x
|
|
599
608
|
}, null, 512)
|
|
600
609
|
], 64);
|
|
601
610
|
};
|
|
602
611
|
}
|
|
603
|
-
}),
|
|
612
|
+
}), wt = /* @__PURE__ */ $l(Zl, [["__scopeId", "data-v-20a9c12b"]]);
|
|
604
613
|
export {
|
|
605
|
-
|
|
614
|
+
wt as default
|
|
606
615
|
};
|