Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
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
wms
Commits
d3e2a96b
Commit
d3e2a96b
authored
Aug 31, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SiderMenu
parent
4b41f0b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
414 deletions
+3
-414
routes.js
config/routes.js
+0
-5
mtable.jsx
src/components/AutoTable/mtable.jsx
+3
-4
fields.js
src/pages/user/Logon/fields.js
+0
-116
index.jsx
src/pages/user/Logon/index.jsx
+0
-190
index.less
src/pages/user/Logon/index.less
+0
-99
No files found.
config/routes.js
View file @
d3e2a96b
...
...
@@ -11,11 +11,6 @@ export default [
path
:
"/user/login"
,
component
:
"./user/Login"
,
},
{
name
:
"注册"
,
path
:
"/user/logon"
,
component
:
"./user/Logon"
,
},
],
},
{
...
...
src/components/AutoTable/mtable.jsx
View file @
d3e2a96b
...
...
@@ -66,7 +66,7 @@ const Mtable = (props) => {
//更新 columns
useEffect
(()
=>
{
setcolumnes
((
s
)
=>
{
return
s
.
map
((
it
,
index
)
=>
{
return
column
s
.
map
((
it
,
index
)
=>
{
let
itemwidth
=
valueColumns
[
it
.
key
]?.
width
?
valueColumns
[
it
.
key
].
width
:
it
.
width
...
...
@@ -128,7 +128,7 @@ const Mtable = (props) => {
};
});
});
},
[
columns
,
valueColumns
]);
},
[
valueColumns
]);
//初始化操作数据
const
initDrage
=
async
()
=>
{
...
...
@@ -182,13 +182,12 @@ const Mtable = (props) => {
}
actionRefs
?.
current
?.
reload
();
actionRefs
?.
current
?.
reset
();
};
//调用重新渲染表格
useAsyncEffect
(
async
()
=>
{
await
initDrage
();
},
[
extraparams
,
path
,
activeTabKey
,
refreshDep
]);
},
[
columns
,
extraparams
,
path
,
activeTabKey
,
refreshDep
]);
//缩放表格
const
handleResize
=
...
...
src/pages/user/Logon/fields.js
deleted
100644 → 0
View file @
4b41f0b0
import
{
factorySelectRegister
,
shopSelectByFactory
,
productionLineSelectByShops
,
sectionSelectByShops
,
allUserSelect
,
departmentTree
,
roleSelectRegister
,
}
from
"@/services/system"
;
export
default
{
accountName
:
{
value
:
null
,
type
:
"input"
,
title
:
"用户名"
,
name
:
[
"accountName"
],
required
:
true
,
},
userName
:
{
value
:
null
,
type
:
"input"
,
title
:
"姓名"
,
name
:
[
"userName"
],
required
:
true
,
},
telephone
:
{
value
:
null
,
type
:
"input"
,
title
:
"联系电话"
,
name
:
[
"telephone"
],
required
:
false
,
},
departmentId
:
{
value
:
null
,
type
:
"treeselect"
,
title
:
"组织"
,
name
:
[
"departmentId"
],
required
:
true
,
options
:
{
database
:
departmentTree
,
params
:
{},
},
},
factoryId
:
{
value
:
null
,
type
:
"select"
,
title
:
"工厂"
,
name
:
[
"factoryId"
],
required
:
true
,
options
:
{
database
:
factorySelectRegister
,
params
:
{},
},
linked
:
true
,
},
shopIdList
:
{
value
:
[],
type
:
"select"
,
title
:
"负责仓库"
,
name
:
[
"shopIdList"
],
required
:
false
,
belinked
:
{
options
:
{
database
:
shopSelectByFactory
,
params
:
{
factoryId
:
"linked"
},
},
},
linked
:
true
,
multiple
:
true
,
},
roleIdList
:
{
value
:
[],
type
:
"select"
,
title
:
"角色配置"
,
name
:
[
"roleIdList"
],
required
:
false
,
belinked
:
{
options
:
{
database
:
roleSelectRegister
,
params
:
{},
},
},
multiple
:
true
,
},
parentId
:
{
value
:
null
,
type
:
"select"
,
title
:
"直属领导"
,
name
:
[
"parentId"
],
required
:
false
,
belinked
:
{
options
:
{
database
:
allUserSelect
,
params
:
{},
},
},
},
mailNo
:
{
value
:
null
,
type
:
"input"
,
title
:
"邮箱"
,
name
:
[
"mailNo"
],
required
:
false
,
col
:
{
span
:
12
,
},
},
remark
:
{
value
:
null
,
type
:
"textarea"
,
title
:
"备注"
,
name
:
[
"remark"
],
required
:
false
,
col
:
{
span
:
24
},
},
};
src/pages/user/Logon/index.jsx
deleted
100644 → 0
View file @
4b41f0b0
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
useRequest
,
Link
,
history
}
from
"umi"
;
import
InitForm
from
"@/components/InitForm"
;
import
defaultFields
from
"./fields"
;
import
{
message
,
Tabs
,
Button
,
Input
,
Empty
,
Form
}
from
"antd"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
styles
from
"./index.less"
;
const
{
TabPane
}
=
Tabs
,
{
Search
}
=
Input
;
const
Logon
=
(
props
)
=>
{
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
message
.
success
(
"已提交注册信息,请等待审核..."
);
// history.push("/user/login")
ct
(
"2"
);
}
},
}),
[
tabKey
,
ct
]
=
useState
(
"1"
),
[
fields
,
cf
]
=
useState
(),
[
tel
,
ctel
]
=
useState
(
""
),
[
userDetails
,
cu
]
=
useState
(),
[
formRef
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
tabKey
==
"1"
)
{
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
i
.
indexOf
(
"List"
)
>
-
1
?
[]
:
null
;
defaultFields
[
i
].
disabled
=
false
;
formRef
.
setFieldsValue
({
[
i
]:
i
.
indexOf
(
"List"
)
>
-
1
?
[]
:
null
});
}
cf
({
...
defaultFields
});
}
else
{
cu
();
ctel
(
""
);
}
},
[
tabKey
]);
function
saveData
(
values
)
{
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
run
({
url
:
"/ngic-auth/sysAccountApply/saveForRegister"
,
params
:
{
...
newfields
},
});
}
return
(
<
div
className=
{
styles
.
main
}
>
<
div
>
<
img
src=
"./logo.svg"
alt=
""
style=
{
{
width
:
44
,
marginBottom
:
30
}
}
/>
</
div
>
<
div
className=
{
`${styles.body} logon`
}
>
<
Tabs
tabBarExtraContent=
{
<
Link
to=
"/user/login"
>
立即登录
</
Link
>
}
activeKey=
{
tabKey
}
onChange=
{
(
key
)
=>
{
ct
(
key
);
}
}
>
<
TabPane
tab=
"立即注册"
key=
"1"
>
<
InitForm
style=
{
{
marginTop
:
-
20
}
}
fields=
{
fields
}
submitData=
{
(
values
)
=>
{
saveData
(
values
);
}
}
onChange=
{
(
changedValues
,
allValues
)
=>
{
//联动操作
}
}
submitting=
{
loading
}
formRef=
{
formRef
}
></
InitForm
>
</
TabPane
>
<
TabPane
tab=
"申请进度"
key=
"2"
>
<
div
style=
{
{
textAlign
:
"center"
}
}
>
<
Search
value=
{
tel
}
onChange=
{
(
e
)
=>
{
ctel
(
e
.
target
.
value
);
}
}
placeholder=
"请输入手机号"
allowClear
onSearch=
{
(
value
)
=>
{
if
(
value
)
{
doFetch
({
url
:
"/ngic-auth/sysAccountApply/queryByPhone"
,
params
:
{
telephone
:
value
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
;
if
(
data
)
{
let
topFields
=
{
statusName
:
{
value
:
data
.
statusName
,
type
:
"input"
,
title
:
"工单状态"
,
name
:
[
"statusName"
],
required
:
false
,
disabled
:
true
,
},
applyTime
:
{
value
:
data
.
applyTime
,
type
:
"datepicker"
,
title
:
"申请时间"
,
name
:
[
"applyTime"
],
required
:
false
,
disabled
:
true
,
format
:
"YYYY-MM-DD HH:mm:ss"
,
},
};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
defaultFields
[
i
].
disabled
=
true
;
}
let
applyFields
=
{
auditTime
:
{
value
:
data
.
auditTime
,
type
:
"datepicker"
,
title
:
"审批时间"
,
name
:
[
"auditTime"
],
required
:
false
,
disabled
:
true
,
},
auditUserName
:
{
value
:
data
.
auditUserName
,
type
:
"input"
,
title
:
"审批人"
,
name
:
[
"auditUserName"
],
required
:
false
,
disabled
:
true
,
},
auditResultName
:
{
value
:
data
.
auditResultName
,
type
:
"input"
,
title
:
"审批结果"
,
name
:
[
"auditResultName"
],
required
:
false
,
disabled
:
true
,
},
auditOpinion
:
{
value
:
data
.
auditOpinion
,
type
:
"textarea"
,
title
:
"审批意见"
,
name
:
[
"auditOpinion"
],
required
:
false
,
col
:
{
span
:
24
},
disabled
:
true
,
},
};
cf
({
...
topFields
,
...
defaultFields
,
...
applyFields
,
});
}
cu
(
data
);
}
});
}
}
}
style=
{
{
width
:
400
,
marginBottom
:
15
}
}
/>
</
div
>
{
tel
&&
userDetails
&&
(
<
InitForm
fields=
{
fields
}
submitData=
{
(
values
)
=>
{
saveData
(
values
);
}
}
onChange=
{
(
changedValues
,
allValues
)
=>
{
//联动操作
}
}
submitting=
{
loading
}
actions=
{
(
form
,
submitBtn
)
=>
{
return
null
;
}
}
></
InitForm
>
)
}
{
!
userDetails
&&
<
Empty
/>
}
</
TabPane
>
</
Tabs
>
</
div
>
</
div
>
);
};
export
default
Logon
;
src/pages/user/Logon/index.less
deleted
100644 → 0
View file @
4b41f0b0
@import "~antd/es/style/themes/default.less";
@keyframes bgmove {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes rebgmove {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.main {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 100%;
padding-top: 10vh;
overflow: hidden;
background-color: #f0f2f5;
background-image: url("https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg");
background-repeat: no-repeat;
background-position: center 110px;
background-size: 100%;
border-radius: 4px;
.head {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 24px;
color: #ffffff;
font-weight: bolder;
font-size: 20px;
img {
animation: rebgmove 4s;
}
img:last-child {
position: absolute;
right: 0;
left: 0;
margin: auto;
animation: bgmove 4s forwards;
}
}
.body {
position: relative;
width: 700px;
padding: 16px 0;
background-color: rgba(255, 255, 255, 0.3);
box-shadow: 0px 0px 2px #999;
}
@media screen and (max-width: @screen-sm) {
width: 90%;
max-width: 700px;
}
:global {
.@{ant-prefix}-tabs-nav-list {
margin: auto;
font-size: 16rpx;
}
}
.icon {
margin-left: 16px;
color: rgba(0, 0, 0, 0.2);
font-size: 24px;
vertical-align: middle;
cursor: pointer;
transition: color 0.3s;
&:hover {
color: @primary-color;
}
}
.other {
margin-top: 24px;
line-height: 22px;
text-align: left;
.register {
float: right;
}
}
.prefixIcon {
color: @primary-color;
font-size: @font-size-base;
}
}
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