@opengis/admin 0.1.20 → 0.1.21
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/{add-page-DU60zL6t.js → add-page-vX4ne6CO.js} +9 -9
- package/dist/admin-interface-CLoG7ut3.js +961 -0
- package/dist/{admin-view-CfY_rVQ4.js → admin-view-_gUXThTm.js} +146 -113
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +40 -40
- package/dist/card-page-B98zZW37.js +202 -0
- package/dist/{card-view-CwZPYXyJ.js → card-view-UPTWBqwM.js} +1 -1
- package/dist/{edit-page-C6mgpZBS.js → edit-page-D5iMrlzA.js} +21 -21
- package/dist/{import-file-C5Tvx4dB.js → import-file-B37H73ct.js} +24266 -24190
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/admin-interface-gm773DzD.js +0 -919
- package/dist/card-page-ZWU3SEtH.js +0 -194
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { u as $ } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
+
import { _ as V, a as z } from "./import-file-B37H73ct.js";
|
|
3
|
+
import { resolveComponent as N, openBlock as n, createElementBlock as c, createElementVNode as u, toDisplayString as j, createVNode as q, withCtx as B, createTextVNode as E, normalizeClass as T, Fragment as k, renderList as M, createBlock as L, resolveDynamicComponent as H, createCommentVNode as v } from "vue";
|
|
4
|
+
const A = {
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
objectData: null,
|
|
8
|
+
component: ""
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
computed: {
|
|
12
|
+
getRoute() {
|
|
13
|
+
const t = this.flattenMenu($.value);
|
|
14
|
+
t != null && t.length || this.$router.replace("/404");
|
|
15
|
+
const r = t == null ? void 0 : t.find((a) => {
|
|
16
|
+
var l, s;
|
|
17
|
+
return (a == null ? void 0 : a.table) == ((s = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : s.table);
|
|
18
|
+
});
|
|
19
|
+
return r || this.$router.replace("/404"), r == null ? void 0 : r.path;
|
|
20
|
+
},
|
|
21
|
+
getTitle() {
|
|
22
|
+
var t, r, a, l, s, h, i, b, g, d, o, C, w, e, y;
|
|
23
|
+
if ((a = (r = (t = this.objectData) == null ? void 0 : t.rows) == null ? void 0 : r[0]) != null && a.name)
|
|
24
|
+
return ((i = (h = (s = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : s[0]) == null ? void 0 : h.name) == null ? void 0 : i.length) < 35 ? (d = (g = (b = this.objectData) == null ? void 0 : b.rows) == null ? void 0 : g[0]) == null ? void 0 : d.name : ((e = (w = (C = (o = this.objectData) == null ? void 0 : o.rows) == null ? void 0 : C[0]) == null ? void 0 : w.name) == null ? void 0 : e.slice(0, 35)) + " ...";
|
|
25
|
+
{
|
|
26
|
+
const p = (y = this.flattenMenu($.value)) == null ? void 0 : y.find(
|
|
27
|
+
(x) => {
|
|
28
|
+
var f, _;
|
|
29
|
+
return (x == null ? void 0 : x.table) === ((_ = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : _.table);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
return p == null ? void 0 : p.ua;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
async mounted() {
|
|
37
|
+
await this.getObjectData(), await this.checkActiveComponent();
|
|
38
|
+
},
|
|
39
|
+
watch: {
|
|
40
|
+
component(t) {
|
|
41
|
+
this.$router.replace({ ...this.$route, query: { tab: t } });
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
async getObjectData() {
|
|
46
|
+
var a;
|
|
47
|
+
const { table: t, id: r } = (a = this.$route) == null ? void 0 : a.params;
|
|
48
|
+
(!t || !r) && this.$router.replace("/404");
|
|
49
|
+
try {
|
|
50
|
+
const { data: l } = await z.get(`/api/table-data/${t}/${r}`);
|
|
51
|
+
this.objectData = l;
|
|
52
|
+
} catch (l) {
|
|
53
|
+
console.error(l);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
getColClass(t) {
|
|
57
|
+
return `col-span-${t || 12}`;
|
|
58
|
+
},
|
|
59
|
+
getGridClass() {
|
|
60
|
+
return "grid-cols-12";
|
|
61
|
+
},
|
|
62
|
+
checkActiveComponent() {
|
|
63
|
+
var t, r, a, l, s, h, i, b, g;
|
|
64
|
+
if ((r = (t = this.$route) == null ? void 0 : t.query) != null && r.tab)
|
|
65
|
+
this.component = (l = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : l.tab;
|
|
66
|
+
else {
|
|
67
|
+
const d = (h = (s = this.objectData) == null ? void 0 : s.panels) == null ? void 0 : h.find((o) => (o == null ? void 0 : o.type) === "tabs");
|
|
68
|
+
(i = d == null ? void 0 : d.items) != null && i.length && (this.component = ((b = d.items[0]) == null ? void 0 : b.component) || ((g = d.items[0]) == null ? void 0 : g.name));
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
flattenMenu(t) {
|
|
72
|
+
const r = [];
|
|
73
|
+
return t.forEach((a) => {
|
|
74
|
+
a.menu ? r.push(...this.flattenMenu(a.menu)) : r.push(a);
|
|
75
|
+
}), r;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, G = {
|
|
79
|
+
style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
|
|
80
|
+
class: "bg-gray-50 overflow-y-auto"
|
|
81
|
+
}, O = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, R = { class: "" }, m = { class: "text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "border rounded-xl bg-white"
|
|
84
|
+
}, P = { class: "p-[10px] pl-[20px] text-xl" }, S = ["innerHTML"], J = { key: 1 }, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: "p-[20px] border-t"
|
|
87
|
+
}, U = {
|
|
88
|
+
key: 1,
|
|
89
|
+
class: "p-[20px] border-t"
|
|
90
|
+
}, W = ["innerHTML"], X = { class: "flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]" }, Y = ["onClick"], Z = {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "border rounded-xl bg-white mt-[20px]"
|
|
93
|
+
}, ee = { class: "p-[10px] pl-[20px] text-xl" }, te = {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: "p-[20px] border-t"
|
|
96
|
+
}, oe = {
|
|
97
|
+
key: 1,
|
|
98
|
+
class: "p-[20px] border-t"
|
|
99
|
+
}, re = ["innerHTML"];
|
|
100
|
+
function se(t, r, a, l, s, h) {
|
|
101
|
+
var b, g, d;
|
|
102
|
+
const i = N("router-link");
|
|
103
|
+
return n(), c("div", G, [
|
|
104
|
+
u("div", O, [
|
|
105
|
+
u("div", R, [
|
|
106
|
+
u("button", {
|
|
107
|
+
onClick: r[0] || (r[0] = (o) => t.$router.back()),
|
|
108
|
+
class: "text-sm text-blue-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline dark:text-green-400 dark:hover:text-green-500"
|
|
109
|
+
}, " До таблиці "),
|
|
110
|
+
u("h2", m, j(h.getTitle), 1)
|
|
111
|
+
]),
|
|
112
|
+
u("div", F, [
|
|
113
|
+
q(i, {
|
|
114
|
+
to: `/edit?table=${h.getRoute}&id=${(g = (b = t.$route) == null ? void 0 : b.params) == null ? void 0 : g.id}`,
|
|
115
|
+
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"
|
|
116
|
+
}, {
|
|
117
|
+
default: B(() => r[1] || (r[1] = [
|
|
118
|
+
E(" Редагувати ")
|
|
119
|
+
])),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["to"])
|
|
122
|
+
])
|
|
123
|
+
]),
|
|
124
|
+
u("div", {
|
|
125
|
+
class: T(["grid gap-[20px]", h.getGridClass()])
|
|
126
|
+
}, [
|
|
127
|
+
(n(!0), c(k, null, M((d = s.objectData) == null ? void 0 : d.panels, (o, C) => {
|
|
128
|
+
var w;
|
|
129
|
+
return n(), c("div", {
|
|
130
|
+
key: C,
|
|
131
|
+
class: T([h.getColClass(o.col), "p-4"])
|
|
132
|
+
}, [
|
|
133
|
+
o != null && o.name ? (n(), c("div", I, [
|
|
134
|
+
u("h2", P, j((o == null ? void 0 : o.title) || "Панель"), 1),
|
|
135
|
+
u("div", {
|
|
136
|
+
class: "p-[20px] border-t",
|
|
137
|
+
innerHTML: (w = s.objectData) == null ? void 0 : w.data[o == null ? void 0 : o.name]
|
|
138
|
+
}, null, 8, S)
|
|
139
|
+
])) : o.type === "container" ? (n(), c("div", J, [
|
|
140
|
+
(n(!0), c(k, null, M(o.items, (e, y) => {
|
|
141
|
+
var p, x, f, _, D;
|
|
142
|
+
return n(), c("div", {
|
|
143
|
+
key: y,
|
|
144
|
+
class: "border rounded-xl bg-white mb-[20px]"
|
|
145
|
+
}, [
|
|
146
|
+
u("h2", K, j((e == null ? void 0 : e.title) || "Панель"), 1),
|
|
147
|
+
e != null && e.component ? (n(), c("div", Q, [
|
|
148
|
+
(n(), L(H(e.component), {
|
|
149
|
+
geometry: (x = (p = s.objectData) == null ? void 0 : p.rows[0]) == null ? void 0 : x.geom,
|
|
150
|
+
zoom: 16,
|
|
151
|
+
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
152
|
+
}, null, 8, ["geometry", "id"]))
|
|
153
|
+
])) : v("", !0),
|
|
154
|
+
e != null && e.name ? (n(), c("div", U, [
|
|
155
|
+
u("div", {
|
|
156
|
+
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
|
157
|
+
}, null, 8, W)
|
|
158
|
+
])) : v("", !0)
|
|
159
|
+
]);
|
|
160
|
+
}), 128))
|
|
161
|
+
])) : v("", !0),
|
|
162
|
+
(o == null ? void 0 : o.type) === "tabs" ? (n(), c(k, { key: 2 }, [
|
|
163
|
+
u("nav", X, [
|
|
164
|
+
(n(!0), c(k, null, M(o == null ? void 0 : o.items, (e) => (n(), c("button", {
|
|
165
|
+
key: (e == null ? void 0 : e.name) || (e == null ? void 0 : e.component),
|
|
166
|
+
onClick: (y) => s.component = (e == null ? void 0 : e.component) || (e == null ? void 0 : e.name),
|
|
167
|
+
class: T(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
|
|
168
|
+
"bg-gray-100 text-gray-800 font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name),
|
|
169
|
+
"hover:bg-gray-100": s.component !== (e == null ? void 0 : e.component) && s.component !== (e == null ? void 0 : e.name)
|
|
170
|
+
}])
|
|
171
|
+
}, j(e == null ? void 0 : e.title), 11, Y))), 128))
|
|
172
|
+
]),
|
|
173
|
+
(n(!0), c(k, null, M(o.items, (e, y) => {
|
|
174
|
+
var p, x, f, _, D;
|
|
175
|
+
return n(), c(k, { key: y }, [
|
|
176
|
+
s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name) ? (n(), c("div", Z, [
|
|
177
|
+
u("h2", ee, j((e == null ? void 0 : e.title) || "Панель"), 1),
|
|
178
|
+
e != null && e.component ? (n(), c("div", te, [
|
|
179
|
+
(n(), L(H(e.component), {
|
|
180
|
+
geometry: (x = (p = s.objectData) == null ? void 0 : p.rows[0]) == null ? void 0 : x.geom,
|
|
181
|
+
zoom: 16,
|
|
182
|
+
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
183
|
+
}, null, 8, ["geometry", "id"]))
|
|
184
|
+
])) : v("", !0),
|
|
185
|
+
e != null && e.name ? (n(), c("div", oe, [
|
|
186
|
+
u("div", {
|
|
187
|
+
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
|
188
|
+
}, null, 8, re)
|
|
189
|
+
])) : v("", !0)
|
|
190
|
+
])) : v("", !0)
|
|
191
|
+
], 64);
|
|
192
|
+
}), 128))
|
|
193
|
+
], 64)) : v("", !0)
|
|
194
|
+
], 2);
|
|
195
|
+
}), 128))
|
|
196
|
+
], 2)
|
|
197
|
+
]);
|
|
198
|
+
}
|
|
199
|
+
const le = /* @__PURE__ */ V(A, [["render", se], ["__scopeId", "data-v-6289ec55"]]);
|
|
200
|
+
export {
|
|
201
|
+
le as default
|
|
202
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as
|
|
3
|
-
import { resolveComponent as
|
|
2
|
+
import { _ as b, a as n } from "./import-file-B37H73ct.js";
|
|
3
|
+
import { resolveComponent as d, openBlock as u, createElementBlock as h, createElementVNode as i, createBlock as p, createCommentVNode as f } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
6
6
|
return {
|
|
@@ -33,13 +33,13 @@ const g = {
|
|
|
33
33
|
try {
|
|
34
34
|
const {
|
|
35
35
|
data: { form: s }
|
|
36
|
-
} = await
|
|
36
|
+
} = await n.get(`/api/template/table/${o}`), {
|
|
37
37
|
data: { rows: a }
|
|
38
|
-
} = await
|
|
38
|
+
} = await n.get(
|
|
39
39
|
`/api/table-data/${this.table}/${(l = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : l.id}`
|
|
40
40
|
);
|
|
41
41
|
this.formValues = a == null ? void 0 : a[0];
|
|
42
|
-
const { data: r } = await
|
|
42
|
+
const { data: r } = await n.get(`/api/template/form/${s}`);
|
|
43
43
|
this.scheme = (r == null ? void 0 : r.schema) || r;
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@ const g = {
|
|
|
47
47
|
async editObject() {
|
|
48
48
|
var t, e;
|
|
49
49
|
try {
|
|
50
|
-
await this.$refs.form.doValidation(), await
|
|
50
|
+
await this.$refs.form.doValidation(), await n.put(
|
|
51
51
|
`/api/table/${this.table}/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.id}`,
|
|
52
52
|
this.formValues
|
|
53
53
|
), await this.$router.back(), await this.$notify({
|
|
@@ -64,41 +64,41 @@ const g = {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
}, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[
|
|
68
|
-
style: { height: "calc(100vh -
|
|
67
|
+
}, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, y = { class: "flex items-center gap-[6px]" }, k = {
|
|
68
|
+
style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
|
|
69
69
|
class: "bg-gray-50 p-[20px] flex"
|
|
70
70
|
}, v = { class: "bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
71
71
|
function $(t, e, o, c, l, s) {
|
|
72
|
-
const a =
|
|
73
|
-
return u(),
|
|
74
|
-
|
|
75
|
-
e[3] || (e[3] =
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
const a = d("VsForm");
|
|
73
|
+
return u(), h("div", x, [
|
|
74
|
+
i("div", w, [
|
|
75
|
+
e[3] || (e[3] = i("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
|
76
|
+
i("div", y, [
|
|
77
|
+
i("button", {
|
|
78
78
|
onClick: e[0] || (e[0] = (r) => t.$router.back()),
|
|
79
79
|
class: "py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"
|
|
80
80
|
}, " Скасувати "),
|
|
81
|
-
|
|
81
|
+
i("button", {
|
|
82
82
|
onClick: e[1] || (e[1] = (...r) => s.editObject && s.editObject(...r)),
|
|
83
|
-
class: "py-2 px-3 flex items-center gap-x-2 text-sm
|
|
83
|
+
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"
|
|
84
84
|
}, " Зберегти ")
|
|
85
85
|
])
|
|
86
86
|
]),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
l.scheme ? (u(),
|
|
87
|
+
i("div", k, [
|
|
88
|
+
i("div", v, [
|
|
89
|
+
l.scheme ? (u(), p(a, {
|
|
90
90
|
key: 0,
|
|
91
91
|
ref: "form",
|
|
92
92
|
scheme: l.scheme,
|
|
93
93
|
modelValue: l.formValues,
|
|
94
94
|
"onUpdate:modelValue": e[2] || (e[2] = (r) => l.formValues = r),
|
|
95
95
|
class: "p-0 mt-[20px]"
|
|
96
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
|
96
|
+
}, null, 8, ["scheme", "modelValue"])) : f("", !0)
|
|
97
97
|
])
|
|
98
98
|
])
|
|
99
99
|
]);
|
|
100
100
|
}
|
|
101
|
-
const C = /* @__PURE__ */
|
|
101
|
+
const C = /* @__PURE__ */ b(g, [["render", $]]);
|
|
102
102
|
export {
|
|
103
103
|
C as default
|
|
104
104
|
};
|