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