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 b, createElementBlock as h, openBlock as c, createElementVNode as a, unref as t, computed as Q, normalizeClass as M, createCommentVNode as B, normalizeStyle as Ge, renderSlot as X, createVNode as p, toDisplayString as N, useTemplateRef as Oe, ref as v, watch as je, provide as S, onMounted as Ae, onUnmounted as We, Fragment as z, Transition as Je, withCtx as w, renderList as he, createBlock as E, createTextVNode as H } from "vue";
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 Le, b as Te, e as P, t as Y, l as Qe } from "../../chunks/EventKeys-DZ_Hahro.js";
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 R } from "element-plus";
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 Ll } from "pinia";
18
- import { M as Tl } from "../../chunks/mapSetting-B1a88k-v.js";
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 { _ as Ce, u as wl, w as xl } from "../../chunks/aria-BEkkcjlH.js";
21
- import { u as we, q as Pl, w as Sl } from "../../chunks/style-COMeMpO8.js";
22
- import { u as El } from "../../chunks/index-_At9ftZd.js";
23
- import { _ as Rl } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
24
- const $l = b({
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
- }), Dl = /* @__PURE__ */ b({
27
- ...$l,
28
- setup(V) {
29
- const m = we("empty"), k = wl();
30
- return (x, $) => (c(), h("svg", {
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
- a("defs", null, [
37
- a("linearGradient", {
38
- id: `linearGradient-1-${t(k)}`,
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
- a("stop", {
45
- "stop-color": `var(${t(m).cssVarBlockName("fill-color-1")})`,
45
+ s("stop", {
46
+ "stop-color": `var(${a(m).cssVarBlockName("fill-color-1")})`,
46
47
  offset: "0%"
47
48
  }, null, 8, ["stop-color"]),
48
- a("stop", {
49
- "stop-color": `var(${t(m).cssVarBlockName("fill-color-4")})`,
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
- a("linearGradient", {
54
- id: `linearGradient-2-${t(k)}`,
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
- a("stop", {
61
- "stop-color": `var(${t(m).cssVarBlockName("fill-color-1")})`,
61
+ s("stop", {
62
+ "stop-color": `var(${a(m).cssVarBlockName("fill-color-1")})`,
62
63
  offset: "0%"
63
64
  }, null, 8, ["stop-color"]),
64
- a("stop", {
65
- "stop-color": `var(${t(m).cssVarBlockName("fill-color-6")})`,
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
- a("rect", {
70
- id: `path-3-${t(k)}`,
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
- a("g", {
78
+ s("g", {
78
79
  stroke: "none",
79
80
  "stroke-width": "1",
80
81
  fill: "none",
81
82
  "fill-rule": "evenodd"
82
83
  }, [
83
- a("g", { transform: "translate(-1268.000000, -535.000000)" }, [
84
- a("g", { transform: "translate(1268.000000, 535.000000)" }, [
85
- a("path", {
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(${t(m).cssVarBlockName("fill-color-3")})`
88
+ fill: `var(${a(m).cssVarBlockName("fill-color-3")})`
88
89
  }, null, 8, ["fill"]),
89
- a("polygon", {
90
- fill: `var(${t(m).cssVarBlockName("fill-color-7")})`,
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
- a("g", { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" }, [
95
- a("polygon", {
96
- fill: `var(${t(m).cssVarBlockName("fill-color-7")})`,
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
- a("polygon", {
101
- fill: `var(${t(m).cssVarBlockName("fill-color-5")})`,
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
- a("rect", {
105
- fill: `url(#linearGradient-1-${t(k)})`,
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
- a("polygon", {
113
- fill: `var(${t(m).cssVarBlockName("fill-color-2")})`,
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
- a("rect", {
119
- fill: `url(#linearGradient-2-${t(k)})`,
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
- a("g", { transform: "translate(53.000000, 45.000000)" }, [
126
- a("use", {
127
- fill: `var(${t(m).cssVarBlockName("fill-color-8")})`,
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-${t(k)}`
130
+ "xlink:href": `#path-3-${a(k)}`
130
131
  }, null, 8, ["fill", "xlink:href"]),
131
- a("polygon", {
132
- fill: `var(${t(m).cssVarBlockName("fill-color-9")})`,
133
- mask: `url(#mask-4-${t(k)})`,
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
- a("polygon", {
139
- fill: `var(${t(m).cssVarBlockName("fill-color-2")})`,
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 Nl = /* @__PURE__ */ Ce(Dl, [["__file", "img-empty.vue"]]);
150
- const Bl = Pl({
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
- }), bl = b({
161
+ }), Vl = V({
161
162
  name: "ElEmpty"
162
- }), Vl = /* @__PURE__ */ b({
163
- ...bl,
164
- props: Bl,
165
- setup(V) {
166
- const m = V, { t: k } = El(), x = we("empty"), $ = Q(() => m.description || k("el.table.emptyText")), K = Q(() => ({
167
- width: Sl(m.imageSize)
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) => (c(), h("div", {
170
- class: M(t(x).b())
170
+ return (_, ee) => (r(), g("div", {
171
+ class: M(a(x).b())
171
172
  }, [
172
- a("div", {
173
- class: M(t(x).e("image")),
174
- style: Ge(t(K))
173
+ s("div", {
174
+ class: M(a(x).e("image")),
175
+ style: Ge(a(K))
175
176
  }, [
176
- _.image ? (c(), h("img", {
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(Nl)
182
+ p(Bl)
182
183
  ])
183
184
  ], 6),
184
- a("div", {
185
- class: M(t(x).e("description"))
185
+ s("div", {
186
+ class: M(a(x).e("description"))
186
187
  }, [
187
- _.$slots.description ? X(_.$slots, "description", { key: 0 }) : (c(), h("p", { key: 1 }, N(t($)), 1))
188
+ _.$slots.description ? X(_.$slots, "description", { key: 0 }) : (r(), g("p", { key: 1 }, B(a(D)), 1))
188
189
  ], 2),
189
- _.$slots.default ? (c(), h("div", {
190
+ _.$slots.default ? (r(), g("div", {
190
191
  key: 0,
191
- class: M(t(x).e("bottom"))
192
+ class: M(a(x).e("bottom"))
192
193
  }, [
193
194
  X(_.$slots, "default")
194
- ], 2)) : B("v-if", !0)
195
+ ], 2)) : b("v-if", !0)
195
196
  ], 2));
196
197
  }
197
198
  });
198
- var ql = /* @__PURE__ */ Ce(Vl, [["__file", "empty.vue"]]);
199
- const Il = xl(ql), Ul = {
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
- }, Fl = { class: "qy-flex-between" }, Ml = {
203
+ }, Ml = { class: "qy-flex-between" }, zl = {
203
204
  class: "qy-flex-center",
204
205
  style: { gap: "5px" }
205
- }, zl = { style: { display: "inline-flex" } }, Kl = { class: "topic-menu-item" }, Gl = {
206
+ }, Kl = { style: { display: "inline-flex" } }, Gl = { class: "topic-menu-item" }, Ol = {
206
207
  class: "qy-flex-center",
207
208
  style: { gap: "5px" }
208
- }, Ol = { class: "qy-flex-row qy-flex-between" }, jl = {
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
- }, Al = {
212
+ }, Wl = {
212
213
  key: 1,
213
214
  class: "research-type"
214
- }, Wl = {
215
+ }, Jl = {
215
216
  key: 1,
216
217
  class: "qy-flex-center",
217
218
  style: { height: "30px", color: "#999", "font-size": "12px" }
218
- }, Jl = {
219
+ }, Xl = {
219
220
  key: 0,
220
221
  class: "loading-text"
221
- }, Xl = {
222
+ }, Hl = {
222
223
  key: 1,
223
224
  class: "qyuan icon-empty"
224
- }, Hl = { key: 1 }, Yl = /* @__PURE__ */ b({
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(V, { expose: m, emit: k }) {
243
- const x = Oe("mapSettingRef"), $ = ol(), K = v($.topicWidth || 300), _ = v(!1), ee = v(0), xe = v(0), { topicVisible: le, topTopicList: Pe } = Ll($), te = v(null);
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((s) => s.pid === e), Se = () => {
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, $.setTopicWidth(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 = [], T.value = {}, L.value.clear(), u.value = [...e], e.filter((n) => n.defaultChecked === 1).forEach((n) => {
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
- (o) => A(o.id).then((g) => {
264
- const r = g?.data?.list || [];
265
- if (r.length === 0) return;
266
- L.value.add(String(o.id));
267
- const i = new Set(u.value.map((C) => C.id)), F = r.filter((C) => !i.has(C.id));
268
- F.length !== 0 && (u.value.push(...F), y.value.push(...F), F.filter((C) => C.defaultChecked === 1).forEach((C) => {
269
- f.value.indexOf(C.id) === -1 && f.value.push(C.id), d && P.emit({ mapRootId: d, topic: C, visible: !0 });
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((g) => {
272
- console.error(`加载父专题 ${o.id} 的子数据失败:`, g);
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
- }, D = V;
280
+ }, N = q;
280
281
  je(
281
- () => D.mapLayerEntity,
282
+ () => N.mapLayerEntity,
282
283
  () => {
283
284
  ye();
284
285
  },
285
286
  { deep: !0 }
286
287
  );
287
288
  const {
288
- onDelete: q,
289
- onUpdate: I,
289
+ onDelete: I,
290
+ onUpdate: U,
290
291
  shpUploadUrl: $e,
291
- onDefaultTopicClick: Zl,
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
- } = D;
300
- d && S("mapRootId", 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 T.value[e.id];
304
- const s = U.value.indexOf(e.id);
305
- s > -1 && U.value.splice(s, 1);
306
- const n = y.value.filter((o) => o.pid === e.id);
307
- y.value = y.value.filter((o) => o.pid !== e.id), n.forEach((o) => {
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: o,
311
+ topic: c,
311
312
  visible: !1
312
- }), f.value = f.value.filter((g) => g !== o.id);
313
- }), q && q(e);
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 s = y.value.findIndex((n) => n.id === e.id);
321
- s > -1 && y.value.splice(s, 1), q && q(e);
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
- T.value[e] || (L.value.add(e), T.value[e] = !0, A?.call(null, e)?.then((l) => {
327
- const s = l?.data?.list || [];
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.push(...o);
334
- const g = new Set(y.value.map((i) => i.id)), r = o.filter((i) => !g.has(i.id));
335
- y.value.push(...r), u.value = [...u.value], y.value = [...y.value], r.filter((i) => i.defaultChecked === 1).forEach((i) => {
336
- console.log("处理默认勾选的子图层:", i), f.value.indexOf(i.id) === -1 && f.value.push(i.id), d && P.emit({
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: i,
339
+ topic: t,
339
340
  visible: !0
340
341
  });
341
342
  });
342
343
  }).catch((l) => {
343
- console.error(` ✗ 加载父专题 ${e} 的子数据失败:`, l), R.error("加载子专题数据失败,请稍后重试"), L.value.delete(e);
344
+ console.error(` ✗ 加载父专题 ${e} 的子数据失败:`, l), $.error("加载子专题数据失败,请稍后重试"), L.value.delete(e);
344
345
  }).finally(() => {
345
- T.value[e] = !1, console.log(" ← 加载完成");
346
+ C.value[e] = !1, console.log(" ← 加载完成");
346
347
  }));
347
348
  }, de = (e) => {
348
- I && I(e);
349
- const l = u.value.find((s) => s.id === e.id);
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, I && I({ ...l });
373
- }, L = v(/* @__PURE__ */ new Set()), y = v([]), T = v({}), U = v([]), Ke = (e) => {
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((s) => typeof s == "string");
376
- U.value = l, e.forEach((s) => {
377
- typeof s == "string" && (L.value.has(s) || T.value[s] || Be(s));
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: T
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((s) => s.json()).then((s) => {
395
- console.log("geojson", s);
396
- const n = s.map((o, g) => ({
397
- id: g,
398
- data: JSON.stringify(o),
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((s) => {
403
- console.error("解析 GeoJSON 数据失败:", s), R.error("加载地理数据失败");
404
- }) : R.error("没有找到 dbfUrl,请上传正确数据") : l.layerType == "tif";
405
- }, me = ({ action: e, pid: l, layer: s }) => {
406
- oe.value?.open(e, l, s);
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 (D.mapLayerEntity) {
409
+ if (N.mapLayerEntity) {
409
410
  let e;
410
- Array.isArray(D.mapLayerEntity) ? e = D.mapLayerEntity.find((l) => l.layerType === "map-layer") : e = D.mapLayerEntity, e && x.value?.setMapConfig(e);
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
- R.warning("请先勾选左侧树结构中的数据到地图上");
415
+ $.warning("请先勾选左侧树结构中的数据到地图上");
415
416
  return;
416
417
  }
417
- const s = e.toLowerCase(), n = u.value.find((o) => o.layerName?.toLowerCase().includes(s) && f.value.includes(o.id));
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
- }), R.success(`已定位到图层:${n.layerName}`)) : u.value.some(
422
- (g) => g.layerName?.toLowerCase().includes(s) && !f.value.includes(g.id)
423
- ) ? R.warning("找到匹配的图层,但未勾选到地图上,请先勾选该图层") : R.warning("未找到匹配的图层,请检查关键词或勾选更多数据");
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), Le.on(me), Te.on(ve), ye();
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), Le.off(me), Te.off(ve), ke.off(de), ge.off(pe), L.value.clear(), y.value = [], u.value = [], T.value = {}, U.value = [];
429
- }), ue && S(el, ue), fe && S(ll, fe), S(tl, f), S("shpUploadUrl", $e), S(al, u), S(sl, De || (() => !0)), (e, l) => {
430
- const s = Cl, n = Il;
431
- return c(), h(z, null, [
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: w(() => [
437
- a("div", {
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 ? (c(), h("div", Ul, [
442
- p(s, null, {
443
- default: w(() => [
444
- p(t(yl), {
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] = (o) => f.value = o)
447
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => f.value = i)
447
448
  }, {
448
- default: w(() => [
449
- p(t(vl), {
449
+ default: T(() => [
450
+ p(a(vl), {
450
451
  "expand-icon-position": "left",
451
452
  onChange: Ke
452
453
  }, {
453
- default: w(() => [
454
- (c(!0), h(z, null, he(ne.value, (o, g) => (c(), E(t(hl), {
455
- key: g,
456
- name: o.id
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: w(({ isActive: r }) => [
459
- a("div", Fl, [
460
- a("div", Ml, [
461
- r ? (c(), E(t(Z), {
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: w(() => [
466
- p(t(Ye))
466
+ default: T(() => [
467
+ p(a(Ye))
467
468
  ]),
468
469
  _: 1
469
- })) : (c(), E(t(Z), {
470
+ })) : (r(), R(a(Z), {
470
471
  key: 0,
471
472
  size: "16"
472
473
  }, {
473
- default: w(() => [
474
- p(t(He))
474
+ default: T(() => [
475
+ p(a(He))
475
476
  ]),
476
477
  _: 1
477
478
  })),
478
- a("div", zl, [
479
- a("span", Kl, N(o.layerName), 1),
480
- a("span", null, "(" + N(o.subCount) + ")", 1)
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
- a("div", Gl, [
484
- o.layerName === "物种分布点位" ? (c(), E(t(Z), {
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: (i) => Ie(o, i)
497
+ onClick: (h) => Ie(i, h)
489
498
  }, {
490
- default: w(() => [
491
- p(t(Ze))
499
+ default: T(() => [
500
+ p(a(Ze))
492
501
  ]),
493
502
  _: 1
494
- }, 8, ["onClick"])) : B("", !0)
503
+ }, 8, ["onClick"])) : b("", !0)
495
504
  ])
496
505
  ])
497
506
  ]),
498
- default: w(() => [
499
- ie(o.id).length ? (c(!0), h(z, { key: 0 }, he(ie(o.id), (r) => (c(), h("div", {
500
- key: r.id,
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
- a("div", Ol, [
504
- a("div", jl, [
505
- p(t(gl), {
506
- value: r.id,
507
- onChange: (i) => ze(i, r)
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(r) ? (c(), E(nl, {
518
+ Ue(t) ? (r(), R(nl, {
510
519
  key: 0,
511
- "layer-paint-config": r.layerPaintConfig || r.customLayerConfig,
512
- "layer-type": r.layerType,
520
+ "layer-paint-config": t.layerPaintConfig || t.customLayerConfig,
521
+ "layer-type": t.layerType,
513
522
  class: "legend-clickable",
514
- onClick: (i) => W(i, r)
515
- }, null, 8, ["layer-paint-config", "layer-type", "onClick"])) : Fe(r) ? (c(), E(il, {
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: r,
526
+ topic: t,
518
527
  class: "legend-clickable",
519
- onClick: (i) => W(i, r)
520
- }, null, 8, ["topic", "onClick"])) : Me(r) ? (c(), E(rl, {
528
+ onClick: (h) => W(h, t)
529
+ }, null, 8, ["topic", "onClick"])) : Me(t) ? (r(), R(rl, {
521
530
  key: 2,
522
- topic: r,
531
+ topic: t,
523
532
  class: "legend-clickable",
524
- onClick: (i) => W(i, r)
525
- }, null, 8, ["topic", "onClick"])) : B("", !0),
526
- a("span", null, [
527
- H(N(r.layerName) + " ", 1),
528
- o.layerName == "物种分布点位" ? (c(), h(z, { key: 0 }, [
529
- H(" (" + N(r.pointInfo?.length || 0) + ") ", 1)
530
- ], 64)) : B("", !0),
531
- o.layerName == "样地样线分布" ? (c(), h("span", Al, N(r.researchType ? t(Ne)[r.researchType] : ""), 1)) : B("", !0)
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(t(kl), {
543
+ p(a(kl), {
535
544
  style: { display: "none" },
536
545
  size: "small",
537
546
  type: "default",
538
547
  circle: "",
539
- onClick: (i) => be(i, r),
540
- icon: t(Xe)
548
+ onClick: (h) => be(h, t),
549
+ icon: a(Xe)
541
550
  }, null, 8, ["onClick", "icon"])
542
551
  ])
543
- ]))), 128)) : (c(), h("div", Wl, [
544
- T.value[o.id] ? (c(), h("span", Jl, [...l[1] || (l[1] = [
545
- a("i", { class: "el-icon-loading" }, null, -1),
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
- ])])) : (c(), h("span", Xl, "暂无数据"))
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
- ])) : (c(), h("div", Hl, [
562
- p(n, { description: "请点击“新增”按钮,添加地理数据" })
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(Tl, {
605
+ p(Ll, {
597
606
  ref_key: "mapSettingRef",
598
607
  ref: x
599
608
  }, null, 512)
600
609
  ], 64);
601
610
  };
602
611
  }
603
- }), Tt = /* @__PURE__ */ Rl(Yl, [["__scopeId", "data-v-c468558a"]]);
612
+ }), wt = /* @__PURE__ */ $l(Zl, [["__scopeId", "data-v-20a9c12b"]]);
604
613
  export {
605
- Tt as default
614
+ wt as default
606
615
  };