@since2006/pages 1.0.0-build.2025011700 → 2025.8.1
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/index.js +10 -8
- package/dist/es/src/app/module/ModuleAdd.vue.js +7 -0
- package/dist/es/src/app/module/ModuleAdd.vue2.js +280 -0
- package/dist/es/src/app/module/ModuleDetail.vue.js +133 -0
- package/dist/es/src/app/module/ModuleDetail.vue2.js +4 -0
- package/dist/es/src/app/module/ModuleEdit.vue.js +7 -0
- package/dist/es/src/app/module/ModuleEdit.vue2.js +283 -0
- package/dist/es/src/app/module/ModuleIndex.vue.js +218 -0
- package/dist/es/src/app/module/ModuleIndex.vue2.js +4 -0
- package/dist/es/src/app/module/api.js +14 -0
- package/dist/es/src/app/module/icon/IconSelectorModal.vue.js +7 -0
- package/dist/es/src/app/module/icon/IconSelectorModal.vue2.js +39 -0
- package/dist/es/src/app/module/index.js +9 -0
- package/dist/es/src/app/module/utils.js +11 -0
- package/dist/es/src/app/system/StatusIndex.vue.js +2 -2
- package/dist/es/src/app/system/StatusIndex.vue2.js +253 -160
- package/dist/es/src/app/system/api.js +3 -2
- package/dist/es/src/index.js +4 -2
- package/dist/es/style.css +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/src/app/module/ModuleAdd.vue.js +1 -0
- package/dist/lib/src/app/module/ModuleAdd.vue2.js +1 -0
- package/dist/lib/src/app/module/ModuleDetail.vue.js +1 -0
- package/dist/lib/src/app/module/ModuleDetail.vue2.js +1 -0
- package/dist/lib/src/app/module/ModuleEdit.vue.js +1 -0
- package/dist/lib/src/app/module/ModuleEdit.vue2.js +1 -0
- package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -0
- package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -0
- package/dist/lib/src/app/module/api.js +1 -0
- package/dist/lib/src/app/module/icon/IconSelectorModal.vue.js +1 -0
- package/dist/lib/src/app/module/icon/IconSelectorModal.vue2.js +1 -0
- package/dist/lib/src/app/module/index.js +1 -0
- package/dist/lib/src/app/module/utils.js +1 -0
- package/dist/lib/src/app/system/StatusIndex.vue.js +1 -1
- package/dist/lib/src/app/system/StatusIndex.vue2.js +1 -1
- package/dist/lib/src/app/system/api.js +1 -1
- package/dist/lib/src/index.js +1 -1
- package/dist/lib/style.css +1 -1
- package/package.json +2 -1
package/dist/es/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { StatusIndex as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as e from "./src/index.js";
|
|
2
|
+
import { StatusIndex as d } from "./src/app/system/index.js";
|
|
3
|
+
import { ModuleIndex as a } from "./src/app/module/index.js";
|
|
4
|
+
const r = {
|
|
5
|
+
install: (o) => {
|
|
6
|
+
for (let t in e)
|
|
7
|
+
o.use(e[t]);
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
a as
|
|
11
|
-
|
|
11
|
+
a as ModuleIndex,
|
|
12
|
+
d as StatusIndex,
|
|
13
|
+
r as default
|
|
12
14
|
};
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { defineComponent as G, ref as d, reactive as H, watch as J, resolveComponent as u, openBlock as U, createBlock as N, withCtx as a, createVNode as t, resolveDynamicComponent as K, unref as q, createTextVNode as y } from "vue";
|
|
2
|
+
import Q from "./icon/IconSelectorModal.vue.js";
|
|
3
|
+
import { message as W } from "ant-design-vue";
|
|
4
|
+
import { SearchOutlined as X } from "@ant-design/icons-vue";
|
|
5
|
+
import { getModules as Y, getDocs as Z, createModule as ee } from "./api.js";
|
|
6
|
+
import { PermPanel as te } from "@since2006/components";
|
|
7
|
+
const se = /* @__PURE__ */ G({
|
|
8
|
+
__name: "ModuleAdd",
|
|
9
|
+
props: {
|
|
10
|
+
open: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
parentId: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: null
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:open", "success", "cancel"],
|
|
20
|
+
setup(_, { emit: h }) {
|
|
21
|
+
const m = _, b = d(), p = d([]), f = d(!1), g = d([]), I = d([]), i = d({
|
|
22
|
+
icon: !1
|
|
23
|
+
}), w = {
|
|
24
|
+
id: "",
|
|
25
|
+
cateId: "",
|
|
26
|
+
parentId: "",
|
|
27
|
+
name: "",
|
|
28
|
+
icon: "",
|
|
29
|
+
path: "",
|
|
30
|
+
component: "",
|
|
31
|
+
seqNo: "",
|
|
32
|
+
remark: "",
|
|
33
|
+
state: "0",
|
|
34
|
+
target: !1,
|
|
35
|
+
permissionSummary: ""
|
|
36
|
+
}, l = H({ ...w }), x = {
|
|
37
|
+
name: [{ required: !0, message: "请填写模块名称" }],
|
|
38
|
+
seqNo: [{ required: !0, type: "number", message: "请填写数字类型顺序号" }]
|
|
39
|
+
}, v = h;
|
|
40
|
+
J(
|
|
41
|
+
() => m.open,
|
|
42
|
+
(n) => {
|
|
43
|
+
n && (D(), O());
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
const D = () => {
|
|
47
|
+
Object.assign(l, w), p.value = [];
|
|
48
|
+
}, L = (n, e) => e.componentOptions.children[0].text.toLowerCase().indexOf(n.toLowerCase()) >= 0, O = () => {
|
|
49
|
+
Y().then((n) => {
|
|
50
|
+
const e = [];
|
|
51
|
+
k(e, n.result, []), g.value = e, m.parentId && (l.parentId = m.parentId);
|
|
52
|
+
}), Z().then((n) => {
|
|
53
|
+
I.value = M(n.result);
|
|
54
|
+
});
|
|
55
|
+
}, V = () => {
|
|
56
|
+
i.value.icon = !0;
|
|
57
|
+
}, A = (n) => {
|
|
58
|
+
i.value.icon = !1, l.icon = n;
|
|
59
|
+
}, B = () => {
|
|
60
|
+
b.value.validateFields().then(() => {
|
|
61
|
+
f.value = !0;
|
|
62
|
+
const n = {
|
|
63
|
+
...l,
|
|
64
|
+
target: l.target ? 1 : 0,
|
|
65
|
+
permIds: p.value,
|
|
66
|
+
seqNo: parseInt(l.seqNo)
|
|
67
|
+
};
|
|
68
|
+
ee(n).then((e) => {
|
|
69
|
+
W.success("添加模块成功"), v("update:open", !1), v("success", e.result.parentId);
|
|
70
|
+
});
|
|
71
|
+
}).finally((n) => {
|
|
72
|
+
f.value = !1;
|
|
73
|
+
});
|
|
74
|
+
}, F = () => {
|
|
75
|
+
v("update:open", !1);
|
|
76
|
+
}, k = (n, e, c) => {
|
|
77
|
+
e && e.forEach((r) => {
|
|
78
|
+
if (!c.includes(r.id)) {
|
|
79
|
+
const s = { value: r.id, title: r.name, children: [] };
|
|
80
|
+
k(s.children, r.children, c), n.push(s);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}, M = (n) => n.map((e) => ({
|
|
84
|
+
value: e.id,
|
|
85
|
+
label: e.name
|
|
86
|
+
}));
|
|
87
|
+
return (n, e) => {
|
|
88
|
+
const c = u("a-tree-select"), r = u("a-form-item"), s = u("a-input"), R = u("a-select"), E = u("a-input-number"), S = u("a-radio"), P = u("a-radio-group"), T = u("a-switch"), C = u("a-col"), j = u("a-row"), $ = u("a-form"), z = u("a-modal");
|
|
89
|
+
return U(), N(z, {
|
|
90
|
+
title: "添加系统模块",
|
|
91
|
+
width: 800,
|
|
92
|
+
visible: _.open,
|
|
93
|
+
"mask-closable": !1,
|
|
94
|
+
"confirm-loading": f.value,
|
|
95
|
+
"destroy-on-close": "",
|
|
96
|
+
onOk: B,
|
|
97
|
+
onCancel: F
|
|
98
|
+
}, {
|
|
99
|
+
default: a(() => [
|
|
100
|
+
t($, {
|
|
101
|
+
ref_key: "formRef",
|
|
102
|
+
ref: b,
|
|
103
|
+
model: l,
|
|
104
|
+
rules: x,
|
|
105
|
+
"label-col": { span: 5 },
|
|
106
|
+
"wrapper-col": { span: 15 }
|
|
107
|
+
}, {
|
|
108
|
+
default: a(() => [
|
|
109
|
+
t(j, null, {
|
|
110
|
+
default: a(() => [
|
|
111
|
+
t(C, { span: 15 }, {
|
|
112
|
+
default: a(() => [
|
|
113
|
+
t(r, { label: "上级模块" }, {
|
|
114
|
+
default: a(() => [
|
|
115
|
+
t(c, {
|
|
116
|
+
value: l.parentId,
|
|
117
|
+
"onUpdate:value": e[0] || (e[0] = (o) => l.parentId = o),
|
|
118
|
+
treeData: g.value,
|
|
119
|
+
treeDefaultExpandAll: "",
|
|
120
|
+
allowClear: ""
|
|
121
|
+
}, null, 8, ["value", "treeData"])
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}),
|
|
125
|
+
t(r, {
|
|
126
|
+
label: "模块名称",
|
|
127
|
+
name: "name"
|
|
128
|
+
}, {
|
|
129
|
+
default: a(() => [
|
|
130
|
+
t(s, {
|
|
131
|
+
value: l.name,
|
|
132
|
+
"onUpdate:value": e[1] || (e[1] = (o) => l.name = o),
|
|
133
|
+
placeholder: "模块名称"
|
|
134
|
+
}, null, 8, ["value"])
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
}),
|
|
138
|
+
t(r, { label: "文档类别" }, {
|
|
139
|
+
default: a(() => [
|
|
140
|
+
t(R, {
|
|
141
|
+
value: l.cateId,
|
|
142
|
+
"onUpdate:value": e[2] || (e[2] = (o) => l.cateId = o),
|
|
143
|
+
"show-search": "",
|
|
144
|
+
"option-filter-prop": "children",
|
|
145
|
+
"filter-option": L,
|
|
146
|
+
options: I.value,
|
|
147
|
+
allowClear: ""
|
|
148
|
+
}, null, 8, ["value", "options"])
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}),
|
|
152
|
+
t(r, { label: "模块图标" }, {
|
|
153
|
+
default: a(() => [
|
|
154
|
+
t(s, {
|
|
155
|
+
value: l.icon,
|
|
156
|
+
"onUpdate:value": e[3] || (e[3] = (o) => l.icon = o),
|
|
157
|
+
placeholder: "点击右侧按钮选择图标"
|
|
158
|
+
}, {
|
|
159
|
+
prefix: a(() => [
|
|
160
|
+
(U(), N(K(l.icon), { style: { color: "#108b16" } }))
|
|
161
|
+
]),
|
|
162
|
+
addonAfter: a(() => [
|
|
163
|
+
t(q(X), { onClick: V })
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}, 8, ["value"])
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}),
|
|
170
|
+
t(r, {
|
|
171
|
+
label: "顺序号",
|
|
172
|
+
name: "seqNo"
|
|
173
|
+
}, {
|
|
174
|
+
default: a(() => [
|
|
175
|
+
t(E, {
|
|
176
|
+
value: l.seqNo,
|
|
177
|
+
"onUpdate:value": e[4] || (e[4] = (o) => l.seqNo = o),
|
|
178
|
+
placeholder: "顺序号"
|
|
179
|
+
}, null, 8, ["value"])
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}),
|
|
183
|
+
t(r, { label: "访问路径" }, {
|
|
184
|
+
default: a(() => [
|
|
185
|
+
t(s, {
|
|
186
|
+
value: l.path,
|
|
187
|
+
"onUpdate:value": e[5] || (e[5] = (o) => l.path = o),
|
|
188
|
+
placeholder: "访问路径"
|
|
189
|
+
}, null, 8, ["value"])
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
}),
|
|
193
|
+
t(r, { label: "模板文件" }, {
|
|
194
|
+
default: a(() => [
|
|
195
|
+
t(s, {
|
|
196
|
+
value: l.component,
|
|
197
|
+
"onUpdate:value": e[6] || (e[6] = (o) => l.component = o),
|
|
198
|
+
placeholder: "@/epp/module/viewName"
|
|
199
|
+
}, null, 8, ["value"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}),
|
|
203
|
+
t(r, { label: "是否显示" }, {
|
|
204
|
+
default: a(() => [
|
|
205
|
+
t(P, {
|
|
206
|
+
value: l.state,
|
|
207
|
+
"onUpdate:value": e[7] || (e[7] = (o) => l.state = o)
|
|
208
|
+
}, {
|
|
209
|
+
default: a(() => [
|
|
210
|
+
t(S, { value: "1" }, {
|
|
211
|
+
default: a(() => e[12] || (e[12] = [
|
|
212
|
+
y("显示")
|
|
213
|
+
])),
|
|
214
|
+
_: 1
|
|
215
|
+
}),
|
|
216
|
+
t(S, { value: "0" }, {
|
|
217
|
+
default: a(() => e[13] || (e[13] = [
|
|
218
|
+
y("隐藏")
|
|
219
|
+
])),
|
|
220
|
+
_: 1
|
|
221
|
+
})
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["value"])
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}),
|
|
228
|
+
t(r, { label: "打开方式" }, {
|
|
229
|
+
default: a(() => [
|
|
230
|
+
t(T, {
|
|
231
|
+
checked: l.target,
|
|
232
|
+
"onUpdate:checked": e[8] || (e[8] = (o) => l.target = o),
|
|
233
|
+
"checked-children": "新开窗口",
|
|
234
|
+
"un-checked-children": "内部窗口"
|
|
235
|
+
}, null, 8, ["checked"])
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}),
|
|
239
|
+
t(r, { label: "描述" }, {
|
|
240
|
+
default: a(() => [
|
|
241
|
+
t(s, {
|
|
242
|
+
value: l.remark,
|
|
243
|
+
"onUpdate:value": e[9] || (e[9] = (o) => l.remark = o),
|
|
244
|
+
placeholder: "描述"
|
|
245
|
+
}, null, 8, ["value"])
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
})
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}),
|
|
252
|
+
t(C, { span: 9 }, {
|
|
253
|
+
default: a(() => [
|
|
254
|
+
t(q(te), {
|
|
255
|
+
modelValue: p.value,
|
|
256
|
+
"onUpdate:modelValue": e[10] || (e[10] = (o) => p.value = o)
|
|
257
|
+
}, null, 8, ["modelValue"])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
})
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
})
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["model"]),
|
|
267
|
+
t(Q, {
|
|
268
|
+
visible: i.value.icon,
|
|
269
|
+
onSuccess: A,
|
|
270
|
+
onCancel: e[11] || (e[11] = (o) => i.value.icon = !1)
|
|
271
|
+
}, null, 8, ["visible"])
|
|
272
|
+
]),
|
|
273
|
+
_: 1
|
|
274
|
+
}, 8, ["visible", "confirm-loading"]);
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
export {
|
|
279
|
+
se as default
|
|
280
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { defineComponent as _, resolveComponent as s, openBlock as a, createBlock as d, withCtx as l, createVNode as n, createTextVNode as o, toDisplayString as m, resolveDynamicComponent as C, createCommentVNode as r, createElementVNode as c, unref as f, createElementBlock as y, Fragment as k } from "vue";
|
|
2
|
+
import { ClickCopy as b } from "@since2006/components";
|
|
3
|
+
const v = { style: { color: "#a6a6a6", "margin-left": "4px" } }, D = /* @__PURE__ */ _({
|
|
4
|
+
__name: "ModuleDetail",
|
|
5
|
+
props: {
|
|
6
|
+
module: {}
|
|
7
|
+
},
|
|
8
|
+
setup(N) {
|
|
9
|
+
return (e, u) => {
|
|
10
|
+
const t = s("a-descriptions-item"), p = s("a-tag"), g = s("a-descriptions");
|
|
11
|
+
return a(), d(g, {
|
|
12
|
+
bordered: "",
|
|
13
|
+
column: 1,
|
|
14
|
+
labelStyle: { width: "140px", textAlign: "center" }
|
|
15
|
+
}, {
|
|
16
|
+
default: l(() => [
|
|
17
|
+
n(t, { label: "模块名称" }, {
|
|
18
|
+
default: l(() => [
|
|
19
|
+
o(m(e.module.name), 1)
|
|
20
|
+
]),
|
|
21
|
+
_: 1
|
|
22
|
+
}),
|
|
23
|
+
n(t, { label: "文档类别" }, {
|
|
24
|
+
default: l(() => {
|
|
25
|
+
var i;
|
|
26
|
+
return [
|
|
27
|
+
o(m((i = e.module.cate) == null ? void 0 : i.name), 1)
|
|
28
|
+
];
|
|
29
|
+
}),
|
|
30
|
+
_: 1
|
|
31
|
+
}),
|
|
32
|
+
n(t, { label: "模块图标" }, {
|
|
33
|
+
default: l(() => [
|
|
34
|
+
e.module.icon ? (a(), d(C(e.module.icon), {
|
|
35
|
+
key: 0,
|
|
36
|
+
style: { "font-size": "16px" }
|
|
37
|
+
})) : r("", !0),
|
|
38
|
+
c("span", v, m(e.module.icon), 1)
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
}),
|
|
42
|
+
n(t, { label: "访问路径" }, {
|
|
43
|
+
default: l(() => [
|
|
44
|
+
o(m(e.module.path) + " ", 1),
|
|
45
|
+
e.module.path ? (a(), d(f(b), {
|
|
46
|
+
key: 0,
|
|
47
|
+
value: e.module.path
|
|
48
|
+
}, null, 8, ["value"])) : r("", !0)
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}),
|
|
52
|
+
n(t, { label: "模板文件" }, {
|
|
53
|
+
default: l(() => [
|
|
54
|
+
o(m(e.module.component) + " ", 1),
|
|
55
|
+
e.module.component ? (a(), d(f(b), {
|
|
56
|
+
key: 0,
|
|
57
|
+
value: e.module.component
|
|
58
|
+
}, null, 8, ["value"])) : r("", !0)
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}),
|
|
62
|
+
n(t, { label: "打开方式" }, {
|
|
63
|
+
default: l(() => [
|
|
64
|
+
e.module.target != null ? (a(), y(k, { key: 0 }, [
|
|
65
|
+
e.module.target === 1 ? (a(), d(p, {
|
|
66
|
+
key: 0,
|
|
67
|
+
color: "red"
|
|
68
|
+
}, {
|
|
69
|
+
default: l(() => u[0] || (u[0] = [
|
|
70
|
+
o("新开窗口")
|
|
71
|
+
])),
|
|
72
|
+
_: 1
|
|
73
|
+
})) : (a(), d(p, { key: 1 }, {
|
|
74
|
+
default: l(() => u[1] || (u[1] = [
|
|
75
|
+
o("默认")
|
|
76
|
+
])),
|
|
77
|
+
_: 1
|
|
78
|
+
}))
|
|
79
|
+
], 64)) : r("", !0)
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
}),
|
|
83
|
+
n(t, { label: "排序" }, {
|
|
84
|
+
default: l(() => [
|
|
85
|
+
o(m(e.module.seqNo), 1)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}),
|
|
89
|
+
n(t, { label: "是否显示" }, {
|
|
90
|
+
default: l(() => [
|
|
91
|
+
e.module.state ? (a(), y(k, { key: 0 }, [
|
|
92
|
+
e.module.state === "1" ? (a(), d(p, {
|
|
93
|
+
key: 0,
|
|
94
|
+
color: "green"
|
|
95
|
+
}, {
|
|
96
|
+
default: l(() => u[2] || (u[2] = [
|
|
97
|
+
o("显示")
|
|
98
|
+
])),
|
|
99
|
+
_: 1
|
|
100
|
+
})) : (a(), d(p, {
|
|
101
|
+
key: 1,
|
|
102
|
+
color: "red"
|
|
103
|
+
}, {
|
|
104
|
+
default: l(() => u[3] || (u[3] = [
|
|
105
|
+
o("隐藏")
|
|
106
|
+
])),
|
|
107
|
+
_: 1
|
|
108
|
+
}))
|
|
109
|
+
], 64)) : r("", !0)
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}),
|
|
113
|
+
n(t, { label: "访问权限" }, {
|
|
114
|
+
default: l(() => [
|
|
115
|
+
o(m(e.module.permsSummary), 1)
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}),
|
|
119
|
+
n(t, { label: "描述" }, {
|
|
120
|
+
default: l(() => [
|
|
121
|
+
o(m(e.module.remark), 1)
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
export {
|
|
132
|
+
D as default
|
|
133
|
+
};
|