@utogether/udp-core 1.0.0
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/index.ts +90 -0
- package/build/plugins.ts +26 -0
- package/dist/403-B1R-4vXw.js +64 -0
- package/dist/404-fXPl8csw.js +64 -0
- package/dist/500-eI5842YB.js +66 -0
- package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
- package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
- package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
- package/dist/Company-CYC9Avfz.js +25 -0
- package/dist/CompanyPanel-B4MzoqN_.js +206 -0
- package/dist/DataSet-DT-rGICv.js +147 -0
- package/dist/Department-B4BNSiYx.js +25 -0
- package/dist/DepartmentPanel-zJO89L2O.js +224 -0
- package/dist/DesignPanel-S8P0J97f.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
- package/dist/DictView-bIS5-rK-.js +95 -0
- package/dist/InvOrganization-MuM2jtsG.js +66 -0
- package/dist/Org-kXHSjsgJ.js +35 -0
- package/dist/Preview-CRyiwUIR.js +48 -0
- package/dist/ReportDefine-WZYIx8Sm.js +10 -0
- package/dist/ReportDesign-D-7GKgpb.js +165 -0
- package/dist/ReportQuery-BIIJny6w.js +75 -0
- package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
- package/dist/ReportTemplate-Cfeq9US-.js +161 -0
- package/dist/Role-BwTV2QMH.js +25 -0
- package/dist/RoleAssign-De1JjOun.js +26 -0
- package/dist/RolePanel-E3RcdByM.js +4 -0
- package/dist/RolePanel-pUBXsqCM.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
- package/dist/Staff-Czm7A8vI.js +25 -0
- package/dist/StaffInfo-DJzvBuxy.js +4 -0
- package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
- package/dist/StaffPanel-CHk60LEz.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
- package/dist/SysUser-BGwbttRn.js +15 -0
- package/dist/SysUserPanel-BCbKoLKt.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
- package/dist/SystemMenu-BkqZSDKl.js +151 -0
- package/dist/UserInfo-BsyAcT2d.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
- package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
- package/dist/childView-CF83nhxb.js +4 -0
- package/dist/childView-CyuLTUqC.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
- package/dist/code-rule-Bz-gnktN.js +147 -0
- package/dist/core.es.js +13 -0
- package/dist/core.umd.js +173 -0
- package/dist/cron-task-CIifSUdW.js +135 -0
- package/dist/frameView-_d2mqjjQ.js +43 -0
- package/dist/img/l_img.svg +1 -0
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -0
- package/dist/index-BKIw8tSn.js +9195 -0
- package/dist/layoutView-DLKVepB8.js +3317 -0
- package/dist/log-in-e7D5Ss1P.js +110 -0
- package/dist/log-out--RRncZhN.js +120 -0
- package/dist/login-LREiDfFU.js +251 -0
- package/dist/login-log-CvVnyGi3.js +68 -0
- package/dist/lov-view-DDrIVILB.js +97 -0
- package/dist/menuInfo-B1FUV-Sk.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
- package/dist/pda-app-CRhVGijN.js +2209 -0
- package/dist/redirect-DiaNDu8F.js +15 -0
- package/dist/resource-BCwx9fEv.js +97 -0
- package/dist/su-welcome-189A7N4r.js +526 -0
- package/dist/sys-config-BZ3sejow.js +277 -0
- package/dist/udp-core.css +9 -0
- package/dist/utogether-r08LNiIZ.js +182 -0
- package/index.ts +36 -0
- package/package.json +16 -0
- package/public/img/l_img.svg +1 -0
- package/public/img/minicolors.png +0 -0
- package/public/img/v_img.svg +1 -0
- package/src/App.vue +70 -0
- package/src/api/http.ts +50 -0
- package/src/api/index.ts +31 -0
- package/src/api/mock.ts +20 -0
- package/src/api/user.ts +43 -0
- package/src/assets/images/avatars.jpg +0 -0
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/login.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/mask-text.jpg +0 -0
- package/src/assets/images/minicolors.png +0 -0
- package/src/assets/images/utogether.png +0 -0
- package/src/assets/images/welcome.png +0 -0
- package/src/assets/status/403.svg +1 -0
- package/src/assets/status/404.svg +1 -0
- package/src/assets/status/500.svg +1 -0
- package/src/assets/svg/back_top.svg +1 -0
- package/src/assets/svg/bg.svg +1 -0
- package/src/assets/svg/close.svg +1 -0
- package/src/assets/svg/close_all.svg +1 -0
- package/src/assets/svg/close_left.svg +1 -0
- package/src/assets/svg/close_other.svg +1 -0
- package/src/assets/svg/close_right.svg +1 -0
- package/src/assets/svg/dark.svg +1 -0
- package/src/assets/svg/day.svg +1 -0
- package/src/assets/svg/enter_outlined.svg +1 -0
- package/src/assets/svg/exit_screen.svg +1 -0
- package/src/assets/svg/full_screen.svg +1 -0
- package/src/assets/svg/globalization.svg +1 -0
- package/src/assets/svg/loading.svg +17 -0
- package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
- package/src/assets/svg/refresh.svg +1 -0
- package/src/assets/svg/system.svg +1 -0
- package/src/components/ReCountTo/README.md +2 -0
- package/src/components/ReCountTo/index.ts +18 -0
- package/src/components/ReCountTo/src/normal/index.tsx +165 -0
- package/src/components/ReCountTo/src/normal/props.ts +37 -0
- package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
- package/src/components/ReCountTo/src/rebound/props.ts +14 -0
- package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
- package/src/components/ReCropper/index.ts +14 -0
- package/src/components/ReCropper/src/index.tsx +141 -0
- package/src/components/ReFlicker/index.css +39 -0
- package/src/components/ReFlicker/index.ts +50 -0
- package/src/components/ReFlop/index.ts +14 -0
- package/src/components/ReFlop/src/Filpper.tsx +99 -0
- package/src/components/ReFlop/src/filpper.css +184 -0
- package/src/components/ReFlop/src/index.vue +126 -0
- package/src/components/ReFlowChart/index.ts +24 -0
- package/src/components/ReFlowChart/src/Control.vue +139 -0
- package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
- package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
- 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 +62 -0
- package/src/components/ReIcon/index.ts +12 -0
- package/src/components/ReIcon/src/Icon.vue +81 -0
- package/src/components/ReIcon/src/hooks.ts +63 -0
- package/src/components/ReIcon/src/iconfont.ts +45 -0
- package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
- package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
- package/src/components/ReIcon/src/offlineIcon.ts +64 -0
- package/src/components/ReIcon/src/types.ts +20 -0
- package/src/components/ReSplitPane/index.css +49 -0
- package/src/components/ReSplitPane/index.tsx +119 -0
- package/src/components/ReSplitPane/resizer.css +45 -0
- package/src/components/ReSplitPane/resizer.tsx +30 -0
- package/src/components/SuCharts/index.ts +36 -0
- package/src/components/SuCharts/src/EchartBar.vue +134 -0
- package/src/components/SuCharts/src/UserInfo.vue +78 -0
- package/src/components/SuCharts/src/echart-line.vue +85 -0
- package/src/components/SuCharts/src/echart-pie.vue +95 -0
- package/src/components/SuCommon/card/components/Card.vue +148 -0
- package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
- package/src/components/SuCommon/card/index.vue +142 -0
- package/src/components/SuCommon/icon-select/index.vue +241 -0
- package/src/components/SuCommon/table/index.vue +208 -0
- package/src/components/SuCommon/utils/index.ts +103 -0
- package/src/components/SuCommon/utils/slot.tsx +50 -0
- package/src/components/SuFloatButton/index.vue +159 -0
- package/src/components/SuQrcode/index.ts +14 -0
- package/src/components/SuQrcode/src/index.scss +9 -0
- package/src/components/SuQrcode/src/index.tsx +236 -0
- package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
- package/src/components/SuTable/SuTable.vue +334 -0
- package/src/components/SuTypeit/index.ts +51 -0
- package/src/config/index.ts +35 -0
- package/src/contant/index.ts +20 -0
- package/src/directives/elResizeDetector/index.ts +33 -0
- package/src/directives/index.ts +11 -0
- package/src/directives/permission/index.ts +29 -0
- package/src/layout/components/lay-chrome/index.vue +30 -0
- package/src/layout/components/lay-content/index.vue +143 -0
- package/src/layout/components/lay-navbar/index.vue +237 -0
- package/src/layout/components/lay-notice/data.ts +59 -0
- package/src/layout/components/lay-notice/index.vue +83 -0
- package/src/layout/components/lay-notice/noticeItem.vue +160 -0
- package/src/layout/components/lay-notice/noticeList.vue +19 -0
- package/src/layout/components/lay-panel/index.vue +150 -0
- package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
- package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
- package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
- package/src/layout/components/lay-search/components/index.ts +10 -0
- package/src/layout/components/lay-search/index.vue +25 -0
- package/src/layout/components/lay-select-org/index.vue +69 -0
- package/src/layout/components/lay-setting/index.vue +510 -0
- package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
- package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
- package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
- package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
- package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
- package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
- package/src/layout/components/lay-sidebar/vertical.vue +94 -0
- package/src/layout/components/lay-tag/index.scss +375 -0
- package/src/layout/components/lay-tag/index.vue +625 -0
- package/src/layout/frameView.vue +71 -0
- package/src/layout/hooks/useBoolean.ts +33 -0
- package/src/layout/hooks/useDataThemeChange.ts +142 -0
- package/src/layout/hooks/useLayout.ts +65 -0
- package/src/layout/hooks/useNav.ts +173 -0
- package/src/layout/hooks/useTag.ts +233 -0
- package/src/layout/hooks/useTranslationLang.ts +51 -0
- package/src/layout/layoutView.vue +215 -0
- package/src/layout/redirect.vue +30 -0
- package/src/layout/routerView/parent.vue +23 -0
- package/src/layout/types.ts +92 -0
- package/src/main.ts +108 -0
- package/src/plugins/echarts/index.ts +58 -0
- package/src/plugins/echarts/theme.json +394 -0
- package/src/plugins/i18n/en.ts +289 -0
- package/src/plugins/i18n/index.ts +76 -0
- package/src/plugins/i18n/module/u-report.ts +64 -0
- package/src/plugins/i18n/module/u-workflow.ts +71 -0
- package/src/plugins/i18n/module/umsg.ts +28 -0
- package/src/plugins/i18n/zh.ts +337 -0
- package/src/plugins/vxe-table/index.ts +46 -0
- package/src/plugins/vxe-table/render.tsx +397 -0
- package/src/router/createComponent.tsx +25 -0
- package/src/router/index.ts +183 -0
- package/src/router/modules/error.ts +32 -0
- package/src/router/modules/home.ts +32 -0
- package/src/router/modules/nested.ts +93 -0
- package/src/router/modules/remaining.ts +83 -0
- package/src/router/modules/tabs.ts +55 -0
- package/src/router/utils.ts +377 -0
- package/src/store/index.ts +9 -0
- package/src/store/modules/app.ts +69 -0
- package/src/store/modules/epTheme.ts +49 -0
- package/src/store/modules/multiTags.ts +109 -0
- package/src/store/modules/permission.ts +103 -0
- package/src/store/modules/settings.ts +40 -0
- package/src/store/modules/system.ts +180 -0
- package/src/store/modules/types.ts +49 -0
- package/src/style/button.scss +78 -0
- package/src/style/clear-mixin.scss +28 -0
- package/src/style/dark.scss +218 -0
- package/src/style/element-plus.scss +206 -0
- package/src/style/index.scss +76 -0
- package/src/style/login.css +336 -0
- package/src/style/login2.css +106 -0
- package/src/style/print-lock.css +375 -0
- package/src/style/reset.scss +272 -0
- package/src/style/sidebar.scss +770 -0
- package/src/style/suprint.css +985 -0
- package/src/style/tailwind.css +68 -0
- package/src/style/theme.scss +143 -0
- package/src/style/transition.scss +42 -0
- package/src/style/vxetable.scss +256 -0
- package/src/utils/authority/index.ts +29 -0
- package/src/utils/browers.ts +59 -0
- package/src/utils/dataFormat/index.ts +223 -0
- package/src/utils/http/index.ts +297 -0
- package/src/utils/http/types.d.ts +46 -0
- package/src/utils/index.ts +47 -0
- package/src/utils/lifecycle.ts +20 -0
- package/src/utils/mitt.ts +19 -0
- package/src/utils/propTypes.ts +47 -0
- package/src/utils/storage/index.ts +51 -0
- package/src/views/components/contextmenu/basic.vue +74 -0
- package/src/views/components/contextmenu/context-menu.vue +40 -0
- package/src/views/components/contextmenu/menuDynamic.vue +99 -0
- package/src/views/components/contextmenu/menuGroup.vue +71 -0
- package/src/views/components/count-to/index.vue +43 -0
- package/src/views/components/cropping/index.vue +59 -0
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +82 -0
- package/src/views/components/video/index.vue +57 -0
- package/src/views/error/403.vue +50 -0
- package/src/views/error/404.vue +50 -0
- package/src/views/error/500.vue +52 -0
- package/src/views/login/login-view.vue +314 -0
- package/src/views/login/utils/motion.ts +47 -0
- package/src/views/login/utils/rule.ts +70 -0
- package/src/views/login/utils/verifyCode.ts +52 -0
- package/src/views/organization/company/Company.vue +56 -0
- package/src/views/organization/company/CompanyPanel.vue +259 -0
- package/src/views/organization/department/Department.vue +58 -0
- package/src/views/organization/department/DepartmentPanel.vue +283 -0
- package/src/views/organization/inv-org/InvOrganization.vue +53 -0
- package/src/views/organization/org/Org.vue +43 -0
- package/src/views/organization/staff/Staff.vue +58 -0
- package/src/views/organization/staff/StaffInfo.vue +163 -0
- package/src/views/organization/staff/StaffPanel.vue +144 -0
- package/src/views/system/cron/cron-task.vue +157 -0
- package/src/views/system/menu/AuthorityPanel.vue +140 -0
- package/src/views/system/menu/SystemMenu.vue +191 -0
- package/src/views/system/menu/menuInfo.vue +368 -0
- package/src/views/system/role/AuthorityInfo.vue +147 -0
- package/src/views/system/role/Role.vue +57 -0
- package/src/views/system/role/RolePanel.vue +191 -0
- package/src/views/system/role/UserInfo.vue +193 -0
- package/src/views/system/role-assign/RoleAssign.vue +57 -0
- package/src/views/system/role-assign/RolePanel.vue +136 -0
- package/src/views/system/sys/sys-config.vue +291 -0
- package/src/views/system/sysUser/SysUser.vue +45 -0
- package/src/views/system/sysUser/SysUserPanel.vue +278 -0
- package/src/views/uapp/pda/pda-app.vue +176 -0
- package/src/views/udev/coderule/code-rule.vue +121 -0
- package/src/views/udev/dict/DictView.vue +106 -0
- package/src/views/udev/dict/childView.vue +222 -0
- package/src/views/udev/lov/childView.vue +180 -0
- package/src/views/udev/lov/lov-view.vue +91 -0
- package/src/views/ufile/aggregation/File.vue +87 -0
- package/src/views/ufile/file/water-mark.vue +103 -0
- package/src/views/uhome/components/menu-favorite.vue +331 -0
- package/src/views/uhome/su-welcome.vue +339 -0
- package/src/views/ulogin/login.vue +316 -0
- package/src/views/umsg/monitor/msg-monitor.vue +36 -0
- package/src/views/umsg/msg/TemplateContent.vue +103 -0
- package/src/views/umsg/msg/msg-template.vue +66 -0
- package/src/views/umsg/send/childView.vue +142 -0
- package/src/views/umsg/send/msg-send.vue +95 -0
- package/src/views/upms/interface/log-in.vue +106 -0
- package/src/views/upms/interface/log-out.vue +107 -0
- package/src/views/upms/user/login-log.vue +60 -0
- package/src/views/urpt/dataSet/DataSet.vue +139 -0
- package/src/views/urpt/design/DesignPanel.vue +526 -0
- package/src/views/urpt/design/Preview.vue +65 -0
- package/src/views/urpt/design/ReportDesign.vue +249 -0
- package/src/views/urpt/design/bg.png +0 -0
- package/src/views/urpt/design/panel.ts +841 -0
- package/src/views/urpt/design/print-data.ts +59 -0
- package/src/views/urpt/query/ReportQuery.vue +122 -0
- package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
- package/src/views/urpt/report-request/ReportDefine.vue +10 -0
- package/src/views/urpt/static-resource/resource.vue +116 -0
- package/src/views/urpt/template/ReportTemplate.vue +198 -0
- package/tsconfig.json +30 -0
- package/types/env.d.ts +1 -0
- package/types/global-components.d.ts +12 -0
- package/types/global.d.ts +236 -0
- package/types/image.d.ts +7 -0
- package/types/index.d.ts +73 -0
- package/types/router.d.ts +107 -0
- package/types/shims-tsx.d.ts +22 -0
- package/types/shims-vue.d.ts +20 -0
- package/vite.config.ts +73 -0
|
@@ -0,0 +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>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-08-29 17:05:58
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2022-09-15 10:43:01
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default { name: 'Redirect' };
|
|
10
|
+
</script>
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import { unref } from 'vue';
|
|
13
|
+
import { useRouter } from 'vue-router';
|
|
14
|
+
|
|
15
|
+
const { currentRoute, replace } = useRouter();
|
|
16
|
+
|
|
17
|
+
const { params, query } = unref(currentRoute);
|
|
18
|
+
const { path } = params;
|
|
19
|
+
|
|
20
|
+
const _path = Array.isArray(path) ? path.join('/') : path;
|
|
21
|
+
|
|
22
|
+
replace({
|
|
23
|
+
path: '/' + _path,
|
|
24
|
+
query
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div />
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2023-06-19 09:14:18
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2024-04-14 20:30:33
|
|
6
|
+
* @FilePath: /udp-front/packages/udp-core/src/layout/routerView/parent.vue
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<router-view>
|
|
11
|
+
<template #default="{ Component, route }">
|
|
12
|
+
<transition appear name="fade-transform" mode="out-in">
|
|
13
|
+
<component :is="Component" :key="route.fullPath" />
|
|
14
|
+
</transition>
|
|
15
|
+
</template>
|
|
16
|
+
</router-view>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
export default {
|
|
21
|
+
name: 'layoutParentView'
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:02:30
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2024-06-27 13:51:19
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { IconifyIcon } from '@iconify/vue';
|
|
10
|
+
|
|
11
|
+
export const routerArrays: Array<RouteConfigs> = [
|
|
12
|
+
{
|
|
13
|
+
path: '/welcome',
|
|
14
|
+
meta: {
|
|
15
|
+
title: 'message.udp.home',
|
|
16
|
+
icon: 'home-filled'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export type routeMetaType = {
|
|
22
|
+
title?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
showLink?: boolean;
|
|
25
|
+
savedPosition?: boolean;
|
|
26
|
+
authority?: Array<string>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type RouteConfigs = {
|
|
30
|
+
path?: string;
|
|
31
|
+
query?: object;
|
|
32
|
+
params?: object;
|
|
33
|
+
meta?: routeMetaType;
|
|
34
|
+
children?: RouteConfigs[];
|
|
35
|
+
name?: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type multiTagsType = {
|
|
39
|
+
tags: Array<RouteConfigs>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type tagsViewsType = {
|
|
43
|
+
icon: string | IconifyIcon;
|
|
44
|
+
text: string;
|
|
45
|
+
divided: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
show: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export interface setType {
|
|
51
|
+
sidebar: {
|
|
52
|
+
opened: boolean;
|
|
53
|
+
withoutAnimation: boolean;
|
|
54
|
+
isClickCollapse: boolean;
|
|
55
|
+
};
|
|
56
|
+
device: string;
|
|
57
|
+
fixedHeader: boolean;
|
|
58
|
+
classes: {
|
|
59
|
+
hideSidebar: boolean;
|
|
60
|
+
openSidebar: boolean;
|
|
61
|
+
withoutAnimation: boolean;
|
|
62
|
+
mobile: boolean;
|
|
63
|
+
};
|
|
64
|
+
hideTabs: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type childrenType = {
|
|
68
|
+
path?: string;
|
|
69
|
+
noShowingChildren?: boolean;
|
|
70
|
+
children?: childrenType[];
|
|
71
|
+
value: unknown;
|
|
72
|
+
meta?: {
|
|
73
|
+
icon?: string;
|
|
74
|
+
title?: string;
|
|
75
|
+
showParent?: boolean;
|
|
76
|
+
extraIcon?: string;
|
|
77
|
+
};
|
|
78
|
+
showTooltip?: boolean;
|
|
79
|
+
parentId?: number;
|
|
80
|
+
pathList?: number[];
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type themeColorsType = {
|
|
84
|
+
color: string;
|
|
85
|
+
themeColor: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export interface scrollbarDomType extends HTMLElement {
|
|
89
|
+
wrap?: {
|
|
90
|
+
offsetWidth: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-10-18 18:13:54
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-04-29 15:35:32
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { createApp, type Directive } from 'vue';
|
|
9
|
+
import App from './App.vue';
|
|
10
|
+
import router from './router';
|
|
11
|
+
import { setViews } from './router';
|
|
12
|
+
import { setupStore } from './store';
|
|
13
|
+
import { setConfig, setSystemEnv } from './config';
|
|
14
|
+
import { useI18n } from '../src/plugins/i18n';
|
|
15
|
+
import { setTableConfig } from '../src/plugins/vxe-table';
|
|
16
|
+
import { injectResponsiveStorage } from './utils/storage';
|
|
17
|
+
import hasAuthority from './utils/authority';
|
|
18
|
+
import { getServiceApi, getBaseURL, setRouter } from './api';
|
|
19
|
+
|
|
20
|
+
import 'nprogress/nprogress.css';
|
|
21
|
+
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
|
|
22
|
+
import './style/tailwind.css';
|
|
23
|
+
// // 引入重置样式
|
|
24
|
+
import './style/reset.scss';
|
|
25
|
+
// 导入公共样式
|
|
26
|
+
import './style/index.scss';
|
|
27
|
+
|
|
28
|
+
import 'viewerjs/dist/viewer.css';
|
|
29
|
+
|
|
30
|
+
import VueViewer from 'v-viewer';
|
|
31
|
+
|
|
32
|
+
// import SuTable from './components/SuTable/SuTable.vue';
|
|
33
|
+
|
|
34
|
+
// import {
|
|
35
|
+
// UtButton,
|
|
36
|
+
// UGrid,
|
|
37
|
+
// UtDivider,
|
|
38
|
+
// UtModalForm,
|
|
39
|
+
// UtForm,
|
|
40
|
+
// UtModalGrid,
|
|
41
|
+
// UtContent,
|
|
42
|
+
// UtCountdown,
|
|
43
|
+
// UtIconSelect,
|
|
44
|
+
// UtCalendar
|
|
45
|
+
// uAttachment
|
|
46
|
+
// } from './../src/components/udp';
|
|
47
|
+
|
|
48
|
+
const app = createApp(App);
|
|
49
|
+
|
|
50
|
+
// 全局注册`@iconify/vue`图标库
|
|
51
|
+
import { IconifyIconOffline, FontIcon } from './components/ReIcon';
|
|
52
|
+
// 全局注册`vue-tippy`
|
|
53
|
+
import 'tippy.js/dist/tippy.css';
|
|
54
|
+
import 'tippy.js/animations/perspective.css';
|
|
55
|
+
import VueTippy from 'vue-tippy';
|
|
56
|
+
|
|
57
|
+
app.use(VueTippy, {
|
|
58
|
+
defaultProps: { animation: 'perspective' }
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// 自定义指令
|
|
62
|
+
import * as directives from './directives';
|
|
63
|
+
|
|
64
|
+
const setGlobal = app => {
|
|
65
|
+
app.config.globalProperties.$hasAuthority = hasAuthority;
|
|
66
|
+
app.config.globalProperties.$serviceApi = getServiceApi();
|
|
67
|
+
app.config.globalProperties.$url = getBaseURL();
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const setGlobalDirective = app => {
|
|
71
|
+
Object.keys(directives).forEach(key => {
|
|
72
|
+
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
console.log('ucore--process', process.env);
|
|
76
|
+
|
|
77
|
+
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
78
|
+
app.use(router);
|
|
79
|
+
setRouter(router);
|
|
80
|
+
setConfig(app, config);
|
|
81
|
+
setSystemEnv(env);
|
|
82
|
+
setViews(views);
|
|
83
|
+
setTableConfig(tableConfig);
|
|
84
|
+
return new Promise(resolve => {
|
|
85
|
+
useI18n(app, lang);
|
|
86
|
+
app.component('IconifyIconOffline', IconifyIconOffline);
|
|
87
|
+
app.component('FontIcon', FontIcon);
|
|
88
|
+
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
|
+
// .component('UtDivider', UtDivider)
|
|
90
|
+
// .component('UtModalForm', UtModalForm)
|
|
91
|
+
// .component('UtForm', UtForm)
|
|
92
|
+
// .component('UtContent', UtContent)
|
|
93
|
+
// .component('UtIconSelect', UtIconSelect)
|
|
94
|
+
// .component('UtCountdown', UtCountdown)
|
|
95
|
+
// .component('UtCalendar', UtCalendar)
|
|
96
|
+
// .component('UtModalGrid', UtModalGrid);
|
|
97
|
+
app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|
|
98
|
+
setGlobal(app);
|
|
99
|
+
setGlobalDirective(app);
|
|
100
|
+
// 全局组件
|
|
101
|
+
setupStore(app);
|
|
102
|
+
injectResponsiveStorage(app, config);
|
|
103
|
+
const result = { app, router };
|
|
104
|
+
resolve(result);
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default init;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2023-03-27 09:21:25
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2023-03-29 16:48:57
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import type { App } from 'vue';
|
|
9
|
+
import * as echarts from 'echarts/core';
|
|
10
|
+
import { CanvasRenderer } from 'echarts/renderers';
|
|
11
|
+
import { PieChart, BarChart, LineChart, GaugeChart } from 'echarts/charts';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
GridComponent,
|
|
15
|
+
TitleComponent,
|
|
16
|
+
LegendComponent,
|
|
17
|
+
GraphicComponent,
|
|
18
|
+
ToolboxComponent,
|
|
19
|
+
TooltipComponent,
|
|
20
|
+
DataZoomComponent,
|
|
21
|
+
VisualMapComponent
|
|
22
|
+
} from 'echarts/components';
|
|
23
|
+
|
|
24
|
+
const { use } = echarts;
|
|
25
|
+
// const { use, registerTheme } = echarts;
|
|
26
|
+
|
|
27
|
+
use([
|
|
28
|
+
PieChart,
|
|
29
|
+
BarChart,
|
|
30
|
+
LineChart,
|
|
31
|
+
GaugeChart,
|
|
32
|
+
CanvasRenderer,
|
|
33
|
+
GridComponent,
|
|
34
|
+
TitleComponent,
|
|
35
|
+
LegendComponent,
|
|
36
|
+
GraphicComponent,
|
|
37
|
+
ToolboxComponent,
|
|
38
|
+
TooltipComponent,
|
|
39
|
+
DataZoomComponent,
|
|
40
|
+
VisualMapComponent
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @description 自定义主题
|
|
45
|
+
* @see {@link https://echarts.apache.org/zh/download-theme.html}
|
|
46
|
+
*/
|
|
47
|
+
// import theme from "./theme.json";
|
|
48
|
+
// registerTheme("ovilia-green", theme);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description 按需引入echarts
|
|
52
|
+
* @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6}
|
|
53
|
+
*/
|
|
54
|
+
export function useEcharts(app: App) {
|
|
55
|
+
app.config.globalProperties.$echarts = echarts;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default echarts;
|