smart-admin-web 10.20.1 → 10.22.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/api/index.d.ts +19 -1
- package/dist/api/index.js +85 -66
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +448 -1
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/components/FormContainer/index.vue.js +87 -75
- package/dist/components/FormContainer/index.vue.js.map +1 -1
- package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
- package/dist/components/UserPicker/index.vue.js +1 -1
- package/dist/components/UserPicker/index2.vue.js +328 -186
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/composables/authMenuRoute.d.ts +10 -0
- package/dist/composables/authMenuRoute.js +39 -23
- package/dist/composables/authMenuRoute.js.map +1 -1
- package/dist/composables/useModule.d.ts +3 -1
- package/dist/composables/useModule.js +44 -32
- package/dist/composables/useModule.js.map +1 -1
- package/dist/index.js +246 -242
- package/dist/layouts/components/SideNav.vue.js +2 -2
- package/dist/layouts/components/SideNav2.vue.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/watermark.d.ts +1 -1
- package/dist/locales/en-US.d.ts +68 -3
- package/dist/locales/en-US.js +74 -8
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/kernelMenuTitles.js +1 -0
- package/dist/locales/kernelMenuTitles.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +68 -3
- package/dist/locales/zh-CN.js +74 -8
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/viewRegistry.js +6 -6
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/naive-theme.js +80 -77
- package/dist/theme/naive-theme.js.map +1 -1
- package/dist/types/api.d.ts +91 -0
- package/dist/types/api.js +17 -15
- package/dist/types/api.js.map +1 -1
- package/dist/utils/shake.d.ts +1 -0
- package/dist/utils/shake.js +30 -0
- package/dist/utils/shake.js.map +1 -0
- package/dist/utils/tree.d.ts +15 -0
- package/dist/utils/tree.js +43 -29
- package/dist/utils/tree.js.map +1 -1
- package/dist/utils/treeCard.d.ts +6 -0
- package/dist/utils/treeCard.js +9 -0
- package/dist/utils/treeCard.js.map +1 -0
- package/dist/views/error/404.vue.js +2 -2
- package/dist/views/error/4042.vue.js +81 -24
- package/dist/views/error/4042.vue.js.map +1 -1
- package/dist/views/login/LoginForm.vue.js +2 -2
- package/dist/views/login/LoginForm2.vue.js +135 -135
- package/dist/views/login/LoginForm2.vue.js.map +1 -1
- package/dist/views/login/components/LoginDesk.vue.js +2 -2
- package/dist/views/login/components/LoginDesk2.vue.js +59 -47
- package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
- package/dist/views/login/components/LoginHeroPanel.vue.js +2 -2
- package/dist/views/login/components/LoginHeroPanel2.vue.js.map +1 -1
- package/dist/views/personal/notice2.vue.js +1 -1
- package/dist/views/personal/notice2.vue.js.map +1 -1
- package/dist/views/personal/sessions.vue.js +2 -2
- package/dist/views/personal/sessions2.vue.js +41 -40
- package/dist/views/personal/sessions2.vue.js.map +1 -1
- package/dist/views/system/ai-usage/index.vue.js +3 -3
- package/dist/views/system/ai-usage/index2.vue.js +13 -12
- package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
- package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
- package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
- package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
- package/dist/views/system/dict/index.vue.js +2 -2
- package/dist/views/system/dict/index2.vue.js +12 -1
- package/dist/views/system/dict/index2.vue.js.map +1 -1
- package/dist/views/system/file/index2.vue.js +1 -0
- package/dist/views/system/file/index2.vue.js.map +1 -1
- package/dist/views/system/job/index.vue.js +3 -3
- package/dist/views/system/job/index2.vue.js +182 -181
- package/dist/views/system/job/index2.vue.js.map +1 -1
- package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
- package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
- package/dist/views/system/job-log/index.vue.js +1 -1
- package/dist/views/system/job-log/index2.vue.js +5 -5
- package/dist/views/system/job-log/index2.vue.js.map +1 -1
- package/dist/views/system/job-monitor/index.vue.js +2 -2
- package/dist/views/system/job-monitor/index2.vue.js +46 -46
- package/dist/views/system/job-monitor/index2.vue.js.map +1 -1
- package/dist/views/system/log/exception/index.vue.js +2 -2
- package/dist/views/system/log/exception/index2.vue.js +8 -5
- package/dist/views/system/log/exception/index2.vue.js.map +1 -1
- package/dist/views/system/log/login/index2.vue.js +21 -12
- package/dist/views/system/log/login/index2.vue.js.map +1 -1
- package/dist/views/system/log/op/index.vue.js +2 -2
- package/dist/views/system/log/op/index2.vue.js +50 -40
- package/dist/views/system/log/op/index2.vue.js.map +1 -1
- package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
- package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
- package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
- package/dist/views/system/menu/index.vue.js +1 -1
- package/dist/views/system/menu/index2.vue.js +162 -151
- package/dist/views/system/menu/index2.vue.js.map +1 -1
- package/dist/views/system/module/index.vue.js +1 -1
- package/dist/views/system/module/index2.vue.js +171 -117
- package/dist/views/system/module/index2.vue.js.map +1 -1
- package/dist/views/system/notice/index.vue.js +3 -3
- package/dist/views/system/notice/index2.vue.js +1 -0
- package/dist/views/system/notice/index2.vue.js.map +1 -1
- package/dist/views/system/org/index.vue.js +2 -2
- package/dist/views/system/org/index2.vue.js +204 -195
- package/dist/views/system/org/index2.vue.js.map +1 -1
- package/dist/views/system/position/index.vue.js +2 -2
- package/dist/views/system/position/index2.vue.js +57 -48
- package/dist/views/system/position/index2.vue.js.map +1 -1
- package/dist/views/system/recycle/index.vue.js +1 -1
- package/dist/views/system/recycle/index2.vue.js +3 -1
- package/dist/views/system/recycle/index2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
- package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
- package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
- package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
- package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
- package/dist/views/system/role/components/grantMenuGroups.js +116 -76
- package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
- package/dist/views/system/role/index.vue.js +2 -2
- package/dist/views/system/role/index2.vue.js +152 -145
- package/dist/views/system/role/index2.vue.js.map +1 -1
- package/dist/views/system/session/index2.vue.js +39 -35
- package/dist/views/system/session/index2.vue.js.map +1 -1
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
- package/dist/views/system/user/components/userGrantState.d.ts +64 -0
- package/dist/views/system/user/components/userGrantState.js +117 -0
- package/dist/views/system/user/components/userGrantState.js.map +1 -0
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +369 -295
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,65 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useMessage as
|
|
3
|
-
import { SmartTable as
|
|
4
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as me, ref as s, shallowRef as j, computed as M, watch as pe, reactive as fe, h as d, resolveDirective as ve, openBlock as P, createElementBlock as ye, createVNode as r, unref as o, withCtx as n, createBlock as V, createTextVNode as x, toDisplayString as p, createCommentVNode as ge, withDirectives as he, createSlots as be, createElementVNode as K } from "vue";
|
|
2
|
+
import { useMessage as we, NSpace as G, NButton as f, NDropdown as ke, NForm as W, NFormItem as m, NInput as A, NInputNumber as _e, NSwitch as xe, NModal as Ie } from "naive-ui";
|
|
3
|
+
import { SmartTable as Ce } from "smart-naive-table";
|
|
4
|
+
import { useI18n as Ne } from "vue-i18n";
|
|
5
5
|
import I from "../../../components/AppIcon.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import Te from "../../../components/DictSelect/index.vue.js";
|
|
7
|
+
import Se from "../../../components/DictTag/index.vue.js";
|
|
8
|
+
import Ee from "../../../components/FormContainer/index.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useConfirm as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
10
|
+
import Pe from "../../../components/OrgTreeSelect/index.vue.js";
|
|
11
|
+
import Ae from "../../../components/StatusSwitch/index.vue.js";
|
|
12
|
+
import { useConfirm as Ue } from "../../../composables/useConfirm.js";
|
|
13
|
+
import { useShellBreakpoint as Oe } from "../../../composables/useShellBreakpoint.js";
|
|
14
|
+
import { orgApi as v } from "../../../api/index.js";
|
|
15
|
+
import { useAuthStore as ze } from "../../../stores/auth.js";
|
|
16
|
+
import { translateError as J } from "../../../utils/error.js";
|
|
17
|
+
import { SEARCH_ACTIONS as Q, deriveHeaderFilters as Re } from "../../../utils/tableFilter.js";
|
|
18
|
+
import { TABLE_MIN_ROW_HEIGHT as Be, TABLE_TOOLBAR as De } from "../../../utils/tableToolbar.js";
|
|
19
|
+
import { flattenTree as Le, expandableIds as X, buildTree as $e } from "../../../utils/tree.js";
|
|
20
|
+
import { indentByDepth as qe } from "../../../utils/treeCard.js";
|
|
21
|
+
import { filterTreeByParams as He } from "../../../utils/treeFilter.js";
|
|
22
|
+
const Fe = { class: "view fill-page" }, je = { class: "form-hint" }, Me = { class: "copy-tip" }, vo = /* @__PURE__ */ me({
|
|
21
23
|
__name: "index",
|
|
22
|
-
setup(
|
|
23
|
-
const { t
|
|
24
|
-
async function
|
|
24
|
+
setup(Ve) {
|
|
25
|
+
const { t } = Ne(), C = we(), { run: Y, confirm: Z } = Ue(), y = ze(), N = s(!1), U = j([]);
|
|
26
|
+
async function ee() {
|
|
25
27
|
N.value = !0;
|
|
26
28
|
try {
|
|
27
|
-
|
|
29
|
+
U.value = $e(await v.list());
|
|
28
30
|
} catch (e) {
|
|
29
|
-
C.error(
|
|
31
|
+
C.error(J(e));
|
|
30
32
|
} finally {
|
|
31
33
|
N.value = !1;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
|
-
const
|
|
36
|
+
const O = s(), g = () => {
|
|
35
37
|
var e;
|
|
36
|
-
return (e =
|
|
37
|
-
},
|
|
38
|
+
return (e = O.value) == null ? void 0 : e.refresh();
|
|
39
|
+
}, oe = {
|
|
38
40
|
name: (e) => e.name,
|
|
39
41
|
code: (e) => e.code
|
|
40
|
-
},
|
|
41
|
-
await
|
|
42
|
-
const
|
|
43
|
-
return { items:
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
}, { bp: te } = Oe(), T = M(() => te.value === "narrow"), le = async (e) => {
|
|
43
|
+
await ee();
|
|
44
|
+
const l = He(U.value, e, oe), u = T.value ? Le(l) : l;
|
|
45
|
+
return { items: u, total: u.length };
|
|
46
|
+
};
|
|
47
|
+
pe(T, () => g());
|
|
48
|
+
const h = s([]), z = j([]);
|
|
49
|
+
function ae(e) {
|
|
50
|
+
z.value = e, h.value = X(e);
|
|
47
51
|
}
|
|
48
|
-
const
|
|
52
|
+
const S = M(() => h.value.length > 0), re = () => h.value = S.value ? [] : X(z.value), w = s(!1), R = s(null), c = s(null), ne = {
|
|
49
53
|
name: {
|
|
50
54
|
required: !0,
|
|
51
55
|
whitespace: !0,
|
|
52
|
-
message: () =>
|
|
56
|
+
message: () => t("org.nameRequired"),
|
|
53
57
|
trigger: ["input", "blur"]
|
|
54
58
|
}
|
|
55
|
-
},
|
|
59
|
+
}, B = () => ({
|
|
56
60
|
parentId: 0,
|
|
57
61
|
name: "",
|
|
58
62
|
code: "",
|
|
59
63
|
category: null,
|
|
60
64
|
sort: 0,
|
|
61
65
|
enabled: !0
|
|
62
|
-
}), i =
|
|
66
|
+
}), i = fe(B()), D = (e) => ({
|
|
63
67
|
parentId: e.parentId,
|
|
64
68
|
name: e.name,
|
|
65
69
|
code: e.code,
|
|
@@ -67,121 +71,125 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
67
71
|
sort: e.sort,
|
|
68
72
|
enabled: e.enabled
|
|
69
73
|
});
|
|
70
|
-
function
|
|
71
|
-
c.value = null, Object.assign(i,
|
|
74
|
+
function L(e = 0) {
|
|
75
|
+
c.value = null, Object.assign(i, B(), { parentId: e }), w.value = !0;
|
|
72
76
|
}
|
|
73
|
-
function
|
|
74
|
-
c.value = e.id, Object.assign(i,
|
|
77
|
+
function ie(e) {
|
|
78
|
+
c.value = e.id, Object.assign(i, D(e)), w.value = !0;
|
|
75
79
|
}
|
|
76
|
-
async function
|
|
80
|
+
async function se() {
|
|
77
81
|
var e;
|
|
78
|
-
await ((e =
|
|
82
|
+
await ((e = R.value) == null ? void 0 : e.validate());
|
|
79
83
|
try {
|
|
80
|
-
const
|
|
81
|
-
c.value === null ? await
|
|
82
|
-
} catch (
|
|
83
|
-
return C.error(
|
|
84
|
+
const l = { ...i, parentId: i.parentId ?? 0 };
|
|
85
|
+
c.value === null ? await v.add(l) : await v.update(c.value, l), C.success(t("org.saved")), await g();
|
|
86
|
+
} catch (l) {
|
|
87
|
+
return C.error(J(l)), !1;
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
88
|
-
|
|
90
|
+
const b = s(!1), $ = s(0), q = s(""), k = s("");
|
|
91
|
+
function de(e) {
|
|
92
|
+
$.value = e.id, q.value = e.name, k.value = e.name + t("common.copySuffix"), b.value = !0;
|
|
89
93
|
}
|
|
90
|
-
async function
|
|
91
|
-
await
|
|
94
|
+
async function ce() {
|
|
95
|
+
await Y(() => v.copy($.value, { name: k.value }), t("org.copied")) && (b.value = !1, g());
|
|
92
96
|
}
|
|
93
|
-
const
|
|
94
|
-
content:
|
|
97
|
+
const ue = (e) => Z({
|
|
98
|
+
content: t("org.deleteConfirm", { name: e.name }),
|
|
95
99
|
type: "error",
|
|
96
|
-
action: () =>
|
|
97
|
-
successMsg:
|
|
98
|
-
}).then((
|
|
99
|
-
|
|
100
|
-
}),
|
|
100
|
+
action: () => v.remove(e.id),
|
|
101
|
+
successMsg: t("org.deleted")
|
|
102
|
+
}).then((l) => {
|
|
103
|
+
l && g();
|
|
104
|
+
}), E = (e) => () => d(I, { icon: e, size: 16 }), H = [
|
|
101
105
|
// 序号与树列同固定左侧:固定列必须在最左连续,否则横向滚动时树列会压在序号列上。
|
|
102
|
-
{ type: "index", title: () =>
|
|
106
|
+
{ type: "index", title: () => t("common.rowNo"), width: 64, align: "center", fixed: "left" },
|
|
103
107
|
// 树列左对齐,展开缩进才好读;fixed 是为了横向滚动时不丢失「这是哪一行」。
|
|
104
108
|
{
|
|
105
|
-
title: () =>
|
|
109
|
+
title: () => t("org.name"),
|
|
106
110
|
key: "name",
|
|
111
|
+
// 树的缩进和展开箭头落在这一列:不指定时 Naive 取第一个没有 type 的列,正好是 64px 宽的序号列,
|
|
112
|
+
// 层级一深序号就被缩进挤出列外
|
|
113
|
+
tree: !0,
|
|
107
114
|
align: "left",
|
|
108
|
-
|
|
115
|
+
width: 260,
|
|
109
116
|
fixed: "left",
|
|
110
117
|
ellipsis: { tooltip: !0 },
|
|
111
|
-
|
|
118
|
+
render: (e) => qe(e, e.name),
|
|
119
|
+
search: { actions: Q.fuzzy }
|
|
112
120
|
},
|
|
113
121
|
{
|
|
114
|
-
title: () =>
|
|
122
|
+
title: () => t("org.code"),
|
|
115
123
|
key: "code",
|
|
116
124
|
ellipsis: { tooltip: !0 },
|
|
117
125
|
render: (e) => d("span", { class: "mono muted" }, e.code),
|
|
118
|
-
search: { actions:
|
|
126
|
+
search: { actions: Q.fuzzy }
|
|
119
127
|
},
|
|
120
128
|
{
|
|
121
|
-
title: () =>
|
|
129
|
+
title: () => t("org.category"),
|
|
122
130
|
key: "category",
|
|
123
131
|
width: 100,
|
|
124
|
-
render: (e) => d(
|
|
132
|
+
render: (e) => d(Se, { typeCode: "org_category", value: e.category })
|
|
125
133
|
},
|
|
126
134
|
{
|
|
127
|
-
title: () =>
|
|
135
|
+
title: () => t("org.sort"),
|
|
128
136
|
key: "sort",
|
|
129
137
|
width: 80,
|
|
130
138
|
render: (e) => d("span", { class: "num muted" }, e.sort)
|
|
131
139
|
},
|
|
132
140
|
{
|
|
133
|
-
title: () =>
|
|
141
|
+
title: () => t("common.status"),
|
|
134
142
|
key: "enabled",
|
|
135
143
|
width: 90,
|
|
136
|
-
render: (e) => d(
|
|
144
|
+
render: (e) => d(Ae, {
|
|
137
145
|
value: e.enabled,
|
|
138
|
-
disabled: !
|
|
139
|
-
request: (
|
|
146
|
+
disabled: !y.hasPerm("PUT:/api/v1/sys/org/{id}"),
|
|
147
|
+
request: (l) => v.update(e.id, { ...D(e), enabled: l }),
|
|
140
148
|
// 重拉而非往行对象上写:搜索态下的祖先行是 filterTree 的浅拷贝,写它不会回到源树(开关会弹回去)。
|
|
141
149
|
// StatusSwitch 是悲观更新(请求成功才 emit),所以这里重拉一次就是最终态,和本页其余变更的做法一致。
|
|
142
|
-
"onUpdate:value": () =>
|
|
150
|
+
"onUpdate:value": () => g()
|
|
143
151
|
})
|
|
144
152
|
},
|
|
145
153
|
// 操作收敛成「编辑 + 更多▾」:4 个操作塞 260px 会换行、行高参差,且没 fixed 时横向滚动够不着。
|
|
146
154
|
{
|
|
147
|
-
title: () =>
|
|
155
|
+
title: () => t("common.operation"),
|
|
148
156
|
key: "op",
|
|
149
157
|
width: 150,
|
|
150
158
|
fixed: "right",
|
|
151
159
|
render: (e) => {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
(
|
|
156
|
-
|
|
160
|
+
const l = y.hasPerm("POST:/api/v1/sys/org/add"), u = y.hasPerm("POST:/api/v1/sys/org/{id}/copy"), a = y.hasPerm("DELETE:/api/v1/sys/org/{id}"), F = [
|
|
161
|
+
l ? { key: "addChild", label: t("org.addChild"), icon: E("ph:plus") } : null,
|
|
162
|
+
u ? { key: "copy", label: t("org.copy"), icon: E("ph:copy") } : null,
|
|
163
|
+
(l || u) && a ? { type: "divider", key: "divider" } : null,
|
|
164
|
+
a ? {
|
|
157
165
|
key: "delete",
|
|
158
|
-
label:
|
|
159
|
-
icon:
|
|
166
|
+
label: t("common.delete"),
|
|
167
|
+
icon: E("ph:trash"),
|
|
160
168
|
props: { style: "color: var(--err)" }
|
|
161
169
|
} : null
|
|
162
170
|
].filter(
|
|
163
171
|
(_) => _ !== null
|
|
164
172
|
);
|
|
165
|
-
return d(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
{ size: "small", quaternary: !0, type: "primary", onClick: () =>
|
|
169
|
-
() =>
|
|
173
|
+
return d(G, { size: 2, wrapItem: !1, justify: "center" }, () => [
|
|
174
|
+
y.hasPerm("PUT:/api/v1/sys/org/{id}") ? d(
|
|
175
|
+
f,
|
|
176
|
+
{ size: "small", quaternary: !0, type: "primary", onClick: () => ie(e) },
|
|
177
|
+
() => t("common.edit")
|
|
170
178
|
) : null,
|
|
171
|
-
|
|
172
|
-
|
|
179
|
+
F.length ? d(
|
|
180
|
+
ke,
|
|
173
181
|
{
|
|
174
182
|
trigger: "click",
|
|
175
|
-
options:
|
|
183
|
+
options: F,
|
|
176
184
|
onSelect: (_) => {
|
|
177
|
-
_ === "addChild" ?
|
|
185
|
+
_ === "addChild" ? L(e.id) : _ === "copy" ? de(e) : ue(e);
|
|
178
186
|
}
|
|
179
187
|
},
|
|
180
188
|
() => d(
|
|
181
|
-
|
|
189
|
+
f,
|
|
182
190
|
{ size: "small", quaternary: !0, type: "primary", iconPlacement: "right" },
|
|
183
191
|
{
|
|
184
|
-
default: () =>
|
|
192
|
+
default: () => t("common.more"),
|
|
185
193
|
icon: () => d(I, { icon: "ph:caret-down", size: 12 })
|
|
186
194
|
}
|
|
187
195
|
)
|
|
@@ -190,116 +198,117 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
190
198
|
}
|
|
191
199
|
}
|
|
192
200
|
];
|
|
193
|
-
return
|
|
194
|
-
const
|
|
195
|
-
return
|
|
196
|
-
|
|
201
|
+
return Re(H), (e, l) => {
|
|
202
|
+
const u = ve("auth");
|
|
203
|
+
return P(), ye("div", Fe, [
|
|
204
|
+
r(o(Ce), {
|
|
197
205
|
ref_key: "tableRef",
|
|
198
|
-
ref:
|
|
199
|
-
columns:
|
|
200
|
-
fetcher:
|
|
206
|
+
ref: O,
|
|
207
|
+
columns: H,
|
|
208
|
+
fetcher: le,
|
|
201
209
|
loading: N.value,
|
|
202
210
|
"row-key": "id",
|
|
203
211
|
pagination: !1,
|
|
204
212
|
search: { container: "table" },
|
|
205
|
-
toolbar: o(
|
|
213
|
+
toolbar: o(De),
|
|
206
214
|
"fill-height": "",
|
|
207
|
-
"min-row-height": o(
|
|
215
|
+
"min-row-height": o(Be),
|
|
208
216
|
"card-on-narrow": "",
|
|
209
217
|
"storage-key": "sys-org",
|
|
210
|
-
"expanded-row-keys":
|
|
211
|
-
"onUpdate:expandedRowKeys":
|
|
212
|
-
onLoaded:
|
|
218
|
+
"expanded-row-keys": h.value,
|
|
219
|
+
"onUpdate:expandedRowKeys": l[1] || (l[1] = (a) => h.value = a),
|
|
220
|
+
onLoaded: ae
|
|
213
221
|
}, {
|
|
214
|
-
"toolbar-right":
|
|
215
|
-
|
|
222
|
+
"toolbar-right": n(() => [
|
|
223
|
+
T.value ? ge("", !0) : (P(), V(o(f), {
|
|
224
|
+
key: 0,
|
|
216
225
|
secondary: "",
|
|
217
|
-
onClick:
|
|
226
|
+
onClick: re
|
|
218
227
|
}, {
|
|
219
|
-
icon:
|
|
220
|
-
|
|
221
|
-
icon:
|
|
228
|
+
icon: n(() => [
|
|
229
|
+
r(I, {
|
|
230
|
+
icon: S.value ? "ph:arrows-in-line-vertical" : "ph:arrows-out-line-vertical",
|
|
222
231
|
size: 16
|
|
223
232
|
}, null, 8, ["icon"])
|
|
224
233
|
]),
|
|
225
|
-
default:
|
|
226
|
-
x(" " +
|
|
234
|
+
default: n(() => [
|
|
235
|
+
x(" " + p(S.value ? o(t)("common.collapseAll") : o(t)("common.expandAll")), 1)
|
|
227
236
|
]),
|
|
228
237
|
_: 1
|
|
229
|
-
}),
|
|
230
|
-
|
|
238
|
+
})),
|
|
239
|
+
he((P(), V(o(f), {
|
|
231
240
|
type: "primary",
|
|
232
|
-
onClick:
|
|
241
|
+
onClick: l[0] || (l[0] = (a) => L(0))
|
|
233
242
|
}, {
|
|
234
|
-
icon:
|
|
235
|
-
|
|
243
|
+
icon: n(() => [
|
|
244
|
+
r(I, {
|
|
236
245
|
icon: "ph:plus",
|
|
237
246
|
size: 16
|
|
238
247
|
})
|
|
239
248
|
]),
|
|
240
|
-
default:
|
|
241
|
-
x(" " +
|
|
249
|
+
default: n(() => [
|
|
250
|
+
x(" " + p(o(t)("common.add")), 1)
|
|
242
251
|
]),
|
|
243
252
|
_: 1
|
|
244
253
|
})), [
|
|
245
|
-
[
|
|
254
|
+
[u, "POST:/api/v1/sys/org/add"]
|
|
246
255
|
])
|
|
247
256
|
]),
|
|
248
257
|
_: 1
|
|
249
258
|
}, 8, ["loading", "toolbar", "min-row-height", "expanded-row-keys"]),
|
|
250
|
-
|
|
251
|
-
show:
|
|
252
|
-
"onUpdate:show":
|
|
253
|
-
title: c.value === null ? o(
|
|
259
|
+
r(Ee, {
|
|
260
|
+
show: w.value,
|
|
261
|
+
"onUpdate:show": l[8] || (l[8] = (a) => w.value = a),
|
|
262
|
+
title: c.value === null ? o(t)("org.addTitle") : o(t)("org.editTitle"),
|
|
254
263
|
width: 480,
|
|
255
|
-
"on-confirm":
|
|
256
|
-
"confirm-text": o(
|
|
264
|
+
"on-confirm": se,
|
|
265
|
+
"confirm-text": o(t)("common.save")
|
|
257
266
|
}, {
|
|
258
|
-
default:
|
|
259
|
-
|
|
267
|
+
default: n(() => [
|
|
268
|
+
r(o(W), {
|
|
260
269
|
ref_key: "formRef",
|
|
261
|
-
ref:
|
|
270
|
+
ref: R,
|
|
262
271
|
model: i,
|
|
263
|
-
rules:
|
|
272
|
+
rules: ne,
|
|
264
273
|
"label-placement": "left",
|
|
265
274
|
"label-width": 80
|
|
266
275
|
}, {
|
|
267
|
-
default:
|
|
268
|
-
|
|
269
|
-
label: o(
|
|
276
|
+
default: n(() => [
|
|
277
|
+
r(o(m), {
|
|
278
|
+
label: o(t)("org.parent")
|
|
270
279
|
}, {
|
|
271
|
-
default:
|
|
272
|
-
|
|
280
|
+
default: n(() => [
|
|
281
|
+
r(Pe, {
|
|
273
282
|
value: i.parentId,
|
|
274
|
-
"onUpdate:value":
|
|
283
|
+
"onUpdate:value": l[2] || (l[2] = (a) => i.parentId = a),
|
|
275
284
|
clearable: "",
|
|
276
285
|
"exclude-subtree-of": c.value,
|
|
277
|
-
placeholder: o(
|
|
286
|
+
placeholder: o(t)("org.parentPlaceholder")
|
|
278
287
|
}, null, 8, ["value", "exclude-subtree-of", "placeholder"])
|
|
279
288
|
]),
|
|
280
289
|
_: 1
|
|
281
290
|
}, 8, ["label"]),
|
|
282
|
-
|
|
283
|
-
label: o(
|
|
291
|
+
r(o(m), {
|
|
292
|
+
label: o(t)("org.name"),
|
|
284
293
|
path: "name"
|
|
285
294
|
}, {
|
|
286
|
-
default:
|
|
287
|
-
|
|
295
|
+
default: n(() => [
|
|
296
|
+
r(o(A), {
|
|
288
297
|
value: i.name,
|
|
289
|
-
"onUpdate:value":
|
|
290
|
-
placeholder: o(
|
|
298
|
+
"onUpdate:value": l[3] || (l[3] = (a) => i.name = a),
|
|
299
|
+
placeholder: o(t)("org.name")
|
|
291
300
|
}, null, 8, ["value", "placeholder"])
|
|
292
301
|
]),
|
|
293
302
|
_: 1
|
|
294
303
|
}, 8, ["label"]),
|
|
295
|
-
|
|
296
|
-
label: o(
|
|
297
|
-
},
|
|
298
|
-
default:
|
|
299
|
-
|
|
304
|
+
r(o(m), {
|
|
305
|
+
label: o(t)("org.code")
|
|
306
|
+
}, be({
|
|
307
|
+
default: n(() => [
|
|
308
|
+
r(o(A), {
|
|
300
309
|
value: i.code,
|
|
301
|
-
"onUpdate:value":
|
|
302
|
-
placeholder: o(
|
|
310
|
+
"onUpdate:value": l[4] || (l[4] = (a) => i.code = a),
|
|
311
|
+
placeholder: o(t)("org.codePlaceholder"),
|
|
303
312
|
disabled: c.value !== null
|
|
304
313
|
}, null, 8, ["value", "placeholder", "disabled"])
|
|
305
314
|
]),
|
|
@@ -307,46 +316,46 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
307
316
|
}, [
|
|
308
317
|
c.value !== null ? {
|
|
309
318
|
name: "feedback",
|
|
310
|
-
fn:
|
|
311
|
-
|
|
319
|
+
fn: n(() => [
|
|
320
|
+
K("span", je, p(o(t)("org.codeImmutableHint")), 1)
|
|
312
321
|
]),
|
|
313
322
|
key: "0"
|
|
314
323
|
} : void 0
|
|
315
324
|
]), 1032, ["label"]),
|
|
316
|
-
|
|
317
|
-
label: o(
|
|
325
|
+
r(o(m), {
|
|
326
|
+
label: o(t)("org.category")
|
|
318
327
|
}, {
|
|
319
|
-
default:
|
|
320
|
-
|
|
328
|
+
default: n(() => [
|
|
329
|
+
r(Te, {
|
|
321
330
|
value: i.category,
|
|
322
|
-
"onUpdate:value":
|
|
331
|
+
"onUpdate:value": l[5] || (l[5] = (a) => i.category = a),
|
|
323
332
|
"type-code": "org_category",
|
|
324
333
|
clearable: "",
|
|
325
|
-
placeholder: o(
|
|
334
|
+
placeholder: o(t)("org.categoryPlaceholder")
|
|
326
335
|
}, null, 8, ["value", "placeholder"])
|
|
327
336
|
]),
|
|
328
337
|
_: 1
|
|
329
338
|
}, 8, ["label"]),
|
|
330
|
-
|
|
331
|
-
label: o(
|
|
339
|
+
r(o(m), {
|
|
340
|
+
label: o(t)("org.sort")
|
|
332
341
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
|
|
342
|
+
default: n(() => [
|
|
343
|
+
r(o(_e), {
|
|
335
344
|
value: i.sort,
|
|
336
|
-
"onUpdate:value":
|
|
345
|
+
"onUpdate:value": l[6] || (l[6] = (a) => i.sort = a),
|
|
337
346
|
min: 0,
|
|
338
347
|
style: { width: "160px" }
|
|
339
348
|
}, null, 8, ["value"])
|
|
340
349
|
]),
|
|
341
350
|
_: 1
|
|
342
351
|
}, 8, ["label"]),
|
|
343
|
-
|
|
344
|
-
label: o(
|
|
352
|
+
r(o(m), {
|
|
353
|
+
label: o(t)("common.status")
|
|
345
354
|
}, {
|
|
346
|
-
default:
|
|
347
|
-
|
|
355
|
+
default: n(() => [
|
|
356
|
+
r(o(xe), {
|
|
348
357
|
value: i.enabled,
|
|
349
|
-
"onUpdate:value":
|
|
358
|
+
"onUpdate:value": l[7] || (l[7] = (a) => i.enabled = a)
|
|
350
359
|
}, null, 8, ["value"])
|
|
351
360
|
]),
|
|
352
361
|
_: 1
|
|
@@ -357,34 +366,34 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
357
366
|
]),
|
|
358
367
|
_: 1
|
|
359
368
|
}, 8, ["show", "title", "confirm-text"]),
|
|
360
|
-
|
|
361
|
-
show:
|
|
362
|
-
"onUpdate:show":
|
|
369
|
+
r(o(Ie), {
|
|
370
|
+
show: b.value,
|
|
371
|
+
"onUpdate:show": l[11] || (l[11] = (a) => b.value = a),
|
|
363
372
|
preset: "card",
|
|
364
|
-
title: o(
|
|
373
|
+
title: o(t)("org.copyTitle"),
|
|
365
374
|
style: { width: "min(420px, calc(100vw - 24px))" },
|
|
366
375
|
bordered: !1,
|
|
367
376
|
"mask-closable": !1,
|
|
368
377
|
segmented: { footer: "soft" }
|
|
369
378
|
}, {
|
|
370
|
-
footer:
|
|
371
|
-
|
|
372
|
-
default:
|
|
373
|
-
|
|
379
|
+
footer: n(() => [
|
|
380
|
+
r(o(G), { justify: "end" }, {
|
|
381
|
+
default: n(() => [
|
|
382
|
+
r(o(f), {
|
|
374
383
|
secondary: "",
|
|
375
|
-
onClick:
|
|
384
|
+
onClick: l[10] || (l[10] = (a) => b.value = !1)
|
|
376
385
|
}, {
|
|
377
|
-
default:
|
|
378
|
-
x(
|
|
386
|
+
default: n(() => [
|
|
387
|
+
x(p(o(t)("common.cancel")), 1)
|
|
379
388
|
]),
|
|
380
389
|
_: 1
|
|
381
390
|
}),
|
|
382
|
-
|
|
391
|
+
r(o(f), {
|
|
383
392
|
type: "primary",
|
|
384
|
-
onClick:
|
|
393
|
+
onClick: ce
|
|
385
394
|
}, {
|
|
386
|
-
default:
|
|
387
|
-
x(
|
|
395
|
+
default: n(() => [
|
|
396
|
+
x(p(o(t)("common.confirm")), 1)
|
|
388
397
|
]),
|
|
389
398
|
_: 1
|
|
390
399
|
})
|
|
@@ -392,21 +401,21 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
392
401
|
_: 1
|
|
393
402
|
})
|
|
394
403
|
]),
|
|
395
|
-
default:
|
|
396
|
-
|
|
397
|
-
|
|
404
|
+
default: n(() => [
|
|
405
|
+
K("p", Me, p(o(t)("org.copyConfirm", { name: q.value })), 1),
|
|
406
|
+
r(o(W), {
|
|
398
407
|
"label-placement": "top",
|
|
399
408
|
"require-mark-placement": "left"
|
|
400
409
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
403
|
-
label: o(
|
|
410
|
+
default: n(() => [
|
|
411
|
+
r(o(m), {
|
|
412
|
+
label: o(t)("org.copyNameLabel")
|
|
404
413
|
}, {
|
|
405
|
-
default:
|
|
406
|
-
|
|
407
|
-
value:
|
|
408
|
-
"onUpdate:value":
|
|
409
|
-
placeholder: o(
|
|
414
|
+
default: n(() => [
|
|
415
|
+
r(o(A), {
|
|
416
|
+
value: k.value,
|
|
417
|
+
"onUpdate:value": l[9] || (l[9] = (a) => k.value = a),
|
|
418
|
+
placeholder: o(t)("org.copyNameLabel")
|
|
410
419
|
}, null, 8, ["value", "placeholder"])
|
|
411
420
|
]),
|
|
412
421
|
_: 1
|
|
@@ -422,6 +431,6 @@ const Re = { class: "view fill-page" }, Be = { class: "form-hint" }, De = { clas
|
|
|
422
431
|
}
|
|
423
432
|
});
|
|
424
433
|
export {
|
|
425
|
-
|
|
434
|
+
vo as default
|
|
426
435
|
};
|
|
427
436
|
//# sourceMappingURL=index2.vue.js.map
|