@utogether/udp-core 1.0.2 → 1.0.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{403-B1rIjAAu.js → 403-CH-5FVhN.js} +1 -1
  2. package/dist/{404-mBqc2y4t.js → 404-CFk6Ivq-.js} +1 -1
  3. package/dist/{500-BoI45Zdh.js → 500-DRjSNKN3.js} +1 -1
  4. package/dist/{AuthorityInfo-B08NBIIn.js → AuthorityInfo-DxNFwxdz.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-BLP1SaiH.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BI2PKcqq.js} +1 -1
  6. package/dist/{AuthorityPanel-BeBNiwqc.js → AuthorityPanel-BzIh29KB.js} +1 -1
  7. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js → AuthorityPanel.vue_vue_type_style_index_0_lang-D3GN0Ybz.js} +32 -24
  8. package/dist/{Company-JGGyWEWH.js → Company-DGFD7_MF.js} +3 -3
  9. package/dist/{CompanyPanel-BQ_cCmDx.js → CompanyPanel-BHXndpIr.js} +1 -1
  10. package/dist/{Department-z2iO6hwM.js → Department-CFcjdf8m.js} +3 -3
  11. package/dist/{DepartmentPanel-BtQe7zwU.js → DepartmentPanel-DrBtJClY.js} +1 -1
  12. package/dist/{DesignPanel-7mhtVWas.js → DesignPanel-EAKuwOqp.js} +1 -1
  13. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-4EsHemj_.js → DesignPanel.vue_vue_type_style_index_0_lang-BOP4Q41a.js} +2 -2
  14. package/dist/{DictView-CjchV2Yk.js → DictView-CpRvxDO0.js} +10 -9
  15. package/dist/{InvOrganization-Pn1O_XP0.js → InvOrganization-DZC9aKKv.js} +1 -1
  16. package/dist/{Org-BqytV_vi.js → Org-D5heLogi.js} +1 -1
  17. package/dist/{Preview-CLpUUMay.js → Preview-DWuThn2_.js} +1 -1
  18. package/dist/{ReportDefine-Cz1KtEUF.js → ReportDefine-FeHx3B-B.js} +1 -1
  19. package/dist/{ReportDesign-BaORYud4.js → ReportDesign-Deo5AK76.js} +2 -2
  20. package/dist/{ReportQuery-CPCPXiXz.js → ReportQuery-WK5BPREv.js} +1 -1
  21. package/dist/{ReportQueryFrom-C_AcrfkJ.js → ReportQueryFrom-BcbRvwcp.js} +1 -1
  22. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Bm67ejay.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-DEXuBXHO.js} +1 -1
  23. package/dist/{ReportTemplate-CFiNMz79.js → ReportTemplate-DAk0qIJq.js} +1 -1
  24. package/dist/{Role-B-XDoJd5.js → Role-sSVr8txF.js} +3 -3
  25. package/dist/{RoleAssign-BolW8YVs.js → RoleAssign-gg9O7P1_.js} +3 -3
  26. package/dist/{RolePanel-HilSuYns.js → RolePanel-D2M-Wc-X.js} +1 -1
  27. package/dist/{RolePanel-2kfs5tw9.js → RolePanel-DsyVPcoq.js} +1 -1
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CE4gApUY.js → RolePanel.vue_vue_type_script_setup_true_lang-C4fuYoIS.js} +1 -1
  29. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DPzgfAyV.js → RolePanel.vue_vue_type_script_setup_true_lang-RR24avbF.js} +3 -3
  30. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CCTH4RkH.js → ScrollPanel.vue_vue_type_style_index_0_lang-6v5vVx-e.js} +1 -1
  31. package/dist/{Staff-BTk3whFC.js → Staff-DTDrOuE0.js} +3 -3
  32. package/dist/{StaffInfo-d3AuSzlA.js → StaffInfo-B2H_6lwQ.js} +1 -1
  33. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-eOL4VlfE.js → StaffInfo.vue_vue_type_script_setup_true_lang-BkDRBn9p.js} +1 -1
  34. package/dist/{StaffPanel-DV-D4jjz.js → StaffPanel-dpmnAD0A.js} +1 -1
  35. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-4sFq3CEo.js → StaffPanel.vue_vue_type_script_setup_true_lang-dgV9B37R.js} +47 -39
  36. package/dist/{SysUser-BnjYytws.js → SysUser-BjpQdzSo.js} +2 -2
  37. package/dist/{SysUserPanel-CBoyD-Qi.js → SysUserPanel-C5IHO7JB.js} +1 -1
  38. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-PrTlTZR-.js → SysUserPanel.vue_vue_type_script_setup_true_lang-HvJ4Hrps.js} +1 -1
  39. package/dist/{SystemMenu-kYB_ZaUt.js → SystemMenu-D7W9E8SF.js} +53 -50
  40. package/dist/{UserInfo-4dx97VBL.js → UserInfo-D_lbSbUh.js} +1 -1
  41. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-BpbC_ZDm.js → UserInfo.vue_vue_type_style_index_0_lang-NLl8VJ5I.js} +1 -1
  42. package/dist/{childView-CHPNfTEb.js → childView-B1XV2jZ7.js} +1 -1
  43. package/dist/{childView-CKA_JgVZ.js → childView-LQllG9vw.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-W7bCtXeu.js → childView.vue_vue_type_style_index_0_lang-DN19uWOO.js} +31 -31
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-Bym2fQRd.js → childView.vue_vue_type_style_index_0_lang-Dpo_nfX9.js} +19 -20
  46. package/dist/{code-rule-CbxuZg0-.js → code-rule-DkKKcosO.js} +1 -1
  47. package/dist/core.es.js +1 -1
  48. package/dist/{cron-task-nTOpqQYf.js → cron-task-bGVrr2Jg.js} +1 -1
  49. package/dist/{frameView-Z1tPUyCh.js → frameView-B3n2JXTj.js} +1 -1
  50. package/dist/index-DYT0k5Sg.js +8134 -0
  51. package/dist/{layoutView--MGA9zUB.js → layoutView-bh22tftc.js} +144 -145
  52. package/dist/{log-in-CSYJDA6m.js → log-in-Dk_xyZ_l.js} +1 -1
  53. package/dist/{log-out-DiwGCg7p.js → log-out-CERhlqtr.js} +1 -1
  54. package/dist/{login-C6Y0ajDp.js → login-C5EJWWLi.js} +124 -134
  55. package/dist/{login-log-C0V-_l3F.js → login-log-DJBGJVV0.js} +4 -4
  56. package/dist/{lov-view-Cmv7wZZ9.js → lov-view-BNGHpq-d.js} +2 -2
  57. package/dist/{menuInfo-UeutJpOa.js → menuInfo-2DBTH6Vf.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CWX4Mu67.js → menuInfo.vue_vue_type_style_index_0_lang-KtLS__XM.js} +37 -35
  59. package/dist/{pda-app-B6w99SJo.js → pda-app-BzmHIT9A.js} +1 -1
  60. package/dist/{resource-BybJvUv0.js → resource-D6UY8vN8.js} +1 -1
  61. package/dist/{su-welcome-C1bmxHoY.js → su-welcome-okexK2W2.js} +20 -20
  62. package/dist/{sys-config-BnmIDnCj.js → sys-config-9F_C1LzR.js} +1 -1
  63. package/dist/udp-core.css +1 -1
  64. package/package.json +1 -1
  65. package/src/App.vue +73 -65
  66. package/src/components/udp/form-upload/form-upload.vue +492 -0
  67. package/src/components/udp/index.ts +2 -1
  68. package/src/layout/components/lay-content/index.vue +136 -143
  69. package/src/layout/components/lay-sidebar/sidebar-logo.vue +1 -1
  70. package/src/layout/layoutView.vue +7 -6
  71. package/src/main.ts +2 -2
  72. package/src/plugins/i18n/zh.ts +1 -0
  73. package/src/plugins/vxe-table/index.ts +116 -116
  74. package/src/plugins/vxe-table/render.tsx +968 -945
  75. package/src/style/vxetable.scss +356 -348
  76. package/src/utils/dataFormat/index.ts +17 -18
  77. package/src/views/organization/staff/StaffPanel.vue +12 -3
  78. package/src/views/system/menu/AuthorityPanel.vue +142 -140
  79. package/src/views/system/menu/SystemMenu.vue +194 -185
  80. package/src/views/system/menu/menuInfo.vue +384 -384
  81. package/src/views/udev/dict/DictView.vue +2 -2
  82. package/src/views/udev/dict/childView.vue +6 -6
  83. package/src/views/udev/lov/childView.vue +174 -174
  84. package/src/views/uhome/components/menu-favorite.vue +3 -2
  85. package/src/views/ulogin/login.vue +34 -23
  86. package/src/views/upms/user/login-log.vue +5 -5
  87. package/dist/index-C3q8HoJM.js +0 -4650
