@utogether/udp-core 1.0.1-beta.16 → 1.0.1-beta.18

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 (123) hide show
  1. package/build/plugins.ts +39 -39
  2. package/dist/{403-RBzulrcG.js → 403-B8xAGW0x.js} +1 -1
  3. package/dist/{404-DX-dU_6C.js → 404-BtgajMpP.js} +1 -1
  4. package/dist/{500-BCTk0__d.js → 500-DFWWZylZ.js} +1 -1
  5. package/dist/{AuthorityInfo-BADTOenq.js → AuthorityInfo-BxWSZs7n.js} +1 -1
  6. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Cv46yAx_.js → AuthorityInfo.vue_vue_type_style_index_0_lang-XIiFdjxN.js} +1 -1
  7. package/dist/{Company-B-61KrWd.js → Company-BbUJtuvr.js} +3 -3
  8. package/dist/{CompanyPanel-CawSrEff.js → CompanyPanel-KOOFrGjk.js} +8 -8
  9. package/dist/{Department-CrzJPtvP.js → Department-BimSgBm2.js} +3 -3
  10. package/dist/{DepartmentPanel-DYuL8H-j.js → DepartmentPanel-DYXPUCDs.js} +3 -3
  11. package/dist/{DesignPanel-DEAv6V68.js → DesignPanel-CHZ36J4q.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BsnXZ2td.js → DesignPanel.vue_vue_type_style_index_0_lang-ZbNixuuY.js} +2 -2
  13. package/dist/{DictView-BuO-2b-c.js → DictView-7RQYVj4H.js} +1 -1
  14. package/dist/{InvOrganization-CBgKBJAn.js → InvOrganization-esq9FI1K.js} +1 -1
  15. package/dist/{Org-BaQw2r-o.js → Org-BGswGV9g.js} +1 -1
  16. package/dist/{Preview-DvCrmKNk.js → Preview-DP0pD6Kf.js} +1 -1
  17. package/dist/{ReportDefine-DyhWz0as.js → ReportDefine-1rjKlbK-.js} +1 -1
  18. package/dist/{ReportDesign-DgZ2f2zv.js → ReportDesign-BIUj35Kh.js} +2 -2
  19. package/dist/{ReportQuery-DTZYbCDi.js → ReportQuery-CWevStRg.js} +1 -1
  20. package/dist/{ReportQueryFrom-B-vtJegP.js → ReportQueryFrom-vlOF5_gc.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-D6izgxph.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-BGyeoYxo.js} +1 -1
  22. package/dist/{ReportTemplate-DA1ZqKGf.js → ReportTemplate-BPURQOFZ.js} +1 -1
  23. package/dist/{Role-mbqoav5t.js → Role-D8xJ3rai.js} +3 -3
  24. package/dist/{RoleAssign-ltEJIEcr.js → RoleAssign-CE5FeHLd.js} +8 -8
  25. package/dist/{RolePanel-u90v9eS0.js → RolePanel-B6wskQVB.js} +1 -1
  26. package/dist/{RolePanel-1g1a-G8D.js → RolePanel-CqHsGjrK.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-LC4Egk-Q.js → RolePanel.vue_vue_type_script_setup_true_lang-Bjoq-nCm.js} +3 -3
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-D9YxpGnt.js → RolePanel.vue_vue_type_script_setup_true_lang-Dv5IVELj.js} +1 -1
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-DZ3W1epK.js → ScrollPanel.vue_vue_type_style_index_0_lang-Bp8Y_5A2.js} +1 -1
  30. package/dist/{Staff-CJ2GgCL3.js → Staff-DuYrik71.js} +3 -3
  31. package/dist/{StaffInfo-3KkodDCK.js → StaffInfo-CZiak-1b.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-CW-isIxJ.js → StaffInfo.vue_vue_type_script_setup_true_lang-LCuqxUh8.js} +1 -1
  33. package/dist/{StaffPanel-DoXPSoY5.js → StaffPanel-DI6MBAJH.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DvhGnOMZ.js → StaffPanel.vue_vue_type_script_setup_true_lang-DxJhnVpd.js} +2 -2
  35. package/dist/{SysUser-BuIZhMPh.js → SysUser-DoNj2tIV.js} +2 -2
  36. package/dist/{SysUserPanel-t1GJcJGM.js → SysUserPanel-CvfyRxel.js} +1 -1
  37. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-CDDkFLlN.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BoghL7F3.js} +43 -39
  38. package/dist/{SystemMenu-DuLEL6_l.js → SystemMenu-Cr3vUEQU.js} +2 -2
  39. package/dist/{UserInfo-WWby4lts.js → UserInfo-6c8UDIVO.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-B06ZSrJV.js → UserInfo.vue_vue_type_style_index_0_lang-DstUSeNQ.js} +1 -1
  41. package/dist/{childView-B0-EAoAi.js → childView-BlmHw5jv.js} +1 -1
  42. package/dist/{childView-IYY4L8VK.js → childView-C050pf1v.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-B56v6yK7.js → childView.vue_vue_type_style_index_0_lang-BxLT1Dz0.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-CjF8nZuj.js → childView.vue_vue_type_style_index_0_lang-D0nlTIP-.js} +2 -2
  45. package/dist/{code-rule-DDLdi3pP.js → code-rule-Br1Mh3_M.js} +1 -1
  46. package/dist/core.es.js +1 -1
  47. package/dist/{cron-task-p3-AFN1w.js → cron-task-DhuIk5pP.js} +1 -1
  48. package/dist/{frameView-B_WAZErD.js → frameView-hJoSI0Ai.js} +1 -1
  49. package/dist/index-1dgWFXT2.js +5436 -0
  50. package/dist/{layoutView-CoEp2afn.js → layoutView-DU-TVfOp.js} +1340 -1337
  51. package/dist/{login-DP0oP70W.js → login-CzJBV0x8.js} +2 -2
  52. package/dist/{lov-view-BDoZRK-v.js → lov-view-BxaHaVKE.js} +2 -2
  53. package/dist/{menuInfo-5Xls76qB.js → menuInfo-Dp7nAbgM.js} +1 -1
  54. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BfZczW9a.js → menuInfo.vue_vue_type_style_index_0_lang-Ch4NbiCL.js} +1 -1
  55. package/dist/{pda-app-DxGYn4G7.js → pda-app-BmxY3H7y.js} +2 -2
  56. package/dist/{resource-BnYWe_-Q.js → resource-D2dCI_x9.js} +1 -1
  57. package/dist/{su-welcome-B2rNhhDH.js → su-welcome-BKGU5HUf.js} +1 -1
  58. package/dist/{sys-config-Bb4WkxZK.js → sys-config-s8DnZMOd.js} +1 -1
  59. package/dist/udp-core.css +1 -9
  60. package/index.ts +48 -48
  61. package/package.json +1 -1
  62. package/src/App.vue +65 -65
  63. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  64. package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
  65. package/src/components/udp/{grid.vue → grid/index.vue} +39 -25
  66. package/src/components/udp/index.ts +2 -9
  67. package/src/components/udp/utils.ts +63 -108
  68. package/src/layout/components/lay-navbar/index.vue +239 -239
  69. package/src/layout/components/lay-panel/index.vue +150 -150
  70. package/src/layout/components/lay-search/index.vue +25 -25
  71. package/src/layout/components/lay-select-org/index.vue +64 -64
  72. package/src/layout/components/lay-sidebar/horizontal.vue +190 -190
  73. package/src/layout/components/lay-sidebar/mixNav.vue +260 -260
  74. package/src/layout/components/lay-sidebar/sidebar-logo.vue +1 -0
  75. package/src/layout/components/lay-tag/index.vue +20 -48
  76. package/src/layout/hooks/useNav.ts +173 -173
  77. package/src/layout/hooks/useTag.ts +5 -3
  78. package/src/layout/types.ts +3 -2
  79. package/src/main.ts +24 -21
  80. package/src/plugins/i18n/en.ts +302 -302
  81. package/src/plugins/i18n/zh.ts +356 -354
  82. package/src/plugins/vxe-table/index.ts +67 -4
  83. package/src/plugins/vxe-table/render.tsx +18 -29
  84. package/src/router/index.ts +186 -177
  85. package/src/router/modules/remaining.ts +58 -58
  86. package/src/router/utils.ts +393 -377
  87. package/src/store/modules/app.ts +1 -3
  88. package/src/store/modules/multiTags.ts +110 -109
  89. package/src/store/modules/permission.ts +113 -100
  90. package/src/style/button.scss +85 -85
  91. package/src/style/login.css +336 -336
  92. package/src/style/vxetable.scss +338 -321
  93. package/src/views/organization/company/CompanyPanel.vue +259 -259
  94. package/src/views/organization/department/DepartmentPanel.vue +269 -283
  95. package/src/views/system/menu/SystemMenu.vue +183 -183
  96. package/src/views/system/menu/menuInfo.vue +363 -363
  97. package/src/views/system/role/UserInfo.vue +195 -195
  98. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  99. package/src/views/system/role-assign/RolePanel.vue +139 -139
  100. package/src/views/system/sys/sys-config.vue +336 -336
  101. package/src/views/system/sysUser/SysUserPanel.vue +279 -278
  102. package/src/views/uapp/pda/pda-app.vue +208 -208
  103. package/src/views/udev/dict/DictView.vue +118 -118
  104. package/src/views/udev/dict/childView.vue +1 -1
  105. package/src/views/udev/lov/lov-view.vue +91 -91
  106. package/src/views/ulogin/login.vue +323 -323
  107. package/src/views/upms/interface/log-out.vue +101 -101
  108. package/src/views/urpt/design/DesignPanel.vue +507 -507
  109. package/types/global.d.ts +230 -230
  110. package/dist/index-24fnvUBy.js +0 -2822
  111. package/src/components/udp/count-down.vue +0 -536
  112. package/src/components/udp/flip-down/FlipCard/flip-card.vue +0 -251
  113. package/src/components/udp/flip-down/FlipCard/interfaces.ts +0 -4
  114. package/src/components/udp/flip-down/FlipClock/flip-clock.vue +0 -113
  115. package/src/components/udp/form-upload.vue +0 -482
  116. package/src/components/udp/form.vue +0 -112
  117. package/src/components/udp/lov.vue +0 -388
  118. package/src/components/udp/modal-form.vue +0 -190
  119. package/src/components/udp/modal-grid.vue +0 -298
  120. package/src/components/udp/upload.vue +0 -423
  121. package/src/utils/udp/http/index.ts +0 -294
  122. package/src/utils/udp/http/types.d.ts +0 -49
  123. package/src/utils/udp/useRender.ts +0 -431
