@opengis/admin 0.1.58 → 0.1.60
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -29
- package/config.js +4 -4
- package/dist/{add-page-d6TCPawD.js → add-page-C3Wh2-Ml.js} +13 -11
- package/dist/admin-interface-C4m7uvG2.js +896 -0
- package/dist/admin-view-YtM2-LrW.js +225 -0
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +95 -207
- package/dist/card-page-WrYs8chM.js +133 -0
- package/dist/{card-view-UYkkl_Pu.js → card-view-BwtqUSFP.js} +1 -1
- package/dist/{edit-page-CtKHElG1.js → edit-page-CMTqsvJf.js} +34 -33
- package/dist/import-file-bdYAo8iW.js +29759 -0
- package/dist/style.css +1 -1
- package/dist/userMenu-CT1xO2Pt.js +5 -0
- package/module/settings/card/admin.roles.table/access.hbs +27 -27
- package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
- package/module/settings/card/admin.roles.table/index.yml +14 -14
- package/module/settings/card/admin.roles.table/users.hbs +27 -27
- package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
- package/module/settings/card/admin.routes.table/index.yml +8 -8
- package/module/settings/card/admin.routes.table/users.hbs +33 -33
- package/module/settings/card/admin.users.table/general_info.hbs +25 -25
- package/module/settings/card/admin.users.table/index.yml +12 -12
- package/module/settings/card/admin.users.table/logs.hbs +30 -30
- package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
- package/module/settings/cls/core.actions.json +13 -13
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/users.user_type.json +13 -13
- package/module/settings/form/admin.access.form.json +36 -36
- package/module/settings/form/admin.custom_column.form.json +71 -71
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +19 -19
- package/module/settings/form/admin.routes.form.json +25 -25
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles.form.json +21 -21
- package/module/settings/form/admin.users.form.json +150 -150
- package/module/settings/form/user.user_roles.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/menu.json +50 -50
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.access.table.json +77 -77
- package/module/settings/table/admin.custom_column.table.json +94 -94
- package/module/settings/table/admin.properties.table.json +33 -33
- package/module/settings/table/admin.roles.table.json +58 -58
- package/module/settings/table/admin.routes.table.json +67 -67
- package/module/settings/table/admin.user_properties.table.json +28 -28
- package/module/settings/table/admin.user_roles.table.json +66 -66
- package/module/settings/table/admin.users.table.json +119 -119
- package/package.json +79 -81
- package/plugin.js +100 -162
- package/server/helpers/controllers/badge.js +11 -11
- package/server/helpers/controllers/hb.js +2 -2
- package/server/helpers/controllers/map.js +2 -2
- package/server/helpers/controllers/mls.js +2 -2
- package/server/helpers/controllers/vue.js +2 -2
- package/server/helpers/index.mjs +13 -13
- package/server/plugins/adminHook.js +165 -0
- package/server/plugins/cron.js +11 -0
- package/server/plugins/docs.js +28 -28
- package/server/plugins/hook.js +152 -228
- package/server/plugins/vite.js +69 -69
- package/server/routes/calendar/controllers/calendar.data.js +88 -88
- package/server/routes/calendar/index.mjs +17 -17
- package/server/routes/data/controllers/cardData.js +57 -56
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableData.js +112 -145
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +63 -63
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/getColumns.js +8 -21
- package/server/routes/data/index.mjs +15 -15
- package/server/routes/data/schema.js +7 -7
- package/server/routes/menu/controllers/getMenu.js +34 -34
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/notifications/controllers/readNotifications.js +30 -30
- package/server/routes/notifications/controllers/userNotifications.js +64 -64
- package/server/routes/notifications/hook/onWidgetSet.js +63 -63
- package/server/routes/notifications/index.mjs +40 -40
- package/server/routes/properties/controllers/admin.properties.get.js +29 -29
- package/server/routes/properties/controllers/user.properties.get.js +34 -34
- package/server/routes/properties/controllers/user.properties.post.js +30 -30
- package/server/routes/properties/funcs/getSettings.js +56 -56
- package/server/routes/properties/funcs/setSettings.js +44 -44
- package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
- package/server/routes/properties/index.mjs +26 -26
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +20 -16
- package/server/routes/templates/index.mjs +14 -14
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/cp_building.form.json +32 -32
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/utils.js +21 -21
- package/dist/admin-interface-w6YuIWM3.js +0 -1343
- package/dist/admin-view-3Sz3UF_y.js +0 -461
- package/dist/card-page-BsQts5XS.js +0 -230
- package/dist/import-file-CsCQ5xvs.js +0 -47264
@@ -0,0 +1,133 @@
|
|
1
|
+
import { u as T } from "./userMenu-CT1xO2Pt.js";
|
2
|
+
import { _ as H, a as N } from "./import-file-bdYAo8iW.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 t = this.flattenMenu(T.value);
|
13
|
+
t != null && t.length || this.$router.replace("/404");
|
14
|
+
const e = t == null ? void 0 : t.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 e || this.$router.replace("/404"), e == null ? void 0 : e.path;
|
19
|
+
}
|
20
|
+
},
|
21
|
+
mounted() {
|
22
|
+
this.getObjectData();
|
23
|
+
},
|
24
|
+
methods: {
|
25
|
+
async getObjectData() {
|
26
|
+
var r;
|
27
|
+
const { table: t, id: e } = (r = this.$route) == null ? void 0 : r.params;
|
28
|
+
(!t || !e) && this.$router.replace("/404");
|
29
|
+
try {
|
30
|
+
const { data: d } = await N.get(`/api/table-data/${t}/${e}`);
|
31
|
+
this.objectData = d;
|
32
|
+
} catch (d) {
|
33
|
+
console.error(d);
|
34
|
+
}
|
35
|
+
},
|
36
|
+
getColClass(t) {
|
37
|
+
return `col-span-${t || 12}`;
|
38
|
+
},
|
39
|
+
getGridClass() {
|
40
|
+
return "grid-cols-12";
|
41
|
+
},
|
42
|
+
flattenMenu(t) {
|
43
|
+
const e = [];
|
44
|
+
return t.forEach((r) => {
|
45
|
+
r.menu ? e.push(...this.flattenMenu(r.menu)) : e.push(r);
|
46
|
+
}), e;
|
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 ee(t, e, 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: e[0] || (e[0] = (o) => t.$router.back()),
|
70
|
+
class: "text-xl font-medium text-gray-600 hover:text-black"
|
71
|
+
}, " До таблиці "),
|
72
|
+
e[1] || (e[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 = t.$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(() => e[2] || (e[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 = t.$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 re = /* @__PURE__ */ H(F, [["render", ee], ["__scopeId", "data-v-86de1424"]]);
|
131
|
+
export {
|
132
|
+
re as default
|
133
|
+
};
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
2
|
+
import { _ as h, a as c } from "./import-file-bdYAo8iW.js";
|
3
|
+
import { resolveComponent as d, openBlock as u, createElementBlock as b, createElementVNode as n, createBlock as f, createCommentVNode as p } from "vue";
|
3
4
|
const g = {
|
4
5
|
data() {
|
5
6
|
return {
|
@@ -19,37 +20,37 @@ const g = {
|
|
19
20
|
}), e;
|
20
21
|
},
|
21
22
|
async getFormScheme() {
|
22
|
-
var
|
23
|
-
const t = this.flattenMenu(
|
23
|
+
var i, s;
|
24
|
+
const t = this.flattenMenu(m.value);
|
24
25
|
t != null && t.length || this.$router.replace("/404");
|
25
|
-
const e = t == null ? void 0 : t.find((
|
26
|
-
var
|
27
|
-
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);
|
28
29
|
});
|
29
30
|
e || this.$router.replace("/404");
|
30
31
|
const o = e == null ? void 0 : e.table;
|
31
32
|
this.table = o;
|
32
33
|
try {
|
33
34
|
const {
|
34
|
-
data: { form:
|
35
|
-
} = await
|
36
|
-
data: { rows:
|
37
|
-
} = await
|
38
|
-
`/api/table-data/${this.table}/${(
|
35
|
+
data: { form: a }
|
36
|
+
} = await c.get(`/api/template/table/${o}`), {
|
37
|
+
data: { rows: l }
|
38
|
+
} = await c.get(
|
39
|
+
`/api/table-data/${this.table}/${(s = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : s.id}`
|
39
40
|
);
|
40
|
-
this.formValues =
|
41
|
-
const { data: r } = await
|
41
|
+
this.formValues = l == null ? void 0 : l[0];
|
42
|
+
const { data: r } = await c.get(`/api/template/form/${a}`);
|
42
43
|
this.scheme = (r == null ? void 0 : r.schema) || r;
|
43
44
|
} catch {
|
44
45
|
}
|
45
46
|
},
|
46
47
|
async editObject() {
|
47
|
-
var t, e;
|
48
|
+
var t, e, o, i;
|
48
49
|
try {
|
49
|
-
await this.$refs.form.doValidation(), await
|
50
|
+
await this.$refs.form.doValidation(), await c.put(
|
50
51
|
`/api/table/${this.table}/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.id}`,
|
51
52
|
this.formValues
|
52
|
-
), await this.$router.
|
53
|
+
), await this.$router.replace(`/${(i = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : i.table}`), await this.$notify({
|
53
54
|
title: "Успішно!",
|
54
55
|
message: "Об'єкт успішно створено",
|
55
56
|
type: "success"
|
@@ -63,13 +64,13 @@ const g = {
|
|
63
64
|
}
|
64
65
|
}
|
65
66
|
}
|
66
|
-
}, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[
|
67
|
-
style: { height: "calc(100vh -
|
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 - 60px)", width: "calc(100vw - 260px)" },
|
68
69
|
class: "bg-gray-50 p-[20px] flex"
|
69
|
-
},
|
70
|
-
function
|
71
|
-
const
|
72
|
-
return u(),
|
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, o, i, s, a) {
|
72
|
+
const l = d("VsForm");
|
73
|
+
return u(), b("div", x, [
|
73
74
|
n("div", w, [
|
74
75
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
75
76
|
n("div", y, [
|
@@ -78,26 +79,26 @@ function $(t, e, o, c, l, s) {
|
|
78
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"
|
79
80
|
}, " Скасувати "),
|
80
81
|
n("button", {
|
81
|
-
onClick: e[1] || (e[1] = (...r) =>
|
82
|
-
class: "py-2 px-3
|
82
|
+
onClick: e[1] || (e[1] = (...r) => a.editObject && a.editObject(...r)),
|
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"
|
83
84
|
}, " Зберегти ")
|
84
85
|
])
|
85
86
|
]),
|
86
87
|
n("div", k, [
|
87
|
-
n("div",
|
88
|
-
|
88
|
+
n("div", $, [
|
89
|
+
s.scheme ? (u(), f(l, {
|
89
90
|
key: 0,
|
90
91
|
ref: "form",
|
91
|
-
scheme:
|
92
|
-
modelValue:
|
93
|
-
"onUpdate:modelValue": e[2] || (e[2] = (r) =>
|
92
|
+
scheme: s.scheme,
|
93
|
+
modelValue: s.formValues,
|
94
|
+
"onUpdate:modelValue": e[2] || (e[2] = (r) => s.formValues = r),
|
94
95
|
class: "p-0 mt-[20px]"
|
95
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
96
|
+
}, null, 8, ["scheme", "modelValue"])) : p("", !0)
|
96
97
|
])
|
97
98
|
])
|
98
99
|
]);
|
99
100
|
}
|
100
|
-
const
|
101
|
+
const q = /* @__PURE__ */ h(g, [["render", v]]);
|
101
102
|
export {
|
102
|
-
|
103
|
+
q as default
|
103
104
|
};
|