@@ -2,7 +2,7 @@
2
2
  * @Author: wei.li
3
3
  * @Date: 2022-06-23 17:29:11
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2024-07-04 21:06:05
5
+ * @LastEditTime: 2025-12-04 13:34:40
6
6
  * @Description: file content
7
7
  */
8
8
 
@@ -39,25 +39,24 @@ const searchBtn: IFormItemProps = {
39
39
  align: 'right',
40
40
  collapseNode: false,
41
41
  itemRender: {
42
- name: '$buttons',
43
- children: [
42
+ name: 'VxeButtonGroup',
43
+ options: [
44
44
  {
45
- props: {
46
- type: 'submit',
47
- content: 'message.btn.search',
48
- status: 'primary',
49
- icon: 'vxe-icon-search'
50
- }
45
+ type: 'submit',
46
+ submit: 'submit',
47
+ content: 'message.btn.search',
48
+ status: 'primary',
49
+ icon: 'ri-search-line'
51
50
  },
52
51
  {
53
- props: {
54
- type: 'reset',
55
- content: 'message.btn.reset',
56
- status: 'info',
57
- icon: 'ri-refresh-line ri-1x'
58
- }
52
+ type: 'reset',
53
+ name: 'reset',
54
+ content: 'message.btn.reset',
55
+ status: 'info',
56
+ icon: 'ri-refresh-line'
59
57
  }
60
- ]
58
+ ],
59
+ events: null
61
60
  }
62
61
  };
