@utogether/udp-core 1.0.4 → 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 (87) hide show
  1. package/dist/{403-DASI6Pwz.js → 403-CTJDBjz7.js} +1 -1
  2. package/dist/{404-YhBA92cb.js → 404-BFYkWIkQ.js} +1 -1
  3. package/dist/{500-ywbFF5MX.js → 500-DGG3qadg.js} +1 -1
  4. package/dist/{AuthorityInfo-tCSX2Fh7.js → AuthorityInfo-ozZIo1Te.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Cwd6UT2i.js → AuthorityInfo.vue_vue_type_style_index_0_lang-DujerENw.js} +1 -1
  6. package/dist/{AuthorityPanel-BeBNiwqc.js → AuthorityPanel-CRlAwbaI.js} +1 -1
  7. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js → AuthorityPanel.vue_vue_type_style_index_0_lang-DxhZjp1S.js} +31 -24
  8. package/dist/{Company-l23MEzdM.js → Company-6VJtwh23.js} +3 -3
  9. package/dist/{CompanyPanel-D_s0rh6h.js → CompanyPanel-B2P488mq.js} +1 -1
  10. package/dist/{Department-DSEvORLg.js → Department-BnwoLEOC.js} +3 -3
  11. package/dist/{DepartmentPanel-WN8nOgCV.js → DepartmentPanel-CRrrmxtv.js} +1 -1
  12. package/dist/{DesignPanel-DirEGh9M.js → DesignPanel-CvbccgX2.js} +1 -1
  13. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-D02hXSrN.js → DesignPanel.vue_vue_type_style_index_0_lang-Dz2tUszs.js} +2 -2
  14. package/dist/{DictView-DiIQdiek.js → DictView-Ce1LoVHh.js} +17 -16
  15. package/dist/{InvOrganization-b7v3g9EJ.js → InvOrganization-BwCFZO1X.js} +1 -1
  16. package/dist/{Org-BORfx1PL.js → Org-0hzs6b0R.js} +1 -1
  17. package/dist/{Preview-DkRn_TSc.js → Preview--DnEAhwh.js} +1 -1
  18. package/dist/{ReportDefine-Cd0QeaWA.js → ReportDefine-Cu983bTN.js} +1 -1
  19. package/dist/{ReportDesign-4qNqyeEW.js → ReportDesign-QsWXXgvo.js} +2 -2
  20. package/dist/{ReportQuery-BJfTFpec.js → ReportQuery-BjKIIhPu.js} +1 -1
  21. package/dist/{ReportQueryFrom-CB7sExZx.js → ReportQueryFrom-DIjBO6Fx.js} +1 -1
  22. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CqO_2Ier.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-0T62cUMK.js} +1 -1
  23. package/dist/{ReportTemplate-B69muSgT.js → ReportTemplate-2uk9tJcy.js} +1 -1
  24. package/dist/{Role-Bo4YrNDC.js → Role-_QP8QEaI.js} +3 -3
  25. package/dist/{RoleAssign-kOMYJ4s3.js → RoleAssign-C2gkcmEQ.js} +3 -3
  26. package/dist/{RolePanel-BSJmjyqc.js → RolePanel-B8FPNGaA.js} +1 -1
  27. package/dist/{RolePanel-B1d4e6uk.js → RolePanel-vnl_lXNY.js} +1 -1
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DCzX-ZP_.js → RolePanel.vue_vue_type_script_setup_true_lang-BuQbYEEI.js} +1 -1
  29. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DgQpfjaU.js → RolePanel.vue_vue_type_script_setup_true_lang-bxHXrBYl.js} +3 -3
  30. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-WNOYFxJ1.js → ScrollPanel.vue_vue_type_style_index_0_lang-C6yZXBqB.js} +1 -1
  31. package/dist/{Staff-BFp3zNNR.js → Staff-CHWrMIEb.js} +3 -3
  32. package/dist/{StaffInfo-DcU9_40C.js → StaffInfo-Cpq2eayz.js} +1 -1
  33. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-CtfN2CAr.js → StaffInfo.vue_vue_type_script_setup_true_lang-BVCjF2i1.js} +1 -1
  34. package/dist/{StaffPanel-7exWkZd9.js → StaffPanel-D2BMXt5p.js} +1 -1
  35. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-v5xOXKRS.js → StaffPanel.vue_vue_type_script_setup_true_lang-B6jAGo-g.js} +2 -2
  36. package/dist/{SysUser-B3uB_cp2.js → SysUser-om6H1BeC.js} +2 -2
  37. package/dist/{SysUserPanel-B0CLp5AO.js → SysUserPanel-CH0HPP7h.js} +1 -1
  38. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-Cwea_4dY.js → SysUserPanel.vue_vue_type_script_setup_true_lang-Dpl13ee0.js} +126 -111
  39. package/dist/{SystemMenu-a59l4hTk.js → SystemMenu-BkG_DKxA.js} +52 -49
  40. package/dist/{UserInfo-D1IA2oLt.js → UserInfo-D9croxUe.js} +1 -1
  41. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-DDVgYRD5.js → UserInfo.vue_vue_type_style_index_0_lang-DLIP8xpN.js} +1 -1
  42. package/dist/{childView-6rCeLcsx.js → childView-BY_Ip-l1.js} +1 -1
  43. package/dist/{childView-JdrkroL5.js → childView-CHp_TueS.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-BfcnWnx9.js → childView.vue_vue_type_style_index_0_lang-BNHbDRjt.js} +25 -22
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-B8x99f1B.js → childView.vue_vue_type_style_index_0_lang-CbjGf7Z7.js} +1 -1
  46. package/dist/{code-rule-2lkPF547.js → code-rule-Ce6yWqCq.js} +1 -1
  47. package/dist/core.es.js +1 -1
  48. package/dist/{cron-task-DV1pGO1m.js → cron-task-DziaH0rI.js} +1 -1
  49. package/dist/{frameView-C0bzSB8c.js → frameView-DNeCVQaY.js} +1 -1
  50. package/dist/index-BabfUVv_.js +7241 -0
  51. package/dist/layout-home-Cis1KlEr.js +195 -0
  52. package/dist/{layoutView-CTV-E4Cj.js → layoutView-12Mlp9A2.js} +144 -145
  53. package/dist/{log-in-CoBP2x6u.js → log-in-1NGaA5OM.js} +1 -1
  54. package/dist/{log-out-KX8FiRVf.js → log-out-B8_atGcQ.js} +1 -1
  55. package/dist/{login-CtCoGWzD.js → login-5dydO6GR.js} +124 -134
  56. package/dist/{lov-view-Bm0JEzzg.js → lov-view-DPvGUu3h.js} +2 -2
  57. package/dist/{menuInfo-D2qPoRwz.js → menuInfo-DVADYfEK.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DoQjX9Ly.js → menuInfo.vue_vue_type_style_index_0_lang-DgsifDrm.js} +37 -35
  59. package/dist/{pda-app-SbcIclbH.js → pda-app-BZXs-2BQ.js} +1 -1
  60. package/dist/{resource-Cdq1UKGI.js → resource-BZA9NFKc.js} +1 -1
  61. package/dist/su-welcome-BXe6Cdp3.js +580 -0
  62. package/dist/{sys-config-CCOf4xbj.js → sys-config-DQmNjWH4.js} +1 -1
  63. package/dist/udp-core.css +1 -1
  64. package/package.json +1 -1
  65. package/src/App.vue +71 -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 +4 -7
  72. package/src/plugins/i18n/zh.ts +16 -3
  73. package/src/plugins/vxe-table/render.tsx +19 -1
  74. package/src/style/vxetable.scss +356 -348
  75. package/src/views/system/layout/layout-home.vue +199 -0
  76. package/src/views/system/menu/AuthorityPanel.vue +141 -140
  77. package/src/views/system/menu/SystemMenu.vue +10 -1
  78. package/src/views/system/menu/menuInfo.vue +384 -384
  79. package/src/views/system/sysUser/SysUserPanel.vue +22 -6
  80. package/src/views/udev/dict/DictView.vue +2 -2
  81. package/src/views/udev/dict/childView.vue +1 -0
  82. package/src/views/uhome/dynamic-card.vue +32 -0
  83. package/src/views/uhome/su-welcome.vue +10 -5
  84. package/src/views/ulogin/login.vue +34 -23
  85. package/types/global.d.ts +1 -0
  86. package/dist/index-BbtbEMCH.js +0 -4649
  87. package/dist/su-welcome-BHDsjqqV.js +0 -524
