Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
三久
DolphinScheduler
提交
b2e2de7a
DolphinScheduler
项目概览
三久
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b2e2de7a
编写于
12月 28, 2021
作者:
L
labbomb
提交者:
GitHub
12月 28, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:Adjust the Layout structure (#7651)
上级
fb23b642
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
338 addition
and
227 deletion
+338
-227
dolphinscheduler-ui-next/src/layouts/content/components/language/index.tsx
...ui-next/src/layouts/content/components/language/index.tsx
+10
-5
dolphinscheduler-ui-next/src/layouts/content/components/language/use-dropdown.ts
...t/src/layouts/content/components/language/use-dropdown.ts
+2
-2
dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx
...r-ui-next/src/layouts/content/components/navbar/index.tsx
+22
-10
dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-dataList.ts
...ext/src/layouts/content/components/navbar/use-dataList.ts
+0
-75
dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts
...xt/src/layouts/content/components/navbar/use-menuClick.ts
+5
-3
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.module.scss
.../src/layouts/content/components/sidebar/index.module.scss
+0
-9
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx
...-ui-next/src/layouts/content/components/sidebar/index.tsx
+17
-21
dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
...ler-ui-next/src/layouts/content/components/user/index.tsx
+8
-4
dolphinscheduler-ui-next/src/layouts/content/components/user/use-dataList.ts
...-next/src/layouts/content/components/user/use-dataList.ts
+0
-47
dolphinscheduler-ui-next/src/layouts/content/index.tsx
dolphinscheduler-ui-next/src/layouts/content/index.tsx
+23
-5
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
+251
-0
dolphinscheduler-ui-next/src/store/route/route.ts
dolphinscheduler-ui-next/src/store/route/route.ts
+0
-46
未找到文件。
dolphinscheduler-ui-next/src/layouts/content/components/language/index.tsx
浏览文件 @
b2e2de7a
...
@@ -15,19 +15,24 @@
...
@@ -15,19 +15,24 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
defineComponent
,
toRefs
}
from
'
vue
'
import
{
defineComponent
,
ref
,
PropType
}
from
'
vue
'
import
{
NDropdown
,
NIcon
,
NButton
}
from
'
naive-ui
'
import
{
NDropdown
,
NIcon
,
NButton
}
from
'
naive-ui
'
import
styles
from
'
./index.module.scss
'
import
styles
from
'
./index.module.scss
'
import
{
DownOutlined
}
from
'
@vicons/antd
'
import
{
DownOutlined
}
from
'
@vicons/antd
'
import
{
useDataList
}
from
'
./use-dataList
'
import
{
useDropDown
}
from
'
./use-dropdown
'
import
{
useDropDown
}
from
'
./use-dropdown
'
const
language
=
defineComponent
({
const
language
=
defineComponent
({
name
:
'
language
'
,
name
:
'
language
'
,
props
:
{
languageOptions
:
{
type
:
Array
as
PropType
<
any
>
,
default
:
[],
},
},
setup
()
{
setup
()
{
const
{
state
}
=
useDataList
(
)
const
chooseVal
=
ref
(
'
中文
'
)
const
{
handleSelect
}
=
useDropDown
(
state
)
const
{
handleSelect
}
=
useDropDown
(
chooseVal
)
return
{
...
toRefs
(
state
),
handleSelect
}
return
{
handleSelect
,
chooseVal
}
},
},
render
()
{
render
()
{
return
(
return
(
...
...
dolphinscheduler-ui-next/src/layouts/content/components/language/use-dropdown.ts
浏览文件 @
b2e2de7a
...
@@ -18,12 +18,12 @@
...
@@ -18,12 +18,12 @@
import
{
DropdownOption
}
from
'
naive-ui
'
import
{
DropdownOption
}
from
'
naive-ui
'
import
{
useI18n
}
from
'
vue-i18n
'
import
{
useI18n
}
from
'
vue-i18n
'
export
function
useDropDown
(
state
:
any
)
{
export
function
useDropDown
(
chooseVal
:
any
)
{
const
{
locale
}
=
useI18n
()
const
{
locale
}
=
useI18n
()
const
handleSelect
=
(
key
:
string
|
number
,
option
:
DropdownOption
)
=>
{
const
handleSelect
=
(
key
:
string
|
number
,
option
:
DropdownOption
)
=>
{
console
.
log
(
key
,
option
)
console
.
log
(
key
,
option
)
state
.
chooseVal
=
option
.
label
chooseVal
.
value
=
option
.
label
locale
.
value
=
key
as
string
locale
.
value
=
key
as
string
}
}
return
{
return
{
...
...
dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx
浏览文件 @
b2e2de7a
...
@@ -15,21 +15,33 @@
...
@@ -15,21 +15,33 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
defineComponent
,
toRefs
}
from
'
vue
'
import
{
defineComponent
,
PropType
}
from
'
vue
'
import
styles
from
'
./index.module.scss
'
import
styles
from
'
./index.module.scss
'
import
{
NMenu
}
from
'
naive-ui
'
import
{
NMenu
}
from
'
naive-ui
'
import
Logo
from
'
../logo
'
import
Logo
from
'
../logo
'
import
Language
from
'
../language
'
import
Language
from
'
../language
'
import
User
from
'
../user
'
import
User
from
'
../user
'
import
{
useDataList
}
from
'
./use-dataList
'
import
{
useMenuClick
}
from
'
./use-menuClick
'
import
{
useMenuClick
}
from
'
./use-menuClick
'
const
navbar
=
defineComponent
({
const
navbar
=
defineComponent
({
name
:
'
navbar
'
,
name
:
'
navbar
'
,
setup
()
{
props
:
{
const
{
state
}
=
useDataList
()
headerMenuOptions
:
{
const
{
handleMenuClick
}
=
useMenuClick
()
type
:
Array
as
PropType
<
any
>
,
return
{
...
toRefs
(
state
),
handleMenuClick
}
default
:
[],
},
languageOptions
:
{
type
:
Array
as
PropType
<
any
>
,
default
:
[],
},
profileOptions
:
{
type
:
Array
as
PropType
<
any
>
,
default
:
[],
},
},
setup
(
props
,
ctx
)
{
const
{
handleMenuClick
}
=
useMenuClick
(
ctx
)
return
{
handleMenuClick
}
},
},
render
()
{
render
()
{
return
(
return
(
...
@@ -37,15 +49,15 @@ const navbar = defineComponent({
...
@@ -37,15 +49,15 @@ const navbar = defineComponent({
<
Logo
/>
<
Logo
/>
<
div
class
=
{
styles
.
nav
}
>
<
div
class
=
{
styles
.
nav
}
>
<
NMenu
<
NMenu
v
-
model
=
{
[
this
.
activeKey
,
'
value
'
]
}
default
-
value
=
'home'
mode
=
'horizontal'
mode
=
'horizontal'
options
=
{
this
.
m
enuOptions
}
options
=
{
this
.
headerM
enuOptions
}
onUpdateValue
=
{
this
.
handleMenuClick
}
onUpdateValue
=
{
this
.
handleMenuClick
}
/>
/>
</
div
>
</
div
>
<
div
class
=
{
styles
.
settings
}
>
<
div
class
=
{
styles
.
settings
}
>
<
Language
/>
<
Language
languageOptions
=
{
this
.
languageOptions
}
/>
<
User
/>
<
User
profileOptions
=
{
this
.
profileOptions
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-dataList.ts
已删除
100644 → 0
浏览文件 @
fb23b642
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
reactive
,
ref
,
h
}
from
'
vue
'
import
{
NIcon
}
from
'
naive-ui
'
import
{
HomeOutlined
,
ProfileOutlined
,
FolderOutlined
,
DatabaseOutlined
,
DesktopOutlined
,
SafetyCertificateOutlined
,
}
from
'
@vicons/antd
'
export
function
useDataList
()
{
const
renderIcon
=
(
icon
:
any
)
=>
{
return
()
=>
h
(
NIcon
,
null
,
{
default
:
()
=>
h
(
icon
)
})
}
const
menuOptions
=
[
{
label
:
'
首页
'
,
key
:
'
home
'
,
icon
:
renderIcon
(
HomeOutlined
),
},
{
label
:
'
项目管理
'
,
key
:
'
project
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
资源中心
'
,
key
:
'
resources
'
,
icon
:
renderIcon
(
FolderOutlined
),
},
{
label
:
'
数据源中心
'
,
key
:
'
datasource
'
,
icon
:
renderIcon
(
DatabaseOutlined
),
},
{
label
:
'
监控中心
'
,
key
:
'
monitor
'
,
icon
:
renderIcon
(
DesktopOutlined
),
},
{
label
:
'
安全中心
'
,
key
:
'
security
'
,
icon
:
renderIcon
(
SafetyCertificateOutlined
),
},
]
const
state
=
reactive
({
activeKey
:
ref
(
'
home
'
),
menuOptions
:
menuOptions
,
})
return
{
state
,
}
}
dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts
浏览文件 @
b2e2de7a
...
@@ -18,13 +18,15 @@
...
@@ -18,13 +18,15 @@
import
{
useRouter
}
from
'
vue-router
'
import
{
useRouter
}
from
'
vue-router
'
import
type
{
Router
}
from
'
vue-router
'
import
type
{
Router
}
from
'
vue-router
'
import
{
MenuOption
}
from
'
naive-ui
'
import
{
MenuOption
}
from
'
naive-ui
'
import
{
SetupContext
}
from
'
vue
'
export
function
useMenuClick
()
{
export
function
useMenuClick
(
ctx
:
SetupContext
<
Record
<
string
,
any
>>
)
{
const
router
:
Router
=
useRouter
()
const
router
:
Router
=
useRouter
()
const
handleMenuClick
=
(
key
:
string
,
item
:
MenuOption
)
=>
{
const
handleMenuClick
=
(
key
:
string
,
item
:
MenuOption
)
=>
{
console
.
log
(
key
,
item
)
// console.log(key, item)
router
.
push
({
path
:
'
home
'
})
ctx
.
emit
(
'
handleMenuClick
'
,
item
)
// router.push({ path: 'home' })
}
}
return
{
return
{
...
...
dolphinscheduler-ui-next/src/
store/route/types.t
s
→
dolphinscheduler-ui-next/src/
layouts/content/components/sidebar/index.module.scs
s
浏览文件 @
b2e2de7a
...
@@ -14,12 +14,3 @@
...
@@ -14,12 +14,3 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
{
RouteRecordRaw
}
from
'
vue-router
'
interface
RouteState
{
menus
:
RouteRecordRaw
[]
routers
:
any
[]
addRouters
:
any
[]
}
export
default
RouteState
dolphinscheduler-ui-next/src/layouts/content/components/
language/use-dataList.ts
→
dolphinscheduler-ui-next/src/layouts/content/components/
sidebar/index.tsx
浏览文件 @
b2e2de7a
...
@@ -15,26 +15,22 @@
...
@@ -15,26 +15,22 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
reactive
,
ref
}
from
'
vue
'
import
{
defineComponent
,
toRefs
}
from
'
vue
'
import
styles
from
'
./index.module.scss
'
import
{
NLayoutSider
,
NMenu
}
from
'
naive-ui
'
export
function
useDataList
()
{
const
sidebar
=
defineComponent
({
const
languageOptions
=
[
name
:
'
sidebar
'
,
{
setup
()
{
label
:
'
English
'
,
return
{}
key
:
'
en_US
'
,
},
},
render
()
{
{
return
(
label
:
'
中文
'
,
<
NLayoutSider
bordered
nativeScrollbar
=
{
false
}
show
-
trigger
=
'bar'
>
key
:
'
zh_CN
'
,
<
NMenu
/>
},
</
NLayoutSider
>
]
)
},
})
const
state
=
reactive
({
export
default
sidebar
chooseVal
:
ref
(
'
中文
'
),
languageOptions
:
languageOptions
,
})
return
{
state
,
}
}
dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
浏览文件 @
b2e2de7a
...
@@ -15,19 +15,23 @@
...
@@ -15,19 +15,23 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
defineComponent
,
toRefs
}
from
'
vue
'
import
{
defineComponent
,
PropType
}
from
'
vue
'
import
{
NDropdown
,
NIcon
,
NButton
}
from
'
naive-ui
'
import
{
NDropdown
,
NIcon
,
NButton
}
from
'
naive-ui
'
import
styles
from
'
./index.module.scss
'
import
styles
from
'
./index.module.scss
'
import
{
DownOutlined
,
UserOutlined
}
from
'
@vicons/antd
'
import
{
DownOutlined
,
UserOutlined
}
from
'
@vicons/antd
'
import
{
useDataList
}
from
'
./use-dataList
'
import
{
useDropDown
}
from
'
./use-dropdown
'
import
{
useDropDown
}
from
'
./use-dropdown
'
const
user
=
defineComponent
({
const
user
=
defineComponent
({
name
:
'
user
'
,
name
:
'
user
'
,
props
:
{
profileOptions
:
{
type
:
Array
as
PropType
<
any
>
,
default
:
[],
},
},
setup
()
{
setup
()
{
const
{
state
}
=
useDataList
()
const
{
handleSelect
}
=
useDropDown
()
const
{
handleSelect
}
=
useDropDown
()
return
{
...
toRefs
(
state
),
handleSelect
}
return
{
handleSelect
}
},
},
render
()
{
render
()
{
return
(
return
(
...
...
dolphinscheduler-ui-next/src/layouts/content/components/user/use-dataList.ts
已删除
100644 → 0
浏览文件 @
fb23b642
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
reactive
,
h
}
from
'
vue
'
import
{
NIcon
}
from
'
naive-ui
'
import
{
UserOutlined
,
LogoutOutlined
}
from
'
@vicons/antd
'
export
function
useDataList
()
{
const
renderIcon
=
(
icon
:
any
)
=>
{
return
()
=>
h
(
NIcon
,
null
,
{
default
:
()
=>
h
(
icon
)
})
}
const
profileOptions
=
[
{
label
:
'
用户信息
'
,
key
:
'
profile
'
,
icon
:
renderIcon
(
UserOutlined
),
},
{
label
:
'
退出登录
'
,
key
:
'
logout
'
,
icon
:
renderIcon
(
LogoutOutlined
),
},
]
const
state
=
reactive
({
profileOptions
:
profileOptions
,
})
return
{
state
,
}
}
dolphinscheduler-ui-next/src/layouts/content/index.tsx
浏览文件 @
b2e2de7a
...
@@ -15,21 +15,39 @@
...
@@ -15,21 +15,39 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
defineComponent
}
from
'
vue
'
import
{
defineComponent
,
toRefs
}
from
'
vue
'
import
{
NLayout
,
NLayoutContent
,
NLayoutHeader
}
from
'
naive-ui
'
import
{
NLayout
,
NLayoutContent
,
NLayoutHeader
}
from
'
naive-ui
'
import
NavBar
from
'
./components/navbar
'
import
NavBar
from
'
./components/navbar
'
import
SideBar
from
'
./components/sidebar
'
import
{
useDataList
}
from
'
./use-dataList
'
const
Content
=
defineComponent
({
const
Content
=
defineComponent
({
name
:
'
Content
'
,
name
:
'
Content
'
,
setup
()
{
const
{
state
,
getHeaderMenuOptions
}
=
useDataList
()
const
headerMenuOptions
=
getHeaderMenuOptions
(
state
.
menuOptions
)
const
getSideMenuOptions
=
(
item
:
any
)
=>
{
console
.
log
(
'
123
'
,
item
)
}
return
{
...
toRefs
(
state
),
headerMenuOptions
,
getSideMenuOptions
}
},
render
()
{
render
()
{
return
(
return
(
<
NLayout
>
<
NLayout
>
<
NLayoutHeader
>
<
NLayoutHeader
>
<
NavBar
></
NavBar
>
<
NavBar
onHandleMenuClick
=
{
this
.
getSideMenuOptions
}
headerMenuOptions
=
{
this
.
headerMenuOptions
}
languageOptions
=
{
this
.
languageOptions
}
profileOptions
=
{
this
.
profileOptions
}
></
NavBar
>
</
NLayoutHeader
>
</
NLayoutHeader
>
<
NLayoutContent
>
<
NLayout
has
-
sider
>
<
router
-
view
/>
<
SideBar
></
SideBar
>
</
NLayoutContent
>
<
NLayoutContent
>
<
router
-
view
/>
</
NLayoutContent
>
</
NLayout
>
</
NLayout
>
</
NLayout
>
)
)
},
},
...
...
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
0 → 100644
浏览文件 @
b2e2de7a
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the 'License'); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
reactive
,
h
}
from
'
vue
'
import
{
NIcon
}
from
'
naive-ui
'
import
{
HomeOutlined
,
ProfileOutlined
,
FolderOutlined
,
DatabaseOutlined
,
DesktopOutlined
,
SafetyCertificateOutlined
,
UserOutlined
,
LogoutOutlined
}
from
'
@vicons/antd
'
export
function
useDataList
()
{
const
renderIcon
=
(
icon
:
any
)
=>
{
return
()
=>
h
(
NIcon
,
null
,
{
default
:
()
=>
h
(
icon
)
})
}
const
menuOptions
=
[
{
label
:
'
首页
'
,
key
:
'
home
'
,
icon
:
renderIcon
(
HomeOutlined
),
},
{
label
:
'
项目管理
'
,
key
:
'
project
'
,
icon
:
renderIcon
(
ProfileOutlined
),
children
:
[
{
label
:
'
工作流监控
'
,
key
:
'
workflow-monitoring
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
工作流关系
'
,
key
:
'
workflow-relationships
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
工作流
'
,
key
:
'
workflow
'
,
icon
:
renderIcon
(
ProfileOutlined
),
children
:
[
{
label
:
'
工作流定义
'
,
key
:
'
workflow-definition
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
工作流实例
'
,
key
:
'
workflow-instance
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
任务实例
'
,
key
:
'
task-instance
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
]
},
]
},
{
label
:
'
资源中心
'
,
key
:
'
resources
'
,
icon
:
renderIcon
(
FolderOutlined
),
children
:
[
{
label
:
'
文件管理
'
,
key
:
'
file-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
UDF管理
'
,
key
:
'
UDF-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
children
:
[
{
label
:
'
资源管理
'
,
key
:
'
resource-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
函数管理
'
,
key
:
'
function-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
}
]
},
]
},
{
label
:
'
数据源中心
'
,
key
:
'
datasource
'
,
icon
:
renderIcon
(
DatabaseOutlined
),
},
{
label
:
'
监控中心
'
,
key
:
'
monitor
'
,
icon
:
renderIcon
(
DesktopOutlined
),
children
:
[
{
label
:
'
服务管理
'
,
key
:
'
service-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
children
:
[
{
label
:
'
Master
'
,
key
:
'
master
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
Worker
'
,
key
:
'
worker
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
DB
'
,
key
:
'
DB
'
,
icon
:
renderIcon
(
ProfileOutlined
),
}
]
},
{
label
:
'
统计管理
'
,
key
:
'
statistical-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
children
:
[
{
label
:
'
Statistics
'
,
key
:
'
statistics
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
]
},
]
},
{
label
:
'
安全中心
'
,
key
:
'
security
'
,
icon
:
renderIcon
(
SafetyCertificateOutlined
),
children
:
[
{
label
:
'
租户管理
'
,
key
:
'
tenant-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
用户管理
'
,
key
:
'
user-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
告警组管理
'
,
key
:
'
alarm-group-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
告警实例管理
'
,
key
:
'
alarm-instance-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
Worker分组管理
'
,
key
:
'
worker-group-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
Yarn 队列管理
'
,
key
:
'
yarn-queue-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
环境管理
'
,
key
:
'
environmental-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
{
label
:
'
令牌管理
'
,
key
:
'
token-management
'
,
icon
:
renderIcon
(
ProfileOutlined
),
},
]
},
]
const
languageOptions
=
[
{
label
:
'
English
'
,
key
:
'
en_US
'
,
},
{
label
:
'
中文
'
,
key
:
'
zh_CN
'
,
},
]
const
profileOptions
=
[
{
label
:
'
用户信息
'
,
key
:
'
profile
'
,
icon
:
renderIcon
(
UserOutlined
),
},
{
label
:
'
退出登录
'
,
key
:
'
logout
'
,
icon
:
renderIcon
(
LogoutOutlined
),
},
]
const
getHeaderMenuOptions
=
(
MenuOptions
:
any
)
=>
{
let
headerMenuOptions
=
[]
headerMenuOptions
=
MenuOptions
.
map
((
item
:
{
label
:
string
;
key
:
string
;
icon
:
any
})
=>
{
return
{
label
:
item
.
label
,
key
:
item
.
key
,
icon
:
item
.
icon
,
}
})
return
headerMenuOptions
}
const
state
=
reactive
({
menuOptions
:
menuOptions
,
languageOptions
:
languageOptions
,
profileOptions
:
profileOptions
,
})
return
{
state
,
getHeaderMenuOptions
}
}
dolphinscheduler-ui-next/src/store/route/route.ts
已删除
100644 → 0
浏览文件 @
fb23b642
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
toRaw
}
from
'
vue
'
import
{
defineStore
}
from
'
pinia
'
import
RouteState
from
'
./types
'
import
{
RouteRecordRaw
}
from
'
vue-router
'
export
const
useAsyncRouteStore
=
defineStore
({
id
:
'
route
'
,
state
:
():
RouteState
=>
({
menus
:
[],
routers
:
[],
addRouters
:
[],
}),
getters
:
{
getMenus
():
RouteRecordRaw
[]
{
return
this
.
menus
},
getRouters
():
RouteRecordRaw
[]
{
return
toRaw
(
this
.
addRouters
)
},
},
actions
:
{
setMenus
(
menus
)
{
this
.
menus
=
menus
},
async
generateRouters
(
routes
)
{
console
.
log
(
routes
)
},
},
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录