@opengis/surveyor 0.0.5 → 0.0.6
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/AppIcon-CO70tpMX.js +95 -0
- package/dist/chunks/{AppealStatusBadge-CefimzY3.js → AppealStatusBadge-BlAaNUSK.js} +16 -16
- package/dist/chunks/{FormFilePicker-CKVdZJU9.js → FormFilePicker-DxPQlxgy.js} +1 -1
- package/dist/chunks/{applications-CsCsndMV.js → applications-CLhv5l_j.js} +24 -24
- package/dist/chunks/auth-acuaYbYM.js +60 -0
- package/dist/chunks/{card-DCyBFoDZ.js → card-BDqeihxR.js} +264 -262
- package/dist/chunks/{create-DTP9x2uS.js → create-BPWuoys6.js} +216 -215
- package/dist/chunks/forgot-DoG6vXhq.js +100 -0
- package/dist/chunks/list-search-D5VdmGdV.js +5 -0
- package/dist/chunks/login-BWGylcSU.js +124 -0
- package/dist/chunks/organizations-DbVDoURw.js +93 -0
- package/dist/chunks/{profile-CuxlkEev.js → profile-CkwMFh82.js} +21 -19
- package/dist/chunks/profile-aXlo4qqA.js +104 -0
- package/dist/chunks/registration-3GLgq-ae.js +102 -0
- package/dist/chunks/{requests-Bt8fEdRc.js → requests-BM6XqgpC.js} +213 -212
- package/dist/chunks/reset-CP9LsLkC.js +111 -0
- package/dist/chunks/surveyor-CDkI2Dcp.js +92 -0
- package/dist/index.js +533 -114
- package/package.json +1 -1
- package/surveyor-types.d.ts +4 -0
- package/dist/chunks/organizations-BtuMZ5s_.js +0 -14
- package/dist/chunks/profile-DxZHxGum.js +0 -164
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as g } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { t as b } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
2
|
+
import { a as t, t as n } from "./surveyor-CDkI2Dcp.js";
|
|
3
|
+
import { s as r, t as i } from "./organizations-DbVDoURw.js";
|
|
4
|
+
import { t as a } from "./AppIcon-CO70tpMX.js";
|
|
5
|
+
import { t as o } from "./SurveyorTeleport-CnSF0Ptl.js";
|
|
6
|
+
import { c as s, t as c, u as l } from "./appealMapLayers-CQMK3rrz.js";
|
|
7
|
+
import { a as u, d, i as f, l as p, r as m, s as h, t as g, u as _ } from "./mapLayersApi-CWoQ2be-.js";
|
|
8
|
+
import { i as v, n as y } from "./geometry-DyhIVRcw.js";
|
|
9
|
+
import { t as b } from "./work_types-Hwme-FEX.js";
|
|
10
|
+
import { t as x } from "./MapLayerMenu-AUeTqgEp.js";
|
|
11
|
+
import { t as S } from "./FormFilePicker-DxPQlxgy.js";
|
|
12
|
+
import { i as C, r as w, s as T } from "./applications-CLhv5l_j.js";
|
|
12
13
|
import { Fragment as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createTextVNode as M, createVNode as N, defineComponent as P, nextTick as F, normalizeClass as I, normalizeStyle as L, onBeforeUnmount as R, onMounted as z, onUnmounted as B, openBlock as V, ref as H, renderList as U, shallowRef as ee, toDisplayString as W, vModelText as G, watch as K, withCtx as q, withDirectives as J, withModifiers as Y } from "vue";
|
|
13
14
|
import { RouterLink as te, useRouter as ne } from "vue-router";
|
|
14
15
|
//#region cabinet/src/pages/requests/components/FormSearchSelect.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -49,60 +50,60 @@ var re = /*@__PURE__*/ P({
|
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
emits: ["update:modelValue"],
|
|
52
|
-
setup(e, { expose:
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
left: `${
|
|
56
|
-
width: `${
|
|
57
|
-
bottom: `${window.innerHeight -
|
|
53
|
+
setup(e, { expose: t, emit: n }) {
|
|
54
|
+
t();
|
|
55
|
+
let r = e, i = n, s = H(!1), c = H(""), l = H(null), u = H(null), d = H(null), f = H(null), p = D(() => r.options.filter((e) => e.toLowerCase().includes(c.value.trim().toLowerCase()))), m = D(() => f.value ? r.openAbove ? {
|
|
56
|
+
left: `${f.value.left}px`,
|
|
57
|
+
width: `${f.value.width}px`,
|
|
58
|
+
bottom: `${window.innerHeight - f.value.top + 4}px`
|
|
58
59
|
} : {
|
|
59
|
-
left: `${
|
|
60
|
-
width: `${
|
|
61
|
-
top: `${
|
|
60
|
+
left: `${f.value.left}px`,
|
|
61
|
+
width: `${f.value.width}px`,
|
|
62
|
+
top: `${f.value.bottom + 4}px`
|
|
62
63
|
} : { visibility: "hidden" });
|
|
63
|
-
function m() {
|
|
64
|
-
d.value = c.value?.getBoundingClientRect() ?? null;
|
|
65
|
-
}
|
|
66
64
|
function h() {
|
|
67
|
-
|
|
65
|
+
f.value = l.value?.getBoundingClientRect() ?? null;
|
|
68
66
|
}
|
|
69
67
|
function g() {
|
|
70
|
-
window.
|
|
68
|
+
window.addEventListener("scroll", h, !0), window.addEventListener("resize", h);
|
|
71
69
|
}
|
|
72
70
|
function _() {
|
|
73
|
-
|
|
71
|
+
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
72
|
+
}
|
|
73
|
+
function v() {
|
|
74
|
+
r.disabled || (s.value = !s.value);
|
|
74
75
|
}
|
|
75
76
|
function y(e) {
|
|
76
|
-
|
|
77
|
+
i("update:modelValue", e), s.value = !1;
|
|
77
78
|
}
|
|
78
79
|
function b(e) {
|
|
79
80
|
let t = e.target;
|
|
80
|
-
|
|
81
|
+
l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
|
|
81
82
|
}
|
|
82
|
-
K(
|
|
83
|
-
|
|
83
|
+
K(s, async (e) => {
|
|
84
|
+
_(), e && (c.value = "", h(), g(), await F(), d.value?.focus());
|
|
84
85
|
}), z(() => document.addEventListener("mousedown", b)), R(() => {
|
|
85
|
-
document.removeEventListener("mousedown", b),
|
|
86
|
+
document.removeEventListener("mousedown", b), _();
|
|
86
87
|
});
|
|
87
88
|
let x = {
|
|
88
|
-
props:
|
|
89
|
-
emit:
|
|
90
|
-
open:
|
|
91
|
-
query:
|
|
92
|
-
rootRef:
|
|
93
|
-
panelRef:
|
|
94
|
-
inputRef:
|
|
95
|
-
triggerRect:
|
|
96
|
-
filtered:
|
|
97
|
-
dropdownStyle:
|
|
98
|
-
refreshRect:
|
|
99
|
-
bindPositionListeners:
|
|
100
|
-
unbindPositionListeners:
|
|
101
|
-
toggle:
|
|
89
|
+
props: r,
|
|
90
|
+
emit: i,
|
|
91
|
+
open: s,
|
|
92
|
+
query: c,
|
|
93
|
+
rootRef: l,
|
|
94
|
+
panelRef: u,
|
|
95
|
+
inputRef: d,
|
|
96
|
+
triggerRect: f,
|
|
97
|
+
filtered: p,
|
|
98
|
+
dropdownStyle: m,
|
|
99
|
+
refreshRect: h,
|
|
100
|
+
bindPositionListeners: g,
|
|
101
|
+
unbindPositionListeners: _,
|
|
102
|
+
toggle: v,
|
|
102
103
|
select: y,
|
|
103
104
|
onDocumentClick: b,
|
|
104
|
-
AppIcon:
|
|
105
|
-
SurveyorTeleport:
|
|
105
|
+
AppIcon: a,
|
|
106
|
+
SurveyorTeleport: o
|
|
106
107
|
};
|
|
107
108
|
return Object.defineProperty(x, "__isScriptSetup", {
|
|
108
109
|
enumerable: !1,
|
|
@@ -199,58 +200,58 @@ var me = /*#__PURE__*/ e(re, [["render", pe], ["__file", "C:/softpro/surveyor/ca
|
|
|
199
200
|
"search",
|
|
200
201
|
"select"
|
|
201
202
|
],
|
|
202
|
-
setup(e, { expose:
|
|
203
|
-
|
|
204
|
-
let
|
|
205
|
-
let e =
|
|
206
|
-
return e ?
|
|
207
|
-
}),
|
|
208
|
-
left: `${
|
|
209
|
-
width: `${
|
|
210
|
-
top: `${
|
|
203
|
+
setup(e, { expose: t, emit: n }) {
|
|
204
|
+
t();
|
|
205
|
+
let r = e, i = n, s = H(!1), c = H(""), l = H(null), u = H(null), d = H(null), f = H(null), p = D(() => {
|
|
206
|
+
let e = c.value.trim().toLowerCase();
|
|
207
|
+
return e ? r.options.filter((t) => t.text.toLowerCase().includes(e)) : r.options;
|
|
208
|
+
}), m = D(() => f.value ? {
|
|
209
|
+
left: `${f.value.left}px`,
|
|
210
|
+
width: `${f.value.width}px`,
|
|
211
|
+
top: `${f.value.bottom + 4}px`
|
|
211
212
|
} : { visibility: "hidden" });
|
|
212
|
-
function m() {
|
|
213
|
-
d.value = c.value?.getBoundingClientRect() ?? null;
|
|
214
|
-
}
|
|
215
213
|
function h() {
|
|
216
|
-
|
|
214
|
+
f.value = l.value?.getBoundingClientRect() ?? null;
|
|
217
215
|
}
|
|
218
216
|
function g() {
|
|
219
|
-
window.
|
|
217
|
+
window.addEventListener("scroll", h, !0), window.addEventListener("resize", h);
|
|
220
218
|
}
|
|
221
219
|
function _() {
|
|
222
|
-
|
|
220
|
+
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
221
|
+
}
|
|
222
|
+
function v() {
|
|
223
|
+
r.disabled || (s.value = !s.value);
|
|
223
224
|
}
|
|
224
225
|
function y(e) {
|
|
225
|
-
|
|
226
|
+
i("update:modelValue", e.id), i("update:displayValue", e.text), i("select", e), s.value = !1;
|
|
226
227
|
}
|
|
227
228
|
function b(e) {
|
|
228
229
|
let t = e.target;
|
|
229
|
-
|
|
230
|
+
l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
|
|
230
231
|
}
|
|
231
232
|
let x;
|
|
232
|
-
K(
|
|
233
|
-
|
|
234
|
-
}), K(
|
|
235
|
-
|
|
233
|
+
K(c, (e) => {
|
|
234
|
+
s.value && (clearTimeout(x), x = setTimeout(() => i("search", e.trim()), 280));
|
|
235
|
+
}), K(s, async (e) => {
|
|
236
|
+
_(), e && (c.value = "", h(), g(), i("search", ""), await F(), d.value?.focus());
|
|
236
237
|
}), z(() => document.addEventListener("mousedown", b)), R(() => {
|
|
237
|
-
document.removeEventListener("mousedown", b),
|
|
238
|
+
document.removeEventListener("mousedown", b), _(), clearTimeout(x);
|
|
238
239
|
});
|
|
239
240
|
let S = {
|
|
240
|
-
props:
|
|
241
|
-
emit:
|
|
242
|
-
open:
|
|
243
|
-
query:
|
|
244
|
-
rootRef:
|
|
245
|
-
panelRef:
|
|
246
|
-
inputRef:
|
|
247
|
-
triggerRect:
|
|
248
|
-
filtered:
|
|
249
|
-
dropdownStyle:
|
|
250
|
-
refreshRect:
|
|
251
|
-
bindPositionListeners:
|
|
252
|
-
unbindPositionListeners:
|
|
253
|
-
toggle:
|
|
241
|
+
props: r,
|
|
242
|
+
emit: i,
|
|
243
|
+
open: s,
|
|
244
|
+
query: c,
|
|
245
|
+
rootRef: l,
|
|
246
|
+
panelRef: u,
|
|
247
|
+
inputRef: d,
|
|
248
|
+
triggerRect: f,
|
|
249
|
+
filtered: p,
|
|
250
|
+
dropdownStyle: m,
|
|
251
|
+
refreshRect: h,
|
|
252
|
+
bindPositionListeners: g,
|
|
253
|
+
unbindPositionListeners: _,
|
|
254
|
+
toggle: v,
|
|
254
255
|
select: y,
|
|
255
256
|
onDocumentClick: b,
|
|
256
257
|
get searchTimer() {
|
|
@@ -259,8 +260,8 @@ var me = /*#__PURE__*/ e(re, [["render", pe], ["__file", "C:/softpro/surveyor/ca
|
|
|
259
260
|
set searchTimer(e) {
|
|
260
261
|
x = e;
|
|
261
262
|
},
|
|
262
|
-
AppIcon:
|
|
263
|
-
SurveyorTeleport:
|
|
263
|
+
AppIcon: a,
|
|
264
|
+
SurveyorTeleport: o
|
|
264
265
|
};
|
|
265
266
|
return Object.defineProperty(S, "__isScriptSetup", {
|
|
266
267
|
enumerable: !1,
|
|
@@ -331,14 +332,14 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
331
332
|
}
|
|
332
333
|
},
|
|
333
334
|
emits: ["update:points", "import"],
|
|
334
|
-
setup(e, { expose: t, emit:
|
|
335
|
+
setup(e, { expose: t, emit: n }) {
|
|
335
336
|
t();
|
|
336
|
-
let
|
|
337
|
+
let r = e, i = n, a = H(null), o = ee(null), b = ee(null), S = H(""), C = null, w = H(c), T = H([]), E = H(s), D = H([]);
|
|
337
338
|
function O(e) {
|
|
338
|
-
return w.value.find((t) => t.id === e) ?? w.value[0] ??
|
|
339
|
+
return w.value.find((t) => t.id === e) ?? w.value[0] ?? c[0];
|
|
339
340
|
}
|
|
340
341
|
async function k() {
|
|
341
|
-
let e = await
|
|
342
|
+
let e = await g("application-form");
|
|
342
343
|
w.value = e.baseLayers, E.value = e.defaultBaseId, T.value = e.overlays.filter((e) => e.kind !== "applications"), D.value = T.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
343
344
|
}
|
|
344
345
|
function A(e) {
|
|
@@ -346,7 +347,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
346
347
|
D.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
347
348
|
}
|
|
348
349
|
function j() {
|
|
349
|
-
let e =
|
|
350
|
+
let e = r.geometry;
|
|
350
351
|
if (e) return {
|
|
351
352
|
type: "FeatureCollection",
|
|
352
353
|
features: [{
|
|
@@ -355,7 +356,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
355
356
|
properties: {}
|
|
356
357
|
}]
|
|
357
358
|
};
|
|
358
|
-
let t =
|
|
359
|
+
let t = r.points.map(([e, t]) => [e, t]), n = [];
|
|
359
360
|
return t.length >= 2 && n.push({
|
|
360
361
|
type: "Feature",
|
|
361
362
|
geometry: {
|
|
@@ -378,7 +379,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
378
379
|
function M() {
|
|
379
380
|
return {
|
|
380
381
|
type: "FeatureCollection",
|
|
381
|
-
features: (
|
|
382
|
+
features: (r.geometry ? [] : r.points).map(([e, t]) => ({
|
|
382
383
|
type: "Feature",
|
|
383
384
|
geometry: {
|
|
384
385
|
type: "Point",
|
|
@@ -433,7 +434,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
433
434
|
}
|
|
434
435
|
function F(e) {
|
|
435
436
|
let t = [e.lngLat.lng, e.lngLat.lat];
|
|
436
|
-
|
|
437
|
+
i("update:points", r.geometry ? [t] : [...r.points, t]);
|
|
437
438
|
}
|
|
438
439
|
function I(e) {
|
|
439
440
|
let t = document.createElement("div");
|
|
@@ -451,25 +452,25 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
451
452
|
};
|
|
452
453
|
}
|
|
453
454
|
function L(e) {
|
|
454
|
-
let t =
|
|
455
|
+
let t = v(r.geometry);
|
|
455
456
|
if (!t) return !1;
|
|
456
|
-
let [[n,
|
|
457
|
+
let [[n, i], [a, o]] = y(t);
|
|
457
458
|
if (![
|
|
458
459
|
n,
|
|
459
|
-
r,
|
|
460
460
|
i,
|
|
461
|
-
a
|
|
461
|
+
a,
|
|
462
|
+
o
|
|
462
463
|
].every(Number.isFinite)) return !1;
|
|
463
464
|
e.resize();
|
|
464
|
-
let
|
|
465
|
-
if (
|
|
466
|
-
let
|
|
467
|
-
return
|
|
468
|
-
center:
|
|
465
|
+
let s = e.getCanvas();
|
|
466
|
+
if (s.clientWidth < 2 || s.clientHeight < 2) return !1;
|
|
467
|
+
let c = [Math.min(n, a), Math.min(i, o)], l = [Math.max(n, a), Math.max(i, o)];
|
|
468
|
+
return l[0] - c[0] < 1e-8 && l[1] - c[1] < 1e-8 ? (e.flyTo({
|
|
469
|
+
center: c,
|
|
469
470
|
zoom: $,
|
|
470
471
|
essential: !0,
|
|
471
472
|
duration: 600
|
|
472
|
-
}), !0) : (e.fitBounds([
|
|
473
|
+
}), !0) : (e.fitBounds([c, l], {
|
|
473
474
|
padding: 48,
|
|
474
475
|
duration: 600,
|
|
475
476
|
maxZoom: $,
|
|
@@ -477,7 +478,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
477
478
|
}), !0);
|
|
478
479
|
}
|
|
479
480
|
function R(e) {
|
|
480
|
-
if (!W &&
|
|
481
|
+
if (!W && o.value === e && r.geometry) {
|
|
481
482
|
if (!e.getSource(X)) {
|
|
482
483
|
e.once("load", () => R(e));
|
|
483
484
|
return;
|
|
@@ -490,12 +491,12 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
490
491
|
return e.setAttribute("aria-hidden", "true"), e.style.width = "28px", e.style.height = "36px", e.style.pointerEvents = "none", e.innerHTML = "<svg width=\"28\" height=\"36\" viewBox=\"0 0 28 36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14 0C6.27 0 0 6.27 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.27 21.73 0 14 0z\" fill=\"#EF4444\"/><circle cx=\"14\" cy=\"14\" r=\"5\" fill=\"#fff\"/></svg>", e;
|
|
491
492
|
}
|
|
492
493
|
function U(e) {
|
|
493
|
-
let t =
|
|
494
|
+
let t = r.addressPoint;
|
|
494
495
|
if (!t || !C) {
|
|
495
|
-
|
|
496
|
+
b.value?.remove(), b.value = null;
|
|
496
497
|
return;
|
|
497
498
|
}
|
|
498
|
-
|
|
499
|
+
b.value ? b.value.setLngLat(t) : b.value = new C.Marker({
|
|
499
500
|
element: V(),
|
|
500
501
|
anchor: "bottom"
|
|
501
502
|
}).setLngLat(t).addTo(e), e.flyTo({
|
|
@@ -508,57 +509,57 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
508
509
|
z(async () => {
|
|
509
510
|
let e;
|
|
510
511
|
try {
|
|
511
|
-
let [t] = await Promise.all([
|
|
512
|
+
let [t] = await Promise.all([d(), k()]);
|
|
512
513
|
e = t;
|
|
513
514
|
} catch (e) {
|
|
514
|
-
console.error(e), S.value =
|
|
515
|
+
console.error(e), S.value = p;
|
|
515
516
|
return;
|
|
516
517
|
}
|
|
517
|
-
if (W || !
|
|
518
|
+
if (W || !a.value) return;
|
|
518
519
|
C = e;
|
|
519
520
|
let t = new e.Map({
|
|
520
|
-
container:
|
|
521
|
-
style:
|
|
521
|
+
container: a.value,
|
|
522
|
+
style: l(O(E.value)),
|
|
522
523
|
center: [24.0297, 49.8397],
|
|
523
524
|
zoom: 13,
|
|
524
525
|
attributionControl: !1,
|
|
525
|
-
locale:
|
|
526
|
+
locale: _
|
|
526
527
|
});
|
|
527
|
-
t.addControl(new e.NavigationControl({ showCompass: !1 }), "top-left"), t.addControl(I(() =>
|
|
528
|
-
P(t),
|
|
529
|
-
}), t.on("click", (e) => F(e)),
|
|
528
|
+
t.addControl(new e.NavigationControl({ showCompass: !1 }), "top-left"), t.addControl(I(() => i("import")), "top-left"), t.on("load", () => {
|
|
529
|
+
P(t), h(t, T.value, D.value, Z), U(t);
|
|
530
|
+
}), t.on("click", (e) => F(e)), o.value = t;
|
|
530
531
|
}), B(() => {
|
|
531
|
-
W = !0,
|
|
532
|
-
}), K(() => [
|
|
533
|
-
let e =
|
|
532
|
+
W = !0, b.value?.remove(), b.value = null, o.value?.remove(), o.value = null;
|
|
533
|
+
}), K(() => [r.points, r.geometry], () => {
|
|
534
|
+
let e = o.value;
|
|
534
535
|
e?.getSource(X) && N(e);
|
|
535
|
-
}, { deep: !0 }), K(() =>
|
|
536
|
-
let e =
|
|
537
|
-
e &&
|
|
536
|
+
}, { deep: !0 }), K(() => r.geometry, () => {
|
|
537
|
+
let e = o.value;
|
|
538
|
+
e && r.geometry && R(e);
|
|
538
539
|
}, { flush: "post" }), K(E, () => {
|
|
539
|
-
let e =
|
|
540
|
+
let e = o.value;
|
|
540
541
|
if (!e) return;
|
|
541
|
-
let t = () =>
|
|
542
|
+
let t = () => u(e, O(E.value), f(e, T.value, [Z]));
|
|
542
543
|
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
543
544
|
}), K(D, () => {
|
|
544
|
-
let e =
|
|
545
|
-
e?.isStyleLoaded() &&
|
|
546
|
-
}), K(() =>
|
|
547
|
-
let e =
|
|
545
|
+
let e = o.value;
|
|
546
|
+
e?.isStyleLoaded() && m(e, T.value, D.value);
|
|
547
|
+
}), K(() => r.addressPoint, () => {
|
|
548
|
+
let e = o.value;
|
|
548
549
|
e?.isStyleLoaded() && U(e);
|
|
549
550
|
});
|
|
550
551
|
let G = {
|
|
551
|
-
props:
|
|
552
|
-
emit:
|
|
552
|
+
props: r,
|
|
553
|
+
emit: i,
|
|
553
554
|
DRAFT_SOURCE: X,
|
|
554
555
|
DRAFT_FILL: Z,
|
|
555
556
|
DRAFT_LINE: Oe,
|
|
556
557
|
VERTEX_SOURCE: Q,
|
|
557
558
|
VERTEX_LAYER: ke,
|
|
558
559
|
ADDRESS_ZOOM: $,
|
|
559
|
-
mapHost:
|
|
560
|
-
mapRef:
|
|
561
|
-
addressMarker:
|
|
560
|
+
mapHost: a,
|
|
561
|
+
mapRef: o,
|
|
562
|
+
addressMarker: b,
|
|
562
563
|
mapLoadError: S,
|
|
563
564
|
get maplibre() {
|
|
564
565
|
return C;
|
|
@@ -589,7 +590,7 @@ var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/ca
|
|
|
589
590
|
set disposed(e) {
|
|
590
591
|
W = e;
|
|
591
592
|
},
|
|
592
|
-
MapLayerMenu:
|
|
593
|
+
MapLayerMenu: x
|
|
593
594
|
};
|
|
594
595
|
return Object.defineProperty(G, "__isScriptSetup", {
|
|
595
596
|
enumerable: !1,
|
|
@@ -628,40 +629,40 @@ function Fe(e, t, n, r, i, a) {
|
|
|
628
629
|
var Ie = /*#__PURE__*/ e(Ae, [["render", Fe], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Le = /*@__PURE__*/ P({
|
|
629
630
|
__name: "GeometryImportDialog",
|
|
630
631
|
emits: ["close", "imported"],
|
|
631
|
-
setup(e, { expose:
|
|
632
|
-
|
|
633
|
-
let
|
|
634
|
-
function
|
|
635
|
-
|
|
632
|
+
setup(e, { expose: t, emit: n }) {
|
|
633
|
+
t();
|
|
634
|
+
let r = n, i = H(null), s = H(!1), c = H("");
|
|
635
|
+
function l(e) {
|
|
636
|
+
i.value = e, c.value = "";
|
|
636
637
|
}
|
|
637
|
-
async function
|
|
638
|
-
if (
|
|
639
|
-
|
|
638
|
+
async function u() {
|
|
639
|
+
if (i.value && !s.value) {
|
|
640
|
+
c.value = "", s.value = !0;
|
|
640
641
|
try {
|
|
641
|
-
let e = await
|
|
642
|
-
|
|
642
|
+
let e = await T(i.value);
|
|
643
|
+
r("imported", e);
|
|
643
644
|
} catch (e) {
|
|
644
|
-
|
|
645
|
+
c.value = e instanceof Error ? e.message : "Не вдалося імпортувати геометрію";
|
|
645
646
|
} finally {
|
|
646
|
-
|
|
647
|
+
s.value = !1;
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
650
|
}
|
|
650
|
-
let
|
|
651
|
-
emit:
|
|
652
|
-
file:
|
|
653
|
-
importing:
|
|
654
|
-
error:
|
|
655
|
-
onFileChange:
|
|
656
|
-
submit:
|
|
657
|
-
AppIcon:
|
|
658
|
-
SurveyorTeleport:
|
|
659
|
-
FormFilePicker:
|
|
651
|
+
let d = {
|
|
652
|
+
emit: r,
|
|
653
|
+
file: i,
|
|
654
|
+
importing: s,
|
|
655
|
+
error: c,
|
|
656
|
+
onFileChange: l,
|
|
657
|
+
submit: u,
|
|
658
|
+
AppIcon: a,
|
|
659
|
+
SurveyorTeleport: o,
|
|
660
|
+
FormFilePicker: S
|
|
660
661
|
};
|
|
661
|
-
return Object.defineProperty(
|
|
662
|
+
return Object.defineProperty(d, "__isScriptSetup", {
|
|
662
663
|
enumerable: !1,
|
|
663
664
|
value: !0
|
|
664
|
-
}),
|
|
665
|
+
}), d;
|
|
665
666
|
}
|
|
666
667
|
}), Re = {
|
|
667
668
|
class: "w-full max-w-md overflow-hidden rounded-2xl bg-white shadow-2xl",
|
|
@@ -715,12 +716,12 @@ function Ge(e, t, n, r, i, a) {
|
|
|
715
716
|
});
|
|
716
717
|
}
|
|
717
718
|
var Ke = /*#__PURE__*/ e(Le, [["render", Ge], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/GeometryImportDialog.vue"]]), qe = "public_applications", Je = qe;
|
|
718
|
-
async function Ye(e,
|
|
719
|
-
let
|
|
720
|
-
if (
|
|
721
|
-
let
|
|
722
|
-
if (!
|
|
723
|
-
return (await
|
|
719
|
+
async function Ye(e, r, i) {
|
|
720
|
+
let a = new URLSearchParams();
|
|
721
|
+
if (a.set("limit", String(i?.limit ?? 20)), i?.search && a.set("search", i.search), i?.filter) for (let [e, t] of Object.entries(i.filter)) a.set(`filter[${e}]`, String(t));
|
|
722
|
+
let o = await fetch(n(`/api/suggest/${encodeURIComponent(e)}/${encodeURIComponent(r)}?${a}`), { credentials: "include" });
|
|
723
|
+
if (!o.ok) throw Error(t(await o.text(), o.status));
|
|
724
|
+
return (await o.json()).data ?? [];
|
|
724
725
|
}
|
|
725
726
|
//#endregion
|
|
726
727
|
//#region cabinet/src/pages/requests/create.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -728,49 +729,49 @@ var Xe = /*@__PURE__*/ P({
|
|
|
728
729
|
__name: "create",
|
|
729
730
|
setup(e, { expose: t }) {
|
|
730
731
|
t();
|
|
731
|
-
let n = ne(),
|
|
732
|
-
K(
|
|
733
|
-
|
|
734
|
-
}), K(
|
|
735
|
-
|
|
736
|
-
}), K(
|
|
737
|
-
e.length > 0 && (
|
|
732
|
+
let n = ne(), o = H(""), s = H(""), c = H(""), l = H(""), u = H([]), d = H([]), f = H(!1), p = H(!1), m = H(!1), h = H(""), g = H(""), _ = H(""), v = H(""), y = H(""), x = H(""), S = H([]), T = H(null), E = H(!1), O = H(null), k = H(!1), A = H(""), j = D(() => r.value.find((e) => e.id === i.value)?.name ?? ""), M = b.items.map((e) => e.name);
|
|
733
|
+
K(o, () => {
|
|
734
|
+
c.value = "", l.value = "", d.value = [], O.value = null;
|
|
735
|
+
}), K(_, (e) => {
|
|
736
|
+
g.value = b.items.find((t) => t.name === e)?.code ?? "";
|
|
737
|
+
}), K(S, (e) => {
|
|
738
|
+
e.length > 0 && (T.value = null);
|
|
738
739
|
});
|
|
739
740
|
let N = D(() => {
|
|
740
|
-
let e = !!
|
|
741
|
-
return !!(
|
|
741
|
+
let e = !!o.value, t = m.value ? h.value.trim().length > 0 : !!c.value, n = !!T.value || S.value.length >= 3;
|
|
742
|
+
return !!(g.value && e && t && n);
|
|
742
743
|
});
|
|
743
744
|
function P(e) {
|
|
744
|
-
|
|
745
|
+
T.value = e, S.value = [], E.value = !1;
|
|
745
746
|
}
|
|
746
747
|
async function F(e) {
|
|
747
|
-
|
|
748
|
+
f.value = !0;
|
|
748
749
|
try {
|
|
749
|
-
|
|
750
|
+
u.value = await Ye(qe, "settlement_id", {
|
|
750
751
|
search: e,
|
|
751
752
|
filter: { level: 5 }
|
|
752
753
|
});
|
|
753
754
|
} catch {
|
|
754
|
-
|
|
755
|
+
u.value = [];
|
|
755
756
|
} finally {
|
|
756
|
-
|
|
757
|
+
f.value = !1;
|
|
757
758
|
}
|
|
758
759
|
}
|
|
759
760
|
async function I(e) {
|
|
760
|
-
if (!
|
|
761
|
-
|
|
761
|
+
if (!o.value) {
|
|
762
|
+
d.value = [];
|
|
762
763
|
return;
|
|
763
764
|
}
|
|
764
|
-
|
|
765
|
+
p.value = !0;
|
|
765
766
|
try {
|
|
766
|
-
|
|
767
|
+
d.value = await Ye(Je, "address_id", {
|
|
767
768
|
search: e,
|
|
768
|
-
filter: { settlement_id:
|
|
769
|
+
filter: { settlement_id: o.value }
|
|
769
770
|
});
|
|
770
771
|
} catch {
|
|
771
|
-
|
|
772
|
+
d.value = [];
|
|
772
773
|
} finally {
|
|
773
|
-
|
|
774
|
+
p.value = !1;
|
|
774
775
|
}
|
|
775
776
|
}
|
|
776
777
|
function L(e) {
|
|
@@ -784,10 +785,10 @@ var Xe = /*@__PURE__*/ P({
|
|
|
784
785
|
O.value = L(e.geom);
|
|
785
786
|
}
|
|
786
787
|
function z() {
|
|
787
|
-
|
|
788
|
+
m.value = !m.value, c.value = "", l.value = "", d.value = [], h.value = "", O.value = null;
|
|
788
789
|
}
|
|
789
790
|
async function B() {
|
|
790
|
-
if (A.value = "", !
|
|
791
|
+
if (A.value = "", !i.value) {
|
|
791
792
|
A.value = "Оберіть організацію в шапці кабінету";
|
|
792
793
|
return;
|
|
793
794
|
}
|
|
@@ -795,29 +796,29 @@ var Xe = /*@__PURE__*/ P({
|
|
|
795
796
|
A.value = "Заповніть обовʼязкові поля та окресліть територію на карті або імпортуйте геометрію";
|
|
796
797
|
return;
|
|
797
798
|
}
|
|
798
|
-
let e =
|
|
799
|
+
let e = T.value ?? w(S.value);
|
|
799
800
|
if (!e) {
|
|
800
801
|
A.value = "Некоректний контур території";
|
|
801
802
|
return;
|
|
802
803
|
}
|
|
803
|
-
let t = [
|
|
804
|
+
let t = [v.value.trim(), x.value.trim() ? `Примітки: ${x.value.trim()}` : ""].filter(Boolean).join("\n\n");
|
|
804
805
|
k.value = !0;
|
|
805
806
|
try {
|
|
806
|
-
let
|
|
807
|
-
organization_id:
|
|
808
|
-
work_type:
|
|
809
|
-
settlement_id:
|
|
810
|
-
is_found_address_id: !
|
|
811
|
-
...
|
|
807
|
+
let r = await C({
|
|
808
|
+
organization_id: i.value,
|
|
809
|
+
work_type: g.value,
|
|
810
|
+
settlement_id: o.value,
|
|
811
|
+
is_found_address_id: !m.value,
|
|
812
|
+
...m.value ? { location: h.value.trim() } : { address_id: c.value },
|
|
812
813
|
description: t || void 0,
|
|
813
|
-
execution_basis:
|
|
814
|
+
execution_basis: y.value.trim() || void 0,
|
|
814
815
|
geom: e
|
|
815
816
|
});
|
|
816
817
|
await n.push({
|
|
817
818
|
name: "requests",
|
|
818
819
|
query: {
|
|
819
|
-
submitted:
|
|
820
|
-
status:
|
|
820
|
+
submitted: r.number,
|
|
821
|
+
status: r.status
|
|
821
822
|
}
|
|
822
823
|
});
|
|
823
824
|
} catch (e) {
|
|
@@ -828,23 +829,23 @@ var Xe = /*@__PURE__*/ P({
|
|
|
828
829
|
}
|
|
829
830
|
let V = {
|
|
830
831
|
router: n,
|
|
831
|
-
settlementId:
|
|
832
|
-
settlementLabel:
|
|
833
|
-
addressId:
|
|
834
|
-
addressLabel:
|
|
835
|
-
settlementOptions:
|
|
836
|
-
addressOptions:
|
|
837
|
-
settlementLoading:
|
|
838
|
-
addressLoading:
|
|
839
|
-
manualAddress:
|
|
840
|
-
manualValue:
|
|
841
|
-
workTypeCode:
|
|
842
|
-
workTypeLabel:
|
|
843
|
-
description:
|
|
844
|
-
basis:
|
|
845
|
-
notes:
|
|
846
|
-
mapPoints:
|
|
847
|
-
importedGeom:
|
|
832
|
+
settlementId: o,
|
|
833
|
+
settlementLabel: s,
|
|
834
|
+
addressId: c,
|
|
835
|
+
addressLabel: l,
|
|
836
|
+
settlementOptions: u,
|
|
837
|
+
addressOptions: d,
|
|
838
|
+
settlementLoading: f,
|
|
839
|
+
addressLoading: p,
|
|
840
|
+
manualAddress: m,
|
|
841
|
+
manualValue: h,
|
|
842
|
+
workTypeCode: g,
|
|
843
|
+
workTypeLabel: _,
|
|
844
|
+
description: v,
|
|
845
|
+
basis: y,
|
|
846
|
+
notes: x,
|
|
847
|
+
mapPoints: S,
|
|
848
|
+
importedGeom: T,
|
|
848
849
|
importOpen: E,
|
|
849
850
|
addressPoint: O,
|
|
850
851
|
submitting: k,
|
|
@@ -862,7 +863,7 @@ var Xe = /*@__PURE__*/ P({
|
|
|
862
863
|
get RouterLink() {
|
|
863
864
|
return te;
|
|
864
865
|
},
|
|
865
|
-
AppIcon:
|
|
866
|
+
AppIcon: a,
|
|
866
867
|
FormSearchSelect: me,
|
|
867
868
|
FormSuggestSelect: De,
|
|
868
869
|
ApplicationCreateMap: Ie,
|