@opengis/admin 0.1.60 → 0.1.62
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{add-page-C3Wh2-Ml.js → add-page-CFNh7Zxz.js} +11 -13
- package/dist/admin-interface-CniNlJEa.js +1351 -0
- package/dist/admin-view-Dw9tWMxP.js +41685 -0
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +398 -88
- package/dist/card-page-B16E7Q7m.js +230 -0
- package/dist/{card-view-BwtqUSFP.js → card-view-Fw8T0Ddm.js} +1 -1
- package/dist/edit-page-BCPO83LG.js +103 -0
- package/dist/import-file-D6JQHFSe.js +47523 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/admin-interface-C4m7uvG2.js +0 -896
- package/dist/admin-view-YtM2-LrW.js +0 -225
- package/dist/card-page-WrYs8chM.js +0 -133
- package/dist/edit-page-CMTqsvJf.js +0 -104
- package/dist/import-file-bdYAo8iW.js +0 -29759
- package/dist/userMenu-CT1xO2Pt.js +0 -5
@@ -1,225 +0,0 @@
|
|
1
|
-
import { _ as f, a as L } from "./import-file-bdYAo8iW.js";
|
2
|
-
import { u as g } from "./userMenu-CT1xO2Pt.js";
|
3
|
-
import { openBlock as r, createElementBlock as a, createElementVNode as c, createStaticVNode as Z, resolveComponent as h, createTextVNode as m, toDisplayString as v, createVNode as C, normalizeClass as w, Transition as E, withCtx as V, withDirectives as H, Fragment as y, renderList as M, vShow as I, vModelText as N, createBlock as O, createCommentVNode as B } from "vue";
|
4
|
-
const D = {}, j = {
|
5
|
-
xmlns: "http://www.w3.org/2000/svg",
|
6
|
-
viewBox: "0 0 24 24",
|
7
|
-
fill: "none",
|
8
|
-
stroke: "currentColor",
|
9
|
-
"stroke-width": "2",
|
10
|
-
"stroke-linecap": "round",
|
11
|
-
"stroke-linejoin": "round",
|
12
|
-
class: "icon icon-tabler icons-tabler-outline icon-tabler-logout"
|
13
|
-
};
|
14
|
-
function z(o, e, t, l, n, s) {
|
15
|
-
return r(), a("svg", j, e[0] || (e[0] = [
|
16
|
-
c("path", {
|
17
|
-
stroke: "none",
|
18
|
-
d: "M0 0h24v24H0z",
|
19
|
-
fill: "none"
|
20
|
-
}, null, -1),
|
21
|
-
c("path", { d: "M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" }, null, -1),
|
22
|
-
c("path", { d: "M9 12h12l-3 -3" }, null, -1),
|
23
|
-
c("path", { d: "M18 15l3 -3" }, null, -1)
|
24
|
-
]));
|
25
|
-
}
|
26
|
-
const S = /* @__PURE__ */ f(D, [["render", z]]), T = {}, F = {
|
27
|
-
viewBox: "0 0 1823 249",
|
28
|
-
fill: "none",
|
29
|
-
xmlns: "http://www.w3.org/2000/svg"
|
30
|
-
};
|
31
|
-
function U(o, e, t, l, n, s) {
|
32
|
-
return r(), a("svg", F, e[0] || (e[0] = [
|
33
|
-
Z('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>', 10)
|
34
|
-
]));
|
35
|
-
}
|
36
|
-
const q = /* @__PURE__ */ f(T, [["render", U]]), A = {}, G = {
|
37
|
-
xmlns: "http://www.w3.org/2000/svg",
|
38
|
-
viewBox: "0 0 24 24",
|
39
|
-
fill: "none",
|
40
|
-
stroke: "currentColor",
|
41
|
-
"stroke-width": "2",
|
42
|
-
"stroke-linecap": "round",
|
43
|
-
"stroke-linejoin": "round",
|
44
|
-
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
45
|
-
};
|
46
|
-
function J(o, e, t, l, n, s) {
|
47
|
-
return r(), a("svg", G, e[0] || (e[0] = [
|
48
|
-
c("path", {
|
49
|
-
stroke: "none",
|
50
|
-
d: "M0 0h24v24H0z",
|
51
|
-
fill: "none"
|
52
|
-
}, null, -1),
|
53
|
-
c("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
54
|
-
]));
|
55
|
-
}
|
56
|
-
const K = /* @__PURE__ */ f(A, [["render", J]]), P = {
|
57
|
-
components: { IconChevronDown: K },
|
58
|
-
props: { route: Object },
|
59
|
-
mounted() {
|
60
|
-
var o, e, t;
|
61
|
-
(o = this.route) != null && o.menu && (t = (e = this.route) == null ? void 0 : e.menu) != null && t.some(
|
62
|
-
(l) => (l == null ? void 0 : l.path) === this.$route.path.replace("/", "")
|
63
|
-
) && (this.isOpen = !0);
|
64
|
-
},
|
65
|
-
data() {
|
66
|
-
return {
|
67
|
-
isOpen: !1
|
68
|
-
};
|
69
|
-
}
|
70
|
-
}, Q = {
|
71
|
-
key: 0,
|
72
|
-
class: ""
|
73
|
-
}, R = { class: "ml-[30px] before:block before:absolute relative w-[196px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer" }, W = { key: 1 };
|
74
|
-
function X(o, e, t, l, n, s) {
|
75
|
-
var x, p, b, k;
|
76
|
-
const _ = h("IconChevronDown"), i = h("router-link");
|
77
|
-
return (x = t.route) != null && x.menu ? (r(), a("div", Q, [
|
78
|
-
c("button", {
|
79
|
-
onClick: e[0] || (e[0] = (d) => n.isOpen = !n.isOpen),
|
80
|
-
class: "flex cursor-pointer gap-x-3 py-2 px-3 mb-[6px] text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center focus:bg-gray-100 hover:bg-gray-100 duration-300"
|
81
|
-
}, [
|
82
|
-
m(v((p = t.route) == null ? void 0 : p.ua) + " ", 1),
|
83
|
-
C(_, {
|
84
|
-
class: w([[n.isOpen && "-rotate-180"], "ml-auto duration-300"]),
|
85
|
-
width: "16",
|
86
|
-
height: "16"
|
87
|
-
}, null, 8, ["class"])
|
88
|
-
]),
|
89
|
-
C(E, { name: "fade" }, {
|
90
|
-
default: V(() => {
|
91
|
-
var d;
|
92
|
-
return [
|
93
|
-
H(c("ul", R, [
|
94
|
-
(r(!0), a(y, null, M((d = t.route) == null ? void 0 : d.menu, (u, $) => (r(), a("li", {
|
95
|
-
key: $,
|
96
|
-
class: "w-full mb-[4px]"
|
97
|
-
}, [
|
98
|
-
C(i, {
|
99
|
-
to: "/" + (u == null ? void 0 : u.path),
|
100
|
-
class: w([[
|
101
|
-
(u == null ? void 0 : u.path) === o.$route.path.replace("/", "") && "bg-gray-100"
|
102
|
-
], "flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])
|
103
|
-
}, {
|
104
|
-
default: V(() => [
|
105
|
-
m(v(u == null ? void 0 : u.ua), 1)
|
106
|
-
]),
|
107
|
-
_: 2
|
108
|
-
}, 1032, ["to", "class"])
|
109
|
-
]))), 128))
|
110
|
-
], 512), [
|
111
|
-
[I, n.isOpen]
|
112
|
-
])
|
113
|
-
];
|
114
|
-
}),
|
115
|
-
_: 1
|
116
|
-
})
|
117
|
-
])) : (r(), a("div", W, [
|
118
|
-
C(i, {
|
119
|
-
to: (b = t.route) == null ? void 0 : b.path,
|
120
|
-
class: w([[((k = t.route) == null ? void 0 : k.path) === o.$route.path.replace("/", "") && "bg-gray-100"], "flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])
|
121
|
-
}, {
|
122
|
-
default: V(() => {
|
123
|
-
var d;
|
124
|
-
return [
|
125
|
-
m(v((d = t.route) == null ? void 0 : d.ua), 1)
|
126
|
-
];
|
127
|
-
}),
|
128
|
-
_: 1
|
129
|
-
}, 8, ["to", "class"])
|
130
|
-
]));
|
131
|
-
}
|
132
|
-
const Y = /* @__PURE__ */ f(P, [["render", X]]), e1 = {
|
133
|
-
components: { IconLogout: S, NavbarItem: Y, IconLogo: q },
|
134
|
-
data() {
|
135
|
-
return {
|
136
|
-
activeIndex: null,
|
137
|
-
data: null,
|
138
|
-
searchValue: ""
|
139
|
-
};
|
140
|
-
},
|
141
|
-
computed: {
|
142
|
-
data() {
|
143
|
-
var o, e;
|
144
|
-
return (o = this.searchValue) != null && o.trim() ? (e = this.flattenMenu(g.value)) == null ? void 0 : e.filter(
|
145
|
-
(t) => {
|
146
|
-
var l, n, s;
|
147
|
-
return (s = (l = t == null ? void 0 : t.ua) == null ? void 0 : l.toLowerCase()) == null ? void 0 : s.includes((n = this.searchValue) == null ? void 0 : n.toLowerCase());
|
148
|
-
}
|
149
|
-
) : g.value;
|
150
|
-
}
|
151
|
-
},
|
152
|
-
methods: {
|
153
|
-
flattenMenu(o) {
|
154
|
-
const e = [];
|
155
|
-
return o.forEach((t) => {
|
156
|
-
t.menu ? e.push(...this.flattenMenu(t.menu)) : e.push(t);
|
157
|
-
}), e;
|
158
|
-
}
|
159
|
-
}
|
160
|
-
}, t1 = { class: "flex flex-col h-[100vh] border-r w-[300px]" }, o1 = { class: "p-[16px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-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" }, n1 = { class: "pb-3 w-full flex flex-col flex-wrap" }, r1 = {
|
161
|
-
key: 0,
|
162
|
-
class: "flex flex-col gap-[6px]"
|
163
|
-
}, a1 = {
|
164
|
-
key: 1,
|
165
|
-
class: "text-gray-800 text-lg mt-[20px]"
|
166
|
-
};
|
167
|
-
function l1(o, e, t, l, n, s) {
|
168
|
-
var x;
|
169
|
-
const _ = h("IconLogo"), i = h("NavbarItem");
|
170
|
-
return r(), a("div", t1, [
|
171
|
-
C(_, {
|
172
|
-
height: "40",
|
173
|
-
width: "200",
|
174
|
-
class: "my-[20px] ml-[20px]"
|
175
|
-
}),
|
176
|
-
H(c("input", {
|
177
|
-
type: "text",
|
178
|
-
"onUpdate:modelValue": e[0] || (e[0] = (p) => n.searchValue = p),
|
179
|
-
placeholder: "Пошук по меню",
|
180
|
-
class: "h-[40px] block rounded-lg border mx-[10px] pl-[10px] focus:border-blue-600 focus:border-[2px] outline-none"
|
181
|
-
}, null, 512), [
|
182
|
-
[N, n.searchValue]
|
183
|
-
]),
|
184
|
-
c("div", o1, [
|
185
|
-
c("nav", n1, [
|
186
|
-
(x = s.data) != null && x.length ? (r(), a("ul", r1, [
|
187
|
-
(r(!0), a(y, null, M(s.data, (p, b) => (r(), a("li", { key: b }, [
|
188
|
-
C(i, { route: p }, null, 8, ["route"])
|
189
|
-
]))), 128))
|
190
|
-
])) : (r(), a("div", a1, "Не знайдено"))
|
191
|
-
])
|
192
|
-
])
|
193
|
-
]);
|
194
|
-
}
|
195
|
-
const s1 = /* @__PURE__ */ f(e1, [["render", l1]]), c1 = {
|
196
|
-
components: { navbar: s1 },
|
197
|
-
mounted() {
|
198
|
-
this.getMenu();
|
199
|
-
},
|
200
|
-
computed: {
|
201
|
-
isMenu() {
|
202
|
-
return g.value;
|
203
|
-
}
|
204
|
-
},
|
205
|
-
methods: {
|
206
|
-
async getMenu() {
|
207
|
-
try {
|
208
|
-
const { data: o } = await L.get("/api/user-menu");
|
209
|
-
g.value = o;
|
210
|
-
} catch {
|
211
|
-
}
|
212
|
-
}
|
213
|
-
}
|
214
|
-
}, u1 = { class: "admin-wrapper" };
|
215
|
-
function C1(o, e, t, l, n, s) {
|
216
|
-
const _ = h("navbar"), i = h("router-view");
|
217
|
-
return r(), a("div", u1, [
|
218
|
-
C(_),
|
219
|
-
s.isMenu ? (r(), O(i, { key: 0 })) : B("", !0)
|
220
|
-
]);
|
221
|
-
}
|
222
|
-
const h1 = /* @__PURE__ */ f(c1, [["render", C1], ["__scopeId", "data-v-3a278cfb"]]);
|
223
|
-
export {
|
224
|
-
h1 as default
|
225
|
-
};
|
@@ -1,133 +0,0 @@
|
|
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,104 +0,0 @@
|
|
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";
|
4
|
-
const g = {
|
5
|
-
data() {
|
6
|
-
return {
|
7
|
-
formValues: {},
|
8
|
-
scheme: null,
|
9
|
-
table: ""
|
10
|
-
};
|
11
|
-
},
|
12
|
-
mounted() {
|
13
|
-
this.getFormScheme();
|
14
|
-
},
|
15
|
-
methods: {
|
16
|
-
flattenMenu(t) {
|
17
|
-
const e = [];
|
18
|
-
return t.forEach((o) => {
|
19
|
-
o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
|
20
|
-
}), e;
|
21
|
-
},
|
22
|
-
async getFormScheme() {
|
23
|
-
var i, s;
|
24
|
-
const t = this.flattenMenu(m.value);
|
25
|
-
t != null && t.length || this.$router.replace("/404");
|
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
|
-
});
|
30
|
-
e || this.$router.replace("/404");
|
31
|
-
const o = e == null ? void 0 : e.table;
|
32
|
-
this.table = o;
|
33
|
-
try {
|
34
|
-
const {
|
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}`
|
40
|
-
);
|
41
|
-
this.formValues = l == null ? void 0 : l[0];
|
42
|
-
const { data: r } = await c.get(`/api/template/form/${a}`);
|
43
|
-
this.scheme = (r == null ? void 0 : r.schema) || r;
|
44
|
-
} catch {
|
45
|
-
}
|
46
|
-
},
|
47
|
-
async editObject() {
|
48
|
-
var t, e, o, i;
|
49
|
-
try {
|
50
|
-
await this.$refs.form.doValidation(), await c.put(
|
51
|
-
`/api/table/${this.table}/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.id}`,
|
52
|
-
this.formValues
|
53
|
-
), await this.$router.replace(`/${(i = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : i.table}`), await this.$notify({
|
54
|
-
title: "Успішно!",
|
55
|
-
message: "Об'єкт успішно створено",
|
56
|
-
type: "success"
|
57
|
-
});
|
58
|
-
} catch {
|
59
|
-
this.$notify({
|
60
|
-
title: "Помилка!",
|
61
|
-
message: "Сталася помилка",
|
62
|
-
type: "error"
|
63
|
-
});
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
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)" },
|
69
|
-
class: "bg-gray-50 p-[20px] flex"
|
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, [
|
74
|
-
n("div", w, [
|
75
|
-
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
76
|
-
n("div", y, [
|
77
|
-
n("button", {
|
78
|
-
onClick: e[0] || (e[0] = (r) => t.$router.back()),
|
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
|
-
}, " Скасувати "),
|
81
|
-
n("button", {
|
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"
|
84
|
-
}, " Зберегти ")
|
85
|
-
])
|
86
|
-
]),
|
87
|
-
n("div", k, [
|
88
|
-
n("div", $, [
|
89
|
-
s.scheme ? (u(), f(l, {
|
90
|
-
key: 0,
|
91
|
-
ref: "form",
|
92
|
-
scheme: s.scheme,
|
93
|
-
modelValue: s.formValues,
|
94
|
-
"onUpdate:modelValue": e[2] || (e[2] = (r) => s.formValues = r),
|
95
|
-
class: "p-0 mt-[20px]"
|
96
|
-
}, null, 8, ["scheme", "modelValue"])) : p("", !0)
|
97
|
-
])
|
98
|
-
])
|
99
|
-
]);
|
100
|
-
}
|
101
|
-
const q = /* @__PURE__ */ h(g, [["render", v]]);
|
102
|
-
export {
|
103
|
-
q as default
|
104
|
-
};
|