@utogether/udp-core 1.0.0 → 1.0.1-beta.10
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 -26
- package/dist/{403-B1R-4vXw.js → 403-Ctxjn4q8.js} +9 -8
- package/dist/{404-fXPl8csw.js → 404-W5yzyiZ9.js} +15 -14
- package/dist/{500-eI5842YB.js → 500-DXuGEOm4.js} +11 -10
- package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-C2tflCt8.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js +100 -0
- package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
- package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
- package/dist/{Company-CYC9Avfz.js → Company-PLez5GoH.js} +3 -3
- package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-CIGaQooL.js} +20 -20
- package/dist/{Department-B4BNSiYx.js → Department-B9wLsXFm.js} +3 -3
- package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-DSM4lTaz.js} +23 -23
- package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-B6a9wW_A.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js} +28 -30
- package/dist/DictView-DhFbQxdJ.js +110 -0
- package/dist/{InvOrganization-MuM2jtsG.js → InvOrganization-D90AbR3b.js} +2 -2
- package/dist/Org-DxBkYabD.js +39 -0
- package/dist/{Preview-CRyiwUIR.js → Preview-BFtRpBxw.js} +1 -1
- package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-BIa2QryC.js} +1 -1
- package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-CnyjI-WD.js} +44 -44
- package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-BiK7yEhV.js} +5 -5
- package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-C2rqdFTm.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js} +6 -5
- package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-DdkLscP3.js} +30 -30
- package/dist/{Role-BwTV2QMH.js → Role-BrsxgK8D.js} +6 -6
- package/dist/{RoleAssign-De1JjOun.js → RoleAssign-DiqwJqDa.js} +8 -8
- package/dist/{RolePanel-pUBXsqCM.js → RolePanel-BDusGyo7.js} +1 -1
- package/dist/{RolePanel-E3RcdByM.js → RolePanel-Dqx5dI3f.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js} +40 -34
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js} +23 -23
- package/dist/{Staff-Czm7A8vI.js → Staff-Cwi9LQiZ.js} +3 -3
- package/dist/StaffInfo-XjVtyaMv.js +4 -0
- package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js} +16 -16
- package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-C-wYcFdv.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js} +46 -49
- package/dist/{SysUser-BGwbttRn.js → SysUser-O4tvr-Ur.js} +2 -2
- package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-B853docZ.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js +294 -0
- package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-CXR6mrXr.js} +52 -50
- package/dist/{UserInfo-BsyAcT2d.js → UserInfo-BkP8pE2a.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js} +38 -36
- package/dist/{childView-CyuLTUqC.js → childView-D0HwbgDT.js} +1 -1
- package/dist/{childView-CF83nhxb.js → childView-TRqUkSDC.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js} +43 -43
- package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js} +1 -1
- package/dist/{code-rule-Bz-gnktN.js → code-rule-BV7PQWhK.js} +13 -14
- package/dist/core.es.js +13 -10
- package/dist/{cron-task-CIifSUdW.js → cron-task-9ZS9bi7K.js} +11 -11
- package/dist/{frameView-_d2mqjjQ.js → frameView-DE83AN50.js} +15 -14
- 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-DVARtten.js +2623 -0
- package/dist/{layoutView-DLKVepB8.js → layoutView-D1U-c4By.js} +730 -724
- package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
- package/dist/{login-LREiDfFU.js → login-sPCEiTGT.js} +107 -113
- package/dist/{lov-view-DDrIVILB.js → lov-view-76NcYTYl.js} +5 -5
- package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-CxjfjFpm.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js} +98 -95
- package/dist/pda-app-BUH16bLj.js +710 -0
- package/dist/redirect-BqegffKC.js +15 -0
- package/dist/{resource-BCwx9fEv.js → resource-CCuHzoA6.js} +18 -18
- package/dist/{su-welcome-189A7N4r.js → su-welcome-mRArONsd.js} +133 -133
- package/dist/{sys-config-BZ3sejow.js → sys-config-Cvt05yF6.js} +21 -21
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-r08LNiIZ.js → utogether-Dm_VBQHR.js} +6 -6
- package/index.ts +40 -36
- package/package.json +4 -2
- package/src/App.vue +65 -70
- package/src/api/index.ts +1 -1
- 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 +482 -0
- package/src/components/udp/form.vue +112 -0
- package/src/components/udp/grid.vue +495 -0
- package/src/components/udp/index.ts +10 -0
- package/src/components/udp/lov.vue +388 -0
- package/src/components/udp/modal-form.vue +189 -0
- package/src/components/udp/modal-grid.vue +288 -0
- package/src/components/udp/upload.vue +423 -0
- package/src/components/udp/utils.ts +447 -0
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +1 -1
- 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-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-tag/index.vue +625 -625
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +25 -14
- package/src/plugins/i18n/en.ts +302 -289
- package/src/plugins/i18n/zh.ts +348 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +956 -397
- package/src/router/index.ts +187 -183
- package/src/router/modules/remaining.ts +58 -83
- 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 +8 -24
- package/src/utils/{http → udp/http}/types.d.ts +8 -5
- package/src/utils/udp/useRender.ts +431 -0
- package/src/views/login/login-view.vue +2 -2
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +1 -1
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/organization/staff/StaffInfo.vue +0 -30
- package/src/views/organization/staff/StaffPanel.vue +4 -3
- package/src/views/system/menu/AuthorityPanel.vue +2 -2
- package/src/views/system/menu/SystemMenu.vue +183 -191
- package/src/views/system/menu/menuInfo.vue +363 -368
- package/src/views/system/role/AuthorityInfo.vue +19 -33
- 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 +1 -1
- 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/components/menu-favorite.vue +1 -1
- package/src/views/uhome/su-welcome.vue +4 -4
- package/src/views/ulogin/login.vue +15 -10
- 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 -2
- package/vite.config.ts +13 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +0 -102
- package/dist/DictView-bIS5-rK-.js +0 -95
- package/dist/Org-kXHSjsgJ.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +0 -126
- package/dist/StaffInfo-DJzvBuxy.js +0 -4
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +0 -289
- package/dist/core.umd.js +0 -173
- package/dist/index-BKIw8tSn.js +0 -9195
- package/dist/pda-app-CRhVGijN.js +0 -2209
- package/dist/redirect-DiaNDu8F.js +0 -15
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/components/ReCountTo/README.md +0 -2
- package/src/components/ReCountTo/index.ts +0 -18
- package/src/components/ReCountTo/src/normal/index.tsx +0 -165
- package/src/components/ReCountTo/src/normal/props.ts +0 -37
- package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
- package/src/components/ReCountTo/src/rebound/props.ts +0 -14
- package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
- package/src/components/ReCropper/index.ts +0 -14
- package/src/components/ReCropper/src/index.tsx +0 -141
- package/src/components/ReFlicker/index.css +0 -39
- package/src/components/ReFlicker/index.ts +0 -50
- package/src/components/ReFlop/index.ts +0 -14
- package/src/components/ReFlop/src/Filpper.tsx +0 -99
- package/src/components/ReFlop/src/filpper.css +0 -184
- package/src/components/ReFlop/src/index.vue +0 -126
- package/src/components/ReFlowChart/index.ts +0 -24
- package/src/components/ReFlowChart/src/Control.vue +0 -139
- package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
- package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +0 -62
- package/src/components/ReSplitPane/index.css +0 -49
- package/src/components/ReSplitPane/index.tsx +0 -119
- package/src/components/ReSplitPane/resizer.css +0 -45
- package/src/components/ReSplitPane/resizer.tsx +0 -30
- package/src/components/SuCommon/card/components/Card.vue +0 -148
- package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
- package/src/components/SuCommon/card/index.vue +0 -142
- package/src/components/SuCommon/icon-select/index.vue +0 -241
- package/src/components/SuCommon/table/index.vue +0 -208
- package/src/components/SuCommon/utils/index.ts +0 -103
- package/src/components/SuCommon/utils/slot.tsx +0 -50
- package/src/views/components/contextmenu/basic.vue +0 -74
- package/src/views/components/contextmenu/context-menu.vue +0 -40
- package/src/views/components/contextmenu/menuDynamic.vue +0 -99
- package/src/views/components/contextmenu/menuGroup.vue +0 -71
- package/src/views/components/count-to/index.vue +0 -43
- package/src/views/components/cropping/index.vue +0 -59
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +0 -82
- package/src/views/components/video/index.vue +0 -57
|
@@ -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,13 +1,21 @@
|
|
|
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
|
+
*/
|
|
1
9
|
/*
|
|
2
10
|
* @Author: wei.li
|
|
3
11
|
* @Date: 2022-10-18 18:13:54
|
|
4
12
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
13
|
+
* @LastEditTime: 2025-07-31 17:17:32
|
|
6
14
|
* @Description: file content
|
|
7
15
|
*/
|
|
8
16
|
import { createApp, type Directive } from 'vue';
|
|
9
17
|
import App from './App.vue';
|
|
10
|
-
import router from './router';
|
|
18
|
+
// import router from './router';
|
|
11
19
|
import { setViews } from './router';
|
|
12
20
|
import { setupStore } from './store';
|
|
13
21
|
import { setConfig, setSystemEnv } from './config';
|
|
@@ -33,17 +41,20 @@ import VueViewer from 'v-viewer';
|
|
|
33
41
|
|
|
34
42
|
// import {
|
|
35
43
|
// UtButton,
|
|
44
|
+
// utLov2,
|
|
36
45
|
// UGrid,
|
|
37
46
|
// UtDivider,
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
47
|
+
// UtModalForm2,
|
|
48
|
+
// FormUpload2,
|
|
49
|
+
// UtForm2
|
|
50
|
+
// UtGrid2
|
|
41
51
|
// UtContent,
|
|
42
|
-
//
|
|
52
|
+
// UtModalGrid2
|
|
53
|
+
// UtUpload2
|
|
43
54
|
// UtIconSelect,
|
|
44
55
|
// UtCalendar
|
|
45
56
|
// uAttachment
|
|
46
|
-
// } from '
|
|
57
|
+
// } from './components/udp';
|
|
47
58
|
|
|
48
59
|
const app = createApp(App);
|
|
49
60
|
|
|
@@ -72,14 +83,13 @@ const setGlobalDirective = app => {
|
|
|
72
83
|
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
|
73
84
|
});
|
|
74
85
|
};
|
|
75
|
-
console.log('ucore--process', process.env);
|
|
76
86
|
|
|
77
|
-
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
87
|
+
const init = ({ router, config, lang, views, env, tableConfig }) => {
|
|
88
|
+
setViews(views, router);
|
|
78
89
|
app.use(router);
|
|
79
90
|
setRouter(router);
|
|
80
91
|
setConfig(app, config);
|
|
81
92
|
setSystemEnv(env);
|
|
82
|
-
setViews(views);
|
|
83
93
|
setTableConfig(tableConfig);
|
|
84
94
|
return new Promise(resolve => {
|
|
85
95
|
useI18n(app, lang);
|
|
@@ -87,11 +97,12 @@ const init = ({ config, lang, views, env, tableConfig }) => {
|
|
|
87
97
|
app.component('FontIcon', FontIcon);
|
|
88
98
|
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
99
|
// .component('UtDivider', UtDivider)
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
100
|
+
// app.component('UtModalForm2', UtModalForm2);
|
|
101
|
+
// app.component('UtGrid2', UtGrid2);
|
|
102
|
+
// app.component('UtForm2', UtForm2);
|
|
103
|
+
// app.component('UtModalGrid2', UtModalGrid2);
|
|
93
104
|
// .component('UtIconSelect', UtIconSelect)
|
|
94
|
-
//
|
|
105
|
+
// app.component('FormUpload2', FormUpload2);
|
|
95
106
|
// .component('UtCalendar', UtCalendar)
|
|
96
107
|
// .component('UtModalGrid', UtModalGrid);
|
|
97
108
|
app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|