@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
|
@@ -4,16 +4,16 @@ import { s as r, t as i } from "./organizations-DbVDoURw.js";
|
|
|
4
4
|
import { t as a } from "./AppIcon-CO70tpMX.js";
|
|
5
5
|
import { t as o } from "./SurveyorTeleport-CnSF0Ptl.js";
|
|
6
6
|
import { c as s, t as c, u as l } from "./appealMapLayers-CQMK3rrz.js";
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { i as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { RouterLink as
|
|
7
|
+
import { t as u } from "./work_types-Hwme-FEX.js";
|
|
8
|
+
import { a as d, d as f, i as p, l as m, r as h, s as g, t as _, u as v } from "./mapLayersApi-CBLcbADa.js";
|
|
9
|
+
import { i as y, n as b } from "./geometry-DyhIVRcw.js";
|
|
10
|
+
import { t as x } from "./MapLayerMenu-AUeTqgEp.js";
|
|
11
|
+
import { t as S } from "./FormFilePicker-DxPQlxgy.js";
|
|
12
|
+
import { i as ee, r as C, s as w } from "./applications-D6pHAQaK.js";
|
|
13
|
+
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 P, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as L, onMounted as te, onUnmounted as ne, openBlock as R, ref as z, renderList as re, shallowRef as ie, toDisplayString as B, vModelText as V, watch as H, withCtx as U, withDirectives as W, withModifiers as G } from "vue";
|
|
14
|
+
import { RouterLink as K, useRouter as ae } from "vue-router";
|
|
15
15
|
//#region cabinet/src/pages/requests/components/FormSearchSelect.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
16
|
+
var q = /*@__PURE__*/ N({
|
|
17
17
|
__name: "FormSearchSelect",
|
|
18
18
|
props: {
|
|
19
19
|
label: {
|
|
@@ -52,7 +52,7 @@ var K = /*@__PURE__*/ M({
|
|
|
52
52
|
emits: ["update:modelValue"],
|
|
53
53
|
setup(e, { expose: t, emit: n }) {
|
|
54
54
|
t();
|
|
55
|
-
let r = e, i = n, s =
|
|
55
|
+
let r = e, i = n, s = z(!1), c = z(""), l = z(null), u = z(null), d = z(null), f = z(null), p = E(() => r.options.filter((e) => e.toLowerCase().includes(c.value.trim().toLowerCase()))), m = E(() => f.value ? r.openAbove ? {
|
|
56
56
|
left: `${f.value.left}px`,
|
|
57
57
|
width: `${f.value.width}px`,
|
|
58
58
|
bottom: `${window.innerHeight - f.value.top + 4}px`
|
|
@@ -73,19 +73,19 @@ var K = /*@__PURE__*/ M({
|
|
|
73
73
|
function v() {
|
|
74
74
|
r.disabled || (s.value = !s.value);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function y(e) {
|
|
77
77
|
i("update:modelValue", e), s.value = !1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function b(e) {
|
|
80
80
|
let t = e.target;
|
|
81
81
|
l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
_(), e && (c.value = "", h(), g(), await
|
|
85
|
-
}),
|
|
86
|
-
document.removeEventListener("mousedown",
|
|
83
|
+
H(s, async (e) => {
|
|
84
|
+
_(), e && (c.value = "", h(), g(), await P(), d.value?.focus());
|
|
85
|
+
}), te(() => document.addEventListener("mousedown", b)), L(() => {
|
|
86
|
+
document.removeEventListener("mousedown", b), _();
|
|
87
87
|
});
|
|
88
|
-
let
|
|
88
|
+
let x = {
|
|
89
89
|
props: r,
|
|
90
90
|
emit: i,
|
|
91
91
|
open: s,
|
|
@@ -100,61 +100,61 @@ var K = /*@__PURE__*/ M({
|
|
|
100
100
|
bindPositionListeners: g,
|
|
101
101
|
unbindPositionListeners: _,
|
|
102
102
|
toggle: v,
|
|
103
|
-
select:
|
|
104
|
-
onDocumentClick:
|
|
103
|
+
select: y,
|
|
104
|
+
onDocumentClick: b,
|
|
105
105
|
AppIcon: a,
|
|
106
106
|
SurveyorTeleport: o
|
|
107
107
|
};
|
|
108
|
-
return Object.defineProperty(
|
|
108
|
+
return Object.defineProperty(x, "__isScriptSetup", {
|
|
109
109
|
enumerable: !1,
|
|
110
110
|
value: !0
|
|
111
|
-
}),
|
|
111
|
+
}), x;
|
|
112
112
|
}
|
|
113
|
-
}),
|
|
113
|
+
}), oe = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, se = {
|
|
114
114
|
key: 0,
|
|
115
115
|
class: "text-red-400"
|
|
116
|
-
},
|
|
116
|
+
}, ce = {
|
|
117
117
|
ref: "rootRef",
|
|
118
118
|
class: "relative"
|
|
119
|
-
},
|
|
119
|
+
}, le = ["disabled"], ue = { class: "border-b border-gray-100 p-2" }, J = { class: "relative" }, de = { class: "max-h-48 overflow-y-auto" }, fe = {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
122
|
-
},
|
|
123
|
-
function
|
|
124
|
-
return
|
|
122
|
+
}, pe = ["onClick"];
|
|
123
|
+
function Y(e, t, n, r, i, a) {
|
|
124
|
+
return R(), k("div", null, [A("label", oe, [j(B(n.label) + " ", 1), n.required ? (R(), k("span", se, "*")) : O("", !0)]), A("div", ce, [A("button", {
|
|
125
125
|
type: "button",
|
|
126
126
|
disabled: n.disabled,
|
|
127
|
-
class:
|
|
127
|
+
class: F(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
|
|
128
128
|
onClick: r.toggle
|
|
129
|
-
}, [
|
|
129
|
+
}, [A("span", { class: F(n.modelValue ? "text-gray-900" : "text-gray-400") }, B(n.modelValue || n.placeholder), 3), M(r.AppIcon, {
|
|
130
130
|
name: "chevron-down",
|
|
131
|
-
class:
|
|
132
|
-
}, null, 8, ["class"])], 10,
|
|
133
|
-
default:
|
|
131
|
+
class: F(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
|
|
132
|
+
}, null, 8, ["class"])], 10, le), M(r.SurveyorTeleport, null, {
|
|
133
|
+
default: U(() => [r.open ? (R(), k("div", {
|
|
134
134
|
key: 0,
|
|
135
135
|
ref: "panelRef",
|
|
136
136
|
class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
|
|
137
|
-
style:
|
|
138
|
-
onMousedown: t[1] ||=
|
|
139
|
-
}, [
|
|
137
|
+
style: I(r.dropdownStyle),
|
|
138
|
+
onMousedown: t[1] ||= G(() => {}, ["stop"])
|
|
139
|
+
}, [A("div", ue, [A("div", J, [M(r.AppIcon, {
|
|
140
140
|
name: "search",
|
|
141
141
|
class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
|
|
142
|
-
}),
|
|
142
|
+
}), W(A("input", {
|
|
143
143
|
ref: "inputRef",
|
|
144
144
|
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
145
145
|
type: "text",
|
|
146
146
|
placeholder: "Пошук...",
|
|
147
147
|
class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
|
|
148
|
-
}, null, 512), [[
|
|
148
|
+
}, null, 512), [[V, r.query]])])]), A("div", de, [r.filtered.length === 0 ? (R(), k("p", fe, "Нічого не знайдено")) : O("", !0), (R(!0), k(T, null, re(r.filtered, (e) => (R(), k("button", {
|
|
149
149
|
key: e,
|
|
150
150
|
type: "button",
|
|
151
|
-
class:
|
|
151
|
+
class: F(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
|
|
152
152
|
onClick: (t) => r.select(e)
|
|
153
|
-
},
|
|
153
|
+
}, B(e), 11, pe))), 128))])], 36)) : O("", !0)]),
|
|
154
154
|
_: 1
|
|
155
155
|
})], 512)]);
|
|
156
156
|
}
|
|
157
|
-
var
|
|
157
|
+
var me = /*#__PURE__*/ e(q, [["render", Y], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSearchSelect.vue"]]), he = /*@__PURE__*/ N({
|
|
158
158
|
__name: "FormSuggestSelect",
|
|
159
159
|
props: {
|
|
160
160
|
label: {
|
|
@@ -202,10 +202,10 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
|
|
|
202
202
|
],
|
|
203
203
|
setup(e, { expose: t, emit: n }) {
|
|
204
204
|
t();
|
|
205
|
-
let r = e, i = n, s =
|
|
205
|
+
let r = e, i = n, s = z(!1), c = z(""), l = z(null), u = z(null), d = z(null), f = z(null), p = E(() => {
|
|
206
206
|
let e = c.value.trim().toLowerCase();
|
|
207
207
|
return e ? r.options.filter((t) => t.text.toLowerCase().includes(e)) : r.options;
|
|
208
|
-
}), m =
|
|
208
|
+
}), m = E(() => f.value ? {
|
|
209
209
|
left: `${f.value.left}px`,
|
|
210
210
|
width: `${f.value.width}px`,
|
|
211
211
|
top: `${f.value.bottom + 4}px`
|
|
@@ -222,22 +222,22 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
|
|
|
222
222
|
function v() {
|
|
223
223
|
r.disabled || (s.value = !s.value);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function y(e) {
|
|
226
226
|
i("update:modelValue", e.id), i("update:displayValue", e.text), i("select", e), s.value = !1;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function b(e) {
|
|
229
229
|
let t = e.target;
|
|
230
230
|
l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
|
|
231
231
|
}
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
s.value && (clearTimeout(
|
|
235
|
-
}),
|
|
236
|
-
_(), e && (c.value = "", h(), g(), i("search", ""), await
|
|
237
|
-
}),
|
|
238
|
-
document.removeEventListener("mousedown",
|
|
232
|
+
let x;
|
|
233
|
+
H(c, (e) => {
|
|
234
|
+
s.value && (clearTimeout(x), x = setTimeout(() => i("search", e.trim()), 280));
|
|
235
|
+
}), H(s, async (e) => {
|
|
236
|
+
_(), e && (c.value = "", h(), g(), i("search", ""), await P(), d.value?.focus());
|
|
237
|
+
}), te(() => document.addEventListener("mousedown", b)), L(() => {
|
|
238
|
+
document.removeEventListener("mousedown", b), _(), clearTimeout(x);
|
|
239
239
|
});
|
|
240
|
-
let
|
|
240
|
+
let S = {
|
|
241
241
|
props: r,
|
|
242
242
|
emit: i,
|
|
243
243
|
open: s,
|
|
@@ -252,70 +252,70 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
|
|
|
252
252
|
bindPositionListeners: g,
|
|
253
253
|
unbindPositionListeners: _,
|
|
254
254
|
toggle: v,
|
|
255
|
-
select:
|
|
256
|
-
onDocumentClick:
|
|
255
|
+
select: y,
|
|
256
|
+
onDocumentClick: b,
|
|
257
257
|
get searchTimer() {
|
|
258
|
-
return
|
|
258
|
+
return x;
|
|
259
259
|
},
|
|
260
260
|
set searchTimer(e) {
|
|
261
|
-
|
|
261
|
+
x = e;
|
|
262
262
|
},
|
|
263
263
|
AppIcon: a,
|
|
264
264
|
SurveyorTeleport: o
|
|
265
265
|
};
|
|
266
|
-
return Object.defineProperty(
|
|
266
|
+
return Object.defineProperty(S, "__isScriptSetup", {
|
|
267
267
|
enumerable: !1,
|
|
268
268
|
value: !0
|
|
269
|
-
}),
|
|
269
|
+
}), S;
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
271
|
+
}), ge = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, _e = {
|
|
272
272
|
key: 0,
|
|
273
273
|
class: "text-red-400"
|
|
274
|
-
},
|
|
274
|
+
}, ve = {
|
|
275
275
|
ref: "rootRef",
|
|
276
276
|
class: "relative"
|
|
277
|
-
},
|
|
277
|
+
}, ye = ["disabled"], X = { class: "border-b border-gray-100 p-2" }, be = { class: "relative" }, xe = { class: "max-h-48 overflow-y-auto" }, Se = {
|
|
278
278
|
key: 0,
|
|
279
279
|
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
280
|
-
},
|
|
280
|
+
}, Ce = {
|
|
281
281
|
key: 1,
|
|
282
282
|
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
283
283
|
}, we = ["onClick"];
|
|
284
284
|
function Te(e, t, n, r, i, a) {
|
|
285
|
-
return
|
|
285
|
+
return R(), k("div", null, [A("label", ge, [j(B(n.label) + " ", 1), n.required ? (R(), k("span", _e, "*")) : O("", !0)]), A("div", ve, [A("button", {
|
|
286
286
|
type: "button",
|
|
287
287
|
disabled: n.disabled,
|
|
288
|
-
class:
|
|
288
|
+
class: F(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
|
|
289
289
|
onClick: r.toggle
|
|
290
|
-
}, [
|
|
290
|
+
}, [A("span", { class: F(n.displayValue ? "text-gray-900" : "text-gray-400") }, B(n.displayValue || n.placeholder), 3), M(r.AppIcon, {
|
|
291
291
|
name: "chevron-down",
|
|
292
|
-
class:
|
|
293
|
-
}, null, 8, ["class"])], 10,
|
|
294
|
-
default:
|
|
292
|
+
class: F(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
|
|
293
|
+
}, null, 8, ["class"])], 10, ye), M(r.SurveyorTeleport, null, {
|
|
294
|
+
default: U(() => [r.open ? (R(), k("div", {
|
|
295
295
|
key: 0,
|
|
296
296
|
ref: "panelRef",
|
|
297
297
|
class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
|
|
298
|
-
style:
|
|
299
|
-
onMousedown: t[1] ||=
|
|
300
|
-
}, [
|
|
298
|
+
style: I(r.dropdownStyle),
|
|
299
|
+
onMousedown: t[1] ||= G(() => {}, ["stop"])
|
|
300
|
+
}, [A("div", X, [A("div", be, [M(r.AppIcon, {
|
|
301
301
|
name: "search",
|
|
302
302
|
class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
|
|
303
|
-
}),
|
|
303
|
+
}), W(A("input", {
|
|
304
304
|
ref: "inputRef",
|
|
305
305
|
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
306
306
|
type: "text",
|
|
307
307
|
placeholder: "Пошук...",
|
|
308
308
|
class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
|
|
309
|
-
}, null, 512), [[
|
|
309
|
+
}, null, 512), [[V, r.query]])])]), A("div", xe, [n.loading && r.filtered.length === 0 ? (R(), k("p", Se, "Завантаження…")) : r.filtered.length === 0 ? (R(), k("p", Ce, "Нічого не знайдено")) : O("", !0), (R(!0), k(T, null, re(r.filtered, (e) => (R(), k("button", {
|
|
310
310
|
key: e.id,
|
|
311
311
|
type: "button",
|
|
312
|
-
class:
|
|
312
|
+
class: F(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e.id ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
|
|
313
313
|
onClick: (t) => r.select(e)
|
|
314
|
-
},
|
|
314
|
+
}, B(e.text), 11, we))), 128))])], 36)) : O("", !0)]),
|
|
315
315
|
_: 1
|
|
316
316
|
})], 512)]);
|
|
317
317
|
}
|
|
318
|
-
var Ee = /*#__PURE__*/ e(
|
|
318
|
+
var Ee = /*#__PURE__*/ e(he, [["render", Te], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSuggestSelect.vue"]]), Z = "draft-polygon", De = "draft-polygon-fill", Oe = "draft-polygon-line", Q = "draft-vertices", ke = "draft-vertices-layer", $ = "draft-vertices-hit", Ae = 12, je = 17, Me = 13, Ne = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>", Pe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 20h9\"/><path d=\"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z\"/></svg>", Fe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/><path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/><path d=\"M10 11v6\"/><path d=\"M14 11v6\"/></svg>", Ie = /*@__PURE__*/ N({
|
|
319
319
|
__name: "ApplicationCreateMap",
|
|
320
320
|
props: {
|
|
321
321
|
points: {
|
|
@@ -338,22 +338,22 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
338
338
|
],
|
|
339
339
|
setup(e, { expose: t, emit: n }) {
|
|
340
340
|
t();
|
|
341
|
-
let r = e, i = n, a = [24.0297, 49.8397], o =
|
|
342
|
-
function
|
|
341
|
+
let r = e, i = n, a = [24.0297, 49.8397], o = z(null), u = ie(null), S = ie(null), ee = z(""), C = z(!1), w = null, T = z(c), D = z([]), O = z(s), k = z([]), A = null, j = null, M = !1, N = !1, P = !1, F = !1, I = null, L = null, R = !1, re = E(() => C.value ? "Перетягніть вершину. Клік по лінії додає точку, права кнопка на вершині видаляє її" : r.geometry ? "Геометрію імпортовано. Олівець — редагувати, кошик — видалити, клік — намалювати наново" : r.points.length > 0 ? "Клік додає точку. Олівець — редагувати контур, кошик — видалити" : "Клікніть на карті, щоб окреслити контур (мінімум 3 точки)");
|
|
342
|
+
function B() {
|
|
343
343
|
return !!r.geometry || r.points.length > 0;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
return
|
|
347
|
-
}
|
|
348
|
-
async function H() {
|
|
349
|
-
let e = await g("application-form");
|
|
350
|
-
w.value = e.baseLayers, D.value = e.defaultBaseId, E.value = e.overlays.filter((e) => e.kind !== "applications"), O.value = E.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
345
|
+
function V(e) {
|
|
346
|
+
return T.value.find((t) => t.id === e) ?? T.value[0] ?? c[0];
|
|
351
347
|
}
|
|
352
|
-
function U(
|
|
353
|
-
let
|
|
354
|
-
O.value =
|
|
348
|
+
async function U() {
|
|
349
|
+
let e = await _("application-form");
|
|
350
|
+
T.value = e.baseLayers, O.value = e.defaultBaseId, D.value = e.overlays.filter((e) => e.kind !== "applications"), k.value = D.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
355
351
|
}
|
|
356
352
|
function W(e) {
|
|
353
|
+
let t = k.value;
|
|
354
|
+
k.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
355
|
+
}
|
|
356
|
+
function G(e) {
|
|
357
357
|
let t = [];
|
|
358
358
|
for (let n of e) {
|
|
359
359
|
if (!Array.isArray(n) || n.length < 2) continue;
|
|
@@ -366,33 +366,33 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
366
366
|
}
|
|
367
367
|
return t;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
return
|
|
369
|
+
function K() {
|
|
370
|
+
return j || (r.geometry ? G(r.geometry.coordinates[0] ?? []) : r.points);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ae(e) {
|
|
373
373
|
let t = e.map(([e, t]) => [e, t]);
|
|
374
374
|
if (t.length === 0) return t;
|
|
375
375
|
let [n, r] = t[0], [i, a] = t[t.length - 1];
|
|
376
376
|
return (n !== i || r !== a) && t.push([n, r]), t;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function q(e) {
|
|
379
379
|
let t = r.geometry;
|
|
380
380
|
if (t && e.length >= 3) {
|
|
381
|
-
|
|
381
|
+
P = !0, i("update:geometry", {
|
|
382
382
|
type: "Polygon",
|
|
383
|
-
coordinates: [
|
|
383
|
+
coordinates: [ae(e), ...t.coordinates.slice(1)]
|
|
384
384
|
});
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
387
|
t && i("update:geometry", null), i("update:points", e);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
|
|
389
|
+
function oe() {
|
|
390
|
+
C.value = !1, i("update:points", []), r.geometry && i("update:geometry", null);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
|
|
392
|
+
function se() {
|
|
393
|
+
B() && (C.value = !C.value);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function ce(e, t) {
|
|
396
396
|
let n = [];
|
|
397
397
|
return e.length >= 2 && n.push({
|
|
398
398
|
type: "Feature",
|
|
@@ -405,17 +405,17 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
405
405
|
type: "Feature",
|
|
406
406
|
geometry: {
|
|
407
407
|
type: "Polygon",
|
|
408
|
-
coordinates: [
|
|
408
|
+
coordinates: [ae(e), ...t]
|
|
409
409
|
},
|
|
410
410
|
properties: {}
|
|
411
411
|
}), n;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
if (
|
|
413
|
+
function le() {
|
|
414
|
+
if (j) {
|
|
415
415
|
let e = r.geometry?.coordinates.slice(1) ?? [];
|
|
416
416
|
return {
|
|
417
417
|
type: "FeatureCollection",
|
|
418
|
-
features:
|
|
418
|
+
features: ce(j, e)
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
421
|
return r.geometry ? {
|
|
@@ -427,13 +427,13 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
427
427
|
}]
|
|
428
428
|
} : {
|
|
429
429
|
type: "FeatureCollection",
|
|
430
|
-
features:
|
|
430
|
+
features: ce(r.points, [])
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function ue() {
|
|
434
434
|
return {
|
|
435
435
|
type: "FeatureCollection",
|
|
436
|
-
features: (!
|
|
436
|
+
features: (!C.value && r.geometry ? [] : K()).map(([e, t], n) => ({
|
|
437
437
|
type: "Feature",
|
|
438
438
|
geometry: {
|
|
439
439
|
type: "Point",
|
|
@@ -443,53 +443,53 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
443
443
|
}))
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
e.getSource(Z)?.setData(
|
|
446
|
+
function J(e) {
|
|
447
|
+
e.getSource(Z)?.setData(le()), e.getSource(Q)?.setData(ue());
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function de(e) {
|
|
450
450
|
let t = e.features?.[0]?.properties?.index, n = typeof t == "number" ? t : Number(t);
|
|
451
451
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
if (!
|
|
453
|
+
function fe(e) {
|
|
454
|
+
if (!C.value) return;
|
|
455
455
|
let t = e.originalEvent;
|
|
456
456
|
if (t && "button" in t && t.button !== 0) return;
|
|
457
|
-
let n =
|
|
458
|
-
n == null || !r || n >= i.length || (e.preventDefault(),
|
|
457
|
+
let n = de(e), r = u.value, i = K();
|
|
458
|
+
n == null || !r || n >= i.length || (e.preventDefault(), A = n, M = !1, j = i.map(([e, t]) => [e, t]), N = !0, r.dragPan.disable(), r.getCanvas().style.cursor = "grabbing", window.addEventListener("mouseup", Y));
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
if (
|
|
462
|
-
let { lng: t, lat: n } = e.lngLat, r = A
|
|
460
|
+
function pe(e) {
|
|
461
|
+
if (A == null || !j) return;
|
|
462
|
+
let { lng: t, lat: n } = e.lngLat, r = j[A];
|
|
463
463
|
if (r[0] === t && r[1] === n) return;
|
|
464
|
-
|
|
465
|
-
let i =
|
|
466
|
-
i &&
|
|
464
|
+
M = !0, j[A] = [t, n];
|
|
465
|
+
let i = u.value;
|
|
466
|
+
i && J(i);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
if (window.removeEventListener("mouseup",
|
|
470
|
-
|
|
468
|
+
function Y() {
|
|
469
|
+
if (window.removeEventListener("mouseup", Y), A == null || R) {
|
|
470
|
+
A = null, j = null, M = !1;
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
473
|
-
let e =
|
|
473
|
+
let e = u.value;
|
|
474
474
|
e?.dragPan.enable();
|
|
475
|
-
let t =
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
let t = j, n = M;
|
|
476
|
+
A = null, j = null, M = !1, e && (e.getCanvas().style.cursor = "", n || J(e)), t && n && q(t), window.setTimeout(() => {
|
|
477
|
+
N = !1;
|
|
478
478
|
}, 0);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
if (!
|
|
480
|
+
function me(e) {
|
|
481
|
+
if (!C.value) return;
|
|
482
482
|
e.preventDefault();
|
|
483
|
-
let t =
|
|
484
|
-
t != null && K(
|
|
483
|
+
let t = de(e);
|
|
484
|
+
t != null && q(K().filter((e, n) => n !== t));
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function he(e, t, n) {
|
|
487
487
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
488
488
|
if (a === 0) return Math.hypot(e.x - t.x, e.y - t.y);
|
|
489
489
|
let o = Math.max(0, Math.min(1, ((e.x - t.x) * r + (e.y - t.y) * i) / a));
|
|
490
490
|
return Math.hypot(e.x - (t.x + o * r), e.y - (t.y + o * i));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function ge(e, t, n, r) {
|
|
493
493
|
let i = e.project([n, r]);
|
|
494
494
|
for (let n of t) {
|
|
495
495
|
let t = e.project(n);
|
|
@@ -497,27 +497,27 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
497
497
|
}
|
|
498
498
|
let a = Ae, o = -1, s = t.length >= 3 ? t.length : t.length - 1;
|
|
499
499
|
for (let n = 0; n < s; n += 1) {
|
|
500
|
-
let r =
|
|
500
|
+
let r = he(i, e.project(t[n]), e.project(t[(n + 1) % t.length]));
|
|
501
501
|
r <= a && (a = r, o = n);
|
|
502
502
|
}
|
|
503
503
|
if (o < 0) return null;
|
|
504
504
|
let c = t.map(([e, t]) => [e, t]);
|
|
505
505
|
return c.splice(o + 1, 0, [n, r]), c;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
|
|
509
|
-
let e =
|
|
510
|
-
e &&
|
|
507
|
+
function _e(e) {
|
|
508
|
+
F || (F = !0, e.on("mousedown", $, (e) => fe(e)), e.on("contextmenu", $, (e) => me(e)), e.on("mousemove", (e) => pe(e)), e.on("mouseenter", $, () => {
|
|
509
|
+
let e = u.value;
|
|
510
|
+
e && C.value && A == null && (e.getCanvas().style.cursor = "grab");
|
|
511
511
|
}), e.on("mouseleave", $, () => {
|
|
512
|
-
if (
|
|
513
|
-
let e =
|
|
512
|
+
if (A != null) return;
|
|
513
|
+
let e = u.value;
|
|
514
514
|
e && (e.getCanvas().style.cursor = "");
|
|
515
515
|
}));
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ve(e) {
|
|
518
518
|
e.getSource(Z) || (e.addSource(Z, {
|
|
519
519
|
type: "geojson",
|
|
520
|
-
data:
|
|
520
|
+
data: le()
|
|
521
521
|
}), e.addLayer({
|
|
522
522
|
id: De,
|
|
523
523
|
type: "fill",
|
|
@@ -541,16 +541,16 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
541
541
|
}
|
|
542
542
|
})), e.getSource(Q) || (e.addSource(Q, {
|
|
543
543
|
type: "geojson",
|
|
544
|
-
data:
|
|
544
|
+
data: ue()
|
|
545
545
|
}), e.addLayer({
|
|
546
546
|
id: ke,
|
|
547
547
|
type: "circle",
|
|
548
548
|
source: Q,
|
|
549
549
|
paint: {
|
|
550
|
-
"circle-radius":
|
|
550
|
+
"circle-radius": C.value ? 7 : 5,
|
|
551
551
|
"circle-color": "#ffffff",
|
|
552
552
|
"circle-stroke-color": "#2663EB",
|
|
553
|
-
"circle-stroke-width":
|
|
553
|
+
"circle-stroke-width": C.value ? 3 : 2
|
|
554
554
|
}
|
|
555
555
|
}), e.addLayer({
|
|
556
556
|
id: $,
|
|
@@ -561,30 +561,30 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
561
561
|
"circle-color": "#000000",
|
|
562
562
|
"circle-opacity": 0
|
|
563
563
|
}
|
|
564
|
-
})),
|
|
564
|
+
})), _e(e), J(e);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
if (
|
|
568
|
-
|
|
566
|
+
function ye(e) {
|
|
567
|
+
if (N) {
|
|
568
|
+
N = !1;
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
if (
|
|
572
|
-
let t =
|
|
571
|
+
if (C.value) {
|
|
572
|
+
let t = u.value, n = K();
|
|
573
573
|
if (!t || n.length < 2) return;
|
|
574
|
-
let r =
|
|
575
|
-
r &&
|
|
574
|
+
let r = ge(t, n, e.lngLat.lng, e.lngLat.lat);
|
|
575
|
+
r && q(r);
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
578
|
let t = [e.lngLat.lng, e.lngLat.lat];
|
|
579
579
|
i("update:points", r.geometry ? [t] : [...r.points, t]);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function X(e, t, n) {
|
|
582
582
|
let r = document.createElement("button");
|
|
583
583
|
return r.type = "button", r.title = e, r.setAttribute("aria-label", e), r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "center", r.style.color = "#334155", r.innerHTML = t, r.addEventListener("click", (e) => {
|
|
584
584
|
e.preventDefault(), e.stopPropagation(), !r.disabled && n();
|
|
585
585
|
}), r;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function be(e) {
|
|
588
588
|
let t = document.createElement("div");
|
|
589
589
|
t.className = "maplibregl-ctrl maplibregl-ctrl-group";
|
|
590
590
|
for (let n of e) t.appendChild(n);
|
|
@@ -597,7 +597,7 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
597
597
|
}
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function xe(e) {
|
|
601
601
|
e.flyTo({
|
|
602
602
|
center: a,
|
|
603
603
|
zoom: Me,
|
|
@@ -607,28 +607,28 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
607
607
|
essential: !0
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Se(e) {
|
|
611
611
|
let t = o.value?.querySelector(".maplibregl-ctrl-compass");
|
|
612
612
|
if (!t) return;
|
|
613
613
|
let n = "Повернути початковий вигляд";
|
|
614
614
|
t.title = n, t.setAttribute("aria-label", n), t.addEventListener("click", (t) => {
|
|
615
|
-
t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(),
|
|
615
|
+
t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), xe(e);
|
|
616
616
|
}, !0);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
let e =
|
|
620
|
-
if (
|
|
621
|
-
let t = e &&
|
|
622
|
-
|
|
618
|
+
function Ce() {
|
|
619
|
+
let e = B();
|
|
620
|
+
if (I) {
|
|
621
|
+
let t = e && C.value;
|
|
622
|
+
I.disabled = !e, I.style.opacity = e ? "1" : "0.4", I.style.backgroundColor = t ? "#2663EB" : "", I.style.color = t ? "#ffffff" : "#334155";
|
|
623
623
|
let n = t ? "Завершити редагування" : "Редагувати контур";
|
|
624
|
-
|
|
624
|
+
I.title = n, I.setAttribute("aria-label", n), I.setAttribute("aria-pressed", t ? "true" : "false");
|
|
625
625
|
}
|
|
626
|
-
|
|
626
|
+
L && (L.disabled = !e, L.style.opacity = e ? "1" : "0.4");
|
|
627
627
|
}
|
|
628
628
|
function we(e) {
|
|
629
|
-
let t =
|
|
629
|
+
let t = y(r.geometry);
|
|
630
630
|
if (!t) return !1;
|
|
631
|
-
let [[n, i], [a, o]] =
|
|
631
|
+
let [[n, i], [a, o]] = b(t);
|
|
632
632
|
if (![
|
|
633
633
|
n,
|
|
634
634
|
i,
|
|
@@ -652,12 +652,12 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
652
652
|
}), !0);
|
|
653
653
|
}
|
|
654
654
|
function Te(e) {
|
|
655
|
-
if (!
|
|
655
|
+
if (!R && u.value === e && r.geometry) {
|
|
656
656
|
if (!e.getSource(Z)) {
|
|
657
657
|
e.once("load", () => Te(e));
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
|
-
|
|
660
|
+
J(e), we(e) || requestAnimationFrame(() => we(e));
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
function Ee() {
|
|
@@ -666,11 +666,11 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
666
666
|
}
|
|
667
667
|
function Ie(e) {
|
|
668
668
|
let t = r.addressPoint;
|
|
669
|
-
if (!t || !
|
|
670
|
-
|
|
669
|
+
if (!t || !w) {
|
|
670
|
+
S.value?.remove(), S.value = null;
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
|
-
|
|
673
|
+
S.value ? S.value.setLngLat(t) : S.value = new w.Marker({
|
|
674
674
|
element: Ee(),
|
|
675
675
|
anchor: "bottom"
|
|
676
676
|
}).setLngLat(t).addTo(e), e.flyTo({
|
|
@@ -679,54 +679,54 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
679
679
|
essential: !0
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
te(async () => {
|
|
683
683
|
let e;
|
|
684
684
|
try {
|
|
685
|
-
let [t] = await Promise.all([
|
|
685
|
+
let [t] = await Promise.all([f(), U()]);
|
|
686
686
|
e = t;
|
|
687
687
|
} catch (e) {
|
|
688
|
-
console.error(e),
|
|
688
|
+
console.error(e), ee.value = m;
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
-
if (
|
|
692
|
-
|
|
691
|
+
if (R || !o.value) return;
|
|
692
|
+
w = e;
|
|
693
693
|
let t = new e.Map({
|
|
694
694
|
container: o.value,
|
|
695
|
-
style: l(
|
|
695
|
+
style: l(V(O.value)),
|
|
696
696
|
center: a,
|
|
697
697
|
zoom: Me,
|
|
698
698
|
attributionControl: !1,
|
|
699
|
-
locale:
|
|
699
|
+
locale: v
|
|
700
700
|
});
|
|
701
|
-
t.addControl(new e.NavigationControl({ showCompass: !0 }), "top-left"),
|
|
702
|
-
|
|
703
|
-
}), t.on("click", (e) =>
|
|
704
|
-
}),
|
|
705
|
-
|
|
706
|
-
}),
|
|
707
|
-
|
|
708
|
-
let e =
|
|
709
|
-
e?.getSource(Z) &&
|
|
710
|
-
}, { deep: !0 }),
|
|
711
|
-
let e =
|
|
712
|
-
e?.getLayer(ke) && (e.setPaintProperty(ke, "circle-radius",
|
|
713
|
-
}),
|
|
714
|
-
if (
|
|
715
|
-
|
|
701
|
+
t.addControl(new e.NavigationControl({ showCompass: !0 }), "top-left"), Se(t), t.addControl(be([X("Імпортувати геометрію", Ne, () => i("import"))]), "top-left"), I = X("Редагувати контур", Pe, se), L = X("Видалити контур", Fe, oe), t.addControl(be([I, L]), "top-left"), Ce(), t.on("load", () => {
|
|
702
|
+
ve(t), g(t, D.value, k.value, De), Ie(t);
|
|
703
|
+
}), t.on("click", (e) => ye(e)), u.value = t;
|
|
704
|
+
}), ne(() => {
|
|
705
|
+
R = !0, window.removeEventListener("mouseup", Y), S.value?.remove(), S.value = null, u.value?.remove(), u.value = null, I = null, L = null;
|
|
706
|
+
}), H(() => [r.points, r.geometry], () => {
|
|
707
|
+
C.value && !B() && (C.value = !1);
|
|
708
|
+
let e = u.value;
|
|
709
|
+
e?.getSource(Z) && J(e), Ce();
|
|
710
|
+
}, { deep: !0 }), H(C, () => {
|
|
711
|
+
let e = u.value;
|
|
712
|
+
e?.getLayer(ke) && (e.setPaintProperty(ke, "circle-radius", C.value ? 7 : 5), e.setPaintProperty(ke, "circle-stroke-width", C.value ? 3 : 2), J(e)), e && (C.value ? e.doubleClickZoom.disable() : e.doubleClickZoom.enable(), C.value || (e.getCanvas().style.cursor = "")), Ce();
|
|
713
|
+
}), H(() => r.geometry, () => {
|
|
714
|
+
if (P) {
|
|
715
|
+
P = !1;
|
|
716
716
|
return;
|
|
717
717
|
}
|
|
718
|
-
let e =
|
|
718
|
+
let e = u.value;
|
|
719
719
|
e && r.geometry && Te(e);
|
|
720
|
-
}, { flush: "post" }),
|
|
721
|
-
let e =
|
|
720
|
+
}, { flush: "post" }), H(O, () => {
|
|
721
|
+
let e = u.value;
|
|
722
722
|
if (!e) return;
|
|
723
|
-
let t = () =>
|
|
723
|
+
let t = () => d(e, V(O.value), p(e, D.value, [De]));
|
|
724
724
|
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
725
|
-
}),
|
|
726
|
-
let e =
|
|
727
|
-
e?.isStyleLoaded() &&
|
|
728
|
-
}),
|
|
729
|
-
let e =
|
|
725
|
+
}), H(k, () => {
|
|
726
|
+
let e = u.value;
|
|
727
|
+
e?.isStyleLoaded() && h(e, D.value, k.value);
|
|
728
|
+
}), H(() => r.addressPoint, () => {
|
|
729
|
+
let e = u.value;
|
|
730
730
|
e?.isStyleLoaded() && Ie(e);
|
|
731
731
|
});
|
|
732
732
|
let Le = {
|
|
@@ -746,109 +746,109 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
746
746
|
EDIT_ICON: Pe,
|
|
747
747
|
DELETE_ICON: Fe,
|
|
748
748
|
mapHost: o,
|
|
749
|
-
mapRef:
|
|
750
|
-
addressMarker:
|
|
751
|
-
mapLoadError:
|
|
752
|
-
editing:
|
|
749
|
+
mapRef: u,
|
|
750
|
+
addressMarker: S,
|
|
751
|
+
mapLoadError: ee,
|
|
752
|
+
editing: C,
|
|
753
753
|
get maplibre() {
|
|
754
|
-
return
|
|
754
|
+
return w;
|
|
755
755
|
},
|
|
756
756
|
set maplibre(e) {
|
|
757
|
-
|
|
757
|
+
w = e;
|
|
758
758
|
},
|
|
759
|
-
baseLayers:
|
|
760
|
-
overlayLayers:
|
|
761
|
-
activeBaseId:
|
|
762
|
-
activeOverlayIds:
|
|
759
|
+
baseLayers: T,
|
|
760
|
+
overlayLayers: D,
|
|
761
|
+
activeBaseId: O,
|
|
762
|
+
activeOverlayIds: k,
|
|
763
763
|
get dragIndex() {
|
|
764
|
-
return
|
|
764
|
+
return A;
|
|
765
765
|
},
|
|
766
766
|
set dragIndex(e) {
|
|
767
|
-
|
|
767
|
+
A = e;
|
|
768
768
|
},
|
|
769
769
|
get dragPoints() {
|
|
770
|
-
return
|
|
770
|
+
return j;
|
|
771
771
|
},
|
|
772
772
|
set dragPoints(e) {
|
|
773
|
-
|
|
773
|
+
j = e;
|
|
774
774
|
},
|
|
775
775
|
get dragMoved() {
|
|
776
|
-
return
|
|
776
|
+
return M;
|
|
777
777
|
},
|
|
778
778
|
set dragMoved(e) {
|
|
779
|
-
|
|
779
|
+
M = e;
|
|
780
780
|
},
|
|
781
781
|
get suppressClick() {
|
|
782
|
-
return
|
|
782
|
+
return N;
|
|
783
783
|
},
|
|
784
784
|
set suppressClick(e) {
|
|
785
|
-
|
|
785
|
+
N = e;
|
|
786
786
|
},
|
|
787
787
|
get skipGeometryFocus() {
|
|
788
|
-
return
|
|
788
|
+
return P;
|
|
789
789
|
},
|
|
790
790
|
set skipGeometryFocus(e) {
|
|
791
|
-
|
|
791
|
+
P = e;
|
|
792
792
|
},
|
|
793
793
|
get vertexHandlersBound() {
|
|
794
|
-
return
|
|
794
|
+
return F;
|
|
795
795
|
},
|
|
796
796
|
set vertexHandlersBound(e) {
|
|
797
|
-
|
|
797
|
+
F = e;
|
|
798
798
|
},
|
|
799
799
|
get editButton() {
|
|
800
|
-
return
|
|
800
|
+
return I;
|
|
801
801
|
},
|
|
802
802
|
set editButton(e) {
|
|
803
|
-
|
|
803
|
+
I = e;
|
|
804
804
|
},
|
|
805
805
|
get deleteButton() {
|
|
806
|
-
return
|
|
806
|
+
return L;
|
|
807
807
|
},
|
|
808
808
|
set deleteButton(e) {
|
|
809
|
-
|
|
809
|
+
L = e;
|
|
810
810
|
},
|
|
811
811
|
get disposed() {
|
|
812
|
-
return
|
|
812
|
+
return R;
|
|
813
813
|
},
|
|
814
814
|
set disposed(e) {
|
|
815
|
-
|
|
815
|
+
R = e;
|
|
816
816
|
},
|
|
817
|
-
hint:
|
|
818
|
-
hasContour:
|
|
819
|
-
baseLayer:
|
|
820
|
-
loadLayerSettings:
|
|
821
|
-
toggleOverlay:
|
|
822
|
-
ringVertices:
|
|
823
|
-
contourPoints:
|
|
824
|
-
closeRing:
|
|
825
|
-
commitContour:
|
|
826
|
-
clearContour:
|
|
827
|
-
toggleEditing:
|
|
828
|
-
draftFeatures:
|
|
829
|
-
draftGeoJson:
|
|
830
|
-
verticesGeoJson:
|
|
831
|
-
refreshSources:
|
|
832
|
-
vertexIndex:
|
|
833
|
-
beginVertexDrag:
|
|
834
|
-
moveVertex:
|
|
835
|
-
endVertexDrag:
|
|
836
|
-
onVertexContextMenu:
|
|
837
|
-
pointSegmentDistance:
|
|
838
|
-
insertOnNearestSegment:
|
|
839
|
-
bindVertexHandlers:
|
|
840
|
-
ensureLayers:
|
|
841
|
-
onMapClick:
|
|
842
|
-
iconButton:
|
|
843
|
-
controlGroup:
|
|
844
|
-
resetInitialView:
|
|
845
|
-
bindInitialViewButton:
|
|
846
|
-
syncContourButtons:
|
|
817
|
+
hint: re,
|
|
818
|
+
hasContour: B,
|
|
819
|
+
baseLayer: V,
|
|
820
|
+
loadLayerSettings: U,
|
|
821
|
+
toggleOverlay: W,
|
|
822
|
+
ringVertices: G,
|
|
823
|
+
contourPoints: K,
|
|
824
|
+
closeRing: ae,
|
|
825
|
+
commitContour: q,
|
|
826
|
+
clearContour: oe,
|
|
827
|
+
toggleEditing: se,
|
|
828
|
+
draftFeatures: ce,
|
|
829
|
+
draftGeoJson: le,
|
|
830
|
+
verticesGeoJson: ue,
|
|
831
|
+
refreshSources: J,
|
|
832
|
+
vertexIndex: de,
|
|
833
|
+
beginVertexDrag: fe,
|
|
834
|
+
moveVertex: pe,
|
|
835
|
+
endVertexDrag: Y,
|
|
836
|
+
onVertexContextMenu: me,
|
|
837
|
+
pointSegmentDistance: he,
|
|
838
|
+
insertOnNearestSegment: ge,
|
|
839
|
+
bindVertexHandlers: _e,
|
|
840
|
+
ensureLayers: ve,
|
|
841
|
+
onMapClick: ye,
|
|
842
|
+
iconButton: X,
|
|
843
|
+
controlGroup: be,
|
|
844
|
+
resetInitialView: xe,
|
|
845
|
+
bindInitialViewButton: Se,
|
|
846
|
+
syncContourButtons: Ce,
|
|
847
847
|
focusImportedGeometry: we,
|
|
848
848
|
showImportedGeometry: Te,
|
|
849
849
|
addressMarkerElement: Ee,
|
|
850
850
|
syncAddressPoint: Ie,
|
|
851
|
-
MapLayerMenu:
|
|
851
|
+
MapLayerMenu: x
|
|
852
852
|
};
|
|
853
853
|
return Object.defineProperty(Le, "__isScriptSetup", {
|
|
854
854
|
enumerable: !1,
|
|
@@ -863,9 +863,9 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
|
|
|
863
863
|
class: "absolute inset-0 z-[20] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
864
864
|
}, Be = { class: "absolute bottom-3 left-3 z-[10] max-w-[calc(100%-1.5rem)] rounded-lg border border-gray-100 bg-white/90 px-2.5 py-1.5 text-xs text-gray-500 shadow backdrop-blur-sm" };
|
|
865
865
|
function Ve(e, t, n, r, i, a) {
|
|
866
|
-
return
|
|
867
|
-
|
|
868
|
-
r.mapLoadError ?
|
|
866
|
+
return R(), k("div", Le, [
|
|
867
|
+
A("div", Re, null, 512),
|
|
868
|
+
r.mapLoadError ? O("", !0) : (R(), D(r.MapLayerMenu, {
|
|
869
869
|
key: 0,
|
|
870
870
|
placement: "end",
|
|
871
871
|
"base-id": r.activeBaseId,
|
|
@@ -880,16 +880,16 @@ function Ve(e, t, n, r, i, a) {
|
|
|
880
880
|
"base-layers",
|
|
881
881
|
"overlays"
|
|
882
882
|
])),
|
|
883
|
-
r.mapLoadError ? (
|
|
884
|
-
|
|
883
|
+
r.mapLoadError ? (R(), k("p", ze, B(r.mapLoadError), 1)) : O("", !0),
|
|
884
|
+
A("div", Be, B(r.hint), 1)
|
|
885
885
|
]);
|
|
886
886
|
}
|
|
887
|
-
var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Ue = /*@__PURE__*/
|
|
887
|
+
var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Ue = /*@__PURE__*/ N({
|
|
888
888
|
__name: "GeometryImportDialog",
|
|
889
889
|
emits: ["close", "imported"],
|
|
890
890
|
setup(e, { expose: t, emit: n }) {
|
|
891
891
|
t();
|
|
892
|
-
let r = n, i =
|
|
892
|
+
let r = n, i = z(null), s = z(!1), c = z("");
|
|
893
893
|
function l(e) {
|
|
894
894
|
i.value = e, c.value = "";
|
|
895
895
|
}
|
|
@@ -897,7 +897,7 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
|
|
|
897
897
|
if (i.value && !s.value) {
|
|
898
898
|
c.value = "", s.value = !0;
|
|
899
899
|
try {
|
|
900
|
-
let e = await
|
|
900
|
+
let e = await w(i.value);
|
|
901
901
|
r("imported", e);
|
|
902
902
|
} catch (e) {
|
|
903
903
|
c.value = e instanceof Error ? e.message : "Не вдалося імпортувати геометрію";
|
|
@@ -915,7 +915,7 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
|
|
|
915
915
|
submit: u,
|
|
916
916
|
AppIcon: a,
|
|
917
917
|
SurveyorTeleport: o,
|
|
918
|
-
FormFilePicker:
|
|
918
|
+
FormFilePicker: S
|
|
919
919
|
};
|
|
920
920
|
return Object.defineProperty(d, "__isScriptSetup", {
|
|
921
921
|
enumerable: !1,
|
|
@@ -931,44 +931,44 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
|
|
|
931
931
|
class: "rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
|
|
932
932
|
}, Ye = { class: "flex items-center justify-end gap-2" }, Xe = ["disabled"];
|
|
933
933
|
function Ze(e, t, n, r, i, a) {
|
|
934
|
-
return
|
|
935
|
-
default:
|
|
934
|
+
return R(), D(r.SurveyorTeleport, null, {
|
|
935
|
+
default: U(() => [A("div", {
|
|
936
936
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm",
|
|
937
|
-
onMousedown: t[2] ||=
|
|
938
|
-
}, [
|
|
937
|
+
onMousedown: t[2] ||= G((e) => r.emit("close"), ["self"])
|
|
938
|
+
}, [A("div", We, [A("div", Ge, [A("div", Ke, [A("div", qe, [M(r.AppIcon, {
|
|
939
939
|
name: "upload",
|
|
940
940
|
class: "h-[17px] w-[17px] text-[#2663EB]"
|
|
941
|
-
})]), t[3] ||=
|
|
941
|
+
})]), t[3] ||= A("div", null, [A("h2", {
|
|
942
942
|
id: "geometry-import-title",
|
|
943
943
|
class: "text-base font-semibold text-gray-900"
|
|
944
|
-
}, "Імпорт геометрії"),
|
|
944
|
+
}, "Імпорт геометрії"), A("p", { class: "mt-0.5 text-xs text-gray-500" }, "ZIP (Shapefile) або GeoJSON")], -1)]), A("button", {
|
|
945
945
|
type: "button",
|
|
946
946
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
|
|
947
947
|
"aria-label": "Закрити",
|
|
948
948
|
onClick: t[0] ||= (e) => r.emit("close")
|
|
949
|
-
}, [
|
|
949
|
+
}, [M(r.AppIcon, {
|
|
950
950
|
name: "x",
|
|
951
951
|
class: "h-[17px] w-[17px]"
|
|
952
|
-
})])]),
|
|
952
|
+
})])]), A("form", {
|
|
953
953
|
class: "space-y-4 px-6 py-5",
|
|
954
|
-
onSubmit:
|
|
954
|
+
onSubmit: G(r.submit, ["prevent"])
|
|
955
955
|
}, [
|
|
956
|
-
|
|
956
|
+
M(r.FormFilePicker, {
|
|
957
957
|
"file-name": r.file?.name,
|
|
958
958
|
accept: ".zip,.geojson,.json,application/geo+json,application/zip",
|
|
959
959
|
"button-label": "Завантажити файл",
|
|
960
960
|
onChange: r.onFileChange
|
|
961
961
|
}, null, 8, ["file-name"]),
|
|
962
|
-
r.error ? (
|
|
963
|
-
|
|
962
|
+
r.error ? (R(), k("p", Je, B(r.error), 1)) : O("", !0),
|
|
963
|
+
A("div", Ye, [A("button", {
|
|
964
964
|
type: "button",
|
|
965
965
|
class: "rounded-xl bg-gray-100 px-4 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
|
|
966
966
|
onClick: t[1] ||= (e) => r.emit("close")
|
|
967
|
-
}, " Скасувати "),
|
|
967
|
+
}, " Скасувати "), A("button", {
|
|
968
968
|
type: "submit",
|
|
969
969
|
class: "rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40",
|
|
970
970
|
disabled: !r.file || r.importing
|
|
971
|
-
},
|
|
971
|
+
}, B(r.importing ? "Імпортування…" : "Імпортувати"), 9, Xe)])
|
|
972
972
|
], 32)])], 32)]),
|
|
973
973
|
_: 1
|
|
974
974
|
});
|
|
@@ -983,93 +983,93 @@ async function tt(e, r, i) {
|
|
|
983
983
|
}
|
|
984
984
|
//#endregion
|
|
985
985
|
//#region cabinet/src/pages/requests/create.vue?vue&type=script&setup=true&lang.ts
|
|
986
|
-
var nt = /*@__PURE__*/
|
|
986
|
+
var nt = /*@__PURE__*/ N({
|
|
987
987
|
__name: "create",
|
|
988
988
|
setup(e, { expose: t }) {
|
|
989
989
|
t();
|
|
990
|
-
let n =
|
|
991
|
-
|
|
992
|
-
c.value = "", l.value = "",
|
|
993
|
-
}),
|
|
994
|
-
|
|
995
|
-
}),
|
|
996
|
-
e.length > 0 && (
|
|
990
|
+
let n = ae(), o = z(""), s = z(""), c = z(""), l = z(""), d = z([]), f = z([]), p = z(!1), m = z(!1), h = z(!1), g = z(""), _ = z(""), v = z(""), y = z(""), b = z(""), x = z(""), S = z([]), w = z(null), T = z(!1), D = z(null), O = z(!1), k = z(""), A = E(() => r.value.find((e) => e.id === i.value)?.name ?? ""), j = u.items.map((e) => e.name);
|
|
991
|
+
H(o, () => {
|
|
992
|
+
c.value = "", l.value = "", f.value = [], D.value = null;
|
|
993
|
+
}), H(v, (e) => {
|
|
994
|
+
_.value = u.items.find((t) => t.name === e)?.code ?? "";
|
|
995
|
+
}), H(S, (e) => {
|
|
996
|
+
e.length > 0 && (w.value = null);
|
|
997
997
|
});
|
|
998
|
-
let
|
|
999
|
-
let e = !!o.value, t =
|
|
1000
|
-
return !!(
|
|
998
|
+
let M = E(() => {
|
|
999
|
+
let e = !!o.value, t = h.value ? g.value.trim().length > 0 : !!c.value, n = !!w.value || S.value.length >= 3;
|
|
1000
|
+
return !!(_.value && e && t && n);
|
|
1001
1001
|
});
|
|
1002
|
-
function
|
|
1003
|
-
|
|
1002
|
+
function N(e) {
|
|
1003
|
+
w.value = e, S.value = [], T.value = !1;
|
|
1004
1004
|
}
|
|
1005
|
-
async function
|
|
1006
|
-
|
|
1005
|
+
async function P(e) {
|
|
1006
|
+
p.value = !0;
|
|
1007
1007
|
try {
|
|
1008
|
-
|
|
1008
|
+
d.value = await tt($e, "settlement_id", {
|
|
1009
1009
|
search: e,
|
|
1010
1010
|
filter: { level: 5 }
|
|
1011
1011
|
});
|
|
1012
1012
|
} catch {
|
|
1013
|
-
|
|
1013
|
+
d.value = [];
|
|
1014
1014
|
} finally {
|
|
1015
|
-
|
|
1015
|
+
p.value = !1;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
async function
|
|
1018
|
+
async function F(e) {
|
|
1019
1019
|
if (!o.value) {
|
|
1020
|
-
|
|
1020
|
+
f.value = [];
|
|
1021
1021
|
return;
|
|
1022
1022
|
}
|
|
1023
|
-
|
|
1023
|
+
m.value = !0;
|
|
1024
1024
|
try {
|
|
1025
|
-
|
|
1025
|
+
f.value = await tt(et, "address_id", {
|
|
1026
1026
|
search: e,
|
|
1027
1027
|
filter: { settlement_id: o.value }
|
|
1028
1028
|
});
|
|
1029
1029
|
} catch {
|
|
1030
|
-
|
|
1030
|
+
f.value = [];
|
|
1031
1031
|
} finally {
|
|
1032
|
-
|
|
1032
|
+
m.value = !1;
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1035
|
+
function I(e) {
|
|
1036
1036
|
if (!e) return null;
|
|
1037
1037
|
let t = e.coordinates, n = e.type === "Point" ? t : e.type === "MultiPoint" && Array.isArray(t) ? t[0] : null;
|
|
1038
1038
|
if (!Array.isArray(n) || n.length < 2) return null;
|
|
1039
1039
|
let r = Number(n[0]), i = Number(n[1]);
|
|
1040
1040
|
return !Number.isFinite(r) || !Number.isFinite(i) ? null : [r, i];
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1042
|
+
function L(e) {
|
|
1043
|
+
D.value = I(e.geom);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
|
|
1045
|
+
function te() {
|
|
1046
|
+
h.value = !h.value, c.value = "", l.value = "", f.value = [], g.value = "", D.value = null;
|
|
1047
1047
|
}
|
|
1048
|
-
async function
|
|
1049
|
-
if (
|
|
1050
|
-
|
|
1048
|
+
async function ne() {
|
|
1049
|
+
if (k.value = "", !i.value) {
|
|
1050
|
+
k.value = "Оберіть організацію в шапці кабінету";
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1054
|
-
|
|
1053
|
+
if (!M.value) {
|
|
1054
|
+
k.value = "Заповніть обовʼязкові поля та окресліть територію на карті або імпортуйте геометрію";
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
|
-
let e =
|
|
1057
|
+
let e = w.value ?? C(S.value);
|
|
1058
1058
|
if (!e) {
|
|
1059
|
-
|
|
1059
|
+
k.value = "Некоректний контур території";
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
O.value = !0;
|
|
1063
1063
|
try {
|
|
1064
|
-
let t = await
|
|
1064
|
+
let t = await ee({
|
|
1065
1065
|
organization_id: i.value,
|
|
1066
|
-
work_type:
|
|
1066
|
+
work_type: _.value,
|
|
1067
1067
|
settlement_id: o.value,
|
|
1068
|
-
is_found_address_id: !
|
|
1069
|
-
...
|
|
1070
|
-
description:
|
|
1071
|
-
execution_basis:
|
|
1072
|
-
notes:
|
|
1068
|
+
is_found_address_id: !h.value,
|
|
1069
|
+
...h.value ? { location: g.value.trim() } : { address_id: c.value },
|
|
1070
|
+
description: y.value.trim() || void 0,
|
|
1071
|
+
execution_basis: b.value.trim() || void 0,
|
|
1072
|
+
notes: x.value.trim() || void 0,
|
|
1073
1073
|
geom: e
|
|
1074
1074
|
});
|
|
1075
1075
|
await n.push({
|
|
@@ -1080,57 +1080,57 @@ var nt = /*@__PURE__*/ M({
|
|
|
1080
1080
|
}
|
|
1081
1081
|
});
|
|
1082
1082
|
} catch (e) {
|
|
1083
|
-
|
|
1083
|
+
k.value = e instanceof Error ? e.message : "Не вдалося відправити звернення";
|
|
1084
1084
|
} finally {
|
|
1085
|
-
|
|
1085
|
+
O.value = !1;
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
let
|
|
1088
|
+
let R = {
|
|
1089
1089
|
router: n,
|
|
1090
1090
|
settlementId: o,
|
|
1091
1091
|
settlementLabel: s,
|
|
1092
1092
|
addressId: c,
|
|
1093
1093
|
addressLabel: l,
|
|
1094
|
-
settlementOptions:
|
|
1095
|
-
addressOptions:
|
|
1096
|
-
settlementLoading:
|
|
1097
|
-
addressLoading:
|
|
1098
|
-
manualAddress:
|
|
1099
|
-
manualValue:
|
|
1100
|
-
workTypeCode:
|
|
1101
|
-
workTypeLabel:
|
|
1102
|
-
description:
|
|
1103
|
-
basis:
|
|
1104
|
-
notes:
|
|
1105
|
-
mapPoints:
|
|
1106
|
-
importedGeom:
|
|
1107
|
-
importOpen:
|
|
1108
|
-
addressPoint:
|
|
1109
|
-
submitting:
|
|
1110
|
-
error:
|
|
1111
|
-
orgName:
|
|
1112
|
-
workTypeOptions:
|
|
1113
|
-
canSubmit:
|
|
1114
|
-
onGeometryImported:
|
|
1115
|
-
loadSettlements:
|
|
1116
|
-
loadAddresses:
|
|
1117
|
-
pointFromGeom:
|
|
1118
|
-
onAddressSelect:
|
|
1119
|
-
toggleManualAddress:
|
|
1120
|
-
submit:
|
|
1094
|
+
settlementOptions: d,
|
|
1095
|
+
addressOptions: f,
|
|
1096
|
+
settlementLoading: p,
|
|
1097
|
+
addressLoading: m,
|
|
1098
|
+
manualAddress: h,
|
|
1099
|
+
manualValue: g,
|
|
1100
|
+
workTypeCode: _,
|
|
1101
|
+
workTypeLabel: v,
|
|
1102
|
+
description: y,
|
|
1103
|
+
basis: b,
|
|
1104
|
+
notes: x,
|
|
1105
|
+
mapPoints: S,
|
|
1106
|
+
importedGeom: w,
|
|
1107
|
+
importOpen: T,
|
|
1108
|
+
addressPoint: D,
|
|
1109
|
+
submitting: O,
|
|
1110
|
+
error: k,
|
|
1111
|
+
orgName: A,
|
|
1112
|
+
workTypeOptions: j,
|
|
1113
|
+
canSubmit: M,
|
|
1114
|
+
onGeometryImported: N,
|
|
1115
|
+
loadSettlements: P,
|
|
1116
|
+
loadAddresses: F,
|
|
1117
|
+
pointFromGeom: I,
|
|
1118
|
+
onAddressSelect: L,
|
|
1119
|
+
toggleManualAddress: te,
|
|
1120
|
+
submit: ne,
|
|
1121
1121
|
get RouterLink() {
|
|
1122
|
-
return
|
|
1122
|
+
return K;
|
|
1123
1123
|
},
|
|
1124
1124
|
AppIcon: a,
|
|
1125
|
-
FormSearchSelect:
|
|
1125
|
+
FormSearchSelect: me,
|
|
1126
1126
|
FormSuggestSelect: Ee,
|
|
1127
1127
|
ApplicationCreateMap: He,
|
|
1128
1128
|
GeometryImportDialog: Qe
|
|
1129
1129
|
};
|
|
1130
|
-
return Object.defineProperty(
|
|
1130
|
+
return Object.defineProperty(R, "__isScriptSetup", {
|
|
1131
1131
|
enumerable: !1,
|
|
1132
1132
|
value: !0
|
|
1133
|
-
}),
|
|
1133
|
+
}), R;
|
|
1134
1134
|
}
|
|
1135
1135
|
}), rt = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, it = { class: "border-b border-gray-200 bg-white py-4" }, at = { class: "mx-auto max-w-[1400px] px-6" }, ot = { class: "mb-3 flex items-center gap-1.5 text-xs text-gray-400" }, st = { class: "flex items-start justify-between gap-4" }, ct = {
|
|
1136
1136
|
key: 0,
|
|
@@ -1140,35 +1140,35 @@ var nt = /*@__PURE__*/ M({
|
|
|
1140
1140
|
class: "mb-3 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
|
|
1141
1141
|
}, kt = { class: "flex items-center gap-3" }, At = ["disabled"];
|
|
1142
1142
|
function jt(e, t, n, r, i, a) {
|
|
1143
|
-
return
|
|
1144
|
-
|
|
1145
|
-
|
|
1143
|
+
return R(), k("div", rt, [
|
|
1144
|
+
A("div", it, [A("div", at, [A("nav", ot, [
|
|
1145
|
+
M(r.RouterLink, {
|
|
1146
1146
|
to: "/requests",
|
|
1147
1147
|
class: "flex items-center gap-1 transition-colors hover:text-gray-700"
|
|
1148
1148
|
}, {
|
|
1149
|
-
default:
|
|
1149
|
+
default: U(() => [M(r.AppIcon, {
|
|
1150
1150
|
name: "home",
|
|
1151
1151
|
class: "h-3 w-3"
|
|
1152
|
-
}), t[13] ||=
|
|
1152
|
+
}), t[13] ||= A("span", null, "Звернення", -1)]),
|
|
1153
1153
|
_: 1
|
|
1154
1154
|
}),
|
|
1155
|
-
|
|
1155
|
+
M(r.AppIcon, {
|
|
1156
1156
|
name: "chevron-right",
|
|
1157
1157
|
class: "h-3 w-3"
|
|
1158
1158
|
}),
|
|
1159
|
-
t[14] ||=
|
|
1160
|
-
]),
|
|
1159
|
+
t[14] ||= A("span", { class: "font-medium text-gray-700" }, "Нове звернення", -1)
|
|
1160
|
+
]), A("div", st, [t[15] ||= A("div", null, [A("h1", { class: "text-lg font-semibold text-gray-900" }, "Нове звернення"), A("p", { class: "mt-0.5 text-sm text-gray-500" }, "Заповніть дані для створення заявки")], -1), r.orgName ? (R(), k("div", ct, [M(r.AppIcon, {
|
|
1161
1161
|
name: "building-2",
|
|
1162
1162
|
class: "h-3.5 w-3.5 text-[#2663EB]"
|
|
1163
|
-
}),
|
|
1164
|
-
|
|
1163
|
+
}), A("span", lt, B(r.orgName), 1)])) : O("", !0)])])]),
|
|
1164
|
+
A("form", {
|
|
1165
1165
|
class: "mx-auto max-w-[1400px] px-6 py-5",
|
|
1166
|
-
onSubmit:
|
|
1167
|
-
}, [
|
|
1166
|
+
onSubmit: G(r.submit, ["prevent"])
|
|
1167
|
+
}, [A("div", ut, [A("div", dt, [A("div", ft, [A("div", pt, [M(r.AppIcon, {
|
|
1168
1168
|
name: "map-pin",
|
|
1169
1169
|
class: "h-3.5 w-3.5 text-gray-400"
|
|
1170
|
-
}), t[16] ||=
|
|
1171
|
-
|
|
1170
|
+
}), t[16] ||= A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Адреса об'єкта", -1)]), A("div", mt, [
|
|
1171
|
+
M(r.FormSuggestSelect, {
|
|
1172
1172
|
modelValue: r.settlementId,
|
|
1173
1173
|
"onUpdate:modelValue": t[0] ||= (e) => r.settlementId = e,
|
|
1174
1174
|
"display-value": r.settlementLabel,
|
|
@@ -1185,10 +1185,10 @@ function jt(e, t, n, r, i, a) {
|
|
|
1185
1185
|
"options",
|
|
1186
1186
|
"loading"
|
|
1187
1187
|
]),
|
|
1188
|
-
|
|
1189
|
-
t[17] ||=
|
|
1190
|
-
t[18] ||=
|
|
1191
|
-
|
|
1188
|
+
A("label", ht, [
|
|
1189
|
+
t[17] ||= j(" Код населеного пункту (КАТОТТГ) ", -1),
|
|
1190
|
+
t[18] ||= A("span", { class: "text-red-400" }, "*", -1),
|
|
1191
|
+
A("input", {
|
|
1192
1192
|
value: r.settlementId,
|
|
1193
1193
|
type: "text",
|
|
1194
1194
|
readonly: "",
|
|
@@ -1197,20 +1197,20 @@ function jt(e, t, n, r, i, a) {
|
|
|
1197
1197
|
placeholder: "Заповнюється після вибору населеного пункту"
|
|
1198
1198
|
}, null, 8, gt)
|
|
1199
1199
|
]),
|
|
1200
|
-
|
|
1200
|
+
A("button", {
|
|
1201
1201
|
type: "button",
|
|
1202
|
-
class:
|
|
1202
|
+
class: F(["flex w-full cursor-pointer select-none items-center justify-between gap-3 rounded-xl border px-4 py-3 text-left transition-all", r.manualAddress ? "border-[#2663EB]/30 bg-[#EFF4FE]" : "border-gray-200 bg-white hover:border-gray-300"]),
|
|
1203
1203
|
onClick: r.toggleManualAddress
|
|
1204
|
-
}, [
|
|
1204
|
+
}, [A("div", _t, [A("div", { class: F(["flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-200"]) }, [M(r.AppIcon, {
|
|
1205
1205
|
name: "map-pin",
|
|
1206
|
-
class:
|
|
1207
|
-
}, null, 8, ["class"])], 2),
|
|
1208
|
-
r.manualAddress ? (
|
|
1206
|
+
class: F(["h-3.5 w-3.5", r.manualAddress ? "text-white" : "text-gray-500"])
|
|
1207
|
+
}, null, 8, ["class"])], 2), A("div", vt, [A("p", { class: F(["text-xs font-semibold", r.manualAddress ? "text-[#2663EB]" : "text-gray-700"]) }, "Адресу не знайдено", 2), t[19] ||= A("p", { class: "truncate text-xs leading-snug text-gray-400" }, "Вказати адресу вручну у полі «Місцезнаходження»", -1)])]), A("div", { class: F(["relative h-5 w-9 shrink-0 rounded-full transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-300"]) }, [A("span", { class: F(["absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition-all", r.manualAddress ? "left-[18px]" : "left-0.5"]) }, null, 2)], 2)], 2),
|
|
1208
|
+
r.manualAddress ? (R(), k("div", yt, [t[20] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [j(" Місцезнаходження "), A("span", { class: "text-red-400" }, "*")], -1), W(A("input", {
|
|
1209
1209
|
"onUpdate:modelValue": t[2] ||= (e) => r.manualValue = e,
|
|
1210
1210
|
type: "text",
|
|
1211
1211
|
placeholder: "Введіть адресу вручну...",
|
|
1212
1212
|
class: "w-full rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
1213
|
-
}, null, 512), [[
|
|
1213
|
+
}, null, 512), [[V, r.manualValue]])])) : (R(), D(r.FormSuggestSelect, {
|
|
1214
1214
|
key: 1,
|
|
1215
1215
|
modelValue: r.addressId,
|
|
1216
1216
|
"onUpdate:modelValue": t[3] ||= (e) => r.addressId = e,
|
|
@@ -1232,36 +1232,36 @@ function jt(e, t, n, r, i, a) {
|
|
|
1232
1232
|
"disabled",
|
|
1233
1233
|
"placeholder"
|
|
1234
1234
|
]))
|
|
1235
|
-
])]),
|
|
1236
|
-
|
|
1235
|
+
])]), A("div", bt, [t[24] ||= A("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Деталі заявки")], -1), A("div", xt, [
|
|
1236
|
+
M(r.FormSearchSelect, {
|
|
1237
1237
|
modelValue: r.workTypeLabel,
|
|
1238
1238
|
"onUpdate:modelValue": t[5] ||= (e) => r.workTypeLabel = e,
|
|
1239
1239
|
label: "Вид робіт",
|
|
1240
1240
|
required: "",
|
|
1241
1241
|
options: r.workTypeOptions
|
|
1242
1242
|
}, null, 8, ["modelValue", "options"]),
|
|
1243
|
-
|
|
1243
|
+
A("div", null, [t[21] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Опис запиту", -1), W(A("textarea", {
|
|
1244
1244
|
"onUpdate:modelValue": t[6] ||= (e) => r.description = e,
|
|
1245
1245
|
rows: "3",
|
|
1246
1246
|
placeholder: "Опишіть запит...",
|
|
1247
1247
|
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
1248
|
-
}, null, 512), [[
|
|
1249
|
-
|
|
1248
|
+
}, null, 512), [[V, r.description]])]),
|
|
1249
|
+
A("div", null, [t[22] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [j(" Підстава виконання робіт "), A("span", { class: "ml-1 font-normal text-gray-400" }, "(у складі якої документації розробляється, які вихідні дані)")], -1), W(A("textarea", {
|
|
1250
1250
|
"onUpdate:modelValue": t[7] ||= (e) => r.basis = e,
|
|
1251
1251
|
rows: "3",
|
|
1252
1252
|
placeholder: "Вкажіть підставу...",
|
|
1253
1253
|
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
1254
|
-
}, null, 512), [[
|
|
1255
|
-
|
|
1254
|
+
}, null, 512), [[V, r.basis]])]),
|
|
1255
|
+
A("div", null, [t[23] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Примітки", -1), W(A("textarea", {
|
|
1256
1256
|
"onUpdate:modelValue": t[8] ||= (e) => r.notes = e,
|
|
1257
1257
|
rows: "2",
|
|
1258
1258
|
placeholder: "Додаткові примітки...",
|
|
1259
1259
|
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
1260
|
-
}, null, 512), [[
|
|
1261
|
-
])])]),
|
|
1260
|
+
}, null, 512), [[V, r.notes]])])
|
|
1261
|
+
])])]), A("div", St, [A("div", Ct, [A("div", wt, [M(r.AppIcon, {
|
|
1262
1262
|
name: "map-pin",
|
|
1263
1263
|
class: "h-3.5 w-3.5 text-gray-400"
|
|
1264
|
-
}), t[25] ||=
|
|
1264
|
+
}), t[25] ||= A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, [j(" Карта "), A("span", { class: "text-red-400" }, "*")], -1)]), A("div", Tt, [M(r.ApplicationCreateMap, {
|
|
1265
1265
|
points: r.mapPoints,
|
|
1266
1266
|
"onUpdate:points": t[9] ||= (e) => r.mapPoints = e,
|
|
1267
1267
|
geometry: r.importedGeom,
|
|
@@ -1272,33 +1272,33 @@ function jt(e, t, n, r, i, a) {
|
|
|
1272
1272
|
"points",
|
|
1273
1273
|
"geometry",
|
|
1274
1274
|
"address-point"
|
|
1275
|
-
])])]),
|
|
1276
|
-
|
|
1275
|
+
])])]), A("div", Et, [
|
|
1276
|
+
A("div", Dt, [M(r.AppIcon, {
|
|
1277
1277
|
name: "alert-circle",
|
|
1278
1278
|
class: "h-[13px] w-[13px]"
|
|
1279
|
-
}), t[26] ||=
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1279
|
+
}), t[26] ||= A("span", null, [
|
|
1280
|
+
j("Поля із "),
|
|
1281
|
+
A("span", { class: "font-medium text-red-400" }, "*"),
|
|
1282
|
+
j(" обов'язкові")
|
|
1283
1283
|
], -1)]),
|
|
1284
|
-
r.error ? (
|
|
1285
|
-
|
|
1284
|
+
r.error ? (R(), k("p", Ot, B(r.error), 1)) : O("", !0),
|
|
1285
|
+
A("div", kt, [M(r.RouterLink, {
|
|
1286
1286
|
to: "/requests",
|
|
1287
1287
|
class: "flex-1 rounded-xl bg-gray-100 px-4 py-2.5 text-center text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200"
|
|
1288
1288
|
}, {
|
|
1289
|
-
default:
|
|
1289
|
+
default: U(() => [...t[27] ||= [j(" Скасувати ", -1)]]),
|
|
1290
1290
|
_: 1
|
|
1291
|
-
}),
|
|
1291
|
+
}), A("button", {
|
|
1292
1292
|
type: "submit",
|
|
1293
1293
|
class: "flex-1 rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1294
1294
|
disabled: !r.canSubmit || r.submitting
|
|
1295
|
-
},
|
|
1295
|
+
}, B(r.submitting ? "Відправлення…" : "Відправити"), 9, At)])
|
|
1296
1296
|
])])])], 32),
|
|
1297
|
-
r.importOpen ? (
|
|
1297
|
+
r.importOpen ? (R(), D(r.GeometryImportDialog, {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
onClose: t[12] ||= (e) => r.importOpen = !1,
|
|
1300
1300
|
onImported: r.onGeometryImported
|
|
1301
|
-
})) :
|
|
1301
|
+
})) : O("", !0)
|
|
1302
1302
|
]);
|
|
1303
1303
|
}
|
|
1304
1304
|
var Mt = /*#__PURE__*/ e(nt, [["render", jt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/create.vue"]]);
|