smart-admin-web 10.12.0 → 10.12.2

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 (37) hide show
  1. package/dist/api/index.d.ts +13 -1
  2. package/dist/api/index.js +25 -13
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/schema.d.ts +360 -3
  5. package/dist/assets/icons/ph-subset.json.js +1 -1
  6. package/dist/lib/runtime.js +1 -1
  7. package/dist/locales/en-US.d.ts +13 -1
  8. package/dist/locales/en-US.js +15 -3
  9. package/dist/locales/en-US.js.map +1 -1
  10. package/dist/locales/zh-CN.d.ts +13 -1
  11. package/dist/locales/zh-CN.js +15 -3
  12. package/dist/locales/zh-CN.js.map +1 -1
  13. package/dist/router/index.js +18 -13
  14. package/dist/router/index.js.map +1 -1
  15. package/dist/router/viewRegistry.js +1 -1
  16. package/dist/router/viewRegistry.js.map +1 -1
  17. package/dist/style.css +1 -1
  18. package/dist/types/api.d.ts +26 -0
  19. package/dist/types/api.js.map +1 -1
  20. package/dist/views/dashboard/ShortcutPicker.vue.d.ts +16 -0
  21. package/dist/views/dashboard/ShortcutPicker.vue.js +8 -0
  22. package/dist/views/dashboard/ShortcutPicker.vue.js.map +1 -0
  23. package/dist/views/dashboard/ShortcutPicker2.vue.js +86 -0
  24. package/dist/views/dashboard/ShortcutPicker2.vue.js.map +1 -0
  25. package/dist/views/dashboard/biz.vue.js +2 -2
  26. package/dist/views/dashboard/biz2.vue.js +265 -93
  27. package/dist/views/dashboard/biz2.vue.js.map +1 -1
  28. package/dist/views/dashboard/onlineDuration.d.ts +5 -0
  29. package/dist/views/dashboard/onlineDuration.js +8 -0
  30. package/dist/views/dashboard/onlineDuration.js.map +1 -0
  31. package/dist/views/dashboard/shortcutGroups.d.ts +18 -0
  32. package/dist/views/dashboard/shortcutGroups.js +19 -0
  33. package/dist/views/dashboard/shortcutGroups.js.map +1 -0
  34. package/dist/views/system/user/index.vue.js +2 -2
  35. package/dist/views/system/user/index2.vue.js +281 -211
  36. package/dist/views/system/user/index2.vue.js.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ function r(e, n = /* @__PURE__ */ new Date()) {
2
+ const o = new Date(e), a = Math.max(0, n.getTime() - o.getTime()), t = Math.floor(a / 6e4);
3
+ return { hours: Math.floor(t / 60), minutes: t % 60 };
4
+ }
5
+ export {
6
+ r as onlineDurationParts
7
+ };
8
+ //# sourceMappingURL=onlineDuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onlineDuration.js","sources":["../../../src/views/dashboard/onlineDuration.ts"],"sourcesContent":["/** 在线时长拆成小时/分钟,供 i18n 模板插值;不做负数(时钟回拨/服务器时间误差时钳到 0)。 */\nexport function onlineDurationParts(\n loginTime: string,\n now: Date = new Date(),\n): { hours: number; minutes: number } {\n const start = new Date(loginTime)\n const ms = Math.max(0, now.getTime() - start.getTime())\n const totalMinutes = Math.floor(ms / 60000)\n return { hours: Math.floor(totalMinutes / 60), minutes: totalMinutes % 60 }\n}\n"],"names":["onlineDurationParts","loginTime","now","start","ms","totalMinutes"],"mappings":"AACO,SAASA,EACdC,GACAC,IAAY,oBAAI,QACoB;AACpC,QAAMC,IAAQ,IAAI,KAAKF,CAAS,GAC1BG,IAAK,KAAK,IAAI,GAAGF,EAAI,QAAA,IAAYC,EAAM,SAAS,GAChDE,IAAe,KAAK,MAAMD,IAAK,GAAK;AAC1C,SAAO,EAAE,OAAO,KAAK,MAAMC,IAAe,EAAE,GAAG,SAASA,IAAe,GAAA;AACzE;"}
@@ -0,0 +1,18 @@
1
+ import { UserShortcutItem } from '../../types/api';
2
+ import { MenuLeaf } from '../../composables/useMenuFlat';
3
+ export interface ShortcutDisplayItem {
4
+ path: string;
5
+ /** i18n key 或原文,口径与 MenuLeaf.title 一致——渲染时要经 translateMenuTitle(title),不能直接展示。 */
6
+ title: string;
7
+ icon: string;
8
+ pinned: boolean;
9
+ }
10
+ /**
11
+ * 后端 personalApi.shortcuts() 已经按"置顶优先 + 高频补位"排好序、按 cap 截断,这里只做两件事:
12
+ * 按 pinned 拆成两组、用当前应用可见的菜单叶子重新取标题/图标(而不是信后端 title——那是数据库原文,
13
+ * 不带 i18n;菜单被禁用/删除/无权限后不在 menuLeaves 里,对应快捷方式自动消失,不用后端联动清理)。
14
+ */
15
+ export declare function buildShortcutGroups(shortcuts: UserShortcutItem[], menuLeaves: MenuLeaf[]): {
16
+ pinned: ShortcutDisplayItem[];
17
+ suggested: ShortcutDisplayItem[];
18
+ };
@@ -0,0 +1,19 @@
1
+ function r(e, p) {
2
+ const a = new Map(p.map((n) => [n.path, n])), l = (n) => {
3
+ const t = a.get(n.menuPath);
4
+ return t ? {
5
+ path: n.menuPath,
6
+ title: t.title,
7
+ icon: t.icon || "ph:squares-four",
8
+ pinned: n.pinned
9
+ } : null;
10
+ }, i = (n) => n.map(l).filter((t) => t !== null);
11
+ return {
12
+ pinned: i(e.filter((n) => n.pinned)),
13
+ suggested: i(e.filter((n) => !n.pinned))
14
+ };
15
+ }
16
+ export {
17
+ r as buildShortcutGroups
18
+ };
19
+ //# sourceMappingURL=shortcutGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcutGroups.js","sources":["../../../src/views/dashboard/shortcutGroups.ts"],"sourcesContent":["import type { UserShortcutItem } from '#/types/api'\nimport type { MenuLeaf } from '#/composables/useMenuFlat'\n\nexport interface ShortcutDisplayItem {\n path: string\n /** i18n key 或原文,口径与 MenuLeaf.title 一致——渲染时要经 translateMenuTitle(title),不能直接展示。 */\n title: string\n icon: string\n pinned: boolean\n}\n\n/**\n * 后端 personalApi.shortcuts() 已经按\"置顶优先 + 高频补位\"排好序、按 cap 截断,这里只做两件事:\n * 按 pinned 拆成两组、用当前应用可见的菜单叶子重新取标题/图标(而不是信后端 title——那是数据库原文,\n * 不带 i18n;菜单被禁用/删除/无权限后不在 menuLeaves 里,对应快捷方式自动消失,不用后端联动清理)。\n */\nexport function buildShortcutGroups(\n shortcuts: UserShortcutItem[],\n menuLeaves: MenuLeaf[],\n): { pinned: ShortcutDisplayItem[]; suggested: ShortcutDisplayItem[] } {\n const leafByPath = new Map(menuLeaves.map(l => [l.path, l]))\n const toDisplay = (s: UserShortcutItem): ShortcutDisplayItem | null => {\n const leaf = leafByPath.get(s.menuPath)\n if (!leaf) return null\n return {\n path: s.menuPath,\n title: leaf.title,\n icon: leaf.icon || 'ph:squares-four',\n pinned: s.pinned,\n }\n }\n const display = (list: UserShortcutItem[]) =>\n list.map(toDisplay).filter((x): x is ShortcutDisplayItem => x !== null)\n return {\n pinned: display(shortcuts.filter(s => s.pinned)),\n suggested: display(shortcuts.filter(s => !s.pinned)),\n }\n}\n"],"names":["buildShortcutGroups","shortcuts","menuLeaves","leafByPath","l","toDisplay","s","leaf","display","list","x"],"mappings":"AAgBO,SAASA,EACdC,GACAC,GACqE;AACrE,QAAMC,IAAa,IAAI,IAAID,EAAW,IAAI,CAAAE,MAAK,CAACA,EAAE,MAAMA,CAAC,CAAC,CAAC,GACrDC,IAAY,CAACC,MAAoD;AACrE,UAAMC,IAAOJ,EAAW,IAAIG,EAAE,QAAQ;AACtC,WAAKC,IACE;AAAA,MACL,MAAMD,EAAE;AAAA,MACR,OAAOC,EAAK;AAAA,MACZ,MAAMA,EAAK,QAAQ;AAAA,MACnB,QAAQD,EAAE;AAAA,IAAA,IALM;AAAA,EAOpB,GACME,IAAU,CAACC,MACfA,EAAK,IAAIJ,CAAS,EAAE,OAAO,CAACK,MAAgCA,MAAM,IAAI;AACxE,SAAO;AAAA,IACL,QAAQF,EAAQP,EAAU,OAAO,CAAAK,MAAKA,EAAE,MAAM,CAAC;AAAA,IAC/C,WAAWE,EAAQP,EAAU,OAAO,OAAK,CAACK,EAAE,MAAM,CAAC;AAAA,EAAA;AAEvD;"}
@@ -1,8 +1,8 @@
1
1
  import o from "./index2.vue.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48cff6c5"]]);
4
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-99109370"]]);
5
5
  export {
6
- m as default
6
+ _ as default
7
7
  };
8
8
  //# sourceMappingURL=index.vue.js.map