@pubinfo/module-rbac 2.0.0-beta.3
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/package.json +53 -0
- package/src/api/modules/assist/gonggaofuwu.ts +109 -0
- package/src/api/modules/assist/index.ts +5 -0
- package/src/api/modules/assist/qunzujiekou.ts +95 -0
- package/src/api/modules/assist/quyujiekou.ts +97 -0
- package/src/api/modules/assist/typings.d.ts +364 -0
- package/src/api/modules/configData/heibaimingdanfuwu.ts +95 -0
- package/src/api/modules/configData/index.ts +5 -0
- package/src/api/modules/configData/typings.d.ts +347 -0
- package/src/api/modules/configData/xitongpeizhifuwu.ts +322 -0
- package/src/api/modules/configData/zidianfuwu.ts +151 -0
- package/src/api/modules/log/caozuorizhifuwu.ts +37 -0
- package/src/api/modules/log/denglurizhifuwu.ts +37 -0
- package/src/api/modules/log/index.ts +4 -0
- package/src/api/modules/log/typings.d.ts +179 -0
- package/src/api/modules/rbac/gangweijiekou.ts +93 -0
- package/src/api/modules/rbac/index.ts +13 -0
- package/src/api/modules/rbac/jiaosejiekou.ts +124 -0
- package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +113 -0
- package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +186 -0
- package/src/api/modules/rbac/typings.d.ts +2001 -0
- package/src/api/modules/rbac/yonghujiekou.ts +225 -0
- package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +93 -0
- package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +72 -0
- package/src/api/modules/rbac/ziyuanjiekou.ts +223 -0
- package/src/api/modules/rbac/zuhuguanlijiekou.ts +91 -0
- package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +76 -0
- package/src/api/modules/rbac/zuzhijiekou.ts +171 -0
- package/src/api/request.ts +3 -0
- package/src/assets/icons/403.svg +1 -0
- package/src/assets/icons/403_dark.svg +1 -0
- package/src/assets/icons/404.svg +1 -0
- package/src/assets/icons/404_dark.svg +1 -0
- package/src/assets/icons/add-child.svg +1 -0
- package/src/assets/icons/authority.svg +1 -0
- package/src/assets/icons/authorize.svg +1 -0
- package/src/assets/icons/blacklist-disable.svg +1 -0
- package/src/assets/icons/blacklist-enable.svg +1 -0
- package/src/assets/icons/browser-360.svg +1 -0
- package/src/assets/icons/browser-chrome.svg +1 -0
- package/src/assets/icons/browser-edge.svg +1 -0
- package/src/assets/icons/browser-ie.svg +1 -0
- package/src/assets/icons/browser-other.svg +1 -0
- package/src/assets/icons/browser-qq.svg +1 -0
- package/src/assets/icons/browser-safari.svg +1 -0
- package/src/assets/icons/browser-uc.svg +1 -0
- package/src/assets/icons/change-org.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/empty-data.svg +1 -0
- package/src/assets/icons/favorites.svg +1 -0
- package/src/assets/icons/icard.svg +1 -0
- package/src/assets/icons/icon_animation.svg +1 -0
- package/src/assets/icons/icon_breadcrumb.svg +1 -0
- package/src/assets/icons/icon_copyright.svg +1 -0
- package/src/assets/icons/icon_jt.svg +1 -0
- package/src/assets/icons/icon_layout.svg +1 -0
- package/src/assets/icons/icon_mainpage.svg +1 -0
- package/src/assets/icons/icon_menu.svg +1 -0
- package/src/assets/icons/icon_page_size.svg +1 -0
- package/src/assets/icons/icon_position_type.svg +1 -0
- package/src/assets/icons/icon_safe_manage.svg +1 -0
- package/src/assets/icons/icon_screen_scale.svg +6 -0
- package/src/assets/icons/icon_system_manage.svg +1 -0
- package/src/assets/icons/icon_tabbar.svg +1 -0
- package/src/assets/icons/icon_toolbar.svg +1 -0
- package/src/assets/icons/icon_topbar.svg +1 -0
- package/src/assets/icons/icon_watermark.svg +1 -0
- package/src/assets/icons/image-load-fail.svg +1 -0
- package/src/assets/icons/log-center.svg +1 -0
- package/src/assets/icons/logo-sig.svg +1 -0
- package/src/assets/icons/logo.svg +1 -0
- package/src/assets/icons/mima.svg +1 -0
- package/src/assets/icons/not-data.svg +1 -0
- package/src/assets/icons/org-main.svg +1 -0
- package/src/assets/icons/org-unmain.svg +1 -0
- package/src/assets/icons/process-management.svg +1 -0
- package/src/assets/icons/project-management.svg +1 -0
- package/src/assets/icons/rbac.svg +1 -0
- package/src/assets/icons/remove.svg +1 -0
- package/src/assets/icons/resource-app.svg +1 -0
- package/src/assets/icons/resource-btn.svg +1 -0
- package/src/assets/icons/resource-index.svg +1 -0
- package/src/assets/icons/resource-menu.svg +1 -0
- package/src/assets/icons/resource-nonmenu.svg +1 -0
- package/src/assets/icons/setting-manage.svg +1 -0
- package/src/assets/icons/test.svg +1 -0
- package/src/assets/icons/theme-check-mark.svg +1 -0
- package/src/assets/icons/theme-title.svg +1 -0
- package/src/assets/icons/toolbar-collapse.svg +1 -0
- package/src/assets/icons/tree_icon.svg +1 -0
- package/src/assets/icons/tree_icon_checked.svg +1 -0
- package/src/assets/icons/view.svg +1 -0
- package/src/assets/icons/workbench.svg +1 -0
- package/src/assets/icons/zddata.svg +1 -0
- package/src/assets/icons/zy_checked.svg +1 -0
- package/src/assets/icons/zy_default.svg +1 -0
- package/src/assets/images/layout/item1.webp +0 -0
- package/src/assets/images/layout/item1_dark.webp +0 -0
- package/src/assets/images/layout/item2.webp +0 -0
- package/src/assets/images/layout/item2_dark.webp +0 -0
- package/src/assets/images/layout/item3.webp +0 -0
- package/src/assets/images/layout/item3_dark.webp +0 -0
- package/src/assets/images/layout/item4.webp +0 -0
- package/src/assets/images/layout/item4_dark.webp +0 -0
- package/src/assets/images/layout/item5.webp +0 -0
- package/src/assets/images/layout/item5_dark.webp +0 -0
- package/src/assets/images/page-width/anto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/auto.webp +0 -0
- package/src/assets/images/page-width/auto_dark.webp +0 -0
- package/src/assets/images/page-width/auto_min_w.webp +0 -0
- package/src/assets/images/page-width/auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto.webp +0 -0
- package/src/assets/images/page-width/icon_auto_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle.webp +0 -0
- package/src/assets/images/page-width/icon_middle_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w_dark.webp +0 -0
- package/src/assets/images/page-width/middle.webp +0 -0
- package/src/assets/images/page-width/middle_dark.webp +0 -0
- package/src/assets/images/page-width/middle_max_w.webp +0 -0
- package/src/assets/images/page-width/middle_max_w_dark.webp +0 -0
- package/src/assets/lottie/breadcrumb/dark/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/style.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/light/style.json +1 -0
- package/src/assets/lottie/layout/data-test.json +1 -0
- package/src/assets/lottie/layout/data.json +1 -0
- package/src/assets/lottie/menu/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/dark/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/dark/isRounded.json +1 -0
- package/src/assets/lottie/menu/dark/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/menu/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/light/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/light/isRounded.json +1 -0
- package/src/assets/lottie/menu/light/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/light/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/light/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/other/dark/enableCopyright.json +1 -0
- package/src/assets/lottie/other/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/dark/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/other/light/enableCopyright.json +1 -0
- package/src/assets/lottie/other/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/light/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop_old.json +1 -0
- package/src/assets/lottie/page_animation/light/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/light/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/light/toleft.json +1 -0
- package/src/assets/lottie/page_animation/light/toright.json +1 -0
- package/src/assets/lottie/page_animation/light/totop.json +1 -0
- package/src/assets/lottie/tabbar/dark/enable.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/dark/style.json +1 -0
- package/src/assets/lottie/tabbar/light/enable.json +1 -0
- package/src/assets/lottie/tabbar/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/light/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/light/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/light/style.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/dark/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/toolbar/light/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/light/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/light/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/light/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/light/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/light/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/watermark/dark/enableWatermark.json +1 -0
- package/src/assets/lottie/watermark/light/enableWatermark.json +1 -0
- package/src/assets/styles/vxe-table.css +13 -0
- package/src/components/GroupSelector/index.vue +311 -0
- package/src/components/OrgTree/index.vue +91 -0
- package/src/components/OrgUserSelector/OrgSelector.vue +135 -0
- package/src/components/OrgUserSelector/UserSelector.vue +164 -0
- package/src/components/OrgUserSelector/index.ts +47 -0
- package/src/components/OrgUserSelector/provider.ts +373 -0
- package/src/components/ResourceSelector/enum.ts +5 -0
- package/src/components/ResourceSelector/hooks/useAppAndResource.ts +96 -0
- package/src/components/ResourceSelector/index.vue +432 -0
- package/src/composables/useLottie.ts +65 -0
- package/src/index.ts +31 -0
- package/src/interface.ts +54 -0
- package/src/routes/index.ts +156 -0
- package/src/routes/modules/authority.manage.menu.ts +105 -0
- package/src/routes/modules/log.manage.menu.ts +45 -0
- package/src/routes/modules/safe.manage.menu.ts +71 -0
- package/src/routes/modules/stylesetting.manage.menu.ts +130 -0
- package/src/routes/modules/system.manage.menu.ts +92 -0
- package/src/stores/index.ts +1 -0
- package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +132 -0
- package/src/views/blackWhiteList/enum.ts +7 -0
- package/src/views/blackWhiteList/index.vue +309 -0
- package/src/views/blackWhiteList/types.ts +4 -0
- package/src/views/breadcrumb_setting/animationData.ts +15 -0
- package/src/views/breadcrumb_setting/index.vue +147 -0
- package/src/views/components/HCheckList.vue +47 -0
- package/src/views/components/animation_item.vue +37 -0
- package/src/views/components/setItem.vue +126 -0
- package/src/views/data-permission/components/createAndEditDataPermission.vue +354 -0
- package/src/views/data-permission/enum.ts +59 -0
- package/src/views/data-permission/index.vue +190 -0
- package/src/views/dictionary/components/drawerDictionary.vue +108 -0
- package/src/views/dictionary/components/drawerDictionaryItem.vue +115 -0
- package/src/views/dictionary/enum.ts +8 -0
- package/src/views/dictionary/index.vue +194 -0
- package/src/views/dictionary/itemlist.vue +164 -0
- package/src/views/group/components/drawerGroup.vue +177 -0
- package/src/views/group/enum.ts +25 -0
- package/src/views/group/index.vue +207 -0
- package/src/views/layout_setting/index.vue +306 -0
- package/src/views/log_center/components/browserType.vue +35 -0
- package/src/views/log_center/components/loginHistoryDetail.vue +71 -0
- package/src/views/log_center/components/operateHistoryDetail.vue +80 -0
- package/src/views/log_center/login_history.vue +239 -0
- package/src/views/log_center/operate_history.vue +233 -0
- package/src/views/menu_setting/animationData.ts +27 -0
- package/src/views/menu_setting/index.vue +207 -0
- package/src/views/organization/components/drawerOrganization.vue +161 -0
- package/src/views/organization/components/drawerRole.vue +159 -0
- package/src/views/organization/components/roleSelect.vue +258 -0
- package/src/views/organization/enum.ts +26 -0
- package/src/views/organization/index.vue +516 -0
- package/src/views/other_setting/animationData.ts +15 -0
- package/src/views/other_setting/index.vue +250 -0
- package/src/views/other_setting/interface.ts +26 -0
- package/src/views/page_animation_setting/animationData.ts +23 -0
- package/src/views/page_animation_setting/index.vue +200 -0
- package/src/views/page_w_setting/index.vue +238 -0
- package/src/views/position/components/drawerPosition.vue +131 -0
- package/src/views/position/enum.ts +8 -0
- package/src/views/position/index.vue +167 -0
- package/src/views/region/components/drawerRegion.vue +143 -0
- package/src/views/region/enum.ts +24 -0
- package/src/views/region/index.vue +246 -0
- package/src/views/resource/components/ResourceEdit.vue +209 -0
- package/src/views/resource/components/RoleRelation.vue +100 -0
- package/src/views/resource/enum.ts +35 -0
- package/src/views/resource/index.vue +237 -0
- package/src/views/resource/interface.ts +6 -0
- package/src/views/role/components/ResourceRelation.vue +113 -0
- package/src/views/role/components/drawerRole.vue +191 -0
- package/src/views/role/enum.ts +26 -0
- package/src/views/role/index.vue +183 -0
- package/src/views/role/interface.ts +6 -0
- package/src/views/role_group/components/ResourceRelation.vue +91 -0
- package/src/views/role_group/components/drawerRole.vue +153 -0
- package/src/views/role_group/components/roleSelect.vue +224 -0
- package/src/views/role_group/enum.ts +22 -0
- package/src/views/role_group/index.vue +170 -0
- package/src/views/role_group/interface.ts +6 -0
- package/src/views/safe_setting/index.vue +237 -0
- package/src/views/tabbar_setting/animationData.ts +23 -0
- package/src/views/tabbar_setting/index.vue +186 -0
- package/src/views/tenant/components/TenantEdit.vue +226 -0
- package/src/views/tenant/index.vue +192 -0
- package/src/views/tenant/interface.ts +4 -0
- package/src/views/theme_setting/index.vue +465 -0
- package/src/views/toolbar_setting/animationData.ts +42 -0
- package/src/views/toolbar_setting/index.vue +189 -0
- package/src/views/user/components/OrgAndPosition.vue +156 -0
- package/src/views/user/components/UserAuthorization.vue +260 -0
- package/src/views/user/components/UserEdit.vue +267 -0
- package/src/views/user/components/roleSelect.vue +258 -0
- package/src/views/user/enum.ts +13 -0
- package/src/views/user/index.vue +266 -0
- package/src/views/user/interface.ts +43 -0
- package/src/views/watermark_setting/animationData.ts +7 -0
- package/src/views/watermark_setting/index.vue +236 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Form, SettingsKeys } from './interface.ts';
|
|
3
|
+
import { postSysconfigAddOrEidtSysThemeStyleConfig } from '@/api/modules/configData';
|
|
4
|
+
import { useSettingsStore } from '@/stores';
|
|
5
|
+
import { message } from 'ant-design-vue';
|
|
6
|
+
|
|
7
|
+
import SetItem from '../components/setItem.vue';
|
|
8
|
+
import {
|
|
9
|
+
darkEnableCopyrightData,
|
|
10
|
+
darkEnableHotkeysData,
|
|
11
|
+
darkSwitchTabbarAndToolbarData,
|
|
12
|
+
lightEnableCopyrightData,
|
|
13
|
+
lightEnableHotkeysData,
|
|
14
|
+
lightSwitchTabbarAndToolbarData,
|
|
15
|
+
} from './animationData.ts';
|
|
16
|
+
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'OtherSetting',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const settingsStore = useSettingsStore();
|
|
22
|
+
|
|
23
|
+
const activeKey = ref<string[]>(['0', '1', '2']);
|
|
24
|
+
const otherList = reactive([
|
|
25
|
+
{
|
|
26
|
+
tabName: '底部版权',
|
|
27
|
+
tabIcon: 'icon_copyright',
|
|
28
|
+
list: [{
|
|
29
|
+
name: '是否启用',
|
|
30
|
+
type: 'switch',
|
|
31
|
+
descripe: '',
|
|
32
|
+
parentName: 'copyright',
|
|
33
|
+
childName: 'enable',
|
|
34
|
+
open: settingsStore.globalSettings.copyright.enable,
|
|
35
|
+
activeStyle: '',
|
|
36
|
+
lightData: lightEnableCopyrightData,
|
|
37
|
+
darkData: darkEnableCopyrightData,
|
|
38
|
+
}],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
tabName: '页面',
|
|
42
|
+
tabIcon: 'icon_mainpage',
|
|
43
|
+
list: [
|
|
44
|
+
{
|
|
45
|
+
name: '是否启用快捷键',
|
|
46
|
+
type: 'switch',
|
|
47
|
+
descripe: '',
|
|
48
|
+
parentName: 'mainPage',
|
|
49
|
+
childName: 'enableHotkeys',
|
|
50
|
+
open: settingsStore.globalSettings.mainPage.enableHotkeys,
|
|
51
|
+
activeStyle: '',
|
|
52
|
+
lightData: lightEnableHotkeysData,
|
|
53
|
+
darkData: darkEnableHotkeysData,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
tabName: '顶栏',
|
|
59
|
+
tabIcon: 'icon_topbar',
|
|
60
|
+
list: [
|
|
61
|
+
{
|
|
62
|
+
name: '展示切换',
|
|
63
|
+
type: 'switch',
|
|
64
|
+
descripe: '切换标签栏和工具栏的展示顺序',
|
|
65
|
+
parentName: 'topbar',
|
|
66
|
+
childName: 'switchTabbarAndToolbar',
|
|
67
|
+
open: settingsStore.globalSettings.topbar.switchTabbarAndToolbar,
|
|
68
|
+
activeStyle: '',
|
|
69
|
+
lightData: lightSwitchTabbarAndToolbarData,
|
|
70
|
+
darkData: darkSwitchTabbarAndToolbarData,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
] as const);
|
|
75
|
+
|
|
76
|
+
function onChange<K extends SettingsKeys, V extends keyof Required<Settings.all>[K]>(
|
|
77
|
+
parentName: K,
|
|
78
|
+
childName: V,
|
|
79
|
+
ck: Required<Settings.all>[K][V],
|
|
80
|
+
) {
|
|
81
|
+
if (settingsStore.globalSettings[parentName]
|
|
82
|
+
&& settingsStore.globalSettings[parentName][childName] !== undefined) {
|
|
83
|
+
(settingsStore.globalSettings as Required<Settings.all>)[parentName][childName] = ck;
|
|
84
|
+
|
|
85
|
+
const result: Settings.all = {};
|
|
86
|
+
result[parentName] = {};
|
|
87
|
+
// @ts-expect-error always true
|
|
88
|
+
result[parentName][childName] = ck;
|
|
89
|
+
|
|
90
|
+
const jsonStr = JSON.stringify(result);
|
|
91
|
+
setStyle(jsonStr);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function setStyle(jsonStr: string) {
|
|
96
|
+
postSysconfigAddOrEidtSysThemeStyleConfig({ content: jsonStr }).then((res: API.ResponseDataBoolean) => {
|
|
97
|
+
if (res.success) {
|
|
98
|
+
message.success('设置成功');
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const copyrightForm = ref<Form>({
|
|
104
|
+
dates: settingsStore.globalSettings.copyright.dates,
|
|
105
|
+
company: settingsStore.globalSettings.copyright.company,
|
|
106
|
+
website: settingsStore.globalSettings.copyright.website,
|
|
107
|
+
beian: settingsStore.globalSettings.copyright.beian,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
function onSubmit() {
|
|
111
|
+
const jsonStr = JSON.stringify({
|
|
112
|
+
copyright: {
|
|
113
|
+
dates: copyrightForm.value.dates,
|
|
114
|
+
company: copyrightForm.value.company,
|
|
115
|
+
website: copyrightForm.value.website,
|
|
116
|
+
beian: copyrightForm.value.beian,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
settingsStore.globalSettings.copyright.dates = copyrightForm.value.dates;
|
|
120
|
+
settingsStore.globalSettings.copyright.company = copyrightForm.value.company;
|
|
121
|
+
settingsStore.globalSettings.copyright.website = copyrightForm.value.website;
|
|
122
|
+
settingsStore.globalSettings.copyright.beian = copyrightForm.value.beian;
|
|
123
|
+
|
|
124
|
+
setStyle(jsonStr);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function onReset() {
|
|
128
|
+
copyrightForm.value = {
|
|
129
|
+
dates: settingsStore.globalSettings.copyright.dates,
|
|
130
|
+
company: settingsStore.globalSettings.copyright.company,
|
|
131
|
+
website: settingsStore.globalSettings.copyright.website,
|
|
132
|
+
beian: settingsStore.globalSettings.copyright.beian,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
<template>
|
|
138
|
+
<div
|
|
139
|
+
w-full
|
|
140
|
+
h-full
|
|
141
|
+
p-10px
|
|
142
|
+
>
|
|
143
|
+
<div class="w-full h-full bg-white overflow-y-auto p-10px flex flex-col box-border dark:bg-[#141414]">
|
|
144
|
+
<a-collapse
|
|
145
|
+
v-model:active-key="activeKey"
|
|
146
|
+
:bordered="false"
|
|
147
|
+
:ghost="true"
|
|
148
|
+
expand-icon-position="end"
|
|
149
|
+
>
|
|
150
|
+
<template #expandIcon="pros">
|
|
151
|
+
<div class="w-16px h-16px bg-[#fff] rounded-16px flex items-center justify-center">
|
|
152
|
+
<PubinfoIcon
|
|
153
|
+
name="icon_jt"
|
|
154
|
+
class="text-base"
|
|
155
|
+
:rotate="pros?.isActive ? 0 : 180"
|
|
156
|
+
:size="16"
|
|
157
|
+
@click="console.log('pros', pros)"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
161
|
+
<a-collapse-panel v-for="(option, index) in otherList" :key="index" style="margin-bottom: 10px;">
|
|
162
|
+
<template #header>
|
|
163
|
+
<div class="flex flex-row items-center">
|
|
164
|
+
<PubinfoIcon :name="option.tabIcon" class="text-base mr-[6px]" :size="22" />
|
|
165
|
+
<span class="text-[16px] text-[#1d2129] dark:text-[#C9CDD4]">{{ option.tabName }}</span>
|
|
166
|
+
</div>
|
|
167
|
+
</template>
|
|
168
|
+
<div v-if="option.tabName !== '底部版权'" class="grid grid-cols-3 gap-[20px] px-30px w-full max-w-1300px">
|
|
169
|
+
<SetItem
|
|
170
|
+
v-for="item in option.list"
|
|
171
|
+
:key="item.name"
|
|
172
|
+
aspect="[9/6]"
|
|
173
|
+
:name="item.name"
|
|
174
|
+
:descripe="item.descripe"
|
|
175
|
+
:open="item.open"
|
|
176
|
+
:type="item.type"
|
|
177
|
+
:light-animation-data="item.lightData"
|
|
178
|
+
:dark-animation-data="item.darkData"
|
|
179
|
+
@change="(val) => onChange<typeof item.parentName, typeof item.childName>(item.parentName, item.childName, val)"
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
<div v-else>
|
|
183
|
+
<div v-for="item in option.list" :key="item.name" class="grid grid-cols-3 gap-[20px] px-30px w-full max-w-1300px">
|
|
184
|
+
<SetItem
|
|
185
|
+
:key="item.name"
|
|
186
|
+
aspect="[9/6]"
|
|
187
|
+
:name="item.name"
|
|
188
|
+
:descripe="item.descripe"
|
|
189
|
+
:open="item.open"
|
|
190
|
+
:type="item.type"
|
|
191
|
+
:light-animation-data="item.lightData"
|
|
192
|
+
:dark-animation-data="item.darkData"
|
|
193
|
+
@change="(val) => onChange<typeof item.parentName, typeof item.childName>(item.parentName, item.childName, val)"
|
|
194
|
+
/>
|
|
195
|
+
<div class="grid-col-span-2 pt-40px">
|
|
196
|
+
<div class="flex items-center mb-20px w-560px">
|
|
197
|
+
<label class="w-130px text-right mr-10px text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">日期</label>
|
|
198
|
+
<a-input
|
|
199
|
+
v-model:value="copyrightForm.dates"
|
|
200
|
+
class="flex-1"
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="flex items-center mb-20px w-560px">
|
|
204
|
+
<label class="w-130px text-right mr-10px text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">公司</label>
|
|
205
|
+
<a-input
|
|
206
|
+
v-model:value="copyrightForm.company"
|
|
207
|
+
class="flex-1"
|
|
208
|
+
/>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="flex items-center mb-20px w-560px">
|
|
211
|
+
<label class="w-130px text-right mr-10px text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">网址</label>
|
|
212
|
+
<a-input
|
|
213
|
+
v-model:value="copyrightForm.website"
|
|
214
|
+
class="flex-1"
|
|
215
|
+
/>
|
|
216
|
+
</div>
|
|
217
|
+
<div class="flex items-center mb-20px w-560px">
|
|
218
|
+
<label class="w-130px text-right mr-10px text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">备案</label>
|
|
219
|
+
<a-input
|
|
220
|
+
v-model:value="copyrightForm.beian"
|
|
221
|
+
class="flex-1"
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="flex items-center flex-row-reverse w-560px">
|
|
225
|
+
<a-button style="margin-left: 10px;" @click="onReset">
|
|
226
|
+
重置
|
|
227
|
+
</a-button>
|
|
228
|
+
<a-button type="primary" @click="onSubmit">
|
|
229
|
+
确定
|
|
230
|
+
</a-button>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</a-collapse-panel>
|
|
236
|
+
</a-collapse>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</template>
|
|
240
|
+
|
|
241
|
+
<style lang="scss" scoped>
|
|
242
|
+
:deep(.ant-collapse-header) {
|
|
243
|
+
padding: 6.5px 16px !important;
|
|
244
|
+
background: var(--g-bg);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.bar-header {
|
|
248
|
+
background: var(--g-bg);
|
|
249
|
+
}
|
|
250
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimplifyDeep } from 'type-fest';
|
|
2
|
+
|
|
3
|
+
export type SettingsKeys = keyof Required<Settings.all>;
|
|
4
|
+
|
|
5
|
+
type CombinedKeys = {
|
|
6
|
+
[K in SettingsKeys]: keyof SimplifyDeep<Required<Settings.all>[K]>;
|
|
7
|
+
}[SettingsKeys];
|
|
8
|
+
|
|
9
|
+
export interface Item {
|
|
10
|
+
name: string
|
|
11
|
+
descripe: string
|
|
12
|
+
type: string
|
|
13
|
+
parentName: SettingsKeys
|
|
14
|
+
childName: CombinedKeys
|
|
15
|
+
open: boolean
|
|
16
|
+
activeStyle: string
|
|
17
|
+
lightData: string
|
|
18
|
+
darkData: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Form {
|
|
22
|
+
dates: string
|
|
23
|
+
company: string
|
|
24
|
+
website: string
|
|
25
|
+
beian: string
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import darkFadeInOutData from '@/assets/lottie/page_animation/dark/fadeinout.json?url';
|
|
2
|
+
import darkToBottomData from '@/assets/lottie/page_animation/dark/tobottom.json?url';
|
|
3
|
+
import darkToLeftData from '@/assets/lottie/page_animation/dark/toleft.json?url';
|
|
4
|
+
import darkToRightData from '@/assets/lottie/page_animation/dark/toright.json?url';
|
|
5
|
+
import darkToTopData from '@/assets/lottie/page_animation/dark/totop.json?url';
|
|
6
|
+
import lightFadeInOutData from '@/assets/lottie/page_animation/light/fadeinout.json?url';
|
|
7
|
+
import lightToBottomData from '@/assets/lottie/page_animation/light/tobottom.json?url';
|
|
8
|
+
import lightToLeftData from '@/assets/lottie/page_animation/light/toleft.json?url';
|
|
9
|
+
import lightToRightData from '@/assets/lottie/page_animation/light/toright.json?url';
|
|
10
|
+
import lightToTopData from '@/assets/lottie/page_animation/light/totop.json?url';
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
darkFadeInOutData,
|
|
14
|
+
darkToBottomData,
|
|
15
|
+
darkToLeftData,
|
|
16
|
+
darkToRightData,
|
|
17
|
+
darkToTopData,
|
|
18
|
+
lightFadeInOutData,
|
|
19
|
+
lightToBottomData,
|
|
20
|
+
lightToLeftData,
|
|
21
|
+
lightToRightData,
|
|
22
|
+
lightToTopData,
|
|
23
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { postSysconfigAddOrEidtSysThemeStyleConfig } from '@/api/modules/configData';
|
|
3
|
+
import { useSettingsStore } from '@/stores';
|
|
4
|
+
import { message } from 'ant-design-vue';
|
|
5
|
+
import AnimationItem from '../components/animation_item.vue';
|
|
6
|
+
import {
|
|
7
|
+
darkFadeInOutData,
|
|
8
|
+
darkToBottomData,
|
|
9
|
+
darkToLeftData,
|
|
10
|
+
darkToRightData,
|
|
11
|
+
darkToTopData,
|
|
12
|
+
lightFadeInOutData,
|
|
13
|
+
lightToBottomData,
|
|
14
|
+
lightToLeftData,
|
|
15
|
+
lightToRightData,
|
|
16
|
+
lightToTopData,
|
|
17
|
+
} from './animationData.ts';
|
|
18
|
+
|
|
19
|
+
defineOptions({
|
|
20
|
+
name: 'PageAnimationSetting',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const settingsStore = useSettingsStore();
|
|
24
|
+
|
|
25
|
+
const { enableTransition, transitionMode } = toRefs(settingsStore.globalSettings.mainPage);
|
|
26
|
+
|
|
27
|
+
const itemRefs = ref<(InstanceType<typeof AnimationItem> | null)[]>([]);
|
|
28
|
+
|
|
29
|
+
const transitionModeList = reactive<
|
|
30
|
+
{
|
|
31
|
+
descripe: string
|
|
32
|
+
active: Settings.mainPage['transitionMode']
|
|
33
|
+
class: string
|
|
34
|
+
lightData: string
|
|
35
|
+
darkData: string
|
|
36
|
+
}[]
|
|
37
|
+
>([
|
|
38
|
+
{
|
|
39
|
+
descripe: '淡入淡出',
|
|
40
|
+
active: 'fade',
|
|
41
|
+
class: 'mode-fade',
|
|
42
|
+
lightData: lightFadeInOutData,
|
|
43
|
+
darkData: darkFadeInOutData,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
descripe: '向左滑动',
|
|
47
|
+
active: 'slide-left',
|
|
48
|
+
class: 'mode-slide-left',
|
|
49
|
+
lightData: lightToLeftData,
|
|
50
|
+
darkData: darkToLeftData,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
descripe: '向右滑动',
|
|
54
|
+
active: 'slide-right',
|
|
55
|
+
class: 'mode-slide-right',
|
|
56
|
+
lightData: lightToRightData,
|
|
57
|
+
darkData: darkToRightData,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
descripe: '向上滑动',
|
|
61
|
+
active: 'slide-top',
|
|
62
|
+
class: 'mode-slide-top',
|
|
63
|
+
lightData: lightToTopData,
|
|
64
|
+
darkData: darkToTopData,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
descripe: '向下滑动',
|
|
68
|
+
active: 'slide-bottom',
|
|
69
|
+
class: 'mode-slide-bottom',
|
|
70
|
+
lightData: lightToBottomData,
|
|
71
|
+
darkData: darkToBottomData,
|
|
72
|
+
},
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
function play(index: number) {
|
|
76
|
+
if (itemRefs.value[index]) {
|
|
77
|
+
itemRefs.value[index]?.play();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function stop(index: number) {
|
|
82
|
+
if (itemRefs.value[index]) {
|
|
83
|
+
itemRefs.value[index]?.stop();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const enableTran = ref<boolean>(enableTransition.value);
|
|
88
|
+
|
|
89
|
+
function onChange(ck: boolean | string | number) {
|
|
90
|
+
settingsStore.globalSettings.mainPage.enableTransition = ck as boolean;
|
|
91
|
+
const jsonStr = JSON.stringify({
|
|
92
|
+
mainPage: {
|
|
93
|
+
enableTransition: ck,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
setStyle(jsonStr);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function clickHandle(item: any) {
|
|
100
|
+
if (item) {
|
|
101
|
+
transitionMode.value = item;
|
|
102
|
+
settingsStore.globalSettings.mainPage.transitionMode = item;
|
|
103
|
+
const jsonStr = JSON.stringify({
|
|
104
|
+
mainPage: {
|
|
105
|
+
transitionMode: item,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
setStyle(jsonStr);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function setStyle(jsonStr: string) {
|
|
113
|
+
postSysconfigAddOrEidtSysThemeStyleConfig({ content: jsonStr }).then((res: API.ResponseDataBoolean) => {
|
|
114
|
+
if (res.success) {
|
|
115
|
+
message.success('设置成功');
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<template>
|
|
122
|
+
<div
|
|
123
|
+
w-full
|
|
124
|
+
h-full
|
|
125
|
+
p-10px
|
|
126
|
+
>
|
|
127
|
+
<div class="w-full h-full bg-white overflow-y-auto p-10px flex flex-col box-border dark:bg-[#141414]">
|
|
128
|
+
<div class="bg-[#F0F4FF] h-[38px] pl-[16px] flex flex-row items-center dark:bg-[#32353B]">
|
|
129
|
+
<PubinfoIcon name="icon_menu" class="text-base mr-[6px]" :size="22" />
|
|
130
|
+
<span class="text-[16px] text-[#1d2129] dark:text-[#C9CDD4]">页面切换动画</span>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="mt-[15px] flex-1 flex flex-col">
|
|
133
|
+
<div class="flex flex-row items-center">
|
|
134
|
+
<div class="w-[110px] text-right font-400 text-[#4e5969] text-[14px] dark:text-[#C9CDD4]">
|
|
135
|
+
开启动画效果
|
|
136
|
+
</div>
|
|
137
|
+
<a-switch
|
|
138
|
+
v-model:checked="enableTran"
|
|
139
|
+
class="ml-30px"
|
|
140
|
+
checked-children="开启"
|
|
141
|
+
un-checked-children="关闭"
|
|
142
|
+
@change="onChange"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="mt-[15px] flex-1 flex flex-row">
|
|
146
|
+
<div class="flex-none w-[110px] text-right font-400 text-[#4e5969] text-[14px] pt-10px dark:text-[#C9CDD4]">
|
|
147
|
+
动画模式
|
|
148
|
+
</div>
|
|
149
|
+
<div class="flex-auto grid grid-cols-3 gap-[20px] px-30px w-full h-0 max-w-1500px" aspect="[3/2]">
|
|
150
|
+
<div
|
|
151
|
+
v-for="(mode, index) in transitionModeList"
|
|
152
|
+
:key="mode.active"
|
|
153
|
+
class="item dark:bg-[#3a3e43]! "
|
|
154
|
+
:class="[transitionMode === mode.active ? 'active' : '', `item-${mode.active}`]"
|
|
155
|
+
aspect="[9/6]"
|
|
156
|
+
@click="clickHandle(mode.active)"
|
|
157
|
+
@mouseenter="play(index)"
|
|
158
|
+
@mouseleave="stop(index)"
|
|
159
|
+
>
|
|
160
|
+
<div class="text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">
|
|
161
|
+
{{ mode.descripe }}
|
|
162
|
+
</div>
|
|
163
|
+
<div class="flex-1 mt-[20px] w-[75%] rounded-[8px] jb py-[10px] flex justify-center">
|
|
164
|
+
<AnimationItem
|
|
165
|
+
:key="index"
|
|
166
|
+
:ref="(el: any) => (itemRefs[index] = el as InstanceType<typeof AnimationItem>)"
|
|
167
|
+
:light-animation-data="mode.lightData"
|
|
168
|
+
:dark-animation-data="mode.darkData"
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</template>
|
|
178
|
+
|
|
179
|
+
<style lang="scss" scoped>
|
|
180
|
+
.item {
|
|
181
|
+
display: flex;
|
|
182
|
+
flex-direction: column;
|
|
183
|
+
place-items: center center;
|
|
184
|
+
padding-top: 26px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
background-color: var(--g-bg);
|
|
187
|
+
border: 1px solid var(--g-tabbar-tab-hover-bg);
|
|
188
|
+
border-radius: 8px;
|
|
189
|
+
|
|
190
|
+
.jb {
|
|
191
|
+
background: linear-gradient(180deg, var(--g-container-bg) 0%, #fff0 100%);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&.active {
|
|
195
|
+
border: 2.6px solid rgb(var(--ui-primary));
|
|
196
|
+
border-radius: 8px;
|
|
197
|
+
box-shadow: 0 2.6px 13px 0 #59626940;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
</style>
|