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
b4dd4c4d
Commit
b4dd4c4d
authored
Sep 05, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sadare
parent
d3e2a96b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
215 deletions
+215
-215
index.jsx
src/pages/platform/Provide/index.jsx
+2
-2
index.jsx
src/pages/system/Staff/index.jsx
+213
-213
No files found.
src/pages/platform/Provide/index.jsx
View file @
b4dd4c4d
...
...
@@ -15,7 +15,7 @@ import { useRequest } from "umi";
import
defaultFields
from
"./fields"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
deviceprovideDetail
,
deleteProvideCheck
}
from
"@/services/device"
;
import
{
usercus
Details
}
from
"@/utils/detailTotalCard"
;
import
{
deviceprovide
Details
}
from
"@/utils/detailTotalCard"
;
import
Details
from
"@/components/Details"
;
import
{
useAsyncEffect
}
from
"ahooks"
;
import
tempfields
from
"@/utils/tempfields"
;
...
...
@@ -81,7 +81,7 @@ function reducer(state, action) {
...
state
,
details
:
{
dataSource
:
action
.
dataSource
,
totalCard
:
[...
usercus
Details
,
...
extraspecial
],
totalCard
:
[...
deviceprovide
Details
,
...
extraspecial
],
},
visible
:
true
,
};
...
...
src/pages/system/Staff/index.jsx
View file @
b4dd4c4d
...
...
@@ -10,19 +10,19 @@ import { userDetails, userCheckDetails } from "@/utils/detailTotalCard";
import
Details
from
"@/components/Details"
;
import
{
userSelect
}
from
"@/services/system"
;
const
initState
=
{
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
extraparams
:
{
orderType
:
"1"
,
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
extraparams
:
{
orderType
:
"1"
,
},
},
},
tabList
=
[
{
key
:
"1"
,
...
...
@@ -36,78 +36,78 @@ const initState = {
function
reducer
(
state
,
action
)
{
let
{
type
}
=
action
,
newState
=
{};
switch
(
type
)
{
case
"add"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"新增用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
};
break
;
case
"edit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"编辑用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"audit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"审批用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"see"
:
newState
=
{
...
state
,
detail
:
{
dataSource
:
action
.
dataSource
,
totalCard
:
action
.
totalCard
,
},
visible
:
true
,
};
break
;
case
"start"
:
newState
=
{
...
state
,
extraparams
:
{
orderType
:
action
.
tabKey
,
},
};
break
;
case
"close"
:
newState
=
{
...
state
,
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
};
break
;
}
switch
(
type
)
{
case
"add"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"新增用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
};
break
;
case
"edit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"编辑用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"audit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"审批用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"see"
:
newState
=
{
...
state
,
detail
:
{
dataSource
:
action
.
dataSource
,
totalCard
:
action
.
totalCard
,
},
visible
:
true
,
};
break
;
case
"start"
:
newState
=
{
...
state
,
extraparams
:
{
orderType
:
action
.
tabKey
,
},
};
break
;
case
"close"
:
newState
=
{
...
state
,
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
};
break
;
}
return
newState
;
}
const
Staff
=
(
props
)
=>
{
let
actionRef
=
useRef
(),
ChildRef
=
null
;
...
...
@@ -116,15 +116,15 @@ const Staff = (props) => {
ChildRef
?.
onRefresh
();
}
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
reload
();
dispatch
({
type
:
"close"
});
}
},
}),
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
reload
();
dispatch
({
type
:
"close"
});
}
},
}),
[
state
,
dispatch
]
=
useReducer
(
reducer
,
initState
),
{
vs
,
fields
,
iftype
,
curitem
,
detail
,
visible
,
extraparams
}
=
state
,
columns
=
[
...
...
@@ -154,8 +154,8 @@ const Staff = (props) => {
dataSource
.
gender
==
1
?
"男"
:
dataSource
.
gender
==
2
?
"女"
:
"-"
;
?
"女"
:
"-"
;
dispatch
({
type
:
"see"
,
dataSource
,
totalCard
});
}
});
...
...
@@ -228,8 +228,8 @@ const Staff = (props) => {
dataSource
.
gender
==
1
?
"男"
:
dataSource
.
gender
==
2
?
"女"
:
"-"
;
?
"女"
:
"-"
;
dispatch
({
type
:
"see"
,
dataSource
,
totalCard
});
}
});
...
...
@@ -317,138 +317,138 @@ const Staff = (props) => {
function
extraAction
(
text
,
record
,
_
,
action
)
{
return
[
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysUser_restPassword"
,
action
,
"重置密码"
,
null
,
{
title
:
"确认重置密码?"
,
onConfirm
:
()
=>
{
getPrem
(
"sysUser_restPassword"
,
action
,
"重置密码"
,
null
,
{
title
:
"确认重置密码?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysUser/restPassword"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
message
.
success
(
res
.
msg
);
reload
();
}
});
},
}),
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysDepartment_save"
,
action
,
"修改"
,
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysUser/
restPassword
"
,
url
:
"/ngic-auth/sysUser/
query/detail
"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
message
.
success
(
res
.
msg
);
reload
();
let
data
=
res
?.
data
?.
data
??
{};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
if
(
i
==
"parentId"
)
{
defaultFields
[
i
].
belinked
=
{
options
:
{
database
:
userSelect
,
params
:
{
id
:
record
.
id
},
},
};
}
}
dispatch
({
type
:
"edit"
,
fields
:
{
...
defaultFields
},
curitem
:
data
,
});
}
});
},
}),
}),
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysDepartment_save"
,
action
,
"修改"
,
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysUser/query/detail"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
??
{};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
if
(
i
==
"parentId"
)
{
defaultFields
[
i
].
belinked
=
{
options
:
{
database
:
userSelect
,
params
:
{
id
:
record
.
id
},
},
};
}
}
dispatch
({
type
:
"edit"
,
fields
:
{
...
defaultFields
},
curitem
:
data
,
getPrem
(
"sysDepartment_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除该用户?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysUser/deleteById"
,
params
:
{
id
:
record
.
id
},
});
}
});
}),
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysDepartment_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除该用户?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysUser/deleteById"
,
params
:
{
id
:
record
.
id
},
});
},
}),
},
}),
extraparams
.
orderType
==
"2"
&&
record
.
status
==
1
&&
getPrem
(
"sysDepartment_save"
,
action
,
"审批"
,
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysAccountApply/queryById"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
??
{};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
if
(
i
==
"parentId"
)
{
defaultFields
[
i
].
belinked
=
{
options
:
{
database
:
userSelect
,
params
:
{
id
:
record
.
id
},
},
};
record
.
status
==
1
&&
getPrem
(
"sysDepartment_save"
,
action
,
"审批"
,
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysAccountApply/queryById"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
??
{};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
if
(
i
==
"parentId"
)
{
defaultFields
[
i
].
belinked
=
{
options
:
{
database
:
userSelect
,
params
:
{
id
:
record
.
id
},
},
};
}
}
}
let
newParams
=
{
remark
:
{
value
:
data
.
remark
,
type
:
"textarea"
,
title
:
"备注"
,
name
:
[
"remark"
],
required
:
false
,
col
:
{
span
:
24
},
},
applyTime
:
{
value
:
data
.
applyTime
,
type
:
"datepicker"
,
title
:
"申请时间"
,
name
:
[
"applyTime"
],
required
:
false
,
disabled
:
true
,
},
auditResult
:
{
value
:
null
,
type
:
"select"
,
title
:
"审批结果"
,
name
:
[
"auditResult"
],
required
:
true
,
options
:
[
{
label
:
"通过"
,
value
:
1
,
},
{
label
:
"不通过"
,
value
:
2
,
},
],
linked
:
true
,
},
auditOpinion
:
{
value
:
null
,
type
:
"textarea"
,
title
:
"审批意见"
,
name
:
[
"auditOpinion"
],
required
:
true
,
col
:
{
span
:
24
},
belinked
:
{
hides
:
[
let
newParams
=
{
remark
:
{
value
:
data
.
remark
,
type
:
"textarea"
,
title
:
"备注"
,
name
:
[
"remark"
],
required
:
false
,
col
:
{
span
:
24
},
},
applyTime
:
{
value
:
data
.
applyTime
,
type
:
"datepicker"
,
title
:
"申请时间"
,
name
:
[
"applyTime"
],
required
:
false
,
disabled
:
true
,
},
auditResult
:
{
value
:
null
,
type
:
"select"
,
title
:
"审批结果"
,
name
:
[
"auditResult"
],
required
:
true
,
options
:
[
{
name
:
"auditResult"
,
equalvalue
:
[
1
,
null
],
required
:
true
,
label
:
"通过"
,
value
:
1
,
},
{
label
:
"不通过"
,
value
:
2
,
},
],
linked
:
true
,
},
},
};
dispatch
({
type
:
"audit"
,
fields
:
{
...
defaultFields
,
...
newParams
},
curitem
:
data
,
});
}
});
}),
auditOpinion
:
{
value
:
null
,
type
:
"textarea"
,
title
:
"审批意见"
,
name
:
[
"auditOpinion"
],
required
:
true
,
col
:
{
span
:
24
},
belinked
:
{
hides
:
[
{
name
:
"auditResult"
,
equalvalue
:
[
1
,
null
],
required
:
true
,
},
],
},
},
};
dispatch
({
type
:
"audit"
,
fields
:
{
...
defaultFields
,
...
newParams
},
curitem
:
data
,
});
}
});
}),
];
}
let
saveData
=
(
values
,
fn
)
=>
{
...
...
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