@utogether/udp-core 1.0.4-beta.3 → 2.0.0-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 (75) hide show
  1. package/dist/{403-Br5N4PKN.js → 403-CTJDBjz7.js} +1 -1
  2. package/dist/{404-Cphyvdq5.js → 404-BFYkWIkQ.js} +1 -1
  3. package/dist/{500-B-3UGX9B.js → 500-DGG3qadg.js} +1 -1
  4. package/dist/{AuthorityInfo-B-OkSW-b.js → AuthorityInfo-ozZIo1Te.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-C0YHB5FG.js → AuthorityInfo.vue_vue_type_style_index_0_lang-DujerENw.js} +1 -1
  6. package/dist/{AuthorityPanel-BzIh29KB.js → AuthorityPanel-CRlAwbaI.js} +1 -1
  7. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-D3GN0Ybz.js → AuthorityPanel.vue_vue_type_style_index_0_lang-DxhZjp1S.js} +0 -1
  8. package/dist/{Company-GuWnxwpp.js → Company-6VJtwh23.js} +3 -3
  9. package/dist/{CompanyPanel-C3fB3IiJ.js → CompanyPanel-B2P488mq.js} +1 -1
  10. package/dist/{Department-B2cHYzWw.js → Department-BnwoLEOC.js} +3 -3
  11. package/dist/{DepartmentPanel-p3Nh1l2h.js → DepartmentPanel-CRrrmxtv.js} +1 -1
  12. package/dist/{DesignPanel-DPyiLBdU.js → DesignPanel-CvbccgX2.js} +1 -1
  13. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-Dom1Fjkx.js → DesignPanel.vue_vue_type_style_index_0_lang-Dz2tUszs.js} +2 -2
  14. package/dist/{DictView-o4ZaWa-_.js → DictView-Ce1LoVHh.js} +17 -16
  15. package/dist/{InvOrganization-a-Z9thJX.js → InvOrganization-BwCFZO1X.js} +1 -1
  16. package/dist/{Org-Clyb77M1.js → Org-0hzs6b0R.js} +1 -1
  17. package/dist/{Preview-D4TR9Oi6.js → Preview--DnEAhwh.js} +1 -1
  18. package/dist/{ReportDefine-BSrw2it1.js → ReportDefine-Cu983bTN.js} +1 -1
  19. package/dist/{ReportDesign-DZJia5c3.js → ReportDesign-QsWXXgvo.js} +2 -2
  20. package/dist/{ReportQuery-B7-jctXZ.js → ReportQuery-BjKIIhPu.js} +1 -1
  21. package/dist/{ReportQueryFrom-CUB0cyYW.js → ReportQueryFrom-DIjBO6Fx.js} +1 -1
  22. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-DCjYH6zz.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-0T62cUMK.js} +1 -1
  23. package/dist/{ReportTemplate-B5fV2yP8.js → ReportTemplate-2uk9tJcy.js} +1 -1
  24. package/dist/{Role-CYFOwua_.js → Role-_QP8QEaI.js} +3 -3
  25. package/dist/{RoleAssign-B1zojluk.js → RoleAssign-C2gkcmEQ.js} +3 -3
  26. package/dist/{RolePanel-Dd4pcCsa.js → RolePanel-B8FPNGaA.js} +1 -1
  27. package/dist/{RolePanel-C4OpgPKj.js → RolePanel-vnl_lXNY.js} +1 -1
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-C23dTOLA.js → RolePanel.vue_vue_type_script_setup_true_lang-BuQbYEEI.js} +1 -1
  29. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CgBOYiMe.js → RolePanel.vue_vue_type_script_setup_true_lang-bxHXrBYl.js} +3 -3
  30. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-C6lFErKj.js → ScrollPanel.vue_vue_type_style_index_0_lang-C6yZXBqB.js} +1 -1
  31. package/dist/{Staff-BKAIz1Y8.js → Staff-CHWrMIEb.js} +3 -3
  32. package/dist/{StaffInfo-BZ2pgagl.js → StaffInfo-Cpq2eayz.js} +1 -1
  33. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-YWKBlMp8.js → StaffInfo.vue_vue_type_script_setup_true_lang-BVCjF2i1.js} +1 -1
  34. package/dist/{StaffPanel-5xQ0DM6e.js → StaffPanel-D2BMXt5p.js} +1 -1
  35. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DofQGe0q.js → StaffPanel.vue_vue_type_script_setup_true_lang-B6jAGo-g.js} +2 -2
  36. package/dist/{SysUser-Dr8-NYfp.js → SysUser-om6H1BeC.js} +2 -2
  37. package/dist/{SysUserPanel-BhE8NIQY.js → SysUserPanel-CH0HPP7h.js} +1 -1
  38. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-BYYN1LQO.js → SysUserPanel.vue_vue_type_script_setup_true_lang-Dpl13ee0.js} +126 -111
  39. package/dist/{SystemMenu-Bl0k_S_c.js → SystemMenu-BkG_DKxA.js} +3 -3
  40. package/dist/{UserInfo-BpeCyf8v.js → UserInfo-D9croxUe.js} +1 -1
  41. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-B0fISZLD.js → UserInfo.vue_vue_type_style_index_0_lang-DLIP8xpN.js} +1 -1
  42. package/dist/{childView-CQWyQ-Sv.js → childView-BY_Ip-l1.js} +1 -1
  43. package/dist/{childView-DUcTfYwO.js → childView-CHp_TueS.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-C8d0diQd.js → childView.vue_vue_type_style_index_0_lang-BNHbDRjt.js} +25 -22
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-BPCiUGed.js → childView.vue_vue_type_style_index_0_lang-CbjGf7Z7.js} +1 -1
  46. package/dist/{code-rule-D6anPMlp.js → code-rule-Ce6yWqCq.js} +1 -1
  47. package/dist/core.es.js +1 -1
  48. package/dist/{cron-task-CX3dv9cg.js → cron-task-DziaH0rI.js} +1 -1
  49. package/dist/{frameView-CiHjp0gt.js → frameView-DNeCVQaY.js} +1 -1
  50. package/dist/{index-D1ZRyH4N.js → index-BabfUVv_.js} +63 -51
  51. package/dist/layout-home-Cis1KlEr.js +195 -0
  52. package/dist/{layoutView-BtcYxZ_W.js → layoutView-12Mlp9A2.js} +1 -1
  53. package/dist/{log-in-T4W0z5yw.js → log-in-1NGaA5OM.js} +1 -1
  54. package/dist/{log-out-CAEvQEgw.js → log-out-B8_atGcQ.js} +1 -1
  55. package/dist/{login-D7hSd_P_.js → login-5dydO6GR.js} +1 -1
  56. package/dist/{lov-view-CJsunGJ_.js → lov-view-DPvGUu3h.js} +2 -2
  57. package/dist/{menuInfo-Ce0G0xKJ.js → menuInfo-DVADYfEK.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CDHg7Yu5.js → menuInfo.vue_vue_type_style_index_0_lang-DgsifDrm.js} +1 -1
  59. package/dist/{pda-app-CRLpLdHN.js → pda-app-BZXs-2BQ.js} +1 -1
  60. package/dist/{resource-Cbn8Rolz.js → resource-BZA9NFKc.js} +1 -1
  61. package/dist/su-welcome-BXe6Cdp3.js +580 -0
  62. package/dist/{sys-config-CCv0suKh.js → sys-config-DQmNjWH4.js} +1 -1
  63. package/dist/udp-core.css +1 -1
  64. package/package.json +1 -1
  65. package/src/main.ts +2 -5
  66. package/src/plugins/i18n/zh.ts +15 -3
  67. package/src/views/system/layout/layout-home.vue +199 -0
  68. package/src/views/system/menu/AuthorityPanel.vue +0 -1
  69. package/src/views/system/sysUser/SysUserPanel.vue +22 -6
  70. package/src/views/udev/dict/DictView.vue +2 -2
  71. package/src/views/udev/dict/childView.vue +1 -0
  72. package/src/views/uhome/dynamic-card.vue +32 -0
  73. package/src/views/uhome/su-welcome.vue +10 -5
  74. package/types/global.d.ts +1 -0
  75. package/dist/su-welcome-BSakSi9Z.js +0 -524
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@utogether/udp-core",
3
3
  "private": false,
