@since2006/pages 2026.1.5 → 2026.3.0
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/es/src/app/module/ModuleIndex.vue.js +2 -2
- package/dist/es/src/app/module/ModuleIndex.vue2.js +138 -116
- package/dist/es/src/app/module/api.js +8 -7
- package/dist/es/src/app/module/utils.js +11 -2
- package/dist/es/style.css +1 -1
- package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -1
- package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
- package/dist/lib/src/app/module/api.js +1 -1
- package/dist/lib/src/app/module/utils.js +1 -1
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModuleIndex.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-730b9499"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { message as
|
|
3
|
-
import { getModulesNoCache as T, getModule as
|
|
4
|
-
import { mapTreeData as
|
|
5
|
-
import { LayoutTwoTone as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as X, ref as f, reactive as L, resolveComponent as s, openBlock as Y, createElementBlock as Z, createVNode as n, withCtx as a, createElementVNode as v, unref as h, createTextVNode as y, withDirectives as x, vShow as A } from "vue";
|
|
2
|
+
import { message as ee } from "ant-design-vue";
|
|
3
|
+
import { getModulesNoCache as T, queryAllModules as oe, getModule as te, deleteModule as ne } from "./api.js";
|
|
4
|
+
import { mapTreeData as E, mapTreeDataRecursive as le } from "./utils.js";
|
|
5
|
+
import { LayoutTwoTone as ae, PlusOutlined as N, EditOutlined as de, DeleteOutlined as se } from "@ant-design/icons-vue";
|
|
6
|
+
import ue from "./ModuleDetail.vue.js";
|
|
7
|
+
import re from "./ModuleAdd.vue.js";
|
|
8
|
+
import ie from "./ModuleEdit.vue.js";
|
|
9
|
+
import ce from "./icon/AppIcon.vue.js";
|
|
10
|
+
const pe = { class: "ant-pro-table-list-toolbar" }, fe = { class: "ant-pro-table-list-toolbar-container" }, me = { class: "ant-pro-table-list-toolbar-left" }, _e = { class: "ant-pro-table-list-toolbar-title" }, ve = { class: "ant-pro-table-list-toolbar-right" }, De = /* @__PURE__ */ X({
|
|
11
11
|
__name: "ModuleIndex",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(he) {
|
|
13
|
+
const O = f(), u = f([]), g = f([]), D = f(""), d = f([]), r = L({
|
|
14
14
|
id: "",
|
|
15
15
|
cateId: "",
|
|
16
16
|
parentId: "",
|
|
@@ -20,128 +20,141 @@ const de = { class: "ant-pro-table-list-toolbar" }, se = { class: "ant-pro-table
|
|
|
20
20
|
seqNo: "",
|
|
21
21
|
remark: "",
|
|
22
22
|
permsSummary: ""
|
|
23
|
-
}),
|
|
23
|
+
}), M = f(!0), i = L({
|
|
24
24
|
openAdd: !1,
|
|
25
25
|
openEdit: !1
|
|
26
|
-
}),
|
|
26
|
+
}), b = f(!1), S = () => {
|
|
27
27
|
T().then((o) => {
|
|
28
|
-
|
|
28
|
+
d.value = E(o.data), k(d.value[0].key);
|
|
29
29
|
});
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
}, U = (o) => {
|
|
31
|
+
if (!o) {
|
|
32
|
+
S();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
oe(o).then((e) => {
|
|
36
|
+
d.value = le(e.data), u.value = w(d.value), g.value = [], d.value.length > 0 && k(d.value[0].key);
|
|
37
|
+
});
|
|
38
|
+
}, w = (o) => {
|
|
39
|
+
const e = [];
|
|
40
|
+
return o.forEach((t) => {
|
|
41
|
+
e.push(t.key), t.children && t.children.length > 0 && e.push(...w(t.children));
|
|
42
|
+
}), e;
|
|
43
|
+
}, V = (o) => {
|
|
44
|
+
u.value = o;
|
|
45
|
+
}, B = (o) => new Promise((e) => {
|
|
33
46
|
if (o.dataRef.children) {
|
|
34
47
|
e("当前节点没有子模块");
|
|
35
48
|
return;
|
|
36
49
|
}
|
|
37
50
|
T(o.dataRef.key).then((t) => {
|
|
38
|
-
o.dataRef.children =
|
|
51
|
+
o.dataRef.children = E(t.data), d.value = [...d.value], e("获取模块数据成功");
|
|
39
52
|
});
|
|
40
|
-
}),
|
|
41
|
-
const t = e.node.dataRef,
|
|
42
|
-
if (t.isLeaf || (e.selected ?
|
|
53
|
+
}), $ = (o, e) => {
|
|
54
|
+
const t = e.node.dataRef, l = u.value.includes(t.key);
|
|
55
|
+
if (t.isLeaf || (e.selected ? l || u.value.push(t.key) : l && (u.value = u.value.filter((c) => c !== t.key))), o.length === 0)
|
|
43
56
|
return;
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
Object.assign(
|
|
57
|
+
const m = o[0];
|
|
58
|
+
k(m);
|
|
59
|
+
}, k = (o) => {
|
|
60
|
+
M.value = !0, te(o).then((e) => {
|
|
61
|
+
Object.assign(r, e.data), M.value = !1;
|
|
49
62
|
}).catch((e) => {
|
|
50
63
|
console.log(e);
|
|
51
64
|
});
|
|
52
|
-
}, B = () => {
|
|
53
|
-
E.value = !0, r.openAdd = !0;
|
|
54
|
-
}, U = () => {
|
|
55
|
-
E.value = !1, r.openAdd = !0;
|
|
56
|
-
}, $ = (o) => {
|
|
57
|
-
m(o);
|
|
58
65
|
}, j = () => {
|
|
59
|
-
|
|
60
|
-
}, q = (
|
|
61
|
-
|
|
66
|
+
b.value = !0, i.openAdd = !0;
|
|
67
|
+
}, q = () => {
|
|
68
|
+
b.value = !1, i.openAdd = !0;
|
|
69
|
+
}, z = (o) => {
|
|
70
|
+
_(o);
|
|
62
71
|
}, P = () => {
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
i.openEdit = !0;
|
|
73
|
+
}, Q = (o, e, t) => {
|
|
74
|
+
k(o), e === t || _(t), _(e);
|
|
75
|
+
}, F = () => {
|
|
76
|
+
ne(r.id).then((o) => {
|
|
77
|
+
ee.success("删除成功"), _(o.data.parentId);
|
|
65
78
|
});
|
|
66
|
-
},
|
|
79
|
+
}, _ = (o) => {
|
|
67
80
|
T(o).then((e) => {
|
|
68
|
-
o ? C(
|
|
81
|
+
o ? C(d.value, o, E(e.data)) : d.value = E(e.data);
|
|
69
82
|
});
|
|
70
83
|
}, C = (o, e, t) => {
|
|
71
|
-
o.forEach((
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
84
|
+
o.forEach((l) => {
|
|
85
|
+
if (l.key === e) {
|
|
86
|
+
l.isLeaf = t.length === 0;
|
|
87
|
+
const m = R([l], 0);
|
|
88
|
+
g.value = g.value.filter((c) => !m.includes(c)), u.value = u.value.filter((c) => !m.includes(c)), l.children = t;
|
|
76
89
|
} else
|
|
77
|
-
|
|
90
|
+
l.children && C(l.children, e, t);
|
|
78
91
|
});
|
|
79
|
-
},
|
|
92
|
+
}, R = (o, e) => {
|
|
80
93
|
let t = [];
|
|
81
|
-
return o.forEach((
|
|
82
|
-
e > 0 && t.push(
|
|
94
|
+
return o.forEach((l) => {
|
|
95
|
+
e > 0 && t.push(l.key), l.children && (t = t.concat(R(l.children, ++e)));
|
|
83
96
|
}), t;
|
|
84
97
|
};
|
|
85
|
-
return
|
|
86
|
-
const t =
|
|
87
|
-
return
|
|
88
|
-
n(
|
|
98
|
+
return S(), (o, e) => {
|
|
99
|
+
const t = s("a-button"), l = s("a-popconfirm"), m = s("a-button-group"), c = s("a-space"), G = s("a-input-search"), H = s("a-tree"), K = s("a-col"), I = s("a-skeleton"), J = s("a-row"), W = s("a-card");
|
|
100
|
+
return Y(), Z("div", null, [
|
|
101
|
+
n(W, {
|
|
89
102
|
"body-style": { padding: "0 20px 20px 10px" },
|
|
90
103
|
ref_key: "fusRef",
|
|
91
|
-
ref:
|
|
104
|
+
ref: O
|
|
92
105
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
v("div",
|
|
95
|
-
v("div",
|
|
96
|
-
v("div",
|
|
97
|
-
v("div",
|
|
98
|
-
n(
|
|
99
|
-
e[
|
|
106
|
+
default: a(() => [
|
|
107
|
+
v("div", pe, [
|
|
108
|
+
v("div", fe, [
|
|
109
|
+
v("div", me, [
|
|
110
|
+
v("div", _e, [
|
|
111
|
+
n(h(ae)),
|
|
112
|
+
e[3] || (e[3] = y(" 模块配置 "))
|
|
100
113
|
])
|
|
101
114
|
]),
|
|
102
|
-
v("div",
|
|
115
|
+
v("div", ve, [
|
|
103
116
|
n(c, { align: "center" }, {
|
|
104
|
-
default:
|
|
105
|
-
n(
|
|
106
|
-
default:
|
|
107
|
-
n(t, { onClick:
|
|
108
|
-
default:
|
|
109
|
-
n(
|
|
110
|
-
e[
|
|
117
|
+
default: a(() => [
|
|
118
|
+
n(m, null, {
|
|
119
|
+
default: a(() => [
|
|
120
|
+
n(t, { onClick: j }, {
|
|
121
|
+
default: a(() => [
|
|
122
|
+
n(h(N)),
|
|
123
|
+
e[4] || (e[4] = y(" 添加根模块 "))
|
|
111
124
|
]),
|
|
112
125
|
_: 1
|
|
113
126
|
}),
|
|
114
|
-
x(n(t, { onClick:
|
|
115
|
-
default:
|
|
116
|
-
n(
|
|
117
|
-
e[
|
|
127
|
+
x(n(t, { onClick: q }, {
|
|
128
|
+
default: a(() => [
|
|
129
|
+
n(h(N)),
|
|
130
|
+
e[5] || (e[5] = y(" 添加子模块 "))
|
|
118
131
|
]),
|
|
119
132
|
_: 1
|
|
120
133
|
}, 512), [
|
|
121
|
-
[A,
|
|
134
|
+
[A, r.id]
|
|
122
135
|
]),
|
|
123
|
-
x(n(t, { onClick:
|
|
124
|
-
default:
|
|
125
|
-
n(
|
|
126
|
-
e[
|
|
136
|
+
x(n(t, { onClick: P }, {
|
|
137
|
+
default: a(() => [
|
|
138
|
+
n(h(de)),
|
|
139
|
+
e[6] || (e[6] = y(" 修改模块 "))
|
|
127
140
|
]),
|
|
128
141
|
_: 1
|
|
129
142
|
}, 512), [
|
|
130
|
-
[A,
|
|
143
|
+
[A, r.id]
|
|
131
144
|
]),
|
|
132
|
-
n(
|
|
145
|
+
n(l, {
|
|
133
146
|
title: "是否确认删除模块?",
|
|
134
|
-
onConfirm:
|
|
147
|
+
onConfirm: F
|
|
135
148
|
}, {
|
|
136
|
-
default:
|
|
149
|
+
default: a(() => [
|
|
137
150
|
x(n(t, { danger: "" }, {
|
|
138
|
-
default:
|
|
139
|
-
n(
|
|
140
|
-
e[
|
|
151
|
+
default: a(() => [
|
|
152
|
+
n(h(se)),
|
|
153
|
+
e[7] || (e[7] = y(" 删除模块 "))
|
|
141
154
|
]),
|
|
142
155
|
_: 1
|
|
143
156
|
}, 512), [
|
|
144
|
-
[A,
|
|
157
|
+
[A, r.id]
|
|
145
158
|
])
|
|
146
159
|
]),
|
|
147
160
|
_: 1
|
|
@@ -155,25 +168,34 @@ const de = { class: "ant-pro-table-list-toolbar" }, se = { class: "ant-pro-table
|
|
|
155
168
|
])
|
|
156
169
|
])
|
|
157
170
|
]),
|
|
158
|
-
n(
|
|
159
|
-
default:
|
|
160
|
-
n(
|
|
171
|
+
n(J, null, {
|
|
172
|
+
default: a(() => [
|
|
173
|
+
n(K, {
|
|
161
174
|
sm: 5,
|
|
162
175
|
md: 4
|
|
163
176
|
}, {
|
|
164
|
-
default:
|
|
165
|
-
n(
|
|
177
|
+
default: a(() => [
|
|
178
|
+
n(G, {
|
|
179
|
+
value: D.value,
|
|
180
|
+
"onUpdate:value": e[0] || (e[0] = (p) => D.value = p),
|
|
181
|
+
placeholder: "搜索模块",
|
|
182
|
+
"allow-clear": "",
|
|
183
|
+
onSearch: U,
|
|
184
|
+
class: "search-input",
|
|
185
|
+
size: "small"
|
|
186
|
+
}, null, 8, ["value"]),
|
|
187
|
+
n(H, {
|
|
166
188
|
showIcon: !0,
|
|
167
|
-
expandedKeys:
|
|
168
|
-
loadedKeys:
|
|
169
|
-
treeData:
|
|
170
|
-
onExpand:
|
|
171
|
-
loadData:
|
|
172
|
-
onSelect:
|
|
189
|
+
expandedKeys: u.value,
|
|
190
|
+
loadedKeys: g.value,
|
|
191
|
+
treeData: d.value,
|
|
192
|
+
onExpand: V,
|
|
193
|
+
loadData: B,
|
|
194
|
+
onSelect: $
|
|
173
195
|
}, {
|
|
174
|
-
icon:
|
|
175
|
-
n(
|
|
176
|
-
icon:
|
|
196
|
+
icon: a((p) => [
|
|
197
|
+
n(ce, {
|
|
198
|
+
icon: p.iconName
|
|
177
199
|
}, null, 8, ["icon"])
|
|
178
200
|
]),
|
|
179
201
|
_: 1
|
|
@@ -181,14 +203,14 @@ const de = { class: "ant-pro-table-list-toolbar" }, se = { class: "ant-pro-table
|
|
|
181
203
|
]),
|
|
182
204
|
_: 1
|
|
183
205
|
}),
|
|
184
|
-
n(
|
|
206
|
+
n(K, {
|
|
185
207
|
sm: 19,
|
|
186
208
|
md: 20
|
|
187
209
|
}, {
|
|
188
|
-
default:
|
|
189
|
-
n(
|
|
190
|
-
default:
|
|
191
|
-
n(
|
|
210
|
+
default: a(() => [
|
|
211
|
+
n(I, { loading: M.value }, {
|
|
212
|
+
default: a(() => [
|
|
213
|
+
n(ue, { module: r }, null, 8, ["module"])
|
|
192
214
|
]),
|
|
193
215
|
_: 1
|
|
194
216
|
}, 8, ["loading"])
|
|
@@ -201,24 +223,24 @@ const de = { class: "ant-pro-table-list-toolbar" }, se = { class: "ant-pro-table
|
|
|
201
223
|
]),
|
|
202
224
|
_: 1
|
|
203
225
|
}, 512),
|
|
204
|
-
n(
|
|
226
|
+
n(re, {
|
|
205
227
|
ref: "moduleAdd",
|
|
206
|
-
open:
|
|
207
|
-
"onUpdate:open": e[
|
|
208
|
-
"parent-id":
|
|
209
|
-
onSuccess:
|
|
228
|
+
open: i.openAdd,
|
|
229
|
+
"onUpdate:open": e[1] || (e[1] = (p) => i.openAdd = p),
|
|
230
|
+
"parent-id": b.value ? null : r.id,
|
|
231
|
+
onSuccess: z
|
|
210
232
|
}, null, 8, ["open", "parent-id"]),
|
|
211
|
-
n(
|
|
233
|
+
n(ie, {
|
|
212
234
|
ref: "moduleEdit",
|
|
213
|
-
open:
|
|
214
|
-
"onUpdate:open": e[
|
|
215
|
-
"module-id":
|
|
216
|
-
onSuccess:
|
|
235
|
+
open: i.openEdit,
|
|
236
|
+
"onUpdate:open": e[2] || (e[2] = (p) => i.openEdit = p),
|
|
237
|
+
"module-id": r.id,
|
|
238
|
+
onSuccess: Q
|
|
217
239
|
}, null, 8, ["open", "module-id"])
|
|
218
240
|
]);
|
|
219
241
|
};
|
|
220
242
|
}
|
|
221
243
|
});
|
|
222
244
|
export {
|
|
223
|
-
|
|
245
|
+
De as default
|
|
224
246
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { http as t } from "@since2006/utils";
|
|
2
|
-
const
|
|
2
|
+
const l = () => t.get("/api/v1/module/get_categories"), r = (e) => t.post("/api/v1/module/create_module", e), d = (e) => t.get("/api/v1/module/get_module", { params: { id: e } }), a = () => t.get("/api/v1/module/get_cache_modules"), s = (e = null) => {
|
|
3
3
|
const o = {};
|
|
4
4
|
return e && (o.parentId = e), t.get("/api/v1/module/get_nocache_modules", { params: o });
|
|
5
|
-
},
|
|
5
|
+
}, m = (e) => t.post("/api/v1/module/delete_module", { id: e }), n = (e) => t.post("/api/v1/module/update_module", e), p = (e) => t.get("/api/v1/module/query_all_modules", { params: { query: e } });
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r as createModule,
|
|
8
|
+
m as deleteModule,
|
|
9
|
+
l as getDocs,
|
|
10
|
+
d as getModule,
|
|
11
11
|
a as getModules,
|
|
12
12
|
s as getModulesNoCache,
|
|
13
|
-
|
|
13
|
+
p as queryAllModules,
|
|
14
|
+
n as updateModule
|
|
14
15
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = (a) => a ? a.map((e) => ({
|
|
2
2
|
key: e.id,
|
|
3
3
|
title: e.name,
|
|
4
4
|
isLeaf: !e.hasChildren,
|
|
5
5
|
iconName: e.icon,
|
|
6
6
|
type: e.type,
|
|
7
7
|
seqNo: e.seqNo
|
|
8
|
+
})) : [], n = (a) => a ? a.map((e) => ({
|
|
9
|
+
key: e.id,
|
|
10
|
+
title: e.name,
|
|
11
|
+
isLeaf: !e.hasChildren,
|
|
12
|
+
iconName: e.icon,
|
|
13
|
+
type: e.type,
|
|
14
|
+
seqNo: e.seqNo,
|
|
15
|
+
children: n(e.children)
|
|
8
16
|
})) : [];
|
|
9
17
|
export {
|
|
10
|
-
|
|
18
|
+
r as mapTreeData,
|
|
19
|
+
n as mapTreeDataRecursive
|
|
11
20
|
};
|
package/dist/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.large-text[data-v-74bb63d3]{font-size:16px}.float-right[data-v-74bb63d3]{float:right}.margin-block[data-v-74bb63d3]{margin-top:14px}.icon-selector deep(ul) li.active[data-v-a47fcf40],.icon-selector deep(ul) li[data-v-a47fcf40]:hover{border-radius:2px;border-color:#4a4a48;background-color:#4a4a48;color:#fff;transition:all .3s;box-shadow:none}.icon-selector deep(ul) i[data-v-a47fcf40]{font-size:1.5rem;border:1px solid #f1f1f1;padding:.02rem;margin:.03rem;cursor:pointer}.ant-form[data-v-f8a348f6]{padding-top:20px}.permission-tree[data-v-f8a348f6],.permission-tree[data-v-50a6d9f1]{overflow-y:auto;overflow-x:hidden;margin-top:10px}[data-v-
|
|
1
|
+
.large-text[data-v-74bb63d3]{font-size:16px}.float-right[data-v-74bb63d3]{float:right}.margin-block[data-v-74bb63d3]{margin-top:14px}.icon-selector deep(ul) li.active[data-v-a47fcf40],.icon-selector deep(ul) li[data-v-a47fcf40]:hover{border-radius:2px;border-color:#4a4a48;background-color:#4a4a48;color:#fff;transition:all .3s;box-shadow:none}.icon-selector deep(ul) i[data-v-a47fcf40]{font-size:1.5rem;border:1px solid #f1f1f1;padding:.02rem;margin:.03rem;cursor:pointer}.ant-form[data-v-f8a348f6]{padding-top:20px}.permission-tree[data-v-f8a348f6],.permission-tree[data-v-50a6d9f1]{overflow-y:auto;overflow-x:hidden;margin-top:10px}[data-v-730b9499] .ant-pro-table-list-toolbar-container{padding-left:6px}.ant-input-search[data-v-730b9499]{margin-bottom:8px}.search-input[data-v-730b9499]{width:100%;padding-left:10px;padding-right:10px}@media (min-width: 1280px){.search-input[data-v-730b9499]{width:80%}}@media (min-width: 1920px){.search-input[data-v-730b9499]{width:70%}}.cron-detail[data-v-dd4b2211]{border:1px dashed #a6a6a6;padding:6px;line-height:1.5;margin:4px 0}.cron-detail .ant-input-number[data-v-dd4b2211]{width:70px}.cron-detail .ant-input[data-v-dd4b2211]{width:280px}.cron-detail[data-v-3b943880]{border:1px dashed #a6a6a6;padding:6px;line-height:1.5;margin:4px 0}.cron-detail .ant-input-number[data-v-3b943880]{width:70px}.cron-detail .ant-input[data-v-3b943880]{width:280px}[data-v-418f353d] .ant-descriptions-item-label{width:140px}.text-ellipsis[data-v-c407c636]{display:inline-block;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}[data-v-c407c636] .ant-descriptions-item-label{width:120px}.ua-icon[data-v-f846ecbb]{width:1.2em;height:1.2em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.login-log-list .text-ellipsis[data-v-f4cf8b13]{display:inline-block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.method-text[data-v-8d1c9637]{background:#f5f5f5;padding:2px 6px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px}.json-container[data-v-8d1c9637]{max-height:300px;overflow:auto;background:#f5f5f5;padding:12px;border-radius:4px}.json-container pre[data-v-8d1c9637]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word}[data-v-8d1c9637] .ant-descriptions-item-label{width:120px}.operation-log-list .text-ellipsis[data-v-d2d8eebd]{display:inline-block;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}[data-v-bdeeb034] .ant-descriptions-item-label{width:120px}.audit-log-list .text-ellipsis[data-v-4290a852]{display:inline-block;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.text-ellipsis[data-v-7436a600]{display:inline-block;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.performance-analysis[data-v-7436a600]{padding:16px;background:#fafafa;border-radius:6px}.performance-analysis[data-v-7436a600] .ant-statistic{text-align:center}[data-v-7436a600] .ant-descriptions-item-label{width:120px}.access-log-list .text-ellipsis[data-v-6ddd5a92]{display:inline-block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.json-container[data-v-793d348e]{max-height:200px;overflow:auto;background:#f5f5f5;padding:12px;border-radius:4px}.json-container pre[data-v-793d348e]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word}.stack-container[data-v-793d348e]{max-height:400px;overflow:auto;background:#fff2f0;border:1px solid #ffccc7;padding:12px;border-radius:4px}.stack-container pre[data-v-793d348e]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:11px;line-height:1.4;color:#a8071a}[data-v-793d348e] .ant-descriptions-item-label{width:120px}.error-log-list .text-ellipsis[data-v-42424c70]{display:inline-block;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.notice[data-v-1d93855a]{color:#ff4d4f;font-size:18px}.table-operator[data-v-d604435e]{margin:10px 14px 20px 0}[data-v-d604435e] .ant-descriptions-item-label{width:140px}.tree-container[data-v-d604435e] .ant-tree{max-height:520px;overflow:auto}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ModuleIndex.vue2.js");;/* empty css */const u=require("../../../_virtual/_plugin-vue_export-helper.js"),t=u.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ModuleIndex.vue2.js");;/* empty css */const u=require("../../../_virtual/_plugin-vue_export-helper.js"),t=u.default(e.default,[["__scopeId","data-v-730b9499"]]);exports.default=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("ant-design-vue"),p=require("./api.js"),v=require("./utils.js"),_=require("@ant-design/icons-vue"),z=require("./ModuleDetail.vue.js"),Q=require("./ModuleAdd.vue.js"),F=require("./ModuleEdit.vue.js"),G=require("./icon/AppIcon.vue.js"),H={class:"ant-pro-table-list-toolbar"},J={class:"ant-pro-table-list-toolbar-container"},W={class:"ant-pro-table-list-toolbar-left"},X={class:"ant-pro-table-list-toolbar-title"},Y={class:"ant-pro-table-list-toolbar-right"},Z=e.defineComponent({__name:"ModuleIndex",setup($){const E=e.ref(),d=e.ref([]),m=e.ref([]),C=e.ref(""),l=e.ref([]),r=e.reactive({id:"",cateId:"",parentId:"",icon:"",component:"",path:"",seqNo:"",remark:"",permsSummary:""}),N=e.ref(!0),s=e.reactive({openAdd:!1,openEdit:!1}),V=e.ref(!1),x=()=>{p.getModulesNoCache().then(o=>{l.value=v.mapTreeData(o.data),h(l.value[0].key)})},k=o=>{if(!o){x();return}p.queryAllModules(o).then(t=>{l.value=v.mapTreeDataRecursive(t.data),d.value=g(l.value),m.value=[],l.value.length>0&&h(l.value[0].key)})},g=o=>{const t=[];return o.forEach(n=>{t.push(n.key),n.children&&n.children.length>0&&t.push(...g(n.children))}),t},T=o=>{d.value=o},b=o=>new Promise(t=>{if(o.dataRef.children){t("当前节点没有子模块");return}p.getModulesNoCache(o.dataRef.key).then(n=>{o.dataRef.children=v.mapTreeData(n.data),l.value=[...l.value],t("获取模块数据成功")})}),D=(o,t)=>{const n=t.node.dataRef,a=d.value.includes(n.key);if(n.isLeaf||(t.selected?a||d.value.push(n.key):a&&(d.value=d.value.filter(u=>u!==n.key))),o.length===0)return;const i=o[0];h(i)},h=o=>{N.value=!0,p.getModule(o).then(t=>{Object.assign(r,t.data),N.value=!1}).catch(t=>{console.log(t)})},A=()=>{V.value=!0,s.openAdd=!0},S=()=>{V.value=!1,s.openAdd=!0},q=o=>{f(o)},R=()=>{s.openEdit=!0},K=(o,t,n)=>{h(o),t===n||f(n),f(t)},O=()=>{p.deleteModule(r.id).then(o=>{I.message.success("删除成功"),f(o.data.parentId)})},f=o=>{p.getModulesNoCache(o).then(t=>{o?y(l.value,o,v.mapTreeData(t.data)):l.value=v.mapTreeData(t.data)})},y=(o,t,n)=>{o.forEach(a=>{if(a.key===t){a.isLeaf=n.length===0;const i=w([a],0);m.value=m.value.filter(u=>!i.includes(u)),d.value=d.value.filter(u=>!i.includes(u)),a.children=n}else a.children&&y(a.children,t,n)})},w=(o,t)=>{let n=[];return o.forEach(a=>{t>0&&n.push(a.key),a.children&&(n=n.concat(w(a.children,++t)))}),n};return x(),(o,t)=>{const n=e.resolveComponent("a-button"),a=e.resolveComponent("a-popconfirm"),i=e.resolveComponent("a-button-group"),u=e.resolveComponent("a-space"),L=e.resolveComponent("a-input-search"),P=e.resolveComponent("a-tree"),M=e.resolveComponent("a-col"),U=e.resolveComponent("a-skeleton"),j=e.resolveComponent("a-row"),B=e.resolveComponent("a-card");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(B,{"body-style":{padding:"0 20px 20px 10px"},ref_key:"fusRef",ref:E},{default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",J,[e.createElementVNode("div",W,[e.createElementVNode("div",X,[e.createVNode(e.unref(_.LayoutTwoTone)),t[3]||(t[3]=e.createTextVNode(" 模块配置 "))])]),e.createElementVNode("div",Y,[e.createVNode(u,{align:"center"},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(n,{onClick:A},{default:e.withCtx(()=>[e.createVNode(e.unref(_.PlusOutlined)),t[4]||(t[4]=e.createTextVNode(" 添加根模块 "))]),_:1}),e.withDirectives(e.createVNode(n,{onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(_.PlusOutlined)),t[5]||(t[5]=e.createTextVNode(" 添加子模块 "))]),_:1},512),[[e.vShow,r.id]]),e.withDirectives(e.createVNode(n,{onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(_.EditOutlined)),t[6]||(t[6]=e.createTextVNode(" 修改模块 "))]),_:1},512),[[e.vShow,r.id]]),e.createVNode(a,{title:"是否确认删除模块?",onConfirm:O},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{danger:""},{default:e.withCtx(()=>[e.createVNode(e.unref(_.DeleteOutlined)),t[7]||(t[7]=e.createTextVNode(" 删除模块 "))]),_:1},512),[[e.vShow,r.id]])]),_:1})]),_:1})]),_:1})])])]),e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(M,{sm:5,md:4},{default:e.withCtx(()=>[e.createVNode(L,{value:C.value,"onUpdate:value":t[0]||(t[0]=c=>C.value=c),placeholder:"搜索模块","allow-clear":"",onSearch:k,class:"search-input",size:"small"},null,8,["value"]),e.createVNode(P,{showIcon:!0,expandedKeys:d.value,loadedKeys:m.value,treeData:l.value,onExpand:T,loadData:b,onSelect:D},{icon:e.withCtx(c=>[e.createVNode(G.default,{icon:c.iconName},null,8,["icon"])]),_:1},8,["expandedKeys","loadedKeys","treeData"])]),_:1}),e.createVNode(M,{sm:19,md:20},{default:e.withCtx(()=>[e.createVNode(U,{loading:N.value},{default:e.withCtx(()=>[e.createVNode(z.default,{module:r},null,8,["module"])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},512),e.createVNode(Q.default,{ref:"moduleAdd",open:s.openAdd,"onUpdate:open":t[1]||(t[1]=c=>s.openAdd=c),"parent-id":V.value?null:r.id,onSuccess:q},null,8,["open","parent-id"]),e.createVNode(F.default,{ref:"moduleEdit",open:s.openEdit,"onUpdate:open":t[2]||(t[2]=c=>s.openEdit=c),"module-id":r.id,onSuccess:K},null,8,["open","module-id"])])}}});exports.default=Z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@since2006/utils"),u=()=>t.http.get("/api/v1/module/get_categories"),l=e=>t.http.post("/api/v1/module/create_module",e),d=e=>t.http.get("/api/v1/module/get_module",{params:{id:e}}),r=()=>t.http.get("/api/v1/module/get_cache_modules"),s=(e=null)=>{const o={};return e&&(o.parentId=e),t.http.get("/api/v1/module/get_nocache_modules",{params:o})},a=e=>t.http.post("/api/v1/module/delete_module",{id:e}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@since2006/utils"),u=()=>t.http.get("/api/v1/module/get_categories"),l=e=>t.http.post("/api/v1/module/create_module",e),d=e=>t.http.get("/api/v1/module/get_module",{params:{id:e}}),r=()=>t.http.get("/api/v1/module/get_cache_modules"),s=(e=null)=>{const o={};return e&&(o.parentId=e),t.http.get("/api/v1/module/get_nocache_modules",{params:o})},a=e=>t.http.post("/api/v1/module/delete_module",{id:e}),p=e=>t.http.post("/api/v1/module/update_module",e),c=e=>t.http.get("/api/v1/module/query_all_modules",{params:{query:e}});exports.createModule=l;exports.deleteModule=a;exports.getDocs=u;exports.getModule=d;exports.getModules=r;exports.getModulesNoCache=s;exports.queryAllModules=c;exports.updateModule=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=a=>a?a.map(e=>({key:e.id,title:e.name,isLeaf:!e.hasChildren,iconName:e.icon,type:e.type,seqNo:e.seqNo})):[];exports.mapTreeData=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=a=>a?a.map(e=>({key:e.id,title:e.name,isLeaf:!e.hasChildren,iconName:e.icon,type:e.type,seqNo:e.seqNo})):[],r=a=>a?a.map(e=>({key:e.id,title:e.name,isLeaf:!e.hasChildren,iconName:e.icon,type:e.type,seqNo:e.seqNo,children:r(e.children)})):[];exports.mapTreeData=n;exports.mapTreeDataRecursive=r;
|
package/dist/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.large-text[data-v-74bb63d3]{font-size:16px}.float-right[data-v-74bb63d3]{float:right}.margin-block[data-v-74bb63d3]{margin-top:14px}.icon-selector deep(ul) li.active[data-v-a47fcf40],.icon-selector deep(ul) li[data-v-a47fcf40]:hover{border-radius:2px;border-color:#4a4a48;background-color:#4a4a48;color:#fff;transition:all .3s;box-shadow:none}.icon-selector deep(ul) i[data-v-a47fcf40]{font-size:1.5rem;border:1px solid #f1f1f1;padding:.02rem;margin:.03rem;cursor:pointer}.ant-form[data-v-f8a348f6]{padding-top:20px}.permission-tree[data-v-f8a348f6],.permission-tree[data-v-50a6d9f1]{overflow-y:auto;overflow-x:hidden;margin-top:10px}[data-v-
|
|
1
|
+
.large-text[data-v-74bb63d3]{font-size:16px}.float-right[data-v-74bb63d3]{float:right}.margin-block[data-v-74bb63d3]{margin-top:14px}.icon-selector deep(ul) li.active[data-v-a47fcf40],.icon-selector deep(ul) li[data-v-a47fcf40]:hover{border-radius:2px;border-color:#4a4a48;background-color:#4a4a48;color:#fff;transition:all .3s;box-shadow:none}.icon-selector deep(ul) i[data-v-a47fcf40]{font-size:1.5rem;border:1px solid #f1f1f1;padding:.02rem;margin:.03rem;cursor:pointer}.ant-form[data-v-f8a348f6]{padding-top:20px}.permission-tree[data-v-f8a348f6],.permission-tree[data-v-50a6d9f1]{overflow-y:auto;overflow-x:hidden;margin-top:10px}[data-v-730b9499] .ant-pro-table-list-toolbar-container{padding-left:6px}.ant-input-search[data-v-730b9499]{margin-bottom:8px}.search-input[data-v-730b9499]{width:100%;padding-left:10px;padding-right:10px}@media (min-width: 1280px){.search-input[data-v-730b9499]{width:80%}}@media (min-width: 1920px){.search-input[data-v-730b9499]{width:70%}}.cron-detail[data-v-dd4b2211]{border:1px dashed #a6a6a6;padding:6px;line-height:1.5;margin:4px 0}.cron-detail .ant-input-number[data-v-dd4b2211]{width:70px}.cron-detail .ant-input[data-v-dd4b2211]{width:280px}.cron-detail[data-v-3b943880]{border:1px dashed #a6a6a6;padding:6px;line-height:1.5;margin:4px 0}.cron-detail .ant-input-number[data-v-3b943880]{width:70px}.cron-detail .ant-input[data-v-3b943880]{width:280px}[data-v-418f353d] .ant-descriptions-item-label{width:140px}.text-ellipsis[data-v-c407c636]{display:inline-block;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}[data-v-c407c636] .ant-descriptions-item-label{width:120px}.ua-icon[data-v-f846ecbb]{width:1.2em;height:1.2em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.login-log-list .text-ellipsis[data-v-f4cf8b13]{display:inline-block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.method-text[data-v-8d1c9637]{background:#f5f5f5;padding:2px 6px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px}.json-container[data-v-8d1c9637]{max-height:300px;overflow:auto;background:#f5f5f5;padding:12px;border-radius:4px}.json-container pre[data-v-8d1c9637]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word}[data-v-8d1c9637] .ant-descriptions-item-label{width:120px}.operation-log-list .text-ellipsis[data-v-d2d8eebd]{display:inline-block;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}[data-v-bdeeb034] .ant-descriptions-item-label{width:120px}.audit-log-list .text-ellipsis[data-v-4290a852]{display:inline-block;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.text-ellipsis[data-v-7436a600]{display:inline-block;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.performance-analysis[data-v-7436a600]{padding:16px;background:#fafafa;border-radius:6px}.performance-analysis[data-v-7436a600] .ant-statistic{text-align:center}[data-v-7436a600] .ant-descriptions-item-label{width:120px}.access-log-list .text-ellipsis[data-v-6ddd5a92]{display:inline-block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.json-container[data-v-793d348e]{max-height:200px;overflow:auto;background:#f5f5f5;padding:12px;border-radius:4px}.json-container pre[data-v-793d348e]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word}.stack-container[data-v-793d348e]{max-height:400px;overflow:auto;background:#fff2f0;border:1px solid #ffccc7;padding:12px;border-radius:4px}.stack-container pre[data-v-793d348e]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:11px;line-height:1.4;color:#a8071a}[data-v-793d348e] .ant-descriptions-item-label{width:120px}.error-log-list .text-ellipsis[data-v-42424c70]{display:inline-block;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.notice[data-v-1d93855a]{color:#ff4d4f;font-size:18px}.table-operator[data-v-d604435e]{margin:10px 14px 20px 0}[data-v-d604435e] .ant-descriptions-item-label{width:140px}.tree-container[data-v-d604435e] .ant-tree{max-height:520px;overflow:auto}
|