@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.
- package/build/plugins.ts +39 -39
- package/dist/{403-RBzulrcG.js → 403-B8xAGW0x.js} +1 -1
- package/dist/{404-DX-dU_6C.js → 404-BtgajMpP.js} +1 -1
- package/dist/{500-BCTk0__d.js → 500-DFWWZylZ.js} +1 -1
- package/dist/{AuthorityInfo-BADTOenq.js → AuthorityInfo-BxWSZs7n.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Cv46yAx_.js → AuthorityInfo.vue_vue_type_style_index_0_lang-XIiFdjxN.js} +1 -1
- package/dist/{Company-B-61KrWd.js → Company-BbUJtuvr.js} +3 -3
- package/dist/{CompanyPanel-CawSrEff.js → CompanyPanel-KOOFrGjk.js} +8 -8
- package/dist/{Department-CrzJPtvP.js → Department-BimSgBm2.js} +3 -3
- package/dist/{DepartmentPanel-DYuL8H-j.js → DepartmentPanel-DYXPUCDs.js} +3 -3
- package/dist/{DesignPanel-DEAv6V68.js → DesignPanel-CHZ36J4q.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BsnXZ2td.js → DesignPanel.vue_vue_type_style_index_0_lang-ZbNixuuY.js} +2 -2
- package/dist/{DictView-BuO-2b-c.js → DictView-7RQYVj4H.js} +1 -1
- package/dist/{InvOrganization-CBgKBJAn.js → InvOrganization-esq9FI1K.js} +1 -1
- package/dist/{Org-BaQw2r-o.js → Org-BGswGV9g.js} +1 -1
- package/dist/{Preview-DvCrmKNk.js → Preview-DP0pD6Kf.js} +1 -1
- package/dist/{ReportDefine-DyhWz0as.js → ReportDefine-1rjKlbK-.js} +1 -1
- package/dist/{ReportDesign-DgZ2f2zv.js → ReportDesign-BIUj35Kh.js} +2 -2
- package/dist/{ReportQuery-DTZYbCDi.js → ReportQuery-CWevStRg.js} +1 -1
- package/dist/{ReportQueryFrom-B-vtJegP.js → ReportQueryFrom-vlOF5_gc.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-D6izgxph.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-BGyeoYxo.js} +1 -1
- package/dist/{ReportTemplate-DA1ZqKGf.js → ReportTemplate-BPURQOFZ.js} +1 -1
- package/dist/{Role-mbqoav5t.js → Role-D8xJ3rai.js} +3 -3
- package/dist/{RoleAssign-ltEJIEcr.js → RoleAssign-CE5FeHLd.js} +8 -8
- package/dist/{RolePanel-u90v9eS0.js → RolePanel-B6wskQVB.js} +1 -1
- package/dist/{RolePanel-1g1a-G8D.js → RolePanel-CqHsGjrK.js} +1 -1
- 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
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-D9YxpGnt.js → RolePanel.vue_vue_type_script_setup_true_lang-Dv5IVELj.js} +1 -1
- 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
- package/dist/{Staff-CJ2GgCL3.js → Staff-DuYrik71.js} +3 -3
- package/dist/{StaffInfo-3KkodDCK.js → StaffInfo-CZiak-1b.js} +1 -1
- 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
- package/dist/{StaffPanel-DoXPSoY5.js → StaffPanel-DI6MBAJH.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DvhGnOMZ.js → StaffPanel.vue_vue_type_script_setup_true_lang-DxJhnVpd.js} +2 -2
- package/dist/{SysUser-BuIZhMPh.js → SysUser-DoNj2tIV.js} +2 -2
- package/dist/{SysUserPanel-t1GJcJGM.js → SysUserPanel-CvfyRxel.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-CDDkFLlN.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BoghL7F3.js} +43 -39
- package/dist/{SystemMenu-DuLEL6_l.js → SystemMenu-Cr3vUEQU.js} +2 -2
- package/dist/{UserInfo-WWby4lts.js → UserInfo-6c8UDIVO.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-B06ZSrJV.js → UserInfo.vue_vue_type_style_index_0_lang-DstUSeNQ.js} +1 -1
- package/dist/{childView-B0-EAoAi.js → childView-BlmHw5jv.js} +1 -1
- package/dist/{childView-IYY4L8VK.js → childView-C050pf1v.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-B56v6yK7.js → childView.vue_vue_type_style_index_0_lang-BxLT1Dz0.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CjF8nZuj.js → childView.vue_vue_type_style_index_0_lang-D0nlTIP-.js} +2 -2
- package/dist/{code-rule-DDLdi3pP.js → code-rule-Br1Mh3_M.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-p3-AFN1w.js → cron-task-DhuIk5pP.js} +1 -1
- package/dist/{frameView-B_WAZErD.js → frameView-hJoSI0Ai.js} +1 -1
- package/dist/index-1dgWFXT2.js +5436 -0
- package/dist/{layoutView-CoEp2afn.js → layoutView-DU-TVfOp.js} +1340 -1337
- package/dist/{login-DP0oP70W.js → login-CzJBV0x8.js} +2 -2
- package/dist/{lov-view-BDoZRK-v.js → lov-view-BxaHaVKE.js} +2 -2
- package/dist/{menuInfo-5Xls76qB.js → menuInfo-Dp7nAbgM.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BfZczW9a.js → menuInfo.vue_vue_type_style_index_0_lang-Ch4NbiCL.js} +1 -1
- package/dist/{pda-app-DxGYn4G7.js → pda-app-BmxY3H7y.js} +2 -2
- package/dist/{resource-BnYWe_-Q.js → resource-D2dCI_x9.js} +1 -1
- package/dist/{su-welcome-B2rNhhDH.js → su-welcome-BKGU5HUf.js} +1 -1
- package/dist/{sys-config-Bb4WkxZK.js → sys-config-s8DnZMOd.js} +1 -1
- package/dist/udp-core.css +1 -9
- package/index.ts +48 -48
- package/package.json +1 -1
- package/src/App.vue +65 -65
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
- package/src/components/udp/{grid.vue → grid/index.vue} +39 -25
- package/src/components/udp/index.ts +2 -9
- package/src/components/udp/utils.ts +63 -108
- package/src/layout/components/lay-navbar/index.vue +239 -239
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-search/index.vue +25 -25
- package/src/layout/components/lay-select-org/index.vue +64 -64
- package/src/layout/components/lay-sidebar/horizontal.vue +190 -190
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -260
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +1 -0
- package/src/layout/components/lay-tag/index.vue +20 -48
- package/src/layout/hooks/useNav.ts +173 -173
- package/src/layout/hooks/useTag.ts +5 -3
- package/src/layout/types.ts +3 -2
- package/src/main.ts +24 -21
- package/src/plugins/i18n/en.ts +302 -302
- package/src/plugins/i18n/zh.ts +356 -354
- package/src/plugins/vxe-table/index.ts +67 -4
- package/src/plugins/vxe-table/render.tsx +18 -29
- package/src/router/index.ts +186 -177
- package/src/router/modules/remaining.ts +58 -58
- package/src/router/utils.ts +393 -377
- package/src/store/modules/app.ts +1 -3
- package/src/store/modules/multiTags.ts +110 -109
- package/src/store/modules/permission.ts +113 -100
- package/src/style/button.scss +85 -85
- package/src/style/login.css +336 -336
- package/src/style/vxetable.scss +338 -321
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/department/DepartmentPanel.vue +269 -283
- package/src/views/system/menu/SystemMenu.vue +183 -183
- package/src/views/system/menu/menuInfo.vue +363 -363
- package/src/views/system/role/UserInfo.vue +195 -195
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -139
- package/src/views/system/sys/sys-config.vue +336 -336
- package/src/views/system/sysUser/SysUserPanel.vue +279 -278
- package/src/views/uapp/pda/pda-app.vue +208 -208
- package/src/views/udev/dict/DictView.vue +118 -118
- package/src/views/udev/dict/childView.vue +1 -1
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/src/views/ulogin/login.vue +323 -323
- package/src/views/upms/interface/log-out.vue +101 -101
- package/src/views/urpt/design/DesignPanel.vue +507 -507
- package/types/global.d.ts +230 -230
- package/dist/index-24fnvUBy.js +0 -2822
- package/src/components/udp/count-down.vue +0 -536
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +0 -251
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +0 -4
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +0 -113
- package/src/components/udp/form-upload.vue +0 -482
- package/src/components/udp/form.vue +0 -112
- package/src/components/udp/lov.vue +0 -388
- package/src/components/udp/modal-form.vue +0 -190
- package/src/components/udp/modal-grid.vue +0 -298
- package/src/components/udp/upload.vue +0 -423
- package/src/utils/udp/http/index.ts +0 -294
- package/src/utils/udp/http/types.d.ts +0 -49
- package/src/utils/udp/useRender.ts +0 -431
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, nextTick } from 'vue';
|
|
3
|
-
import { storageLocal } from '@utogether/utils';
|
|
4
|
-
import { useNav } from '../../hooks/useNav';
|
|
5
|
-
import OrgSelect from '../lay-select-org/index.vue';
|
|
6
|
-
import Search from '../lay-search/index.vue';
|
|
7
|
-
// import Notice from '../lay-notice/index.vue';
|
|
8
|
-
import SidebarItem from './sidebarItem.vue';
|
|
9
|
-
import avatars from '../../../assets/images/avatars.jpg';
|
|
10
|
-
import { kSYSCONFIG } from '../../../contant';
|
|
11
|
-
import { useTranslationLang } from '../../hooks/useTranslationLang';
|
|
12
|
-
import globalization from '../../../assets/svg/globalization.svg?component';
|
|
13
|
-
|
|
14
|
-
import utogether from '../../../assets/images/utogether.png';
|
|
15
|
-
import { usePermissionStoreHook } from '../../../store/modules/permission';
|
|
16
|
-
|
|
17
|
-
const menuRef = ref();
|
|
18
|
-
const { route, locale, translationCh, translationEn } = useTranslationLang(menuRef);
|
|
19
|
-
const routeStore = usePermissionStoreHook();
|
|
20
|
-
|
|
21
|
-
const sysConfig = storageLocal.getItem(kSYSCONFIG) || {};
|
|
22
|
-
|
|
23
|
-
const logo = ref(sysConfig['logo'] || utogether);
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
|
-
title,
|
|
27
|
-
logout,
|
|
28
|
-
backHome,
|
|
29
|
-
onPanel,
|
|
30
|
-
userInfo,
|
|
31
|
-
avatarsStyle,
|
|
32
|
-
getDropdownItemStyle,
|
|
33
|
-
getDropdownItemClass,
|
|
34
|
-
passwordItems
|
|
35
|
-
} = useNav();
|
|
36
|
-
|
|
37
|
-
const record: IRecord = {};
|
|
38
|
-
|
|
39
|
-
const refScrollbar = ref(null);
|
|
40
|
-
const showModal = ref(false);
|
|
41
|
-
|
|
42
|
-
nextTick(() => {
|
|
43
|
-
menuRef.value?.handleResize();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @description: 重置密码
|
|
48
|
-
*/
|
|
49
|
-
const handleResetPwd = (): void => {
|
|
50
|
-
record.id = userInfo['id'];
|
|
51
|
-
showModal.value = true;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const handleScroll = e => {
|
|
55
|
-
const wheelDelta = e.wheelDelta || -e.deltaY * 40;
|
|
56
|
-
const scrollbar = refScrollbar.value;
|
|
57
|
-
// scrollbar.wrap$获取到包裹容器的element对象
|
|
58
|
-
scrollbar.setScrollLeft(scrollbar.wrapRef.scrollLeft + wheelDelta);
|
|
59
|
-
};
|
|
60
|
-
</script>
|
|
61
|
-
<script lang="ts">
|
|
62
|
-
export default { name: 'LayoutHorizontal' };
|
|
63
|
-
</script>
|
|
64
|
-
<template>
|
|
65
|
-
<div v-spinning="usePermissionStoreHook().wholeMenus.length === 0" class="horizontal-header">
|
|
66
|
-
<div class="flex flex-1 horizontal-header-left" @click="backHome">
|
|
67
|
-
<img :src="logo" class="h-full" />
|
|
68
|
-
<span class="text-xl u-project-text">{{ title }}</span>
|
|
69
|
-
</div>
|
|
70
|
-
<el-scrollbar ref="refScrollbar" class="flex-[3]" @wheel.prevent="handleScroll">
|
|
71
|
-
<template #default>
|
|
72
|
-
<el-menu
|
|
73
|
-
:default-active="route.path"
|
|
74
|
-
:ellipsis="false"
|
|
75
|
-
unique-opened
|
|
76
|
-
router
|
|
77
|
-
popper-class="udp-scrollbar"
|
|
78
|
-
class="horizontal-header-menu"
|
|
79
|
-
mode="horizontal"
|
|
80
|
-
>
|
|
81
|
-
<sidebar-item
|
|
82
|
-
v-for="route in routeStore.wholeMenus"
|
|
83
|
-
:key="route.path"
|
|
84
|
-
:item="route"
|
|
85
|
-
:base-path="route.path"
|
|
86
|
-
/>
|
|
87
|
-
</el-menu>
|
|
88
|
-
</template>
|
|
89
|
-
</el-scrollbar>
|
|
90
|
-
<div class="horizontal-header-right flex-[2]">
|
|
91
|
-
<!-- 业务单元选择 -->
|
|
92
|
-
<OrgSelect v-if="sysConfig['orgTaggle'] === 'Y'" class="udp-horizontal" />
|
|
93
|
-
<!-- 菜单搜索 -->
|
|
94
|
-
<Search />
|
|
95
|
-
<!-- 通知 -->
|
|
96
|
-
<!-- <Notice id="header-notice" /> -->
|
|
97
|
-
<!-- 国际化 -->
|
|
98
|
-
<el-dropdown id="header-translation" class="px-2" trigger="click">
|
|
99
|
-
<globalization class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden" />
|
|
100
|
-
<template #dropdown>
|
|
101
|
-
<el-dropdown-menu class="translation">
|
|
102
|
-
<el-dropdown-item
|
|
103
|
-
:style="getDropdownItemStyle(locale, 'zh')"
|
|
104
|
-
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
|
105
|
-
@click="translationCh"
|
|
106
|
-
>
|
|
107
|
-
<span v-show="locale === 'zh'" class="check-zh">
|
|
108
|
-
<IconifyIconOffline icon="check" />
|
|
109
|
-
</span>
|
|
110
|
-
简体中文
|
|
111
|
-
</el-dropdown-item>
|
|
112
|
-
<el-dropdown-item
|
|
113
|
-
:style="getDropdownItemStyle(locale, 'en')"
|
|
114
|
-
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
|
115
|
-
@click="translationEn"
|
|
116
|
-
>
|
|
117
|
-
<span v-show="locale === 'en'" class="check-en">
|
|
118
|
-
<IconifyIconOffline icon="check" />
|
|
119
|
-
</span>
|
|
120
|
-
English
|
|
121
|
-
</el-dropdown-item>
|
|
122
|
-
</el-dropdown-menu>
|
|
123
|
-
</template>
|
|
124
|
-
</el-dropdown>
|
|
125
|
-
<!-- 退出登录 -->
|
|
126
|
-
<el-dropdown trigger="click">
|
|
127
|
-
<span class="el-dropdown-link navbar-bg-hover">
|
|
128
|
-
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
|
129
|
-
<p class="dark:text-white">{{ userInfo.name }}</p>
|
|
130
|
-
</span>
|
|
131
|
-
<template #dropdown>
|
|
132
|
-
<el-dropdown-menu class="user-dropdown">
|
|
133
|
-
<el-dropdown-item @click="handleResetPwd">
|
|
134
|
-
<IconifyIconOffline icon="edit" />
|
|
135
|
-
{{ $t('message.udp.passwordReset') }}</el-dropdown-item
|
|
136
|
-
>
|
|
137
|
-
<el-divider style="margin: 3px 0 !important" />
|
|
138
|
-
<el-dropdown-item @click="logout">
|
|
139
|
-
<IconifyIconOffline icon="switch-button" />
|
|
140
|
-
{{ $t('message.udp.logout') }}
|
|
141
|
-
</el-dropdown-item>
|
|
142
|
-
</el-dropdown-menu>
|
|
143
|
-
</template>
|
|
144
|
-
</el-dropdown>
|
|
145
|
-
<span class="el-icon-setting navbar-bg-hover" @click="onPanel">
|
|
146
|
-
<IconifyIconOffline icon="ri:settings-5-fill" />
|
|
147
|
-
</span>
|
|
148
|
-
</div>
|
|
149
|
-
<ut-modal-form
|
|
150
|
-
v-if="showModal"
|
|
151
|
-
:record="record"
|
|
152
|
-
:items="passwordItems()"
|
|
153
|
-
:width="360"
|
|
154
|
-
:height="240"
|
|
155
|
-
:title="$t('message.udp.passwordReset')"
|
|
156
|
-
data-status="update"
|
|
157
|
-
url="/user/updatePwd"
|
|
158
|
-
method="put"
|
|
159
|
-
@close="showModal = false"
|
|
160
|
-
/>
|
|
161
|
-
</div>
|
|
162
|
-
</template>
|
|
163
|
-
|
|
164
|
-
<style lang="scss" scoped>
|
|
165
|
-
.translation {
|
|
166
|
-
::v-deep(.el-dropdown-menu__item) {
|
|
167
|
-
padding: 5px 40px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.check-zh {
|
|
171
|
-
position: absolute;
|
|
172
|
-
left: 20px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.check-en {
|
|
176
|
-
position: absolute;
|
|
177
|
-
left: 20px;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.logout {
|
|
182
|
-
max-width: 120px;
|
|
183
|
-
|
|
184
|
-
::v-deep(.el-dropdown-menu__item) {
|
|
185
|
-
display: inline-flex;
|
|
186
|
-
flex-wrap: wrap;
|
|
187
|
-
min-width: 100%;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, nextTick } from 'vue';
|
|
3
|
+
import { storageLocal } from '@utogether/utils';
|
|
4
|
+
import { useNav } from '../../hooks/useNav';
|
|
5
|
+
import OrgSelect from '../lay-select-org/index.vue';
|
|
6
|
+
import Search from '../lay-search/index.vue';
|
|
7
|
+
// import Notice from '../lay-notice/index.vue';
|
|
8
|
+
import SidebarItem from './sidebarItem.vue';
|
|
9
|
+
import avatars from '../../../assets/images/avatars.jpg';
|
|
10
|
+
import { kSYSCONFIG } from '../../../contant';
|
|
11
|
+
import { useTranslationLang } from '../../hooks/useTranslationLang';
|
|
12
|
+
import globalization from '../../../assets/svg/globalization.svg?component';
|
|
13
|
+
|
|
14
|
+
import utogether from '../../../assets/images/utogether.png';
|
|
15
|
+
import { usePermissionStoreHook } from '../../../store/modules/permission';
|
|
16
|
+
|
|
17
|
+
const menuRef = ref();
|
|
18
|
+
const { route, locale, translationCh, translationEn } = useTranslationLang(menuRef);
|
|
19
|
+
const routeStore = usePermissionStoreHook();
|
|
20
|
+
|
|
21
|
+
const sysConfig = storageLocal.getItem(kSYSCONFIG) || {};
|
|
22
|
+
|
|
23
|
+
const logo = ref(sysConfig['logo'] || utogether);
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
title,
|
|
27
|
+
logout,
|
|
28
|
+
backHome,
|
|
29
|
+
onPanel,
|
|
30
|
+
userInfo,
|
|
31
|
+
avatarsStyle,
|
|
32
|
+
getDropdownItemStyle,
|
|
33
|
+
getDropdownItemClass,
|
|
34
|
+
passwordItems
|
|
35
|
+
} = useNav();
|
|
36
|
+
|
|
37
|
+
const record: IRecord = {};
|
|
38
|
+
|
|
39
|
+
const refScrollbar = ref(null);
|
|
40
|
+
const showModal = ref(false);
|
|
41
|
+
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
menuRef.value?.handleResize();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description: 重置密码
|
|
48
|
+
*/
|
|
49
|
+
const handleResetPwd = (): void => {
|
|
50
|
+
record.id = userInfo['id'];
|
|
51
|
+
showModal.value = true;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const handleScroll = e => {
|
|
55
|
+
const wheelDelta = e.wheelDelta || -e.deltaY * 40;
|
|
56
|
+
const scrollbar = refScrollbar.value;
|
|
57
|
+
// scrollbar.wrap$获取到包裹容器的element对象
|
|
58
|
+
scrollbar.setScrollLeft(scrollbar.wrapRef.scrollLeft + wheelDelta);
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
<script lang="ts">
|
|
62
|
+
export default { name: 'LayoutHorizontal' };
|
|
63
|
+
</script>
|
|
64
|
+
<template>
|
|
65
|
+
<div v-spinning="usePermissionStoreHook().wholeMenus.length === 0" class="horizontal-header">
|
|
66
|
+
<div class="flex flex-1 horizontal-header-left" @click="backHome">
|
|
67
|
+
<img :src="logo" class="h-full" />
|
|
68
|
+
<span class="text-xl u-project-text">{{ title }}</span>
|
|
69
|
+
</div>
|
|
70
|
+
<el-scrollbar ref="refScrollbar" class="flex-[3]" @wheel.prevent="handleScroll">
|
|
71
|
+
<template #default>
|
|
72
|
+
<el-menu
|
|
73
|
+
:default-active="route.path"
|
|
74
|
+
:ellipsis="false"
|
|
75
|
+
unique-opened
|
|
76
|
+
router
|
|
77
|
+
popper-class="udp-scrollbar"
|
|
78
|
+
class="horizontal-header-menu"
|
|
79
|
+
mode="horizontal"
|
|
80
|
+
>
|
|
81
|
+
<sidebar-item
|
|
82
|
+
v-for="route in routeStore.wholeMenus"
|
|
83
|
+
:key="route.path"
|
|
84
|
+
:item="route"
|
|
85
|
+
:base-path="route.path"
|
|
86
|
+
/>
|
|
87
|
+
</el-menu>
|
|
88
|
+
</template>
|
|
89
|
+
</el-scrollbar>
|
|
90
|
+
<div class="horizontal-header-right flex-[2]">
|
|
91
|
+
<!-- 业务单元选择 -->
|
|
92
|
+
<OrgSelect v-if="sysConfig['orgTaggle'] === 'Y'" class="udp-horizontal" />
|
|
93
|
+
<!-- 菜单搜索 -->
|
|
94
|
+
<Search />
|
|
95
|
+
<!-- 通知 -->
|
|
96
|
+
<!-- <Notice id="header-notice" /> -->
|
|
97
|
+
<!-- 国际化 -->
|
|
98
|
+
<el-dropdown id="header-translation" class="px-2" trigger="click">
|
|
99
|
+
<globalization class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden" />
|
|
100
|
+
<template #dropdown>
|
|
101
|
+
<el-dropdown-menu class="translation">
|
|
102
|
+
<el-dropdown-item
|
|
103
|
+
:style="getDropdownItemStyle(locale, 'zh')"
|
|
104
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
|
105
|
+
@click="translationCh"
|
|
106
|
+
>
|
|
107
|
+
<span v-show="locale === 'zh'" class="check-zh">
|
|
108
|
+
<IconifyIconOffline icon="check" />
|
|
109
|
+
</span>
|
|
110
|
+
简体中文
|
|
111
|
+
</el-dropdown-item>
|
|
112
|
+
<el-dropdown-item
|
|
113
|
+
:style="getDropdownItemStyle(locale, 'en')"
|
|
114
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
|
115
|
+
@click="translationEn"
|
|
116
|
+
>
|
|
117
|
+
<span v-show="locale === 'en'" class="check-en">
|
|
118
|
+
<IconifyIconOffline icon="check" />
|
|
119
|
+
</span>
|
|
120
|
+
English
|
|
121
|
+
</el-dropdown-item>
|
|
122
|
+
</el-dropdown-menu>
|
|
123
|
+
</template>
|
|
124
|
+
</el-dropdown>
|
|
125
|
+
<!-- 退出登录 -->
|
|
126
|
+
<el-dropdown trigger="click">
|
|
127
|
+
<span class="el-dropdown-link navbar-bg-hover">
|
|
128
|
+
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
|
129
|
+
<p class="dark:text-white">{{ userInfo.name }}</p>
|
|
130
|
+
</span>
|
|
131
|
+
<template #dropdown>
|
|
132
|
+
<el-dropdown-menu class="user-dropdown">
|
|
133
|
+
<el-dropdown-item @click="handleResetPwd">
|
|
134
|
+
<IconifyIconOffline icon="edit" />
|
|
135
|
+
{{ $t('message.udp.passwordReset') }}</el-dropdown-item
|
|
136
|
+
>
|
|
137
|
+
<el-divider style="margin: 3px 0 !important" />
|
|
138
|
+
<el-dropdown-item @click="logout">
|
|
139
|
+
<IconifyIconOffline icon="switch-button" />
|
|
140
|
+
{{ $t('message.udp.logout') }}
|
|
141
|
+
</el-dropdown-item>
|
|
142
|
+
</el-dropdown-menu>
|
|
143
|
+
</template>
|
|
144
|
+
</el-dropdown>
|
|
145
|
+
<span class="el-icon-setting navbar-bg-hover" @click="onPanel">
|
|
146
|
+
<IconifyIconOffline icon="ri:settings-5-fill" />
|
|
147
|
+
</span>
|
|
148
|
+
</div>
|
|
149
|
+
<ut-modal-form
|
|
150
|
+
v-if="showModal"
|
|
151
|
+
:record="record"
|
|
152
|
+
:items="passwordItems()"
|
|
153
|
+
:width="360"
|
|
154
|
+
:height="240"
|
|
155
|
+
:title="$t('message.udp.passwordReset')"
|
|
156
|
+
data-status="update"
|
|
157
|
+
url="/user/updatePwd"
|
|
158
|
+
method="put"
|
|
159
|
+
@close="showModal = false"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<style lang="scss" scoped>
|
|
165
|
+
.translation {
|
|
166
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
167
|
+
padding: 5px 40px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.check-zh {
|
|
171
|
+
position: absolute;
|
|
172
|
+
left: 20px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.check-en {
|
|
176
|
+
position: absolute;
|
|
177
|
+
left: 20px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.logout {
|
|
182
|
+
max-width: 120px;
|
|
183
|
+
|
|
184
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
flex-wrap: wrap;
|
|
187
|
+
min-width: 100%;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</style>
|