@@ -1,150 +1,150 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2021-12-23 17:33:20
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-07-31 10:15:40
6
- * @Description: 个性化设置页面
7
- -->
8
- <script setup lang="ts">
9
- import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
10
- import { useDataThemeChange } from '../../hooks/useDataThemeChange';
11
- import { onClickOutside } from '@vueuse/core';
12
- import { emitter } from '../../../utils/mitt';
13
-
14
- const target = ref(null);
15
- const show = ref<Boolean>(false);
16
-
17
- const iconClass = computed(() => {
18
- return [
19
- 'w-[22px]',
20
- 'h-[22px]',
21
- 'flex',
22
- 'justify-center',
23
- 'items-center',
24
- 'outline-hidden',
25
- 'rounded-[4px]',
26
- 'cursor-pointer',
27
- 'transition-colors',
28
- 'hover:bg-[#0000000f]',
29
- 'dark:hover:bg-[#ffffff1f]',
30
- 'dark:hover:text-[#ffffffd9]'
31
- ];
32
- });
33
-
34
- const { onReset } = useDataThemeChange();
35
- onClickOutside(target, (event: any) => {
36
- if (event.clientX > target.value.offsetLeft) return;
37
- show.value = false;
38
- });
39
-
40
- onMounted(() => {
41
- emitter.on('openPanel', () => {
42
- show.value = true;
43
- });
44
- });
45
-
46
- onBeforeUnmount(() => {
47
- // 解绑`openPanel`公共事件,防止多次触发
48
- emitter.off('openPanel');
49
- });
50
- </script>
51
-
52
- <template>
53
- <div :class="{ show }">
54
- <div class="right-panel-background" />
55
- <div ref="target" class="right-panel bg-bg_color bg-white">
56
- <div
57
- class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
58
- >
59
- <h4 class="dark:text-white">{{ $t('message.tip.projectConfig') }}</h4>
60
- <span
61
- v-tippy="{
62
- content: $t('message.tip.closeConfig'),
63
- placement: 'bottom-start',
64
- zIndex: 41000
65
- }"
66
- :class="iconClass"
67
- >
68
- <IconifyIconOffline
69
- class="dark:text-white"
70
- width="18px"
71
- height="18px"
72
- icon="ri:close-line"
73
- @click="show = !show"
74
- />
75
- </span>
76
- </div>
77
- <el-scrollbar>
78
- <slot />
79
- </el-scrollbar>
80
-
81
- <div
82
- class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
83
- >
84
- <el-button
85
- v-tippy="{
86
- content: $t('message.tip.toLogin'),
87
- placement: 'left-start',
88
- zIndex: 41000
89
- }"
90
- type="danger"
91
- text
92
- bg
93
- @click="onReset"
94
- >
95
- {{ $t('message.tip.clearCache') }}
96
- </el-button>
97
- </div>
98
- </div>
99
- </div>
100
- </template>
101
-
102
- <style lang="scss" scoped>
103
- :deep(.el-scrollbar) {
104
- height: calc(100vh - 110px);
105
- }
106
-
107
- .right-panel-background {
108
- position: fixed;
109
- top: 0;
110
- left: 0;
111
- z-index: -1;
112
- background: rgb(0 0 0 / 20%);
113
- opacity: 0;
114
- transition: opacity 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
115
- }
116
-
117
- .right-panel {
118
- position: fixed;
119
- top: 0;
120
- right: 0;
121
- z-index: 400000;
122
- width: 100%;
123
- max-width: 300px;
124
- box-shadow: 0 0 15px 0 rgb(0 0 0 / 5%);
125
- transform: translate(100%);
126
- transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
127
- }
128
-
129
- .show {
130
- transition: all 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
131
-
132
- .right-panel-background {
133
- z-index: 20000;
134
- width: 100%;
135
- height: 100%;
136
- opacity: 1;
137
- }
138
-
139
- .right-panel {
140
- transform: translate(0);
141
- }
142
- }
143
-
144
- .project-configuration {
145
- display: flex;
146
- align-items: center;
147
- justify-content: space-between;
148
- padding: 14px 20px;
149
- }
150
- </style>
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2021-12-23 17:33:20
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-07-31 10:15:40
6
+ * @Description: 个性化设置页面
7
+ -->
8
+ <script setup lang="ts">
9
+ import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
10
+ import { useDataThemeChange } from '../../hooks/useDataThemeChange';
11
+ import { onClickOutside } from '@vueuse/core';
12
+ import { emitter } from '../../../utils/mitt';
13
+
14
+ const target = ref(null);
15
+ const show = ref<Boolean>(false);
16
+
17
+ const iconClass = computed(() => {
18
+ return [
19
+ 'w-[22px]',
20
+ 'h-[22px]',
21
+ 'flex',
22
+ 'justify-center',
23
+ 'items-center',
24
+ 'outline-hidden',
25
+ 'rounded-[4px]',
26
+ 'cursor-pointer',
27
+ 'transition-colors',
28
+ 'hover:bg-[#0000000f]',
29
+ 'dark:hover:bg-[#ffffff1f]',
30
+ 'dark:hover:text-[#ffffffd9]'
31
+ ];
32
+ });
33
+
34
+ const { onReset } = useDataThemeChange();
35
+ onClickOutside(target, (event: any) => {
36
+ if (event.clientX > target.value.offsetLeft) return;
37
+ show.value = false;
38
+ });
39
+
40
+ onMounted(() => {
41
+ emitter.on('openPanel', () => {
42
+ show.value = true;
43
+ });
44
+ });
45
+
46
+ onBeforeUnmount(() => {
47
+ // 解绑`openPanel`公共事件,防止多次触发
48
+ emitter.off('openPanel');
49
+ });
50
+ </script>
51
+
52
+ <template>
53
+ <div :class="{ show }">
54
+ <div class="right-panel-background" />
55
+ <div ref="target" class="right-panel bg-bg_color bg-white">
56
+ <div
57
+ class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
58
+ >
59
+ <h4 class="dark:text-white">{{ $t('message.tip.projectConfig') }}</h4>
60
+ <span
61
+ v-tippy="{
62
+ content: $t('message.tip.closeConfig'),
63
+ placement: 'bottom-start',
64
+ zIndex: 41000
65
+ }"
66
+ :class="iconClass"
67
+ >
68
+ <IconifyIconOffline
69
+ class="dark:text-white"
70
+ width="18px"
71
+ height="18px"
72
+ icon="ri:close-line"
73
+ @click="show = !show"
74
+ />
75
+ </span>
76
+ </div>
77
+ <el-scrollbar>
78
+ <slot />
79
+ </el-scrollbar>
80
+
81
+ <div
82
+ class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
83
+ >
84
+ <el-button
85
+ v-tippy="{
86
+ content: $t('message.tip.toLogin'),
87
+ placement: 'left-start',
88
+ zIndex: 41000
89
+ }"
90
+ type="danger"
91
+ text
92
+ bg
93
+ @click="onReset"
94
+ >
95
+ {{ $t('message.tip.clearCache') }}
96
+ </el-button>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </template>
101
+
102
+ <style lang="scss" scoped>
103
+ :deep(.el-scrollbar) {
104
+ height: calc(100vh - 110px);
105
+ }
106
+
107
+ .right-panel-background {
108
+ position: fixed;
109
+ top: 0;
110
+ left: 0;
111
+ z-index: -1;
112
+ background: rgb(0 0 0 / 20%);
113
+ opacity: 0;
114
+ transition: opacity 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
115
+ }
116
+
117
+ .right-panel {
118
+ position: fixed;
119
+ top: 0;
120
+ right: 0;
121
+ z-index: 400000;
122
+ width: 100%;
123
+ max-width: 300px;
124
+ box-shadow: 0 0 15px 0 rgb(0 0 0 / 5%);
125
+ transform: translate(100%);
126
+ transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
127
+ }
128
+
129
+ .show {
130
+ transition: all 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
131
+
132
+ .right-panel-background {
133
+ z-index: 20000;
134
+ width: 100%;
135
+ height: 100%;
136
+ opacity: 1;
137
+ }
138
+
139
+ .right-panel {
140
+ transform: translate(0);
141
+ }
142
+ }
143
+
144
+ .project-configuration {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: space-between;
148
+ padding: 14px 20px;
149
+ }
150
+ </style>
@@ -1,25 +1,25 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2022-03-10 11:26:15
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2023-10-12 11:43:49
6
- * @Description: 菜单栏搜索
7
- -->
8
- <script lang="ts" setup>
9
- import { SearchModal } from './components';
10
- import { useBoolean } from '../../hooks/useBoolean';
11
- const { bool: show, toggle } = useBoolean();
12
- function handleSearch() {
13
- toggle();
14
- }
15
- </script>
16
-
17
- <template>
18
- <div
19
- class="search-container w-[40px] h-[48px] px-2 flex justify-center items-center cursor-pointer navbar-bg-hover"
20
- @click="handleSearch"
21
- >
22
- <IconifyIconOffline icon="ri:search-line" />
23
- </div>
24
- <SearchModal v-model:value="show" />
25
- </template>
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-10 11:26:15
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2023-10-12 11:43:49
6
+ * @Description: 菜单栏搜索
7
+ -->
8
+ <script lang="ts" setup>
9
+ import { SearchModal } from './components';
10
+ import { useBoolean } from '../../hooks/useBoolean';
11
+ const { bool: show, toggle } = useBoolean();
12
+ function handleSearch() {
13
+ toggle();
14
+ }
15
+ </script>
16
+
17
+ <template>
18
+ <div
19
+ class="search-container w-[40px] h-[48px] px-2 flex justify-center items-center cursor-pointer navbar-bg-hover"
20
+ @click="handleSearch"
21
+ >
22
+ <IconifyIconOffline icon="ri:search-line" />
23
+ </div>
24
+ <SearchModal v-model:value="show" />
25
+ </template>
@@ -1,64 +1,64 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2021-11-27 16:16:11
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-04-16 14:27:14
6
- * @Description: file content
7
- -->
8
-
9
- <!-- 业务单元选择 -->
10
- <template>
11
- <div style="width: 240px">
12
- <el-select v-model="orgId" size="small" @change="onChange">
13
- <el-option v-for="element in orgList" :key="element.id" :label="element.orgName" :value="element.id" />
14
- </el-select>
15
- </div>
16
- </template>
17
-
18
- <script lang="ts">
19
- export default { name: 'OrgSelect' };
20
- </script>
21
-
22
- <script setup lang="ts">
23
- import { unref, computed } from 'vue';
24
- import to from 'await-to-js';
25
- import { getServiceApi } from '../../../api';
26
- import { useRoute, useRouter } from 'vue-router';
27
- import { cookies } from '@utogether/utils';
28
- import { useSystemStoreHook } from '../../../store/modules/system';
29
- import { usePermissionStoreHook } from '../../../store/modules/permission';
30
-
31
- const route = useRoute();
32
- const router = useRouter();
33
- const orgList = computed(() => useSystemStoreHook().getOrglist);
34
- const orgId = computed(() => useSystemStoreHook().getOrgId);
35
-
36
- const onChange = async orgId => {
37
- const [err] = await to(getServiceApi().post('/uums/org/toggle', { orgId }));
38
- if (!err) {
39
- useSystemStoreHook().setOrgId(orgId);
40
- let organizationId;
41
- const query = { pageSize: 100, pageNum: 1 };
42
- const [err, data]: [Error, any] = await to(getServiceApi().get('/uums/cusOrganization', query));
43
- if (!err && data.list?.length) {
44
- useSystemStoreHook().setInvOrgList(data.list || []);
45
- const invOrg = data.list.find(f => f.orgId === orgId);
46
- organizationId = invOrg.id;
47
- useSystemStoreHook().setOrganizationId(organizationId);
48
- }
49
- const param = { orgId, organizationId };
50
- cookies.set('kCookies_param', JSON.stringify(param));
51
- usePermissionStoreHook().cacheOperate({ mode: 'reset' });
52
- onFresh();
53
- }
54
- };
55
-
56
- /** 刷新路由 */
57
- function onFresh() {
58
- const { fullPath, query } = unref(route);
59
- router.replace({
60
- path: '/redirect' + fullPath,
61
- query: query
62
- });
63
- }
64
- </script>
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-27 16:16:11
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-09-22 09:47:39
6
+ * @Description: file content
7
+ -->
8
+
9
+ <!-- 业务单元选择 -->
10
+ <template>
11
+ <div style="width: 240px">
12
+ <el-select v-model="orgId" size="small" @change="onChange">
13
+ <el-option v-for="element in orgList" :key="element.id" :label="element.orgName" :value="element.id" />
14
+ </el-select>
15
+ </div>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ export default { name: 'OrgSelect' };
20
+ </script>
21
+
22
+ <script setup lang="ts">
23
+ import { unref, computed } from 'vue';
24
+ import to from 'await-to-js';
25
+ import { getServiceApi } from '../../../api';
26
+ import { useRoute, useRouter } from 'vue-router';
27
+ import { cookies } from '@utogether/utils';
28
+ import { useSystemStoreHook } from '../../../store/modules/system';
29
+ import { usePermissionStoreHook } from '../../../store/modules/permission';
30
+
31
+ const route = useRoute();
32
+ const router = useRouter();
33
+ const orgList = computed(() => useSystemStoreHook().getOrglist);
34
+ const orgId = computed(() => useSystemStoreHook().getOrgId);
35
+
36
+ const onChange = async orgId => {
37
+ const [err] = await to(getServiceApi().post('/uums/org/toggle', { orgId }));
38
+ if (!err) {
39
+ useSystemStoreHook().setOrgId(orgId);
40
+ let organizationId;
41
+ const query = { pageSize: 100, pageNum: 1 };
42
+ const [err, data]: [Error, any] = await to(getServiceApi().get('/uums/cusOrganization', query));
43
+ if (!err && data.list?.length) {
44
+ useSystemStoreHook().setInvOrgList(data.list || []);
45
+ const invOrg = data?.list?.find(f => f.orgId === orgId);
46
+ organizationId = invOrg?.id;
47
+ useSystemStoreHook().setOrganizationId(organizationId);
48
+ }
49
+ const param = { orgId, organizationId };
50
+ cookies.set('kCookies_param', JSON.stringify(param));
51
+ usePermissionStoreHook().cacheOperate({ mode: 'reset' });
52
+ onFresh();
53
+ }
54
+ };
55
+
56
+ /** 刷新路由 */
57
+ function onFresh() {
58
+ const { fullPath, query } = unref(route);
59
+ router.replace({
60
+ path: '/redirect' + fullPath,
61
+ query: query
62
+ });
63
+ }
64
+ </script>