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
Show 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 () => {
...
@@ -30,6 +30,7 @@ const loginOut = async () => {
const
AvatarDropdown
=
({
menu
})
=>
{
const
AvatarDropdown
=
({
menu
})
=>
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
console
.
log
(
'initialState,'
,
initialState
);
const
[
visible
,
cv
]
=
useState
(
false
),
const
[
visible
,
cv
]
=
useState
(
false
),
[
formRef
]
=
Form
.
useForm
(),
[
formRef
]
=
Form
.
useForm
(),
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
@@ -117,10 +118,11 @@ const AvatarDropdown = ({ menu }) => {
...
@@ -117,10 +118,11 @@ const AvatarDropdown = ({ menu }) => {
}
}
const
{
currentUser
}
=
initialState
;
const
{
currentUser
}
=
initialState
;
if
(
!
currentUser
||
!
currentUser
.
user
N
ame
)
{
if
(
!
currentUser
||
!
currentUser
.
user
n
ame
)
{
return
loadings
;
return
loadings
;
}
}
let
saveData
=
(
values
)
=>
{
let
saveData
=
(
values
)
=>
{
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
delete
newfields
.
confirmPassword
;
delete
newfields
.
confirmPassword
;
...
@@ -186,7 +188,7 @@ const AvatarDropdown = ({ menu }) => {
...
@@ -186,7 +188,7 @@ const AvatarDropdown = ({ menu }) => {
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
style=
{
{
backgroundColor
:
'#1890ff'
}
}
>
<
Avatar
style=
{
{
backgroundColor
:
'#1890ff'
}
}
>
{
currentUser
.
user
N
ame
.
substr
(
0
,
1
)
}
{
currentUser
.
user
n
ame
.
substr
(
0
,
1
)
}
</
Avatar
>
</
Avatar
>
<
span
className=
{
`${styles.name} anticon`
}
style=
{
{
margin
:
'0 12px'
}
}
>
<
span
className=
{
`${styles.name} anticon`
}
style=
{
{
margin
:
'0 12px'
}
}
>
...
...
src/pages/User/Login/index.jsx
View file @
d558c083
...
@@ -79,7 +79,7 @@ const Login = () => {
...
@@ -79,7 +79,7 @@ const Login = () => {
try
{
try
{
// 登录
// 登录
const
res
=
await
doFetch
({
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) {
if (res?.access_token) {
let token = res?.access_token;
let token = res?.access_token;
...
...
src/pages/setting/factory/index.jsx
View file @
d558c083
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @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'
;
import
*
as
React
from
'react'
;
...
@@ -74,7 +74,7 @@ function Factory(props) {
...
@@ -74,7 +74,7 @@ function Factory(props) {
params
,
params
,
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
...
...
src/pages/setting/production/index.jsx
View file @
d558c083
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @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'
;
import
*
as
React
from
'react'
;
...
@@ -74,7 +74,7 @@ function Section(props) {
...
@@ -74,7 +74,7 @@ function Section(props) {
params
,
params
,
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
...
...
src/pages/setting/section/index.jsx
View file @
d558c083
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @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'
;
import
*
as
React
from
'react'
;
...
@@ -74,7 +74,7 @@ function Section(props) {
...
@@ -74,7 +74,7 @@ function Section(props) {
params
,
params
,
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'
新增
成功!'
);
message
.
success
(
'
编辑
成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
...
...
src/pages/setting/users/columns.js
View file @
d558c083
...
@@ -89,7 +89,7 @@ function getcolumns(setdrawer) {
...
@@ -89,7 +89,7 @@ function getcolumns(setdrawer) {
{
{
title
:
'负责工厂'
,
title
:
'负责工厂'
,
dataIndex
:
'factoryNames'
,
dataIndex
:
'factoryNames'
,
key
:
'factory
Names
'
,
key
:
'factory
IdList
'
,
search
:
false
,
search
:
false
,
fieldProps
:
{
fieldProps
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
...
@@ -116,7 +116,7 @@ function getcolumns(setdrawer) {
...
@@ -116,7 +116,7 @@ function getcolumns(setdrawer) {
options
:
{
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactoryIdList'
,
path
:
'/auth/sysShop/getShopSelectionByFactoryIdList'
,
linkParams
:
{
linkParams
:
{
factory
Names
:
'factoryIdList'
,
factory
IdList
:
'factoryIdList'
,
},
},
},
},
key
:
'shopId'
,
key
:
'shopId'
,
...
@@ -128,7 +128,7 @@ function getcolumns(setdrawer) {
...
@@ -128,7 +128,7 @@ function getcolumns(setdrawer) {
dataIndex
:
'sectionName'
,
dataIndex
:
'sectionName'
,
align
:
'center'
,
align
:
'center'
,
search
:
false
,
search
:
false
,
key
:
'sectionId'
,
key
:
'sectionId
List
'
,
fieldProps
:
{
fieldProps
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
showSearch
:
true
,
showSearch
:
true
,
...
@@ -154,7 +154,7 @@ function getcolumns(setdrawer) {
...
@@ -154,7 +154,7 @@ function getcolumns(setdrawer) {
mode
:
'multiple'
,
mode
:
'multiple'
,
},
},
search
:
false
,
search
:
false
,
key
:
'product
LineName
'
,
key
:
'product
ionLineIdList
'
,
align
:
'center'
,
align
:
'center'
,
options
:
{
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShopIdList'
,
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShopIdList'
,
...
@@ -166,7 +166,7 @@ function getcolumns(setdrawer) {
...
@@ -166,7 +166,7 @@ function getcolumns(setdrawer) {
{
{
title
:
'角色配置'
,
title
:
'角色配置'
,
dataIndex
:
'roleNames'
,
dataIndex
:
'roleNames'
,
key
:
'role
Names
'
,
key
:
'role
IdList
'
,
valueType
:
'select'
,
valueType
:
'select'
,
search
:
false
,
search
:
false
,
fieldProps
:
{
fieldProps
:
{
...
...
src/pages/setting/users/index.jsx
View file @
d558c083
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @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'
;
import
*
as
React
from
'react'
;
...
@@ -66,11 +66,24 @@ function User(props) {
...
@@ -66,11 +66,24 @@ function User(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'only'
,
val
:
'only'
,
onFinish
:
async
(
vals
)
=>
{
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
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
id
:
row
?.
id
,
shopIdList
:
vals
.
shopId
,
userCharReqList
,
};
};
delete
params
.
shopId
;
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
@@ -201,25 +214,22 @@ function User(props) {
...
@@ -201,25 +214,22 @@ function User(props) {
}
}
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
factoryIdList
:
vals
.
factoryNames
,
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
shopIdList
:
vals
.
shopId
,
shopIdList
:
vals
.
shopId
,
sectionIdList
:
vals
.
sectionId
,
productionLineIdList
:
vals
.
productLineName
,
roleIdList
:
vals
.
roleNames
,
userCharReqList
,
userCharReqList
,
};
};
delete
params
.
factoryNames
;
delete
params
.
shopId
;
delete
params
.
shopId
;
delete
params
.
sectionId
;
delete
params
.
productLineName
;
delete
params
.
roleNames
;
console
.
log
(
params
,
'!!!!'
);
console
.
log
(
params
,
'!!!!'
);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
if
(
drawer
?.
title
==
'编辑'
)
{
message
.
success
(
'编辑成功!'
);
}
else
{
message
.
success
(
'新增成功!'
);
message
.
success
(
'新增成功!'
);
}
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
...
...
src/pages/setting/workshop/columns.js
View file @
d558c083
...
@@ -13,7 +13,7 @@ function getcolumns(setdrawer) {
...
@@ -13,7 +13,7 @@ function getcolumns(setdrawer) {
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
{
{
title
:
'所属工厂
名称
'
,
title
:
'所属工厂'
,
dataIndex
:
'factoryName'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
key
:
'factoryId'
,
valueType
:
'select'
,
valueType
:
'select'
,
...
...
src/services/login.js
View file @
d558c083
...
@@ -10,7 +10,7 @@ export function fakeAccountLogin(params) {
...
@@ -10,7 +10,7 @@ export function fakeAccountLogin(params) {
//登出
//登出
export
function
fakeAccountLoginOut
(
params
)
{
export
function
fakeAccountLoginOut
(
params
)
{
return
request
(
`/
ngic-auth/sysAccount
/logout`
,
{
return
request
(
`/
emspro
/logout`
,
{
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
});
});
...
@@ -26,7 +26,7 @@ export function saveForRegister(params) {
...
@@ -26,7 +26,7 @@ export function saveForRegister(params) {
//个人信息
//个人信息
export
function
queryCurrentUser
(
params
)
{
export
function
queryCurrentUser
(
params
)
{
return
request
(
'/
ngic-auth/sysUser/query
'
,
{
return
request
(
'/
emspro/auth/sysUser/me
'
,
{
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
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