@opengis/surveyor 0.0.8 → 0.0.9
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/chunks/{create-CAVC1qXJ.js → create-DR8tXNYj.js} +409 -409
- package/dist/chunks/map-DvwFkxAS.js +2763 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/server/modules/surveyor/route.ts +4 -2
- package/server/modules/surveyor/schema.ts +18 -1
- package/server/modules/surveyor/services/applicationTile.ts +36 -8
- package/server/resources/surveyor-user/applications.ts +1 -1
- package/dist/chunks/map-UTBxwT7-.js +0 -2776
|
@@ -0,0 +1,2763 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { a as t, i as n, s as r } from "./resources-2e8RFqWR.js";
|
|
3
|
+
import { l as i, o as a } from "./filterQuery-CvfZrkTC.js";
|
|
4
|
+
import { t as o } from "./SurveyorTeleport-CnSF0Ptl.js";
|
|
5
|
+
import { c as s, d as c, f as l, l as u, m as d, p as f, t as p, u as m } from "./appealMapLayers-CQMK3rrz.js";
|
|
6
|
+
import { a as h, i as g, o as _, s as v, t as y } from "./AppealStatusBadge-Cu-UzdzA.js";
|
|
7
|
+
import { t as b } from "./work_types-Hwme-FEX.js";
|
|
8
|
+
import { a as x, c as S, d as ee, i as te, l as ne, n as re, o as ie, r as C, s as ae, t as oe, u as w } from "./mapLayersApi-CBLcbADa.js";
|
|
9
|
+
import { i as se, n as ce } from "./geometry-DyhIVRcw.js";
|
|
10
|
+
import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as j, createVNode as M, defineComponent as N, nextTick as le, normalizeClass as P, normalizeStyle as F, onMounted as ue, onUnmounted as de, openBlock as I, ref as L, renderList as R, shallowRef as fe, toDisplayString as z, useTemplateRef as B, vModelText as V, watch as H, withCtx as U, withDirectives as W, withModifiers as pe } from "vue";
|
|
11
|
+
import { RouterLink as me, useRoute as he, useRouter as G } from "vue-router";
|
|
12
|
+
import { AlertTriangle as ge, Check as _e, ChevronDown as K, ChevronLeft as ve, Compass as q, GripVertical as ye, Layers2 as J, Loader2 as Y, Map as X, Minus as Z, MoreHorizontal as Q, Plus as be, RotateCcw as xe, Search as Se, SlidersHorizontal as Ce, X as we, ZoomIn as Te } from "lucide-vue-next";
|
|
13
|
+
//#region admin/src/api/map.ts
|
|
14
|
+
var Ee = [
|
|
15
|
+
"search",
|
|
16
|
+
"dateFrom",
|
|
17
|
+
"dateTo",
|
|
18
|
+
"workType",
|
|
19
|
+
"verifiedBy",
|
|
20
|
+
"organization",
|
|
21
|
+
"address"
|
|
22
|
+
];
|
|
23
|
+
function De(e = {}) {
|
|
24
|
+
let t = new URLSearchParams();
|
|
25
|
+
for (let n of Ee) {
|
|
26
|
+
let r = e[n], i = Array.isArray(r) ? r.map((e) => e.trim()).filter(Boolean).join(",") : r?.trim();
|
|
27
|
+
i && t.set(n, i);
|
|
28
|
+
}
|
|
29
|
+
let n = t.toString(), i = r("/api/surveyor/vtile/applications/{z}/{x}/{y}");
|
|
30
|
+
return n ? `${i}?${n}` : i;
|
|
31
|
+
}
|
|
32
|
+
async function Oe() {
|
|
33
|
+
let e = await n(v, {
|
|
34
|
+
page: 1,
|
|
35
|
+
limit: 1
|
|
36
|
+
}), t = Object.fromEntries(g.map((e) => [e, 0]));
|
|
37
|
+
for (let n of g) {
|
|
38
|
+
let r = Number(e.summary?.[n] ?? 0);
|
|
39
|
+
t[n] = Number.isFinite(r) ? r : 0;
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
}
|
|
43
|
+
function ke(e) {
|
|
44
|
+
return t(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor`);
|
|
45
|
+
}
|
|
46
|
+
function Ae(e, n = {}) {
|
|
47
|
+
let r = e.trim(), i = new URLSearchParams({
|
|
48
|
+
search: r,
|
|
49
|
+
page: String(n.page ?? 1),
|
|
50
|
+
limit: String(n.limit ?? 20)
|
|
51
|
+
});
|
|
52
|
+
return n.filter && i.set("filter", n.filter), t(`/api/surveyor/applications/search?${i}`, { signal: n.signal });
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region admin/src/api/mock-map-settings.ts
|
|
56
|
+
var je = {
|
|
57
|
+
center: "49.8397, 24.0297",
|
|
58
|
+
zoom: 13,
|
|
59
|
+
katottg: "UA4610100000",
|
|
60
|
+
collapseEmptyFields: !0,
|
|
61
|
+
configFileName: null,
|
|
62
|
+
links: {
|
|
63
|
+
publicCabinet: "https://cabinet.geodesist.gov.ua/public",
|
|
64
|
+
adminCabinet: "https://cabinet.geodesist.gov.ua/admin",
|
|
65
|
+
gis: "https://gis.geodesist.gov.ua"
|
|
66
|
+
}
|
|
67
|
+
}, Me = "surveyor:map-settings", $ = L({ ...je });
|
|
68
|
+
function Ne(e) {
|
|
69
|
+
let t = Number(e.trim().replace(",", "."));
|
|
70
|
+
return Number.isFinite(t) ? t : null;
|
|
71
|
+
}
|
|
72
|
+
function Pe(e) {
|
|
73
|
+
let t = e.split(",").map((e) => Ne(e));
|
|
74
|
+
return t.length !== 2 || t[0] == null || t[1] == null ? null : {
|
|
75
|
+
lat: t[0],
|
|
76
|
+
lng: t[1]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function Fe(e) {
|
|
80
|
+
let t = typeof e == "number" ? e : Number(String(e ?? "").trim().replace(",", "."));
|
|
81
|
+
return Number.isFinite(t) && t >= 1 && t <= 19 ? t : je.zoom;
|
|
82
|
+
}
|
|
83
|
+
function Ie() {
|
|
84
|
+
try {
|
|
85
|
+
let e = localStorage.getItem(Me);
|
|
86
|
+
if (!e) return;
|
|
87
|
+
let t = JSON.parse(e), { bounds: n, ...r } = t;
|
|
88
|
+
$.value = {
|
|
89
|
+
...je,
|
|
90
|
+
...r,
|
|
91
|
+
zoom: Fe(t.zoom)
|
|
92
|
+
};
|
|
93
|
+
} catch {
|
|
94
|
+
$.value = { ...je };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
Ie();
|
|
98
|
+
function Le() {
|
|
99
|
+
let e = E(() => Pe($.value.center)), t = E(() => e.value ? [e.value.lng, e.value.lat] : null);
|
|
100
|
+
function n(e) {
|
|
101
|
+
$.value = { ...e }, localStorage.setItem(Me, JSON.stringify($.value));
|
|
102
|
+
}
|
|
103
|
+
function r() {
|
|
104
|
+
$.value = { ...je }, localStorage.removeItem(Me);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
settings: $,
|
|
108
|
+
center: e,
|
|
109
|
+
centerLngLat: t,
|
|
110
|
+
zoom: E(() => Fe($.value.zoom)),
|
|
111
|
+
saveSettings: n,
|
|
112
|
+
resetSettings: r
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region admin/src/lib/work-types.ts
|
|
117
|
+
var Re = b.items.map((e) => ({
|
|
118
|
+
code: e.code,
|
|
119
|
+
label: e.name
|
|
120
|
+
})), ze = Object.fromEntries(b.items.map((e) => [e.code, e.name])), Be = "map-applications", Ve = "applications", He = "map-applications-fill", Ue = "map-applications-line";
|
|
121
|
+
function We() {
|
|
122
|
+
return [
|
|
123
|
+
"match",
|
|
124
|
+
["get", "status"],
|
|
125
|
+
...Object.entries(h).flatMap(([e, t]) => [e, t]),
|
|
126
|
+
"#64748b"
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
function Ge(e) {
|
|
130
|
+
return [
|
|
131
|
+
"*",
|
|
132
|
+
e,
|
|
133
|
+
[
|
|
134
|
+
"case",
|
|
135
|
+
[
|
|
136
|
+
"boolean",
|
|
137
|
+
["feature-state", "selected"],
|
|
138
|
+
!1
|
|
139
|
+
],
|
|
140
|
+
.55,
|
|
141
|
+
[
|
|
142
|
+
"boolean",
|
|
143
|
+
["feature-state", "hover"],
|
|
144
|
+
!1
|
|
145
|
+
],
|
|
146
|
+
.42,
|
|
147
|
+
.26
|
|
148
|
+
]
|
|
149
|
+
];
|
|
150
|
+
}
|
|
151
|
+
function Ke(e) {
|
|
152
|
+
return e.size ? [
|
|
153
|
+
"in",
|
|
154
|
+
["get", "status"],
|
|
155
|
+
["literal", Array.from(e)]
|
|
156
|
+
] : ["boolean", !1];
|
|
157
|
+
}
|
|
158
|
+
function qe(e) {
|
|
159
|
+
if (!e) return !1;
|
|
160
|
+
let { lng: t, lat: n, zoom: r } = e;
|
|
161
|
+
return Number.isFinite(t) && Number.isFinite(n) && Number.isFinite(r) && t >= -180 && t <= 180 && n >= -90 && n <= 90 && r >= 1 && r <= 19;
|
|
162
|
+
}
|
|
163
|
+
var Je = ["status", "workType"], Ye = "_", Xe = [
|
|
164
|
+
"dateFrom",
|
|
165
|
+
"dateTo",
|
|
166
|
+
"workType",
|
|
167
|
+
"verifiedBy",
|
|
168
|
+
"organization",
|
|
169
|
+
"address"
|
|
170
|
+
];
|
|
171
|
+
function Ze(e) {
|
|
172
|
+
let t = Number(String(e ?? "").trim().replace(",", "."));
|
|
173
|
+
return Number.isFinite(t) ? t : null;
|
|
174
|
+
}
|
|
175
|
+
function Qe(e) {
|
|
176
|
+
let t = Ze(e.x), n = Ze(e.y), r = Ze(e.z), i = t != null && n != null && r != null ? {
|
|
177
|
+
lng: t,
|
|
178
|
+
lat: n,
|
|
179
|
+
zoom: r
|
|
180
|
+
} : null, o = qe(i) ? i : null, s = String(e.filter ?? ""), c = a(s, Je), l = null, u = c.status;
|
|
181
|
+
if (u != null && u !== "") {
|
|
182
|
+
let e = Array.isArray(u) ? u.join(",") : String(u);
|
|
183
|
+
if (e === Ye) l = /* @__PURE__ */ new Set();
|
|
184
|
+
else {
|
|
185
|
+
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
186
|
+
l = new Set(t.filter((e) => g.includes(e)));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
let d = String(c.search ?? "").trim(), f = {};
|
|
190
|
+
for (let e of Xe) {
|
|
191
|
+
let t = c[e];
|
|
192
|
+
if (t == null || t === "") continue;
|
|
193
|
+
if (e === "workType") {
|
|
194
|
+
let e = Array.isArray(t) ? t.map((e) => String(e).trim()).filter(Boolean) : String(t).split(",").map((e) => e.trim()).filter(Boolean);
|
|
195
|
+
e.length && (f.workType = e);
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
let n = Array.isArray(t) ? t[0] : String(t).trim();
|
|
199
|
+
n && (f[e] = n);
|
|
200
|
+
}
|
|
201
|
+
let p = e.layers, m = null;
|
|
202
|
+
p != null && String(p) !== "" ? m = String(p).split(",").map((e) => e.trim()).filter(Boolean) : p != null && String(p) === "" && (m = []);
|
|
203
|
+
let h = e.app, _ = null;
|
|
204
|
+
h != null && String(h) !== "" && (_ = String(h) !== "0");
|
|
205
|
+
let v = Ze(e.p), y = v != null && v > 0 ? Math.floor(v) : 1, b = String(e.basemap ?? e.base ?? "").trim() || null;
|
|
206
|
+
return {
|
|
207
|
+
view: o,
|
|
208
|
+
sel: String(e.sel ?? "").trim() || null,
|
|
209
|
+
identifyPage: y,
|
|
210
|
+
basemapId: b,
|
|
211
|
+
layerIds: m,
|
|
212
|
+
applicationsVisible: _,
|
|
213
|
+
visibleStatuses: l,
|
|
214
|
+
search: d,
|
|
215
|
+
advancedFilters: f
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function $e(e) {
|
|
219
|
+
let t = {};
|
|
220
|
+
g.every((t) => e.visibleStatuses.has(t)) || (t.status = e.visibleStatuses.size ? [...e.visibleStatuses].sort().join(",") : Ye);
|
|
221
|
+
let n = e.search.trim();
|
|
222
|
+
n && (t.search = n);
|
|
223
|
+
for (let n of Xe) {
|
|
224
|
+
let r = e.advancedFilters[n];
|
|
225
|
+
if (n === "workType") {
|
|
226
|
+
let n = (e.advancedFilters.workType ?? []).map((e) => e.trim()).filter(Boolean);
|
|
227
|
+
n.length && (t.workType = n);
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
let i = typeof r == "string" ? r.trim() : "";
|
|
231
|
+
i && (t[n] = i);
|
|
232
|
+
}
|
|
233
|
+
return t;
|
|
234
|
+
}
|
|
235
|
+
function et(e) {
|
|
236
|
+
let t = {};
|
|
237
|
+
e.view && qe(e.view) && (t.z = String(Math.round(e.view.zoom * 100) / 100), t.x = e.view.lng.toFixed(5), t.y = e.view.lat.toFixed(5)), e.sel && (t.sel = e.sel), e.identifyPage > 1 && (t.p = String(e.identifyPage));
|
|
238
|
+
let n = i($e(e));
|
|
239
|
+
return n && (t.filter = n), e.basemapId && e.defaultBasemapId && e.basemapId !== e.defaultBasemapId && (t.basemap = e.basemapId), e.activeOverlayIds.length > 0 && (t.layers = [...e.activeOverlayIds].sort().join(",")), e.applicationsVisible || (t.app = "0"), t;
|
|
240
|
+
}
|
|
241
|
+
function tt(e, t) {
|
|
242
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
243
|
+
for (let r of n) if (String(e[r] ?? "") !== String(t[r] ?? "")) return !1;
|
|
244
|
+
return !0;
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region admin/src/pages/map/components/MapView.vue?vue&type=script&setup=true&lang.ts
|
|
248
|
+
var nt = /*@__PURE__*/ N({
|
|
249
|
+
__name: "MapView",
|
|
250
|
+
props: {
|
|
251
|
+
basemap: {
|
|
252
|
+
type: Object,
|
|
253
|
+
required: !0
|
|
254
|
+
},
|
|
255
|
+
overlays: {
|
|
256
|
+
type: Array,
|
|
257
|
+
required: !1,
|
|
258
|
+
default: () => []
|
|
259
|
+
},
|
|
260
|
+
activeOverlayIds: {
|
|
261
|
+
type: Array,
|
|
262
|
+
required: !1,
|
|
263
|
+
default: () => []
|
|
264
|
+
},
|
|
265
|
+
overlayOpacities: {
|
|
266
|
+
type: Object,
|
|
267
|
+
required: !1,
|
|
268
|
+
default: () => ({})
|
|
269
|
+
},
|
|
270
|
+
visibleStatuses: {
|
|
271
|
+
type: Set,
|
|
272
|
+
required: !0
|
|
273
|
+
},
|
|
274
|
+
selectedId: {
|
|
275
|
+
type: [String, null],
|
|
276
|
+
required: !1,
|
|
277
|
+
default: null
|
|
278
|
+
},
|
|
279
|
+
applicationsVisible: {
|
|
280
|
+
type: Boolean,
|
|
281
|
+
required: !1,
|
|
282
|
+
default: !0
|
|
283
|
+
},
|
|
284
|
+
applicationsOpacity: {
|
|
285
|
+
type: Number,
|
|
286
|
+
required: !1,
|
|
287
|
+
default: 100
|
|
288
|
+
},
|
|
289
|
+
filters: {
|
|
290
|
+
type: Object,
|
|
291
|
+
required: !1,
|
|
292
|
+
default: () => ({})
|
|
293
|
+
},
|
|
294
|
+
initialView: {
|
|
295
|
+
type: [Object, null],
|
|
296
|
+
required: !1,
|
|
297
|
+
default: null
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
emits: [
|
|
301
|
+
"pointHover",
|
|
302
|
+
"pointSelect",
|
|
303
|
+
"zoom",
|
|
304
|
+
"viewChange",
|
|
305
|
+
"overlayLoad"
|
|
306
|
+
],
|
|
307
|
+
setup(e, { expose: t, emit: n }) {
|
|
308
|
+
let r = {
|
|
309
|
+
padding: 48,
|
|
310
|
+
maxZoom: 18
|
|
311
|
+
}, i = e, a = n, { centerLngLat: o, zoom: s, settings: l } = Le(), u = L(null), p = fe(null), h = L(null), g = L(""), _ = [], v, y = null, b = !1, oe = !1, T = [He, Ue];
|
|
312
|
+
function E(e) {
|
|
313
|
+
return Number.isFinite(e) ? Math.min(19, Math.max(1, e)) : s.value;
|
|
314
|
+
}
|
|
315
|
+
function D() {
|
|
316
|
+
return i.initialView ? {
|
|
317
|
+
center: [i.initialView.lng, i.initialView.lat],
|
|
318
|
+
zoom: E(i.initialView.zoom)
|
|
319
|
+
} : {
|
|
320
|
+
center: o.value ?? [24.0297, 49.8397],
|
|
321
|
+
zoom: E(s.value)
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function O() {
|
|
325
|
+
if (oe) return;
|
|
326
|
+
let e = p.value;
|
|
327
|
+
if (!e) return;
|
|
328
|
+
let t = e.getCenter(), n = {
|
|
329
|
+
lng: t.lng,
|
|
330
|
+
lat: t.lat,
|
|
331
|
+
zoom: e.getZoom()
|
|
332
|
+
};
|
|
333
|
+
a("viewChange", n), a("zoom", n.zoom);
|
|
334
|
+
}
|
|
335
|
+
function k(e, t = !1) {
|
|
336
|
+
let n = p.value;
|
|
337
|
+
n && (oe = !0, t ? n.flyTo({
|
|
338
|
+
center: [e.lng, e.lat],
|
|
339
|
+
zoom: e.zoom,
|
|
340
|
+
bearing: 0,
|
|
341
|
+
pitch: 0,
|
|
342
|
+
duration: 500
|
|
343
|
+
}) : n.jumpTo({
|
|
344
|
+
center: [e.lng, e.lat],
|
|
345
|
+
zoom: e.zoom
|
|
346
|
+
}), a("zoom", e.zoom), window.setTimeout(() => {
|
|
347
|
+
oe = !1;
|
|
348
|
+
}, 0));
|
|
349
|
+
}
|
|
350
|
+
function A(e) {
|
|
351
|
+
return e.isStyleLoaded() && !!e.getLayer("map-applications-fill");
|
|
352
|
+
}
|
|
353
|
+
function j(e) {
|
|
354
|
+
if (!A(e)) return;
|
|
355
|
+
let t = Ke(i.visibleStatuses);
|
|
356
|
+
for (let n of T) e.getLayer(n) && e.setFilter(n, t);
|
|
357
|
+
}
|
|
358
|
+
function M(e) {
|
|
359
|
+
if (!A(e)) return;
|
|
360
|
+
let t = i.applicationsVisible ? "visible" : "none", n = i.applicationsOpacity / 100;
|
|
361
|
+
for (let n of T) e.getLayer(n) && e.setLayoutProperty(n, "visibility", t);
|
|
362
|
+
e.setPaintProperty(He, "fill-opacity", Ge(n)), e.setPaintProperty(Ue, "line-opacity", n);
|
|
363
|
+
}
|
|
364
|
+
function N(e, t) {
|
|
365
|
+
x(e, t, te(e, i.overlays, [He]));
|
|
366
|
+
}
|
|
367
|
+
function le(e) {
|
|
368
|
+
e.getSource("map-applications") || e.addSource(Be, {
|
|
369
|
+
type: "vector",
|
|
370
|
+
tiles: [De(i.filters)],
|
|
371
|
+
promoteId: "id"
|
|
372
|
+
});
|
|
373
|
+
let t = Ke(i.visibleStatuses);
|
|
374
|
+
e.getLayer("map-applications-fill") || e.addLayer({
|
|
375
|
+
id: He,
|
|
376
|
+
type: "fill",
|
|
377
|
+
source: Be,
|
|
378
|
+
"source-layer": Ve,
|
|
379
|
+
filter: t,
|
|
380
|
+
paint: {
|
|
381
|
+
"fill-color": We(),
|
|
382
|
+
"fill-opacity": Ge(i.applicationsOpacity / 100)
|
|
383
|
+
}
|
|
384
|
+
}), e.getLayer("map-applications-line") || e.addLayer({
|
|
385
|
+
id: Ue,
|
|
386
|
+
type: "line",
|
|
387
|
+
source: Be,
|
|
388
|
+
"source-layer": Ve,
|
|
389
|
+
filter: t,
|
|
390
|
+
paint: {
|
|
391
|
+
"line-color": We(),
|
|
392
|
+
"line-width": [
|
|
393
|
+
"case",
|
|
394
|
+
[
|
|
395
|
+
"boolean",
|
|
396
|
+
["feature-state", "selected"],
|
|
397
|
+
!1
|
|
398
|
+
],
|
|
399
|
+
3,
|
|
400
|
+
[
|
|
401
|
+
"boolean",
|
|
402
|
+
["feature-state", "hover"],
|
|
403
|
+
!1
|
|
404
|
+
],
|
|
405
|
+
2.5,
|
|
406
|
+
1.5
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
}), j(e), M(e);
|
|
410
|
+
}
|
|
411
|
+
function P(e) {
|
|
412
|
+
return i.overlayOpacities[e.id] ?? Math.round(d(e) * 100);
|
|
413
|
+
}
|
|
414
|
+
function F(e) {
|
|
415
|
+
for (let t of i.overlays) re(e, t, P(t));
|
|
416
|
+
}
|
|
417
|
+
function I(e) {
|
|
418
|
+
ae(e, i.overlays, i.activeOverlayIds, He), F(e);
|
|
419
|
+
}
|
|
420
|
+
let R = /* @__PURE__ */ new Set();
|
|
421
|
+
function z(e) {
|
|
422
|
+
let t = e;
|
|
423
|
+
t.sourceId && t.isSourceLoaded && i.overlays.some((e) => e.id === t.sourceId) && (R.add(t.sourceId), a("overlayLoad", t.sourceId, "ready"));
|
|
424
|
+
}
|
|
425
|
+
function B(e) {
|
|
426
|
+
let t = e;
|
|
427
|
+
!t.sourceId || t.tile || R.has(t.sourceId) || i.overlays.some((e) => e.id === t.sourceId) && a("overlayLoad", t.sourceId, "error");
|
|
428
|
+
}
|
|
429
|
+
function V(e) {
|
|
430
|
+
le(e), I(e);
|
|
431
|
+
}
|
|
432
|
+
function U(e) {
|
|
433
|
+
return {
|
|
434
|
+
source: Be,
|
|
435
|
+
sourceLayer: Ve,
|
|
436
|
+
id: e
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
function W(e) {
|
|
440
|
+
if (!_.length || !e.getSource("map-applications")) {
|
|
441
|
+
_.length = 0;
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
for (let t of _) try {
|
|
445
|
+
e.setFeatureState(U(t), { hover: !1 });
|
|
446
|
+
} catch {}
|
|
447
|
+
_.length = 0;
|
|
448
|
+
}
|
|
449
|
+
function pe(e, t) {
|
|
450
|
+
let n = new Set(t);
|
|
451
|
+
if (e.getSource("map-applications")) {
|
|
452
|
+
for (let t of _) if (!n.has(t)) try {
|
|
453
|
+
e.setFeatureState(U(t), { hover: !1 });
|
|
454
|
+
} catch {}
|
|
455
|
+
for (let n of t) try {
|
|
456
|
+
e.setFeatureState(U(n), { hover: !0 });
|
|
457
|
+
} catch {}
|
|
458
|
+
}
|
|
459
|
+
_.length = 0, _.push(...t);
|
|
460
|
+
}
|
|
461
|
+
function me(e, t) {
|
|
462
|
+
let n = h.value;
|
|
463
|
+
if (n && n !== t && e.getSource("map-applications")) try {
|
|
464
|
+
e.setFeatureState(U(n), { selected: !1 });
|
|
465
|
+
} catch {}
|
|
466
|
+
if (h.value = t, t && e.getSource("map-applications")) try {
|
|
467
|
+
e.setFeatureState(U(t), { selected: !0 });
|
|
468
|
+
} catch {}
|
|
469
|
+
}
|
|
470
|
+
function he(e, t = "") {
|
|
471
|
+
return (e == null ? "" : String(e).trim()) || t;
|
|
472
|
+
}
|
|
473
|
+
function G(e, t) {
|
|
474
|
+
let n = e.queryRenderedFeatures(t, { layers: [He] }), r = [], a = /* @__PURE__ */ new Set();
|
|
475
|
+
for (let e of n) {
|
|
476
|
+
let t = he(e.id ?? e.properties?.id);
|
|
477
|
+
if (!t || a.has(t)) continue;
|
|
478
|
+
let n = he(e.properties?.status);
|
|
479
|
+
if (n && !i.visibleStatuses.has(n)) continue;
|
|
480
|
+
a.add(t);
|
|
481
|
+
let o = he(e.properties?.work_type), s = he(e.properties?.org_name ?? e.properties?.organization);
|
|
482
|
+
r.push({
|
|
483
|
+
id: t,
|
|
484
|
+
number: he(e.properties?.number, "—"),
|
|
485
|
+
status: n,
|
|
486
|
+
workType: o && ze[o] || o || "—",
|
|
487
|
+
organization: s || "—"
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
return r.length ? {
|
|
491
|
+
points: r,
|
|
492
|
+
total: r.length
|
|
493
|
+
} : null;
|
|
494
|
+
}
|
|
495
|
+
function ge() {
|
|
496
|
+
let e = p.value;
|
|
497
|
+
e && (W(e), e.getCanvas().style.cursor = ""), a("pointHover", null, null);
|
|
498
|
+
}
|
|
499
|
+
let _e = !1;
|
|
500
|
+
function K(e) {
|
|
501
|
+
let t = p.value;
|
|
502
|
+
if (!t || _e || !A(t)) return;
|
|
503
|
+
let n = G(t, e.point);
|
|
504
|
+
if (t.getCanvas().style.cursor = n ? "pointer" : "", !n) {
|
|
505
|
+
W(t), a("pointHover", null, null);
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
pe(t, n.points.map((e) => e.id)), a("pointHover", n, {
|
|
509
|
+
x: e.point.x,
|
|
510
|
+
y: e.point.y
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
function ve(e) {
|
|
514
|
+
let t = p.value;
|
|
515
|
+
if (!t || !A(t)) return;
|
|
516
|
+
let n = G(t, e.point);
|
|
517
|
+
if (!n?.points.length) {
|
|
518
|
+
a("pointSelect", null);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
a("pointSelect", {
|
|
522
|
+
...n,
|
|
523
|
+
lng: e.lngLat.lng,
|
|
524
|
+
lat: e.lngLat.lat
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
function q() {
|
|
528
|
+
let e = u.value;
|
|
529
|
+
if (!y || !e || p.value || e.clientWidth === 0 || e.clientHeight === 0) return;
|
|
530
|
+
let t = D(), n = new y.Map({
|
|
531
|
+
container: e,
|
|
532
|
+
style: m(i.basemap),
|
|
533
|
+
center: t.center,
|
|
534
|
+
zoom: t.zoom,
|
|
535
|
+
minZoom: 1,
|
|
536
|
+
maxZoom: 19,
|
|
537
|
+
attributionControl: !1,
|
|
538
|
+
locale: w,
|
|
539
|
+
transformRequest: (e, t) => t === "Tile" && e.includes("/vtile/applications/") ? {
|
|
540
|
+
url: e,
|
|
541
|
+
credentials: "include"
|
|
542
|
+
} : { url: e }
|
|
543
|
+
});
|
|
544
|
+
n.on("load", () => {
|
|
545
|
+
n.setMaxBounds(null), n.resize(), V(n), me(n, i.selectedId ?? null), O();
|
|
546
|
+
}), n.on("moveend", O), n.on("sourcedata", z), n.on("error", B), n.on("mousemove", (e) => K(e)), n.on("dragstart", () => {
|
|
547
|
+
_e = !0, ge();
|
|
548
|
+
}), n.on("dragend", () => {
|
|
549
|
+
_e = !1;
|
|
550
|
+
}), n.on("click", (e) => ve(e)), p.value = n;
|
|
551
|
+
}
|
|
552
|
+
async function ye() {
|
|
553
|
+
try {
|
|
554
|
+
y = await ee();
|
|
555
|
+
} catch (e) {
|
|
556
|
+
console.error(e), g.value = ne;
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
!b && u.value && (v = new ResizeObserver(() => {
|
|
560
|
+
p.value ? p.value.resize() : q();
|
|
561
|
+
}), v.observe(u.value));
|
|
562
|
+
}
|
|
563
|
+
H(() => Array.from(i.visibleStatuses).sort().join(","), () => {
|
|
564
|
+
let e = p.value;
|
|
565
|
+
e && W(e), a("pointHover", null, null), e?.isStyleLoaded() && j(e);
|
|
566
|
+
}), H(() => De(i.filters), (e) => {
|
|
567
|
+
let t = p.value, n = t?.getSource(Be);
|
|
568
|
+
t && n && (W(t), t.getCanvas().style.cursor = "", a("pointHover", null, null), n.setTiles([e]));
|
|
569
|
+
}), H(() => [i.applicationsVisible, i.applicationsOpacity], () => {
|
|
570
|
+
let e = p.value;
|
|
571
|
+
e && (i.applicationsVisible || (W(e), e.getCanvas().style.cursor = "", a("pointHover", null, null)), M(e));
|
|
572
|
+
}), H(() => i.overlays, () => {
|
|
573
|
+
let e = p.value;
|
|
574
|
+
e?.isStyleLoaded() && I(e);
|
|
575
|
+
}), H(() => i.activeOverlayIds, () => {
|
|
576
|
+
let e = p.value;
|
|
577
|
+
e?.isStyleLoaded() && C(e, i.overlays, i.activeOverlayIds);
|
|
578
|
+
}), H(() => i.overlayOpacities, () => {
|
|
579
|
+
let e = p.value;
|
|
580
|
+
e?.isStyleLoaded() && F(e);
|
|
581
|
+
}, { deep: !0 }), H(() => i.basemap, (e) => {
|
|
582
|
+
let t = p.value;
|
|
583
|
+
if (!t) return;
|
|
584
|
+
let n = () => N(t, e);
|
|
585
|
+
t.isStyleLoaded() ? n() : t.once("style.load", n);
|
|
586
|
+
}), H(() => i.selectedId ?? null, (e) => {
|
|
587
|
+
let t = p.value;
|
|
588
|
+
t?.getSource("map-applications") && me(t, e);
|
|
589
|
+
}), H(() => [l.value.center, l.value.zoom].join("|"), () => {
|
|
590
|
+
let e = p.value;
|
|
591
|
+
if (!e?.isStyleLoaded()) return;
|
|
592
|
+
let t = D();
|
|
593
|
+
e.flyTo({
|
|
594
|
+
center: t.center,
|
|
595
|
+
zoom: t.zoom,
|
|
596
|
+
bearing: 0,
|
|
597
|
+
pitch: 0,
|
|
598
|
+
duration: 500
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
function J() {
|
|
602
|
+
p.value?.zoomIn({ duration: 250 });
|
|
603
|
+
}
|
|
604
|
+
function Y() {
|
|
605
|
+
p.value?.zoomOut({ duration: 250 });
|
|
606
|
+
}
|
|
607
|
+
function X() {
|
|
608
|
+
let e = D();
|
|
609
|
+
p.value?.flyTo({
|
|
610
|
+
center: e.center,
|
|
611
|
+
zoom: e.zoom,
|
|
612
|
+
bearing: 0,
|
|
613
|
+
pitch: 0,
|
|
614
|
+
duration: 500
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
function Z(e) {
|
|
618
|
+
let t = p.value;
|
|
619
|
+
return !!(t?.isStyleLoaded() && t.isSourceLoaded(e));
|
|
620
|
+
}
|
|
621
|
+
function Q(e) {
|
|
622
|
+
let t = p.value, n = i.overlays.find((t) => t.id === e);
|
|
623
|
+
if (!t || !n || !c(n)) return;
|
|
624
|
+
let r = t.getZoom(), a = f(n), o = n.kind === "raster" || n.kind === "vector" ? n.maxzoom ?? 18 : 18, s = a != null && r < a ? a : Math.min(o, r + 1), l = t.getCenter();
|
|
625
|
+
t.flyTo({
|
|
626
|
+
center: [l.lng, l.lat],
|
|
627
|
+
zoom: s,
|
|
628
|
+
duration: 600
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
function be(e) {
|
|
632
|
+
let t = se(e), n = p.value;
|
|
633
|
+
t && n && n.fitBounds(ce(t), {
|
|
634
|
+
...r,
|
|
635
|
+
duration: 500
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
function xe(e) {
|
|
639
|
+
let t = p.value, n = i.overlays.find((t) => t.id === e);
|
|
640
|
+
if (!t || !n) return;
|
|
641
|
+
let r = () => {
|
|
642
|
+
R.delete(e), S(t, n), ie(t, n, i.activeOverlayIds.includes(e), He), re(t, n, P(n));
|
|
643
|
+
};
|
|
644
|
+
t.isStyleLoaded() ? r() : t.once("load", r);
|
|
645
|
+
}
|
|
646
|
+
t({
|
|
647
|
+
zoomIn: J,
|
|
648
|
+
zoomOut: Y,
|
|
649
|
+
resetView: X,
|
|
650
|
+
setView: k,
|
|
651
|
+
overlaySourceReady: Z,
|
|
652
|
+
zoomToOverlay: Q,
|
|
653
|
+
reloadOverlay: xe,
|
|
654
|
+
fitApplicationGeometry: be
|
|
655
|
+
}), ue(ye), de(() => {
|
|
656
|
+
b = !0, v?.disconnect(), p.value?.remove(), p.value = null;
|
|
657
|
+
});
|
|
658
|
+
let Se = {
|
|
659
|
+
FIT_APPLICATION_OPTIONS: r,
|
|
660
|
+
props: i,
|
|
661
|
+
emit: a,
|
|
662
|
+
centerLngLat: o,
|
|
663
|
+
zoom: s,
|
|
664
|
+
settings: l,
|
|
665
|
+
containerRef: u,
|
|
666
|
+
mapRef: p,
|
|
667
|
+
selectedFeatureId: h,
|
|
668
|
+
mapLoadError: g,
|
|
669
|
+
hoveredFeatureIds: _,
|
|
670
|
+
get resizeObserver() {
|
|
671
|
+
return v;
|
|
672
|
+
},
|
|
673
|
+
set resizeObserver(e) {
|
|
674
|
+
v = e;
|
|
675
|
+
},
|
|
676
|
+
get ml() {
|
|
677
|
+
return y;
|
|
678
|
+
},
|
|
679
|
+
set ml(e) {
|
|
680
|
+
y = e;
|
|
681
|
+
},
|
|
682
|
+
get disposed() {
|
|
683
|
+
return b;
|
|
684
|
+
},
|
|
685
|
+
set disposed(e) {
|
|
686
|
+
b = e;
|
|
687
|
+
},
|
|
688
|
+
get suppressViewEmit() {
|
|
689
|
+
return oe;
|
|
690
|
+
},
|
|
691
|
+
set suppressViewEmit(e) {
|
|
692
|
+
oe = e;
|
|
693
|
+
},
|
|
694
|
+
interactiveLayers: T,
|
|
695
|
+
clampZoom: E,
|
|
696
|
+
getViewOptions: D,
|
|
697
|
+
emitCurrentView: O,
|
|
698
|
+
setView: k,
|
|
699
|
+
applicationsLayersReady: A,
|
|
700
|
+
applyStatusFilter: j,
|
|
701
|
+
applyApplicationsAppearance: M,
|
|
702
|
+
replaceBasemap: N,
|
|
703
|
+
ensureApplicationsLayers: le,
|
|
704
|
+
overlayPercent: P,
|
|
705
|
+
paintOverlayOpacities: F,
|
|
706
|
+
ensureOverlayLayers: I,
|
|
707
|
+
readyOverlaySources: R,
|
|
708
|
+
handleSourceData: z,
|
|
709
|
+
handleOverlayError: B,
|
|
710
|
+
ensureMapLayers: V,
|
|
711
|
+
featureTarget: U,
|
|
712
|
+
clearHoverState: W,
|
|
713
|
+
setHoveredFeatures: pe,
|
|
714
|
+
applySelection: me,
|
|
715
|
+
propertyText: he,
|
|
716
|
+
hoverPayloadAt: G,
|
|
717
|
+
clearPointHover: ge,
|
|
718
|
+
get mapDragging() {
|
|
719
|
+
return _e;
|
|
720
|
+
},
|
|
721
|
+
set mapDragging(e) {
|
|
722
|
+
_e = e;
|
|
723
|
+
},
|
|
724
|
+
handleMouseMove: K,
|
|
725
|
+
handleClick: ve,
|
|
726
|
+
initMap: q,
|
|
727
|
+
setupMap: ye,
|
|
728
|
+
zoomIn: J,
|
|
729
|
+
zoomOut: Y,
|
|
730
|
+
resetView: X,
|
|
731
|
+
overlaySourceReady: Z,
|
|
732
|
+
zoomToOverlay: Q,
|
|
733
|
+
fitApplicationGeometry: be,
|
|
734
|
+
reloadOverlay: xe
|
|
735
|
+
};
|
|
736
|
+
return Object.defineProperty(Se, "__isScriptSetup", {
|
|
737
|
+
enumerable: !1,
|
|
738
|
+
value: !0
|
|
739
|
+
}), Se;
|
|
740
|
+
}
|
|
741
|
+
}), rt = {
|
|
742
|
+
key: 0,
|
|
743
|
+
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
744
|
+
};
|
|
745
|
+
function it(e, t, n, r, i, a) {
|
|
746
|
+
return I(), k(T, null, [A("div", {
|
|
747
|
+
ref: "containerRef",
|
|
748
|
+
class: "absolute inset-0 h-full w-full",
|
|
749
|
+
onMouseleave: r.clearPointHover
|
|
750
|
+
}, null, 544), r.mapLoadError ? (I(), k("p", rt, z(r.mapLoadError), 1)) : O("", !0)], 64);
|
|
751
|
+
}
|
|
752
|
+
var at = /*#__PURE__*/ e(nt, [
|
|
753
|
+
["render", it],
|
|
754
|
+
["__scopeId", "data-v-ea235a7a"],
|
|
755
|
+
["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapView.vue"]
|
|
756
|
+
]), ot = 4, st = 208, ct = /*@__PURE__*/ N({
|
|
757
|
+
__name: "MapFilterSelect",
|
|
758
|
+
props: {
|
|
759
|
+
modelValue: {
|
|
760
|
+
type: Array,
|
|
761
|
+
required: !0
|
|
762
|
+
},
|
|
763
|
+
options: {
|
|
764
|
+
type: Array,
|
|
765
|
+
required: !0
|
|
766
|
+
},
|
|
767
|
+
label: {
|
|
768
|
+
type: String,
|
|
769
|
+
required: !0
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
emits: ["update:modelValue"],
|
|
773
|
+
setup(e, { expose: t, emit: n }) {
|
|
774
|
+
t();
|
|
775
|
+
let r = e, i = n, a = L(!1), s = L(null), c = B("buttonRef"), l = B("menuRef"), u = E(() => r.modelValue.length ? r.modelValue.map((e) => r.options.find((t) => t.value === e)?.label ?? e).join(", ") : "Усі значення");
|
|
776
|
+
function d() {
|
|
777
|
+
let e = c.value?.getBoundingClientRect();
|
|
778
|
+
if (!e) return;
|
|
779
|
+
let t = window.innerHeight - e.bottom - ot - 8;
|
|
780
|
+
s.value = {
|
|
781
|
+
top: `${e.bottom + ot}px`,
|
|
782
|
+
left: `${e.left}px`,
|
|
783
|
+
width: `${e.width}px`,
|
|
784
|
+
maxHeight: `${Math.max(Math.min(st, t), 80)}px`
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function f(e) {
|
|
788
|
+
let t = e.target;
|
|
789
|
+
c.value?.contains(t) || l.value?.contains(t) || (a.value = !1);
|
|
790
|
+
}
|
|
791
|
+
function p(e) {
|
|
792
|
+
e.key === "Escape" && (a.value = !1);
|
|
793
|
+
}
|
|
794
|
+
function m() {
|
|
795
|
+
window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), document.removeEventListener("pointerdown", f), document.removeEventListener("keydown", p);
|
|
796
|
+
}
|
|
797
|
+
function h(e) {
|
|
798
|
+
if (!e) {
|
|
799
|
+
i("update:modelValue", []);
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
let t = new Set(r.modelValue);
|
|
803
|
+
t.has(e) ? t.delete(e) : t.add(e), i("update:modelValue", [...t]);
|
|
804
|
+
}
|
|
805
|
+
H(a, async (e) => {
|
|
806
|
+
if (m(), !e) {
|
|
807
|
+
s.value = null;
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
await le(), d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0), document.addEventListener("pointerdown", f), document.addEventListener("keydown", p);
|
|
811
|
+
}), de(m);
|
|
812
|
+
let g = {
|
|
813
|
+
props: r,
|
|
814
|
+
emit: i,
|
|
815
|
+
MENU_GAP: ot,
|
|
816
|
+
MENU_MAX_HEIGHT: st,
|
|
817
|
+
open: a,
|
|
818
|
+
menuStyle: s,
|
|
819
|
+
buttonRef: c,
|
|
820
|
+
menuRef: l,
|
|
821
|
+
selectedLabel: u,
|
|
822
|
+
updateMenuPosition: d,
|
|
823
|
+
handleOutsidePointer: f,
|
|
824
|
+
handleEscape: p,
|
|
825
|
+
detachListeners: m,
|
|
826
|
+
toggle: h,
|
|
827
|
+
SurveyorTeleport: o,
|
|
828
|
+
get Check() {
|
|
829
|
+
return _e;
|
|
830
|
+
},
|
|
831
|
+
get ChevronDown() {
|
|
832
|
+
return K;
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
return Object.defineProperty(g, "__isScriptSetup", {
|
|
836
|
+
enumerable: !1,
|
|
837
|
+
value: !0
|
|
838
|
+
}), g;
|
|
839
|
+
}
|
|
840
|
+
}), lt = ["aria-expanded", "aria-label"], ut = { class: "min-w-0 truncate" }, dt = ["aria-label"], ft = ["aria-selected"], pt = ["aria-selected", "onClick"], mt = { class: "min-w-0 truncate" };
|
|
841
|
+
function ht(e, t, n, r, i, a) {
|
|
842
|
+
return I(), k(T, null, [A("button", {
|
|
843
|
+
ref: "buttonRef",
|
|
844
|
+
type: "button",
|
|
845
|
+
"data-map-filter-ui": "",
|
|
846
|
+
"aria-expanded": r.open,
|
|
847
|
+
"aria-label": n.label,
|
|
848
|
+
class: P(["flex h-9 w-full items-center justify-between gap-2 rounded-lg border bg-white px-2.5 text-left text-xs text-slate-700 outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-100", r.open ? "border-brand-400 ring-1 ring-brand-100" : "border-slate-200"]),
|
|
849
|
+
onClick: t[0] ||= (e) => r.open = !r.open
|
|
850
|
+
}, [A("span", ut, z(r.selectedLabel), 1), M(r.ChevronDown, { class: P(["h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]) }, null, 8, ["class"])], 10, lt), M(r.SurveyorTeleport, null, {
|
|
851
|
+
default: U(() => [r.open && r.menuStyle ? (I(), k("div", {
|
|
852
|
+
key: 0,
|
|
853
|
+
ref: "menuRef",
|
|
854
|
+
"data-map-filter-ui": "",
|
|
855
|
+
role: "listbox",
|
|
856
|
+
"aria-multiselectable": "true",
|
|
857
|
+
"aria-label": n.label,
|
|
858
|
+
class: "fixed z-[80] overflow-y-auto rounded-lg border border-slate-200 bg-white py-1 shadow-xl",
|
|
859
|
+
style: F(r.menuStyle)
|
|
860
|
+
}, [A("button", {
|
|
861
|
+
type: "button",
|
|
862
|
+
role: "option",
|
|
863
|
+
"aria-selected": !n.modelValue.length,
|
|
864
|
+
class: P(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.length ? "text-slate-700" : "bg-brand-50 font-medium text-brand-700"]),
|
|
865
|
+
onClick: t[1] ||= (e) => r.toggle("")
|
|
866
|
+
}, [A("span", { class: P(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.length ? "border-slate-300 bg-white" : "border-brand-600 bg-brand-600 text-white"]) }, [n.modelValue.length ? O("", !0) : (I(), D(r.Check, {
|
|
867
|
+
key: 0,
|
|
868
|
+
class: "h-2.5 w-2.5"
|
|
869
|
+
}))], 2), t[2] ||= A("span", { class: "min-w-0 truncate" }, "Усі значення", -1)], 10, ft), (I(!0), k(T, null, R(n.options, (e) => (I(), k("button", {
|
|
870
|
+
key: e.value,
|
|
871
|
+
type: "button",
|
|
872
|
+
role: "option",
|
|
873
|
+
"aria-selected": n.modelValue.includes(e.value),
|
|
874
|
+
class: P(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.includes(e.value) ? "bg-brand-50 font-medium text-brand-700" : "text-slate-700"]),
|
|
875
|
+
onClick: (t) => r.toggle(e.value)
|
|
876
|
+
}, [A("span", { class: P(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.includes(e.value) ? "border-brand-600 bg-brand-600 text-white" : "border-slate-300 bg-white"]) }, [n.modelValue.includes(e.value) ? (I(), D(r.Check, {
|
|
877
|
+
key: 0,
|
|
878
|
+
class: "h-2.5 w-2.5"
|
|
879
|
+
})) : O("", !0)], 2), A("span", mt, z(e.label), 1)], 10, pt))), 128))], 12, dt)) : O("", !0)]),
|
|
880
|
+
_: 1
|
|
881
|
+
})], 64);
|
|
882
|
+
}
|
|
883
|
+
var gt = /*#__PURE__*/ e(ct, [["render", ht], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapFilterSelect.vue"]]), _t = 208, vt = 182, yt = 12, bt = /*@__PURE__*/ N({
|
|
884
|
+
__name: "OverlayLayerRow",
|
|
885
|
+
props: {
|
|
886
|
+
layer: {
|
|
887
|
+
type: Object,
|
|
888
|
+
required: !0
|
|
889
|
+
},
|
|
890
|
+
visible: {
|
|
891
|
+
type: Boolean,
|
|
892
|
+
required: !0
|
|
893
|
+
},
|
|
894
|
+
opacity: {
|
|
895
|
+
type: Number,
|
|
896
|
+
required: !0
|
|
897
|
+
},
|
|
898
|
+
mapZoom: {
|
|
899
|
+
type: Number,
|
|
900
|
+
required: !0
|
|
901
|
+
},
|
|
902
|
+
loadState: {
|
|
903
|
+
type: String,
|
|
904
|
+
required: !1
|
|
905
|
+
},
|
|
906
|
+
menuOpen: {
|
|
907
|
+
type: Boolean,
|
|
908
|
+
required: !0
|
|
909
|
+
},
|
|
910
|
+
legendOpen: {
|
|
911
|
+
type: Boolean,
|
|
912
|
+
required: !0
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
emits: [
|
|
916
|
+
"toggle",
|
|
917
|
+
"update:opacity",
|
|
918
|
+
"zoom",
|
|
919
|
+
"toggleMenu",
|
|
920
|
+
"closeMenu",
|
|
921
|
+
"toggleLegend",
|
|
922
|
+
"retry"
|
|
923
|
+
],
|
|
924
|
+
setup(e, { expose: t, emit: n }) {
|
|
925
|
+
t();
|
|
926
|
+
let r = e, i = n, a = B("menuButtonRef"), s = B("menuRef"), u = L(null), d = E(() => f(r.layer)), p = E(() => l(r.layer)), m = E(() => r.layer.legendLabel || r.layer.label), h = E(() => c(r.layer) ? d.value != null && r.mapZoom < d.value ? "unavailable" : r.loadState ?? "ready" : "missing"), g = E(() => h.value === "missing" || h.value === "unavailable" && !r.visible), _ = E(() => c(r.layer)), v = E(() => h.value === "missing" || h.value === "unavailable"), y = E(() => {
|
|
927
|
+
let e = d.value;
|
|
928
|
+
return e == null ? "" : `Доступний з ${Number.isInteger(e) ? String(e) : e.toFixed(1)} масштабу`;
|
|
929
|
+
}), b = E(() => {
|
|
930
|
+
let e = p.value ?? "#94a3b8";
|
|
931
|
+
return {
|
|
932
|
+
backgroundColor: `color-mix(in srgb, ${e} 22%, white)`,
|
|
933
|
+
borderColor: e
|
|
934
|
+
};
|
|
935
|
+
});
|
|
936
|
+
function x() {
|
|
937
|
+
let e = a.value?.getBoundingClientRect();
|
|
938
|
+
if (!e) return;
|
|
939
|
+
let t = e.right + yt + _t <= window.innerWidth - 8 ? e.right + yt : Math.max(8, e.left - _t - yt), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - vt - 8);
|
|
940
|
+
u.value = {
|
|
941
|
+
top: n,
|
|
942
|
+
left: t
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
function S(e) {
|
|
946
|
+
let t = e.target;
|
|
947
|
+
t instanceof Node && (s.value?.contains(t) || a.value?.contains(t) || i("closeMenu"));
|
|
948
|
+
}
|
|
949
|
+
function ee(e) {
|
|
950
|
+
e.key === "Escape" && i("closeMenu");
|
|
951
|
+
}
|
|
952
|
+
function te() {
|
|
953
|
+
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0), document.removeEventListener("pointerdown", S), document.removeEventListener("keydown", ee);
|
|
954
|
+
}
|
|
955
|
+
H(() => r.menuOpen, async (e) => {
|
|
956
|
+
if (te(), !e) {
|
|
957
|
+
u.value = null;
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
await le(), x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), document.addEventListener("pointerdown", S), document.addEventListener("keydown", ee);
|
|
961
|
+
}), de(te);
|
|
962
|
+
function ne(e) {
|
|
963
|
+
i("update:opacity", Number(e.target.value));
|
|
964
|
+
}
|
|
965
|
+
let re = {
|
|
966
|
+
MENU_WIDTH: _t,
|
|
967
|
+
MENU_HEIGHT: vt,
|
|
968
|
+
MENU_GAP: yt,
|
|
969
|
+
props: r,
|
|
970
|
+
emit: i,
|
|
971
|
+
menuButtonRef: a,
|
|
972
|
+
menuRef: s,
|
|
973
|
+
menuPosition: u,
|
|
974
|
+
minZoom: d,
|
|
975
|
+
legendColor: p,
|
|
976
|
+
legendText: m,
|
|
977
|
+
status: h,
|
|
978
|
+
toggleDisabled: g,
|
|
979
|
+
canZoom: _,
|
|
980
|
+
faded: v,
|
|
981
|
+
zoomText: y,
|
|
982
|
+
swatchStyle: b,
|
|
983
|
+
updateMenuPosition: x,
|
|
984
|
+
handleOutsidePointer: S,
|
|
985
|
+
handleEscape: ee,
|
|
986
|
+
detachMenuListeners: te,
|
|
987
|
+
onOpacityInput: ne,
|
|
988
|
+
SurveyorTeleport: o,
|
|
989
|
+
get AlertTriangle() {
|
|
990
|
+
return ge;
|
|
991
|
+
},
|
|
992
|
+
get GripVertical() {
|
|
993
|
+
return ye;
|
|
994
|
+
},
|
|
995
|
+
get Loader2() {
|
|
996
|
+
return Y;
|
|
997
|
+
},
|
|
998
|
+
get MapIcon() {
|
|
999
|
+
return X;
|
|
1000
|
+
},
|
|
1001
|
+
get MoreHorizontal() {
|
|
1002
|
+
return Q;
|
|
1003
|
+
},
|
|
1004
|
+
get ZoomIn() {
|
|
1005
|
+
return Te;
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
return Object.defineProperty(re, "__isScriptSetup", {
|
|
1009
|
+
enumerable: !1,
|
|
1010
|
+
value: !0
|
|
1011
|
+
}), re;
|
|
1012
|
+
}
|
|
1013
|
+
}), xt = { class: "flex items-center gap-2.5" }, St = [
|
|
1014
|
+
"aria-checked",
|
|
1015
|
+
"aria-label",
|
|
1016
|
+
"disabled"
|
|
1017
|
+
], Ct = { class: "min-w-0 flex-1" }, wt = ["title"], Tt = {
|
|
1018
|
+
key: 0,
|
|
1019
|
+
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
1020
|
+
}, Et = {
|
|
1021
|
+
key: 1,
|
|
1022
|
+
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
1023
|
+
}, Dt = {
|
|
1024
|
+
key: 2,
|
|
1025
|
+
class: "mt-0.5 flex items-center gap-1 text-[10px] text-brand-600"
|
|
1026
|
+
}, Ot = {
|
|
1027
|
+
key: 3,
|
|
1028
|
+
class: "mt-0.5 flex items-center gap-1 text-[10px] text-red-600"
|
|
1029
|
+
}, kt = {
|
|
1030
|
+
key: 4,
|
|
1031
|
+
class: "block text-[11px] text-slate-400"
|
|
1032
|
+
}, At = ["aria-expanded", "aria-label"], jt = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, Mt = { class: "tabular-nums text-slate-400" }, Nt = ["value", "aria-label"], Pt = ["disabled", "title"], Ft = {
|
|
1033
|
+
key: 0,
|
|
1034
|
+
class: "mt-2 rounded-lg border border-slate-100 bg-slate-50 px-3 py-2 text-[11px] text-slate-600"
|
|
1035
|
+
}, It = { class: "flex items-center gap-2" };
|
|
1036
|
+
function Lt(e, t, n, r, i, a) {
|
|
1037
|
+
return I(), k("div", { class: P(["relative rounded-xl border border-slate-200 px-3 py-2.5 transition-colors", [n.visible ? "bg-white" : "bg-slate-50", r.faded ? "opacity-65" : ""]]) }, [
|
|
1038
|
+
A("div", xt, [
|
|
1039
|
+
M(r.GripVertical, {
|
|
1040
|
+
class: "h-4 w-4 shrink-0 text-slate-300",
|
|
1041
|
+
"aria-hidden": "true"
|
|
1042
|
+
}),
|
|
1043
|
+
A("button", {
|
|
1044
|
+
type: "button",
|
|
1045
|
+
role: "switch",
|
|
1046
|
+
"aria-checked": n.visible,
|
|
1047
|
+
"aria-label": `Показати шар ${n.layer.label}`,
|
|
1048
|
+
disabled: r.toggleDisabled,
|
|
1049
|
+
class: P(["map-switch-track relative h-5 w-9 shrink-0 overflow-hidden rounded-full focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1 disabled:cursor-not-allowed", n.visible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1050
|
+
onClick: t[0] ||= (e) => r.emit("toggle")
|
|
1051
|
+
}, [A("span", { class: P(["map-switch-knob pointer-events-none absolute top-0.5 h-4 w-4 rounded-full bg-white shadow-sm", n.visible ? "left-[18px]" : "left-0.5"]) }, null, 2)], 10, St),
|
|
1052
|
+
A("span", {
|
|
1053
|
+
class: "h-2.5 w-8 shrink-0 rounded-sm border",
|
|
1054
|
+
style: F(r.swatchStyle),
|
|
1055
|
+
"aria-hidden": "true"
|
|
1056
|
+
}, null, 4),
|
|
1057
|
+
A("div", Ct, [A("span", {
|
|
1058
|
+
class: "block truncate text-sm font-medium text-slate-700",
|
|
1059
|
+
title: n.layer.label
|
|
1060
|
+
}, z(n.layer.label), 9, wt), r.status === "unavailable" ? (I(), k("span", Tt, [M(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), j(" " + z(r.zoomText), 1)])) : r.status === "missing" ? (I(), k("span", Et, [M(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[5] ||= j(" Джерело не налаштовано ", -1)])) : r.status === "loading" ? (I(), k("span", Dt, [M(r.Loader2, { class: "h-3 w-3 shrink-0 animate-spin" }), t[6] ||= j(" Завантаження шару… ", -1)])) : r.status === "error" ? (I(), k("span", Ot, [M(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[7] ||= j(" Помилка завантаження ", -1)])) : (I(), k("span", kt, z(n.opacity) + "% прозорості", 1))]),
|
|
1061
|
+
r.status === "error" ? (I(), k("button", {
|
|
1062
|
+
key: 0,
|
|
1063
|
+
type: "button",
|
|
1064
|
+
class: "rounded-md px-1.5 py-1 text-[10px] font-semibold text-red-700 hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-200",
|
|
1065
|
+
onClick: t[1] ||= (e) => r.emit("retry")
|
|
1066
|
+
}, " Повторити ")) : O("", !0),
|
|
1067
|
+
A("button", {
|
|
1068
|
+
ref: "menuButtonRef",
|
|
1069
|
+
type: "button",
|
|
1070
|
+
"aria-expanded": n.menuOpen,
|
|
1071
|
+
"aria-label": `Меню шару ${n.layer.label}`,
|
|
1072
|
+
class: "rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1073
|
+
onClick: t[2] ||= (e) => r.emit("toggleMenu")
|
|
1074
|
+
}, [M(r.MoreHorizontal, { class: "h-4 w-4" })], 8, At)
|
|
1075
|
+
]),
|
|
1076
|
+
M(r.SurveyorTeleport, null, {
|
|
1077
|
+
default: U(() => [n.menuOpen && r.menuPosition ? (I(), k("div", {
|
|
1078
|
+
key: 0,
|
|
1079
|
+
ref: "menuRef",
|
|
1080
|
+
role: "menu",
|
|
1081
|
+
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
1082
|
+
style: F({
|
|
1083
|
+
top: `${r.menuPosition.top}px`,
|
|
1084
|
+
left: `${r.menuPosition.left}px`
|
|
1085
|
+
})
|
|
1086
|
+
}, [
|
|
1087
|
+
A("div", jt, [t[8] ||= A("span", null, "Прозорість", -1), A("span", Mt, z(n.opacity) + "%", 1)]),
|
|
1088
|
+
A("input", {
|
|
1089
|
+
type: "range",
|
|
1090
|
+
min: "0",
|
|
1091
|
+
max: "100",
|
|
1092
|
+
value: n.opacity,
|
|
1093
|
+
"aria-label": `Прозорість шару ${n.layer.label}`,
|
|
1094
|
+
class: "mb-3 w-full accent-brand-600",
|
|
1095
|
+
onInput: r.onOpacityInput
|
|
1096
|
+
}, null, 40, Nt),
|
|
1097
|
+
A("button", {
|
|
1098
|
+
type: "button",
|
|
1099
|
+
disabled: !r.canZoom,
|
|
1100
|
+
title: r.canZoom ? void 0 : "Немає геометрії шару",
|
|
1101
|
+
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",
|
|
1102
|
+
onClick: t[3] ||= (e) => r.emit("zoom")
|
|
1103
|
+
}, [M(r.ZoomIn, { class: P(["h-3.5 w-3.5", r.canZoom ? "text-slate-400" : "text-slate-300"]) }, null, 8, ["class"]), t[9] ||= j(" Наблизити до шару ", -1)], 8, Pt),
|
|
1104
|
+
A("button", {
|
|
1105
|
+
type: "button",
|
|
1106
|
+
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1107
|
+
onClick: t[4] ||= (e) => r.emit("toggleLegend")
|
|
1108
|
+
}, [M(r.MapIcon, { class: "h-3.5 w-3.5 text-slate-400" }), t[10] ||= j(" Переглянути легенду ", -1)])
|
|
1109
|
+
], 4)) : O("", !0)]),
|
|
1110
|
+
_: 1
|
|
1111
|
+
}),
|
|
1112
|
+
n.legendOpen ? (I(), k("div", Ft, [t[11] ||= A("div", { class: "mb-1 font-semibold text-slate-700" }, "Легенда шару", -1), A("div", It, [A("span", {
|
|
1113
|
+
class: "h-2.5 w-7 rounded-sm",
|
|
1114
|
+
style: F({ backgroundColor: r.legendColor ?? "#94a3b8" })
|
|
1115
|
+
}, null, 4), j(" " + z(r.legendText), 1)])])) : O("", !0)
|
|
1116
|
+
], 2);
|
|
1117
|
+
}
|
|
1118
|
+
var Rt = /*#__PURE__*/ e(bt, [["render", Lt], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/OverlayLayerRow.vue"]]);
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region admin/src/pages/map/components/mock-map-data.ts
|
|
1121
|
+
function zt(e) {
|
|
1122
|
+
let t = e.status ? _[e.status] ?? e.status : "";
|
|
1123
|
+
return {
|
|
1124
|
+
app_id: e.id,
|
|
1125
|
+
number: e.number === "—" ? null : e.number,
|
|
1126
|
+
status: e.status || null,
|
|
1127
|
+
status_data: t ? { text: t } : null,
|
|
1128
|
+
work_type_data: e.workType === "—" ? null : { text: e.workType },
|
|
1129
|
+
org_id_data: e.organization === "—" ? null : { text: e.organization }
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
function Bt(e) {
|
|
1133
|
+
return e.map(zt);
|
|
1134
|
+
}
|
|
1135
|
+
var Vt = Object.entries(_).map(([e, t]) => ({
|
|
1136
|
+
key: e,
|
|
1137
|
+
label: t,
|
|
1138
|
+
color: h[e] ?? "#64748b"
|
|
1139
|
+
})), Ht = "Звернення на видачу вихідних даних", Ut = 208, Wt = 96, Gt = 12, Kt = /*@__PURE__*/ N({
|
|
1140
|
+
__name: "MapLayersPanel",
|
|
1141
|
+
props: {
|
|
1142
|
+
searchQuery: {
|
|
1143
|
+
type: String,
|
|
1144
|
+
required: !0
|
|
1145
|
+
},
|
|
1146
|
+
filters: {
|
|
1147
|
+
type: Object,
|
|
1148
|
+
required: !0
|
|
1149
|
+
},
|
|
1150
|
+
visibleStatuses: {
|
|
1151
|
+
type: Set,
|
|
1152
|
+
required: !0
|
|
1153
|
+
},
|
|
1154
|
+
statusCounts: {
|
|
1155
|
+
type: Object,
|
|
1156
|
+
required: !0
|
|
1157
|
+
},
|
|
1158
|
+
totalCount: {
|
|
1159
|
+
type: Number,
|
|
1160
|
+
required: !0
|
|
1161
|
+
},
|
|
1162
|
+
basemapId: {
|
|
1163
|
+
type: String,
|
|
1164
|
+
required: !0
|
|
1165
|
+
},
|
|
1166
|
+
baseLayers: {
|
|
1167
|
+
type: Array,
|
|
1168
|
+
required: !0
|
|
1169
|
+
},
|
|
1170
|
+
overlays: {
|
|
1171
|
+
type: Array,
|
|
1172
|
+
required: !0
|
|
1173
|
+
},
|
|
1174
|
+
activeOverlayIds: {
|
|
1175
|
+
type: Array,
|
|
1176
|
+
required: !0
|
|
1177
|
+
},
|
|
1178
|
+
overlayOpacities: {
|
|
1179
|
+
type: Object,
|
|
1180
|
+
required: !0
|
|
1181
|
+
},
|
|
1182
|
+
overlayLoad: {
|
|
1183
|
+
type: Object,
|
|
1184
|
+
required: !0
|
|
1185
|
+
},
|
|
1186
|
+
mapZoom: {
|
|
1187
|
+
type: Number,
|
|
1188
|
+
required: !0
|
|
1189
|
+
},
|
|
1190
|
+
applicationsName: {
|
|
1191
|
+
type: String,
|
|
1192
|
+
required: !1
|
|
1193
|
+
},
|
|
1194
|
+
applicationsVisible: {
|
|
1195
|
+
type: Boolean,
|
|
1196
|
+
required: !0
|
|
1197
|
+
},
|
|
1198
|
+
applicationsOpacity: {
|
|
1199
|
+
type: Number,
|
|
1200
|
+
required: !0
|
|
1201
|
+
},
|
|
1202
|
+
searchLoading: {
|
|
1203
|
+
type: Boolean,
|
|
1204
|
+
required: !1
|
|
1205
|
+
},
|
|
1206
|
+
searchResults: {
|
|
1207
|
+
type: Array,
|
|
1208
|
+
required: !1
|
|
1209
|
+
},
|
|
1210
|
+
searchEmpty: {
|
|
1211
|
+
type: Boolean,
|
|
1212
|
+
required: !1
|
|
1213
|
+
},
|
|
1214
|
+
searchError: {
|
|
1215
|
+
type: String,
|
|
1216
|
+
required: !1
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
emits: [
|
|
1220
|
+
"update:searchQuery",
|
|
1221
|
+
"update:filters",
|
|
1222
|
+
"update:applicationsVisible",
|
|
1223
|
+
"update:applicationsOpacity",
|
|
1224
|
+
"toggleStatus",
|
|
1225
|
+
"selectAllStatuses",
|
|
1226
|
+
"clearStatuses",
|
|
1227
|
+
"basemapChange",
|
|
1228
|
+
"toggleOverlay",
|
|
1229
|
+
"overlayOpacity",
|
|
1230
|
+
"zoomToOverlay",
|
|
1231
|
+
"retryOverlay",
|
|
1232
|
+
"selectSearchResult"
|
|
1233
|
+
],
|
|
1234
|
+
setup(e, { expose: t, emit: n }) {
|
|
1235
|
+
t();
|
|
1236
|
+
let r = {
|
|
1237
|
+
dateFrom: "Від",
|
|
1238
|
+
dateTo: "До",
|
|
1239
|
+
workType: "Вид робіт",
|
|
1240
|
+
verifiedBy: "Перевірив",
|
|
1241
|
+
organization: "Організація",
|
|
1242
|
+
address: "Адреса"
|
|
1243
|
+
}, i = e, a = n, s = L(!1), l = L(!0), f = L(!0), p = L(!1), m = L(!1), h = L({}), g = B("filtersFormRef"), _ = L(!1), v = L(null), y = B("menuButtonRef"), b = B("menuRef"), x = L(null), S = L(null), ee = L(null), te = E({
|
|
1244
|
+
get: () => i.searchQuery,
|
|
1245
|
+
set: (e) => a("update:searchQuery", e)
|
|
1246
|
+
}), ne = E(() => !!i.searchQuery.trim() && (i.searchLoading || i.searchError || i.searchEmpty || (i.searchResults?.length ?? 0) > 0)), re = E(() => i.applicationsName || Ht), ie = E(() => +!!i.applicationsVisible + i.overlays.filter((e) => i.activeOverlayIds.includes(e.id)).length), C = E(() => i.baseLayers.find((e) => e.id === i.basemapId) ?? i.baseLayers[0]), ae = E(() => Vt.filter((e) => i.visibleStatuses.has(e.key)).reduce((e, t) => e + (i.statusCounts[t.key] ?? 0), 0));
|
|
1247
|
+
function oe(e) {
|
|
1248
|
+
let t = i.statusCounts[e] ?? 0;
|
|
1249
|
+
return ae.value > 0 && i.visibleStatuses.has(e) ? Math.round(t / ae.value * 100) : 0;
|
|
1250
|
+
}
|
|
1251
|
+
function w(e) {
|
|
1252
|
+
return e.toLocaleString("uk-UA");
|
|
1253
|
+
}
|
|
1254
|
+
let se = E(() => Object.keys(r).filter((e) => {
|
|
1255
|
+
let t = i.filters[e];
|
|
1256
|
+
return Array.isArray(t) ? t.length > 0 : !!t;
|
|
1257
|
+
}).map((e) => ({
|
|
1258
|
+
key: e,
|
|
1259
|
+
label: `${r[e]}: ${D(e, i.filters[e] ?? "")}`
|
|
1260
|
+
}))), ce = E(() => se.value.length), T = E(() => !!(h.value.dateFrom && h.value.dateTo && h.value.dateFrom > h.value.dateTo));
|
|
1261
|
+
function D(e, t) {
|
|
1262
|
+
let n = Array.isArray(t) ? t : [t];
|
|
1263
|
+
return e === "workType" ? n.map((e) => ze[e] ?? e).join(", ") : e === "dateFrom" || e === "dateTo" ? n[0]?.split("-").reverse().join(".") ?? "" : n.join(", ");
|
|
1264
|
+
}
|
|
1265
|
+
function O(e) {
|
|
1266
|
+
let t = {}, n = (e.workType ?? []).map((e) => e.trim()).filter(Boolean);
|
|
1267
|
+
n.length && (t.workType = n);
|
|
1268
|
+
for (let n of [
|
|
1269
|
+
"dateFrom",
|
|
1270
|
+
"dateTo",
|
|
1271
|
+
"verifiedBy",
|
|
1272
|
+
"organization",
|
|
1273
|
+
"address"
|
|
1274
|
+
]) {
|
|
1275
|
+
let r = e[n]?.trim();
|
|
1276
|
+
r && (t[n] = r);
|
|
1277
|
+
}
|
|
1278
|
+
return t;
|
|
1279
|
+
}
|
|
1280
|
+
function k() {
|
|
1281
|
+
return {
|
|
1282
|
+
dateFrom: "",
|
|
1283
|
+
dateTo: "",
|
|
1284
|
+
workType: [],
|
|
1285
|
+
verifiedBy: "",
|
|
1286
|
+
organization: "",
|
|
1287
|
+
address: ""
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
function A() {
|
|
1291
|
+
m.value || (h.value = {
|
|
1292
|
+
...k(),
|
|
1293
|
+
...i.filters,
|
|
1294
|
+
workType: [...i.filters.workType ?? []]
|
|
1295
|
+
}), m.value = !m.value;
|
|
1296
|
+
}
|
|
1297
|
+
function j() {
|
|
1298
|
+
T.value || (a("update:filters", O(h.value)), m.value = !1);
|
|
1299
|
+
}
|
|
1300
|
+
function M() {
|
|
1301
|
+
h.value = k(), a("update:filters", {});
|
|
1302
|
+
}
|
|
1303
|
+
function N(e) {
|
|
1304
|
+
let t = { ...i.filters };
|
|
1305
|
+
delete t[e], a("update:filters", t), m.value && (h.value = {
|
|
1306
|
+
...h.value,
|
|
1307
|
+
[e]: e === "workType" ? [] : ""
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
function P() {
|
|
1311
|
+
a("update:applicationsVisible", !i.applicationsVisible);
|
|
1312
|
+
}
|
|
1313
|
+
function F() {
|
|
1314
|
+
x.value = null, _.value = !_.value;
|
|
1315
|
+
}
|
|
1316
|
+
function ue(e) {
|
|
1317
|
+
return i.overlayOpacities[e.id] ?? Math.round(d(e) * 100);
|
|
1318
|
+
}
|
|
1319
|
+
function I(e) {
|
|
1320
|
+
_.value = !1, x.value = x.value === e ? null : e;
|
|
1321
|
+
}
|
|
1322
|
+
function R(e) {
|
|
1323
|
+
S.value = S.value === e ? null : e;
|
|
1324
|
+
}
|
|
1325
|
+
function fe(e) {
|
|
1326
|
+
c(e) && (x.value = null, ee.value = `Карту наближено до шару «${e.label}».`, a("zoomToOverlay", e.id));
|
|
1327
|
+
}
|
|
1328
|
+
function z() {
|
|
1329
|
+
let e = y.value?.getBoundingClientRect();
|
|
1330
|
+
if (!e) return;
|
|
1331
|
+
let t = e.right + Gt + Ut <= window.innerWidth - 8 ? e.right + Gt : Math.max(8, e.left - Ut - Gt), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - Wt - 8);
|
|
1332
|
+
v.value = {
|
|
1333
|
+
top: n,
|
|
1334
|
+
left: t
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
function V(e) {
|
|
1338
|
+
let t = e.target;
|
|
1339
|
+
b.value?.contains(t) || y.value?.contains(t) || (_.value = !1);
|
|
1340
|
+
}
|
|
1341
|
+
function U(e) {
|
|
1342
|
+
e.key === "Escape" && (_.value = !1);
|
|
1343
|
+
}
|
|
1344
|
+
function W() {
|
|
1345
|
+
window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0), document.removeEventListener("pointerdown", V), document.removeEventListener("keydown", U);
|
|
1346
|
+
}
|
|
1347
|
+
H(_, async (e) => {
|
|
1348
|
+
if (W(), !e) {
|
|
1349
|
+
v.value = null;
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
await le(), z(), window.addEventListener("resize", z), window.addEventListener("scroll", z, !0), document.addEventListener("pointerdown", V), document.addEventListener("keydown", U);
|
|
1353
|
+
});
|
|
1354
|
+
function pe(e) {
|
|
1355
|
+
e.key === "Escape" && (document.querySelector("[data-map-filter-ui][role=\"listbox\"]") || (m.value = !1));
|
|
1356
|
+
}
|
|
1357
|
+
H(m, async (e) => {
|
|
1358
|
+
e ? (document.addEventListener("keydown", pe), await le(), g.value?.scrollIntoView({ block: "nearest" })) : document.removeEventListener("keydown", pe);
|
|
1359
|
+
}), H(s, (e) => {
|
|
1360
|
+
e && (_.value = !1, m.value = !1, x.value = null, S.value = null, ee.value = null);
|
|
1361
|
+
}), de(() => {
|
|
1362
|
+
W(), document.removeEventListener("keydown", pe);
|
|
1363
|
+
});
|
|
1364
|
+
let me = {
|
|
1365
|
+
DEFAULT_APPLICATIONS_LAYER_NAME: Ht,
|
|
1366
|
+
MENU_WIDTH: Ut,
|
|
1367
|
+
MENU_HEIGHT: Wt,
|
|
1368
|
+
MENU_GAP: Gt,
|
|
1369
|
+
FILTER_LABELS: r,
|
|
1370
|
+
props: i,
|
|
1371
|
+
emit: a,
|
|
1372
|
+
collapsed: s,
|
|
1373
|
+
layersOpen: l,
|
|
1374
|
+
applicationsOpen: f,
|
|
1375
|
+
baseOpen: p,
|
|
1376
|
+
filtersOpen: m,
|
|
1377
|
+
draftFilters: h,
|
|
1378
|
+
filtersFormRef: g,
|
|
1379
|
+
menuOpen: _,
|
|
1380
|
+
menuPosition: v,
|
|
1381
|
+
menuButtonRef: y,
|
|
1382
|
+
menuRef: b,
|
|
1383
|
+
overlayMenuId: x,
|
|
1384
|
+
legendLayerId: S,
|
|
1385
|
+
layerNotice: ee,
|
|
1386
|
+
searchModel: te,
|
|
1387
|
+
searchDropdownOpen: ne,
|
|
1388
|
+
applicationsLayerName: re,
|
|
1389
|
+
activeLayersCount: ie,
|
|
1390
|
+
activeBasemap: C,
|
|
1391
|
+
visibleStatusCount: ae,
|
|
1392
|
+
statusPercent: oe,
|
|
1393
|
+
formatCount: w,
|
|
1394
|
+
activeFilterChips: se,
|
|
1395
|
+
activeFilterCount: ce,
|
|
1396
|
+
dateRangeInvalid: T,
|
|
1397
|
+
filterValueText: D,
|
|
1398
|
+
cleanFilters: O,
|
|
1399
|
+
emptyDraft: k,
|
|
1400
|
+
toggleFilters: A,
|
|
1401
|
+
applyFilters: j,
|
|
1402
|
+
resetFilters: M,
|
|
1403
|
+
removeFilter: N,
|
|
1404
|
+
toggleApplications: P,
|
|
1405
|
+
toggleApplicationsMenu: F,
|
|
1406
|
+
overlayOpacity: ue,
|
|
1407
|
+
toggleOverlayMenu: I,
|
|
1408
|
+
toggleLegend: R,
|
|
1409
|
+
zoomToLayer: fe,
|
|
1410
|
+
updateMenuPosition: z,
|
|
1411
|
+
handleOutsidePointer: V,
|
|
1412
|
+
handleEscape: U,
|
|
1413
|
+
detachMenuListeners: W,
|
|
1414
|
+
handleFiltersEscape: pe,
|
|
1415
|
+
SurveyorTeleport: o,
|
|
1416
|
+
get Check() {
|
|
1417
|
+
return _e;
|
|
1418
|
+
},
|
|
1419
|
+
get ChevronDown() {
|
|
1420
|
+
return K;
|
|
1421
|
+
},
|
|
1422
|
+
get Layers2() {
|
|
1423
|
+
return J;
|
|
1424
|
+
},
|
|
1425
|
+
get MoreHorizontal() {
|
|
1426
|
+
return Q;
|
|
1427
|
+
},
|
|
1428
|
+
get RotateCcw() {
|
|
1429
|
+
return xe;
|
|
1430
|
+
},
|
|
1431
|
+
get Search() {
|
|
1432
|
+
return Se;
|
|
1433
|
+
},
|
|
1434
|
+
get SlidersHorizontal() {
|
|
1435
|
+
return Ce;
|
|
1436
|
+
},
|
|
1437
|
+
get X() {
|
|
1438
|
+
return we;
|
|
1439
|
+
},
|
|
1440
|
+
MapFilterSelect: gt,
|
|
1441
|
+
OverlayLayerRow: Rt,
|
|
1442
|
+
get WORK_TYPE_OPTIONS() {
|
|
1443
|
+
return Re;
|
|
1444
|
+
},
|
|
1445
|
+
get MAP_LEGEND() {
|
|
1446
|
+
return Vt;
|
|
1447
|
+
},
|
|
1448
|
+
get basemapPreview() {
|
|
1449
|
+
return u;
|
|
1450
|
+
}
|
|
1451
|
+
};
|
|
1452
|
+
return Object.defineProperty(me, "__isScriptSetup", {
|
|
1453
|
+
enumerable: !1,
|
|
1454
|
+
value: !0
|
|
1455
|
+
}), me;
|
|
1456
|
+
}
|
|
1457
|
+
}), qt = { class: "rounded-full bg-brand-50 px-1.5 py-0.5 text-[11px] text-brand-700" }, Jt = {
|
|
1458
|
+
key: 1,
|
|
1459
|
+
class: "absolute inset-x-3 bottom-3 z-30 flex max-h-[calc(100%-6rem)] flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_16px_50px_rgba(15,23,42,0.18)] xl:inset-x-auto xl:bottom-auto xl:left-4 xl:top-4 xl:max-h-[calc(100%-2rem)] xl:w-[400px]",
|
|
1460
|
+
"aria-label": "Панель шарів карти"
|
|
1461
|
+
}, Yt = { class: "border-b border-slate-100 p-3" }, Xt = { class: "flex items-center gap-2" }, Zt = { class: "relative block min-w-0 flex-1" }, Qt = {
|
|
1462
|
+
class: "pointer-events-none absolute inset-y-0 left-0 flex w-9 items-center justify-center text-slate-400",
|
|
1463
|
+
"aria-hidden": "true"
|
|
1464
|
+
}, $t = {
|
|
1465
|
+
key: 0,
|
|
1466
|
+
class: "mt-2 max-h-56 overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-sm",
|
|
1467
|
+
role: "listbox",
|
|
1468
|
+
"aria-label": "Результати пошуку"
|
|
1469
|
+
}, en = {
|
|
1470
|
+
key: 0,
|
|
1471
|
+
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1472
|
+
}, tn = {
|
|
1473
|
+
key: 1,
|
|
1474
|
+
class: "px-3 py-2.5 text-sm text-red-600"
|
|
1475
|
+
}, nn = {
|
|
1476
|
+
key: 2,
|
|
1477
|
+
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1478
|
+
}, rn = {
|
|
1479
|
+
key: 3,
|
|
1480
|
+
class: "divide-y divide-slate-100"
|
|
1481
|
+
}, an = ["onClick"], on = { class: "text-sm font-medium text-slate-800" }, sn = { class: "line-clamp-2 text-xs text-slate-500" }, cn = { class: "min-h-0 flex-1 overflow-y-auto px-3 pb-3" }, ln = { class: "flex items-center justify-between pb-2 pt-3" }, un = { class: "text-[11px] text-slate-400" }, dn = {
|
|
1482
|
+
key: 0,
|
|
1483
|
+
class: "space-y-2"
|
|
1484
|
+
}, fn = { class: "flex items-center gap-2.5 p-3" }, pn = ["aria-checked"], mn = ["title"], hn = { class: "block truncate text-sm font-semibold text-slate-800" }, gn = { class: "mt-1 flex flex-wrap items-center gap-1.5 text-xs text-slate-500" }, _n = { class: "font-medium tabular-nums text-slate-700" }, vn = {
|
|
1485
|
+
key: 0,
|
|
1486
|
+
class: "rounded-full bg-amber-100 px-1.5 py-0.5 font-medium text-amber-700"
|
|
1487
|
+
}, yn = {
|
|
1488
|
+
key: 1,
|
|
1489
|
+
class: "text-slate-400"
|
|
1490
|
+
}, bn = ["aria-expanded"], xn = { class: "mb-1 flex items-center justify-between" }, Sn = { class: "text-[11px] tabular-nums text-slate-400" }, Cn = { class: "space-y-0.5 py-0.5" }, wn = ["title", "onClick"], Tn = { class: "min-w-0 flex-1 whitespace-normal break-words text-xs font-medium leading-4 text-slate-700" }, En = { class: "w-10 shrink-0 pt-0.5 text-right text-xs tabular-nums text-slate-500" }, Dn = { class: "w-8 shrink-0 pt-0.5 text-right text-[11px] tabular-nums text-slate-400" }, On = {
|
|
1491
|
+
key: 0,
|
|
1492
|
+
class: "mt-2 rounded-lg border border-dashed border-slate-200 bg-white px-3 py-3 text-center text-xs text-slate-500"
|
|
1493
|
+
}, kn = ["aria-expanded"], An = {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
class: "rounded-full bg-brand-600 px-1.5 text-[10px] text-white"
|
|
1496
|
+
}, jn = {
|
|
1497
|
+
key: 1,
|
|
1498
|
+
class: "mt-2 flex flex-wrap gap-1.5"
|
|
1499
|
+
}, Mn = ["title", "onClick"], Nn = { class: "max-w-[150px] truncate" }, Pn = { class: "mb-3 flex items-start justify-between" }, Fn = { class: "grid grid-cols-2 gap-3" }, In = { class: "block" }, Ln = ["max"], Rn = { class: "block" }, zn = ["min"], Bn = {
|
|
1500
|
+
key: 0,
|
|
1501
|
+
class: "col-span-2 -mt-1 text-[11px] text-red-600"
|
|
1502
|
+
}, Vn = { class: "col-span-2 block" }, Hn = { class: "col-span-2 block" }, Un = { class: "col-span-2 block" }, Wn = { class: "col-span-2 block" }, Gn = { class: "mt-4 flex gap-2 border-t border-slate-100 pt-3" }, Kn = ["disabled"], qn = { class: "mt-4 flex items-center justify-between border-t border-slate-100 pb-2 pt-3" }, Jn = {
|
|
1503
|
+
key: 2,
|
|
1504
|
+
class: "grid grid-cols-2 gap-2"
|
|
1505
|
+
}, Yn = ["onClick"], Xn = ["src", "alt"], Zn = ["src", "alt"], Qn = { class: "min-w-0 flex-1" }, $n = { class: "block text-sm font-semibold text-slate-700" }, er = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, tr = { class: "tabular-nums text-slate-400" }, nr = ["value"];
|
|
1506
|
+
function rr(e, t, n, r, i, a) {
|
|
1507
|
+
return I(), k(T, null, [r.collapsed ? (I(), k("button", {
|
|
1508
|
+
key: 0,
|
|
1509
|
+
type: "button",
|
|
1510
|
+
class: "absolute bottom-4 left-4 z-30 inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-700 shadow-card-hover transition-all hover:border-brand-300 hover:text-brand-700 xl:bottom-auto xl:top-4",
|
|
1511
|
+
onClick: t[0] ||= (e) => r.collapsed = !1
|
|
1512
|
+
}, [
|
|
1513
|
+
M(r.Layers2, { class: "h-4 w-4 text-brand-600" }),
|
|
1514
|
+
t[21] ||= j(" Шари ", -1),
|
|
1515
|
+
A("span", qt, z(r.activeLayersCount), 1)
|
|
1516
|
+
])) : (I(), k("section", Jt, [A("div", Yt, [A("div", Xt, [A("label", Zt, [
|
|
1517
|
+
A("span", Qt, [M(r.Search, { class: "h-4 w-4" })]),
|
|
1518
|
+
W(A("input", {
|
|
1519
|
+
"onUpdate:modelValue": t[1] ||= (e) => r.searchModel = e,
|
|
1520
|
+
type: "text",
|
|
1521
|
+
autocomplete: "off",
|
|
1522
|
+
placeholder: "Пошук на карті…",
|
|
1523
|
+
class: "h-10 w-full rounded-lg border border-slate-200 bg-slate-50 pl-9 pr-9 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-2 focus:ring-brand-100"
|
|
1524
|
+
}, null, 512), [[V, r.searchModel]]),
|
|
1525
|
+
n.searchQuery ? (I(), k("button", {
|
|
1526
|
+
key: 0,
|
|
1527
|
+
type: "button",
|
|
1528
|
+
title: "Очистити пошук",
|
|
1529
|
+
"aria-label": "Очистити пошук",
|
|
1530
|
+
class: "absolute inset-y-0 right-0 flex w-9 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-200/60 hover:text-slate-700",
|
|
1531
|
+
onClick: t[2] ||= (e) => r.searchModel = ""
|
|
1532
|
+
}, [M(r.X, { class: "h-3.5 w-3.5" })])) : O("", !0)
|
|
1533
|
+
]), A("button", {
|
|
1534
|
+
type: "button",
|
|
1535
|
+
title: "Згорнути панель шарів",
|
|
1536
|
+
"aria-label": "Згорнути панель шарів",
|
|
1537
|
+
class: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-slate-200 text-slate-500 transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700",
|
|
1538
|
+
onClick: t[3] ||= (e) => r.collapsed = !0
|
|
1539
|
+
}, [M(r.X, { class: "h-4 w-4" })])]), r.searchDropdownOpen ? (I(), k("div", $t, [n.searchLoading ? (I(), k("p", en, "Пошук…")) : n.searchError ? (I(), k("p", tn, z(n.searchError), 1)) : n.searchEmpty ? (I(), k("p", nn, "Нічого не знайдено")) : (I(), k("ul", rn, [(I(!0), k(T, null, R(n.searchResults, (e) => (I(), k("li", { key: e.id }, [A("button", {
|
|
1540
|
+
type: "button",
|
|
1541
|
+
role: "option",
|
|
1542
|
+
class: "flex w-full flex-col gap-0.5 px-3 py-2.5 text-left transition-colors hover:bg-brand-50",
|
|
1543
|
+
onClick: (t) => r.emit("selectSearchResult", e)
|
|
1544
|
+
}, [A("span", on, z(e.number || "Без номера"), 1), A("span", sn, z(e.address), 1)], 8, an)]))), 128))]))])) : O("", !0)]), A("div", cn, [
|
|
1545
|
+
A("div", ln, [A("button", {
|
|
1546
|
+
type: "button",
|
|
1547
|
+
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
1548
|
+
onClick: t[4] ||= (e) => r.layersOpen = !r.layersOpen
|
|
1549
|
+
}, [M(r.ChevronDown, { class: P(["h-3.5 w-3.5 transition-transform", r.layersOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[22] ||= j(" Додаткові шари ", -1)]), A("span", un, z(r.activeLayersCount) + " активні", 1)]),
|
|
1550
|
+
r.layersOpen ? (I(), k("div", dn, [A("div", { class: P(["overflow-hidden rounded-xl border transition-colors", n.applicationsVisible ? "border-brand-300 bg-brand-50/40" : "border-slate-200 bg-white"]) }, [A("div", fn, [
|
|
1551
|
+
A("button", {
|
|
1552
|
+
type: "button",
|
|
1553
|
+
role: "switch",
|
|
1554
|
+
"aria-checked": n.applicationsVisible,
|
|
1555
|
+
"aria-label": "Показати звернення",
|
|
1556
|
+
class: P(["map-switch-track relative h-5 w-9 shrink-0 overflow-hidden rounded-full focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1", n.applicationsVisible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1557
|
+
onClick: r.toggleApplications
|
|
1558
|
+
}, [A("span", { class: P(["map-switch-knob pointer-events-none absolute top-0.5 h-4 w-4 rounded-full bg-white shadow-sm", n.applicationsVisible ? "left-[18px]" : "left-0.5"]) }, null, 2)], 10, pn),
|
|
1559
|
+
A("button", {
|
|
1560
|
+
type: "button",
|
|
1561
|
+
title: r.applicationsLayerName,
|
|
1562
|
+
class: "min-w-0 flex-1 text-left focus:outline-none",
|
|
1563
|
+
onClick: t[5] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1564
|
+
}, [A("span", hn, z(r.applicationsLayerName), 1), A("span", gn, [
|
|
1565
|
+
A("span", _n, z(r.formatCount(r.visibleStatusCount)), 1),
|
|
1566
|
+
t[23] ||= j(" об'єктів ", -1),
|
|
1567
|
+
r.activeFilterCount > 0 ? (I(), k("span", vn, " фільтри: " + z(r.activeFilterCount), 1)) : O("", !0),
|
|
1568
|
+
n.applicationsOpacity < 100 ? (I(), k("span", yn, "· " + z(n.applicationsOpacity) + "% непрозорості", 1)) : O("", !0)
|
|
1569
|
+
])], 8, mn),
|
|
1570
|
+
A("button", {
|
|
1571
|
+
ref: "menuButtonRef",
|
|
1572
|
+
type: "button",
|
|
1573
|
+
"aria-expanded": r.menuOpen,
|
|
1574
|
+
"aria-label": "Меню шару звернень",
|
|
1575
|
+
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1576
|
+
onClick: r.toggleApplicationsMenu
|
|
1577
|
+
}, [M(r.MoreHorizontal, { class: "h-4 w-4" })], 8, bn),
|
|
1578
|
+
A("button", {
|
|
1579
|
+
type: "button",
|
|
1580
|
+
"aria-label": "Розгорнути фільтри звернень",
|
|
1581
|
+
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-brand-600",
|
|
1582
|
+
onClick: t[6] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1583
|
+
}, [M(r.ChevronDown, { class: P(["h-4 w-4 transition-transform", r.applicationsOpen ? "" : "-rotate-90"]) }, null, 8, ["class"])])
|
|
1584
|
+
]), r.applicationsOpen ? (I(), k("div", {
|
|
1585
|
+
key: 0,
|
|
1586
|
+
class: P(["border-t border-brand-100 px-3 pt-2", r.filtersOpen ? "pb-0" : "pb-3"])
|
|
1587
|
+
}, [
|
|
1588
|
+
A("div", xn, [t[24] ||= A("span", { class: "text-[11px] font-semibold text-slate-400" }, "Швидкі фільтри за статусом", -1), A("span", Sn, z(r.formatCount(r.visibleStatusCount)) + " з " + z(r.formatCount(n.totalCount)), 1)]),
|
|
1589
|
+
A("div", Cn, [(I(!0), k(T, null, R(r.MAP_LEGEND, (e) => (I(), k("button", {
|
|
1590
|
+
key: e.key,
|
|
1591
|
+
type: "button",
|
|
1592
|
+
title: e.label,
|
|
1593
|
+
class: P(["flex w-full items-start gap-2 rounded-lg px-2 py-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand-200", n.visibleStatuses.has(e.key) ? "hover:bg-white" : "opacity-45 hover:bg-white/70"]),
|
|
1594
|
+
onClick: (t) => r.emit("toggleStatus", e.key)
|
|
1595
|
+
}, [
|
|
1596
|
+
A("span", {
|
|
1597
|
+
class: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
|
|
1598
|
+
style: F({ backgroundColor: e.color })
|
|
1599
|
+
}, null, 4),
|
|
1600
|
+
A("span", Tn, z(e.label), 1),
|
|
1601
|
+
A("span", En, z(r.formatCount(n.statusCounts[e.key] ?? 0)), 1),
|
|
1602
|
+
A("span", Dn, z(r.statusPercent(e.key)) + "% ", 1)
|
|
1603
|
+
], 10, wn))), 128))]),
|
|
1604
|
+
n.visibleStatuses.size === 0 ? (I(), k("div", On, " За вибраними статусами об'єктів не знайдено. ")) : O("", !0),
|
|
1605
|
+
A("div", { class: P(["mt-2 flex items-center gap-2 border-t border-brand-100 pt-2", r.filtersOpen ? "pb-2" : "pb-0"]) }, [
|
|
1606
|
+
A("button", {
|
|
1607
|
+
type: "button",
|
|
1608
|
+
class: "text-xs font-semibold text-brand-700 hover:text-brand-900",
|
|
1609
|
+
onClick: t[7] ||= (e) => r.emit("selectAllStatuses")
|
|
1610
|
+
}, " Усі "),
|
|
1611
|
+
t[26] ||= A("span", { class: "text-slate-300" }, "·", -1),
|
|
1612
|
+
A("button", {
|
|
1613
|
+
type: "button",
|
|
1614
|
+
class: "text-xs font-medium text-slate-500 hover:text-slate-700",
|
|
1615
|
+
onClick: t[8] ||= (e) => r.emit("clearStatuses")
|
|
1616
|
+
}, " Скинути "),
|
|
1617
|
+
A("button", {
|
|
1618
|
+
type: "button",
|
|
1619
|
+
"aria-expanded": r.filtersOpen,
|
|
1620
|
+
class: P(["ml-auto inline-flex items-center gap-1.5 rounded-md border bg-white px-2 py-1.5 text-xs font-semibold transition-colors", r.filtersOpen || r.activeFilterCount ? "border-brand-200 text-brand-700" : "border-slate-200 text-slate-600 hover:border-brand-300 hover:text-brand-700"]),
|
|
1621
|
+
onClick: r.toggleFilters
|
|
1622
|
+
}, [
|
|
1623
|
+
M(r.SlidersHorizontal, { class: "h-3.5 w-3.5" }),
|
|
1624
|
+
t[25] ||= j(" Фільтри ", -1),
|
|
1625
|
+
r.activeFilterCount > 0 ? (I(), k("span", An, z(r.activeFilterCount), 1)) : O("", !0)
|
|
1626
|
+
], 10, kn)
|
|
1627
|
+
], 2),
|
|
1628
|
+
r.activeFilterChips.length ? (I(), k("div", jn, [(I(!0), k(T, null, R(r.activeFilterChips, (e) => (I(), k("button", {
|
|
1629
|
+
key: e.key,
|
|
1630
|
+
type: "button",
|
|
1631
|
+
title: `Прибрати фільтр «${e.label}»`,
|
|
1632
|
+
class: "inline-flex max-w-full items-center gap-1 rounded-full border border-brand-100 bg-white px-2 py-1 text-[11px] text-brand-700 hover:border-brand-300",
|
|
1633
|
+
onClick: (t) => r.removeFilter(e.key)
|
|
1634
|
+
}, [A("span", Nn, z(e.label), 1), M(r.X, { class: "h-3 w-3 shrink-0" })], 8, Mn))), 128))])) : O("", !0),
|
|
1635
|
+
r.filtersOpen ? (I(), k("form", {
|
|
1636
|
+
key: 2,
|
|
1637
|
+
ref: "filtersFormRef",
|
|
1638
|
+
class: "-mx-3 border-t border-slate-100 bg-white px-3 py-3",
|
|
1639
|
+
onSubmit: pe(r.applyFilters, ["prevent"])
|
|
1640
|
+
}, [
|
|
1641
|
+
A("div", Pn, [t[27] ||= A("div", null, [A("h3", { class: "text-sm font-bold text-slate-800" }, "Розширені фільтри"), A("p", { class: "mt-0.5 text-xs text-slate-400" }, "Звужуйте вибір об'єктів звернень")], -1), A("button", {
|
|
1642
|
+
type: "button",
|
|
1643
|
+
"aria-label": "Закрити фільтри",
|
|
1644
|
+
class: "rounded-md p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700",
|
|
1645
|
+
onClick: t[9] ||= (e) => r.filtersOpen = !1
|
|
1646
|
+
}, [M(r.X, { class: "h-4 w-4" })])]),
|
|
1647
|
+
A("div", Fn, [
|
|
1648
|
+
A("label", In, [t[28] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата від", -1), W(A("input", {
|
|
1649
|
+
"onUpdate:modelValue": t[10] ||= (e) => r.draftFilters.dateFrom = e,
|
|
1650
|
+
type: "date",
|
|
1651
|
+
max: r.draftFilters.dateTo || void 0,
|
|
1652
|
+
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1653
|
+
}, null, 8, Ln), [[V, r.draftFilters.dateFrom]])]),
|
|
1654
|
+
A("label", Rn, [t[29] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата до", -1), W(A("input", {
|
|
1655
|
+
"onUpdate:modelValue": t[11] ||= (e) => r.draftFilters.dateTo = e,
|
|
1656
|
+
type: "date",
|
|
1657
|
+
min: r.draftFilters.dateFrom || void 0,
|
|
1658
|
+
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1659
|
+
}, null, 8, zn), [[V, r.draftFilters.dateTo]])]),
|
|
1660
|
+
r.dateRangeInvalid ? (I(), k("p", Bn, " Дата «від» не може бути пізнішою за дату «до». ")) : O("", !0),
|
|
1661
|
+
A("label", Vn, [t[30] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Вид робіт", -1), M(r.MapFilterSelect, {
|
|
1662
|
+
"model-value": r.draftFilters.workType ?? [],
|
|
1663
|
+
label: "Вид робіт",
|
|
1664
|
+
options: r.WORK_TYPE_OPTIONS.map((e) => ({
|
|
1665
|
+
value: e.code,
|
|
1666
|
+
label: e.label
|
|
1667
|
+
})),
|
|
1668
|
+
"onUpdate:modelValue": t[12] ||= (e) => r.draftFilters.workType = e
|
|
1669
|
+
}, null, 8, ["model-value", "options"])]),
|
|
1670
|
+
A("label", Hn, [t[31] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Перевірив", -1), W(A("input", {
|
|
1671
|
+
"onUpdate:modelValue": t[13] ||= (e) => r.draftFilters.verifiedBy = e,
|
|
1672
|
+
type: "text",
|
|
1673
|
+
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1674
|
+
}, null, 512), [[V, r.draftFilters.verifiedBy]])]),
|
|
1675
|
+
A("label", Un, [t[32] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Організація", -1), W(A("input", {
|
|
1676
|
+
"onUpdate:modelValue": t[14] ||= (e) => r.draftFilters.organization = e,
|
|
1677
|
+
type: "text",
|
|
1678
|
+
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1679
|
+
}, null, 512), [[V, r.draftFilters.organization]])]),
|
|
1680
|
+
A("label", Wn, [t[33] ||= A("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Адреса", -1), W(A("input", {
|
|
1681
|
+
"onUpdate:modelValue": t[15] ||= (e) => r.draftFilters.address = e,
|
|
1682
|
+
type: "text",
|
|
1683
|
+
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1684
|
+
}, null, 512), [[V, r.draftFilters.address]])])
|
|
1685
|
+
]),
|
|
1686
|
+
A("div", Gn, [A("button", {
|
|
1687
|
+
type: "button",
|
|
1688
|
+
class: "inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50",
|
|
1689
|
+
onClick: r.resetFilters
|
|
1690
|
+
}, [M(r.RotateCcw, { class: "h-3.5 w-3.5" }), t[34] ||= j(" Скинути ", -1)]), A("button", {
|
|
1691
|
+
type: "submit",
|
|
1692
|
+
disabled: r.dateRangeInvalid,
|
|
1693
|
+
class: "flex-1 rounded-lg bg-brand-600 px-3 py-2 text-xs font-semibold text-white hover:bg-brand-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
1694
|
+
}, " Застосувати ", 8, Kn)])
|
|
1695
|
+
], 544)) : O("", !0)
|
|
1696
|
+
], 2)) : O("", !0)], 2), (I(!0), k(T, null, R(n.overlays, (e) => (I(), D(r.OverlayLayerRow, {
|
|
1697
|
+
key: e.id,
|
|
1698
|
+
layer: e,
|
|
1699
|
+
visible: n.activeOverlayIds.includes(e.id),
|
|
1700
|
+
opacity: r.overlayOpacity(e),
|
|
1701
|
+
"map-zoom": n.mapZoom,
|
|
1702
|
+
"load-state": n.overlayLoad[e.id],
|
|
1703
|
+
"menu-open": r.overlayMenuId === e.id,
|
|
1704
|
+
"legend-open": r.legendLayerId === e.id,
|
|
1705
|
+
onToggle: (t) => r.emit("toggleOverlay", e.id),
|
|
1706
|
+
"onUpdate:opacity": (t) => r.emit("overlayOpacity", e.id, t),
|
|
1707
|
+
onZoom: (t) => r.zoomToLayer(e),
|
|
1708
|
+
onToggleMenu: (t) => r.toggleOverlayMenu(e.id),
|
|
1709
|
+
onCloseMenu: t[16] ||= (e) => r.overlayMenuId = null,
|
|
1710
|
+
onToggleLegend: (t) => r.toggleLegend(e.id),
|
|
1711
|
+
onRetry: (t) => r.emit("retryOverlay", e.id)
|
|
1712
|
+
}, null, 8, [
|
|
1713
|
+
"layer",
|
|
1714
|
+
"visible",
|
|
1715
|
+
"opacity",
|
|
1716
|
+
"map-zoom",
|
|
1717
|
+
"load-state",
|
|
1718
|
+
"menu-open",
|
|
1719
|
+
"legend-open",
|
|
1720
|
+
"onToggle",
|
|
1721
|
+
"onUpdate:opacity",
|
|
1722
|
+
"onZoom",
|
|
1723
|
+
"onToggleMenu",
|
|
1724
|
+
"onToggleLegend",
|
|
1725
|
+
"onRetry"
|
|
1726
|
+
]))), 128))])) : O("", !0),
|
|
1727
|
+
r.layerNotice ? (I(), k("button", {
|
|
1728
|
+
key: 1,
|
|
1729
|
+
type: "button",
|
|
1730
|
+
class: "mt-2 flex w-full items-center justify-between rounded-lg border border-brand-100 bg-brand-50 px-3 py-2 text-left text-xs text-brand-800",
|
|
1731
|
+
role: "status",
|
|
1732
|
+
onClick: t[17] ||= (e) => r.layerNotice = null
|
|
1733
|
+
}, [A("span", null, z(r.layerNotice), 1), M(r.X, { class: "h-3.5 w-3.5 shrink-0" })])) : O("", !0),
|
|
1734
|
+
A("div", qn, [A("button", {
|
|
1735
|
+
type: "button",
|
|
1736
|
+
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
1737
|
+
onClick: t[18] ||= (e) => r.baseOpen = !r.baseOpen
|
|
1738
|
+
}, [M(r.ChevronDown, { class: P(["h-3.5 w-3.5 transition-transform", r.baseOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[35] ||= j(" Базові шари ", -1)]), t[36] ||= A("span", { class: "text-[11px] text-slate-400" }, "1 активний", -1)]),
|
|
1739
|
+
r.baseOpen ? (I(), k("div", Jn, [(I(!0), k(T, null, R(n.baseLayers, (e) => (I(), k("button", {
|
|
1740
|
+
key: e.id,
|
|
1741
|
+
type: "button",
|
|
1742
|
+
class: P(["group rounded-xl border p-1.5 text-left transition-all focus:outline-none focus:ring-2 focus:ring-brand-200", n.basemapId === e.id ? "border-brand-500 bg-brand-50 shadow-sm" : "border-slate-200 bg-white hover:border-brand-300"]),
|
|
1743
|
+
onClick: (t) => r.emit("basemapChange", e.id)
|
|
1744
|
+
}, [A("img", {
|
|
1745
|
+
src: r.basemapPreview(e),
|
|
1746
|
+
alt: e.label,
|
|
1747
|
+
class: "block h-12 w-full rounded-md object-cover"
|
|
1748
|
+
}, null, 8, Xn), A("span", { class: P(["mt-1.5 flex items-center gap-1 px-0.5 text-xs font-semibold", n.basemapId === e.id ? "text-brand-700" : "text-slate-600"]) }, [n.basemapId === e.id ? (I(), D(r.Check, {
|
|
1749
|
+
key: 0,
|
|
1750
|
+
class: "h-3 w-3"
|
|
1751
|
+
})) : O("", !0), j(" " + z(e.label), 1)], 2)], 10, Yn))), 128))])) : r.activeBasemap ? (I(), k("button", {
|
|
1752
|
+
key: 3,
|
|
1753
|
+
type: "button",
|
|
1754
|
+
class: "flex w-full items-center gap-3 rounded-xl border border-slate-200 bg-slate-50 p-2 text-left transition-colors hover:border-brand-300 hover:bg-brand-50/40",
|
|
1755
|
+
onClick: t[19] ||= (e) => r.baseOpen = !0
|
|
1756
|
+
}, [
|
|
1757
|
+
A("img", {
|
|
1758
|
+
src: r.basemapPreview(r.activeBasemap),
|
|
1759
|
+
alt: r.activeBasemap.label,
|
|
1760
|
+
class: "block h-12 w-16 shrink-0 rounded-md object-cover"
|
|
1761
|
+
}, null, 8, Zn),
|
|
1762
|
+
A("span", Qn, [A("span", $n, z(r.activeBasemap.label), 1), t[37] ||= A("span", { class: "block text-[11px] text-slate-400" }, "Підложка карти", -1)]),
|
|
1763
|
+
M(r.ChevronDown, { class: "h-4 w-4 text-slate-400" })
|
|
1764
|
+
])) : O("", !0)
|
|
1765
|
+
])])), M(r.SurveyorTeleport, null, {
|
|
1766
|
+
default: U(() => [r.menuOpen && r.menuPosition ? (I(), k("div", {
|
|
1767
|
+
key: 0,
|
|
1768
|
+
ref: "menuRef",
|
|
1769
|
+
role: "menu",
|
|
1770
|
+
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
1771
|
+
style: F({
|
|
1772
|
+
top: `${r.menuPosition.top}px`,
|
|
1773
|
+
left: `${r.menuPosition.left}px`
|
|
1774
|
+
})
|
|
1775
|
+
}, [A("div", er, [t[38] ||= A("span", null, "Непрозорість", -1), A("span", tr, z(n.applicationsOpacity) + "%", 1)]), A("input", {
|
|
1776
|
+
type: "range",
|
|
1777
|
+
min: "0",
|
|
1778
|
+
max: "100",
|
|
1779
|
+
value: n.applicationsOpacity,
|
|
1780
|
+
"aria-label": "Непрозорість шару звернень",
|
|
1781
|
+
class: "w-full accent-brand-600",
|
|
1782
|
+
onInput: t[20] ||= (e) => r.emit("update:applicationsOpacity", Number(e.target.value))
|
|
1783
|
+
}, null, 40, nr)], 4)) : O("", !0)]),
|
|
1784
|
+
_: 1
|
|
1785
|
+
})], 64);
|
|
1786
|
+
}
|
|
1787
|
+
var ir = /*#__PURE__*/ e(Kt, [["render", rr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapLayersPanel.vue"]]), ar = "flex h-9 w-9 items-center justify-center text-slate-600 transition-colors hover:bg-brand-50 hover:text-brand-600", or = /*@__PURE__*/ N({
|
|
1788
|
+
__name: "MapControls",
|
|
1789
|
+
props: { visibleCount: {
|
|
1790
|
+
type: Number,
|
|
1791
|
+
required: !0
|
|
1792
|
+
} },
|
|
1793
|
+
emits: [
|
|
1794
|
+
"zoomIn",
|
|
1795
|
+
"zoomOut",
|
|
1796
|
+
"resetView"
|
|
1797
|
+
],
|
|
1798
|
+
setup(e, { expose: t, emit: n }) {
|
|
1799
|
+
t();
|
|
1800
|
+
let r = {
|
|
1801
|
+
emit: n,
|
|
1802
|
+
groupedButtonClass: ar,
|
|
1803
|
+
get Compass() {
|
|
1804
|
+
return q;
|
|
1805
|
+
},
|
|
1806
|
+
get Minus() {
|
|
1807
|
+
return Z;
|
|
1808
|
+
},
|
|
1809
|
+
get Plus() {
|
|
1810
|
+
return be;
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
return Object.defineProperty(r, "__isScriptSetup", {
|
|
1814
|
+
enumerable: !1,
|
|
1815
|
+
value: !0
|
|
1816
|
+
}), r;
|
|
1817
|
+
}
|
|
1818
|
+
}), sr = { class: "absolute right-3 top-3 z-20 flex flex-col gap-1.5" }, cr = { class: "flex flex-col overflow-hidden rounded-lg border border-slate-200 bg-white shadow-card" }, lr = { class: "absolute bottom-3 right-3 z-10 flex items-center gap-2 rounded-md bg-white/80 px-2.5 py-1 text-[11px] text-slate-400 backdrop-blur-sm" };
|
|
1819
|
+
function ur(e, t, n, r, i, a) {
|
|
1820
|
+
return I(), k(T, null, [A("div", sr, [A("div", cr, [
|
|
1821
|
+
A("button", {
|
|
1822
|
+
type: "button",
|
|
1823
|
+
title: "Збільшити",
|
|
1824
|
+
"aria-label": "Збільшити",
|
|
1825
|
+
class: P(r.groupedButtonClass),
|
|
1826
|
+
onClick: t[0] ||= (e) => r.emit("zoomIn")
|
|
1827
|
+
}, [M(r.Plus, { class: "h-4 w-4" })]),
|
|
1828
|
+
t[3] ||= A("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
1829
|
+
A("button", {
|
|
1830
|
+
type: "button",
|
|
1831
|
+
title: "Зменшити",
|
|
1832
|
+
"aria-label": "Зменшити",
|
|
1833
|
+
class: P(r.groupedButtonClass),
|
|
1834
|
+
onClick: t[1] ||= (e) => r.emit("zoomOut")
|
|
1835
|
+
}, [M(r.Minus, { class: "h-4 w-4" })]),
|
|
1836
|
+
t[4] ||= A("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
1837
|
+
A("button", {
|
|
1838
|
+
type: "button",
|
|
1839
|
+
title: "Північ/Південь/Захід/Схід",
|
|
1840
|
+
"aria-label": "Північ/Південь/Захід/Схід",
|
|
1841
|
+
class: P(r.groupedButtonClass),
|
|
1842
|
+
onClick: t[2] ||= (e) => r.emit("resetView")
|
|
1843
|
+
}, [M(r.Compass, { class: "h-4 w-4" })])
|
|
1844
|
+
])]), A("div", lr, [
|
|
1845
|
+
t[5] ||= A("span", null, "MapLibre", -1),
|
|
1846
|
+
t[6] ||= A("span", { class: "text-slate-300" }, "·", -1),
|
|
1847
|
+
A("span", null, "Точок: " + z(n.visibleCount), 1)
|
|
1848
|
+
])], 64);
|
|
1849
|
+
}
|
|
1850
|
+
var dr = /*#__PURE__*/ e(or, [["render", ur], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapControls.vue"]]), fr = /*@__PURE__*/ N({
|
|
1851
|
+
__name: "MapPointTooltip",
|
|
1852
|
+
props: {
|
|
1853
|
+
points: {
|
|
1854
|
+
type: Array,
|
|
1855
|
+
required: !0
|
|
1856
|
+
},
|
|
1857
|
+
total: {
|
|
1858
|
+
type: Number,
|
|
1859
|
+
required: !0
|
|
1860
|
+
},
|
|
1861
|
+
position: {
|
|
1862
|
+
type: Object,
|
|
1863
|
+
required: !0
|
|
1864
|
+
},
|
|
1865
|
+
containerWidth: {
|
|
1866
|
+
type: Number,
|
|
1867
|
+
required: !0
|
|
1868
|
+
},
|
|
1869
|
+
containerHeight: {
|
|
1870
|
+
type: Number,
|
|
1871
|
+
required: !0
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
setup(e, { expose: t }) {
|
|
1875
|
+
t();
|
|
1876
|
+
let n = e, r = E(() => n.points.slice(0, 6)), i = E(() => n.points.length === 1 && n.total <= 1), a = E(() => Math.max(n.total - r.value.length, 0)), o = E(() => i.value ? 156 : 40 + r.value.length * 52 + (a.value ? 28 : 8)), s = E(() => {
|
|
1877
|
+
let e = n.position.x + 15;
|
|
1878
|
+
return e + 256 > n.containerWidth - 8 && (e = n.position.x - 256 - 15), e = Math.min(Math.max(e, 8), Math.max(n.containerWidth - 256 - 8, 8)), n.position.y + 15 + o.value > n.containerHeight - 8 ? {
|
|
1879
|
+
left: `${e}px`,
|
|
1880
|
+
top: `${n.position.y - 15}px`,
|
|
1881
|
+
transform: "translateY(-100%)"
|
|
1882
|
+
} : {
|
|
1883
|
+
left: `${e}px`,
|
|
1884
|
+
top: `${n.position.y + 15}px`
|
|
1885
|
+
};
|
|
1886
|
+
});
|
|
1887
|
+
function c(e) {
|
|
1888
|
+
return h[e] ?? "#64748b";
|
|
1889
|
+
}
|
|
1890
|
+
function l(e) {
|
|
1891
|
+
return _[e] ?? e;
|
|
1892
|
+
}
|
|
1893
|
+
let u = {
|
|
1894
|
+
props: n,
|
|
1895
|
+
visiblePoints: r,
|
|
1896
|
+
single: i,
|
|
1897
|
+
hiddenCount: a,
|
|
1898
|
+
cardHeight: o,
|
|
1899
|
+
style: s,
|
|
1900
|
+
color: c,
|
|
1901
|
+
statusLabel: l,
|
|
1902
|
+
point: E(() => n.points[0])
|
|
1903
|
+
};
|
|
1904
|
+
return Object.defineProperty(u, "__isScriptSetup", {
|
|
1905
|
+
enumerable: !1,
|
|
1906
|
+
value: !0
|
|
1907
|
+
}), u;
|
|
1908
|
+
}
|
|
1909
|
+
}), pr = { class: "mb-2 flex items-center gap-2" }, mr = { class: "text-sm font-semibold text-slate-800" }, hr = { class: "space-y-1.5 text-xs" }, gr = { class: "flex justify-between gap-2" }, _r = { class: "font-medium text-slate-700" }, vr = { class: "flex justify-between gap-2" }, yr = { class: "font-medium text-slate-700" }, br = { class: "flex justify-between gap-2" }, xr = { class: "text-right font-medium text-slate-700" }, Sr = { class: "flex justify-between gap-2" }, Cr = { class: "text-right font-medium text-slate-700" }, wr = { class: "mb-2 text-xs font-semibold text-slate-500" }, Tr = { class: "space-y-2" }, Er = { class: "flex items-center gap-2" }, Dr = { class: "truncate text-sm font-semibold text-slate-800" }, Or = { class: "truncate pl-4 text-[11px] text-slate-500" }, kr = {
|
|
1910
|
+
key: 0,
|
|
1911
|
+
class: "mt-2 text-[11px] font-medium text-slate-400"
|
|
1912
|
+
};
|
|
1913
|
+
function Ar(e, t, n, r, i, a) {
|
|
1914
|
+
return I(), k("div", {
|
|
1915
|
+
class: "pointer-events-none absolute z-30 w-64 rounded-lg border border-slate-200 bg-white p-3 shadow-card-hover",
|
|
1916
|
+
style: F(r.style)
|
|
1917
|
+
}, [r.single && r.point ? (I(), k(T, { key: 0 }, [A("div", pr, [A("span", {
|
|
1918
|
+
class: "h-2.5 w-2.5 shrink-0 rounded-full",
|
|
1919
|
+
style: F({ backgroundColor: r.color(r.point.status) })
|
|
1920
|
+
}, null, 4), A("span", mr, z(r.point.number), 1)]), A("dl", hr, [
|
|
1921
|
+
A("div", gr, [t[0] ||= A("dt", { class: "text-slate-400" }, "Ідентифікатор", -1), A("dd", _r, z(r.point.id), 1)]),
|
|
1922
|
+
A("div", vr, [t[1] ||= A("dt", { class: "text-slate-400" }, "Статус", -1), A("dd", yr, z(r.statusLabel(r.point.status)), 1)]),
|
|
1923
|
+
A("div", br, [t[2] ||= A("dt", { class: "text-slate-400" }, "Вид робіт", -1), A("dd", xr, z(r.point.workType), 1)]),
|
|
1924
|
+
A("div", Sr, [t[3] ||= A("dt", { class: "text-slate-400" }, "Організація", -1), A("dd", Cr, z(r.point.organization), 1)])
|
|
1925
|
+
])], 64)) : (I(), k(T, { key: 1 }, [
|
|
1926
|
+
A("p", wr, " Звернення в точці · " + z(n.total), 1),
|
|
1927
|
+
A("ul", Tr, [(I(!0), k(T, null, R(r.visiblePoints, (e) => (I(), k("li", {
|
|
1928
|
+
key: e.id,
|
|
1929
|
+
class: "min-w-0"
|
|
1930
|
+
}, [A("div", Er, [A("span", {
|
|
1931
|
+
class: "h-2 w-2 shrink-0 rounded-full",
|
|
1932
|
+
style: F({ backgroundColor: r.color(e.status) })
|
|
1933
|
+
}, null, 4), A("span", Dr, z(e.number), 1)]), A("p", Or, z(r.statusLabel(e.status)) + " · " + z(e.organization), 1)]))), 128))]),
|
|
1934
|
+
r.hiddenCount ? (I(), k("p", kr, " Ще " + z(r.hiddenCount), 1)) : O("", !0)
|
|
1935
|
+
], 64))], 4);
|
|
1936
|
+
}
|
|
1937
|
+
var jr = /*#__PURE__*/ e(fr, [["render", Ar], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapPointTooltip.vue"]]), Mr = /*@__PURE__*/ N({
|
|
1938
|
+
__name: "MapApplicationPanel",
|
|
1939
|
+
props: {
|
|
1940
|
+
rows: {
|
|
1941
|
+
type: Array,
|
|
1942
|
+
required: !0
|
|
1943
|
+
},
|
|
1944
|
+
total: {
|
|
1945
|
+
type: Number,
|
|
1946
|
+
required: !0
|
|
1947
|
+
},
|
|
1948
|
+
page: {
|
|
1949
|
+
type: Number,
|
|
1950
|
+
required: !0
|
|
1951
|
+
},
|
|
1952
|
+
pageCount: {
|
|
1953
|
+
type: Number,
|
|
1954
|
+
required: !0
|
|
1955
|
+
},
|
|
1956
|
+
application: {
|
|
1957
|
+
type: [Object, null],
|
|
1958
|
+
required: !0
|
|
1959
|
+
},
|
|
1960
|
+
loading: {
|
|
1961
|
+
type: Boolean,
|
|
1962
|
+
required: !0
|
|
1963
|
+
},
|
|
1964
|
+
error: {
|
|
1965
|
+
type: String,
|
|
1966
|
+
required: !0
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
emits: [
|
|
1970
|
+
"close",
|
|
1971
|
+
"back",
|
|
1972
|
+
"select",
|
|
1973
|
+
"page"
|
|
1974
|
+
],
|
|
1975
|
+
setup(e, { expose: t, emit: n }) {
|
|
1976
|
+
t();
|
|
1977
|
+
let r = e, i = n;
|
|
1978
|
+
function a(e) {
|
|
1979
|
+
return Array.isArray(e) ? e[0] ?? null : e ?? null;
|
|
1980
|
+
}
|
|
1981
|
+
function o(e) {
|
|
1982
|
+
if (!e) return "—";
|
|
1983
|
+
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
1984
|
+
return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
|
|
1985
|
+
}
|
|
1986
|
+
function s(e) {
|
|
1987
|
+
return e ? [
|
|
1988
|
+
e.last_name,
|
|
1989
|
+
e.first_name,
|
|
1990
|
+
e.middle_name
|
|
1991
|
+
].filter(Boolean).join(" ") : "";
|
|
1992
|
+
}
|
|
1993
|
+
let c = E(() => a(r.application?.organization)), l = E(() => a(r.application?.surveyor)), u = {
|
|
1994
|
+
props: r,
|
|
1995
|
+
emit: i,
|
|
1996
|
+
firstRelation: a,
|
|
1997
|
+
formatDate: o,
|
|
1998
|
+
personName: s,
|
|
1999
|
+
organization: c,
|
|
2000
|
+
surveyor: l,
|
|
2001
|
+
showList: E(() => !r.application),
|
|
2002
|
+
fields: E(() => {
|
|
2003
|
+
let e = r.application;
|
|
2004
|
+
if (!e) return [];
|
|
2005
|
+
let t = s(l.value) || e.surveyor_id_data?.text || "—", n = l.value?.phone || c.value?.phone || "—";
|
|
2006
|
+
return [
|
|
2007
|
+
{
|
|
2008
|
+
label: "Вид робіт",
|
|
2009
|
+
value: e.work_type_data?.text || "—"
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
label: "Організація",
|
|
2013
|
+
value: c.value?.name || e.org_id_data?.text || "—"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
label: "Заявник",
|
|
2017
|
+
value: t
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
label: "Телефон",
|
|
2021
|
+
value: n
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
label: "Площа, га",
|
|
2025
|
+
value: e.area == null || e.area === "" ? "—" : String(e.area)
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
label: "Адреса",
|
|
2029
|
+
value: e.address_id_data?.text || "—"
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
label: "Місцезнаходження",
|
|
2033
|
+
value: e.location || "—"
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
label: "Опис запиту",
|
|
2037
|
+
value: e.description || "—"
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
label: "Підстава виконання",
|
|
2041
|
+
value: e.execution_basis || "—"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
label: "Дата прийому",
|
|
2045
|
+
value: o(e.created_at)
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
label: "Дата видачі даних",
|
|
2049
|
+
value: o(e.source_data_issued_at)
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
label: "Дата прийому даних",
|
|
2053
|
+
value: o(e.survey_uploaded_at)
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
label: "Дата перевірки",
|
|
2057
|
+
value: o(e.verified_at)
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
label: "Перевірив",
|
|
2061
|
+
value: e.verified_by_data?.text || "—"
|
|
2062
|
+
}
|
|
2063
|
+
];
|
|
2064
|
+
}),
|
|
2065
|
+
get RouterLink() {
|
|
2066
|
+
return me;
|
|
2067
|
+
},
|
|
2068
|
+
get ChevronLeft() {
|
|
2069
|
+
return ve;
|
|
2070
|
+
},
|
|
2071
|
+
get X() {
|
|
2072
|
+
return we;
|
|
2073
|
+
},
|
|
2074
|
+
AppealStatusBadge: y
|
|
2075
|
+
};
|
|
2076
|
+
return Object.defineProperty(u, "__isScriptSetup", {
|
|
2077
|
+
enumerable: !1,
|
|
2078
|
+
value: !0
|
|
2079
|
+
}), u;
|
|
2080
|
+
}
|
|
2081
|
+
}), Nr = { class: "absolute right-16 top-3 z-20 flex max-h-[calc(100%-3.75rem)] w-[min(360px,calc(100vw-6rem))] flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-card-hover" }, Pr = { class: "flex items-start justify-between gap-3 border-b border-slate-100 px-4 py-3" }, Fr = { class: "flex min-w-0 items-start gap-1" }, Ir = { class: "min-w-0" }, Lr = { class: "text-[11px] font-semibold uppercase tracking-wide text-slate-400" }, Rr = { class: "truncate text-base font-semibold text-slate-900" }, zr = { class: "min-h-0 flex-auto overflow-y-auto px-4 py-3" }, Br = {
|
|
2082
|
+
key: 0,
|
|
2083
|
+
class: "py-8 text-center text-sm text-slate-400"
|
|
2084
|
+
}, Vr = {
|
|
2085
|
+
key: 1,
|
|
2086
|
+
class: "py-8 text-center text-sm text-red-600"
|
|
2087
|
+
}, Hr = {
|
|
2088
|
+
key: 2,
|
|
2089
|
+
class: "py-8 text-center text-sm text-slate-400"
|
|
2090
|
+
}, Ur = {
|
|
2091
|
+
key: 3,
|
|
2092
|
+
class: "space-y-2"
|
|
2093
|
+
}, Wr = ["onClick"], Gr = { class: "flex items-center justify-between gap-2" }, Kr = { class: "truncate text-sm font-semibold text-slate-800" }, qr = { class: "truncate text-xs text-slate-500" }, Jr = { class: "truncate text-xs text-slate-400" }, Yr = {
|
|
2094
|
+
key: 4,
|
|
2095
|
+
class: "py-8 text-center text-sm text-slate-400"
|
|
2096
|
+
}, Xr = { class: "space-y-2.5" }, Zr = { class: "text-[11px] font-medium text-slate-400" }, Qr = { class: "text-[13px] font-medium leading-snug text-slate-800" }, $r = {
|
|
2097
|
+
key: 0,
|
|
2098
|
+
class: "flex items-center justify-between gap-3 border-t border-slate-100 px-4 py-3"
|
|
2099
|
+
}, ei = ["disabled"], ti = { class: "text-xs text-slate-400" }, ni = ["disabled"], ri = {
|
|
2100
|
+
key: 1,
|
|
2101
|
+
class: "border-t border-slate-100 px-4 py-3"
|
|
2102
|
+
};
|
|
2103
|
+
function ii(e, t, n, r, i, a) {
|
|
2104
|
+
return I(), k("aside", Nr, [
|
|
2105
|
+
A("header", Pr, [A("div", Fr, [n.application && n.total > 1 ? (I(), k("button", {
|
|
2106
|
+
key: 0,
|
|
2107
|
+
type: "button",
|
|
2108
|
+
class: "mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2109
|
+
"aria-label": "До списку",
|
|
2110
|
+
onClick: t[0] ||= (e) => r.emit("back")
|
|
2111
|
+
}, [M(r.ChevronLeft, { class: "h-4 w-4" })])) : O("", !0), A("div", Ir, [A("p", Lr, z(r.showList ? "Звернення в точці" : "Звернення"), 1), A("h2", Rr, [r.showList ? (I(), k(T, { key: 0 }, [j(z(n.total), 1)], 64)) : (I(), k(T, { key: 1 }, [j(z(n.application?.number || (n.loading ? "Завантаження…" : "—")), 1)], 64))])])]), A("button", {
|
|
2112
|
+
type: "button",
|
|
2113
|
+
class: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2114
|
+
"aria-label": "Закрити",
|
|
2115
|
+
onClick: t[1] ||= (e) => r.emit("close")
|
|
2116
|
+
}, [M(r.X, { class: "h-4 w-4" })])]),
|
|
2117
|
+
A("div", zr, [n.loading && !n.rows.length ? (I(), k("p", Br, "Завантаження…")) : n.error ? (I(), k("p", Vr, z(n.error), 1)) : r.showList && !n.rows.length ? (I(), k("p", Hr, " У цій точці немає звернень ")) : r.showList ? (I(), k("ul", Ur, [(I(!0), k(T, null, R(n.rows, (e) => (I(), k("li", { key: e.app_id }, [A("button", {
|
|
2118
|
+
type: "button",
|
|
2119
|
+
class: "flex w-full flex-col gap-1 rounded-lg border border-slate-200 px-3 py-2.5 text-left transition-colors hover:border-brand-300 hover:bg-brand-50",
|
|
2120
|
+
onClick: (t) => r.emit("select", e)
|
|
2121
|
+
}, [
|
|
2122
|
+
A("span", Gr, [A("span", Kr, z(e.number || "—"), 1), M(r.AppealStatusBadge, {
|
|
2123
|
+
status: e.status || "",
|
|
2124
|
+
label: e.status_data?.text || void 0,
|
|
2125
|
+
size: "sm"
|
|
2126
|
+
}, null, 8, ["status", "label"])]),
|
|
2127
|
+
A("span", qr, z(e.work_type_data?.text || "—"), 1),
|
|
2128
|
+
A("span", Jr, z(e.org_id_data?.text || "—"), 1)
|
|
2129
|
+
], 8, Wr)]))), 128))])) : n.loading ? (I(), k("p", Yr, "Завантаження…")) : n.application ? (I(), k(T, { key: 5 }, [M(r.AppealStatusBadge, {
|
|
2130
|
+
class: "mb-3",
|
|
2131
|
+
status: n.application.status || "",
|
|
2132
|
+
label: n.application.status_data?.text || void 0,
|
|
2133
|
+
size: "sm"
|
|
2134
|
+
}, null, 8, ["status", "label"]), A("dl", Xr, [(I(!0), k(T, null, R(r.fields, (e) => (I(), k("div", { key: e.label }, [A("dt", Zr, z(e.label), 1), A("dd", Qr, z(e.value), 1)]))), 128))])], 64)) : O("", !0)]),
|
|
2135
|
+
r.showList && n.pageCount > 1 ? (I(), k("footer", $r, [
|
|
2136
|
+
A("button", {
|
|
2137
|
+
type: "button",
|
|
2138
|
+
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2139
|
+
disabled: n.page <= 1 || n.loading,
|
|
2140
|
+
onClick: t[2] ||= (e) => r.emit("page", n.page - 1)
|
|
2141
|
+
}, " Назад ", 8, ei),
|
|
2142
|
+
A("span", ti, z(n.page) + " / " + z(n.pageCount), 1),
|
|
2143
|
+
A("button", {
|
|
2144
|
+
type: "button",
|
|
2145
|
+
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2146
|
+
disabled: n.page >= n.pageCount || n.loading,
|
|
2147
|
+
onClick: t[3] ||= (e) => r.emit("page", n.page + 1)
|
|
2148
|
+
}, " Далі ", 8, ni)
|
|
2149
|
+
])) : n.application?.app_id && !n.loading && !n.error ? (I(), k("footer", ri, [M(r.RouterLink, {
|
|
2150
|
+
to: `/requests/${n.application.app_id}`,
|
|
2151
|
+
class: "inline-flex text-[13px] font-medium text-brand-600 transition-colors hover:text-brand-800 hover:underline"
|
|
2152
|
+
}, {
|
|
2153
|
+
default: U(() => [...t[4] ||= [j(" Відкрити картку звернення ", -1)]]),
|
|
2154
|
+
_: 1
|
|
2155
|
+
}, 8, ["to"])])) : O("", !0)
|
|
2156
|
+
]);
|
|
2157
|
+
}
|
|
2158
|
+
var ai = /*#__PURE__*/ e(Mr, [["render", ii], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapApplicationPanel.vue"]]), oi = 300, si = [
|
|
2159
|
+
"z",
|
|
2160
|
+
"x",
|
|
2161
|
+
"y",
|
|
2162
|
+
"sel",
|
|
2163
|
+
"p",
|
|
2164
|
+
"filter",
|
|
2165
|
+
"basemap",
|
|
2166
|
+
"base",
|
|
2167
|
+
"layers",
|
|
2168
|
+
"app"
|
|
2169
|
+
];
|
|
2170
|
+
function ci(e, t = {}) {
|
|
2171
|
+
let n = he(), r = G(), i = !1, a = !1, o, s = "";
|
|
2172
|
+
function c() {
|
|
2173
|
+
return JSON.stringify(et({
|
|
2174
|
+
view: e.mapView.value,
|
|
2175
|
+
sel: e.sel.value,
|
|
2176
|
+
identifyPage: e.identifyPage.value,
|
|
2177
|
+
basemapId: e.basemapId.value,
|
|
2178
|
+
defaultBasemapId: e.defaultBasemapId.value,
|
|
2179
|
+
activeOverlayIds: e.activeOverlayIds.value,
|
|
2180
|
+
applicationsVisible: e.applicationsVisible.value,
|
|
2181
|
+
visibleStatuses: e.visibleStatuses.value,
|
|
2182
|
+
search: e.appliedSearch.value,
|
|
2183
|
+
advancedFilters: e.advancedFilters.value
|
|
2184
|
+
}));
|
|
2185
|
+
}
|
|
2186
|
+
function l() {
|
|
2187
|
+
let r = Qe(n.query);
|
|
2188
|
+
i = !0, r.view && (e.mapView.value = r.view, t.onViewFromRoute?.(r.view)), e.sel.value = r.sel, e.identifyPage.value = r.identifyPage, r.basemapId && (e.basemapId.value = r.basemapId), r.layerIds != null && (e.activeOverlayIds.value = [...r.layerIds]), r.applicationsVisible != null && (e.applicationsVisible.value = r.applicationsVisible), r.visibleStatuses && (e.visibleStatuses.value = new Set(r.visibleStatuses)), e.searchQuery.value = r.search, e.appliedSearch.value = r.search, e.advancedFilters.value = { ...r.advancedFilters }, s = c(), i = !1;
|
|
2189
|
+
}
|
|
2190
|
+
function u() {
|
|
2191
|
+
return l(), Qe(n.query);
|
|
2192
|
+
}
|
|
2193
|
+
function d() {
|
|
2194
|
+
if (i) return;
|
|
2195
|
+
let t = et({
|
|
2196
|
+
view: e.mapView.value,
|
|
2197
|
+
sel: e.sel.value,
|
|
2198
|
+
identifyPage: e.identifyPage.value,
|
|
2199
|
+
basemapId: e.basemapId.value,
|
|
2200
|
+
defaultBasemapId: e.defaultBasemapId.value,
|
|
2201
|
+
activeOverlayIds: e.activeOverlayIds.value,
|
|
2202
|
+
applicationsVisible: e.applicationsVisible.value,
|
|
2203
|
+
visibleStatuses: e.visibleStatuses.value,
|
|
2204
|
+
search: e.appliedSearch.value,
|
|
2205
|
+
advancedFilters: e.advancedFilters.value
|
|
2206
|
+
}), o = JSON.stringify(t);
|
|
2207
|
+
if (o === s) return;
|
|
2208
|
+
if (tt(n.query, t)) {
|
|
2209
|
+
s = o;
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
s = o, a = !0;
|
|
2213
|
+
let c = {};
|
|
2214
|
+
for (let e of si) c[e] = t[e];
|
|
2215
|
+
r.replace({ query: c });
|
|
2216
|
+
}
|
|
2217
|
+
function f() {
|
|
2218
|
+
i || d();
|
|
2219
|
+
}
|
|
2220
|
+
function p() {
|
|
2221
|
+
i || (clearTimeout(o), o = setTimeout(d, oi));
|
|
2222
|
+
}
|
|
2223
|
+
function m() {
|
|
2224
|
+
H(() => n.query, () => {
|
|
2225
|
+
if (a) {
|
|
2226
|
+
a = !1;
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
l();
|
|
2230
|
+
}, { deep: !0 }), H([
|
|
2231
|
+
e.sel,
|
|
2232
|
+
e.identifyPage,
|
|
2233
|
+
e.basemapId,
|
|
2234
|
+
e.defaultBasemapId,
|
|
2235
|
+
e.activeOverlayIds,
|
|
2236
|
+
e.applicationsVisible,
|
|
2237
|
+
e.visibleStatuses,
|
|
2238
|
+
e.appliedSearch,
|
|
2239
|
+
e.advancedFilters
|
|
2240
|
+
], () => f(), { deep: !0 }), H(e.mapView, () => p(), { deep: !0 });
|
|
2241
|
+
}
|
|
2242
|
+
function h() {
|
|
2243
|
+
clearTimeout(o);
|
|
2244
|
+
}
|
|
2245
|
+
return {
|
|
2246
|
+
readInitialRouteState: u,
|
|
2247
|
+
bindMapRouteSync: m,
|
|
2248
|
+
syncRouteNow: d,
|
|
2249
|
+
clearViewDebounce: h
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
//#endregion
|
|
2253
|
+
//#region admin/src/pages/map/index.vue?vue&type=script&setup=true&lang.ts
|
|
2254
|
+
var li = 350, ui = /*@__PURE__*/ N({
|
|
2255
|
+
__name: "index",
|
|
2256
|
+
setup(e, { expose: t }) {
|
|
2257
|
+
t();
|
|
2258
|
+
let n = he(), r = B("mapViewRef"), i = L(null), a = L(""), o = L(""), l = L([]), u = L(!1), m = L(!1), h = L(""), _ = L({}), v = E(() => ({ ..._.value })), y, b, x = 0, S = L(!0), ee = L(100), te = L(s), ne = L(p), re = L(null), ie = L([]), C = L([]), ae = L({}), w = L({}), { zoom: se, centerLngLat: ce } = Le();
|
|
2259
|
+
function T() {
|
|
2260
|
+
return ce.value ? {
|
|
2261
|
+
lng: ce.value[0],
|
|
2262
|
+
lat: ce.value[1],
|
|
2263
|
+
zoom: se.value
|
|
2264
|
+
} : null;
|
|
2265
|
+
}
|
|
2266
|
+
function D() {
|
|
2267
|
+
return Qe(n.query).view ?? T();
|
|
2268
|
+
}
|
|
2269
|
+
let O = D(), k = L(O?.zoom ?? se.value), A = L(O), j = L(O), M = /* @__PURE__ */ new Map(), N = E(() => ne.value[0]?.id ?? s), P = E(() => ne.value.find((e) => e.id === te.value) ?? ne.value[0] ?? p[0]);
|
|
2270
|
+
function F(e) {
|
|
2271
|
+
if (e.basemapId && ne.value.some((t) => t.id === e.basemapId) && (te.value = e.basemapId), e.layerIds != null) {
|
|
2272
|
+
C.value = e.layerIds.filter((e) => {
|
|
2273
|
+
let t = ie.value.find((t) => t.id === e);
|
|
2274
|
+
if (!t || !c(t)) return !1;
|
|
2275
|
+
let n = f(t);
|
|
2276
|
+
return n == null || k.value >= n;
|
|
2277
|
+
}), w.value = {};
|
|
2278
|
+
for (let e of C.value) fe(e, "loading");
|
|
2279
|
+
}
|
|
2280
|
+
e.applicationsVisible != null && (S.value = e.applicationsVisible);
|
|
2281
|
+
}
|
|
2282
|
+
async function I() {
|
|
2283
|
+
let e = await oe("map");
|
|
2284
|
+
ne.value = e.baseLayers, te.value = e.baseLayers[0]?.id ?? e.defaultBaseId, re.value = e.overlays.find((e) => e.kind === "applications") ?? null, ie.value = e.overlays.filter((e) => e.kind === "raster" || e.kind === "vector"), C.value = ie.value.filter((e) => {
|
|
2285
|
+
if (!e.defaultVisible || !c(e)) return !1;
|
|
2286
|
+
let t = f(e);
|
|
2287
|
+
return t == null || k.value >= t;
|
|
2288
|
+
}).map((e) => e.id), ae.value = Object.fromEntries(ie.value.map((e) => [e.id, Math.round(d(e) * 100)])), w.value = {};
|
|
2289
|
+
for (let e of C.value) fe(e, "loading");
|
|
2290
|
+
re.value && (S.value = re.value.defaultVisible, ee.value = Math.round(re.value.opacity * 100));
|
|
2291
|
+
}
|
|
2292
|
+
function R(e) {
|
|
2293
|
+
let t = M.get(e);
|
|
2294
|
+
t && (clearTimeout(t), M.delete(e));
|
|
2295
|
+
}
|
|
2296
|
+
function fe(e, t) {
|
|
2297
|
+
R(e), w.value = {
|
|
2298
|
+
...w.value,
|
|
2299
|
+
[e]: t
|
|
2300
|
+
}, t === "loading" && M.set(e, setTimeout(() => {
|
|
2301
|
+
w.value[e] === "loading" && (w.value = {
|
|
2302
|
+
...w.value,
|
|
2303
|
+
[e]: "error"
|
|
2304
|
+
}), M.delete(e);
|
|
2305
|
+
}, 1e4));
|
|
2306
|
+
}
|
|
2307
|
+
function z(e) {
|
|
2308
|
+
let t = ie.value.find((t) => t.id === e);
|
|
2309
|
+
if (!t || !c(t)) return !1;
|
|
2310
|
+
let n = f(t);
|
|
2311
|
+
return n == null || k.value >= n;
|
|
2312
|
+
}
|
|
2313
|
+
function V(e) {
|
|
2314
|
+
let t = C.value, n = !t.includes(e);
|
|
2315
|
+
if (!n || z(e)) {
|
|
2316
|
+
if (C.value = n ? [...t, e] : t.filter((t) => t !== e), !n) {
|
|
2317
|
+
R(e);
|
|
2318
|
+
let t = { ...w.value };
|
|
2319
|
+
delete t[e], w.value = t;
|
|
2320
|
+
return;
|
|
2321
|
+
}
|
|
2322
|
+
r.value?.overlaySourceReady(e) ? fe(e, "ready") : fe(e, "loading");
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
function U(e, t) {
|
|
2326
|
+
ae.value = {
|
|
2327
|
+
...ae.value,
|
|
2328
|
+
[e]: t
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
function W(e) {
|
|
2332
|
+
if (!C.value.includes(e)) {
|
|
2333
|
+
if (!z(e)) return;
|
|
2334
|
+
C.value = [...C.value, e];
|
|
2335
|
+
}
|
|
2336
|
+
fe(e, "loading"), r.value?.reloadOverlay(e);
|
|
2337
|
+
}
|
|
2338
|
+
function pe(e) {
|
|
2339
|
+
r.value?.zoomToOverlay(e);
|
|
2340
|
+
}
|
|
2341
|
+
let me = L(Object.fromEntries(g.map((e) => [e, 0]))), G = L(new Set(Vt.map((e) => e.key))), ge = L(null), _e = L(null), K = L(null), ve = L(null), q = L([]), ye = L(0), J = L(1), Y = L(null), X = L(!1), Z = L(""), Q = 0, be = L({
|
|
2342
|
+
width: 0,
|
|
2343
|
+
height: 0
|
|
2344
|
+
}), xe = E(() => g.reduce((e, t) => e + (me.value[t] ?? 0), 0)), Se = E(() => S.value ? [...G.value].reduce((e, t) => e + (me.value[t] ?? 0), 0) : 0);
|
|
2345
|
+
function Ce() {
|
|
2346
|
+
G.value = new Set(Vt.map((e) => e.key));
|
|
2347
|
+
}
|
|
2348
|
+
function we() {
|
|
2349
|
+
G.value = /* @__PURE__ */ new Set();
|
|
2350
|
+
}
|
|
2351
|
+
function Te(e) {
|
|
2352
|
+
let t = new Set(G.value);
|
|
2353
|
+
t.has(e) ? t.delete(e) : t.add(e), G.value = t;
|
|
2354
|
+
}
|
|
2355
|
+
let Ee = E(() => Math.max(1, Math.ceil(q.value.length / 10))), De = E(() => {
|
|
2356
|
+
let e = (J.value - 1) * 10;
|
|
2357
|
+
return q.value.slice(e, e + 10);
|
|
2358
|
+
});
|
|
2359
|
+
function je(e, t) {
|
|
2360
|
+
ge.value = e, _e.value = t;
|
|
2361
|
+
}
|
|
2362
|
+
function Me() {
|
|
2363
|
+
Q += 1, ve.value = null, q.value = [], ye.value = 0, J.value = 1, K.value = null, Y.value = null, X.value = !1, Z.value = "";
|
|
2364
|
+
}
|
|
2365
|
+
function $(e) {
|
|
2366
|
+
Y.value = e, K.value = e.app_id;
|
|
2367
|
+
}
|
|
2368
|
+
async function Ne(e, t = ++Q) {
|
|
2369
|
+
K.value = e.app_id, Z.value = "", X.value = !0, Y.value = {
|
|
2370
|
+
app_id: e.app_id,
|
|
2371
|
+
number: e.number,
|
|
2372
|
+
status: e.status ?? null,
|
|
2373
|
+
status_data: e.status_data ?? null
|
|
2374
|
+
};
|
|
2375
|
+
try {
|
|
2376
|
+
let n = await ke(e.app_id);
|
|
2377
|
+
if (t !== Q) return;
|
|
2378
|
+
$(n);
|
|
2379
|
+
} catch (e) {
|
|
2380
|
+
if (t !== Q) return;
|
|
2381
|
+
Z.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
2382
|
+
} finally {
|
|
2383
|
+
t === Q && (X.value = !1);
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
async function Pe(e) {
|
|
2387
|
+
if (!e.sel) return;
|
|
2388
|
+
let t = e.view ?? A.value ?? {
|
|
2389
|
+
lng: 24.0297,
|
|
2390
|
+
lat: 49.8397
|
|
2391
|
+
};
|
|
2392
|
+
ve.value = {
|
|
2393
|
+
lng: t.lng,
|
|
2394
|
+
lat: t.lat
|
|
2395
|
+
}, Z.value = "", X.value = !0;
|
|
2396
|
+
try {
|
|
2397
|
+
let t = await ke(e.sel);
|
|
2398
|
+
q.value = [t], ye.value = 1, J.value = 1, $(t);
|
|
2399
|
+
} catch (e) {
|
|
2400
|
+
Z.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
2401
|
+
} finally {
|
|
2402
|
+
X.value = !1;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
function Fe(e) {
|
|
2406
|
+
A.value = e, k.value = e.zoom;
|
|
2407
|
+
}
|
|
2408
|
+
let { readInitialRouteState: Ie, bindMapRouteSync: Re, syncRouteNow: ze, clearViewDebounce: Be } = ci({
|
|
2409
|
+
mapView: A,
|
|
2410
|
+
sel: K,
|
|
2411
|
+
identifyPage: J,
|
|
2412
|
+
basemapId: te,
|
|
2413
|
+
defaultBasemapId: N,
|
|
2414
|
+
activeOverlayIds: C,
|
|
2415
|
+
applicationsVisible: S,
|
|
2416
|
+
visibleStatuses: G,
|
|
2417
|
+
searchQuery: a,
|
|
2418
|
+
appliedSearch: o,
|
|
2419
|
+
advancedFilters: _
|
|
2420
|
+
}, { onViewFromRoute: (e) => {
|
|
2421
|
+
r.value?.setView(e, !1);
|
|
2422
|
+
} });
|
|
2423
|
+
function Ve(e) {
|
|
2424
|
+
let t = ++Q;
|
|
2425
|
+
if (ve.value = {
|
|
2426
|
+
lng: e.lng,
|
|
2427
|
+
lat: e.lat
|
|
2428
|
+
}, J.value = 1, Y.value = null, K.value = null, Z.value = "", X.value = !1, !G.value.size) {
|
|
2429
|
+
q.value = [], ye.value = 0;
|
|
2430
|
+
return;
|
|
2431
|
+
}
|
|
2432
|
+
let n = Bt(e.points);
|
|
2433
|
+
q.value = n, ye.value = n.length, n.length === 1 && Ne(n[0], t);
|
|
2434
|
+
}
|
|
2435
|
+
function He(e) {
|
|
2436
|
+
if (!e?.points.length) {
|
|
2437
|
+
Me();
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
Ve(e);
|
|
2441
|
+
}
|
|
2442
|
+
function Ue(e) {
|
|
2443
|
+
e < 1 || e > Ee.value || (J.value = e, Y.value = null, K.value = null);
|
|
2444
|
+
}
|
|
2445
|
+
function We() {
|
|
2446
|
+
Q += 1, Y.value = null, K.value = null, X.value = !1, Z.value = "";
|
|
2447
|
+
}
|
|
2448
|
+
function Ge() {
|
|
2449
|
+
i.value && (be.value = {
|
|
2450
|
+
width: i.value.clientWidth,
|
|
2451
|
+
height: i.value.clientHeight
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
H(() => Array.from(G.value).sort().join(","), () => {
|
|
2455
|
+
ve.value && (q.value = q.value.filter((e) => G.value.has(e.status ?? "")), ye.value = q.value.length, Y.value && !G.value.has(Y.value.status ?? "") && (Q += 1, Y.value = null, K.value = null, X.value = !1), J.value > Ee.value && (J.value = 1));
|
|
2456
|
+
});
|
|
2457
|
+
function Ke() {
|
|
2458
|
+
l.value = [], u.value = !1, m.value = !1, h.value = "";
|
|
2459
|
+
}
|
|
2460
|
+
function qe(e) {
|
|
2461
|
+
Me(), K.value = e.id, r.value?.fitApplicationGeometry(e.geometry);
|
|
2462
|
+
}
|
|
2463
|
+
async function Je(e) {
|
|
2464
|
+
let t = e.trim();
|
|
2465
|
+
if (b?.abort(), !t) {
|
|
2466
|
+
Ke();
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
let n = ++x, r = new AbortController();
|
|
2470
|
+
b = r, u.value = !0, m.value = !1, h.value = "", l.value = [];
|
|
2471
|
+
try {
|
|
2472
|
+
let e = await Ae(t, { signal: r.signal });
|
|
2473
|
+
if (n !== x) return;
|
|
2474
|
+
l.value = e.data, m.value = e.total === 0, e.total === 1 && e.data[0] && qe(e.data[0]);
|
|
2475
|
+
} catch (e) {
|
|
2476
|
+
if (r.signal.aborted || n !== x) return;
|
|
2477
|
+
l.value = [], m.value = !1, h.value = e instanceof Error ? e.message : "Не вдалося виконати пошук";
|
|
2478
|
+
} finally {
|
|
2479
|
+
n === x && (u.value = !1);
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
H(a, (e) => {
|
|
2483
|
+
clearTimeout(y);
|
|
2484
|
+
let t = e.trim();
|
|
2485
|
+
if (!t) {
|
|
2486
|
+
o.value = "", x += 1, b?.abort(), Ke();
|
|
2487
|
+
return;
|
|
2488
|
+
}
|
|
2489
|
+
y = setTimeout(() => {
|
|
2490
|
+
o.value = t, Je(e);
|
|
2491
|
+
}, li);
|
|
2492
|
+
});
|
|
2493
|
+
let Ye;
|
|
2494
|
+
ue(async () => {
|
|
2495
|
+
Ge(), i.value && (Ye = new ResizeObserver(Ge), Ye.observe(i.value));
|
|
2496
|
+
let e = Ie(), t = e.view ?? T();
|
|
2497
|
+
j.value = t, !e.view && t && (A.value = t, k.value = t.zoom), e.search && Je(e.search), await I(), F(e), await le(), t && r.value?.setView(t, !1), await Pe(e), Re(), ze(), Oe().then((e) => {
|
|
2498
|
+
me.value = e;
|
|
2499
|
+
}).catch((e) => {
|
|
2500
|
+
console.error(e);
|
|
2501
|
+
});
|
|
2502
|
+
}), de(() => {
|
|
2503
|
+
Ye?.disconnect(), clearTimeout(y), Be(), b?.abort();
|
|
2504
|
+
for (let e of M.values()) clearTimeout(e);
|
|
2505
|
+
M.clear();
|
|
2506
|
+
});
|
|
2507
|
+
let Xe = {
|
|
2508
|
+
route: n,
|
|
2509
|
+
mapViewRef: r,
|
|
2510
|
+
containerRef: i,
|
|
2511
|
+
SEARCH_DEBOUNCE_MS: li,
|
|
2512
|
+
searchQuery: a,
|
|
2513
|
+
appliedSearch: o,
|
|
2514
|
+
searchResults: l,
|
|
2515
|
+
searchLoading: u,
|
|
2516
|
+
searchEmpty: m,
|
|
2517
|
+
searchError: h,
|
|
2518
|
+
advancedFilters: _,
|
|
2519
|
+
mapFilters: v,
|
|
2520
|
+
get searchTimer() {
|
|
2521
|
+
return y;
|
|
2522
|
+
},
|
|
2523
|
+
set searchTimer(e) {
|
|
2524
|
+
y = e;
|
|
2525
|
+
},
|
|
2526
|
+
get searchAbort() {
|
|
2527
|
+
return b;
|
|
2528
|
+
},
|
|
2529
|
+
set searchAbort(e) {
|
|
2530
|
+
b = e;
|
|
2531
|
+
},
|
|
2532
|
+
get searchRequestId() {
|
|
2533
|
+
return x;
|
|
2534
|
+
},
|
|
2535
|
+
set searchRequestId(e) {
|
|
2536
|
+
x = e;
|
|
2537
|
+
},
|
|
2538
|
+
applicationsVisible: S,
|
|
2539
|
+
applicationsOpacity: ee,
|
|
2540
|
+
basemapId: te,
|
|
2541
|
+
baseLayers: ne,
|
|
2542
|
+
applicationsLayer: re,
|
|
2543
|
+
overlayLayers: ie,
|
|
2544
|
+
activeOverlayIds: C,
|
|
2545
|
+
overlayOpacities: ae,
|
|
2546
|
+
overlayLoad: w,
|
|
2547
|
+
settingsZoom: se,
|
|
2548
|
+
centerLngLat: ce,
|
|
2549
|
+
settingsMapView: T,
|
|
2550
|
+
resolveInitialMapView: D,
|
|
2551
|
+
initialMapView: O,
|
|
2552
|
+
mapZoom: k,
|
|
2553
|
+
mapView: A,
|
|
2554
|
+
mapInitialView: j,
|
|
2555
|
+
overlayLoadTimers: M,
|
|
2556
|
+
defaultBasemapId: N,
|
|
2557
|
+
activeBasemap: P,
|
|
2558
|
+
applyLayerStateFromRoute: F,
|
|
2559
|
+
loadLayerSettings: I,
|
|
2560
|
+
clearOverlayLoadTimer: R,
|
|
2561
|
+
setOverlayLoad: fe,
|
|
2562
|
+
overlayCanTurnOn: z,
|
|
2563
|
+
toggleOverlay: V,
|
|
2564
|
+
setOverlayOpacity: U,
|
|
2565
|
+
retryOverlay: W,
|
|
2566
|
+
zoomToOverlay: pe,
|
|
2567
|
+
statusCounts: me,
|
|
2568
|
+
visibleStatuses: G,
|
|
2569
|
+
hovered: ge,
|
|
2570
|
+
hoverPosition: _e,
|
|
2571
|
+
selectedId: K,
|
|
2572
|
+
identifyPoint: ve,
|
|
2573
|
+
identifyRows: q,
|
|
2574
|
+
identifyTotal: ye,
|
|
2575
|
+
identifyPage: J,
|
|
2576
|
+
selectedApplication: Y,
|
|
2577
|
+
selectedLoading: X,
|
|
2578
|
+
selectedError: Z,
|
|
2579
|
+
get selectRequestId() {
|
|
2580
|
+
return Q;
|
|
2581
|
+
},
|
|
2582
|
+
set selectRequestId(e) {
|
|
2583
|
+
Q = e;
|
|
2584
|
+
},
|
|
2585
|
+
containerSize: be,
|
|
2586
|
+
totalCount: xe,
|
|
2587
|
+
visibleCount: Se,
|
|
2588
|
+
selectAllStatuses: Ce,
|
|
2589
|
+
clearStatuses: we,
|
|
2590
|
+
toggleStatus: Te,
|
|
2591
|
+
identifyPageCount: Ee,
|
|
2592
|
+
pagedIdentifyRows: De,
|
|
2593
|
+
handlePointHover: je,
|
|
2594
|
+
closeSelection: Me,
|
|
2595
|
+
openIdentifiedApplication: $,
|
|
2596
|
+
loadApplicationById: Ne,
|
|
2597
|
+
restoreSelectionFromRoute: Pe,
|
|
2598
|
+
handleViewChange: Fe,
|
|
2599
|
+
readInitialRouteState: Ie,
|
|
2600
|
+
bindMapRouteSync: Re,
|
|
2601
|
+
syncRouteNow: ze,
|
|
2602
|
+
clearViewDebounce: Be,
|
|
2603
|
+
openSelectionFromTiles: Ve,
|
|
2604
|
+
handlePointSelect: He,
|
|
2605
|
+
showIdentifyPage: Ue,
|
|
2606
|
+
backToIdentifyList: We,
|
|
2607
|
+
updateContainerSize: Ge,
|
|
2608
|
+
clearSearchState: Ke,
|
|
2609
|
+
selectSearchResult: qe,
|
|
2610
|
+
runMapSearch: Je,
|
|
2611
|
+
get resizeObserver() {
|
|
2612
|
+
return Ye;
|
|
2613
|
+
},
|
|
2614
|
+
set resizeObserver(e) {
|
|
2615
|
+
Ye = e;
|
|
2616
|
+
},
|
|
2617
|
+
MapView: at,
|
|
2618
|
+
MapLayersPanel: ir,
|
|
2619
|
+
MapControls: dr,
|
|
2620
|
+
MapPointTooltip: jr,
|
|
2621
|
+
MapApplicationPanel: ai
|
|
2622
|
+
};
|
|
2623
|
+
return Object.defineProperty(Xe, "__isScriptSetup", {
|
|
2624
|
+
enumerable: !1,
|
|
2625
|
+
value: !0
|
|
2626
|
+
}), Xe;
|
|
2627
|
+
}
|
|
2628
|
+
}), di = { class: "flex h-full min-h-0 w-full flex-1 flex-col" }, fi = {
|
|
2629
|
+
ref: "containerRef",
|
|
2630
|
+
class: "relative h-full min-h-0 flex-1 overflow-hidden bg-slate-100"
|
|
2631
|
+
};
|
|
2632
|
+
function pi(e, t, n, r, i, a) {
|
|
2633
|
+
return I(), k("div", di, [A("div", fi, [
|
|
2634
|
+
M(r.MapView, {
|
|
2635
|
+
ref: "mapViewRef",
|
|
2636
|
+
basemap: r.activeBasemap,
|
|
2637
|
+
overlays: r.overlayLayers,
|
|
2638
|
+
"active-overlay-ids": r.activeOverlayIds,
|
|
2639
|
+
"overlay-opacities": r.overlayOpacities,
|
|
2640
|
+
"visible-statuses": r.visibleStatuses,
|
|
2641
|
+
"selected-id": r.selectedId,
|
|
2642
|
+
"applications-visible": r.applicationsVisible,
|
|
2643
|
+
"applications-opacity": r.applicationsOpacity,
|
|
2644
|
+
filters: r.mapFilters,
|
|
2645
|
+
"initial-view": r.mapInitialView,
|
|
2646
|
+
onPointHover: r.handlePointHover,
|
|
2647
|
+
onPointSelect: r.handlePointSelect,
|
|
2648
|
+
onZoom: t[0] ||= (e) => r.mapZoom = e,
|
|
2649
|
+
onViewChange: r.handleViewChange,
|
|
2650
|
+
onOverlayLoad: r.setOverlayLoad
|
|
2651
|
+
}, null, 8, [
|
|
2652
|
+
"basemap",
|
|
2653
|
+
"overlays",
|
|
2654
|
+
"active-overlay-ids",
|
|
2655
|
+
"overlay-opacities",
|
|
2656
|
+
"visible-statuses",
|
|
2657
|
+
"selected-id",
|
|
2658
|
+
"applications-visible",
|
|
2659
|
+
"applications-opacity",
|
|
2660
|
+
"filters",
|
|
2661
|
+
"initial-view"
|
|
2662
|
+
]),
|
|
2663
|
+
M(r.MapLayersPanel, {
|
|
2664
|
+
"search-query": r.searchQuery,
|
|
2665
|
+
"onUpdate:searchQuery": t[1] ||= (e) => r.searchQuery = e,
|
|
2666
|
+
"applications-visible": r.applicationsVisible,
|
|
2667
|
+
"onUpdate:applicationsVisible": t[2] ||= (e) => r.applicationsVisible = e,
|
|
2668
|
+
"applications-opacity": r.applicationsOpacity,
|
|
2669
|
+
"onUpdate:applicationsOpacity": t[3] ||= (e) => r.applicationsOpacity = e,
|
|
2670
|
+
filters: r.advancedFilters,
|
|
2671
|
+
"onUpdate:filters": t[4] ||= (e) => r.advancedFilters = e,
|
|
2672
|
+
"visible-statuses": r.visibleStatuses,
|
|
2673
|
+
"status-counts": r.statusCounts,
|
|
2674
|
+
"total-count": r.totalCount,
|
|
2675
|
+
"basemap-id": r.basemapId,
|
|
2676
|
+
"base-layers": r.baseLayers,
|
|
2677
|
+
overlays: r.overlayLayers,
|
|
2678
|
+
"active-overlay-ids": r.activeOverlayIds,
|
|
2679
|
+
"overlay-opacities": r.overlayOpacities,
|
|
2680
|
+
"overlay-load": r.overlayLoad,
|
|
2681
|
+
"map-zoom": r.mapZoom,
|
|
2682
|
+
"applications-name": r.applicationsLayer?.label,
|
|
2683
|
+
onToggleOverlay: r.toggleOverlay,
|
|
2684
|
+
onOverlayOpacity: r.setOverlayOpacity,
|
|
2685
|
+
onZoomToOverlay: r.zoomToOverlay,
|
|
2686
|
+
onRetryOverlay: r.retryOverlay,
|
|
2687
|
+
onToggleStatus: r.toggleStatus,
|
|
2688
|
+
onSelectAllStatuses: r.selectAllStatuses,
|
|
2689
|
+
onClearStatuses: r.clearStatuses,
|
|
2690
|
+
onBasemapChange: t[5] ||= (e) => r.basemapId = e,
|
|
2691
|
+
"search-loading": r.searchLoading,
|
|
2692
|
+
"search-results": r.searchResults,
|
|
2693
|
+
"search-empty": r.searchEmpty,
|
|
2694
|
+
"search-error": r.searchError,
|
|
2695
|
+
onSelectSearchResult: r.selectSearchResult
|
|
2696
|
+
}, null, 8, [
|
|
2697
|
+
"search-query",
|
|
2698
|
+
"applications-visible",
|
|
2699
|
+
"applications-opacity",
|
|
2700
|
+
"filters",
|
|
2701
|
+
"visible-statuses",
|
|
2702
|
+
"status-counts",
|
|
2703
|
+
"total-count",
|
|
2704
|
+
"basemap-id",
|
|
2705
|
+
"base-layers",
|
|
2706
|
+
"overlays",
|
|
2707
|
+
"active-overlay-ids",
|
|
2708
|
+
"overlay-opacities",
|
|
2709
|
+
"overlay-load",
|
|
2710
|
+
"map-zoom",
|
|
2711
|
+
"applications-name",
|
|
2712
|
+
"search-loading",
|
|
2713
|
+
"search-results",
|
|
2714
|
+
"search-empty",
|
|
2715
|
+
"search-error"
|
|
2716
|
+
]),
|
|
2717
|
+
M(r.MapControls, {
|
|
2718
|
+
"visible-count": r.visibleCount,
|
|
2719
|
+
onZoomIn: t[6] ||= (e) => r.mapViewRef?.zoomIn(),
|
|
2720
|
+
onZoomOut: t[7] ||= (e) => r.mapViewRef?.zoomOut(),
|
|
2721
|
+
onResetView: t[8] ||= (e) => r.mapViewRef?.resetView()
|
|
2722
|
+
}, null, 8, ["visible-count"]),
|
|
2723
|
+
r.identifyPoint ? (I(), D(r.MapApplicationPanel, {
|
|
2724
|
+
key: 0,
|
|
2725
|
+
rows: r.pagedIdentifyRows,
|
|
2726
|
+
total: r.identifyTotal,
|
|
2727
|
+
page: r.identifyPage,
|
|
2728
|
+
"page-count": r.identifyPageCount,
|
|
2729
|
+
application: r.selectedApplication,
|
|
2730
|
+
loading: r.selectedLoading,
|
|
2731
|
+
error: r.selectedError,
|
|
2732
|
+
onClose: r.closeSelection,
|
|
2733
|
+
onBack: r.backToIdentifyList,
|
|
2734
|
+
onSelect: r.loadApplicationById,
|
|
2735
|
+
onPage: r.showIdentifyPage
|
|
2736
|
+
}, null, 8, [
|
|
2737
|
+
"rows",
|
|
2738
|
+
"total",
|
|
2739
|
+
"page",
|
|
2740
|
+
"page-count",
|
|
2741
|
+
"application",
|
|
2742
|
+
"loading",
|
|
2743
|
+
"error"
|
|
2744
|
+
])) : O("", !0),
|
|
2745
|
+
r.hovered?.points.length && r.hoverPosition ? (I(), D(r.MapPointTooltip, {
|
|
2746
|
+
key: 1,
|
|
2747
|
+
points: r.hovered.points,
|
|
2748
|
+
total: r.hovered.total,
|
|
2749
|
+
position: r.hoverPosition,
|
|
2750
|
+
"container-width": r.containerSize.width,
|
|
2751
|
+
"container-height": r.containerSize.height
|
|
2752
|
+
}, null, 8, [
|
|
2753
|
+
"points",
|
|
2754
|
+
"total",
|
|
2755
|
+
"position",
|
|
2756
|
+
"container-width",
|
|
2757
|
+
"container-height"
|
|
2758
|
+
])) : O("", !0)
|
|
2759
|
+
], 512)]);
|
|
2760
|
+
}
|
|
2761
|
+
var mi = /*#__PURE__*/ e(ui, [["render", pi], ["__file", "C:/softpro/surveyor/admin/src/pages/map/index.vue"]]);
|
|
2762
|
+
//#endregion
|
|
2763
|
+
export { mi as default };
|