@@ -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
 
@@ -287,29 +287,40 @@ const insertLoginInfo = username => {
287
287
  };
288
288
 
289
289
  const getSysConfig = async () => {
290
- const [err, data]: [Error, any] = await to(serviceApi.get('/upfm/v1/sysConfig', {}));
291
- if (!err) {
292
- const config: any = {};
293
- data.list?.forEach(item => {
294
- config[item.configCode] = item.configValue;
295
- if (item.fileName) {
296
- config[item.configCode] = getBaseURL() + '/ufil' + item.configValue;
297
- }
298
- });
299
- const title = data.list?.find(f => f.configCode === 'title')?.configValue;
300
- config['title'] = title || 'U-DP';
301
- sysConfig.value = config;
302
- bgStyle.value = {
303
- backgroundImage: config['backgroundImg'] ? `url(${config['backgroundImg']})` : ``,
304
- // backgroundImage: config['backgroundImg'] ? `url(${config['backgroundImg']})` : `url1(${welcome})`,
305
- backgroundRepeat: 'no-repeat',
306
- backgroundPosition: 'center'
307
- };
308
- console.log('bgStyle=', bgStyle);
309
- const favicon = useFavicon();
310
- favicon.value = config.favicon || utogether;
311
- storageLocal.setItem(kSYSCONFIG, config);
312
- }
290
+ // const [err, data]: [Error, any] = await to(serviceApi.get('/upfm/v1/sysConfig', {}));
291
+ // if (!err) {
292
+ // const config: any = {};
293
+ // data.list?.forEach(item => {
294
+ // config[item.configCode] = item.configValue;
295
+ // if (item.fileName) {
296
+ // config[item.configCode] = getBaseURL() + '/ufil' + item.configValue;
297
+ // }
298
+ // });
299
+ // const title = data.list?.find(f => f.configCode === 'title')?.configValue;
300
+ // config['title'] = title || 'U-DP';
301
+ // sysConfig.value = config;
302
+ // bgStyle.value = {
303
+ // backgroundImage: config['backgroundImg'] ? `url(${config['backgroundImg']})` : ``,
304
+ // // backgroundImage: config['backgroundImg'] ? `url(${config['backgroundImg']})` : `url1(${welcome})`,
305
+ // backgroundRepeat: 'no-repeat',
306
+ // backgroundPosition: 'center'
307
+ // };
308
+ // console.log('bgStyle=', bgStyle);
309
+ // const favicon = useFavicon();
310
+ // favicon.value = config.favicon || utogether;
311
+ // storageLocal.setItem(kSYSCONFIG, config);
312
+ // }
313
+
314
+ sysConfig.value = storageLocal.getItem(kSYSCONFIG);
315
+
316
+ bgStyle.value = {
317
+ backgroundImage: sysConfig.value['backgroundImg'] ? `url(${sysConfig.value['backgroundImg']})` : ``,
318
+ backgroundRepeat: 'no-repeat',
319
+ backgroundPosition: 'center'
320
+ };
321
+
322
+ const favicon = useFavicon();
323
+ favicon.value = sysConfig.value.favicon || utogether;
313
324
  };
314
325
 
315
326
  dataThemeChange(overallStyle.value);
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;