Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
994681fd
Commit
994681fd
authored
Jul 01, 2021
by
水落(YangLei)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 菜单管理bug修复
parent
a5b6726e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
13 deletions
+43
-13
README.md
README.md
+9
-0
src/api/menu.js
src/api/menu.js
+14
-2
src/components/menu_tree/index.vue
src/components/menu_tree/index.vue
+2
-1
src/components/menu_tree/select.vue
src/components/menu_tree/select.vue
+0
-1
src/components/table/index.vue
src/components/table/index.vue
+1
-1
src/config/setting.config.js
src/config/setting.config.js
+2
-2
src/pages/system/view/menu/MenuManagement.vue
src/pages/system/view/menu/MenuManagement.vue
+1
-1
src/pages/system/view/menu/form.vue
src/pages/system/view/menu/form.vue
+3
-2
src/pages/system/view/role/RoleManagement.vue
src/pages/system/view/role/RoleManagement.vue
+1
-1
src/pages/system/view/role/form.vue
src/pages/system/view/role/form.vue
+1
-1
src/pages/user/components/message.vue
src/pages/user/components/message.vue
+9
-1
No files found.
README.md
View file @
994681fd
...
...
@@ -30,3 +30,12 @@ $ npm run serve
css 工具函数 地址
https://www.tailwindcss.cn/docs/installation#post-css-7
已完成:
1、菜单增删改
问题:
1、通知接口 404 导致后续没开发了
2、角色,新增,修改, functionAuthority 菜单权限这个字段不知道怎么传
3、系统日志,没发现api,之前系统也没页面。不知道怎么搞
src/api/menu.js
View file @
994681fd
...
...
@@ -4,14 +4,26 @@ export function delMenuApi(id) {
return
delReq
(
`/api/v1/menus/
${
id
}
`
);
}
export
function
getMenuDataApi
()
{
return
getReq
(
'
/api/v1/menus
'
);
/**
* 缓存下,菜单变化的可能性比较小
*/
let
menus
=
[];
export
async
function
getMenuDataApi
(
useCache
)
{
if
(
menus
.
length
&&
useCache
)
return
menus
;
return
getReq
(
'
/api/v1/menus
'
).
then
(
res
=>
{
menus
=
res
;
return
res
;
});
}
export
function
addMenuApi
(
data
)
{
return
postReq
(
'
/api/v1/menus
'
,
data
);
}
export
function
updateMenuApi
(
data
)
{
return
putReq
(
'
/api/v1/menus
'
,
data
);
}
export
function
addRoleApi
(
data
)
{
return
postReq
(
'
/api/v1/roles
'
,
data
);
}
...
...
src/components/menu_tree/index.vue
View file @
994681fd
...
...
@@ -38,7 +38,8 @@ export default {
};
},
async
mounted
()
{
this
.
rawData
=
await
getMenuDataApi
();
// 使用 缓存
this
.
rawData
=
await
getMenuDataApi
(
true
);
this
.
treeData
=
convertListToTree
(
this
.
rawData
,
!
this
.
showMenu
);
this
.
$emit
(
'
check
'
,
this
.
defaultCheckedKeys
);
this
.
expandedKeys
=
this
.
defaultCheckedKeys
;
...
...
src/components/menu_tree/select.vue
View file @
994681fd
...
...
@@ -34,7 +34,6 @@ export default {
},
async
mounted
()
{
this
.
treeData
=
convertListToTree
(
await
getMenuDataApi
(),
true
);
console
.
log
(
this
.
treeData
);
},
};
</
script
>
src/components/table/index.vue
View file @
994681fd
...
...
@@ -125,7 +125,7 @@ export default {
},
watch
:
{
addVisible
(
val
)
{
if
(
!
val
&&
this
.
addBtn
.
onCancel
)
this
.
addBtn
.
onCancel
();
if
(
!
val
&&
this
?.
addBtn
?
.
onCancel
)
this
.
addBtn
.
onCancel
();
},
},
mounted
()
{
...
...
src/config/setting.config.js
View file @
994681fd
...
...
@@ -18,8 +18,8 @@ const settingConfig = {
multiPage
:
true
,
//多页签模式,true:开启,false:不开启
cachePage
:
true
,
//是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
hideSetting
:
false
,
//隐藏设置抽屉,true:隐藏,false:不隐藏
systemCode
:
"
Akina
"
,
//系统编码
systemName
:
"
Akina Antd Vue Pro
"
,
//系统名称
systemCode
:
"
Karot
"
,
//系统编码
systemName
:
"
Karot文档管理系统
"
,
//系统名称
copyright
:
"
2021~ C.T 工作室出品
"
,
//copyright
asyncRoutes
:
false
,
//异步加载路由,true:开启,false:不开启
showPageTitle
:
true
,
//是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
...
...
src/pages/system/view/menu/MenuManagement.vue
View file @
994681fd
...
...
@@ -55,7 +55,7 @@ export default {
edit
(
data
)
{
this
.
$refs
[
'
table
'
]?.
show
({
type
:
1
});
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
addForm
'
].
setEdit
(
data
);
this
.
$refs
[
'
addForm
'
].
setEdit
(
{
...
data
}
);
});
},
},
...
...
src/pages/system/view/menu/form.vue
View file @
994681fd
...
...
@@ -31,7 +31,7 @@
</
template
>
<
script
>
import
{
addMenuApi
}
from
'
@/api
'
;
import
{
addMenuApi
,
updateMenuApi
}
from
'
@/api
'
;
import
MenuTree
from
'
@/components/menu_tree/select.vue
'
;
export
default
{
...
...
@@ -58,7 +58,8 @@ export default {
methods
:
{
async
submit
()
{
await
this
.
$refs
[
'
form
'
].
validate
();
return
addMenuApi
({
...
this
.
form
,
parentMenuId
:
this
.
form
.
parentMenuId
??
0
});
const
reqData
=
{
...
this
.
form
,
parentMenuId
:
this
.
form
.
parentMenuId
??
0
};
return
this
.
isEdit
?
updateMenuApi
(
reqData
)
:
addMenuApi
(
reqData
);
},
setEdit
(
data
)
{
this
.
type
=
1
;
...
...
src/pages/system/view/role/RoleManagement.vue
View file @
994681fd
...
...
@@ -34,7 +34,7 @@ export default {
this
.
$refs
[
'
table
'
]?.
getData
();
},
view
(
data
,
type
)
{
this
.
$refs
[
'
table
'
]?.
show
({
type
});
this
.
$refs
[
'
table
'
]?.
show
({
type
,
noFooter
:
type
===
2
});
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
form
'
].
setData
({
...
data
},
type
);
});
...
...
src/pages/system/view/role/form.vue
View file @
994681fd
...
...
@@ -41,7 +41,7 @@ export default {
computed
:
{},
methods
:
{
submit
()
{
const
query
=
{
...
this
.
form
,
authorityList
:
this
.
$refs
[
'
menuTree
'
].
get
(
)
};
const
query
=
{
...
this
.
form
,
functionAuthority
:
this
.
checkedKeys
.
map
(
i
=>
i
.
toString
()
)
};
return
this
.
isEdit
?
updateRoleApi
(
query
)
:
addRoleApi
(
query
);
},
setData
(
data
,
type
)
{
...
...
src/pages/user/components/message.vue
View file @
994681fd
<
template
>
<h1>
消息仲系
</h1>
<my-table
url=
"/api/v1/messages/notice"
>
<a-table-column
title=
"标题"
data-index=
"noticeTitle"
/>
<a-table-column
title=
"内容"
data-index=
"noticeContent"
/>
<a-table-column
title=
"创建时间"
data-index=
"createTime"
/>
<a-table-column
title=
"发送者"
data-index=
"noticeSenderName"
/>
<a-table-column
title=
"接受者"
data-index=
"noticeReceiverName"
/>
<a-table-column
title=
"是否已读"
data-index=
"isReadName"
/>
<a-table-column
title=
"已读时间"
data-index=
"readTime"
/>
</my-table>
</
template
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment