@utogether/udp-core 1.0.1-beta.2 → 1.0.1-beta.20
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 +8 -1
- package/dist/{403-BBQoJwTM.js → 403-Bz5EJPLA.js} +1 -1
- package/dist/{404-BbJPSIWM.js → 404-ClOnaj9V.js} +1 -1
- package/dist/{500-BtFL9R4M.js → 500-DCUfhV7Y.js} +1 -1
- package/dist/{AuthorityInfo-DhiwCeLN.js → AuthorityInfo-q6E-js1r.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BM52QDgn.js +100 -0
- package/dist/{Company-CGqmslx-.js → Company-BSShW3Q4.js} +3 -3
- package/dist/{CompanyPanel-hlDsxD-6.js → CompanyPanel-Dl8eOYLk.js} +26 -26
- package/dist/{Department-BZyJtacc.js → Department-CVIxAnUN.js} +3 -3
- package/dist/{DepartmentPanel-D-a_EBFt.js → DepartmentPanel-Sa3IDl4z.js} +25 -25
- package/dist/{DesignPanel-Bl4luWDV.js → DesignPanel-DnRipagE.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js → DesignPanel.vue_vue_type_style_index_0_lang-DGNyp3Vl.js} +28 -30
- package/dist/DictView-uf2K9A1d.js +109 -0
- package/dist/InvOrganization-CG9VCpXl.js +74 -0
- package/dist/Org-W2CBN1B8.js +39 -0
- package/dist/{Preview-pHD84xqI.js → Preview-DPBxdDvW.js} +2 -2
- package/dist/{ReportDefine-DnnCNQWS.js → ReportDefine-Dsx9VM-I.js} +1 -1
- package/dist/{ReportDesign-BnI_Q4pg.js → ReportDesign-DiIGfte0.js} +43 -43
- package/dist/{ReportQuery-Dby2MmtM.js → ReportQuery-9A4Bfs1M.js} +1 -1
- package/dist/{ReportQueryFrom-Blm1N8P1.js → ReportQueryFrom-M5qLoGAa.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-OQ9pUCKP.js} +1 -1
- package/dist/{ReportTemplate-D65RXRY_.js → ReportTemplate-C34FWAuK.js} +28 -28
- package/dist/{Role-eFZoTpXc.js → Role-jG3VTeOF.js} +6 -6
- package/dist/{RoleAssign-D9-Y3UNz.js → RoleAssign-BfHpCequ.js} +9 -9
- package/dist/{RolePanel-DlFw6HSf.js → RolePanel-DW9pNl0L.js} +1 -1
- package/dist/{RolePanel-CoUOc3sX.js → RolePanel-xRN2-rkk.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js → RolePanel.vue_vue_type_script_setup_true_lang-BVEHqEq9.js} +44 -38
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-C0rTy6vZ.js +132 -0
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js → ScrollPanel.vue_vue_type_style_index_0_lang-D65sJYWT.js} +23 -23
- package/dist/{Staff-DFBLCsAd.js → Staff-BqBVEjau.js} +3 -3
- package/dist/{StaffInfo-d2CK0oBA.js → StaffInfo-DXeyyEFL.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js → StaffInfo.vue_vue_type_script_setup_true_lang-Dg0iYgRf.js} +16 -16
- package/dist/{StaffPanel-D6aWLKN3.js → StaffPanel-iE-8VtUm.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js → StaffPanel.vue_vue_type_script_setup_true_lang-BrrvE1xm.js} +2 -2
- package/dist/{SysUser-BdZvYxQH.js → SysUser-DSZyW30i.js} +2 -2
- package/dist/{SysUserPanel-BIVa6LLr.js → SysUserPanel-CbiG6GQF.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-B1Y1fmBe.js +298 -0
- package/dist/{SystemMenu-C-5VKlHK.js → SystemMenu-DreuWY-a.js} +33 -33
- package/dist/{UserInfo-DqXCRZts.js → UserInfo-DXrzKAim.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js → UserInfo.vue_vue_type_style_index_0_lang-C44E20b4.js} +41 -39
- package/dist/{childView-B2lSsqS3.js → childView-VCidWgY6.js} +1 -1
- package/dist/{childView-DRUNqgjI.js → childView-k5IkJOBr.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js → childView.vue_vue_type_style_index_0_lang-C6ftwwvZ.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-oGriyFTv.js → childView.vue_vue_type_style_index_0_lang-DmG82dVB.js} +43 -43
- package/dist/{code-rule-DZC9T6cl.js → code-rule-7WQMabpW.js} +13 -15
- package/dist/core.es.js +18 -10
- package/dist/{cron-task-BJwPeA5F.js → cron-task-D1t56MSu.js} +11 -11
- package/dist/{frameView-C6wkvok-.js → frameView-CWsIFBgU.js} +1 -1
- package/dist/img/l_img.svg +1 -1
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -1
- package/dist/index-DxWAYxai.js +5495 -0
- package/dist/{layoutView-CeJBpZb_.js → layoutView-DLpHSner.js} +1564 -1559
- package/dist/{log-in-e7D5Ss1P.js → log-in-CpGqc33f.js} +5 -4
- package/dist/{log-out--RRncZhN.js → log-out-D1b4VRMZ.js} +30 -24
- package/dist/login-OjDiQmz8.js +249 -0
- package/dist/{login-log-CvVnyGi3.js → login-log-BNRXLeMi.js} +4 -3
- package/dist/{lov-view-DRF-99U4.js → lov-view-D28X6m3k.js} +5 -5
- package/dist/{menuInfo-3Sjvs9nM.js → menuInfo-DwPB6rHz.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js → menuInfo.vue_vue_type_style_index_0_lang-l5DNRfb7.js} +34 -32
- package/dist/{pda-app-B9tn7jdv.js → pda-app-Bdms2PRY.js} +202 -188
- package/dist/{resource-BqnxbQNe.js → resource-y6SHrHoq.js} +18 -18
- package/dist/{su-welcome-VwifUK_O.js → su-welcome-D9G6EuK2.js} +118 -120
- package/dist/sys-config-DFnGHiFc.js +355 -0
- package/dist/udp-core.css +1 -9
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/index.ts +17 -5
- package/package.json +1 -1
- package/src/App.vue +2 -7
- package/src/api/http.ts +1 -4
- package/src/api/index.ts +5 -3
- package/src/api/user.ts +2 -2
- package/src/components/SuCharts/src/UserInfo.vue +3 -3
- package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
- package/src/components/udp/form/form.vue +109 -0
- package/src/components/udp/grid/index.vue +509 -0
- package/src/components/udp/index.ts +4 -4
- package/src/components/udp/utils.ts +405 -40
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +9 -7
- package/src/layout/components/lay-panel/index.vue +3 -3
- package/src/layout/components/lay-search/index.vue +1 -1
- package/src/layout/components/lay-select-org/index.vue +4 -9
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-sidebar/horizontal.vue +4 -5
- package/src/layout/components/lay-sidebar/mixNav.vue +6 -4
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +94 -98
- package/src/layout/components/lay-tag/index.vue +596 -625
- package/src/layout/hooks/useTag.ts +223 -233
- package/src/layout/layoutView.vue +215 -215
- package/src/layout/types.ts +3 -2
- package/src/main.ts +39 -31
- package/src/plugins/i18n/en.ts +26 -13
- package/src/plugins/i18n/zh.ts +35 -16
- package/src/plugins/vxe-table/index.ts +67 -4
- package/src/plugins/vxe-table/render.tsx +945 -817
- package/src/router/index.ts +186 -183
- package/src/router/modules/remaining.ts +1 -26
- 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 -103
- package/src/store/modules/system.ts +1 -3
- package/src/style/button.scss +10 -3
- package/src/style/login.css +1 -1
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +348 -256
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/index.ts +3 -1
- package/src/utils/propTypes.ts +1 -6
- package/src/views/login/login-view.vue +6 -20
- package/src/views/organization/company/CompanyPanel.vue +2 -2
- package/src/views/organization/department/DepartmentPanel.vue +269 -283
- package/src/views/organization/inv-org/InvOrganization.vue +23 -9
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/system/menu/SystemMenu.vue +183 -197
- package/src/views/system/menu/menuInfo.vue +8 -18
- package/src/views/system/role/AuthorityInfo.vue +19 -15
- package/src/views/system/role/Role.vue +1 -5
- package/src/views/system/role/RolePanel.vue +11 -2
- package/src/views/system/role/UserInfo.vue +11 -9
- package/src/views/system/role-assign/RoleAssign.vue +2 -2
- package/src/views/system/role-assign/RolePanel.vue +12 -9
- package/src/views/system/sys/sys-config.vue +66 -21
- package/src/views/system/sysUser/SysUserPanel.vue +44 -43
- package/src/views/uapp/pda/pda-app.vue +48 -16
- package/src/views/udev/coderule/code-rule.vue +120 -121
- package/src/views/udev/dict/DictView.vue +16 -4
- package/src/views/udev/dict/childView.vue +8 -8
- package/src/views/ufile/aggregation/File.vue +5 -5
- package/src/views/ufile/file/water-mark.vue +14 -14
- package/src/views/uhome/components/menu-favorite.vue +314 -331
- package/src/views/uhome/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +19 -12
- package/src/views/upms/interface/log-in.vue +100 -106
- package/src/views/upms/interface/log-out.vue +2 -8
- package/src/views/upms/user/login-log.vue +54 -60
- package/src/views/urpt/design/DesignPanel.vue +16 -35
- package/src/views/urpt/design/Preview.vue +1 -0
- package/src/views/urpt/design/ReportDesign.vue +17 -23
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/types/global.d.ts +4 -9
- package/vite.config.ts +6 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js +0 -102
- package/dist/DictView-B4a7Hs1X.js +0 -95
- package/dist/InvOrganization-q4T3y8dQ.js +0 -260
- package/dist/Org-BTGTrAVz.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js +0 -288
- package/dist/index-DZc3qRTx.js +0 -2650
- package/dist/login-BOxwzwdB.js +0 -252
- package/dist/sys-config-C0-gSBFO.js +0 -277
- package/dist/utogether-Di1byIum.js +0 -182
- package/src/components/udp/form-upload.vue +0 -183
- package/src/components/udp/modal-form.vue +0 -180
- package/src/utils/http/index.ts +0 -297
- package/src/utils/http/types.d.ts +0 -46
- package/src/utils/udp/useRender.ts +0 -420
|
@@ -1,215 +1,215 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import 'animate.css';
|
|
3
|
-
import { ref, h, reactive, computed, onMounted, onBeforeMount, defineComponent } from 'vue';
|
|
4
|
-
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
|
5
|
-
import '../components/ReIcon/src/offlineIcon';
|
|
6
|
-
import { setType } from './types';
|
|
7
|
-
import { useI18n } from 'vue-i18n';
|
|
8
|
-
import { deviceDetection, useDark, useGlobal } from '@utogether/utils';
|
|
9
|
-
import { useResizeObserver } from '@vueuse/core';
|
|
10
|
-
import { useLayout } from './hooks/useLayout';
|
|
11
|
-
import { useAppStoreHook } from '../store/modules/app';
|
|
12
|
-
import { useSettingStoreHook } from '../store/modules/settings';
|
|
13
|
-
import { useDataThemeChange } from './hooks/useDataThemeChange';
|
|
14
|
-
|
|
15
|
-
import navbar from './components/lay-navbar/index.vue';
|
|
16
|
-
import tag from './components/lay-tag/index.vue';
|
|
17
|
-
import appMain from './components/lay-content/index.vue';
|
|
18
|
-
import setting from './components/lay-setting/index.vue';
|
|
19
|
-
import Vertical from './components/lay-sidebar/vertical.vue';
|
|
20
|
-
import Horizontal from './components/lay-sidebar/horizontal.vue';
|
|
21
|
-
import backTop from '../assets/svg/back_top.svg?component';
|
|
22
|
-
|
|
23
|
-
const appWrapperRef = ref();
|
|
24
|
-
const { t } = useI18n();
|
|
25
|
-
const isMobile = deviceDetection();
|
|
26
|
-
const settingHook = useSettingStoreHook();
|
|
27
|
-
const { isDark } = useDark();
|
|
28
|
-
|
|
29
|
-
const { $storage } = useGlobal();
|
|
30
|
-
const { layout } = useLayout();
|
|
31
|
-
|
|
32
|
-
const inIframe = window.self === window.top;
|
|
33
|
-
|
|
34
|
-
const set: setType = reactive({
|
|
35
|
-
sidebar: computed(() => {
|
|
36
|
-
return useAppStoreHook().sidebar;
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
device: computed(() => {
|
|
40
|
-
return useAppStoreHook().device;
|
|
41
|
-
}),
|
|
42
|
-
|
|
43
|
-
fixedHeader: computed(() => {
|
|
44
|
-
return settingHook.fixedHeader;
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
classes: computed(() => {
|
|
48
|
-
return {
|
|
49
|
-
hideSidebar: !set.sidebar.opened,
|
|
50
|
-
openSidebar: set.sidebar.opened,
|
|
51
|
-
withoutAnimation: set.sidebar.withoutAnimation,
|
|
52
|
-
mobile: set.device === 'mobile'
|
|
53
|
-
};
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
hideTabs: computed(() => {
|
|
57
|
-
return $storage?.configure.hideTabs;
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
function setTheme(layoutModel: string) {
|
|
62
|
-
window.document.body.setAttribute('layout', layoutModel);
|
|
63
|
-
$storage.layout = {
|
|
64
|
-
layout: `${layoutModel}`,
|
|
65
|
-
theme: $storage.layout?.theme,
|
|
66
|
-
darkMode: $storage.layout?.darkMode,
|
|
67
|
-
sidebarStatus: $storage.layout?.sidebarStatus,
|
|
68
|
-
epThemeColor: $storage.layout?.epThemeColor,
|
|
69
|
-
overallStyle: $storage.layout?.overallStyle
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function toggle(device: string, bool: boolean) {
|
|
74
|
-
useAppStoreHook().toggleDevice(device);
|
|
75
|
-
useAppStoreHook().toggleSideBar(bool, 'resize');
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// 判断是否可自动关闭菜单栏
|
|
79
|
-
let isAutoCloseSidebar = true;
|
|
80
|
-
|
|
81
|
-
// 监听容器
|
|
82
|
-
useResizeObserver(appWrapperRef, entries => {
|
|
83
|
-
if (isMobile) return;
|
|
84
|
-
const entry = entries[0];
|
|
85
|
-
const { width } = entry.contentRect;
|
|
86
|
-
width <= 670 ? setTheme('vertical') : setTheme(useAppStoreHook().layout);
|
|
87
|
-
/** width app-wrapper类容器宽度
|
|
88
|
-
* 0 < width <= 760 隐藏侧边栏
|
|
89
|
-
* 760 < width <= 990 折叠侧边栏
|
|
90
|
-
* width > 990 展开侧边栏
|
|
91
|
-
*/
|
|
92
|
-
if (width > 0 && width <= 760) {
|
|
93
|
-
toggle('mobile', false);
|
|
94
|
-
isAutoCloseSidebar = true;
|
|
95
|
-
} else if (width > 760 && width <= 990) {
|
|
96
|
-
if (isAutoCloseSidebar) {
|
|
97
|
-
toggle('desktop', false);
|
|
98
|
-
isAutoCloseSidebar = false;
|
|
99
|
-
}
|
|
100
|
-
} else if (width > 990 && !set.sidebar.isClickCollapse) {
|
|
101
|
-
toggle('desktop', true);
|
|
102
|
-
isAutoCloseSidebar = true;
|
|
103
|
-
} else {
|
|
104
|
-
toggle('desktop', false);
|
|
105
|
-
isAutoCloseSidebar = false;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
onMounted(() => {
|
|
110
|
-
if (isMobile) {
|
|
111
|
-
toggle('mobile', false);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
onBeforeMount(() => {
|
|
116
|
-
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const layoutHeader = defineComponent({
|
|
120
|
-
render() {
|
|
121
|
-
return h(
|
|
122
|
-
'div',
|
|
123
|
-
{
|
|
124
|
-
class: { 'fixed-header': set.fixedHeader },
|
|
125
|
-
style: [
|
|
126
|
-
set.hideTabs && layout.value.includes('horizontal')
|
|
127
|
-
? isDark.value
|
|
128
|
-
? 'box-shadow: 0 1px 4px #0d0d0d'
|
|
129
|
-
: 'box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08)'
|
|
130
|
-
: ''
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
default: () => [
|
|
135
|
-
!settingHook.hiddenSideBar &&
|
|
136
|
-
(layout.value.includes('vertical') || layout.value.includes('mix'))
|
|
137
|
-
? h(navbar)
|
|
138
|
-
: null,
|
|
139
|
-
!settingHook.hiddenSideBar && layout.value.includes('horizontal') ? h(Horizontal) : null,
|
|
140
|
-
h(tag)
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
</script>
|
|
147
|
-
|
|
148
|
-
<template>
|
|
149
|
-
<div ref="appWrapperRef" :class="['app-wrapper', set.classes]">
|
|
150
|
-
<div
|
|
151
|
-
v-show="set.device === 'mobile' && set.sidebar.opened && layout.includes('vertical')"
|
|
152
|
-
class="app-mask"
|
|
153
|
-
@click="useAppStoreHook().toggleSideBar()"
|
|
154
|
-
/>
|
|
155
|
-
<Vertical
|
|
156
|
-
v-show="
|
|
157
|
-
inIframe && !settingHook.hiddenSideBar && (layout.includes('vertical') || layout.includes('mix'))
|
|
158
|
-
"
|
|
159
|
-
/>
|
|
160
|
-
<div :class="['main-container', settingHook.hiddenSideBar ? 'main-hidden' : '']">
|
|
161
|
-
<div v-if="set.fixedHeader">
|
|
162
|
-
<layout-header v-if="inIframe" />
|
|
163
|
-
<!-- 主体内容 -->
|
|
164
|
-
<app-main :fixed-header="set.fixedHeader" />
|
|
165
|
-
</div>
|
|
166
|
-
<el-scrollbar v-else>
|
|
167
|
-
<template #default>
|
|
168
|
-
<div class="h-full">
|
|
169
|
-
<el-backtop :title="t('message.udp.backtop')" target=".main-container .el-scrollbar__wrap">
|
|
170
|
-
<backTop />
|
|
171
|
-
</el-backtop>
|
|
172
|
-
<layout-header v-if="inIframe" />
|
|
173
|
-
<!-- 主体内容 -->
|
|
174
|
-
<app-main :fixed-header="set.fixedHeader" />
|
|
175
|
-
</div>
|
|
176
|
-
</template>
|
|
177
|
-
</el-scrollbar>
|
|
178
|
-
</div>
|
|
179
|
-
<!-- 系统设置 -->
|
|
180
|
-
<setting />
|
|
181
|
-
</div>
|
|
182
|
-
</template>
|
|
183
|
-
|
|
184
|
-
<style lang="scss" scoped>
|
|
185
|
-
.app-wrapper {
|
|
186
|
-
position: relative;
|
|
187
|
-
width: 100%;
|
|
188
|
-
height: 100%;
|
|
189
|
-
|
|
190
|
-
&::after {
|
|
191
|
-
clear: both;
|
|
192
|
-
display: table;
|
|
193
|
-
content: '';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&.mobile.openSidebar {
|
|
197
|
-
position: fixed;
|
|
198
|
-
top: 0;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.app-mask {
|
|
203
|
-
position: absolute;
|
|
204
|
-
top: 0;
|
|
205
|
-
z-index: 999;
|
|
206
|
-
width: 100%;
|
|
207
|
-
height: 100%;
|
|
208
|
-
background: #000;
|
|
209
|
-
opacity: 0.3;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.re-screen {
|
|
213
|
-
margin-top: 12px;
|
|
214
|
-
}
|
|
215
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import 'animate.css';
|
|
3
|
+
import { ref, h, reactive, computed, onMounted, onBeforeMount, defineComponent } from 'vue';
|
|
4
|
+
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
|
5
|
+
import '../components/ReIcon/src/offlineIcon';
|
|
6
|
+
import { setType } from './types';
|
|
7
|
+
import { useI18n } from 'vue-i18n';
|
|
8
|
+
import { deviceDetection, useDark, useGlobal } from '@utogether/utils';
|
|
9
|
+
import { useResizeObserver } from '@vueuse/core';
|
|
10
|
+
import { useLayout } from './hooks/useLayout';
|
|
11
|
+
import { useAppStoreHook } from '../store/modules/app';
|
|
12
|
+
import { useSettingStoreHook } from '../store/modules/settings';
|
|
13
|
+
import { useDataThemeChange } from './hooks/useDataThemeChange';
|
|
14
|
+
|
|
15
|
+
import navbar from './components/lay-navbar/index.vue';
|
|
16
|
+
import tag from './components/lay-tag/index.vue';
|
|
17
|
+
import appMain from './components/lay-content/index.vue';
|
|
18
|
+
import setting from './components/lay-setting/index.vue';
|
|
19
|
+
import Vertical from './components/lay-sidebar/vertical.vue';
|
|
20
|
+
import Horizontal from './components/lay-sidebar/horizontal.vue';
|
|
21
|
+
import backTop from '../assets/svg/back_top.svg?component';
|
|
22
|
+
|
|
23
|
+
const appWrapperRef = ref();
|
|
24
|
+
const { t } = useI18n();
|
|
25
|
+
const isMobile = deviceDetection();
|
|
26
|
+
const settingHook = useSettingStoreHook();
|
|
27
|
+
const { isDark } = useDark();
|
|
28
|
+
|
|
29
|
+
const { $storage } = useGlobal();
|
|
30
|
+
const { layout } = useLayout();
|
|
31
|
+
|
|
32
|
+
const inIframe = window.self === window.top;
|
|
33
|
+
|
|
34
|
+
const set: setType = reactive({
|
|
35
|
+
sidebar: computed(() => {
|
|
36
|
+
return useAppStoreHook().sidebar;
|
|
37
|
+
}),
|
|
38
|
+
|
|
39
|
+
device: computed(() => {
|
|
40
|
+
return useAppStoreHook().device;
|
|
41
|
+
}),
|
|
42
|
+
|
|
43
|
+
fixedHeader: computed(() => {
|
|
44
|
+
return settingHook.fixedHeader;
|
|
45
|
+
}),
|
|
46
|
+
|
|
47
|
+
classes: computed(() => {
|
|
48
|
+
return {
|
|
49
|
+
hideSidebar: !set.sidebar.opened,
|
|
50
|
+
openSidebar: set.sidebar.opened,
|
|
51
|
+
withoutAnimation: set.sidebar.withoutAnimation,
|
|
52
|
+
mobile: set.device === 'mobile'
|
|
53
|
+
};
|
|
54
|
+
}),
|
|
55
|
+
|
|
56
|
+
hideTabs: computed(() => {
|
|
57
|
+
return $storage?.configure.hideTabs;
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
function setTheme(layoutModel: string) {
|
|
62
|
+
window.document.body.setAttribute('layout', layoutModel);
|
|
63
|
+
$storage.layout = {
|
|
64
|
+
layout: `${layoutModel}`,
|
|
65
|
+
theme: $storage.layout?.theme,
|
|
66
|
+
darkMode: $storage.layout?.darkMode,
|
|
67
|
+
sidebarStatus: $storage.layout?.sidebarStatus,
|
|
68
|
+
epThemeColor: $storage.layout?.epThemeColor,
|
|
69
|
+
overallStyle: $storage.layout?.overallStyle
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function toggle(device: string, bool: boolean) {
|
|
74
|
+
useAppStoreHook().toggleDevice(device);
|
|
75
|
+
useAppStoreHook().toggleSideBar(bool, 'resize');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 判断是否可自动关闭菜单栏
|
|
79
|
+
let isAutoCloseSidebar = true;
|
|
80
|
+
|
|
81
|
+
// 监听容器
|
|
82
|
+
useResizeObserver(appWrapperRef, entries => {
|
|
83
|
+
if (isMobile) return;
|
|
84
|
+
const entry = entries[0];
|
|
85
|
+
const { width } = entry.contentRect;
|
|
86
|
+
width <= 670 ? setTheme('vertical') : setTheme(useAppStoreHook().layout);
|
|
87
|
+
/** width app-wrapper类容器宽度
|
|
88
|
+
* 0 < width <= 760 隐藏侧边栏
|
|
89
|
+
* 760 < width <= 990 折叠侧边栏
|
|
90
|
+
* width > 990 展开侧边栏
|
|
91
|
+
*/
|
|
92
|
+
if (width > 0 && width <= 760) {
|
|
93
|
+
toggle('mobile', false);
|
|
94
|
+
isAutoCloseSidebar = true;
|
|
95
|
+
} else if (width > 760 && width <= 990) {
|
|
96
|
+
if (isAutoCloseSidebar) {
|
|
97
|
+
toggle('desktop', false);
|
|
98
|
+
isAutoCloseSidebar = false;
|
|
99
|
+
}
|
|
100
|
+
} else if (width > 990 && !set.sidebar.isClickCollapse) {
|
|
101
|
+
toggle('desktop', true);
|
|
102
|
+
isAutoCloseSidebar = true;
|
|
103
|
+
} else {
|
|
104
|
+
toggle('desktop', false);
|
|
105
|
+
isAutoCloseSidebar = false;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
onMounted(() => {
|
|
110
|
+
if (isMobile) {
|
|
111
|
+
toggle('mobile', false);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
onBeforeMount(() => {
|
|
116
|
+
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const layoutHeader = defineComponent({
|
|
120
|
+
render() {
|
|
121
|
+
return h(
|
|
122
|
+
'div',
|
|
123
|
+
{
|
|
124
|
+
class: { 'fixed-header': set.fixedHeader },
|
|
125
|
+
style: [
|
|
126
|
+
set.hideTabs && layout.value.includes('horizontal')
|
|
127
|
+
? isDark.value
|
|
128
|
+
? 'box-shadow: 0 1px 4px #0d0d0d'
|
|
129
|
+
: 'box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08)'
|
|
130
|
+
: ''
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
default: () => [
|
|
135
|
+
!settingHook.hiddenSideBar &&
|
|
136
|
+
(layout.value.includes('vertical') || layout.value.includes('mix'))
|
|
137
|
+
? h(navbar)
|
|
138
|
+
: null,
|
|
139
|
+
!settingHook.hiddenSideBar && layout.value.includes('horizontal') ? h(Horizontal) : null,
|
|
140
|
+
h(tag)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<template>
|
|
149
|
+
<div ref="appWrapperRef" :class="['app-wrapper', set.classes]">
|
|
150
|
+
<div
|
|
151
|
+
v-show="set.device === 'mobile' && set.sidebar.opened && layout.includes('vertical')"
|
|
152
|
+
class="app-mask"
|
|
153
|
+
@click="useAppStoreHook().toggleSideBar()"
|
|
154
|
+
/>
|
|
155
|
+
<Vertical
|
|
156
|
+
v-show="
|
|
157
|
+
inIframe && !settingHook.hiddenSideBar && (layout.includes('vertical') || layout.includes('mix'))
|
|
158
|
+
"
|
|
159
|
+
/>
|
|
160
|
+
<div :class="['main-container', settingHook.hiddenSideBar ? 'main-hidden' : '']">
|
|
161
|
+
<div v-if="set.fixedHeader">
|
|
162
|
+
<layout-header v-if="inIframe" />
|
|
163
|
+
<!-- 主体内容 -->
|
|
164
|
+
<app-main :fixed-header="set.fixedHeader" />
|
|
165
|
+
</div>
|
|
166
|
+
<el-scrollbar v-else>
|
|
167
|
+
<template #default>
|
|
168
|
+
<div class="h-full">
|
|
169
|
+
<el-backtop :title="t('message.udp.backtop')" target=".main-container .el-scrollbar__wrap">
|
|
170
|
+
<backTop />
|
|
171
|
+
</el-backtop>
|
|
172
|
+
<layout-header v-if="inIframe" />
|
|
173
|
+
<!-- 主体内容 -->
|
|
174
|
+
<app-main :fixed-header="set.fixedHeader" />
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
</el-scrollbar>
|
|
178
|
+
</div>
|
|
179
|
+
<!-- 系统设置 -->
|
|
180
|
+
<setting />
|
|
181
|
+
</div>
|
|
182
|
+
</template>
|
|
183
|
+
|
|
184
|
+
<style lang="scss" scoped>
|
|
185
|
+
.app-wrapper {
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 100%;
|
|
189
|
+
|
|
190
|
+
&::after {
|
|
191
|
+
clear: both;
|
|
192
|
+
display: table;
|
|
193
|
+
content: '';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.mobile.openSidebar {
|
|
197
|
+
position: fixed;
|
|
198
|
+
top: 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.app-mask {
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 0;
|
|
205
|
+
z-index: 999;
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: 100%;
|
|
208
|
+
background: #000;
|
|
209
|
+
opacity: 0.3;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.re-screen {
|
|
213
|
+
margin-top: 12px;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
package/src/layout/types.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-17 16:02:30
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-10-19 12:07:59
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@ import type { IconifyIcon } from '@iconify/vue';
|
|
|
11
11
|
export const routerArrays: Array<RouteConfigs> = [
|
|
12
12
|
{
|
|
13
13
|
path: '/welcome',
|
|
14
|
+
name: 'Welcome',
|
|
14
15
|
meta: {
|
|
15
16
|
title: 'message.udp.home',
|
|
16
17
|
icon: 'home-filled'
|
package/src/main.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @Author:
|
|
3
|
-
* @Date:
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2025-07-25 13:38:20
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @
|
|
5
|
+
* @LastEditTime: 2025-10-19 12:15:08
|
|
6
|
+
* @FilePath: \udp-front\packages\udp-core\src\main.ts
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
8
|
*/
|
|
8
9
|
import { createApp, type Directive } from 'vue';
|
|
9
10
|
import App from './App.vue';
|
|
10
|
-
import router from './router';
|
|
11
|
+
// import router from './router';
|
|
11
12
|
import { setViews } from './router';
|
|
12
13
|
import { setupStore } from './store';
|
|
13
14
|
import { setConfig, setSystemEnv } from './config';
|
|
14
|
-
import { useI18n } from '../src/plugins/i18n';
|
|
15
|
+
import { useI18n, transformI18n } from '../src/plugins/i18n';
|
|
15
16
|
import { setTableConfig } from '../src/plugins/vxe-table';
|
|
16
17
|
import { injectResponsiveStorage } from './utils/storage';
|
|
17
18
|
import hasAuthority from './utils/authority';
|
|
18
|
-
import { getServiceApi, getBaseURL, setRouter } from './api';
|
|
19
|
+
import { getServiceApi, getBaseURL, setRouter, setBaseUrl } from './api';
|
|
19
20
|
|
|
20
21
|
import 'nprogress/nprogress.css';
|
|
21
22
|
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
|
|
@@ -25,26 +26,29 @@ import './style/reset.scss';
|
|
|
25
26
|
// 导入公共样式
|
|
26
27
|
import './style/index.scss';
|
|
27
28
|
|
|
28
|
-
import 'viewerjs/dist/viewer.css';
|
|
29
|
+
// import 'viewerjs/dist/viewer.css';
|
|
29
30
|
|
|
30
|
-
import VueViewer from 'v-viewer';
|
|
31
|
+
// import VueViewer from 'v-viewer';
|
|
31
32
|
|
|
32
33
|
// import SuTable from './components/SuTable/SuTable.vue';
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
35
|
+
import {
|
|
36
|
+
// UtButton,
|
|
37
|
+
// utLov2,
|
|
38
|
+
// UGrid,
|
|
39
|
+
// UtDivider,
|
|
40
|
+
// UtModalForm2
|
|
41
|
+
// FormUpload2,
|
|
42
|
+
UtForm2,
|
|
43
|
+
UtGrid2
|
|
44
|
+
// UtContent2,
|
|
45
|
+
// UtStampBadge2
|
|
46
|
+
// UtModalGrid2
|
|
47
|
+
// UtUpload2
|
|
48
|
+
// UtIconSelect,
|
|
49
|
+
// UtCalendar
|
|
50
|
+
// uAttachment
|
|
51
|
+
} from './components/udp';
|
|
48
52
|
|
|
49
53
|
const app = createApp(App);
|
|
50
54
|
|
|
@@ -66,6 +70,7 @@ const setGlobal = app => {
|
|
|
66
70
|
app.config.globalProperties.$hasAuthority = hasAuthority;
|
|
67
71
|
app.config.globalProperties.$serviceApi = getServiceApi();
|
|
68
72
|
app.config.globalProperties.$url = getBaseURL();
|
|
73
|
+
window.$i18n = transformI18n;
|
|
69
74
|
};
|
|
70
75
|
|
|
71
76
|
const setGlobalDirective = app => {
|
|
@@ -74,12 +79,12 @@ const setGlobalDirective = app => {
|
|
|
74
79
|
});
|
|
75
80
|
};
|
|
76
81
|
|
|
77
|
-
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
82
|
+
const init = ({ router, config, lang, views, env, tableConfig }) => {
|
|
83
|
+
setViews(views, router);
|
|
78
84
|
app.use(router);
|
|
79
85
|
setRouter(router);
|
|
80
86
|
setConfig(app, config);
|
|
81
87
|
setSystemEnv(env);
|
|
82
|
-
setViews(views);
|
|
83
88
|
setTableConfig(tableConfig);
|
|
84
89
|
return new Promise(resolve => {
|
|
85
90
|
useI18n(app, lang);
|
|
@@ -87,16 +92,19 @@ const init = ({ config, lang, views, env, tableConfig }) => {
|
|
|
87
92
|
app.component('FontIcon', FontIcon);
|
|
88
93
|
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
94
|
// .component('UtDivider', UtDivider)
|
|
90
|
-
// .component('UtModalForm2', UtModalForm2)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//
|
|
95
|
+
// app.component('UtModalForm2', UtModalForm2);
|
|
96
|
+
app.component('UtGrid2', UtGrid2);
|
|
97
|
+
app.component('UtForm2', UtForm2);
|
|
98
|
+
// app.component('UtModalGrid2', UtModalGrid2);
|
|
94
99
|
// .component('UtIconSelect', UtIconSelect)
|
|
95
|
-
//
|
|
100
|
+
// app.component('FormUpload2', FormUpload2);
|
|
96
101
|
// .component('UtCalendar', UtCalendar)
|
|
102
|
+
// app.component('UtContent2', UtContent2);
|
|
103
|
+
// app.component('UtStampBadge2', UtStampBadge2);
|
|
97
104
|
// .component('UtModalGrid', UtModalGrid);
|
|
98
|
-
app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|
|
105
|
+
// app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|
|
99
106
|
setGlobal(app);
|
|
107
|
+
setBaseUrl(getBaseURL());
|
|
100
108
|
setGlobalDirective(app);
|
|
101
109
|
// 全局组件
|
|
102
110
|
setupStore(app);
|
package/src/plugins/i18n/en.ts
CHANGED
|
@@ -13,7 +13,6 @@ export default {
|
|
|
13
13
|
login: 'Login',
|
|
14
14
|
home: 'Home',
|
|
15
15
|
logout: 'Logout',
|
|
16
|
-
userName: 'User Name',
|
|
17
16
|
password: 'Password',
|
|
18
17
|
passwordReset: 'Password Reset',
|
|
19
18
|
oldPwd: 'Old Password',
|
|
@@ -78,7 +77,30 @@ export default {
|
|
|
78
77
|
lastMonth: 'Last Month',
|
|
79
78
|
threeMonth: 'Three Month',
|
|
80
79
|
halfYear: 'Half Year',
|
|
81
|
-
anniversary: 'Anniversary'
|
|
80
|
+
anniversary: 'Anniversary',
|
|
81
|
+
|
|
82
|
+
newVersion: '检测到新版本',
|
|
83
|
+
updatenow: '立即更新',
|
|
84
|
+
updateLater: '稍后更新',
|
|
85
|
+
appVersion: '版本号',
|
|
86
|
+
buildNo: '构建号',
|
|
87
|
+
versionInfo: '版本信息',
|
|
88
|
+
isForceUpdate: '安装方式',
|
|
89
|
+
downloadUrl: 'APK文件',
|
|
90
|
+
forceUpdate: '强制更新',
|
|
91
|
+
freeUpdate: '自主更新',
|
|
92
|
+
|
|
93
|
+
userName: 'User Name',
|
|
94
|
+
userCode: 'user Code',
|
|
95
|
+
sysType: 'User Type',
|
|
96
|
+
|
|
97
|
+
orgCode: 'Business Unit Code',
|
|
98
|
+
orgName: 'Business Unit Name',
|
|
99
|
+
orgAlias: 'Business Unit Alias',
|
|
100
|
+
orgDesc: 'Business Unit Descript',
|
|
101
|
+
|
|
102
|
+
organizationName: 'Organization Name',
|
|
103
|
+
organizationCode: 'Organization Code'
|
|
82
104
|
},
|
|
83
105
|
btn: {
|
|
84
106
|
add: 'Add',
|
|
@@ -108,6 +130,7 @@ export default {
|
|
|
108
130
|
fetch: 'Fetch',
|
|
109
131
|
edit: 'Edit',
|
|
110
132
|
export: 'Export',
|
|
133
|
+
import: 'Import',
|
|
111
134
|
encode: 'Encode',
|
|
112
135
|
importJSON: 'Import Data',
|
|
113
136
|
look: 'Look',
|
|
@@ -160,6 +183,7 @@ export default {
|
|
|
160
183
|
yAxis: 'yAxis'
|
|
161
184
|
},
|
|
162
185
|
|
|
186
|
+
add: 'Add',
|
|
163
187
|
operate: 'Operate',
|
|
164
188
|
emptyData: 'Empty Data',
|
|
165
189
|
|
|
@@ -241,13 +265,10 @@ export default {
|
|
|
241
265
|
responseContent: 'Response Content',
|
|
242
266
|
stacktrace: 'Stacktrace',
|
|
243
267
|
|
|
244
|
-
userName: 'User Name',
|
|
245
|
-
userCode: 'user Code',
|
|
246
268
|
status: 'Status',
|
|
247
269
|
email: 'Email',
|
|
248
270
|
userPassword: 'Password',
|
|
249
271
|
remarks: 'Remarks',
|
|
250
|
-
sysType: 'User Type',
|
|
251
272
|
userPwd: 'Password',
|
|
252
273
|
unitName: 'Department',
|
|
253
274
|
|
|
@@ -267,14 +288,6 @@ export default {
|
|
|
267
288
|
deptType: 'Department Type',
|
|
268
289
|
deletePartment: 'There are child levels in the department, please delete the child level first',
|
|
269
290
|
|
|
270
|
-
orgCode: 'Business Unit Code',
|
|
271
|
-
orgName: 'Business Unit Name',
|
|
272
|
-
orgAlias: 'Business Unit Alias',
|
|
273
|
-
orgDesc: 'Business Unit Descript',
|
|
274
|
-
|
|
275
|
-
organizationName: 'Organization Name',
|
|
276
|
-
organizationCode: 'Organization Code',
|
|
277
|
-
|
|
278
291
|
lovCode: 'LovCode',
|
|
279
292
|
lovName: 'lovName',
|
|
280
293
|
valueField: 'valueField',
|