@utogether/udp-core 1.0.1-beta.10 → 1.0.1-beta.12
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/dist/{403-Ctxjn4q8.js → 403-D7L5zm05.js} +1 -1
- package/dist/{404-W5yzyiZ9.js → 404-BQKzkK5W.js} +1 -1
- package/dist/{500-DXuGEOm4.js → 500-BM6k8XR5.js} +1 -1
- package/dist/{AuthorityInfo-C2tflCt8.js → AuthorityInfo-Dc-7W4L_.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js → AuthorityInfo.vue_vue_type_style_index_0_lang-CKvlh3lm.js} +1 -1
- package/dist/{Company-PLez5GoH.js → Company-BgwMUr-I.js} +3 -3
- package/dist/{CompanyPanel-CIGaQooL.js → CompanyPanel-CDfVCPKC.js} +1 -1
- package/dist/{Department-B9wLsXFm.js → Department-CFvEB4Ys.js} +3 -3
- package/dist/{DepartmentPanel-DSM4lTaz.js → DepartmentPanel-11Ytcj2u.js} +1 -1
- package/dist/{DesignPanel-B6a9wW_A.js → DesignPanel-CP8z6teZ.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js → DesignPanel.vue_vue_type_style_index_0_lang-Cp-WR8yE.js} +2 -2
- package/dist/{DictView-DhFbQxdJ.js → DictView-13NoDgPW.js} +1 -1
- package/dist/InvOrganization-DOD4QdEX.js +72 -0
- package/dist/{Org-DxBkYabD.js → Org-cezJs-6P.js} +1 -1
- package/dist/{Preview-BFtRpBxw.js → Preview-DzOKwnp8.js} +1 -1
- package/dist/{ReportDefine-BIa2QryC.js → ReportDefine-DWJq2q0f.js} +1 -1
- package/dist/{ReportDesign-CnyjI-WD.js → ReportDesign-f_ed8u_q.js} +2 -2
- package/dist/{ReportQuery-BiK7yEhV.js → ReportQuery-D58gv_yZ.js} +1 -1
- package/dist/{ReportQueryFrom-C2rqdFTm.js → ReportQueryFrom-R0R6EbYv.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CIFpgUAH.js} +1 -1
- package/dist/{ReportTemplate-DdkLscP3.js → ReportTemplate-BTknctTT.js} +1 -1
- package/dist/{Role-BrsxgK8D.js → Role-QTDJ16h8.js} +3 -3
- package/dist/{RoleAssign-DiqwJqDa.js → RoleAssign-7aZ3ufp5.js} +3 -3
- package/dist/{RolePanel-Dqx5dI3f.js → RolePanel-CSe-UoR5.js} +1 -1
- package/dist/{RolePanel-BDusGyo7.js → RolePanel-XXwmaAgy.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js → RolePanel.vue_vue_type_script_setup_true_lang-BsNhkvFo.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js → RolePanel.vue_vue_type_script_setup_true_lang-kConrKpo.js} +3 -3
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js → ScrollPanel.vue_vue_type_style_index_0_lang-DtaqM_iA.js} +1 -1
- package/dist/{Staff-Cwi9LQiZ.js → Staff-BsREgfrQ.js} +3 -3
- package/dist/{StaffInfo-XjVtyaMv.js → StaffInfo-CQtVXfvS.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js → StaffInfo.vue_vue_type_script_setup_true_lang-BRRtcGIH.js} +1 -1
- package/dist/{StaffPanel-C-wYcFdv.js → StaffPanel-cQTAulcP.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js → StaffPanel.vue_vue_type_script_setup_true_lang-BLeXlrI1.js} +2 -2
- package/dist/{SysUser-O4tvr-Ur.js → SysUser-DN5_46io.js} +2 -2
- package/dist/{SysUserPanel-B853docZ.js → SysUserPanel-DTBNR42y.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js → SysUserPanel.vue_vue_type_script_setup_true_lang-CF2pHcPP.js} +1 -1
- package/dist/{SystemMenu-CXR6mrXr.js → SystemMenu-D9TKZwgb.js} +2 -2
- package/dist/{UserInfo-BkP8pE2a.js → UserInfo-DJ5LRTMe.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js → UserInfo.vue_vue_type_style_index_0_lang-CIpPef_S.js} +1 -1
- package/dist/{childView-D0HwbgDT.js → childView-CGZSd19y.js} +1 -1
- package/dist/{childView-TRqUkSDC.js → childView-DrL_Qi-q.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js → childView.vue_vue_type_style_index_0_lang-B8wEeuFX.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js → childView.vue_vue_type_style_index_0_lang-D2AzjPNV.js} +1 -1
- package/dist/{code-rule-BV7PQWhK.js → code-rule-DVEoh1Z4.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-9ZS9bi7K.js → cron-task-BBpccUV_.js} +1 -1
- package/dist/{frameView-DE83AN50.js → frameView-Cw6_EqfJ.js} +1 -1
- package/dist/index-BAkwQh8m.js +4467 -0
- package/dist/{layoutView-D1U-c4By.js → layoutView-CL2Ef3bw.js} +1187 -1183
- package/dist/{login-sPCEiTGT.js → login-BDocwo7t.js} +115 -108
- package/dist/{lov-view-76NcYTYl.js → lov-view-R8nnUEbA.js} +2 -2
- package/dist/{menuInfo-CxjfjFpm.js → menuInfo-B-nGOcSv.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js → menuInfo.vue_vue_type_style_index_0_lang-1VuzxMb0.js} +1 -1
- package/dist/{pda-app-BUH16bLj.js → pda-app-D5wBClj0.js} +1 -1
- package/dist/{resource-CCuHzoA6.js → resource-BXGSsXzw.js} +1 -1
- package/dist/{su-welcome-mRArONsd.js → su-welcome-DISZAkBB.js} +1 -1
- package/dist/sys-config-DuyYdzXL.js +290 -0
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-Dm_VBQHR.js → utogether-C2KGHvut.js} +1 -1
- package/package.json +18 -18
- package/src/api/index.ts +31 -31
- package/src/components/udp/form.vue +2 -2
- package/src/components/udp/modal-form.vue +2 -1
- package/src/components/udp/modal-grid.vue +11 -1
- package/src/layout/components/lay-navbar/index.vue +239 -237
- package/src/layout/components/lay-search/index.vue +1 -1
- package/src/layout/components/lay-select-org/index.vue +64 -69
- package/src/layout/components/lay-sidebar/horizontal.vue +190 -191
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -98
- package/src/layout/hooks/useNav.ts +173 -173
- package/src/main.ts +119 -119
- package/src/plugins/i18n/zh.ts +1 -0
- package/src/router/index.ts +3 -13
- package/src/store/modules/permission.ts +1 -4
- package/src/utils/propTypes.ts +42 -47
- package/src/utils/udp/http/index.ts +283 -281
- package/src/views/login/login-view.vue +300 -314
- package/src/views/organization/inv-org/InvOrganization.vue +68 -53
- package/src/views/system/sys/sys-config.vue +287 -291
- package/src/views/ulogin/login.vue +3 -4
- package/dist/InvOrganization-D90AbR3b.js +0 -66
- package/dist/index-DVARtten.js +0 -2623
- package/dist/sys-config-Cvt05yF6.js +0 -277
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as W, ref as L } from "vue";
|
|
2
2
|
import { useGlobal as g, storageLocal as u, deviceDetection as H, cookies as C, storageSession as M } from "@utogether/utils";
|
|
3
|
-
import { y as P, j as E, s as j, g as h, v as d, z as J, l as K, m as R, n as V, u as S, r as G, o as O, A as x, B as Z } from "./index-
|
|
3
|
+
import { y as P, j as E, s as j, g as h, v as d, z as J, l as K, m as R, n as V, u as S, r as G, o as O, A as x, B as Z } from "./index-BAkwQh8m.js";
|
|
4
4
|
import { useI18n as f } from "vue-i18n";
|
|
5
5
|
import { defineStore as v } from "pinia";
|
|
6
6
|
function I() {
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@utogether/udp-core",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "1.0.1-beta.
|
|
5
|
-
"description": "",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main1": "index.ts",
|
|
8
|
-
"main": "dist/core.es.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"dev": "vite",
|
|
11
|
-
"build": "vite build",
|
|
12
|
-
"preview:build": "pnpm build && vite preview",
|
|
13
|
-
"report": "rimraf dist && vite build"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [],
|
|
16
|
-
"author": "",
|
|
17
|
-
"license": "ISC"
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@utogether/udp-core",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.1-beta.12",
|
|
5
|
+
"description": "",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main1": "index.ts",
|
|
8
|
+
"main": "dist/core.es.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite",
|
|
11
|
+
"build": "vite build",
|
|
12
|
+
"preview:build": "pnpm build && vite preview",
|
|
13
|
+
"report": "rimraf dist && vite build"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC"
|
|
18
|
+
}
|
package/src/api/index.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:24:43
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2024-11-23 10:13:07
|
|
6
|
-
* @Description: API封装
|
|
7
|
-
*/
|
|
8
|
-
import { http } from '@utogether/utils';
|
|
9
|
-
|
|
10
|
-
import { getEnv } from '../config';
|
|
11
|
-
|
|
12
|
-
// 路由相关服务
|
|
13
|
-
export const getServiceApi = () => {
|
|
14
|
-
return {
|
|
15
|
-
post: (url: string, data: object, config?) => http.post(`${getBaseURL()}${url}`, data, config),
|
|
16
|
-
get: (url: string, params: object, config?) => http.get(`${getBaseURL()}${url}`, params, config),
|
|
17
|
-
put: (url: string, params: object) => http.put(`${getBaseURL()}${url}`, params),
|
|
18
|
-
delete: (url: string, params: object) => http.delete(`${getBaseURL()}${url}`, params)
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const setRouter = router => {
|
|
23
|
-
http.setRouter(router);
|
|
24
|
-
// http.setBaseUrl(getBaseURL());
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const origin = window.location.origin + '/gateway';
|
|
28
|
-
|
|
29
|
-
export const getBaseURL = () => {
|
|
30
|
-
return getEnv().VITE_BASE_URL === 'origin' ? origin : getEnv().VITE_BASE_URL;
|
|
31
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:24:43
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2024-11-23 10:13:07
|
|
6
|
+
* @Description: API封装
|
|
7
|
+
*/
|
|
8
|
+
// import { http } from '@utogether/utils';
|
|
9
|
+
import { http } from '../utils/udp/http';
|
|
10
|
+
import { getEnv } from '../config';
|
|
11
|
+
|
|
12
|
+
// 路由相关服务
|
|
13
|
+
export const getServiceApi = () => {
|
|
14
|
+
return {
|
|
15
|
+
post: (url: string, data: object, config?) => http.post(`${getBaseURL()}${url}`, data, config),
|
|
16
|
+
get: (url: string, params: object, config?) => http.get(`${getBaseURL()}${url}`, params, config),
|
|
17
|
+
put: (url: string, params: object) => http.put(`${getBaseURL()}${url}`, params),
|
|
18
|
+
delete: (url: string, params: object) => http.delete(`${getBaseURL()}${url}`, params)
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const setRouter = router => {
|
|
23
|
+
http.setRouter(router);
|
|
24
|
+
// http.setBaseUrl(getBaseURL());
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const origin = window.location.origin + '/gateway';
|
|
28
|
+
|
|
29
|
+
export const getBaseURL = () => {
|
|
30
|
+
return getEnv().VITE_BASE_URL === 'origin' ? origin : getEnv().VITE_BASE_URL;
|
|
31
|
+
};
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
title-bold
|
|
22
22
|
v-bind="$attrs"
|
|
23
23
|
>
|
|
24
|
-
<template #dividerPrefix />
|
|
25
24
|
<template #collapseNode>
|
|
26
25
|
<div class="flex justify-start">
|
|
27
26
|
<vxe-checkbox
|
|
@@ -48,6 +47,7 @@ import { useI18n } from 'vue-i18n';
|
|
|
48
47
|
import { ref, computed } from 'vue';
|
|
49
48
|
// import { formatRules } from '@utogether/utils';
|
|
50
49
|
import { formatItems, formatRules } from './utils';
|
|
50
|
+
import { clone } from 'xe-utils';
|
|
51
51
|
// import type { IRecord, IFormItemProps } from '../../types';
|
|
52
52
|
|
|
53
53
|
export interface IProps {
|
|
@@ -84,7 +84,7 @@ const rules = computed(() => {
|
|
|
84
84
|
|
|
85
85
|
const formItems = computed(() => {
|
|
86
86
|
if (!props.items.length) return props.items;
|
|
87
|
-
return formatItems(props.items, 'edit', 6);
|
|
87
|
+
return formatItems(clone(props.items, true), 'edit', 6);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
const onChange = () => {
|
|
@@ -60,6 +60,7 @@ import { useI18n } from 'vue-i18n';
|
|
|
60
60
|
import { getAttrs } from './utils';
|
|
61
61
|
import to from 'await-to-js';
|
|
62
62
|
import { formatRules, successMessage, formatItems } from '@utogether/utils';
|
|
63
|
+
import { clone } from 'xe-utils';
|
|
63
64
|
|
|
64
65
|
// import type { IRecord, IFormItemProps } from '../../types';
|
|
65
66
|
|
|
@@ -110,7 +111,7 @@ const rules = computed(() => {
|
|
|
110
111
|
|
|
111
112
|
const formItems = computed(() => {
|
|
112
113
|
if (!props.items.length) return props.items;
|
|
113
|
-
return formatItems(props.items, props.dataStatus);
|
|
114
|
+
return formatItems(clone(props.items, true), props.dataStatus);
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
const { t } = useI18n();
|
|
@@ -154,7 +154,13 @@ const data = reactive<VxeGridProps>({
|
|
|
154
154
|
queryAll: ({ form }) => queryAll(props, serviceApi, form),
|
|
155
155
|
query: ({ page, form }) => query(props, form, page, serviceApi, $mode),
|
|
156
156
|
delete: ({ body: { removeRecords } }) => del(serviceApi, removeRecords, props),
|
|
157
|
-
save: ({ body }) => Promise.all(save(serviceApi, body, props))
|
|
157
|
+
save: ({ body }) => Promise.all(save(serviceApi, body, props)),
|
|
158
|
+
querySuccess: response => callback('querySuccess', response),
|
|
159
|
+
queryError: response => callback('queryError', response),
|
|
160
|
+
deleteSuccess: response => callback('deleteSuccess', response),
|
|
161
|
+
deleteError: response => callback('deleteError', response),
|
|
162
|
+
saveSuccess: response => callback('saveSuccess', response),
|
|
163
|
+
saveError: response => callback('saveError', response)
|
|
158
164
|
}
|
|
159
165
|
},
|
|
160
166
|
checkboxConfig: {
|
|
@@ -164,6 +170,10 @@ const data = reactive<VxeGridProps>({
|
|
|
164
170
|
columns: getColumns()
|
|
165
171
|
});
|
|
166
172
|
|
|
173
|
+
const callback = (cb, response) => {
|
|
174
|
+
attrs?.callback && attrs?.callback[cb] && attrs?.callback[cb](response);
|
|
175
|
+
};
|
|
176
|
+
|
|
167
177
|
// 确认数据
|
|
168
178
|
const onConfirm = async () => {
|
|
169
179
|
let records = null;
|
|
@@ -1,237 +1,239 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:02:30
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div class="system-navbar bg-white shadow-sm shadow-[rgba(0, 21, 41, 0.08)] dark:shadow-[#0d0d0d]">
|
|
10
|
-
<Hamburger
|
|
11
|
-
v-if="layout !== 'mix'"
|
|
12
|
-
:is-active="appHook.sidebar.opened"
|
|
13
|
-
class="hamburger-container"
|
|
14
|
-
@toggleClick="toggleSideBar"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<Breadcrumb v-if="layout !== 'mix'" class="breadcrumb-container" />
|
|
18
|
-
|
|
19
|
-
<mixNav v-if="layout === 'mix'" />
|
|
20
|
-
|
|
21
|
-
<div v-if="layout === 'vertical'" class="vertical-header-right">
|
|
22
|
-
<!-- 业务单元选择 -->
|
|
23
|
-
<OrgSelect />
|
|
24
|
-
<!-- 菜单搜索 -->
|
|
25
|
-
<Search />
|
|
26
|
-
<!-- 通知 -->
|
|
27
|
-
<!-- <Notice id="header-notice" /> -->
|
|
28
|
-
<!-- 国际化 -->
|
|
29
|
-
<el-dropdown id="header-translation" trigge·r="click">
|
|
30
|
-
<globalization
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
:
|
|
85
|
-
:
|
|
86
|
-
|
|
87
|
-
:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
import
|
|
101
|
-
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
|
|
105
|
-
import
|
|
106
|
-
import
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
import
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
-webkit-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:02:30
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-08-29 08:57:37
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="system-navbar bg-white shadow-sm shadow-[rgba(0, 21, 41, 0.08)] dark:shadow-[#0d0d0d]">
|
|
10
|
+
<Hamburger
|
|
11
|
+
v-if="layout !== 'mix'"
|
|
12
|
+
:is-active="appHook.sidebar.opened"
|
|
13
|
+
class="hamburger-container"
|
|
14
|
+
@toggleClick="toggleSideBar"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<Breadcrumb v-if="layout !== 'mix'" class="breadcrumb-container" />
|
|
18
|
+
|
|
19
|
+
<mixNav v-if="layout === 'mix'" />
|
|
20
|
+
|
|
21
|
+
<div v-if="layout === 'vertical'" class="vertical-header-right">
|
|
22
|
+
<!-- 业务单元选择 -->
|
|
23
|
+
<OrgSelect v-if="sysConfig['orgTaggle'] === 'Y'" />
|
|
24
|
+
<!-- 菜单搜索 -->
|
|
25
|
+
<Search />
|
|
26
|
+
<!-- 通知 -->
|
|
27
|
+
<!-- <Notice id="header-notice" /> -->
|
|
28
|
+
<!-- 国际化 -->
|
|
29
|
+
<el-dropdown id="header-translation" trigge·r="click">
|
|
30
|
+
<globalization class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden" />
|
|
31
|
+
<template #dropdown>
|
|
32
|
+
<el-dropdown-menu class="translation">
|
|
33
|
+
<el-dropdown-item
|
|
34
|
+
:style="getDropdownItemStyle(locale, 'zh')"
|
|
35
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
|
36
|
+
@click="translationCh"
|
|
37
|
+
>
|
|
38
|
+
<IconifyIconOffline v-show="locale === 'zh'" class="check-zh" icon="ri:check-line" />
|
|
39
|
+
简体中文
|
|
40
|
+
</el-dropdown-item>
|
|
41
|
+
<el-dropdown-item
|
|
42
|
+
:style="getDropdownItemStyle(locale, 'en')"
|
|
43
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
|
44
|
+
@click="translationEn"
|
|
45
|
+
>
|
|
46
|
+
<span v-show="locale === 'en'" class="check-en">
|
|
47
|
+
<IconifyIconOffline icon="ri:check-line" />
|
|
48
|
+
</span>
|
|
49
|
+
English
|
|
50
|
+
</el-dropdown-item>
|
|
51
|
+
</el-dropdown-menu>
|
|
52
|
+
</template>
|
|
53
|
+
</el-dropdown>
|
|
54
|
+
<!-- 退出登陆 -->
|
|
55
|
+
<el-dropdown trigger="click">
|
|
56
|
+
<span class="select-none el-dropdown-link navbar-bg-hover">
|
|
57
|
+
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
|
|
58
|
+
<p class="dark:text-white user-name">
|
|
59
|
+
{{ userInfo?.name }}
|
|
60
|
+
</p>
|
|
61
|
+
</span>
|
|
62
|
+
<template #dropdown>
|
|
63
|
+
<el-dropdown-menu class="user-dropdown">
|
|
64
|
+
<el-dropdown-item @click="handleResetPwd">
|
|
65
|
+
<IconifyIconOffline icon="ri:edit-2-fill" />
|
|
66
|
+
{{ $t('message.udp.passwordReset') }}</el-dropdown-item
|
|
67
|
+
>
|
|
68
|
+
<el-divider style="margin: 3px 0 !important" />
|
|
69
|
+
<el-dropdown-item @click="logout">
|
|
70
|
+
<IconifyIconOffline icon="switch-button" />
|
|
71
|
+
{{ $t('message.udp.logout') }}
|
|
72
|
+
</el-dropdown-item>
|
|
73
|
+
</el-dropdown-menu>
|
|
74
|
+
</template>
|
|
75
|
+
</el-dropdown>
|
|
76
|
+
<span class="el-icon-setting navbar-bg-hover" @click="onPanel">
|
|
77
|
+
<IconifyIconOffline icon="ri:settings-5-fill" />
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
80
|
+
<ut-modal-form
|
|
81
|
+
v-if="showModal"
|
|
82
|
+
:record="record"
|
|
83
|
+
:items="passwordItems()"
|
|
84
|
+
:width="360"
|
|
85
|
+
:height="240"
|
|
86
|
+
data-status="update"
|
|
87
|
+
:title="$t('message.udp.passwordReset')"
|
|
88
|
+
url="/uums/user/updatePwd"
|
|
89
|
+
method="put"
|
|
90
|
+
@close="showModal = false"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
<script lang="ts">
|
|
95
|
+
export default { name: 'NavBar' };
|
|
96
|
+
</script>
|
|
97
|
+
<script setup lang="ts">
|
|
98
|
+
import { ref } from 'vue';
|
|
99
|
+
import { storageLocal } from '@utogether/utils';
|
|
100
|
+
import Hamburger from '../lay-sidebar/hamBurger.vue';
|
|
101
|
+
import Breadcrumb from '../lay-sidebar/breadCrumb.vue';
|
|
102
|
+
// import Notice from './lay-notice/index.vue';
|
|
103
|
+
import { useNav } from '../../hooks/useNav';
|
|
104
|
+
import Search from '../lay-search/index.vue';
|
|
105
|
+
import mixNav from '../lay-sidebar/mixNav.vue';
|
|
106
|
+
import OrgSelect from '../lay-select-org/index.vue';
|
|
107
|
+
import { useTranslationLang } from '../../hooks/useTranslationLang';
|
|
108
|
+
import globalization from '../../../assets/svg/globalization.svg?component';
|
|
109
|
+
import avatars from '../../../assets/images/avatars.jpg';
|
|
110
|
+
import { kSYSCONFIG } from '../../../contant';
|
|
111
|
+
|
|
112
|
+
// const router = useRouter();
|
|
113
|
+
// const route = useRoute();
|
|
114
|
+
const showModal = ref(false);
|
|
115
|
+
|
|
116
|
+
const {
|
|
117
|
+
layout,
|
|
118
|
+
logout,
|
|
119
|
+
onPanel,
|
|
120
|
+
toggleSideBar,
|
|
121
|
+
appHook,
|
|
122
|
+
userInfo,
|
|
123
|
+
avatarsStyle,
|
|
124
|
+
setDocumentTitle,
|
|
125
|
+
getDropdownItemStyle,
|
|
126
|
+
getDropdownItemClass,
|
|
127
|
+
passwordItems
|
|
128
|
+
} = useNav();
|
|
129
|
+
|
|
130
|
+
const { locale, translationCh, translationEn } = useTranslationLang();
|
|
131
|
+
|
|
132
|
+
const record: IRecord = {};
|
|
133
|
+
|
|
134
|
+
const sysConfig = storageLocal.getItem(kSYSCONFIG) || {};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @description: 重置密码
|
|
138
|
+
*/
|
|
139
|
+
const handleResetPwd = (): void => {
|
|
140
|
+
record.id = userInfo.value.id;
|
|
141
|
+
showModal.value = true;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
setDocumentTitle();
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style lang="scss" scoped>
|
|
148
|
+
.system-navbar {
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 48px;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
|
|
153
|
+
.hamburger-container {
|
|
154
|
+
float: left;
|
|
155
|
+
height: 100%;
|
|
156
|
+
line-height: 48px;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.vertical-header-right {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: flex-end;
|
|
164
|
+
min-width: 280px;
|
|
165
|
+
height: 48px;
|
|
166
|
+
color: #000000d9;
|
|
167
|
+
|
|
168
|
+
.el-dropdown-link {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: space-around;
|
|
172
|
+
width: 100px;
|
|
173
|
+
height: 48px;
|
|
174
|
+
padding: 10px 6px;
|
|
175
|
+
color: #000000d9;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
|
|
178
|
+
p {
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
font-weight: 600;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
img {
|
|
184
|
+
width: 22px;
|
|
185
|
+
height: 22px;
|
|
186
|
+
border-radius: 50%;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.el-icon-setting {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
width: 38px;
|
|
194
|
+
height: 48px;
|
|
195
|
+
padding: 12px;
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.breadcrumb-container {
|
|
201
|
+
float: left;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* stylelint-disable */
|
|
205
|
+
.user-name {
|
|
206
|
+
-webkit-box-orient: vertical;
|
|
207
|
+
display: -webkit-box;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
-webkit-line-clamp: 2;
|
|
210
|
+
}
|
|
211
|
+
/* stylelint-enable */
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.translation {
|
|
215
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
216
|
+
padding: 5px 40px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.check-zh {
|
|
220
|
+
position: absolute;
|
|
221
|
+
left: 20px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.check-en {
|
|
225
|
+
position: absolute;
|
|
226
|
+
left: 20px;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.logout {
|
|
231
|
+
max-width: 120px;
|
|
232
|
+
|
|
233
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
234
|
+
display: inline-flex;
|
|
235
|
+
flex-wrap: wrap;
|
|
236
|
+
min-width: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|