Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
sage-front-framework
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
郁骅焌
sage-front-framework
Commits
c78b458c
提交
c78b458c
authored
6月 16, 2020
作者:
郁骅焌
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
个人中心
上级
14373d7a
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
144 行增加
和
42 行删除
+144
-42
cacheRoutes.js
config/cacheRoutes.js
+2
-1
config.js
config/config.js
+5
-0
index.jsx
src/components/Business/MenuTree/index.jsx
+4
-2
index.jsx
src/components/Common/Message/index.jsx
+2
-2
index.js
src/components/Common/index.js
+2
-2
AvatarDropdown.jsx
src/components/GlobalHeader/AvatarDropdown.jsx
+9
-6
RightContent.jsx
src/components/GlobalHeader/RightContent.jsx
+5
-1
index.jsx
src/components/TabBar/index.jsx
+7
-0
config.js
src/config.js
+3
-0
BasicLayout.jsx
src/layouts/BasicLayout.jsx
+20
-4
index.jsx
src/pages/demo/crud/index.jsx
+4
-4
index.jsx
src/pages/dept/index.jsx
+5
-5
index.jsx
src/pages/menu/index.jsx
+7
-6
index.jsx
src/pages/role/index.jsx
+5
-5
index.jsx
src/pages/user/center/index.jsx
+56
-0
style.less
src/pages/user/center/style.less
+4
-0
index.jsx
src/pages/user/manage/index.jsx
+4
-4
没有找到文件。
config/cacheRoutes.js
浏览文件 @
c78b458c
...
@@ -2,7 +2,8 @@ const routes = [
...
@@ -2,7 +2,8 @@ const routes = [
'/system/role'
,
'/system/role'
,
'/system/menu'
,
'/system/menu'
,
'/system/dept'
,
'/system/dept'
,
'/system/user'
'/system/user'
,
'/system/center'
]
]
export
default
{
export
default
{
...
...
config/config.js
浏览文件 @
c78b458c
...
@@ -98,6 +98,11 @@ export default defineConfig({
...
@@ -98,6 +98,11 @@ export default defineConfig({
icon
:
'SolutionOutlined'
,
icon
:
'SolutionOutlined'
,
component
:
'./user/manage'
,
component
:
'./user/manage'
,
},
},
{
path
:
'/system/center'
,
name
:
'center'
,
component
:
'./user/center'
,
},
],
],
},
},
{
{
...
...
src/components/Business/MenuTree/index.jsx
浏览文件 @
c78b458c
...
@@ -22,6 +22,7 @@ const MenuTree = (props, ref) => {
...
@@ -22,6 +22,7 @@ const MenuTree = (props, ref) => {
const
[
halfCheckedKeys
,
setHalfCheckedKeys
]
=
useState
([])
const
[
halfCheckedKeys
,
setHalfCheckedKeys
]
=
useState
([])
const
[
selectedKeys
,
setSelectedKeys
]
=
useState
([]);
const
[
selectedKeys
,
setSelectedKeys
]
=
useState
([]);
const
[
autoExpandParent
,
setAutoExpandParent
]
=
useState
(
true
);
const
[
autoExpandParent
,
setAutoExpandParent
]
=
useState
(
true
);
const
[
checkStrictly
,
setCheckStrictly
]
=
useState
(
true
)
const
queryMenu
=
async
()
=>
{
const
queryMenu
=
async
()
=>
{
const
res
=
await
getMenu
()
const
res
=
await
getMenu
()
...
@@ -66,13 +67,14 @@ const MenuTree = (props, ref) => {
...
@@ -66,13 +67,14 @@ const MenuTree = (props, ref) => {
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
setCheckedKeys
,
setCheckedKeys
,
getCheckedKeys
,
getCheckedKeys
,
getHalfCheckedKeys
getHalfCheckedKeys
,
setCheckStrictly
}))
}))
return
(
return
(
<
SageTree
<
SageTree
checkable
checkable
// checkStrictly
// checkStrictly
={checkStrictly}
onExpand=
{
onExpand
}
onExpand=
{
onExpand
}
expandedKeys=
{
expandedKeys
}
expandedKeys=
{
expandedKeys
}
autoExpandParent=
{
autoExpandParent
}
autoExpandParent=
{
autoExpandParent
}
...
...
src/components/Common/Message/index.jsx
浏览文件 @
c78b458c
import
{
message
}
from
'antd'
import
{
message
}
from
'antd'
const
s
ageMessage
=
{
const
S
ageMessage
=
{
success
:
(
text
)
=>
message
.
success
(
text
)
success
:
(
text
)
=>
message
.
success
(
text
)
}
}
export
default
s
ageMessage
export
default
S
ageMessage
src/components/Common/index.js
浏览文件 @
c78b458c
...
@@ -4,7 +4,7 @@ import ActionSet from './ActionSet'
...
@@ -4,7 +4,7 @@ import ActionSet from './ActionSet'
import
SageModal
from
'./Modal'
import
SageModal
from
'./Modal'
import
SageForm
from
'./Form'
import
SageForm
from
'./Form'
import
SageTree
from
'./Tree'
import
SageTree
from
'./Tree'
import
s
ageMessage
from
'./Message'
import
S
ageMessage
from
'./Message'
import
SageLayoutLR
from
'./Layout/LayoutLR'
import
SageLayoutLR
from
'./Layout/LayoutLR'
export
{
export
{
...
@@ -15,5 +15,5 @@ export {
...
@@ -15,5 +15,5 @@ export {
SageModal
,
SageModal
,
SageForm
,
SageForm
,
SageTree
,
SageTree
,
s
ageMessage
S
ageMessage
}
}
src/components/GlobalHeader/AvatarDropdown.jsx
浏览文件 @
c78b458c
...
@@ -31,6 +31,11 @@ class AvatarDropdown extends React.Component {
...
@@ -31,6 +31,11 @@ class AvatarDropdown extends React.Component {
return
;
return
;
}
}
if
(
key
===
'center'
)
{
this
.
props
.
goCenter
()
return
;
}
history
.
push
(
`/account/
${
key
}
`
);
history
.
push
(
`/account/
${
key
}
`
);
};
};
...
@@ -45,12 +50,6 @@ class AvatarDropdown extends React.Component {
...
@@ -45,12 +50,6 @@ class AvatarDropdown extends React.Component {
const
menuHeaderDropdown
=
(
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
{
menu
&&
(
{
menu
&&
(
<
Menu
.
Item
key=
"center"
>
<
UserOutlined
/>
个人中心
</
Menu
.
Item
>
)
}
{
menu
&&
(
<
Menu
.
Item
key=
"settings"
>
<
Menu
.
Item
key=
"settings"
>
<
SettingOutlined
/>
<
SettingOutlined
/>
个人设置
个人设置
...
@@ -58,6 +57,10 @@ class AvatarDropdown extends React.Component {
...
@@ -58,6 +57,10 @@ class AvatarDropdown extends React.Component {
)
}
)
}
{
menu
&&
<
Menu
.
Divider
/>
}
{
menu
&&
<
Menu
.
Divider
/>
}
<
Menu
.
Item
key=
"center"
>
<
UserOutlined
/>
个人中心
</
Menu
.
Item
>
<
Menu
.
Item
key=
"logout"
>
<
Menu
.
Item
key=
"logout"
>
<
LogoutOutlined
/>
<
LogoutOutlined
/>
退出登录
退出登录
...
...
src/components/GlobalHeader/RightContent.jsx
浏览文件 @
c78b458c
...
@@ -21,6 +21,10 @@ const GlobalHeaderRight = props => {
...
@@ -21,6 +21,10 @@ const GlobalHeaderRight = props => {
className
=
`
${
styles
.
right
}
${
styles
.
dark
}
`
;
className
=
`
${
styles
.
right
}
${
styles
.
dark
}
`
;
}
}
const
goCenter
=
()
=>
{
props
.
goCenter
()
}
return
(
return
(
<
div
className=
{
className
}
>
<
div
className=
{
className
}
>
{
/* <HeaderSearch
{
/* <HeaderSearch
...
@@ -61,7 +65,7 @@ const GlobalHeaderRight = props => {
...
@@ -61,7 +65,7 @@ const GlobalHeaderRight = props => {
// </a>
// </a>
// </Tooltip>
// </Tooltip>
}
}
<
Avatar
/>
<
Avatar
goCenter=
{
goCenter
}
/>
{
REACT_APP_ENV
&&
(
{
REACT_APP_ENV
&&
(
<
span
>
<
span
>
<
Tag
color=
{
ENVTagColor
[
REACT_APP_ENV
]
}
>
{
REACT_APP_ENV
}
</
Tag
>
<
Tag
color=
{
ENVTagColor
[
REACT_APP_ENV
]
}
>
{
REACT_APP_ENV
}
</
Tag
>
...
...
src/components/TabBar/index.jsx
浏览文件 @
c78b458c
...
@@ -161,9 +161,16 @@ const TabBar = (props, ref) => {
...
@@ -161,9 +161,16 @@ const TabBar = (props, ref) => {
</
Menu
>
</
Menu
>
);
);
const
getPanes
=
()
=>
{
return
panes
}
// 暴露外部方法
// 暴露外部方法
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
onChange
,
onChange
,
getPanes
,
setPanes
,
setActiveKey
}));
}));
return
(
return
(
...
...
src/config.js
0 → 100644
浏览文件 @
c78b458c
export
default
{
IconUrl
:
'//at.alicdn.com/t/font_1873986_zq2zexdsrnm.js'
}
src/layouts/BasicLayout.jsx
浏览文件 @
c78b458c
...
@@ -13,6 +13,7 @@ import RightContent from '@/components/GlobalHeader/RightContent';
...
@@ -13,6 +13,7 @@ import RightContent from '@/components/GlobalHeader/RightContent';
import
TabBar
from
'@/components/TabBar'
;
import
TabBar
from
'@/components/TabBar'
;
import
GlobalFooter
from
'@/components/GlobalFooter'
;
import
GlobalFooter
from
'@/components/GlobalFooter'
;
import
{
getAuthorityFromRouter
}
from
'@/utils/utils'
;
import
{
getAuthorityFromRouter
}
from
'@/utils/utils'
;
import
config
from
'@/config.js'
import
logo
from
'../assets/logo.svg'
;
import
logo
from
'../assets/logo.svg'
;
import
'./BasicLayout.less'
import
'./BasicLayout.less'
...
@@ -20,7 +21,7 @@ import './BasicLayout.less'
...
@@ -20,7 +21,7 @@ import './BasicLayout.less'
const
{
REACT_APP_ENV
}
=
process
.
env
;
const
{
REACT_APP_ENV
}
=
process
.
env
;
const
IconFont
=
createFromIconfontCN
({
const
IconFont
=
createFromIconfontCN
({
scriptUrl
:
'//at.alicdn.com/t/font_1873986_46xeik9dra8.js'
,
scriptUrl
:
config
.
IconUrl
,
});
});
const
{
SubMenu
}
=
Menu
;
const
{
SubMenu
}
=
Menu
;
...
@@ -240,7 +241,21 @@ const BasicLayout = (props) => {
...
@@ -240,7 +241,21 @@ const BasicLayout = (props) => {
* init variables
* init variables
*/
*/
console
.
log
(
props
.
children
)
// 跳转到个人中心
const
goCenter
=
()
=>
{
checkMenuOpen
(
'/system/center'
)
handleSelectMenu
({
key
:
'/system/center'
})
// const panes = tabBarRef.current.getPanes()
// if (!panes.some(item => item.key === '/system/center')) {
// panes.push({
// title: '个人中心',
// key: '/system/center'
// })
// tabBarRef.current.setPanes(panes);
// }
// tabBarRef.current.setActiveKey('/system/center');
// history.push('/system/center');
}
return
(
return
(
...
@@ -277,9 +292,10 @@ const BasicLayout = (props) => {
...
@@ -277,9 +292,10 @@ const BasicLayout = (props) => {
collapsed
?
<
MenuUnfoldOutlined
style=
{
{
fontSize
:
'20px'
}
}
/>
:
<
MenuFoldOutlined
style=
{
{
fontSize
:
'20px'
}
}
/>
collapsed
?
<
MenuUnfoldOutlined
style=
{
{
fontSize
:
'20px'
}
}
/>
:
<
MenuFoldOutlined
style=
{
{
fontSize
:
'20px'
}
}
/>
}
}
</
div
>
</
div
>
<
RightContent
/>
<
RightContent
goCenter=
{
goCenter
}
/>
</
div
>
</
div
>
<
TabBar
ref=
{
tabBarRef
}
<
TabBar
ref=
{
tabBarRef
}
currentUser=
{
currentUser
}
currentUser=
{
currentUser
}
menuTree=
{
menuTree
}
menuTree=
{
menuTree
}
setSelectedKeys=
{
setSelectedKeys
}
setSelectedKeys=
{
setSelectedKeys
}
...
...
src/pages/demo/crud/index.jsx
浏览文件 @
c78b458c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
SageTable
,
SageModal
,
SageButton
,
s
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
SageTable
,
SageModal
,
SageButton
,
S
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
PlusOutlined
,
EditOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
EditOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
getEnumDropDownList
}
from
'@/services/enum'
import
{
getEnumDropDownList
}
from
'@/services/enum'
...
@@ -199,7 +199,7 @@ const CrudList = () => {
...
@@ -199,7 +199,7 @@ const CrudList = () => {
const
res
=
await
removeCrud
({
idArr
:
[
record
.
id
]
})
const
res
=
await
removeCrud
({
idArr
:
[
record
.
id
]
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -426,7 +426,7 @@ const CrudList = () => {
...
@@ -426,7 +426,7 @@ const CrudList = () => {
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
res
=
await
removeCrud
({
idArr
:
rowRecords
})
const
res
=
await
removeCrud
({
idArr
:
rowRecords
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -504,7 +504,7 @@ const CrudList = () => {
...
@@ -504,7 +504,7 @@ const CrudList = () => {
setModalLoading
(
false
)
setModalLoading
(
false
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
modalRef
.
current
.
setVisible
(
false
)
modalRef
.
current
.
setVisible
(
false
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
...
...
src/pages/dept/index.jsx
浏览文件 @
c78b458c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Switch
,
Modal
}
from
'antd'
import
{
Switch
,
Modal
}
from
'antd'
import
{
SageTable
,
SageModal
,
SageButton
,
s
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
SageTable
,
SageModal
,
SageButton
,
S
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
PlusOutlined
,
EditOutlined
,
SwapOutlined
,
ExclamationCircleOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
EditOutlined
,
SwapOutlined
,
ExclamationCircleOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
getEnumDropDownList
}
from
'@/services/enum'
import
{
getEnumDropDownList
}
from
'@/services/enum'
...
@@ -110,7 +110,7 @@ const DeptList = () => {
...
@@ -110,7 +110,7 @@ const DeptList = () => {
const
res
=
await
removeDept
({
id
:
record
.
id
})
const
res
=
await
removeDept
({
id
:
record
.
id
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -138,7 +138,7 @@ const DeptList = () => {
...
@@ -138,7 +138,7 @@ const DeptList = () => {
}
}
loopChangeStatus
(
tableData
)
loopChangeStatus
(
tableData
)
tableRef
.
current
.
setDataSource
(
tableData
)
tableRef
.
current
.
setDataSource
(
tableData
)
s
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
S
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
}
}
},
},
onCancel
:
()
=>
{
onCancel
:
()
=>
{
...
@@ -253,7 +253,7 @@ const DeptList = () => {
...
@@ -253,7 +253,7 @@ const DeptList = () => {
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
res
=
await
removeDept
({
idArr
:
rowRecords
})
const
res
=
await
removeDept
({
idArr
:
rowRecords
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -314,7 +314,7 @@ const DeptList = () => {
...
@@ -314,7 +314,7 @@ const DeptList = () => {
setModalLoading
(
false
)
setModalLoading
(
false
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
modalRef
.
current
.
setVisible
(
false
)
modalRef
.
current
.
setVisible
(
false
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
...
...
src/pages/menu/index.jsx
浏览文件 @
c78b458c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
SageTable
,
SageModal
,
SageButton
,
s
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
SageTable
,
SageModal
,
SageButton
,
S
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
createFromIconfontCN
,
PlusOutlined
,
EditOutlined
,
ReloadOutlined
,
SwapOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
{
createFromIconfontCN
,
PlusOutlined
,
EditOutlined
,
ReloadOutlined
,
SwapOutlined
,
DeleteOutlined
,
VerticalAlignBottomOutlined
,
VerticalAlignTopOutlined
}
from
'@ant-design/icons'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
config
from
'@/config'
import
{
getEnumDropDownList
}
from
'@/services/enum'
import
{
getEnumDropDownList
}
from
'@/services/enum'
import
{
queryMenu
,
updateMenu
,
addMenu
,
removeMenu
,
getMenuDetail
,
clearMenu
}
from
'./service'
;
import
{
queryMenu
,
updateMenu
,
addMenu
,
removeMenu
,
getMenuDetail
,
clearMenu
}
from
'./service'
;
import
CreateForm
from
'./components/CreateForm'
import
CreateForm
from
'./components/CreateForm'
import
UpdateForm
from
'./components/UpdateForm'
import
UpdateForm
from
'./components/UpdateForm'
const
IconFont
=
createFromIconfontCN
({
const
IconFont
=
createFromIconfontCN
({
scriptUrl
:
'//at.alicdn.com/t/font_1873986_46xeik9dra8.js'
,
scriptUrl
:
config
.
IconUrl
,
});
});
// 详情数据
// 详情数据
...
@@ -113,7 +114,7 @@ const MenuList = () => {
...
@@ -113,7 +114,7 @@ const MenuList = () => {
const
res
=
await
removeMenu
({
id
:
record
.
id
})
const
res
=
await
removeMenu
({
id
:
record
.
id
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -262,7 +263,7 @@ const MenuList = () => {
...
@@ -262,7 +263,7 @@ const MenuList = () => {
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
rowRecords
=
tableRef
.
current
.
getSelectedRowKeys
()
const
res
=
await
removeMenu
({
idArr
:
rowRecords
})
const
res
=
await
removeMenu
({
idArr
:
rowRecords
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -281,7 +282,7 @@ const MenuList = () => {
...
@@ -281,7 +282,7 @@ const MenuList = () => {
const
onRefreshMenu
=
async
()
=>
{
const
onRefreshMenu
=
async
()
=>
{
const
res
=
await
clearMenu
()
const
res
=
await
clearMenu
()
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'菜单更新成功'
)
S
ageMessage
.
success
(
'菜单更新成功'
)
}
}
}
}
...
@@ -335,7 +336,7 @@ const MenuList = () => {
...
@@ -335,7 +336,7 @@ const MenuList = () => {
setModalLoading
(
false
)
setModalLoading
(
false
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
modalRef
.
current
.
setVisible
(
false
)
modalRef
.
current
.
setVisible
(
false
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
...
...
src/pages/role/index.jsx
浏览文件 @
c78b458c
import
React
,
{
useState
,
useRef
}
from
'react'
import
React
,
{
useState
,
useRef
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Switch
,
Modal
}
from
'antd'
import
{
Card
,
Switch
,
Modal
}
from
'antd'
import
{
SageLayoutLR
,
SageTable
,
SageModal
,
SageForm
,
SageButton
,
s
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
SageLayoutLR
,
SageTable
,
SageModal
,
SageForm
,
SageButton
,
S
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
MenuTree
}
from
'@/components/Business'
import
{
MenuTree
}
from
'@/components/Business'
import
{
PlusOutlined
,
CheckOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
CheckOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
queryRule
,
updateRule
,
addRule
,
removeRule
,
getRuleDetail
,
openOrClose
}
from
'./service'
;
import
{
queryRule
,
updateRule
,
addRule
,
removeRule
,
getRuleDetail
,
openOrClose
}
from
'./service'
;
...
@@ -86,7 +86,7 @@ const TableList = () => {
...
@@ -86,7 +86,7 @@ const TableList = () => {
const
res
=
await
removeRule
({
id
:
record
.
id
})
const
res
=
await
removeRule
({
id
:
record
.
id
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -124,7 +124,7 @@ const TableList = () => {
...
@@ -124,7 +124,7 @@ const TableList = () => {
}
}
}
}
tableRef
.
current
.
setDataSource
(
tableData
)
tableRef
.
current
.
setDataSource
(
tableData
)
s
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
S
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
}
}
},
},
onCancel
:
()
=>
{
onCancel
:
()
=>
{
...
@@ -241,7 +241,7 @@ const TableList = () => {
...
@@ -241,7 +241,7 @@ const TableList = () => {
setModalLoading
(
false
)
setModalLoading
(
false
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
modalRef
.
current
.
setVisible
(
false
)
modalRef
.
current
.
setVisible
(
false
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
...
@@ -261,7 +261,7 @@ const TableList = () => {
...
@@ -261,7 +261,7 @@ const TableList = () => {
const
res
=
await
updateRule
(
pp
)
const
res
=
await
updateRule
(
pp
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
}
}
}
}
...
...
src/pages/user/center/index.jsx
0 → 100644
浏览文件 @
c78b458c
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Switch
,
Modal
}
from
'antd'
import
{
connect
}
from
'umi'
import
{
SageLayoutLR
,
SageTable
,
SageModal
,
SageForm
,
SageButton
,
SageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
getUserDetail
}
from
'@/pages/user/manage/service'
import
style
from
'./style.less'
const
Center
=
(
props
)
=>
{
const
[
userDetail
,
setUserDetail
]
=
useState
({})
const
requestCenterInfo
=
async
()
=>
{
const
res
=
await
getUserDetail
({
id
:
props
.
user
.
currentUser
.
userId
})
if
(
res
.
isSuccess
)
{
setUserDetail
(
res
.
data
)
}
}
useEffect
(()
=>
{
requestCenterInfo
()
},
[])
return
(
<
PageHeaderWrapper
>
<
SageLayoutLR
leftWidth=
"300"
left=
{
<
Card
title=
"个人信息"
size=
"small"
style=
{
{
height
:
'100%'
}
}
>
<
div
>
<
div
className=
{
style
[
"center-avator"
]
}
>
<
img
src=
""
width=
"120"
height=
"120"
/>
</
div
>
<
div
className=
{
style
[
"user-info"
]
}
>
<
div
></
div
>
</
div
>
</
div
>
</
Card
>
}
right=
{
<
div
style=
{
{
paddingLeft
:
12
,
height
:
'100%'
}
}
>
<
Card
title=
"基本资料"
size=
"small"
style=
{
{
height
:
'100%'
}
}
>
修改密码
</
Card
>
</
div
>
}
/>
</
PageHeaderWrapper
>
)
}
export
default
connect
(({
user
})
=>
({
user
}))(
Center
)
src/pages/user/center/style.less
0 → 100644
浏览文件 @
c78b458c
.center-avator {
margin: 12px 0;
text-align: center;
}
src/pages/user/manage/index.jsx
浏览文件 @
c78b458c
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react'
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Modal
,
Switch
}
from
'antd'
import
{
Card
,
Modal
,
Switch
}
from
'antd'
import
moment
from
'moment'
import
moment
from
'moment'
import
{
SageLayoutLR
,
SageTable
,
SageModal
,
SageForm
,
SageButton
,
s
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
SageLayoutLR
,
SageTable
,
SageModal
,
SageForm
,
SageButton
,
S
ageMessage
,
ActionSet
}
from
'@/components/Common'
import
{
DeptTree
}
from
'@/components/Business'
import
{
DeptTree
}
from
'@/components/Business'
import
{
PlusOutlined
,
RedoOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
RedoOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
queryUser
,
updateUser
,
addUser
,
removeUser
,
getUserDetail
,
openOrClose
}
from
'./service'
;
import
{
queryUser
,
updateUser
,
addUser
,
removeUser
,
getUserDetail
,
openOrClose
}
from
'./service'
;
...
@@ -102,7 +102,7 @@ const TableList = () => {
...
@@ -102,7 +102,7 @@ const TableList = () => {
const
res
=
await
removeUser
({
id
:
record
.
loginId
})
const
res
=
await
removeUser
({
id
:
record
.
loginId
})
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'删除成功'
)
S
ageMessage
.
success
(
'删除成功'
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
}
}
...
@@ -124,7 +124,7 @@ const TableList = () => {
...
@@ -124,7 +124,7 @@ const TableList = () => {
}
}
}
}
tableRef
.
current
.
setDataSource
(
tableData
)
tableRef
.
current
.
setDataSource
(
tableData
)
s
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
S
ageMessage
.
success
(
checked
?
'启用成功'
:
'禁用成功'
)
}
}
},
},
onCancel
:
()
=>
{
onCancel
:
()
=>
{
...
@@ -249,7 +249,7 @@ const TableList = () => {
...
@@ -249,7 +249,7 @@ const TableList = () => {
setModalLoading
(
false
)
setModalLoading
(
false
)
if
(
res
.
isSuccess
)
{
if
(
res
.
isSuccess
)
{
s
ageMessage
.
success
(
'保存成功'
)
S
ageMessage
.
success
(
'保存成功'
)
modalRef
.
current
.
setVisible
(
false
)
modalRef
.
current
.
setVisible
(
false
)
tableRef
.
current
.
reloadTable
()
tableRef
.
current
.
reloadTable
()
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论