Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
C
cs-manage-system
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
吴万海
cs-manage-system
提交
3dde90cd
提交
3dde90cd
编写于
11月 28, 2023
作者:
wanhai_wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add
上级
2258d0c6
变更
9
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
83 行增加
和
24 行删除
+83
-24
p__Auth__index.async.js
dist/p__Auth__index.async.js
+1
-1
p__Menu__index.async.js
dist/p__Menu__index.async.js
+1
-1
p__User__Login__index.async.js
dist/p__User__Login__index.async.js
+1
-1
MemberPage.tsx
src/pages/Auth/MemberPage.tsx
+1
-0
MenuTree.tsx
src/pages/Auth/MenuTree.tsx
+1
-0
index.tsx
src/pages/Auth/index.tsx
+2
-0
index.tsx
src/pages/Menu/index.tsx
+65
-20
FsQr.tsx
src/pages/User/Login/FsQr.tsx
+0
-1
index.ts
src/services/role/index.ts
+11
-0
未找到文件。
dist/p__Auth__index.async.js
浏览文件 @
3dde90cd
此差异已折叠。
点击以展开。
dist/p__Menu__index.async.js
浏览文件 @
3dde90cd
此差异已折叠。
点击以展开。
dist/p__User__Login__index.async.js
浏览文件 @
3dde90cd
此差异已折叠。
点击以展开。
src/pages/Auth/MemberPage.tsx
浏览文件 @
3dde90cd
...
...
@@ -51,6 +51,7 @@ const MemberPage: React.FC = (props, context) => {
// 获取角色人员的配置信息
let
msg
=
await
getRoleMember
({
r_id
:
recordData
.
id
})
setTargetKeys
(
msg
?.
union_ids
||
[])
localStorage
.
setItem
(
'targetSelectedKeys'
,
JSON
.
stringify
(
msg
?.
union_ids
||
[]))
})()
...
...
src/pages/Auth/MenuTree.tsx
浏览文件 @
3dde90cd
...
...
@@ -27,6 +27,7 @@ const MenuTree: React.FC = (props) => {
setCheckedKeys
(
info
?.
m_ids
);
setExpandedKeys
(
info
?.
m_ids
);
localStorage
.
setItem
(
'checkedKeysValue'
,
JSON
.
stringify
(
info
?.
m_ids
||
[]))
})()
}
...
...
src/pages/Auth/index.tsx
浏览文件 @
3dde90cd
...
...
@@ -62,6 +62,8 @@ const Auth = () => {
fie
.
then
(()
=>
{
(
async
()
=>
{
debugger
// 设置权限保存
let
menu
=
undefined
if
(
status
===
2
)
{
...
...
src/pages/Menu/index.tsx
浏览文件 @
3dde90cd
...
...
@@ -19,7 +19,7 @@ import {history} from "@umijs/max";
import
{
PageContainer
}
from
"@ant-design/pro-components"
;
import
{
SearchOutline
}
from
"antd-mobile-icons"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
addMenu
,
delMenu
,
getMenuPage
,
saveMenu
}
from
"@/services/role"
;
import
{
addMenu
,
delMenu
,
getMenuPage
,
getShowMenuList
,
saveMenu
}
from
"@/services/role"
;
import
MenuTree
from
"@/pages/Auth/MenuTree"
;
const
Auth
=
()
=>
{
...
...
@@ -32,6 +32,7 @@ const Auth = () => {
const
[
status
,
setStatus
]
=
useState
(
0
)
// edit 1 add 0 menu 2
const
[
dataSource
,
setDataSource
]
=
useState
()
const
[
pidList
,
setPidList
]
=
useState
([])
const
[
params
,
setParams
]
=
useState
<
ROLE_API
.
RuleParmes
>
({
page
:
1
,
page_size
:
10
...
...
@@ -88,20 +89,27 @@ const Auth = () => {
}
})()
}
const
getHandle
=
()
=>
{
(
async
()
=>
{
// 获取上级菜单
let
msg
=
await
getShowMenuList
()
if
(
msg
)
{
setPidList
(
msg
?.
items
)
// success()
// search()
}
})()
}
const
onGenderChange
=
(
value
:
string
)
=>
{
switch
(
value
)
{
case
'male'
:
formRef
.
current
?.
setFieldsValue
({
note
:
'Hi, man!'
});
break
;
case
'female'
:
formRef
.
current
?.
setFieldsValue
({
note
:
'Hi, lady!'
});
break
;
case
'other'
:
formRef
.
current
?.
setFieldsValue
({
note
:
'Hi there!'
});
break
;
default
:
break
;
}
const
item
=
pidList
[
value
.
key
-
1
]
form
.
setFieldsValue
({
pid
:
item
.
pid
})
console
.
log
(
form
.
getFieldsValue
())
debugger
};
const
handleCancel
=
()
=>
{
setIsModalOpen
(
false
);
...
...
@@ -151,7 +159,7 @@ const Auth = () => {
render
:
(
_
,
record
)
=>
{
// console.log(_)
// console.log(record)
return
record
.
type
===
1
?
'菜单'
:
'接口'
return
record
.
menu
?.
type
===
1
?
'菜单'
:
'接口'
}
},
{
...
...
@@ -176,11 +184,14 @@ const Auth = () => {
<
a
onClick=
{
()
=>
{
showModal
()
setStatus
(
1
)
getHandle
()
form
.
setFieldsValue
({
id
:
record
.
menu
.
id
,
link
:
record
.
menu
.
link
,
pid
:
record
.
menu
.
pid
,
// 同步
dis_pid
:
record
.
menu
.
id
,
type
:
record
.
menu
.
type
,
name
:
record
.
menu
.
name
,
is_show
:
record
.
menu
.
is_show
...
...
@@ -250,9 +261,10 @@ const Auth = () => {
style=
{
{
maxWidth
:
600
}
}
>
{
/*gutter 是分割距离*/
}
<
Form
.
Item
name=
{
'pid'
}
name=
{
'
dis_
pid'
}
label=
{
'上级菜单ID'
}
hasFeedback
// pidList
rules=
{
[
{
required
:
true
,
...
...
@@ -260,7 +272,22 @@ const Auth = () => {
},
]
}
>
<
Input
placeholder=
"请输入"
/>
{
/*pidList*/
}
{
/*<Input placeholder="请输入" />*/
}
<
Select
placeholder=
"请选择"
labelInValue
onChange=
{
onGenderChange
}
allowClear
fieldNames=
{
{
label
:
'name'
,
value
:
'id'
}
}
options=
{
pidList
}
>
{
/*<Select.Option value={1}>启用</Select.Option>*/
}
{
/*<Select.Option value={-1}>不启用</Select.Option>*/
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
{
'name'
}
...
...
@@ -289,14 +316,25 @@ const Auth = () => {
<
Input
placeholder=
"请输入"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
'类型'
}
name=
{
'
is_show
'
}
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
label=
{
'类型'
}
name=
{
'
type
'
}
rules=
{
[{
required
:
true
}]
}
>
<
Select
placeholder=
"请输入"
// onChange=
{
onGenderChange
}
allowClear
>
<
Select
.
Option
value=
{
1
}
>
显示
</
Select
.
Option
>
<
Select
.
Option
value=
{
-
1
}
>
隐藏
</
Select
.
Option
>
<
Select
.
Option
value=
{
1
}
>
菜单
</
Select
.
Option
>
<
Select
.
Option
value=
{
-
1
}
>
接口
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
'是否启用'
}
name=
{
'type'
}
rules=
{
[{
required
:
true
}]
}
>
<
Select
placeholder=
"请选择"
// onChange=
{
onGenderChange
}
allowClear
>
<
Select
.
Option
value=
{
1
}
>
启用
</
Select
.
Option
>
<
Select
.
Option
value=
{
-
1
}
>
不启用
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
...
...
@@ -307,6 +345,13 @@ const Auth = () => {
>
<
Input
placeholder=
"请输入"
hidden
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
'pid'
}
hidden
>
<
Input
placeholder=
"请输入"
hidden
/>
</
Form
.
Item
>
</
Form
>
}
...
...
src/pages/User/Login/FsQr.tsx
浏览文件 @
3dde90cd
...
...
@@ -93,7 +93,6 @@ const FsQr = () => {
}
const
domain
=
window
.
location
.
hostname
;
const
port
=
window
.
location
.
port
;
console
.
log
(
domain
);
...
...
src/services/role/index.ts
浏览文件 @
3dde90cd
...
...
@@ -23,6 +23,17 @@ export async function getRuleList (body:ROLE_API.RuleParmes ) {
})
}
// 获取上级菜单列表
export
async
function
getShowMenuList
(
body
:
any
)
{
return
request
<
any
>
(
'/api/permission/getShowMenuList'
,
{
method
:
'GET'
,
params
:
body
})
}
export
async
function
getAbleMember
(
body
:
ROLE_API
.
RuleParmes
)
{
return
request
<
ROLE_API
.
RuleResult
>
(
'/api/member/getAbleMember'
,
{
method
:
'GET'
,
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录