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
d558c083
Commit
d558c083
authored
Nov 30, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11301352
parent
124df178
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
29 deletions
+41
-29
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+4
-2
index.jsx
src/pages/User/Login/index.jsx
+1
-1
index.jsx
src/pages/setting/factory/index.jsx
+2
-2
index.jsx
src/pages/setting/production/index.jsx
+2
-2
index.jsx
src/pages/setting/section/index.jsx
+2
-2
columns.js
src/pages/setting/users/columns.js
+5
-5
index.jsx
src/pages/setting/users/index.jsx
+22
-12
columns.js
src/pages/setting/workshop/columns.js
+1
-1
login.js
src/services/login.js
+2
-2
No files found.
src/components/RightContent/AvatarDropdown.jsx
View file @
d558c083
...
...
@@ -30,6 +30,7 @@ const loginOut = async () => {
const
AvatarDropdown
=
({
menu
})
=>
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
console
.
log
(
'initialState,'
,
initialState
);
const
[
visible
,
cv
]
=
useState
(
false
),
[
formRef
]
=
Form
.
useForm
(),
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
...
@@ -117,9 +118,10 @@ const AvatarDropdown = ({ menu }) => {
}
const
{
currentUser
}
=
initialState
;
if
(
!
currentUser
||
!
currentUser
.
user
N
ame
)
{
if
(
!
currentUser
||
!
currentUser
.
user
n
ame
)
{
return
loadings
;
}
let
saveData
=
(
values
)
=>
{
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
...
...
@@ -186,7 +188,7 @@ const AvatarDropdown = ({ menu }) => {
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
style=
{
{
backgroundColor
:
'#1890ff'
}
}
>
{
currentUser
.
user
N
ame
.
substr
(
0
,
1
)
}
{
currentUser
.
user
n
ame
.
substr
(
0
,
1
)
}
</
Avatar
>
<
span
className=
{
`${styles.name} anticon`
}
style=
{
{
margin
:
'0 12px'
}
}
>
...
...
src/pages/User/Login/index.jsx
View file @
d558c083
...
...
@@ -79,7 +79,7 @@ const Login = () => {
try
{
// 登录
const
res
=
await
doFetch
({
url
:
`/token/oauth/token?grant_type=password&client_id=
userservice1&client_secret=1234
&username=
${
values
?.
userName
}
&
password
=
$
{
values
?.
password
}
`,
url
:
`/token/oauth/token?grant_type=password&client_id=
NGEMS3&client_secret=ems_Nangao@2022
&username=
${
values
?.
userName
}
&
password
=
$
{
values
?.
password
}
`,
});
if (res?.access_token) {
let token = res?.access_token;
...
...
src/pages/setting/factory/index.jsx
View file @
d558c083
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
10 15:41:24
* @Last Modified time: 2022-11-
30 12:20:15
*/
import
*
as
React
from
'react'
;
...
...
@@ -74,7 +74,7 @@ function Factory(props) {
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
...
...
src/pages/setting/production/index.jsx
View file @
d558c083
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
10 16:25:11
* @Last Modified time: 2022-11-
30 13:16:10
*/
import
*
as
React
from
'react'
;
...
...
@@ -74,7 +74,7 @@ function Section(props) {
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
...
...
src/pages/setting/section/index.jsx
View file @
d558c083
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
25 10:03:59
* @Last Modified time: 2022-11-
30 13:15:45
*/
import
*
as
React
from
'react'
;
...
...
@@ -74,7 +74,7 @@ function Section(props) {
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
...
...
src/pages/setting/users/columns.js
View file @
d558c083
...
...
@@ -89,7 +89,7 @@ function getcolumns(setdrawer) {
{
title
:
'负责工厂'
,
dataIndex
:
'factoryNames'
,
key
:
'factory
Names
'
,
key
:
'factory
IdList
'
,
search
:
false
,
fieldProps
:
{
placeholder
:
'请选择'
,
...
...
@@ -116,7 +116,7 @@ function getcolumns(setdrawer) {
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactoryIdList'
,
linkParams
:
{
factory
Names
:
'factoryIdList'
,
factory
IdList
:
'factoryIdList'
,
},
},
key
:
'shopId'
,
...
...
@@ -128,7 +128,7 @@ function getcolumns(setdrawer) {
dataIndex
:
'sectionName'
,
align
:
'center'
,
search
:
false
,
key
:
'sectionId'
,
key
:
'sectionId
List
'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
...
...
@@ -154,7 +154,7 @@ function getcolumns(setdrawer) {
mode
:
'multiple'
,
},
search
:
false
,
key
:
'product
LineName
'
,
key
:
'product
ionLineIdList
'
,
align
:
'center'
,
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShopIdList'
,
...
...
@@ -166,7 +166,7 @@ function getcolumns(setdrawer) {
{
title
:
'角色配置'
,
dataIndex
:
'roleNames'
,
key
:
'role
Names
'
,
key
:
'role
IdList
'
,
valueType
:
'select'
,
search
:
false
,
fieldProps
:
{
...
...
src/pages/setting/users/index.jsx
View file @
d558c083
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
29 18:04:45
* @Last Modified time: 2022-11-
30 12:17:26
*/
import
*
as
React
from
'react'
;
...
...
@@ -66,11 +66,24 @@ function User(props) {
title
:
'编辑'
,
val
:
'only'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
let
userCharReqList
=
[];
console
.
log
(
'id:'
,
row
.
id
);
for
(
let
i
in
vals
)
{
if
(
!
isNaN
(
Number
(
i
)))
{
userCharReqList
.
push
({
fieldId
:
i
,
fieldRealValue
:
vals
[
i
],
});
delete
vals
[
i
];
}
}
let
params
=
{
...
vals
,
id
:
row
.
id
,
id
:
row
?.
id
,
shopIdList
:
vals
.
shopId
,
userCharReqList
,
};
delete
params
.
shopId
;
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
...
...
@@ -201,25 +214,22 @@ function User(props) {
}
let
params
=
{
...
vals
,
factoryIdList
:
vals
.
factoryNames
,
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
shopIdList
:
vals
.
shopId
,
sectionIdList
:
vals
.
sectionId
,
productionLineIdList
:
vals
.
productLineName
,
roleIdList
:
vals
.
roleNames
,
userCharReqList
,
};
delete
params
.
factoryNames
;
delete
params
.
shopId
;
delete
params
.
sectionId
;
delete
params
.
productLineName
;
delete
params
.
roleNames
;
console
.
log
(
params
,
'!!!!'
);
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
if
(
drawer
?.
title
==
'编辑'
)
{
message
.
success
(
'编辑成功!'
);
}
else
{
message
.
success
(
'新增成功!'
);
}
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
...
...
src/pages/setting/workshop/columns.js
View file @
d558c083
...
...
@@ -13,7 +13,7 @@ function getcolumns(setdrawer) {
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'所属工厂
名称
'
,
title
:
'所属工厂'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
valueType
:
'select'
,
...
...
src/services/login.js
View file @
d558c083
...
...
@@ -10,7 +10,7 @@ export function fakeAccountLogin(params) {
//登出
export
function
fakeAccountLoginOut
(
params
)
{
return
request
(
`/
ngic-auth/sysAccount
/logout`
,
{
return
request
(
`/
emspro
/logout`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -26,7 +26,7 @@ export function saveForRegister(params) {
//个人信息
export
function
queryCurrentUser
(
params
)
{
return
request
(
'/
ngic-auth/sysUser/query
'
,
{
return
request
(
'/
emspro/auth/sysUser/me
'
,
{
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