Skip to content

Commit 54e3804

Browse files
feat: user manage
1 parent 1dadc06 commit 54e3804

File tree

10 files changed

+89
-1
lines changed

10 files changed

+89
-1
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { h } from 'vue'
2+
export default {
3+
'app-resource-authorization': {
4+
iconReader: () => {
5+
return h('i', [
6+
h(
7+
'svg',
8+
{
9+
style: { height: '100%', width: '100%' },
10+
viewBox: '0 0 20 20',
11+
version: '1.1',
12+
xmlns: 'http://www.w3.org/2000/svg',
13+
},
14+
[
15+
h('path', {
16+
d: 'M10.354 0.484228C10.1252 0.417397 9.88209 0.417366 9.6533 0.484138L2.56643 2.55237C2.0332 2.70799 1.66663 3.19683 1.66663 3.75232V7.92864C1.66663 12.9588 4.8543 17.43 9.59603 19.076C9.85818 19.167 10.144 19.167 10.4061 19.076C15.1466 17.4299 18.3333 12.9597 18.3333 7.93073V3.75223C18.3333 3.19687 17.9669 2.7081 17.4338 2.55238L10.354 0.484228ZM3.33329 4.06476L10.0034 2.11815L16.6666 4.0646V7.93073C16.6666 12.199 13.9934 15.9986 10.001 17.4512C6.00742 15.9986 3.33329 12.1981 3.33329 7.92864V4.06476Z',
17+
fill: 'currentColor',
18+
}),
19+
h('path', {
20+
d: 'M10 10C8.61917 10 7.5 8.87917 7.5 7.5C7.5 6.12083 8.61917 5 10 5C11.3808 5 12.5 6.12083 12.5 7.5C12.5 8.87917 11.3808 10 10 10ZM10 8.33333C10.4604 8.33333 10.8333 7.95833 10.8333 7.5C10.8333 7.04167 10.4604 6.66667 10 6.66667C9.53958 6.66667 9.16667 7.04167 9.16667 7.5C9.16667 7.95833 9.53958 8.33333 10 8.33333Z',
21+
fill: 'currentColor',
22+
}),
23+
h('path', {
24+
d: 'M10.8333 14.5918C10.8333 14.8173 10.6467 15 10.4166 15H9.58329C9.35317 15 9.16663 14.8173 9.16663 14.5918L9.16663 8.7415C9.16663 8.51607 9.35317 8.33333 9.58329 8.33333H10.4166C10.6467 8.33333 10.8333 8.51607 10.8333 8.7415V14.5918Z',
25+
fill: 'currentColor',
26+
}),
27+
h('path', {
28+
d: 'M10.3571 12.5C10.1599 12.5 10 12.3135 10 12.0834V11.25C10 11.0199 10.1599 10.8334 10.3571 10.8334H12.1429C12.3401 10.8334 12.5 11.0199 12.5 11.25V12.0834C12.5 12.3135 12.3401 12.5 12.1429 12.5H10.3571Z',
29+
fill: 'currentColor',
30+
}),
31+
],
32+
),
33+
])
34+
},
35+
},
36+
'app-resource-authorization-active': {
37+
iconReader: () => {
38+
return h('i', [
39+
h(
40+
'svg',
41+
{
42+
style: { height: '100%', width: '100%' },
43+
viewBox: '0 0 20 20',
44+
version: '1.1',
45+
xmlns: 'http://www.w3.org/2000/svg',
46+
},
47+
[
48+
h('path', {
49+
d: 'M9.65332 0.483805C9.88209 0.417057 10.1257 0.416982 10.3545 0.483805L17.4336 2.55216C17.9667 2.70789 18.333 3.197 18.333 3.75236V7.93107C18.3329 12.9599 15.1465 17.4295 10.4062 19.0756C10.1441 19.1666 9.85786 19.1666 9.5957 19.0756C4.85437 17.4295 1.66718 12.959 1.66699 7.92912V3.75236C1.66699 3.19688 2.03317 2.70779 2.56641 2.55216L9.65332 0.483805ZM10 5.00041C8.61917 5.00041 7.5 6.12124 7.5 7.50041C7.50016 8.58756 8.19605 9.51433 9.16699 9.85783V14.5922C9.16717 14.8174 9.35315 15.0002 9.58301 15.0004H10.417C10.6469 15.0002 10.8328 14.8174 10.833 14.5922V12.5004H12.1426C12.3398 12.5004 12.5 12.3135 12.5 12.0834V11.2504C12.5 11.0203 12.3398 10.8334 12.1426 10.8334H10.833V9.85783C11.8039 9.51433 12.4998 8.58756 12.5 7.50041C12.5 6.12124 11.3808 5.00041 10 5.00041ZM10 6.66642C10.4604 6.66642 10.833 7.04207 10.833 7.50041C10.8328 7.95825 10.4608 8.33289 10.001 8.33341H9.99902C9.53918 8.33288 9.16719 7.95825 9.16699 7.50041C9.16699 7.04207 9.53958 6.66642 10 6.66642Z',
50+
fill: 'currentColor',
51+
}),
52+
],
53+
),
54+
])
55+
},
56+
},
57+
}

