Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
c5e4c28c
Commit
c5e4c28c
authored
Dec 15, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1215
parent
b86ffb0b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
33 deletions
+51
-33
app.jsx
src/app.jsx
+20
-19
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+1
-1
index.jsx
src/components/SiderMenu/index.jsx
+8
-8
columns.js
src/pages/system/dictionary/columns.js
+9
-0
columns.js
src/pages/system/field/columns.js
+8
-2
index.jsx
src/pages/system/field/index.jsx
+3
-1
login.js
src/services/login.js
+1
-1
system.js
src/services/system.js
+1
-1
No files found.
src/app.jsx
View file @
c5e4c28c
...
...
@@ -48,11 +48,12 @@ export async function getInitialState() {
message
.
error
(
res
.
msg
);
}
return
undefined
;
};
// 如果是登录页面,不执行
};
// 如果是登录页面,不执行
if
(
history
.
location
.
pathname
!==
loginPath
&&
token
)
{
const
currentUserData
=
await
fetchUserInfo
();
let
menuData
;
if
(
currentUserData
?.
data
?.
user
N
ame
)
{
if
(
currentUserData
?.
data
?.
user
n
ame
)
{
menuData
=
await
getmenuData
();
}
/* isdev */
...
...
@@ -144,23 +145,23 @@ export const layout = ({ initialState, setInitialState }) => {
//console.log(initialState);
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
))
:
[],
newArr
=
[
// {
// path: '/welcome',
// name: '首页',
// icon: 'smile',
// component: './Welcome',
// haveChildren: false,
// key: '000000',
// parentKey: '0',
// routes: [],
// children: null,
// title: null,
// },
].
concat
(
lastArr
);
:
[];
//
newArr = [
//
// {
//
// path: '/welcome',
//
// name: '首页',
//
// icon: 'smile',
//
// component: './Welcome',
//
// haveChildren: false,
//
// key: '000000',
//
// parentKey: '0',
//
// routes: [],
//
// children: null,
//
// title: null,
//
// },
//
].concat(lastArr);
return
new
Arr
.
map
((
item
,
index
)
=>
{
return
last
Arr
.
map
((
item
,
index
)
=>
{
if
(
item
.
icon
)
{
const
icon
=
strToHump
(
item
.
icon
),
ItemIcon
=
Ant4Icons
[
icon
];
...
...
src/components/RightContent/AvatarDropdown.jsx
View file @
c5e4c28c
...
...
@@ -191,7 +191,7 @@ const AvatarDropdown = ({ menu }) => {
</
Avatar
>
<
span
className=
{
`${styles.name} anticon`
}
style=
{
{
margin
:
'0 12px'
}
}
>
{
currentUser
.
user
N
ame
}
{
currentUser
.
user
n
ame
}
</
span
>
</
span
>
</
HeaderDropdown
>
...
...
src/components/SiderMenu/index.jsx
View file @
c5e4c28c
...
...
@@ -23,8 +23,8 @@ function strToHump(str) {
let
CardItems
=
(
datav
,
i
,
getstar
,
addHistory
)
=>
{
let
name
=
datav
.
name
,
collected
=
datav
.
isExist
==
'1'
,
icon
=
strToHump
(
datav
.
icon
)
,
ItemIcon
=
Ant4Icons
[
icon
];
icon
=
datav
.
icon
?
strToHump
(
datav
.
icon
)
:
'ToolOutlined'
,
ItemIcon
=
icon
?
Ant4Icons
[
icon
]
:
Ant4Icons
[
'ToolOutlined'
];
return
(
<
div
key=
{
i
}
...
...
@@ -141,8 +141,8 @@ function SiderMenu({ logo, collapsed, onCollapse, fixSiderbar, theme, isMobile,
const
collectList
=
useMemo
(()
=>
{
return
collectPerm
.
map
((
item
,
i
)
=>
{
const
icon
=
strToHump
(
item
.
icon
),
ItemIcon
=
Ant4Icons
[
icon
]
;
const
icon
=
item
.
icon
??
strToHump
(
item
.
icon
),
ItemIcon
=
icon
?
Ant4Icons
[
icon
]
:
Ant4Icons
.
ToolOutlined
;
return
{
key
:
item
.
path
,
icon
:
<
ItemIcon
/>,
...
...
@@ -316,8 +316,8 @@ function SiderMenu({ logo, collapsed, onCollapse, fixSiderbar, theme, isMobile,
<
div
className=
{
styles
.
column
}
>
{
getMenuData
&&
filterMenu
(
getMenuData
,
search
).
map
((
item
,
i
)
=>
{
const
icon
=
strToHump
(
item
.
icon
),
ItemIcon
=
Ant4Icons
[
icon
];
const
icon
=
item
.
icon
??
strToHump
(
item
.
icon
),
ItemIcon
=
icon
?
Ant4Icons
[
icon
]
:
Ant4Icons
[
'ToolOutlined'
];
return
(
<
div
className=
{
styles
.
item
}
key=
{
i
}
>
<
h2
...
...
@@ -341,8 +341,8 @@ function SiderMenu({ logo, collapsed, onCollapse, fixSiderbar, theme, isMobile,
<
div
className=
{
styles
.
rt
}
>
{
getMenuData
&&
getMenuData
.
map
((
item
,
i
)
=>
{
const
icon
=
strToHump
(
item
.
icon
),
ItemIcon
=
Ant4Icons
[
icon
];
const
icon
=
item
.
icon
??
strToHump
(
item
.
icon
),
ItemIcon
=
icon
?
Ant4Icons
[
icon
]
:
Ant4Icons
[
'ToolOutlined'
];
return
(
<
p
className=
{
styles
.
rtcarditem
}
...
...
src/pages/system/dictionary/columns.js
View file @
c5e4c28c
...
...
@@ -36,6 +36,15 @@ function getcolumns(setdrawer) {
fieldProps
:
{
disabled
:
true
,
},
search
:
false
,
},
{
title
:
'数据类型'
,
dataIndex
:
'dataTypeName'
,
key
:
'dataType'
,
valueType
:
'input'
,
hideInForm
:
true
,
hideInTable
:
true
,
},
{
title
:
'描述'
,
...
...
src/pages/system/field/columns.js
View file @
c5e4c28c
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
ifs
)
{
return
[
{
title
:
'表单名称'
,
...
...
@@ -37,6 +37,9 @@ function getcolumns(setdrawer) {
title
:
'字段类型'
,
dataIndex
:
'fieldCharName'
,
key
:
'fieldChar'
,
fieldProps
:
{
disabled
:
ifs
,
},
formItemProps
:
{
rules
:
[
{
...
...
@@ -71,11 +74,14 @@ function getcolumns(setdrawer) {
formItemProps
:
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'此项为必填项'
,
},
],
},
fieldProps
:
{
disabled
:
ifs
,
},
hideInForm
:
{
fieldChar
:
[
'1'
],
},
...
...
src/pages/system/field/index.jsx
View file @
c5e4c28c
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-1
1-28 16:41:55
* @Last Modified time: 2022-1
2-15 16:06:11
*/
import
*
as
React
from
'react'
;
...
...
@@ -71,6 +71,7 @@ function Field(props) {
...
s
,
visible
:
true
,
title
:
'编辑'
,
fields
:
getcolumns
(
true
),
val
:
'edit'
,
// detailpath: urlParams.detail,
// params:
{
id
:
row
.
id
},
...
...
@@ -219,6 +220,7 @@ function Field(props) {
},
title
:
'新增'
,
val
:
'add'
,
fields
:
getcolumns
(
false
),
onFinish
:
async
(
vals
)
=>
{
//console.log(vals);
let
params
=
{
...
...
src/services/login.js
View file @
c5e4c28c
...
...
@@ -34,7 +34,7 @@ export function queryCurrentUser(params) {
//获取菜单/权限/菜单/公司类型
export
function
getMenu
(
params
)
{
return
request
(
`/
ngic-
auth/sysPermission/queryMenu`
,
{
return
request
(
`/
emspro/
auth/sysPermission/queryMenu`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
src/services/system.js
View file @
c5e4c28c
...
...
@@ -88,7 +88,7 @@ export async function sectionSelectByShops(params) {
}
//授权前查询权限树
export
async
function
roleTree
(
params
)
{
return
request
(
`/
emspro/
auth/sysRolePermission/queryAll`
,
{
return
request
(
`/auth/sysRolePermission/queryAll`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
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