63
62
 
@@ -68,7 +67,7 @@ export const formatGridItems = (records, favorite) => {
68
67
  const isDateRange = len > 2 && formItems.some((f, idx) => idx < 3 && (f.span > 6 || getDateRange(f)));
69
68
  // 需要展示折叠按钮
70
69
  const isCollapse = isDateRange || len > 3;
71
- const defaultCollapse = { collapseTags: true, collapseTagsTooltip: true };
70
+ const defaultCollapse = { collapseTags: true, collapseTagsTooltip: true, multiple: true };
72
71
  const items = formItems.map((item, idx) => {
73
72
  item.folding = isDateRange ? isCollapse && idx > 1 : isCollapse && idx > 2;
74
73
  item.span = getDateRange(item) ? 12 : item.span || 6;
@@ -84,7 +83,7 @@ export const formatGridItems = (records, favorite) => {
84
83
  });
85
84
  const btn = clone(searchBtn, true);
86
85
  btn.collapseNode = isCollapse;
87
- favorite && btn.itemRender.children.length < 3 && btn.itemRender.children.push(favorite);
86
+ favorite && btn.itemRender.options.length < 3 && btn.itemRender.options.push(favorite);
88
87
 
89
88
  if (isCollapse) {
90
89
  // 按钮设置为 折叠节点
@@ -2,7 +2,7 @@
2
2
  * @Author: wei.li
3
3
  * @Date: 2021-11-17 16:42:14
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-11-27 18:59:49
5
+ * @LastEditTime: 2025-12-08 08:27:39
6
6
  * @Description: 员工管理
7
7
  -->
8
8
 
@@ -17,6 +17,7 @@
17
17
  :auto-load="false"
18
18
  :buttons="buttons"
19
19
  :url="url"
20
+ :callback="callback"
20
21
  mode="form"
21
22
  @buttonClick="onButtonClick"
22
23
  />
@@ -32,6 +33,7 @@ import { warnMessage } from '@utogether/utils';
32
33
  import StaffInfo from './StaffInfo.vue';
33
34
  import { getServiceApi } from '../../../api';
34
35
  import { VxeUI } from 'vxe-pc-ui';
36
+ import to from 'await-to-js';
35
37
 
36
38
  const xgrid = ref(null);
37
39
  const { t } = useI18n();
@@ -126,13 +128,14 @@ const handleUpdate = async (record: IRecord) => {
126
128
  xgrid.value.hiddenLoading();
127
129
  xgrid.value.refreshData();
128
130
  };
129
- // 启用/禁用
131
+ // 同步
130
132
  const handleSync = async () => {
131
133
  const type = await VxeUI.modal.confirm(t('message.tip.confirmSync'));
132
134
  if (type !== 'confirm') return;
133
135
  xgrid.value.showLoading();
134
- await getServiceApi().post('/uums/employee/syncEwEmp', {});
136
+ const [err] = await to(getServiceApi().post('/uums/employee/syncEwEmp', {}));
135
137
  xgrid.value.hiddenLoading();
138
+ if (err) return;
136
139
  xgrid.value.refreshData();
137
140
  };
138
141
 
@@ -140,6 +143,12 @@ const onButtonClick = code => {
140
143
  code === 'sync' && handleSync();
141
144
  };
142
145
 
146
+ const callback = {
147
+ querySuccess: data => {
148
+ console.log('querySuccess', data);
149
+ }
150
+ };
151
+
143
152
  // 删除
144
153
  // const handleDel = async () => {
145
154
  // const type = await VXETable.modal.confirm(t('message.delRecord'));
@@ -1,140 +1,142 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2022-08-05 10:05:27
4
- * @LastEditors: wei.li
5
- * @LastEditTime: 2022-08-16 18:05:43
6
- * @Description: 菜单权限列表
7
- -->
8
- <template>
9
- <div class="u-dict-config_wrapper">
10
- <el-drawer
11
- :model-value="show"
12
- :before-close="handleClose"
13
- title="权限明细"
14
- direction="rtl"
15
- destroy-on-close
16
- size="66%"
17
- >
18
- <ut-grid
19
- ref="SuGridRef"
20
- :columns="columns"
21
- url="/uums/menu"
22
- :default-params="{ parentId: record.id }"
23
- :default-value="{ parentId: record.id, menuType: 1 }"
24
- />
25
- </el-drawer>
26
- </div>
27
- </template>
28
-
29
- <script setup lang="tsx">
30
- import { ref, watch } from 'vue';
31
- import { useRender } from '@utogether/utils';
32
-
33
- interface IProps {
34
- record: IRecord;
35
- show: boolean;
36
- }
37
-
38
- const props = withDefaults(defineProps<IProps>(), {
39
- record: (): IRecord => {
40
- return {};
41
- },
42
- show: false
43
- });
44
-
45
- watch(
46
- () => props.show,
47
- () => {
48
- prefixCode.value = props.show && getPrefixCode();
49
- }
50
- );
51
-
52
- const prefixCode = ref('');
53
-
54
- const renderHook = useRender();
55
-
56
- // 列字段
57
- const columns = [
58
- { type: 'checkbox', width: 50, align: 'center' },
59
- {
60
- field: 'menuName',
61
- title: 'message.permissionName',
62
- required: true,
63
- editRender: renderHook.renderInput()
64
- },
65
- {
66
- field: 'permissionCode',
67
- required: true,
68
- minWidth: 200,
69
- editRender: renderHook.renderInput(),
70
- slots: {
71
- edit: ({ row }) => {
72
- const slots = {
73
- prefix: () => <span>{prefixCode.value}.</span>
74
- };
75
- row.dispalyCode = row.permissionCode?.replace(`${prefixCode.value}.`, '');
76
- return [
77
- <vxe-input
78
- v-model={row.dispalyCode}
79
- v-slots={slots}
80
- className="ut-slot-input"
81
- onInput={() => onInput(row)}
82
- />
83
- ];
84
- }
85
- }
86
- },
87
- {
88
- field: 'enabled',
89
- title: 'message.enabled',
90
- width: 90,
91
- editRender: renderHook.renderDict({ code: 'SU.ENABLE', defaultValue: '1' }),
92
- formatter: ['formatDict', 'SU.ENABLE']
93
- }
94
- ];
95
-
96
- const getPrefixCode = () => {
97
- const { record } = props;
98
- const { id, parentId, hasChildren } = record;
99
- if (!id && !parentId) return 'su';
100
- if (hasChildren) {
101
- record.dispalyCode = '';
102
- return record.permissionCode;
103
- }
104
- return record.permissionCode;
105
- };
106
-
107
- const onInput = record => {
108
- record.permissionCode = `${prefixCode.value}.${record.dispalyCode}`;
109
- };
110
-
111
- const emit = defineEmits<{ (e: 'close'): void }>();
112
- // 抽屉关闭
113
- function handleClose() {
114
- emit('close');
115
- }
116
- </script>
117
-
118
- <style lang="scss">
119
- .u-dict-config_wrapper {
120
- .el-drawer__header {
121
- margin-bottom: 0;
122
- }
123
-
124
- .ut-slot-input {
125
- .vxe-input--inner {
126
- width: auto;
127
- max-width: 66%;
128
- padding-left: 0.5em;
129
- }
130
-
131
- .vxe-input--prefix {
132
- display: contents;
133
- }
134
- }
135
-
136
- .ut-disable-text {
137
- background-color: #fefefe;
138
- }
139
- }
140
- </style>
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-08-05 10:05:27
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-12-20 08:03:07
6
+ * @Description: 菜单权限列表
7
+ -->
8
+ <template>
9
+ <div class="u-dict-config_wrapper">
10
+ <el-drawer
11
+ :model-value="show"
12
+ :before-close="handleClose"
13
+ title="权限明细"
14
+ direction="rtl"
15
+ destroy-on-close
16
+ size="66%"
17
+ >
18
+ <ut-grid
19
+ ref="SuGridRef"
20
+ :columns="columns"
21
+ url="/uums/menu"
22
+ :default-params="{ parentId: record.id }"
23
+ :default-value="{ parentId: record.id, menuType: 1 }"
24
+ :pager-config="{ layouts: [] }"
25
+ />
26
+ </el-drawer>
27
+ </div>
28
+ </template>
29
+
30
+ <script setup lang="tsx">
31
+ import { ref, watch } from 'vue';
32
+ import { useRender } from '@utogether/utils';
33
+
34
+ interface IProps {
35
+ record: IRecord;
36
+ show: boolean;
37
+ }
38
+
39
+ const props = withDefaults(defineProps<IProps>(), {
40
+ record: (): IRecord => {
41
+ return {};
42
+ },
43
+ show: false
44
+ });
45
+
46
+ watch(
47
+ () => props.show,
48
+ () => {
49
+ prefixCode.value = props.show && getPrefixCode();
50
+ }
51
+ );
52
+
53
+ const prefixCode = ref('');
54
+
55
+ const renderHook = useRender();
56
+
57
+ // 列字段
58
+ const columns = [
59
+ { type: 'checkbox', width: 50, align: 'center' },
60
+ {
61
+ field: 'menuName',
62
+ title: 'message.permissionName',
63
+ required: true,
64
+ editRender: renderHook.renderInput()
65
+ },
66
+ {
67
+ field: 'permissionCode',
68
+ required: true,
69
+ minWidth: 180,
70
+ editRender: renderHook.renderInput(),
71
+ slots: {
72
+ edit: ({ row }) => {
73
+ const slots = {
74
+ prefix: () => <span>{prefixCode.value}.</span>
75
+ };
76
+ row.dispalyCode = row.permissionCode?.replace(`${prefixCode.value}.`, '');
77
+ return [
78
+ <vxe-input v-model={row.dispalyCode} v-slots={slots} className="ut-slot-input" onInput={() => onInput(row)} />
79
+ ];
80
+ }
81
+ }
82
+ },
83
+ {
84
+ field: 'remark',
85
+ title: 'message.udp.description',
86
+ required: true,
87
+ editRender: renderHook.renderInput()
88
+ },
89
+ {
90
+ field: 'enabled',
91
+ title: 'message.enabled',
92
+ width: 90,
93
+ editRender: renderHook.renderDict({ code: 'SU.ENABLE', defaultValue: '1' }),
94
+ formatter: ['formatDict', 'SU.ENABLE']
95
+ }
96
+ ];
97
+
98
+ const getPrefixCode = () => {
99
+ const { record } = props;
100
+ const { id, parentId, hasChildren } = record;
101
+ if (!id && !parentId) return 'su';
102
+ if (hasChildren) {
103
+ record.dispalyCode = '';
104
+ return record.permissionCode;
105
+ }
106
+ return record.permissionCode;
107
+ };
108
+
109
+ const onInput = record => {
110
+ record.permissionCode = `${prefixCode.value}.${record.dispalyCode}`;
111
+ };
112
+
113
+ const emit = defineEmits<{ (e: 'close'): void }>();
114
+ // 抽屉关闭
115
+ function handleClose() {
116
+ emit('close');
117
+ }
118
+ </script>
119
+
120
+ <style lang="scss">
121
+ .u-dict-config_wrapper {
122
+ .el-drawer__header {
123
+ margin-bottom: 0;
124
+ }
125
+
126
+ .ut-slot-input {
127
+ .vxe-input--inner {
128
+ width: auto;
129
+ max-width: 66%;
130
+ padding-left: 0.5em;
131
+ }
132
+
133
+ .vxe-input--prefix {
134
+ display: contents;
135
+ }
136
+ }
137
+
138
+ .ut-disable-text {
139
+ background-color: #fefefe;
140
+ }
141
+ }
142
+ </style>