mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
Merge pull request #6961 from dataease/pr@dev-v2@feat_toolbox_menu
style: 工作台样式恢复
This commit is contained in:
commit
6060978ee3
@ -22,7 +22,9 @@ BEGIN;
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 1, 1, 0);
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (20, 15, 2, 'template-setting', 'system/template-setting', 4, 'icon_template', '/template-setting', 0, 1, 1);
|
||||
VALUES (30, 0, 1, 'toolbox', null, 7, 'icon_template', '/toolbox', 1, 1, 0);
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (31, 30, 2, 'template-setting', 'toolbox/template-setting', 1, 'icon_template', '/template-setting', 0, 1, 1);
|
||||
COMMIT;
|
||||
|
||||
DROP TABLE IF EXISTS `visualization_template_extend_data`;
|
||||
@ -52,8 +54,10 @@ CREATE TABLE `core_area_custom`
|
||||
);
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO `core_sys_setting` VALUES (1, 'basic.dsIntervalTime', '6', 'text', 2);
|
||||
INSERT INTO `core_sys_setting` VALUES (2, 'basic.dsExecuteTime', 'minute', 'text', 3);
|
||||
INSERT INTO `core_sys_setting`
|
||||
VALUES (1, 'basic.dsIntervalTime', '6', 'text', 2);
|
||||
INSERT INTO `core_sys_setting`
|
||||
VALUES (2, 'basic.dsExecuteTime', 'minute', 'text', 3);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (7, 'template.url', 'https://templates-de.fit2cloud.com', 'text', 0);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (8, 'template.accessKey', 'dataease', 'text', 1);
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
@ -7,6 +7,7 @@ import HeaderMenuItem from './HeaderMenuItem.vue'
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import { ElHeader, ElMenu } from 'element-plus-secondary'
|
||||
import SystemCfg from './SystemCfg.vue'
|
||||
import ToolboxCfg from './ToolboxCfg.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import TopDoc from '@/layout/components/TopDoc.vue'
|
||||
import AccountOperator from '@/layout/components/AccountOperator.vue'
|
||||
@ -26,6 +27,7 @@ const permissionStore = usePermissionStore()
|
||||
|
||||
const routers: any[] = formatRoute(permissionStore.getRoutersNotHidden as AppCustomRouteRecordRaw[])
|
||||
const showSystem = ref(false)
|
||||
const showToolbox = ref(false)
|
||||
const handleSelect = (index: string) => {
|
||||
// 自定义事件
|
||||
if (isExternal(index)) {
|
||||
@ -37,8 +39,12 @@ const handleSelect = (index: string) => {
|
||||
const initShowSystem = () => {
|
||||
showSystem.value = permissionStore.getRouters.some(route => route.path === '/system')
|
||||
}
|
||||
const initShowToolbox = () => {
|
||||
showToolbox.value = permissionStore.getRouters.some(route => route.path === '/toolbox')
|
||||
}
|
||||
onMounted(() => {
|
||||
initShowSystem()
|
||||
initShowToolbox()
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -56,6 +62,7 @@ onMounted(() => {
|
||||
</el-menu>
|
||||
<div class="operate-setting" v-if="!desktop">
|
||||
<XpackComponent jsname="c3dpdGNoZXI=" />
|
||||
<ToolboxCfg v-if="showToolbox" />
|
||||
<TopDoc />
|
||||
<SystemCfg v-if="showSystem" />
|
||||
<AccountOperator />
|
||||
|
@ -2,7 +2,11 @@
|
||||
import { ElHeader } from 'element-plus-secondary'
|
||||
import { useRouter } from 'vue-router'
|
||||
import AccountOperator from '@/layout/components/AccountOperator.vue'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
const { push } = useRouter()
|
||||
const props = defineProps({
|
||||
title: propTypes.string.def('系统设置')
|
||||
})
|
||||
const backToMain = () => {
|
||||
push('/workbranch/index')
|
||||
}
|
||||
@ -12,7 +16,7 @@ const backToMain = () => {
|
||||
<el-header class="header-flex system-header">
|
||||
<Icon className="logo" name="logo"></Icon>
|
||||
<el-divider direction="vertical" />
|
||||
<span class="system">系统设置</span>
|
||||
<span class="system">{{ props.title || '系统设置' }}</span>
|
||||
<div class="operate-setting">
|
||||
<span @click="backToMain" class="work-bar flex-align-center">
|
||||
<el-icon>
|
||||
|
34
core/core-frontend/src/layout/components/ToolboxCfg.vue
Normal file
34
core/core-frontend/src/layout/components/ToolboxCfg.vue
Normal file
@ -0,0 +1,34 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
const { push, resolve } = useRouter()
|
||||
const redirectUser = () => {
|
||||
const toolboxMenu = resolve('/toolbox')
|
||||
const kidPath = toolboxMenu.matched[0].children[0].path
|
||||
push(`${toolboxMenu.path}/${kidPath}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-tooltip class="box-item" effect="dark" content="工具箱" placement="top">
|
||||
<div class="sys-setting">
|
||||
<el-icon @click="redirectUser">
|
||||
<Icon class="icon-setting" name="sys-tools" />
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.sys-setting {
|
||||
margin: 0 0 0 10px;
|
||||
padding: 5px;
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: #1e2738;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -7,23 +7,28 @@ import Menu from './components/Menu.vue'
|
||||
import Main from './components/Main.vue'
|
||||
import { ElContainer } from 'element-plus-secondary'
|
||||
import { useRoute } from 'vue-router'
|
||||
import HeaderTemplateMarket from '@/layout/components/HeaderTemplateMarket.vue'
|
||||
const route = useRoute()
|
||||
const systemMenu = computed(() => route.path.includes('system'))
|
||||
const settingMenu = computed(() => route.path.includes('sys-setting'))
|
||||
const templateMarketMenu = computed(() => route.path.includes('template-market'))
|
||||
const marketMenu = computed(() => route.path.includes('template-market'))
|
||||
const toolboxMenu = computed(() => route.path.includes('toolbox'))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="common-layout">
|
||||
<header-template-market v-if="templateMarketMenu"></header-template-market>
|
||||
<HeaderSystem v-else-if="settingMenu"></HeaderSystem>
|
||||
<HeaderSystem
|
||||
v-if="settingMenu || marketMenu || toolboxMenu"
|
||||
:title="toolboxMenu ? '工具箱' : marketMenu ? '模板中心' : ''"
|
||||
/>
|
||||
<Header v-else></Header>
|
||||
<el-container class="layout-container">
|
||||
<Sidebar v-if="systemMenu || settingMenu" class="layout-sidebar">
|
||||
<Sidebar v-if="systemMenu || settingMenu || toolboxMenu" class="layout-sidebar">
|
||||
<Menu style="height: 100%"></Menu>
|
||||
</Sidebar>
|
||||
<Main class="layout-main" :class="{ 'with-sider': systemMenu || settingMenu }"></Main>
|
||||
<Main
|
||||
class="layout-main"
|
||||
:class="{ 'with-sider': systemMenu || settingMenu || toolboxMenu }"
|
||||
></Main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit cecfea7d6e7cd1db555101eea98377fc0ba874d6
|
||||
Subproject commit 34d3f25ca633156eb59b3118137b90be2c8b36a6
|
Loading…
Reference in New Issue
Block a user