@utogether/udp-core 2.0.0-beta.5 → 2.0.0-beta.7

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 (79) hide show
  1. package/dist/{403-y4Id7pky.js → 403-CNiAnTla.js} +1 -1
  2. package/dist/{404-DdxstlUr.js → 404-BHi3Ej7Z.js} +1 -1
  3. package/dist/{500-BpsDn21g.js → 500-CTYskumb.js} +1 -1
  4. package/dist/{AuthorityInfo-0CnlrZVd.js → AuthorityInfo-BjKduzRg.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-D5cXM84w.js → AuthorityInfo.vue_vue_type_style_index_0_lang-CEekMsFF.js} +1 -1
  6. package/dist/{Company-BPAqJfZm.js → Company-B1xm0v-1.js} +3 -3
  7. package/dist/{CompanyPanel-CCeM96w4.js → CompanyPanel-Bk3gucNe.js} +1 -1
  8. package/dist/{Department-BsLrIIrS.js → Department-Cd8zo-JT.js} +3 -3
  9. package/dist/{DepartmentPanel-B2YqwLmq.js → DepartmentPanel-ePvnyT6M.js} +1 -1
  10. package/dist/{DesignPanel-CVSOCMvU.js → DesignPanel--qm9mgjH.js} +1 -1
  11. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-Dte8DQnU.js → DesignPanel.vue_vue_type_style_index_0_lang-pZYzFbq4.js} +2 -2
  12. package/dist/{DictView-CKVpPtFg.js → DictView-B0NgfU0j.js} +10 -10
  13. package/dist/{InvOrganization-BBODO8aK.js → InvOrganization-BE1g-iwW.js} +1 -1
  14. package/dist/{Org-BYRi0OAt.js → Org-B3VzhliT.js} +1 -1
  15. package/dist/{Preview-COI8NwWh.js → Preview-Ch-MYGp4.js} +1 -1
  16. package/dist/{ReportDefine-Dbh_8ykf.js → ReportDefine-CUuKlZ3p.js} +1 -1
  17. package/dist/{ReportDesign-DOeKYL9V.js → ReportDesign-Bq_rcYCK.js} +2 -2
  18. package/dist/{ReportQuery-Bb4r9lNR.js → ReportQuery-BRSA-lSg.js} +1 -1
  19. package/dist/{ReportQueryFrom-CavcWtL3.js → ReportQueryFrom-b0Lxvnhp.js} +1 -1
  20. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-tuLRWEK9.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-R_mfmI7C.js} +1 -1
  21. package/dist/{ReportTemplate-C9NzPxM4.js → ReportTemplate-CZ8LChJM.js} +1 -1
  22. package/dist/{Role-Bqt4d9Lz.js → Role-mezU2yUG.js} +3 -3
  23. package/dist/{RoleAssign-CWcytVz3.js → RoleAssign-C23uEQ_b.js} +3 -3
  24. package/dist/{RolePanel-DlU0aCnL.js → RolePanel-7iBT-us-.js} +1 -1
  25. package/dist/{RolePanel-Di5nsMqt.js → RolePanel-BLML9HOE.js} +1 -1
  26. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-hzbUepuW.js → RolePanel.vue_vue_type_script_setup_true_lang-C5T9Unjq.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BOq0iJsT.js → RolePanel.vue_vue_type_script_setup_true_lang-Dxc4V1V8.js} +3 -3
  28. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-Bg3rg4P4.js → ScrollPanel.vue_vue_type_style_index_0_lang-DF9mIgWs.js} +32 -31
  29. package/dist/Staff-B2bI3_H2.js +26 -0
  30. package/dist/{StaffInfo-C6lDK0S_.js → StaffInfo-CIAehJfI.js} +1 -1
  31. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-YRJm87-b.js → StaffInfo.vue_vue_type_script_setup_true_lang-D9VkkiTZ.js} +1 -1
  32. package/dist/{StaffPanel-WNpg0HWl.js → StaffPanel-dXSv0PI3.js} +1 -1
  33. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-azLpvFRo.js → StaffPanel.vue_vue_type_script_setup_true_lang-DoU9krA4.js} +61 -49
  34. package/dist/{SysUser-Dph6Qi_a.js → SysUser-DxKpVGLT.js} +2 -2
  35. package/dist/{SysUserPanel-Iz024NS_.js → SysUserPanel-Ci_Ep8mq.js} +1 -1
  36. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-D8GUQHic.js → SysUserPanel.vue_vue_type_script_setup_true_lang-gzipEh3A.js} +1 -1
  37. package/dist/{SystemMenu-6mTYGwbK.js → SystemMenu-B_VBlI1Z.js} +2 -2
  38. package/dist/{UserInfo-RQ7VgSbk.js → UserInfo-DF0fggCn.js} +1 -1
  39. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-BYp2-i9R.js → UserInfo.vue_vue_type_style_index_0_lang-b-DOPLHD.js} +1 -1
  40. package/dist/{childView-B8L4By2o.js → childView-62rEczLw.js} +1 -1
  41. package/dist/{childView-nCa8t4tr.js → childView-DhDitM7p.js} +1 -1
  42. package/dist/{childView.vue_vue_type_style_index_0_lang-DDx9z61J.js → childView.vue_vue_type_style_index_0_lang-DwtD74xk.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-Bl1MzDS9.js → childView.vue_vue_type_style_index_0_lang-b5hnKDbO.js} +26 -23
  44. package/dist/{code-rule-8dQLPHni.js → code-rule-CabvTCWH.js} +1 -1
  45. package/dist/core.es.js +1 -1
  46. package/dist/{cron-task-aDBWT_Uh.js → cron-task-DXfxcgr-.js} +1 -1
  47. package/dist/{frameView-DM3flfo5.js → frameView-DkFBCQIT.js} +1 -1
  48. package/dist/{index-ClHeZ3q4.js → index-D7hSr6Dw.js} +1211 -1201
  49. package/dist/{layout-home-DNPOu6R4.js → layout-home-B7Ex_WUd.js} +11 -11
  50. package/dist/{layoutView-Ymyja_uK.js → layoutView-DB70tHmm.js} +1 -1
  51. package/dist/{log-in-DtHf5ZcG.js → log-in-D28_avjb.js} +1 -1
  52. package/dist/{log-out-DZ8OkPM6.js → log-out-CnWdyT-h.js} +1 -1
  53. package/dist/{login-CoX7TNHE.js → login-BDFcVdJO.js} +1 -1
  54. package/dist/{login-log-DJBGJVV0.js → login-log-BEHYT0v0.js} +5 -5
  55. package/dist/{lov-view-BWtIPBNm.js → lov-view-DBxWS8bR.js} +2 -2
  56. package/dist/{menuInfo-wG5Zt00s.js → menuInfo-CznLhoJE.js} +1 -1
  57. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DiPeALce.js → menuInfo.vue_vue_type_style_index_0_lang-Dxu9tvz9.js} +1 -1
  58. package/dist/{pda-app-9b3JC2he.js → pda-app-BWJOH5h6.js} +1 -1
  59. package/dist/{resource-DiHXYgfm.js → resource-_ZAigzWr.js} +1 -1
  60. package/dist/{su-welcome-COvSPTOW.js → su-welcome-B4Y3rNQi.js} +352 -344
  61. package/dist/{sys-config-Mm50Y0LQ.js → sys-config-Bm0r674r.js} +1 -1
  62. package/dist/udp-core.css +1 -1
  63. package/package.json +1 -1
  64. package/src/components/SuScrollTree/ScrollPanel.vue +176 -170
  65. package/src/components/udp/form-upload/form-upload.vue +496 -492
  66. package/src/components/udp/utils.ts +414 -408
  67. package/src/plugins/i18n/zh.ts +2 -0
  68. package/src/plugins/vxe-table/render.tsx +995 -968
  69. package/src/views/organization/staff/Staff.vue +59 -58
  70. package/src/views/organization/staff/StaffPanel.vue +17 -3
  71. package/src/views/system/layout/layout-home.vue +3 -3
  72. package/src/views/udev/dict/DictView.vue +118 -118
  73. package/src/views/udev/dict/childView.vue +185 -184
  74. package/src/views/ufile/aggregation/File.vue +1 -3
  75. package/src/views/uhome/components/home-todo.vue +10 -5
  76. package/src/views/uhome/su-welcome.vue +2 -2
  77. package/src/views/upms/user/login-log.vue +2 -2
  78. package/vite.config.ts +83 -83
  79. package/dist/Staff-DXr2Ka1N.js +0 -25
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@utogether/udp-core",
3
3
  "private": false,
