@opengis/admin 0.1.3 → 0.1.4
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-w8kqN9iC.js → add-page-D6D_vCdT.js} +17 -17
- package/dist/{admin-interface-BfdlUhra.js → admin-interface-BpAoXL6Y.js} +225 -203
- package/dist/{admin-view-RWOu4JiB.js → admin-view-Ctnb3YHc.js} +10 -10
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +59 -59
- package/dist/card-page-CDUWky8v.js +133 -0
- package/dist/{card-view-CZ14NHxS.js → card-view-BdtKFM_Q.js} +1 -1
- package/dist/{edit-page-QkVrvzva.js → edit-page-Bl7TSfk5.js} +29 -29
- package/dist/{import-file-BJrxCNbe.js → import-file-bAV0TNST.js} +6889 -6381
- package/dist/style.css +1 -1
- package/package.json +15 -5
- package/server/plugins/vite.js +13 -8
- package/server/templates/cls/itree.recrzone_category.json +74 -0
- package/dist/card-page-B3wwBScq.js +0 -115
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { u as T } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
+
import { _ as H, a as N } from "./import-file-bAV0TNST.js";
|
|
3
|
+
import { resolveComponent as B, openBlock as a, createElementBlock as c, createElementVNode as n, toDisplayString as i, createVNode as E, withCtx as z, createTextVNode as G, normalizeClass as D, Fragment as j, renderList as $, createBlock as O, resolveDynamicComponent as R, createCommentVNode as p } from "vue";
|
|
4
|
+
const F = {
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
objectData: null
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
computed: {
|
|
11
|
+
getRoute() {
|
|
12
|
+
const e = this.flattenMenu(T.value);
|
|
13
|
+
e != null && e.length || this.$router.replace("/404");
|
|
14
|
+
const t = e == null ? void 0 : e.find((r) => {
|
|
15
|
+
var d, l;
|
|
16
|
+
return (r == null ? void 0 : r.table) == ((l = (d = this.$route) == null ? void 0 : d.params) == null ? void 0 : l.table);
|
|
17
|
+
});
|
|
18
|
+
return t || this.$router.replace("/404"), t == null ? void 0 : t.path;
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
mounted() {
|
|
22
|
+
this.getObjectData();
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
async getObjectData() {
|
|
26
|
+
var r;
|
|
27
|
+
const { table: e, id: t } = (r = this.$route) == null ? void 0 : r.params;
|
|
28
|
+
(!e || !t) && this.$router.replace("/404");
|
|
29
|
+
try {
|
|
30
|
+
const { data: d } = await N.get(`/api/table-data/${e}/${t}`);
|
|
31
|
+
this.objectData = d;
|
|
32
|
+
} catch (d) {
|
|
33
|
+
console.error(d);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
getColClass(e) {
|
|
37
|
+
return `col-span-${e || 12}`;
|
|
38
|
+
},
|
|
39
|
+
getGridClass() {
|
|
40
|
+
return "grid-cols-12";
|
|
41
|
+
},
|
|
42
|
+
flattenMenu(e) {
|
|
43
|
+
const t = [];
|
|
44
|
+
return e.forEach((r) => {
|
|
45
|
+
r.menu ? t.push(...this.flattenMenu(r.menu)) : t.push(r);
|
|
46
|
+
}), t;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, I = {
|
|
50
|
+
style: { width: "calc(100vw - 260px)", height: "100vh" },
|
|
51
|
+
class: "bg-gray-50 overflow-y-auto"
|
|
52
|
+
}, P = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, S = { class: "flex items-center gap-[4px]" }, q = { class: "text-xl font-medium text-gray-600" }, A = { class: "flex items-center gap-[6px]" }, J = {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "border rounded-xl bg-white"
|
|
55
|
+
}, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-xl" }, X = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "p-[20px] border-t"
|
|
58
|
+
}, Y = {
|
|
59
|
+
key: 1,
|
|
60
|
+
class: "p-[20px] border-t"
|
|
61
|
+
}, Z = ["innerHTML"];
|
|
62
|
+
function tt(e, t, r, d, l, u) {
|
|
63
|
+
var h, x, g, b, _, f;
|
|
64
|
+
const M = B("router-link");
|
|
65
|
+
return a(), c("div", I, [
|
|
66
|
+
n("div", P, [
|
|
67
|
+
n("div", S, [
|
|
68
|
+
n("button", {
|
|
69
|
+
onClick: t[0] || (t[0] = (o) => e.$router.back()),
|
|
70
|
+
class: "text-xl font-medium text-gray-600 hover:text-black"
|
|
71
|
+
}, " До таблиці "),
|
|
72
|
+
t[1] || (t[1] = n("span", null, "/", -1)),
|
|
73
|
+
n("h2", q, i(((g = (x = (h = l.objectData) == null ? void 0 : h.rows) == null ? void 0 : x[0]) == null ? void 0 : g.name) || "Сторінка об'єкта"), 1)
|
|
74
|
+
]),
|
|
75
|
+
n("div", A, [
|
|
76
|
+
E(M, {
|
|
77
|
+
to: `/edit?table=${u.getRoute}&id=${(_ = (b = e.$route) == null ? void 0 : b.params) == null ? void 0 : _.id}`,
|
|
78
|
+
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"
|
|
79
|
+
}, {
|
|
80
|
+
default: z(() => t[2] || (t[2] = [
|
|
81
|
+
G(" Редагувати ")
|
|
82
|
+
])),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["to"])
|
|
85
|
+
])
|
|
86
|
+
]),
|
|
87
|
+
n("div", {
|
|
88
|
+
class: D(["grid gap-[20px]", u.getGridClass()])
|
|
89
|
+
}, [
|
|
90
|
+
(a(!0), c(j, null, $((f = l.objectData) == null ? void 0 : f.panels, (o, V) => {
|
|
91
|
+
var m;
|
|
92
|
+
return a(), c("div", {
|
|
93
|
+
key: V,
|
|
94
|
+
class: D([u.getColClass(o.col), "p-4"])
|
|
95
|
+
}, [
|
|
96
|
+
o != null && o.name ? (a(), c("div", J, [
|
|
97
|
+
n("h2", K, i((o == null ? void 0 : o.title) || "Панель"), 1),
|
|
98
|
+
n("div", {
|
|
99
|
+
class: "p-[20px] border-t",
|
|
100
|
+
innerHTML: (m = l.objectData) == null ? void 0 : m.data[o == null ? void 0 : o.name]
|
|
101
|
+
}, null, 8, Q)
|
|
102
|
+
])) : o.type === "container" ? (a(), c("div", U, [
|
|
103
|
+
(a(!0), c(j, null, $(o.items, (s, L) => {
|
|
104
|
+
var v, y, k, w, C;
|
|
105
|
+
return a(), c("div", {
|
|
106
|
+
key: L,
|
|
107
|
+
class: "border rounded-xl bg-white mb-[20px]"
|
|
108
|
+
}, [
|
|
109
|
+
n("h2", W, i((s == null ? void 0 : s.title) || "Панель"), 1),
|
|
110
|
+
s != null && s.component ? (a(), c("div", X, [
|
|
111
|
+
(a(), O(R(s.component), {
|
|
112
|
+
geometry: (y = (v = l.objectData) == null ? void 0 : v.rows[0]) == null ? void 0 : y.geom,
|
|
113
|
+
zoom: 16,
|
|
114
|
+
id: (w = (k = e.$route) == null ? void 0 : k.params) == null ? void 0 : w.id
|
|
115
|
+
}, null, 8, ["geometry", "id"]))
|
|
116
|
+
])) : p("", !0),
|
|
117
|
+
s != null && s.name ? (a(), c("div", Y, [
|
|
118
|
+
n("div", {
|
|
119
|
+
innerHTML: (C = l.objectData) == null ? void 0 : C.data[s == null ? void 0 : s.name]
|
|
120
|
+
}, null, 8, Z)
|
|
121
|
+
])) : p("", !0)
|
|
122
|
+
]);
|
|
123
|
+
}), 128))
|
|
124
|
+
])) : p("", !0)
|
|
125
|
+
], 2);
|
|
126
|
+
}), 128))
|
|
127
|
+
], 2)
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
const rt = /* @__PURE__ */ H(F, [["render", tt], ["__scopeId", "data-v-86a4c28d"]]);
|
|
131
|
+
export {
|
|
132
|
+
rt as default
|
|
133
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as
|
|
3
|
-
import { resolveComponent as
|
|
2
|
+
import { _ as h, a as c } from "./import-file-bAV0TNST.js";
|
|
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() {
|
|
6
6
|
return {
|
|
@@ -15,42 +15,42 @@ const g = {
|
|
|
15
15
|
methods: {
|
|
16
16
|
flattenMenu(t) {
|
|
17
17
|
const e = [];
|
|
18
|
-
return t.forEach((
|
|
19
|
-
|
|
18
|
+
return t.forEach((o) => {
|
|
19
|
+
o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
|
|
20
20
|
}), e;
|
|
21
21
|
},
|
|
22
22
|
async getFormScheme() {
|
|
23
|
-
var i,
|
|
23
|
+
var i, s;
|
|
24
24
|
const t = this.flattenMenu(m.value);
|
|
25
25
|
t != null && t.length || this.$router.replace("/404");
|
|
26
|
-
const e = t == null ? void 0 : t.find((
|
|
27
|
-
var l,
|
|
28
|
-
return (
|
|
26
|
+
const e = t == null ? void 0 : t.find((a) => {
|
|
27
|
+
var l, r;
|
|
28
|
+
return (a == null ? void 0 : a.path) == ((r = (l = this.$route) == null ? void 0 : l.query) == null ? void 0 : r.table);
|
|
29
29
|
});
|
|
30
30
|
e || this.$router.replace("/404");
|
|
31
|
-
const
|
|
32
|
-
this.table =
|
|
31
|
+
const o = e == null ? void 0 : e.table;
|
|
32
|
+
this.table = o;
|
|
33
33
|
try {
|
|
34
34
|
const {
|
|
35
|
-
data: { form:
|
|
36
|
-
} = await
|
|
35
|
+
data: { form: a }
|
|
36
|
+
} = await c.get(`/api/template/table/${o}`), {
|
|
37
37
|
data: { rows: l }
|
|
38
|
-
} = await
|
|
39
|
-
`/api/table-data/${this.table}/${(
|
|
38
|
+
} = await c.get(
|
|
39
|
+
`/api/table-data/${this.table}/${(s = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : s.id}`
|
|
40
40
|
);
|
|
41
41
|
this.formValues = l == null ? void 0 : l[0];
|
|
42
|
-
const { data:
|
|
43
|
-
this.scheme =
|
|
42
|
+
const { data: r } = await c.get(`/api/template/form/${a}`);
|
|
43
|
+
this.scheme = (r == null ? void 0 : r.schema) || r;
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
async editObject() {
|
|
48
|
-
var t, e,
|
|
48
|
+
var t, e, o, i;
|
|
49
49
|
try {
|
|
50
|
-
await this.$refs.form.doValidation(), await
|
|
50
|
+
await this.$refs.form.doValidation(), await c.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
|
-
), await this.$router.replace(`/${(i = (
|
|
53
|
+
), await this.$router.replace(`/${(i = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : i.table}`), await this.$notify({
|
|
54
54
|
title: "Успішно!",
|
|
55
55
|
message: "Об'єкт успішно створено",
|
|
56
56
|
type: "success"
|
|
@@ -68,37 +68,37 @@ const g = {
|
|
|
68
68
|
style: { height: "calc(100vh - 60px)", 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
|
-
function v(t, e,
|
|
72
|
-
const l =
|
|
73
|
-
return
|
|
71
|
+
function v(t, e, o, i, s, a) {
|
|
72
|
+
const l = d("VsForm");
|
|
73
|
+
return u(), b("div", x, [
|
|
74
74
|
n("div", w, [
|
|
75
75
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
|
76
76
|
n("div", y, [
|
|
77
77
|
n("button", {
|
|
78
|
-
onClick: e[0] || (e[0] = (
|
|
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
|
n("button", {
|
|
82
|
-
onClick: e[1] || (e[1] = (...
|
|
82
|
+
onClick: e[1] || (e[1] = (...r) => a.editObject && a.editObject(...r)),
|
|
83
83
|
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"
|
|
84
84
|
}, " Зберегти ")
|
|
85
85
|
])
|
|
86
86
|
]),
|
|
87
87
|
n("div", k, [
|
|
88
88
|
n("div", $, [
|
|
89
|
-
|
|
89
|
+
s.scheme ? (u(), f(l, {
|
|
90
90
|
key: 0,
|
|
91
91
|
ref: "form",
|
|
92
|
-
scheme:
|
|
93
|
-
modelValue:
|
|
94
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
92
|
+
scheme: s.scheme,
|
|
93
|
+
modelValue: s.formValues,
|
|
94
|
+
"onUpdate:modelValue": e[2] || (e[2] = (r) => s.formValues = r),
|
|
95
95
|
class: "p-0 mt-[20px]"
|
|
96
96
|
}, null, 8, ["scheme", "modelValue"])) : p("", !0)
|
|
97
97
|
])
|
|
98
98
|
])
|
|
99
99
|
]);
|
|
100
100
|
}
|
|
101
|
-
const q = /* @__PURE__ */
|
|
101
|
+
const q = /* @__PURE__ */ h(g, [["render", v]]);
|
|
102
102
|
export {
|
|
103
103
|
q as default
|
|
104
104
|
};
|