@opengis/admin 0.1.8 → 0.1.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/{add-page-DSvX-3Xh.js → add-page-DSsxW2Zj.js} +2 -2
- package/dist/{admin-interface-Oa0z-BVX.js → admin-interface-CVcIjH78.js} +67 -67
- package/dist/{admin-view-BqbD6bLH.js → admin-view-aj21FGX2.js} +182 -94
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +28 -28
- package/dist/card-page-BBOaJHmJ.js +187 -0
- package/dist/{card-view-D-SaZyIS.js → card-view-CHgjpGG_.js} +1 -1
- package/dist/{edit-page-C3JRp601.js → edit-page-C-8Qf7kV.js} +2 -2
- package/dist/{import-file-DpWVoe-P.js → import-file-NwcjXxtk.js} +1255 -1252
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/server/routes/data/controllers/tableFilter.js +8 -5
- package/dist/card-page-CURo3EUe.js +0 -133
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { u as z } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
+
import { _ as N, a as q } from "./import-file-NwcjXxtk.js";
|
|
3
|
+
import { resolveComponent as B, openBlock as s, createElementBlock as n, createElementVNode as l, toDisplayString as v, createVNode as E, withCtx as A, createTextVNode as G, normalizeClass as D, Fragment as i, renderList as w, createBlock as T, resolveDynamicComponent as H, createCommentVNode as p } from "vue";
|
|
4
|
+
const O = {
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
objectData: null,
|
|
8
|
+
component: ""
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
computed: {
|
|
12
|
+
getRoute() {
|
|
13
|
+
const e = this.flattenMenu(z.value);
|
|
14
|
+
e != null && e.length || this.$router.replace("/404");
|
|
15
|
+
const o = e == null ? void 0 : e.find((c) => {
|
|
16
|
+
var d, a;
|
|
17
|
+
return (c == null ? void 0 : c.table) == ((a = (d = this.$route) == null ? void 0 : d.params) == null ? void 0 : a.table);
|
|
18
|
+
});
|
|
19
|
+
return o || this.$router.replace("/404"), o == null ? void 0 : o.path;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
async mounted() {
|
|
23
|
+
await this.getObjectData(), await this.checkActiveComponent();
|
|
24
|
+
},
|
|
25
|
+
watch: {
|
|
26
|
+
component(e) {
|
|
27
|
+
this.$router.replace({ ...this.$route, query: { tab: e } });
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
async getObjectData() {
|
|
32
|
+
var c;
|
|
33
|
+
const { table: e, id: o } = (c = this.$route) == null ? void 0 : c.params;
|
|
34
|
+
(!e || !o) && this.$router.replace("/404");
|
|
35
|
+
try {
|
|
36
|
+
const { data: d } = await q.get(`/api/table-data/${e}/${o}`);
|
|
37
|
+
this.objectData = d;
|
|
38
|
+
} catch (d) {
|
|
39
|
+
console.error(d);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
getColClass(e) {
|
|
43
|
+
return `col-span-${e || 12}`;
|
|
44
|
+
},
|
|
45
|
+
getGridClass() {
|
|
46
|
+
return "grid-cols-12";
|
|
47
|
+
},
|
|
48
|
+
checkActiveComponent() {
|
|
49
|
+
var e, o, c, d, a, h, k;
|
|
50
|
+
if ((o = (e = this.$route) == null ? void 0 : e.query) != null && o.tab) this.component = (d = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : d.tab;
|
|
51
|
+
else {
|
|
52
|
+
const u = (h = (a = this.objectData) == null ? void 0 : a.panels) == null ? void 0 : h.find((x) => x == null ? void 0 : x.items);
|
|
53
|
+
if ((u == null ? void 0 : u.type) === "container") return;
|
|
54
|
+
this.component = (k = u == null ? void 0 : u.items[0]) == null ? void 0 : k.component;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
flattenMenu(e) {
|
|
58
|
+
const o = [];
|
|
59
|
+
return e.forEach((c) => {
|
|
60
|
+
c.menu ? o.push(...this.flattenMenu(c.menu)) : o.push(c);
|
|
61
|
+
}), o;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, R = {
|
|
65
|
+
style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
|
|
66
|
+
class: "bg-gray-50 overflow-y-auto"
|
|
67
|
+
}, F = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, I = { class: "flex items-center gap-[4px]" }, P = { class: "text-xl font-medium text-gray-600" }, S = { class: "flex items-center gap-[6px]" }, J = {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "border rounded-xl bg-white"
|
|
70
|
+
}, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-xl" }, X = {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: "p-[20px] border-t"
|
|
73
|
+
}, Y = {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: "p-[20px] border-t"
|
|
76
|
+
}, Z = ["innerHTML"], tt = { class: "flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]" }, et = ["onClick"], ot = {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "border rounded-xl bg-white mt-[20px]"
|
|
79
|
+
}, rt = { class: "p-[10px] pl-[20px] text-xl" }, st = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "p-[20px] border-t"
|
|
82
|
+
}, nt = {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: "p-[20px] border-t"
|
|
85
|
+
}, at = ["innerHTML"];
|
|
86
|
+
function ct(e, o, c, d, a, h) {
|
|
87
|
+
var u, x, j, M, $, m;
|
|
88
|
+
const k = B("router-link");
|
|
89
|
+
return s(), n("div", R, [
|
|
90
|
+
l("div", F, [
|
|
91
|
+
l("div", I, [
|
|
92
|
+
l("button", {
|
|
93
|
+
onClick: o[0] || (o[0] = (r) => e.$router.back()),
|
|
94
|
+
class: "text-xl font-medium text-gray-600 hover:text-black"
|
|
95
|
+
}, " До таблиці "),
|
|
96
|
+
o[1] || (o[1] = l("span", null, "/", -1)),
|
|
97
|
+
l("h2", P, v(((j = (x = (u = a.objectData) == null ? void 0 : u.rows) == null ? void 0 : x[0]) == null ? void 0 : j.name) || "Сторінка об'єкта"), 1)
|
|
98
|
+
]),
|
|
99
|
+
l("div", S, [
|
|
100
|
+
E(k, {
|
|
101
|
+
to: `/edit?table=${h.getRoute}&id=${($ = (M = e.$route) == null ? void 0 : M.params) == null ? void 0 : $.id}`,
|
|
102
|
+
class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"
|
|
103
|
+
}, {
|
|
104
|
+
default: A(() => o[2] || (o[2] = [
|
|
105
|
+
G(" Редагувати ")
|
|
106
|
+
])),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["to"])
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
l("div", {
|
|
112
|
+
class: D(["grid gap-[20px]", h.getGridClass()])
|
|
113
|
+
}, [
|
|
114
|
+
(s(!0), n(i, null, w((m = a.objectData) == null ? void 0 : m.panels, (r, V) => {
|
|
115
|
+
var L;
|
|
116
|
+
return s(), n("div", {
|
|
117
|
+
key: V,
|
|
118
|
+
class: D([h.getColClass(r.col), "p-4"])
|
|
119
|
+
}, [
|
|
120
|
+
r != null && r.name ? (s(), n("div", J, [
|
|
121
|
+
l("h2", K, v((r == null ? void 0 : r.title) || "Панель"), 1),
|
|
122
|
+
l("div", {
|
|
123
|
+
class: "p-[20px] border-t",
|
|
124
|
+
innerHTML: (L = a.objectData) == null ? void 0 : L.data[r == null ? void 0 : r.name]
|
|
125
|
+
}, null, 8, Q)
|
|
126
|
+
])) : r.type === "container" ? (s(), n("div", U, [
|
|
127
|
+
(s(!0), n(i, null, w(r.items, (t, C) => {
|
|
128
|
+
var b, g, f, _, y;
|
|
129
|
+
return s(), n("div", {
|
|
130
|
+
key: C,
|
|
131
|
+
class: "border rounded-xl bg-white mb-[20px]"
|
|
132
|
+
}, [
|
|
133
|
+
l("h2", W, v((t == null ? void 0 : t.title) || "Панель"), 1),
|
|
134
|
+
t != null && t.component ? (s(), n("div", X, [
|
|
135
|
+
(s(), T(H(t.component), {
|
|
136
|
+
geometry: (g = (b = a.objectData) == null ? void 0 : b.rows[0]) == null ? void 0 : g.geom,
|
|
137
|
+
zoom: 16,
|
|
138
|
+
id: (_ = (f = e.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
139
|
+
}, null, 8, ["geometry", "id"]))
|
|
140
|
+
])) : p("", !0),
|
|
141
|
+
t != null && t.name ? (s(), n("div", Y, [
|
|
142
|
+
l("div", {
|
|
143
|
+
innerHTML: (y = a.objectData) == null ? void 0 : y.data[t == null ? void 0 : t.name]
|
|
144
|
+
}, null, 8, Z)
|
|
145
|
+
])) : p("", !0)
|
|
146
|
+
]);
|
|
147
|
+
}), 128))
|
|
148
|
+
])) : p("", !0),
|
|
149
|
+
(r == null ? void 0 : r.type) === "tabs" ? (s(), n(i, { key: 2 }, [
|
|
150
|
+
l("nav", tt, [
|
|
151
|
+
(s(!0), n(i, null, w(r == null ? void 0 : r.items, (t) => (s(), n("button", {
|
|
152
|
+
onClick: () => a.component = (t == null ? void 0 : t.component) || (t == null ? void 0 : t.name),
|
|
153
|
+
class: D(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-[11px] after:inset-x-2.5 after:z-10 after:h-0.5 after:pointer-events-none dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active", {
|
|
154
|
+
"after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:pointer-events-none after:bg-gray-800": a.component === (t == null ? void 0 : t.component) || (t == null ? void 0 : t.name)
|
|
155
|
+
}])
|
|
156
|
+
}, v(t == null ? void 0 : t.title), 11, et))), 256))
|
|
157
|
+
]),
|
|
158
|
+
(s(!0), n(i, null, w(r.items, (t, C) => {
|
|
159
|
+
var b, g, f, _, y;
|
|
160
|
+
return s(), n(i, { key: C }, [
|
|
161
|
+
a.component === (t == null ? void 0 : t.component) || t != null && t.name ? (s(), n("div", ot, [
|
|
162
|
+
l("h2", rt, v((t == null ? void 0 : t.title) || "Панель"), 1),
|
|
163
|
+
t != null && t.component ? (s(), n("div", st, [
|
|
164
|
+
(s(), T(H(t.component), {
|
|
165
|
+
geometry: (g = (b = a.objectData) == null ? void 0 : b.rows[0]) == null ? void 0 : g.geom,
|
|
166
|
+
zoom: 16,
|
|
167
|
+
id: (_ = (f = e.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
168
|
+
}, null, 8, ["geometry", "id"]))
|
|
169
|
+
])) : p("", !0),
|
|
170
|
+
t != null && t.name ? (s(), n("div", nt, [
|
|
171
|
+
l("div", {
|
|
172
|
+
innerHTML: (y = a.objectData) == null ? void 0 : y.data[t == null ? void 0 : t.name]
|
|
173
|
+
}, null, 8, at)
|
|
174
|
+
])) : p("", !0)
|
|
175
|
+
])) : p("", !0)
|
|
176
|
+
], 64);
|
|
177
|
+
}), 128))
|
|
178
|
+
], 64)) : p("", !0)
|
|
179
|
+
], 2);
|
|
180
|
+
}), 128))
|
|
181
|
+
], 2)
|
|
182
|
+
]);
|
|
183
|
+
}
|
|
184
|
+
const pt = /* @__PURE__ */ N(O, [["render", ct], ["__scopeId", "data-v-2201ae12"]]);
|
|
185
|
+
export {
|
|
186
|
+
pt as default
|
|
187
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as h, a as c } from "./import-file-
|
|
2
|
+
import { _ as h, a as c } from "./import-file-NwcjXxtk.js";
|
|
3
3
|
import { resolveComponent as d, openBlock as u, createElementBlock as b, createElementVNode as n, createBlock as f, createCommentVNode as p } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
@@ -65,7 +65,7 @@ const g = {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, y = { class: "flex items-center gap-[6px]" }, k = {
|
|
68
|
-
style: { height: "calc(100vh -
|
|
68
|
+
style: { height: "calc(100vh - 120px)", width: "calc(100vw - 260px)" },
|
|
69
69
|
class: "bg-gray-50 p-[20px] flex"
|
|
70
70
|
}, $ = { 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 v(t, e, o, i, s, a) {
|