4
- "version": "1.0.4-beta.3",
4
+ "version": "2.0.0-beta.1",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "main1": "index.ts",
package/src/main.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: levi7754 levi7754@163.com
3
3
  * @Date: 2025-07-25 13:38:20
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-11-14 10:52:54
5
+ * @LastEditTime: 2025-12-26 14:35:03
6
6
  * @FilePath: \udp-front\packages\udp-core\src\main.ts
7
7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
8
  */
@@ -26,10 +26,6 @@ import './style/reset.scss';
26
26
  // 导入公共样式
27
27
  import './style/index.scss';
28
28
 
29
- // import 'viewerjs/dist/viewer.css';
30
-
31
- // import VueViewer from 'v-viewer';
32
-
33
29
  // import SuTable from './components/SuTable/SuTable.vue';
34
30
 
35
31
  import {
@@ -78,6 +74,7 @@ const setGlobalDirective = app => {
78
74
  };
79
75
 
80
76
  const init = ({ router, config, lang, views, env, tableConfig }) => {
77
+ console.log('view', views);
81
78
  setViews(views, router);
82
79
  app.use(router);
83
80
  setRouter(router);
@@ -58,6 +58,7 @@ export default {
58
58
  browser: '浏览器',
59
59
  dictCode: '字典编码',
60
60
  dictName: '字典名称',
61
+ dictDesc: '字典描述',
61
62
  dictType: '字典类型',
62
63
 
63
64
  ruleCode: '规则代码',
@@ -113,7 +114,14 @@ export default {
113
114
  appupper: '已上架',
114
115
  applower: '已下架',
115
116
  isApprovalPage: '审批页面',
116
- showLink: '菜单可见'
117
+ showLink: '菜单可见',
118
+
119
+ componentCode: '组件编码',
120
+ componentTitle: '组件标题',
121
+ componentSpan: '栅格列数(24等分)',
122
+ componentHeight: '组件高度',
123
+ componentPath: '组件路径',
124
+ componentRole: '角色'
117
125
  },
118
126
  btn: {
119
127
  passwordReset: '密码重置',
@@ -177,6 +185,7 @@ export default {
177
185
  disabled: '禁用',
178
186
  enable: '启用',
179
187
  flowDesign: '流程设计',
188
+ resetPassword: '重置密码',
180
189
 
181
190
  bankinfo: '银行账号'
182
191
  },
@@ -340,10 +349,12 @@ export default {
340
349
  emptyAuth: '无系统权限, 请先给用户分配角色重试',
341
350
  initPassword: `初始密码为:【{code}】,请及时修改密码`,
342
351
  loginFailure: '用户名或密码不能为空',
352
+ selectRole: '请先勾选角色数据',
343
353
  confirmSync: '确认同步数据吗?',
344
354
  updatenow: '立即更新',
345
355
  newVersion: '检测到新版本',
346
- updateLater: '稍后更新'
356
+ updateLater: '稍后更新',
357
+ confirmResetPassword: '确认重置密码吗?'
347
358
  },
348
359
  title: {
349
360
  employeeInfo: '员工信息',
@@ -359,6 +370,7 @@ export default {
359
370
  lovView: '值集视图',
360
371
  lovColConfig: '值集列配置',
361
372
  sequenceInfo: '{name}单据序列配置',
362
- userInfo: '用户信息'
373
+ userInfo: '用户信息',
374
+ layoutRole: '【{name}】角色列表'
363
375
  }
364
376
  };
@@ -0,0 +1,199 @@
1
+ <!--
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2025-12-23 11:00:51
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-12-26 19:10:01
6
+ * @FilePath: \udp-crm\packages\udp-crm\src\views\udev\layout\home-layout.vue
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ -->
9
+ <template>
10
+ <div>
11
+ <ut-grid ref="xgrid" :items="items" :columns="columns" :url="url" />
12
+ <!-- 角色分配 -->
13
+ <ut-modal-grid
14
+ v-if="showModal"
15
+ ref="ygrid"
16
+ :columns="subColumns"
17
+ mode="form"
18
+ :url="url + '/detail'"
19
+ :title="$t('message.title.layoutRole', { name: data.title })"
20
+ width="50%"
21
+ @buttonClick="onButtonClick"
22
+ />
23
+ <!-- 角色列表 -->
24
+ <ut-modal-grid
25
+ v-if="showRole"
26
+ ref="xmodal"
27
+ :items="subItems"
28
+ :columns="subColumns"
29
+ :show-footer="true"
30
+ :editable="false"
31
+ :title="$t('message.udp.roleList')"
32
+ url="/uums/role"
33
+ width="60%"
34
+ height="75%"
35
+ @close="showRole = false"
36
+ @confirm="onConfirm"
37
+ />
38
+ </div>
39
+ </template>
40
+
41
+ <script setup lang="tsx">
42
+ import { ref } from 'vue';
43
+ import { useRender, successMessage, warnMessage } from '@utogether/utils';
44
+ import { to } from 'await-to-js';
45
+ import { clone } from 'xe-utils';
46
+ import { VxeUI } from 'vxe-pc-ui';
47
+ import { useI18n } from 'vue-i18n';
48
+ import { getServiceApi } from '../../../api';
49
+
50
+ defineOptions({ name: 'HomeLayout' });
51
+
52
+ const renderHook = useRender();
53
+ const { t } = useI18n();
54
+
55
+ const xgrid = ref(null);
56
+ const ygrid = ref(null);
57
+ const xmodal = ref(null);
58
+
59
+ const showModal = ref(false);
60
+ const showRole = ref(false);
61
+
62
+ const data = ref<IRecord>({});
63
+
64
+ const url = '/ucrm/sysHomeConfig';
65
+
66
+ const items = [
67
+ { field: 'code', title: 'message.udp.componentCode' },
68
+ { field: 'title', title: 'message.udp.componentTitle' }
69
+ ];
70
+
71
+ const subItems = [
72
+ { field: 'roleName', span: 9, title: 'message.udp.roleName' },
73
+ { field: 'roleCode', span: 9, title: 'message.udp.roleCode' }
74
+ ];
75
+
76
+ const options = [
77
+ { label: 3, value: 3 },
78
+ { label: 4, value: 4 },
79
+ { label: 6, value: 6 },
80
+ { label: 8, value: 8 },
81
+ { label: 12, value: 12 },
82
+ { label: 24, value: 24 }
83
+ ];
84
+
85
+ // 列字段
86
+ const columns = [
87
+ { type: 'checkbox', width: 50, align: 'center' },
88
+ { field: 'seqNo', required: true, width: 100, editRender: renderHook.renderNumber({ min: 10, step: 10 }) },
89
+ {
90
+ field: 'code',
91
+ title: 'message.udp.componentCode',
92
+ width: 120,
93
+ required: true,
94
+ editRender: renderHook.renderInput()
95
+ },
96
+ {
97
+ field: 'title',
98
+ title: 'message.udp.componentTitle',
99
+ minWidth: 150,
100
+ required: true,
101
+ editRender: renderHook.renderInput()
102
+ },
103
+ {
104
+ field: 'span',
105
+ title: 'message.udp.componentSpan',
106
+ required: true,
107
+ width: 160,
108
+ editRender: renderHook.renderSelectLocal({ options })
109
+ },
110
+ {
111
+ field: 'height',
112
+ title: 'message.udp.componentHeight',
113
+ required: true,
114
+ editRender: renderHook.renderNumber({ min: 300 })
115
+ },
116
+ {
117
+ field: 'url',
118
+ title: 'message.udp.componentPath',
119
+ required: true,
120
+ minWidth: 150,
121
+ editRender: renderHook.renderInput()
122
+ },
123
+ { field: 'enabled', width: 90, formatter: ['formatDict', 'SU.ENABLE'] },
124
+ {
125
+ field: 'operate',
126
+ width: 140,
127
+ fixed: 'right',
128
+ slots: {
129
+ default: ({ row }) => {
130
+ if (!row.id) return;
131
+ const enabled = {
132
+ conent: row.enabled === '1' ? 'disabled' : 'enable',
133
+ status: row.enabled === '1' ? 'warning' : 'success',
134
+ icon: row.enabled === '1' ? 'ri-pause-circle-line' : 'ri-play-circle-line'
135
+ };
136
+ return [
137
+ <>
138
+ <ut-button content="role" auth="role" icon="ri-user-line" onTap={() => handleRole(row)} />
139
+ <ut-button content={enabled.conent} {...enabled} onTap={() => handleRowStatus(row)} />
140
+ </>
141
+ ];
142
+ }
143
+ }
144
+ }
145
+ ];
146
+
147
+ const subColumns = [
148
+ { type: 'checkbox', width: 40 },
149
+ { field: 'roleName', title: 'message.udp.roleName' },
150
+ { field: 'roleCode', title: 'message.udp.roleCode' }
151
+ ];
152
+
153
+ const handleRole = row => {
154
+ data.value = row;
155
+ showModal.value = true;
156
+ };
157
+
158
+ const handleAdd = () => {
159
+ showRole.value = true;
160
+ };
161
+
162
+ const handleRowStatus = async row => {
163
+ const message = row.enabled === '1' ? 'tip_disabledrecord' : 'tip_enabledrecord';
164
+ const type = await VxeUI.modal.confirm(t(`message.${message}`));
165
+ if (type === 'confirm') {
166
+ const body = clone(row, true);
167
+ body.enabled = body.enabled === '1' ? '0' : '1';
168
+ const [err] = await to(getServiceApi().put(url, [body]));
169
+ if (err) return;
170
+ successMessage();
171
+ xgrid.value.refreshData();
172
+ }
173
+ };
174
+
175
+ const handleDel = () => {
176
+ const selectRecords = ygrid.value.getSelectRecords();
177
+ if (!selectRecords.length) return;
178
+ ygrid.value.getInstance().commitProxy('delete');
179
+ };
180
+
181
+ const onConfirm = async records => {
182
+ if (records.length === 0) return warnMessage('message.tip.selectRole');
183
+ records.forEach(m => {
184
+ m.systemConfigId = data.value.id;
185
+ });
186
+ xmodal.value.showLoading();
187
+ const [err] = await to(getServiceApi().post(url + '/detail', records));
188
+ if (!err) {
189
+ successMessage();
190
+ ygrid.value.refreshData();
191
+ showRole.value = false;
192
+ }
193
+ };
194
+
195
+ const onButtonClick = code => {
196
+ code === 'add' && handleAdd();
197
+ code === 'del' && handleDel();
198
+ };
199
+ </script>
@@ -83,7 +83,6 @@ const columns = [
83
83
  {
84
84
  field: 'remark',
85
85
  title: 'message.udp.description',
86
- required: true,
87
86
  editRender: renderHook.renderInput()
88
87
  },
89
88
  {
@@ -7,6 +7,7 @@
7
7
  :url="url"
8
8
  :auto-load="false"
9
9
  :default-params="defaultParams"
10
+ :buttons="buttons"
10
11
  mode="form"
11
12
  @buttonClick="onButtonClick"
12
13
  />
@@ -150,6 +151,8 @@ const loading = ref(false);
150
151
  const url = '/uums/user';
151
152
  let defaultPassword = '';
152
153
 
154
+ const buttons = [{ code: 'resetPassword', status: 'warning', icon: 'ri-lock-line', auth: 'batch' }];
155
+
153
156
  const xgrid = ref(null);
154
157
 
155
158
  const formItems = [
@@ -266,15 +269,27 @@ const handleRole = async (row: any) => {
266
269
  * @return {*}
267
270
  */
268
271
  const handleResetPwd = async (row: Object) => {
272
+ const type = await VxeUI.modal.confirm(t(`message.tip.confirmResetPassword`));
273
+ if (type !== 'confirm') return;
269
274
  await serviceApi.put(url + '/resetPwd', row);
270
275
  await VxeUI.modal.alert(t('message.tip.initPassword', { code: defaultPassword }));
271
276
  };
272
- // 启用/禁用
273
- // const handleUpdate = async (record: IRecord) => {
274
- // record.enabled = record.enabled === '1' ? '0' : '1';
275
- // await serviceApi.put(url, record);
276
- // getDataList();
277
- // };
277
+ /**
278
+ * 批量重置密码
279
+ * @param record
280
+ */
281
+ const handleBatch = async () => {
282
+ const selectRecords = xgrid.value.getSelectRecords();
283
+ if (!selectRecords.length) return;
284
+ const type = await VxeUI.modal.confirm(t(`message.tip.confirmResetPassword`));
285
+ if (type !== 'confirm') return;
286
+ const body = selectRecords.map(item => {
287
+ return { id: item.id };
288
+ });
289
+ await serviceApi.put(url + '/batchUpdatePwd', body);
290
+ await VxeUI.modal.alert(t('message.tip.initPassword', { code: defaultPassword }));
291
+ xgrid.value.refreshData();
292
+ };
278
293
  /**
279
294
  * @description: 用户权限
280
295
  * @param {*} row 用户信息
@@ -320,6 +335,7 @@ const handleClose = () => {
320
335
  const onButtonClick = code => {
321
336
  code === 'add' && handleAdd();
322
337
  code === 'del' && handleDel();
338
+ code === 'resetPassword' && handleBatch();
323
339
  };
324
340
 
325
341
  const getUnitList = () => {
@@ -2,7 +2,7 @@
2
2
  * @Author: wei.li
3
3
  * @Date: 2021-12-23 17:33:21
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-12-05 16:58:27
5
+ * @LastEditTime: 2025-12-29 14:23:32
6
6
  * @Description: 数据字典
7
7
  -->
8
8
  <template>
@@ -101,7 +101,7 @@ const handleClose = () => {
101
101
 
102
102
  const onGridEvents = {
103
103
  editActived({ row }) {
104
- // columns[1].editRender.props.disabled = !!row.id;
104
+ columns[1].editRender.props.disabled = !!row.id;
105
105
  }
106
106
  };
107
107
 
@@ -79,6 +79,7 @@ const columns = [
79
79
  { field: 'dictCode', title: 'message.udp.dictCode', required: true, treeNode: true },
80
80
  { field: 'dictName', title: 'message.udp.dictName', required: true },
81
81
  { field: 'dictDesc', title: 'message.remark' },
82
+ { field: 'remarks', title: 'message.remark' },
82
83
  { field: 'enabled', formatter: ['formatDict', 'SU.ENABLE'] },
83
84
  {
84
85
  field: 'operate',
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="dynamic-card w-full">
3
+ <vxe-row :gutter="[10, 10]" wrap>
4
+ <vxe-col v-for="data in dataList" :key="data.id" :span="data.span">
5
+ <vxe-card :title="data.title" :height="data.height" shadow>
6
+ <component :is="data.component" />
7
+ </vxe-card>
8
+ </vxe-col>
9
+ </vxe-row>
10
+ </div>
11
+ </template>
12
+ <script setup lang="tsx">
13
+ import { ref, onMounted, defineAsyncComponent } from 'vue';
14
+ import { getServiceApi } from '../../api';
15
+ import to from 'await-to-js';
16
+
17
+ const dataList = ref([]);
18
+ const getDataList = async () => {
19
+ const api = getServiceApi();
20
+ const [err, res]: any = await to(api.get('/ucrm/sysHomeConfig', { pageSize: 1000, pageNum: 1, enabled: '1' }));
21
+ if (err) return;
22
+ console.log(res);
23
+ res?.list.forEach(item => {
24
+ const data = { ...item, component: defineAsyncComponent(async () => import(`${item.url}.vue`)) };
25
+ dataList.value.push(data);
26
+ });
27
+ };
28
+
29
+ onMounted(() => {
30
+ getDataList();
31
+ });
32
+ </script>
@@ -2,14 +2,14 @@
2
2
  * @Author: levi7754 levi7754@163.com
3
3
  * @Date: 2023-11-02 10:04:05
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-12-02 18:28:17
5
+ * @LastEditTime: 2025-12-26 13:51:06
6
6
  * @FilePath: /front-web-mes/src/views/uhome/su-welcome.vue
7
7
  * @Description: 欢迎页面
8
8
  -->
9
9
  <template>
10
10
  <div class="ut-home m-3">
11
11
  <!-- 顶部 -->
12
- <div class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
12
+ <div v-if="!has2upversion" class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
13
13
  <div class="flex flex-row items-center flex-[2]">
14
14
  <div>
15
15
  <el-avatar size="large" class="text-4xl font-bold bg-[var(--el-color-primary)]">{{ firstName }}</el-avatar>
@@ -38,8 +38,10 @@
38
38
  <div class="mt-1 ml-3">{{ getLunarDay() }}</div>
39
39
  </div>
40
40
  </div>
41
- <!-- 底部 -->
42
- <el-row class="m-2" :gutter="10">
41
+ <el-row v-if="has2upversion">
42
+ <dynamic-card />
43
+ </el-row>
44
+ <el-row v-if="!has2upversion" class="m-2" :gutter="10">
43
45
  <el-col v-spinning="loading" :lg="24" :md="24" class="">
44
46
  <el-card class="mb-2">
45
47
  <template #header>
@@ -142,6 +144,7 @@ import { useSystemStoreHook } from '../../store/modules/system';
142
144
  import { getServiceApi } from '../../api';
143
145
  import { kLOGINER } from '../../contant';
144
146
  import menuFavorite from './components/menu-favorite.vue';
147
+ import dynamicCard from './dynamic-card.vue';
145
148
 
146
149
  defineOptions({ name: 'UdpWelcome' });
147
150
 
@@ -157,6 +160,8 @@ const firstName = computed(() => {
157
160
  return systemHook.getUserInfo.name?.slice(0, 1);
158
161
  });
159
162
 
163
+ const has2upversion = ref(+window.__UDP_VERSION__.substring(0, 1) > 1);
164
+
160
165
  // 角色
161
166
  const getRole = () => {
162
167
  const isAdmin = systemHook.isAdminRole;
@@ -227,7 +232,7 @@ const onFavoriteMenu = () => {
227
232
  };
228
233
 
229
234
  onMounted(() => {
230
- getMenuList();
235
+ !has2upversion.value && getMenuList();
231
236
  getUserLog();
232
237
  });
233
238
 
package/types/global.d.ts CHANGED
@@ -29,6 +29,7 @@ declare global {
29
29
  interface Window {
30
30
  // Global vue app
31
31
  __HISTORY_PATH__: string;
32
+ __UDP_VERSION__: string;
32
33
  __APP__: App<Element>;
33
34
  $i18n: () => void;
34
35
  webkitCancelAnimationFrame: (handle: number) => void;