4
- "version": "2.0.0-beta.5",
4
+ "version": "2.0.0-beta.7",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "main1": "index.ts",
@@ -1,170 +1,176 @@
1
- <template>
2
- <div class="u-scroll-panel" @click.prevent="handleClickPanel">
3
- <div class="u-panel-header">
4
- <h2>{{ title }}</h2>
5
- <ut-button v-if="showAllButton" content="BtnExpand" @click="handleExpand(data, true)" />
6
- <ut-button v-if="showAllButton" status="warning" content="BtnCollapse" @click="handleExpand(data, false)" />
7
- <vxe-button icon="vxe-icon-refresh" @click="onRefresh" />
8
- </div>
9
- <div class="u-panel-content system-scrollbar">
10
- <el-tree
11
- ref="tree"
12
- :data="data"
13
- :props="treeOtions"
14
- :expand-on-click-node="false"
15
- style="background-color: #fff"
16
- class="u-tree-panel"
17
- node-key="id"
18
- highlight-current
19
- @node-click="handleNodeClick"
20
- >
21
- <template #default="{ node }">
22
- <span class="prefix" :class="{ 'is-leaf': node.isLeaf }">
23
- <i class="ri-folder-2-fill ri-lg mr-1" style="color: #fadb14" />
24
- </span>
25
- <span>{{ node.label }}</span>
26
- </template>
27
- </el-tree>
28
- </div>
29
- </div>
30
- </template>
31
-
32
- <script lang="ts" setup>
33
- import { getServiceApi } from '../../api';
34
- import type { Ref } from 'vue';
35
- import { ref, inject, watch, nextTick } from 'vue';
36
-
37
- interface IProps {
38
- title: string;
39
- url: string;
40
- showAllButton?: boolean;
41
- treeOtions: Object;
42
- defaultParams?: Object;
43
- }
44
- const props = withDefaults(defineProps<IProps>(), {
45
- treeOtions: () => {
46
- return {
47
- children: 'children',
48
- label: 'label'
49
- };
50
- },
51
- defaultParams: () => {
52
- return {};
53
- },
54
- showAllButton: false
55
- });
56
-
57
- const data = ref<any>([]);
58
- const tree: Ref<any | null> = ref(null);
59
- // 当前激活item
60
- const active: IRecord = inject('active');
61
- // tree面板变更
62
- const scrollPanelChange: IRecord = inject('scrollPanelChange');
63
- // tree 列表
64
- const treeList: IRecord = inject('treeList');
65
-
66
- watch(
67
- () => scrollPanelChange.value,
68
- () => {
69
- scrollPanelChange.value && getDataList();
70
- }
71
- );
72
-
73
- const getDataList = async (params = {}) => {
74
- const query = Object.assign(params, props.defaultParams);
75
- const serverData = (await getServiceApi().get(props.url, query)) as IResponseData;
76
- data.value = serverData.list || serverData;
77
- treeList.value = serverData.list || serverData;
78
- active.value = serverData.list ? serverData.list[0] : serverData[0];
79
- nextTick(() => {
80
- tree.value && tree?.value.setCurrentKey(active.value?.id || '');
81
- });
82
- scrollPanelChange.value = false;
83
- };
84
- const handleNodeClick = (row: any) => {
85
- active.value = row;
86
- };
87
-
88
- const handleClickPanel = () => {
89
- active.value = {};
90
- };
91
-
92
- const handleExpand = (array, expanded) => {
93
- array.forEach(el => {
94
- tree.value.store.nodesMap[el.id].expanded = expanded;
95
- if (el.children?.length) {
96
- handleExpand(el.children, expanded);
97
- }
98
- });
99
- console.log('[ tree.value ] >', tree.value);
100
- };
101
-
102
- const onRefresh = () => {
103
- getDataList();
104
- };
105
- defineExpose({
106
- onRefresh
107
- });
108
- getDataList();
109
- </script>
110
-
111
- <style lang="scss">
112
- .u-scroll-panel {
113
- display: flex;
114
- flex-direction: column;
115
- width: 100%;
116
- height: 100%;
117
- background: #fff;
118
-
119
- .u-panel-header {
120
- display: flex;
121
- align-items: center;
122
- padding: 10px;
123
- border-bottom: 1px solid #eee;
124
-
125
- h2 {
126
- // display: box;
127
- height: 30px;
128
- padding: 0;
129
- margin: 0;
130
- margin-right: 20px;
131
- overflow: hidden;
132
- -webkit-line-clamp: 1;
133
- font-size: 14px;
134
- line-height: 30px;
135
- -webkit-box-orient: vertical;
136
- }
137
-
138
- .el-input {
139
- flex: 1;
140
- }
141
- }
142
-
143
- .u-panel-content {
144
- flex: 1;
145
- overflow: auto;
146
- }
147
-
148
- .u-tree-panel {
149
- height: 100%; // 0630
150
- :deep(.el-tree-node__content) {
151
- height: 36px;
152
- }
153
-
154
- :deep(.el-tree-node.is-current > .el-tree-node__content) {
155
- background-color: rgb(64 158 255 / 40%);
156
- }
157
-
158
- :deep(.el-tree-node > .el-tree-node__content) {
159
- transition: 0.2s;
160
- }
161
- }
162
-
163
- .el-vl__window {
164
- height: 360px !important;
165
- // &:first-child {
166
- // height: 100% !important;
167
- // }
168
- }
169
- }
170
- </style>
1
+ <template>
2
+ <div class="u-scroll-panel" @click.prevent="handleClickPanel">
3
+ <div class="u-panel-header">
4
+ <h2>{{ title }}</h2>
5
+ <ut-button v-if="showAllButton" content="BtnExpand" @click="handleExpand(data, true)" />
6
+ <ut-button v-if="showAllButton" status="warning" content="BtnCollapse" @click="handleExpand(data, false)" />
7
+ <vxe-button icon="vxe-icon-refresh" @click="onRefresh" />
8
+ </div>
9
+ <div class="u-panel-content system-scrollbar">
10
+ <el-tree
11
+ ref="tree"
12
+ :data="data"
13
+ :props="treeOtions"
14
+ :expand-on-click-node="false"
15
+ style="background-color: #fff"
16
+ class="u-tree-panel"
17
+ node-key="id"
18
+ highlight-current
19
+ @node-click="handleNodeClick"
20
+ >
21
+ <template #default="{ node }">
22
+ <span class="prefix" :class="{ 'is-leaf': node.isLeaf }">
23
+ <i class="ri-folder-2-fill ri-lg mr-1" style="color: #fadb14" />
24
+ </span>
25
+ <span>{{ node.label }}</span>
26
+ </template>
27
+ </el-tree>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script lang="ts" setup>
33
+ import { getServiceApi } from '../../api';
34
+ import type { Ref } from 'vue';
35
+ import { ref, inject, watch, nextTick } from 'vue';
36
+
37
+ interface IProps {
38
+ title: string;
39
+ url: string;
40
+ showAllButton?: boolean;
41
+ initLoadAll?: boolean;
42
+ treeOtions: Object;
43
+ defaultParams?: Object;
44
+ }
45
+ const props = withDefaults(defineProps<IProps>(), {
46
+ treeOtions: () => {
47
+ return {
48
+ children: 'children',
49
+ label: 'label'
50
+ };
51
+ },
52
+ defaultParams: () => {
53
+ return {};
54
+ },
55
+ showAllButton: false,
56
+ initLoadAll: false
57
+ });
58
+
59
+ const data = ref<any>([]);
60
+ const tree: Ref<any | null> = ref(null);
61
+ // 当前激活item
62
+ const active: IRecord = inject('active');
63
+ // tree面板变更
64
+ const scrollPanelChange: IRecord = inject('scrollPanelChange');
65
+ // tree 列表
66
+ const treeList: IRecord = inject('treeList');
67
+
68
+ watch(
69
+ () => scrollPanelChange.value,
70
+ () => {
71
+ scrollPanelChange.value && getDataList();
72
+ }
73
+ );
74
+
75
+ const getDataList = async (params = {}) => {
76
+ const query = Object.assign(params, props.defaultParams);
77
+ const serverData = (await getServiceApi().get(props.url, query)) as IResponseData;
78
+ data.value = serverData.list || serverData;
79
+ treeList.value = serverData.list || serverData;
80
+ if (props.initLoadAll) {
81
+ active.value = {};
82
+ } else {
83
+ active.value = serverData.list ? serverData.list[0] : serverData[0];
84
+ }
85
+ nextTick(() => {
86
+ tree.value && tree?.value.setCurrentKey(active.value?.id || '');
87
+ });
88
+ scrollPanelChange.value = false;
89
+ };
90
+ const handleNodeClick = (row: any) => {
91
+ active.value = row;
92
+ };
93
+
94
+ const handleClickPanel = () => {
95
+ active.value = {};
96
+ };
97
+
98
+ const handleExpand = (array, expanded) => {
99
+ array.forEach(el => {
100
+ tree.value.store.nodesMap[el.id].expanded = expanded;
101
+ if (el.children?.length) {
102
+ handleExpand(el.children, expanded);
103
+ }
104
+ });
105
+ console.log('[ tree.value ] >', tree.value);
106
+ };
107
+
108
+ const onRefresh = () => {
109
+ getDataList();
110
+ };
111
+ defineExpose({
112
+ onRefresh
113
+ });
114
+ getDataList();
115
+ </script>
116
+
117
+ <style lang="scss">
118
+ .u-scroll-panel {
119
+ display: flex;
120
+ flex-direction: column;
121
+ width: 100%;
122
+ height: 100%;
123
+ background: #fff;
124
+
125
+ .u-panel-header {
126
+ display: flex;
127
+ align-items: center;
128
+ padding: 10px;
129
+ border-bottom: 1px solid #eee;
130
+
131
+ h2 {
132
+ // display: box;
133
+ height: 30px;
134
+ padding: 0;
135
+ margin: 0;
136
+ margin-right: 20px;
137
+ overflow: hidden;
138
+ -webkit-line-clamp: 1;
139
+ font-size: 14px;
140
+ line-height: 30px;
141
+ -webkit-box-orient: vertical;
142
+ }
143
+
144
+ .el-input {
145
+ flex: 1;
146
+ }
147
+ }
148
+
149
+ .u-panel-content {
150
+ flex: 1;
151
+ overflow: auto;
152
+ }
153
+
154
+ .u-tree-panel {
155
+ height: 100%; // 0630
156
+ :deep(.el-tree-node__content) {
157
+ height: 36px;
158
+ }
159
+
160
+ :deep(.el-tree-node.is-current > .el-tree-node__content) {
161
+ background-color: rgb(64 158 255 / 40%);
162
+ }
163
+
164
+ :deep(.el-tree-node > .el-tree-node__content) {
165
+ transition: 0.2s;
166
+ }
167
+ }
168
+
169
+ .el-vl__window {
170
+ height: 360px !important;
171
+ // &:first-child {
172
+ // height: 100% !important;
173
+ // }
174
+ }
175
+ }
176
+ </style>