ui/src/layout/app-main/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ import { useRoute } from 'vue-router'
1414
1515
const route = useRoute()
1616
17+
18+
1719
const cachedViews: any = ref([])
1820
onBeforeUpdate(() => {
21+
1922
const { name, meta } = route
2023
if (name && !cachedViews.value.includes(name)) {
2124
cachedViews.value.push(name)

ui/src/locales/lang/en-US/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import dataset from './dataset'
55
import system from './system'
66
import tool from './tool'
77
import userManage from './user-manage'
8+
import resourceAuthorization from './resource-authorization'
89
import team from './team'
910
import model from './model'
1011
import document from './document'
@@ -21,6 +22,7 @@ export default {
2122
system,
2223
tool,
2324
userManage,
25+
resourceAuthorization,
2426
team,
2527
model,
2628
dataset,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
title: 'Resource Authorization',
3+
}

ui/src/locales/lang/zh-CN/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import tool from './tool'
55
import document from './document'
66
import system from './system'
77
import userManage from './user-manage'
8+
import resourceAuthorization from './resource-authorization'
89
// import notFound from './404'
910
// import application from './application'
1011
// import applicationOverview from './application-overview'
@@ -26,6 +27,7 @@ export default {
2627
document,
2728
system,
2829
userManage,
30+
resourceAuthorization
2931
// notFound,
3032
// application,
3133
// applicationOverview,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
title: '资源授权',
3+
}

ui/src/locales/lang/zh-Hant/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import dataset from './dataset'
55
import system from './system'
66
import tool from './tool'
77
import userManage from './user-manage'
8+
import resourceAuthorization from './resource-authorization'
89
import team from './team'
910
import model from './model'
1011
import document from './document'
@@ -21,6 +22,7 @@ export default {
2122
system,
2223
tool,
2324
userManage,
25+
resourceAuthorization,
2426
team,
2527
model,
2628
dataset,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
title: '资源授权',
3+
}

ui/src/router/modules/system.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ const systemRouter = {
1919
},
2020
component: () => import('@/views/user-manage/index.vue'),
2121
},
22+
{
23+
path: '/system/authorization',
24+
name: 'authorization',
25+
meta: {
26+
icon: 'app-resource-authorization',
27+
iconActive: 'app-resource-authorization-active',
28+
title: 'views.resourceAuthorization.title',
29+
activeMenu: '/system',
30+
parentPath: '/system',
31+
parentName: 'system',
32+
},
33+
component: () => import('@/views/resource-authorization/index.vue'),
34+
},
2235
],
2336
}
2437

ui/src/views/resources-authorization/index.vue renamed to ui/src/views/resource-authorization/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<template>111</template>
1+
<template><span>22222</span></template>
22

33
<script lang="ts" setup>
44
import { onMounted, ref, reactive, watch } from 'vue'

0 commit comments

Comments
 (0)