@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.11
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 -32
- package/dist/{403-Dp617CWX.js → 403-Dsgsr2M-.js} +1 -1
- package/dist/{404-Cz_Axb6Y.js → 404-DmPHEfqM.js} +1 -1
- package/dist/{500-BGCtRNse.js → 500-OYEgHR2a.js} +1 -1
- package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-B1H1txG-.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BUlmQtjQ.js +100 -0
- package/dist/{Company-IV3GTnzY.js → Company-C8ojgx93.js} +3 -3
- package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-Dageer1t.js} +16 -16
- package/dist/{Department-B3W-OxW8.js → Department-Dr94_85I.js} +3 -3
- package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-Bc5r1HpT.js} +1 -1
- package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-CcWt1Myp.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-CKA6nx1l.js} +24 -26
- package/dist/DictView-BHj6wexC.js +110 -0
- package/dist/InvOrganization-DP3Le9g-.js +72 -0
- package/dist/Org-BRGHTwsw.js +39 -0
- package/dist/{Preview-BlDMmpdR.js → Preview-CqMaUD_3.js} +1 -1
- package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-PEQdTCOY.js} +1 -1
- package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CB4bv8ba.js} +43 -43
- package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-B7t4lMK0.js} +1 -1
- package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-VBxUIMRJ.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-HeLA4Qs5.js} +1 -1
- package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DNkv7F5p.js} +28 -28
- package/dist/{Role-_q3lQ8CZ.js → Role-BGfTpZK4.js} +6 -6
- package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DrKFWZzA.js} +8 -8
- package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-3lvRh7aS.js} +1 -1
- package/dist/{RolePanel-BQb1LlhD.js → RolePanel-BRI5QYe4.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-BXKZb7yt.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-Cci_Ysty.js} +44 -38
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-BmId6zzA.js} +21 -21
- package/dist/{Staff-BSf9Ypbk.js → Staff-Dr0dq3fW.js} +3 -3
- package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-_N9g2hPa.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DiTJY2ug.js} +11 -11
- package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-mxJQiW3G.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-GRGn-5t6.js} +2 -2
- package/dist/{SysUser-FAABuNti.js → SysUser-DgA19hZE.js} +2 -2
- package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-Bc85z5_K.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BHDrP1Pk.js +294 -0
- package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-Be-gFIie.js} +26 -26
- package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BCYuwFmr.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-B1lgokO6.js} +39 -37
- package/dist/{childView-C_HmDQNd.js → childView-DhcBr1UA.js} +1 -1
- package/dist/{childView-uUlBcTza.js → childView-Dk4zZoXd.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CVnLnl03.js} +40 -40
- package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-D4GYVhOc.js} +1 -1
- package/dist/{code-rule-AgCVDKFy.js → code-rule-BSwPwuAL.js} +9 -10
- package/dist/core.es.js +14 -11
- package/dist/{cron-task-C6FgQxTi.js → cron-task-T1ztyra7.js} +1 -1
- package/dist/{frameView-BDgISK7N.js → frameView-BDgngiBq.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-BSj2AtVL.js +4468 -0
- package/dist/{layoutView-yb3DV2DQ.js → layoutView-i7dLLBzJ.js} +1181 -1176
- package/dist/{login-RRpljbkm.js → login-K5Ludp8x.js} +105 -113
- package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
- package/dist/{lov-view-C9-rjzZR.js → lov-view-lAexiucu.js} +2 -2
- package/dist/{menuInfo-CzPQyFhp.js → menuInfo-BaN5YZPp.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-yI4QOYxG.js} +100 -97
- package/dist/{pda-app-Dvy3U-b6.js → pda-app-DEtDXFvM.js} +211 -197
- package/dist/{resource-Fy0lFkSV.js → resource-Bztmz7pn.js} +15 -15
- package/dist/{su-welcome-DYvSCUST.js → su-welcome-Bx8nBPi9.js} +109 -110
- package/dist/sys-config-nvrtYGgi.js +290 -0
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-CjmJiHoE.js → utogether-yPnwDAIH.js} +1 -1
- package/index.ts +40 -36
- package/package.json +18 -18
- package/src/App.vue +65 -70
- package/src/api/index.ts +31 -31
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
- package/src/components/udp/count-down.vue +536 -0
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
- package/src/components/udp/form-upload.vue +414 -64
- package/src/components/udp/form.vue +112 -0
- package/src/components/udp/grid.vue +495 -0
- package/src/components/udp/index.ts +10 -4
- package/src/components/udp/lov.vue +388 -0
- package/src/components/udp/modal-form.vue +13 -3
- package/src/components/udp/modal-grid.vue +298 -0
- package/src/components/udp/upload.vue +423 -0
- package/src/components/udp/utils.ts +447 -40
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +239 -237
- 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 -69
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- 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/components/lay-tag/index.vue +625 -625
- package/src/layout/hooks/useNav.ts +173 -173
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +119 -109
- package/src/plugins/i18n/en.ts +302 -289
- package/src/plugins/i18n/zh.ts +349 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +956 -817
- package/src/router/index.ts +177 -183
- package/src/router/modules/remaining.ts +58 -83
- package/src/store/modules/permission.ts +1 -4
- package/src/style/button.scss +85 -78
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +44 -11
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/{http → udp/http}/index.ts +283 -297
- package/src/utils/{http → udp/http}/types.d.ts +8 -5
- package/src/utils/udp/useRender.ts +17 -6
- package/src/views/login/login-view.vue +300 -314
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +68 -54
- 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 +363 -371
- 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 +195 -193
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -136
- package/src/views/system/sys/sys-config.vue +287 -291
- package/src/views/system/sysUser/SysUserPanel.vue +278 -278
- package/src/views/uapp/pda/pda-app.vue +208 -176
- package/src/views/udev/dict/DictView.vue +118 -106
- package/src/views/udev/dict/childView.vue +7 -7
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/src/views/ufile/aggregation/File.vue +5 -5
- package/src/views/ufile/file/water-mark.vue +14 -14
- package/src/views/uhome/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +12 -8
- package/src/views/upms/user/login-log.vue +1 -1
- package/src/views/urpt/design/DesignPanel.vue +507 -526
- package/src/views/urpt/design/ReportDesign.vue +15 -19
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/types/global.d.ts +2 -1
- package/vite.config.ts +6 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
- package/dist/DictView-C-i7e4hZ.js +0 -95
- package/dist/InvOrganization-cfT6riGU.js +0 -260
- package/dist/Org-CA7vTDIF.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
- package/dist/index-DzOzUkf6.js +0 -3388
- package/dist/sys-config-DJ1vNQTy.js +0 -277
|
@@ -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/main.ts
CHANGED
|
@@ -1,109 +1,119 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author:
|
|
3
|
-
* @Date:
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
import '
|
|
21
|
-
|
|
22
|
-
import '
|
|
23
|
-
|
|
24
|
-
import './
|
|
25
|
-
|
|
26
|
-
import './
|
|
27
|
-
|
|
28
|
-
import '
|
|
29
|
-
|
|
30
|
-
import
|
|
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
|
-
app.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
app.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2025-07-25 13:38:20
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-08-21 17:15:41
|
|
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
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
* @Author: wei.li
|
|
11
|
+
* @Date: 2022-10-18 18:13:54
|
|
12
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
13
|
+
* @LastEditTime: 2025-07-31 17:17:32
|
|
14
|
+
* @Description: file content
|
|
15
|
+
*/
|
|
16
|
+
import { createApp, type Directive } from 'vue';
|
|
17
|
+
import App from './App.vue';
|
|
18
|
+
// import router from './router';
|
|
19
|
+
import { setViews } from './router';
|
|
20
|
+
import { setupStore } from './store';
|
|
21
|
+
import { setConfig, setSystemEnv } from './config';
|
|
22
|
+
import { useI18n } from '../src/plugins/i18n';
|
|
23
|
+
import { setTableConfig } from '../src/plugins/vxe-table';
|
|
24
|
+
import { injectResponsiveStorage } from './utils/storage';
|
|
25
|
+
import hasAuthority from './utils/authority';
|
|
26
|
+
import { getServiceApi, getBaseURL, setRouter } from './api';
|
|
27
|
+
|
|
28
|
+
import 'nprogress/nprogress.css';
|
|
29
|
+
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
|
|
30
|
+
import './style/tailwind.css';
|
|
31
|
+
// // 引入重置样式
|
|
32
|
+
import './style/reset.scss';
|
|
33
|
+
// 导入公共样式
|
|
34
|
+
import './style/index.scss';
|
|
35
|
+
|
|
36
|
+
import 'viewerjs/dist/viewer.css';
|
|
37
|
+
|
|
38
|
+
import VueViewer from 'v-viewer';
|
|
39
|
+
|
|
40
|
+
// import SuTable from './components/SuTable/SuTable.vue';
|
|
41
|
+
|
|
42
|
+
// import {
|
|
43
|
+
// UtButton,
|
|
44
|
+
// utLov2,
|
|
45
|
+
// UGrid,
|
|
46
|
+
// UtDivider,
|
|
47
|
+
// UtModalForm2
|
|
48
|
+
// FormUpload2,
|
|
49
|
+
// UtForm2
|
|
50
|
+
// UtGrid2
|
|
51
|
+
// UtContent,
|
|
52
|
+
// UtModalGrid2
|
|
53
|
+
// UtUpload2
|
|
54
|
+
// UtIconSelect,
|
|
55
|
+
// UtCalendar
|
|
56
|
+
// uAttachment
|
|
57
|
+
// } from './components/udp';
|
|
58
|
+
|
|
59
|
+
const app = createApp(App);
|
|
60
|
+
|
|
61
|
+
// 全局注册`@iconify/vue`图标库
|
|
62
|
+
import { IconifyIconOffline, FontIcon } from './components/ReIcon';
|
|
63
|
+
// 全局注册`vue-tippy`
|
|
64
|
+
import 'tippy.js/dist/tippy.css';
|
|
65
|
+
import 'tippy.js/animations/perspective.css';
|
|
66
|
+
import VueTippy from 'vue-tippy';
|
|
67
|
+
|
|
68
|
+
app.use(VueTippy, {
|
|
69
|
+
defaultProps: { animation: 'perspective' }
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// 自定义指令
|
|
73
|
+
import * as directives from './directives';
|
|
74
|
+
|
|
75
|
+
const setGlobal = app => {
|
|
76
|
+
app.config.globalProperties.$hasAuthority = hasAuthority;
|
|
77
|
+
app.config.globalProperties.$serviceApi = getServiceApi();
|
|
78
|
+
app.config.globalProperties.$url = getBaseURL();
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const setGlobalDirective = app => {
|
|
82
|
+
Object.keys(directives).forEach(key => {
|
|
83
|
+
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const init = ({ router, config, lang, views, env, tableConfig }) => {
|
|
88
|
+
setViews(views, router);
|
|
89
|
+
app.use(router);
|
|
90
|
+
setRouter(router);
|
|
91
|
+
setConfig(app, config);
|
|
92
|
+
setSystemEnv(env);
|
|
93
|
+
setTableConfig(tableConfig);
|
|
94
|
+
return new Promise(resolve => {
|
|
95
|
+
useI18n(app, lang);
|
|
96
|
+
app.component('IconifyIconOffline', IconifyIconOffline);
|
|
97
|
+
app.component('FontIcon', FontIcon);
|
|
98
|
+
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
99
|
+
// .component('UtDivider', UtDivider)
|
|
100
|
+
// app.component('UtModalForm2', UtModalForm2);
|
|
101
|
+
// app.component('UtGrid2', UtGrid2);
|
|
102
|
+
// app.component('UtForm2', UtForm2);
|
|
103
|
+
// app.component('UtModalGrid2', UtModalGrid2);
|
|
104
|
+
// .component('UtIconSelect', UtIconSelect)
|
|
105
|
+
// app.component('FormUpload2', FormUpload2);
|
|
106
|
+
// .component('UtCalendar', UtCalendar)
|
|
107
|
+
// .component('UtModalGrid', UtModalGrid);
|
|
108
|
+
app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|
|
109
|
+
setGlobal(app);
|
|
110
|
+
setGlobalDirective(app);
|
|
111
|
+
// 全局组件
|
|
112
|
+
setupStore(app);
|
|
113
|
+
injectResponsiveStorage(app, config);
|
|
114
|
+
const result = { app, router };
|
|
115
|
+
resolve(result);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export default init;
|