dlzn-ui 2.0.97 → 2.0.99
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/.cursorrules +6 -0
- package/assets/{provider-Bh_VYGit.css → provider-BGH-ekpY.css} +1 -1
- package/chunks/{AssignUser-esOe_rPW.mjs → AssignUser-waAXeDTQ.mjs} +3 -3
- package/chunks/{BasicInfo-CLQZ8t5v.mjs → BasicInfo-BT5JLMMj.mjs} +1 -1
- package/chunks/{ColumnInfo-CkWvunaL.mjs → ColumnInfo-wAuxVvli.mjs} +2 -2
- package/chunks/{Common-71GsK---.mjs → Common-B6LL_pJ1.mjs} +1 -1
- package/chunks/{Day-CenEhUG_.mjs → Day-Cre05o7r.mjs} +1 -1
- package/chunks/{DictTypeDetail-BPr6n4ic.mjs → DictTypeDetail-Bx5bKwXw.mjs} +6 -6
- package/chunks/{GenInfo-CLG44N3B.mjs → GenInfo-DC95WCnD.mjs} +1 -1
- package/chunks/{Hour-Dcnt1g07.mjs → Hour-DJzYk7GJ.mjs} +1 -1
- package/chunks/{Import-khsZNuIE.mjs → Import-BWoojnMv.mjs} +2 -2
- package/chunks/{Index-DDzOh_dc.mjs → Index-BDBHDQ07.mjs} +1 -1
- package/chunks/{Index-s5_HFfZs.mjs → Index-BJG3s8ex.mjs} +1 -1
- package/chunks/{Index-D7AltmnM.mjs → Index-BOFxzo4M.mjs} +1 -1
- package/chunks/{Index-BEUFn8JH.mjs → Index-BRZxYZIv.mjs} +1 -1
- package/chunks/{Index-BWTj1dnh.mjs → Index-Boh3OOFV.mjs} +1 -1
- package/chunks/{Index-DdLjsQWB.mjs → Index-C68kZR8E.mjs} +1 -1
- package/chunks/{Index-di9ZGDjL.mjs → Index-CXkLdOfe.mjs} +5 -5
- package/chunks/{Index-D1HaN4nA.mjs → Index-CykdZsB_.mjs} +1 -1
- package/chunks/{Index-B2VGKOOp.mjs → Index-DaytT_AW.mjs} +1 -1
- package/chunks/{Index-D320S_n8.mjs → Index-DbakWwBg.mjs} +1 -1
- package/chunks/{Index-BWseb74Z.mjs → Index-Dq8shC0r.mjs} +1 -1
- package/chunks/{Index-BJzrkSyu.mjs → Index-DrOqyR73.mjs} +1 -1
- package/chunks/{Index-6r9lWoOC.mjs → Index-Dt1_qIE0.mjs} +1 -1
- package/chunks/{Index-B7jiZbV6.mjs → Index-ROYmxgxz.mjs} +1 -1
- package/chunks/{Index-DMzjAPlS.mjs → Index-VM6U6bBT.mjs} +1 -1
- package/chunks/{Index-BpNWEf_u.mjs → Index-pHj1MGDH.mjs} +1 -1
- package/chunks/{Index-CoFSjivh.mjs → Index-vl5EgFpp.mjs} +1 -1
- package/chunks/{IndexItem-CJqhfmHq.mjs → IndexItem-DdtjD7Tk.mjs} +3 -3
- package/chunks/{Log-DVaf00Ab.mjs → Log-BWLsqcsC.mjs} +4 -4
- package/chunks/{LoginBg-C-yNURs1.mjs → LoginBg-spbuiV_l.mjs} +1 -1
- package/chunks/{Minute-D6-3ZGux.mjs → Minute-xQVuuTaZ.mjs} +1 -1
- package/chunks/{Month-K_MpPkmm.mjs → Month-MA5abT2b.mjs} +1 -1
- package/chunks/{Preview-DLMjYqjf.mjs → Preview-WVWdOYW0.mjs} +1 -1
- package/chunks/{Second-BBasapCr.mjs → Second-Stezm_9i.mjs} +1 -1
- package/chunks/{SelectDept-J7uU5K6A.mjs → SelectDept-vjJb8OgS.mjs} +12 -12
- package/chunks/{SelectMenu-Bw7jxer0.mjs → SelectMenu-Cst3XCuO.mjs} +12 -12
- package/chunks/{SelectUser-CaRYMNww.mjs → SelectUser-Cvi9nuX8.mjs} +2 -2
- package/chunks/{UserInfo-D1NlB5f5.mjs → UserInfo-Bagkd0ip.mjs} +8 -8
- package/chunks/{Wrapper-HFEY1ML-.mjs → Wrapper-D8ohSgzb.mjs} +1 -1
- package/chunks/{app-C9Ag1ZJx.mjs → app-YCKX4EtG.mjs} +1 -1
- package/chunks/{custom-page-list-BTp28raT.mjs → custom-page-list-DFGQrCfH.mjs} +4 -4
- package/chunks/{custom-page-table-BPrDT4FQ.mjs → custom-page-table-cC9-s4tW.mjs} +2 -2
- package/chunks/{job-DDhnnrf_.mjs → job-Bo00bGj4.mjs} +14 -14
- package/chunks/{overview-XRH-cffY.mjs → overview-DWhfi84T.mjs} +1 -1
- package/chunks/{page-list-C2SCtH9m.mjs → page-list-BpswI1cl.mjs} +3 -3
- package/chunks/{page-query-BfbPYZEC.mjs → page-query-CYtTTZ1J.mjs} +1 -1
- package/chunks/{page-table-DNQMss1x.mjs → page-table-CUN9oB0C.mjs} +6 -6
- package/chunks/{pagination-CzZXnvsD.mjs → pagination-CxJoeMdk.mjs} +1 -1
- package/chunks/{provider-D2ws2HnO.mjs → provider-ClG0820c.mjs} +701 -607
- package/chunks/{table-tJeglywd.mjs → table-fzyYo8Na.mjs} +1 -1
- package/components/app/index.mjs +1 -1
- package/components/app/src/app.mjs +1 -1
- package/components/audio-play/src/audio-play.vue.d.ts +1 -1
- package/components/auto-complete/src/auto-complete.vue.d.ts +1 -1
- package/components/button/index.mjs +1 -1
- package/components/button/src/button.mjs +1 -1
- package/components/cascader/index.d.ts +2 -0
- package/components/cascader/index.mjs +1 -0
- package/components/cascader/src/cascader.d.ts +19 -0
- package/components/cascader/src/cascader.mjs +1 -0
- package/components/cascader/src/cascader.vue.d.ts +15 -0
- package/components/checkbox-group/index.mjs +1 -1
- package/components/checkbox-group/src/checkbox-group.mjs +1 -1
- package/components/cron/index.mjs +1 -1
- package/components/cron/src/Common.mjs +1 -1
- package/components/cron/src/Day.mjs +1 -1
- package/components/cron/src/Hour.mjs +1 -1
- package/components/cron/src/Minute.mjs +1 -1
- package/components/cron/src/Month.mjs +1 -1
- package/components/cron/src/Picker.mjs +6 -6
- package/components/cron/src/Second.mjs +1 -1
- package/components/cron/src/cron.mjs +1 -1
- package/components/cron/src/cron.vue.d.ts +2 -2
- package/components/custom-page-list/index.mjs +1 -1
- package/components/custom-page-list/src/custom-page-list.mjs +1 -1
- package/components/custom-page-list/src/custom-page-list.vue.d.ts +3 -3
- package/components/custom-page-table/index.mjs +1 -1
- package/components/custom-page-table/src/custom-page-table.mjs +1 -1
- package/components/date-picker/index.mjs +1 -1
- package/components/date-picker/src/date-picker.mjs +1 -1
- package/components/date-picker/src/date-picker.vue.d.ts +2 -2
- package/components/dialog/index.mjs +1 -1
- package/components/dialog/src/dialog.mjs +1 -1
- package/components/dialog/src/dialog.vue.d.ts +10 -10
- package/components/form/index.mjs +1 -1
- package/components/form/src/form.d.ts +2 -0
- package/components/form/src/form.mjs +1 -1
- package/components/form/src/form.vue.d.ts +1 -1
- package/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
- package/components/index.d.ts +1 -0
- package/components/index.mjs +27 -27
- package/components/input/src/input.vue.d.ts +2 -2
- package/components/input-number/index.mjs +1 -1
- package/components/input-number/src/input-number.mjs +1 -1
- package/components/input-number/src/input-number.vue.d.ts +1 -1
- package/components/link/src/link.vue.d.ts +1 -1
- package/components/overview/index.mjs +1 -1
- package/components/overview/src/DicLabel/Index.mjs +1 -1
- package/components/overview/src/IndexItem.mjs +1 -1
- package/components/overview/src/OptionLabel/Index.mjs +1 -1
- package/components/overview/src/overview.mjs +1 -1
- package/components/page-list/index.mjs +1 -1
- package/components/page-list/src/page-list.d.ts +311 -199
- package/components/page-list/src/page-list.mjs +1 -1
- package/components/page-list/src/page-list.vue.d.ts +17 -17
- package/components/page-query/index.mjs +1 -1
- package/components/page-query/src/page-query.mjs +1 -1
- package/components/page-query/src/page-query.vue.d.ts +4 -4
- package/components/page-table/index.mjs +1 -1
- package/components/page-table/src/page-table.mjs +1 -1
- package/components/page-table/src/page-table.vue.d.ts +18 -18
- package/components/pagination/index.mjs +1 -1
- package/components/pagination/src/pagination.mjs +1 -1
- package/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/components/provider/index.mjs +1 -1
- package/components/provider/src/Provider.mjs +1 -1
- package/components/radio-group/index.mjs +1 -1
- package/components/radio-group/src/radio-group.mjs +1 -1
- package/components/range-input/index.mjs +1 -1
- package/components/range-input/src/range-input.mjs +1 -1
- package/components/range-input/src/range-input.vue.d.ts +2 -2
- package/components/select/index.mjs +1 -1
- package/components/select/src/select.d.ts +0 -1
- package/components/select/src/select.mjs +1 -1
- package/components/select/src/select.vue.d.ts +5 -6
- package/components/select-sys-user/index.mjs +1 -1
- package/components/select-sys-user/src/Picker.mjs +2 -2
- package/components/select-sys-user/src/select-sys-user.mjs +1 -1
- package/components/tab-panel/src/tab-panel.vue.d.ts +1 -1
- package/components/table/index.mjs +1 -1
- package/components/table/src/table.mjs +1 -1
- package/components/table/src/table.vue.d.ts +3 -3
- package/components/textarea/src/textarea.vue.d.ts +1 -1
- package/components/tree/index.mjs +1 -1
- package/components/tree/src/tree.mjs +1 -1
- package/components/tree/src/tree.vue.d.ts +3 -3
- package/components/tree-select/index.mjs +1 -1
- package/components/tree-select/src/tree-select.mjs +1 -1
- package/components/tree-select/src/tree-select.vue.d.ts +2 -1
- package/components/upload/index.mjs +1 -1
- package/components/upload/src/upload.mjs +1 -1
- package/hooks/useDicOptions/index.mjs +1 -1
- package/hooks/useLabel/index.mjs +1 -1
- package/hooks/useList/index.d.ts +20 -8
- package/hooks/useList/index.mjs +1 -1
- package/hooks/useSysUser/index.mjs +1 -1
- package/index.d.ts +1 -2
- package/layout/Entry.mjs +1 -1
- package/layout/Home.mjs +2 -2
- package/layout/Home1.mjs +21 -16
- package/layout/Login.mjs +7 -7
- package/layout/NotFound.mjs +1 -1
- package/layout/modules/Aside.mjs +1 -1
- package/layout/modules/Breadcrumb.mjs +1 -1
- package/layout/modules/Header.mjs +1 -1
- package/layout/modules/LoginBg.mjs +1 -1
- package/layout/profile/Index.mjs +2 -2
- package/layout/profile/ResetPwd.mjs +1 -1
- package/layout/profile/UserInfo.mjs +1 -1
- package/layout/vueBits/Plasma.vue.d.ts +1 -1
- package/main.mjs +3 -3
- package/package.json +1 -1
- package/plugins/autoImport/$alova/index.mjs +1 -1
- package/plugins/autoImport/$confirm/index.mjs +1 -1
- package/plugins/autoImport/$dialog/index.mjs +1 -1
- package/plugins/autoImport/$drawer/index.mjs +1 -1
- package/plugins/captcha/captcha.mjs +1 -1
- package/plugins/captcha/index.mjs +1 -1
- package/plugins/directive/index.mjs +1 -1
- package/plugins/initialize/webUpdateNotify.mjs +1 -1
- package/plugins/tableRenders/Wrapper.mjs +1 -1
- package/plugins/tableRenders/cell/AudioPlay/Index.mjs +1 -1
- package/plugins/tableRenders/cell/AudioPlay/Index.vue.d.ts +1 -1
- package/plugins/tableRenders/cell/Avatar/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Buttons/Index.mjs +1 -1
- package/plugins/tableRenders/cell/DicLabel/Index.mjs +1 -1
- package/plugins/tableRenders/cell/FormatDate/Index.mjs +1 -1
- package/plugins/tableRenders/cell/FormatNumber/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Icon/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Image/Index.mjs +1 -1
- package/plugins/tableRenders/cell/ImageViewer/Index.mjs +1 -1
- package/plugins/tableRenders/cell/ImageViewer/Index.vue.d.ts +2 -2
- package/plugins/tableRenders/cell/Input/Index.vue.d.ts +2 -2
- package/plugins/tableRenders/cell/InputNumber/Index.mjs +1 -1
- package/plugins/tableRenders/cell/InputNumber/Index.vue.d.ts +1 -1
- package/plugins/tableRenders/cell/Link/Index.vue.d.ts +1 -1
- package/plugins/tableRenders/cell/OptionLabel/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Select/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Select/Index.vue.d.ts +5 -6
- package/plugins/tableRenders/cell/TypographyText/Index.mjs +1 -1
- package/plugins/tableRenders/cell/TypographyTextLink/Index.mjs +1 -1
- package/plugins/tableRenders/cell/index.mjs +15 -15
- package/plugins/tableRenders/title/TypographyText/Index.mjs +1 -1
- package/plugins/tableRenders/title/index.mjs +2 -2
- package/proj-template/.vscode/settings.json +3 -2
- package/router/index.mjs +1 -1
- package/store/modules/common.mjs +1 -1
- package/store/modules/login.mjs +1 -1
- package/store/modules/recentRouters.mjs +1 -1
- package/store/modules/router.mjs +1 -1
- package/store/modules/user.mjs +1 -1
- package/types/globle.d.ts +12 -2
- package/utils/audio/{getAudioElement.d.ts → audioElement.d.ts} +4 -0
- package/utils/audio/audioElement.mjs +12 -0
- package/utils/gather.mjs +1 -1
- package/utils/index.mjs +3 -3
- package/utils/tool.mjs +1 -1
- package/utils/tree.d.ts +58 -4
- package/utils/tree.mjs +35 -17
- package/views/monitor/cache/index.mjs +2 -2
- package/views/monitor/cacheList/index.mjs +2 -2
- package/views/monitor/job/index.mjs +1 -1
- package/views/monitor/logininfor/index.mjs +2 -2
- package/views/monitor/online/index.mjs +2 -2
- package/views/monitor/operlog/index.mjs +2 -2
- package/views/monitor/server/index.mjs +2 -2
- package/views/system/config/index.mjs +6 -6
- package/views/system/dept/index.mjs +72 -72
- package/views/system/dept/utils.mjs +1 -1
- package/views/system/dict/index.mjs +7 -7
- package/views/system/dict/modules/DictTypeDetail.mjs +1 -1
- package/views/system/menu/index.mjs +101 -101
- package/views/system/menu/utils.mjs +1 -1
- package/views/system/notice/index.mjs +6 -6
- package/views/system/post/index.mjs +6 -6
- package/views/system/role/index.mjs +17 -17
- package/views/system/role/modules/AssignUser.mjs +1 -1
- package/views/system/role/modules/SelectDept.mjs +1 -1
- package/views/system/role/modules/SelectMenu.mjs +1 -1
- package/views/system/role/modules/SelectUser.mjs +1 -1
- package/views/system/user/index.mjs +20 -20
- package/views/tool/gen/editTable/index.mjs +4 -4
- package/views/tool/gen/editTable/modules/BasicInfo.mjs +1 -1
- package/views/tool/gen/editTable/modules/ColumnInfo.mjs +1 -1
- package/views/tool/gen/editTable/modules/GenInfo.mjs +1 -1
- package/views/tool/gen/index.mjs +4 -4
- package/views/tool/gen/modules/Import.mjs +1 -1
- package/views/tool/gen/modules/Preview.mjs +1 -1
- package/views/tool/job/index.mjs +1 -1
- package/views/tool/job/modules/Log.mjs +1 -1
- package/utils/audio/getAudioElement.mjs +0 -9
package/utils/tree.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ interface TreeNode {
|
|
|
6
6
|
* 将扁平数组转换为树形结构
|
|
7
7
|
* @param data 扁平数据数组
|
|
8
8
|
* @param options 配置选项
|
|
9
|
-
* @param options.childrenKey 子节点键名
|
|
10
|
-
* @param options.idKey 节点ID键名
|
|
11
|
-
* @param options.parentKey 节点父ID键名
|
|
12
|
-
* @param options.rootParentId 根节点ID键名
|
|
9
|
+
* @param options.childrenKey 子节点键名 默认 children
|
|
10
|
+
* @param options.idKey 节点ID键名 默认 id
|
|
11
|
+
* @param options.parentKey 节点父ID键名 默认 parentId
|
|
12
|
+
* @param options.rootParentId 根节点ID键名 默认 null
|
|
13
13
|
* @returns 树形结构数组
|
|
14
14
|
*/
|
|
15
15
|
export declare function flatArrToTree(data: Record<string, any>[], options?: {
|
|
@@ -18,6 +18,60 @@ export declare function flatArrToTree(data: Record<string, any>[], options?: {
|
|
|
18
18
|
parentKey?: string;
|
|
19
19
|
rootParentId?: null | string;
|
|
20
20
|
}): TreeNode[];
|
|
21
|
+
/**
|
|
22
|
+
* 递归转换树结构(字段重命名、节点扩展),深度优先遍历,返回新树,不修改原数据
|
|
23
|
+
*
|
|
24
|
+
* 每个节点的处理顺序:`fieldNamesMapping` → 保留其余源字段 → `mapNode` → 递归挂载子树
|
|
25
|
+
*
|
|
26
|
+
* @param tree 源树形数据根节点数组;非数组时抛出 `TypeError`
|
|
27
|
+
* @param options 配置选项
|
|
28
|
+
* @param options.childrenKey 源数据中子节点数组所在字段,默认 `children`。
|
|
29
|
+
* 不可作为 `fieldNamesMapping` 的「源字段」出现(会与递归子树冲突而抛错)
|
|
30
|
+
* @param options.outputChildrenKey 输出树中子节点数组字段名,默认 `children`。
|
|
31
|
+
* 不可作为 `fieldNamesMapping` 的「目标字段」出现,请用该选项而非映射表配置子节点键名
|
|
32
|
+
* @param options.fieldNamesMapping 字段重命名:`{ 目标字段: 源字段 }`。
|
|
33
|
+
* 源字段存在时写入目标字段;若源节点上已有与目标同名的字段,以映射结果为准。
|
|
34
|
+
* 源字段仅参与映射,不会原样拷贝到输出
|
|
35
|
+
* @param options.mapNode 对每个节点在字段映射之后的附加处理;返回值浅合并进节点。
|
|
36
|
+
* 根层级 depth 为 `0`。避免无故返回 `outputChildrenKey`,叶子节点也会被调用
|
|
37
|
+
* @returns 转换后的树;`tree` 为空数组时返回 `[]`
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* - 子节点键名请用 `childrenKey` / `outputChildrenKey` 配置,不要写 `fieldNamesMapping.children`
|
|
41
|
+
* - 源子节点为 `[]` 时输出空数组;为 `null` / 缺失且非数组时不写入 `outputChildrenKey`
|
|
42
|
+
* - 未出现在映射中的源字段会保留(`childrenKey`、`outputChildrenKey` 与映射源字段除外)
|
|
43
|
+
*
|
|
44
|
+
* @example 重命名接口字段
|
|
45
|
+
* ```ts
|
|
46
|
+
* mapTree(deptTree, {
|
|
47
|
+
* fieldNamesMapping: { label: 'deptName', value: 'deptId' },
|
|
48
|
+
* })
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @example 子节点字段不叫 children
|
|
52
|
+
* ```ts
|
|
53
|
+
* mapTree(apiTree, {
|
|
54
|
+
* childrenKey: 'childList',
|
|
55
|
+
* fieldNamesMapping: { label: 'menuName', value: 'menuId' },
|
|
56
|
+
* })
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function mapTree(tree: Record<string, any>[], options?: {
|
|
60
|
+
childrenKey?: string;
|
|
61
|
+
fieldNamesMapping?: Record<string, string>;
|
|
62
|
+
mapNode?: (node: Record<string, any>, level: number) => Record<string, any>;
|
|
63
|
+
outputChildrenKey?: string;
|
|
64
|
+
}): Record<string, any>[];
|
|
65
|
+
/**
|
|
66
|
+
* 将树形结构深度优先遍历为扁平数组
|
|
67
|
+
* @param tree 树形数据根节点数组
|
|
68
|
+
* @param options 配置选项
|
|
69
|
+
* @param options.flatCb 遍历时对每个节点的自定义映射,返回值会合并进扁平项
|
|
70
|
+
* @param options.idKey 用于写入 parentId 的节点 ID 字段名,默认 id
|
|
71
|
+
* @param options.includeLevel 是否在每项上附加 level(根为 0)
|
|
72
|
+
* @param options.includeParentId 是否在每项上附加 parentId(根节点为 null)
|
|
73
|
+
* @returns 不含 children 的扁平节点数组,顺序为前序遍历
|
|
74
|
+
*/
|
|
21
75
|
export declare function treeToFlatArr(tree: TreeNode[], options?: {
|
|
22
76
|
flatCb?: (node: TreeNode, parentNode?: null | TreeNode) => Record<string, any>;
|
|
23
77
|
idKey?: string;
|
package/utils/tree.mjs
CHANGED
|
@@ -1,28 +1,46 @@
|
|
|
1
|
+
import { isFalsy as e } from "./boolean.mjs";
|
|
1
2
|
// ../../packages/dlzn-ui/utils/tree.ts
|
|
2
|
-
function
|
|
3
|
-
let { childrenKey:
|
|
4
|
-
if (!Array.isArray(
|
|
5
|
-
if (
|
|
6
|
-
let
|
|
7
|
-
for (let
|
|
8
|
-
let
|
|
9
|
-
if (
|
|
10
|
-
console.warn(`flatArrToTree: 数据项缺少 ${
|
|
3
|
+
function t(t, n = {}) {
|
|
4
|
+
let { childrenKey: r = "children", idKey: i = "id", parentKey: a = "parentId", rootParentId: o = null } = n;
|
|
5
|
+
if (!Array.isArray(t)) throw TypeError("flatArrToTree: 输入参数 data 必须是数组");
|
|
6
|
+
if (t.length === 0) return [];
|
|
7
|
+
let s = [], c = /* @__PURE__ */ new Map();
|
|
8
|
+
for (let e of t) {
|
|
9
|
+
let t = e[i];
|
|
10
|
+
if (t == null) {
|
|
11
|
+
console.warn(`flatArrToTree: 数据项缺少 ${i} 属性`, e);
|
|
11
12
|
continue;
|
|
12
13
|
}
|
|
13
14
|
let n = {
|
|
14
|
-
...
|
|
15
|
+
...e,
|
|
15
16
|
children: []
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
+
c.has(t) && console.warn(`flatArrToTree: 检测到重复的 ${i}: ${t}`), c.set(t, n);
|
|
19
|
+
}
|
|
20
|
+
for (let [t, n] of c) {
|
|
21
|
+
let t = n[a];
|
|
22
|
+
t === o || !c.has(t) || e(t) ? s.push(n) : c.get(t)[r].push(n);
|
|
18
23
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
function n(e, t) {
|
|
27
|
+
if (!Array.isArray(e)) throw TypeError("mapTree: 输入参数 tree 必须是数组");
|
|
28
|
+
if (e.length === 0) return [];
|
|
29
|
+
let { childrenKey: n = "children", fieldNamesMapping: r = {}, mapNode: i, outputChildrenKey: a = "children" } = t ?? {};
|
|
30
|
+
if (a in r) throw TypeError(`mapTree: 字段映射表中包含 ${a} 字段,请使用 outputChildrenKey 配置输出字段名`);
|
|
31
|
+
let o = new Set(Object.values(r));
|
|
32
|
+
if (o.has(n)) throw TypeError(`mapTree: 字段映射表中包含 ${n} 字段,请使用 childrenKey 配置输入字段名`);
|
|
33
|
+
function s(e, t) {
|
|
34
|
+
return e.map((e) => {
|
|
35
|
+
let c = e[n], l = {};
|
|
36
|
+
for (let [t, n] of Object.entries(r)) n in e && (l[t] = e[n]);
|
|
37
|
+
for (let [t, r] of Object.entries(e)) t === n || t === a || o.has(t) || t in l || (l[t] = r);
|
|
38
|
+
return Object.assign(l, i?.(e, t) ?? {}), Array.isArray(c) && c.length > 0 && (l[a] = s(c, t + 1)), l;
|
|
39
|
+
});
|
|
22
40
|
}
|
|
23
|
-
return
|
|
41
|
+
return s(e, 0);
|
|
24
42
|
}
|
|
25
|
-
function
|
|
43
|
+
function r(e, t) {
|
|
26
44
|
let { flatCb: n, idKey: r = "id", includeLevel: i = !1, includeParentId: a = !1 } = t ?? {}, o = [];
|
|
27
45
|
function s(e, t = 0, c = null) {
|
|
28
46
|
Array.isArray(e) && e.forEach((e) => {
|
|
@@ -35,4 +53,4 @@ function t(e, t) {
|
|
|
35
53
|
}
|
|
36
54
|
return s(e), o;
|
|
37
55
|
}
|
|
38
|
-
export {
|
|
56
|
+
export { t as flatArrToTree, n as mapTree, r as treeToFlatArr };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../components/card/index.mjs";
|
|
2
2
|
import { t as e } from "../../../chunks/card-fcGTPVWb.mjs";
|
|
3
3
|
import "../../../components/table/index.mjs";
|
|
4
|
-
import { t } from "../../../chunks/table-
|
|
5
|
-
import {
|
|
4
|
+
import { t } from "../../../chunks/table-fzyYo8Na.mjs";
|
|
5
|
+
import { P as n } from "../../../chunks/provider-ClG0820c.mjs";
|
|
6
6
|
import { t as r } from "../../../chunks/echarts-CYv6gr6J.mjs";
|
|
7
7
|
import { computed as i, createElementBlock as a, createVNode as o, defineComponent as s, normalizeStyle as c, openBlock as l, unref as u, withCtx as d } from "vue";
|
|
8
8
|
import { useRequest as f } from "alova/client";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as e, n as t, o as n } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
2
|
import "../../../components/card/index.mjs";
|
|
3
3
|
import { t as r } from "../../../chunks/card-fcGTPVWb.mjs";
|
|
4
4
|
import "../../../components/table/index.mjs";
|
|
5
|
-
import { t as i } from "../../../chunks/table-
|
|
5
|
+
import { t as i } from "../../../chunks/table-fzyYo8Na.mjs";
|
|
6
6
|
import a from "../../../plugins/autoImport/$msg/index.mjs";
|
|
7
7
|
import { computed as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, reactive as f, ref as p, unref as m, watch as h, withCtx as g } from "vue";
|
|
8
8
|
// ../../packages/dlzn-ui/views/monitor/cacheList/index.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../../chunks/job-
|
|
1
|
+
import { t as e } from "../../../chunks/job-Bo00bGj4.mjs";
|
|
2
2
|
import { createBlock as t, defineComponent as n, openBlock as r } from "vue";
|
|
3
3
|
// ../../packages/dlzn-ui/views/monitor/job/index.vue
|
|
4
4
|
var i = /* @__PURE__ */ n({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../components/page-list/index.mjs";
|
|
2
|
-
import { t as e } from "../../../chunks/page-list-
|
|
3
|
-
import {
|
|
2
|
+
import { t as e } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
3
|
+
import { P as t } from "../../../chunks/provider-ClG0820c.mjs";
|
|
4
4
|
import { createBlock as n, defineComponent as r, mergeProps as i, openBlock as a, reactive as o, ref as s, unref as c, useTemplateRef as l } from "vue";
|
|
5
5
|
// ../../packages/dlzn-ui/views/monitor/logininfor/index.vue
|
|
6
6
|
var u = /* @__PURE__ */ r({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../components/page-list/index.mjs";
|
|
2
|
-
import { t as e } from "../../../chunks/page-list-
|
|
3
|
-
import {
|
|
2
|
+
import { t as e } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
3
|
+
import { P as t } from "../../../chunks/provider-ClG0820c.mjs";
|
|
4
4
|
import { createBlock as n, defineComponent as r, mergeProps as i, openBlock as a, unref as o, useTemplateRef as s } from "vue";
|
|
5
5
|
// ../../packages/dlzn-ui/views/monitor/online/index.vue
|
|
6
6
|
var c = /* @__PURE__ */ r({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "../../../chunks/page-list-
|
|
1
|
+
import { P as e, at as t, o as n } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
|
+
import { t as r } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
3
3
|
import "../../../components/page-list/index.mjs";
|
|
4
4
|
import { createBlock as i, defineComponent as a, h as o, mergeProps as s, openBlock as c, reactive as l, ref as u, unref as d, useTemplateRef as f, watch as p } from "vue";
|
|
5
5
|
// ../../packages/dlzn-ui/views/monitor/operlog/index.vue
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../components/card/index.mjs";
|
|
2
2
|
import { t as e } from "../../../chunks/card-fcGTPVWb.mjs";
|
|
3
3
|
import "../../../components/table/index.mjs";
|
|
4
|
-
import { t } from "../../../chunks/table-
|
|
5
|
-
import {
|
|
4
|
+
import { t } from "../../../chunks/table-fzyYo8Na.mjs";
|
|
5
|
+
import { P as n } from "../../../chunks/provider-ClG0820c.mjs";
|
|
6
6
|
import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
|
|
7
7
|
import { useRequest as u } from "alova/client";
|
|
8
8
|
// ../../packages/dlzn-ui/views/monitor/server/index.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as e, it as t, o as n } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
2
|
import "../../../components/page-list/index.mjs";
|
|
3
|
-
import { t as r } from "../../../chunks/page-list-
|
|
3
|
+
import { t as r } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
4
4
|
import i from "../../../plugins/autoImport/$msg/index.mjs";
|
|
5
5
|
import { createBlock as a, defineComponent as o, h as s, mergeProps as c, openBlock as l, reactive as u, ref as d, unref as f, useTemplateRef as p, watch as m } from "vue";
|
|
6
6
|
// ../../packages/dlzn-ui/views/system/config/index.vue
|
|
@@ -104,8 +104,8 @@ var h = /* @__PURE__ */ o({
|
|
|
104
104
|
let a = d(null);
|
|
105
105
|
m(a, () => {
|
|
106
106
|
a.value.setFormData(r);
|
|
107
|
-
}, { once: !0 }),
|
|
108
|
-
body: () => s(
|
|
107
|
+
}, { once: !0 }), t({
|
|
108
|
+
body: () => s(n, {
|
|
109
109
|
items: [
|
|
110
110
|
g.configName,
|
|
111
111
|
g.configKey,
|
|
@@ -148,8 +148,8 @@ var h = /* @__PURE__ */ o({
|
|
|
148
148
|
default: "新增",
|
|
149
149
|
onClick: () => {
|
|
150
150
|
let r = d(null);
|
|
151
|
-
|
|
152
|
-
body: () => s(
|
|
151
|
+
t({
|
|
152
|
+
body: () => s(n, {
|
|
153
153
|
data: u({ configType: "Y" }),
|
|
154
154
|
items: [
|
|
155
155
|
g.configName,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as e, P as t, it as n, o as r } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
2
|
import "../../../components/page-list/index.mjs";
|
|
3
|
-
import { flatArrToTree as
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import { deptTreeList as
|
|
7
|
-
import { createBlock as
|
|
3
|
+
import { flatArrToTree as i } from "../../../utils/tree.mjs";
|
|
4
|
+
import { t as a } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
5
|
+
import o from "../../../plugins/autoImport/$msg/index.mjs";
|
|
6
|
+
import { deptTreeList as s, deptTreeListSend as c } from "./utils.mjs";
|
|
7
|
+
import { createBlock as l, defineComponent as u, h as d, mergeProps as f, openBlock as p, reactive as m, ref as h, unref as g, useTemplateRef as _, watch as v } from "vue";
|
|
8
8
|
// ../../packages/dlzn-ui/views/system/dept/index.vue
|
|
9
|
-
var
|
|
9
|
+
var y = /* @__PURE__ */ u({
|
|
10
10
|
__name: "index",
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
let
|
|
11
|
+
setup(u) {
|
|
12
|
+
c();
|
|
13
|
+
let y = _("pageListRef"), b = h([]), x = {
|
|
14
14
|
deptName: {
|
|
15
15
|
_label: "部门名称",
|
|
16
16
|
_required: !0,
|
|
@@ -39,7 +39,7 @@ var v = /* @__PURE__ */ l({
|
|
|
39
39
|
},
|
|
40
40
|
parentId: {
|
|
41
41
|
__others: ({ formData: e }) => ({
|
|
42
|
-
data:
|
|
42
|
+
data: s.value,
|
|
43
43
|
show: e.parentId !== "0"
|
|
44
44
|
}),
|
|
45
45
|
_label: "上级部门",
|
|
@@ -61,17 +61,17 @@ var v = /* @__PURE__ */ l({
|
|
|
61
61
|
dicCode: "sys_normal_disable",
|
|
62
62
|
model: "status"
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
apis: { list: { method: (
|
|
64
|
+
}, S = {
|
|
65
|
+
apis: { list: { method: (e) => t.Get("system/dept/list", {
|
|
66
66
|
params: {
|
|
67
|
-
...
|
|
67
|
+
...e,
|
|
68
68
|
pageNum: void 0,
|
|
69
69
|
pageSize: void 0
|
|
70
70
|
},
|
|
71
71
|
transform: (e) => {
|
|
72
|
-
let t =
|
|
72
|
+
let t = i(e, { idKey: "deptId" }), n = (e) => {
|
|
73
73
|
e.forEach((e) => {
|
|
74
|
-
(e.children ?? []).length > 0 && (
|
|
74
|
+
(e.children ?? []).length > 0 && (b.value.push(e.deptId), n(e.children));
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
return n(t), {
|
|
@@ -121,81 +121,81 @@ var v = /* @__PURE__ */ l({
|
|
|
121
121
|
{
|
|
122
122
|
cell: {
|
|
123
123
|
buttons: [
|
|
124
|
-
({ row:
|
|
124
|
+
({ row: i }) => ({
|
|
125
125
|
default: "编辑",
|
|
126
126
|
onClick: () => {
|
|
127
|
-
let
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
let a = h(null);
|
|
128
|
+
v(a, () => {
|
|
129
|
+
a.value.setFormData(i);
|
|
130
130
|
}, { once: !0 }), n({
|
|
131
|
-
body: () =>
|
|
131
|
+
body: () => d(r, {
|
|
132
132
|
items: [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
x.parentId,
|
|
134
|
+
x.deptName,
|
|
135
|
+
x.orderNum,
|
|
136
|
+
x.leader,
|
|
137
|
+
x.phone,
|
|
138
|
+
x.email,
|
|
139
|
+
x.status
|
|
140
140
|
],
|
|
141
|
-
ref:
|
|
141
|
+
ref: a
|
|
142
142
|
}),
|
|
143
143
|
header: "编辑部门",
|
|
144
144
|
onConfirmCallback: async () => {
|
|
145
|
-
let
|
|
146
|
-
await
|
|
147
|
-
...
|
|
148
|
-
deptId:
|
|
149
|
-
}),
|
|
145
|
+
let n = await a.value.validate();
|
|
146
|
+
await t.Put("system/dept", {
|
|
147
|
+
...n,
|
|
148
|
+
deptId: i.deptId
|
|
149
|
+
}), c(), e("systemDeptTree"), o.success("部门修改成功"), y.value.query();
|
|
150
150
|
},
|
|
151
151
|
width: 730
|
|
152
152
|
});
|
|
153
153
|
},
|
|
154
154
|
permission: "system:dept:edit"
|
|
155
155
|
}),
|
|
156
|
-
({ row:
|
|
156
|
+
({ row: i }) => ({
|
|
157
157
|
default: "新增",
|
|
158
158
|
onClick: () => {
|
|
159
|
-
let
|
|
159
|
+
let a = h(null);
|
|
160
160
|
n({
|
|
161
|
-
body: () =>
|
|
162
|
-
data:
|
|
163
|
-
parentId:
|
|
161
|
+
body: () => d(r, {
|
|
162
|
+
data: m({
|
|
163
|
+
parentId: i.deptId,
|
|
164
164
|
status: "0"
|
|
165
165
|
}),
|
|
166
166
|
items: [
|
|
167
167
|
{
|
|
168
|
-
...
|
|
168
|
+
...x.parentId,
|
|
169
169
|
disabled: !0
|
|
170
170
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
x.deptName,
|
|
172
|
+
x.orderNum,
|
|
173
|
+
x.leader,
|
|
174
|
+
x.phone,
|
|
175
|
+
x.email,
|
|
176
|
+
x.status
|
|
177
177
|
],
|
|
178
|
-
ref:
|
|
178
|
+
ref: a
|
|
179
179
|
}),
|
|
180
180
|
header: "新增部门",
|
|
181
181
|
onConfirmCallback: async () => {
|
|
182
|
-
await
|
|
182
|
+
await t.Post("system/dept", await a.value.validate()), c(), e("systemDeptTree"), o.success("部门添加成功"), y.value.query();
|
|
183
183
|
},
|
|
184
184
|
width: 730
|
|
185
185
|
});
|
|
186
186
|
},
|
|
187
187
|
permission: "system:dept:add"
|
|
188
188
|
}),
|
|
189
|
-
({ row:
|
|
189
|
+
({ row: n }) => ({
|
|
190
190
|
default: "删除",
|
|
191
191
|
permission: "system:dept:remove",
|
|
192
192
|
popconfirm: {
|
|
193
193
|
content: "确认删除吗",
|
|
194
194
|
onConfirm: async () => {
|
|
195
|
-
await
|
|
195
|
+
await t.Delete(`system/dept/${n.deptId}`), c(), e("systemDeptTree"), o("删除成功"), y.value.query();
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
|
-
show:
|
|
198
|
+
show: n.parentId !== "0"
|
|
199
199
|
})
|
|
200
200
|
],
|
|
201
201
|
component: "Buttons"
|
|
@@ -204,50 +204,50 @@ var v = /* @__PURE__ */ l({
|
|
|
204
204
|
title: "操作"
|
|
205
205
|
}
|
|
206
206
|
],
|
|
207
|
-
formItems: [
|
|
208
|
-
...
|
|
207
|
+
formItems: [x.deptName, {
|
|
208
|
+
...x.status,
|
|
209
209
|
component: "TSelect"
|
|
210
210
|
}],
|
|
211
211
|
operations: [{
|
|
212
212
|
default: "新增",
|
|
213
213
|
onClick: () => {
|
|
214
|
-
let
|
|
214
|
+
let i = h(null);
|
|
215
215
|
n({
|
|
216
|
-
body: () =>
|
|
217
|
-
data:
|
|
216
|
+
body: () => d(r, {
|
|
217
|
+
data: m({ status: "0" }),
|
|
218
218
|
items: [
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
219
|
+
x.parentId,
|
|
220
|
+
x.deptName,
|
|
221
|
+
x.orderNum,
|
|
222
|
+
x.leader,
|
|
223
|
+
x.phone,
|
|
224
|
+
x.email,
|
|
225
|
+
x.status
|
|
226
226
|
],
|
|
227
|
-
ref:
|
|
227
|
+
ref: i
|
|
228
228
|
}),
|
|
229
229
|
header: "添加部门",
|
|
230
230
|
onConfirmCallback: async () => {
|
|
231
|
-
await
|
|
231
|
+
await t.Post("system/dept", await i.value.validate()), c(), e("systemDeptTree"), o.success("部门添加成功"), y.value.query();
|
|
232
232
|
},
|
|
233
233
|
width: 730
|
|
234
234
|
});
|
|
235
235
|
},
|
|
236
236
|
permission: "system:dept:add"
|
|
237
237
|
}],
|
|
238
|
-
tableOtherProps:
|
|
239
|
-
expandedTreeNodes:
|
|
238
|
+
tableOtherProps: m({
|
|
239
|
+
expandedTreeNodes: b,
|
|
240
240
|
onExpandedTreeNodesChange: (e) => {
|
|
241
|
-
|
|
241
|
+
b.value = e;
|
|
242
242
|
},
|
|
243
243
|
rowKey: "deptId",
|
|
244
244
|
showSerialNumber: !1
|
|
245
245
|
})
|
|
246
246
|
};
|
|
247
|
-
return (e, t) => (
|
|
247
|
+
return (e, t) => (p(), l(g(a), f({
|
|
248
248
|
ref_key: "pageListRef",
|
|
249
|
-
ref:
|
|
250
|
-
},
|
|
249
|
+
ref: y
|
|
250
|
+
}, S), null, 16));
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
|
-
export {
|
|
253
|
+
export { y as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as e } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
2
|
import { flatArrToTree as t } from "../../../utils/tree.mjs";
|
|
3
3
|
import { useRequest as n } from "alova/client";
|
|
4
4
|
// ../../packages/dlzn-ui/views/system/dept/utils.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as e, at as t, it as n, o as r } from "../../../chunks/provider-ClG0820c.mjs";
|
|
2
2
|
import "../../../components/page-list/index.mjs";
|
|
3
|
-
import { t as i } from "../../../chunks/page-list-
|
|
3
|
+
import { t as i } from "../../../chunks/page-list-BpswI1cl.mjs";
|
|
4
4
|
import a from "../../../plugins/autoImport/$msg/index.mjs";
|
|
5
|
-
import { t as o } from "../../../chunks/DictTypeDetail-
|
|
5
|
+
import { t as o } from "../../../chunks/DictTypeDetail-Bx5bKwXw.mjs";
|
|
6
6
|
import { createBlock as s, defineComponent as c, h as l, mergeProps as u, openBlock as d, reactive as f, ref as p, unref as m, useTemplateRef as h, watch as g } from "vue";
|
|
7
7
|
// ../../packages/dlzn-ui/views/system/dict/index.vue
|
|
8
8
|
var _ = /* @__PURE__ */ c({
|
|
@@ -108,8 +108,8 @@ var _ = /* @__PURE__ */ c({
|
|
|
108
108
|
let i = p(null);
|
|
109
109
|
g(i, () => {
|
|
110
110
|
i.value.setFormData(t);
|
|
111
|
-
}, { once: !0 }),
|
|
112
|
-
body: () => l(
|
|
111
|
+
}, { once: !0 }), n({
|
|
112
|
+
body: () => l(r, {
|
|
113
113
|
items: [
|
|
114
114
|
v.dictName,
|
|
115
115
|
v.dictType,
|
|
@@ -151,8 +151,8 @@ var _ = /* @__PURE__ */ c({
|
|
|
151
151
|
default: "新增",
|
|
152
152
|
onClick: () => {
|
|
153
153
|
let t = p(null);
|
|
154
|
-
|
|
155
|
-
body: () => l(
|
|
154
|
+
n({
|
|
155
|
+
body: () => l(r, {
|
|
156
156
|
data: f({ status: "0" }),
|
|
157
157
|
items: [
|
|
158
158
|
v.dictName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as default } from "../../../../chunks/DictTypeDetail-
|
|
1
|
+
export { t as default } from "../../../../chunks/DictTypeDetail-Bx5bKwXw.mjs";
|