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
52481c49
Commit
52481c49
authored
Dec 06, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12061031
parent
f69798e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
436 additions
and
291 deletions
+436
-291
authRoutes.js
config/authRoutes.js
+12
-13
columns.js
src/pages/repair/outsourcing/columns.js
+24
-24
columns.js
src/pages/repair/track/columns.js
+222
-95
index.jsx
src/pages/repair/track/index.jsx
+178
-159
No files found.
config/authRoutes.js
View file @
52481c49
...
@@ -91,19 +91,6 @@ export default [
...
@@ -91,19 +91,6 @@ export default [
icon
:
''
,
icon
:
''
,
component
:
'./repair/failure'
,
component
:
'./repair/failure'
,
},
},
{
name
:
'故障设置'
,
path
:
'/repair/fault'
,
icon
:
''
,
component
:
'./repair/fault'
,
},
{
name
:
'外协工单'
,
path
:
'/repair/outsourcing'
,
icon
:
''
,
component
:
'./repair/outsourcing'
,
},
{
{
name
:
'维修工单'
,
name
:
'维修工单'
,
path
:
'/repair/order'
,
path
:
'/repair/order'
,
...
@@ -116,6 +103,18 @@ export default [
...
@@ -116,6 +103,18 @@ export default [
icon
:
''
,
icon
:
''
,
component
:
'./repair/track'
,
component
:
'./repair/track'
,
},
},
{
name
:
'外协工单'
,
path
:
'/repair/outsourcing'
,
icon
:
''
,
component
:
'./repair/outsourcing'
,
},
{
name
:
'故障设置'
,
path
:
'/repair/fault'
,
icon
:
''
,
component
:
'./repair/fault'
,
},
],
],
},
},
{
{
...
...
src/pages/repair/outsourcing/columns.js
View file @
52481c49
...
@@ -6,8 +6,8 @@ function getcolumns(setdrawer) {
...
@@ -6,8 +6,8 @@ function getcolumns(setdrawer) {
columns
:
[
columns
:
[
{
{
title
:
'外协单号'
,
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
repair
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
},
{
{
title
:
'设备编号'
,
title
:
'设备编号'
,
...
@@ -27,14 +27,14 @@ function getcolumns(setdrawer) {
...
@@ -27,14 +27,14 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
dataIndex
:
'
create
Time'
,
key
:
'
repair
TimeList'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
valueType
:
'dateTimeRange'
,
},
},
{
{
title
:
'创建人员'
,
title
:
'创建人员'
,
dataIndex
:
'
repair
UserName'
,
dataIndex
:
'
create
UserName'
,
key
:
'
repair
UserName'
,
key
:
'
create
UserName'
,
},
},
{
{
title
:
'最新外协人员'
,
title
:
'最新外协人员'
,
...
@@ -43,8 +43,8 @@ function getcolumns(setdrawer) {
...
@@ -43,8 +43,8 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'来源单号'
,
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
repair
No'
,
key
:
'
dataSources
No'
,
},
},
{
{
title
:
'工单状态'
,
title
:
'工单状态'
,
...
@@ -76,13 +76,13 @@ function getcolumns(setdrawer) {
...
@@ -76,13 +76,13 @@ function getcolumns(setdrawer) {
},
},
},
},
{
{
tab
:
'
我的待办
'
,
tab
:
'
未完成
'
,
key
:
'
1
'
,
key
:
'
2
'
,
columns
:
[
columns
:
[
{
{
title
:
'外协单号'
,
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
repair
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
},
{
{
title
:
'设备编号'
,
title
:
'设备编号'
,
...
@@ -102,8 +102,8 @@ function getcolumns(setdrawer) {
...
@@ -102,8 +102,8 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
dataIndex
:
'
create
Time'
,
key
:
'
repair
TimeList'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
valueType
:
'dateTimeRange'
,
},
},
{
{
...
@@ -118,8 +118,8 @@ function getcolumns(setdrawer) {
...
@@ -118,8 +118,8 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'来源单号'
,
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
repair
No'
,
key
:
'
dataSources
No'
,
},
},
{
{
title
:
'工单状态'
,
title
:
'工单状态'
,
...
@@ -151,13 +151,13 @@ function getcolumns(setdrawer) {
...
@@ -151,13 +151,13 @@ function getcolumns(setdrawer) {
},
},
},
},
{
{
tab
:
'
我的待办
'
,
tab
:
'
已完成
'
,
key
:
'
1
'
,
key
:
'
3
'
,
columns
:
[
columns
:
[
{
{
title
:
'外协单号'
,
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
repair
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
},
{
{
title
:
'设备编号'
,
title
:
'设备编号'
,
...
@@ -177,8 +177,8 @@ function getcolumns(setdrawer) {
...
@@ -177,8 +177,8 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
dataIndex
:
'
create
Time'
,
key
:
'
repair
TimeList'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
valueType
:
'dateTimeRange'
,
},
},
{
{
...
@@ -193,8 +193,8 @@ function getcolumns(setdrawer) {
...
@@ -193,8 +193,8 @@ function getcolumns(setdrawer) {
},
},
{
{
title
:
'来源单号'
,
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
repair
No'
,
key
:
'
dataSources
No'
,
},
},
{
{
title
:
'工单状态'
,
title
:
'工单状态'
,
...
...
src/pages/repair/track/columns.js
View file @
52481c49
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
{
title
:
'基础信息'
,
tab
:
'我的待办'
,
valueType
:
'split'
,
key
:
'1'
,
},
columns
:
[
{
{
title
:
'用户名'
,
title
:
'追踪单号'
,
dataIndex
:
'accountName'
,
dataIndex
:
'repairOrderNo'
,
formItemProps
:
{
key
:
'repairOrderNo'
,
rules
:
[
},
{
{
required
:
false
,
title
:
'设备编号'
,
message
:
'此项为必填项'
,
dataIndex
:
'equipmentNo'
,
},
key
:
'equipmentNo'
,
],
},
},
{
initialValue
:
'默认值'
,
title
:
'设备名称'
,
hideInForm
:
false
,
dataIndex
:
'equipmentName'
,
search
:
false
,
key
:
'equipmentName'
,
render
:
(
text
,
row
)
=>
{
},
return
(
{
<
a
title
:
'故障描述'
,
onClick
=
{()
=>
{
dataIndex
:
'faultDescription'
,
setdrawer
?.((
s
)
=>
({
key
:
'faultDescription'
,
...
s
,
valueType
:
'textarea'
,
visible
:
true
,
},
item
:
null
,
{
title
:
'新增'
,
title
:
'创建时间'
,
val
:
'add'
,
dataIndex
:
'repairTime'
,
}));
key
:
'repairTimeList'
,
}}
valueType
:
'dateTimeRange'
,
>
},
{
text
}
{
<
/a
>
title
:
'创建人员'
,
);
dataIndex
:
'repairUserName'
,
},
key
:
'repairUserName'
,
},
},
{
{
title
:
'姓名'
,
title
:
'下次追踪日期'
,
dataIndex
:
'userName'
,
dataIndex
:
'nextTrackDate'
,
key
:
'userId'
,
key
:
'nextTrackDateList'
,
hideInForm
:
{
valueType
:
'dateTimeRange'
,
accountName
:
{
},
reverse
:
[
'1'
,
'2'
,
'5'
],
{
},
title
:
'最新追踪人员'
,
remark
:
[
'3'
],
dataIndex
:
'newRepairUserName'
,
},
key
:
'newRepairUserName'
,
search
:
false
,
},
},
{
{
title
:
'来源单号'
,
title
:
'额外信息'
,
dataIndex
:
'dataSourcesNo'
,
valueType
:
'split'
,
key
:
'dataSourcesNo'
,
},
},
{
{
title
:
'联系电话'
,
title
:
'工单状态'
,
dataIndex
:
'telephone'
,
dataIndex
:
'statusName'
,
formItemProps
:
{
key
:
'status'
,
rules
:
[
valueType
:
'radio'
,
{
options
:
[
required
:
false
,
{
message
:
'此项为必填项'
,
label
:
'待维修'
,
},
value
:
'1'
,
],
},
{
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
search
:
false
,
},
},
{
{
title
:
'邮箱'
,
tab
:
'未完成'
,
dataIndex
:
'mailNo'
,
key
:
'2'
,
formItemProps
:
{
columns
:
[
rules
:
[
{
{
title
:
'追踪单号'
,
required
:
false
,
dataIndex
:
'repairOrderNo'
,
message
:
'此项为必填项'
,
key
:
'repairOrderNo'
,
},
},
],
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'创建人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'最新外协人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
{
title
:
'来源单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
{
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
search
:
false
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
valueType
:
'editor'
,
search
:
false
,
colProps
:
{
span
:
24
},
initialValue
:
'<p>Hello <b>World!</b></p>'
,
},
},
{
{
title
:
'上传样式-图片'
,
tab
:
'已完成'
,
dataIndex
:
'uploadImage'
,
key
:
'3'
,
key
:
'uploadImage'
,
columns
:
[
valueType
:
'uploadImage'
,
{
fieldProps
:
{
title
:
'追踪单号'
,
limit
:
2
,
dataIndex
:
'repairOrderNo'
,
},
key
:
'repairOrderNo'
,
formItemProps
:
{
},
rules
:
[
{
{
title
:
'设备编号'
,
required
:
false
,
dataIndex
:
'equipmentNo'
,
message
:
'此项为必填项'
,
key
:
'equipmentNo'
,
},
},
],
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'创建人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'最新外协人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
{
title
:
'来源单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
{
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
},
},
];
];
}
}
export
default
getcolumns
;
export
default
getcolumns
;
src/pages/repair/track/index.jsx
View file @
52481c49
import
*
as
React
from
'react'
;
/* 追踪工单
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
* @Author: Li Hanlin
import
DrawerPro
from
'@/components/DrawerPro'
;
* @Date: 2022-12-02 11:41:03
import
AutoTable
from
'@/components/AutoTable'
;
* @Last Modified by: Li Hanlin
import
PremButton
from
'@/components/PremButton'
;
* @Last Modified time: 2022-12-06 09:38:18
import
getcolumns
from
'./columns'
;
*/
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
const
pathconfig
=
{
import
*
as
React
from
'react'
;
"enableadd"
:
true
,
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
"enableedit"
:
true
,
import
DrawerPro
from
'@/components/DrawerPro'
;
"enabledelete"
:
true
,
import
AutoTable
from
'@/components/AutoTable'
;
"enabledetail"
:
true
,
import
PremButton
from
'@/components/PremButton'
;
"add"
:
""
,
import
getcolumns
from
'./columns'
;
"edit"
:
""
,
import
{
useRequest
}
from
'ahooks'
;
"list"
:
""
,
import
{
doFetch
}
from
'@/utils/doFetch'
;
"delete"
:
""
,
"detail"
:
""
};
function
Track
(
props
)
{
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
});
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
false
,
open
:
false
,
}));
}));
}
}
},
},
});
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
});
},
[
activeTabKey
]);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
pathconfig
=
useMemo
(()
=>
{
return
(
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
<
PremButton
return
defpath
;
btn=
{
{
},
[
activeTabKey
]);
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
const
selectType
=
(
type
)
=>
{
return
(
switch
(
type
)
{
<
PremButton
case
'add'
:
btn=
{
{
return
;
size
:
'small'
,
default
:
break
;
}
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
追踪工单
</
h3
>
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
true
,
open
:
true
,
item
:
row
,
item
:
null
,
title
:
'编辑'
,
title
:
'新增'
,
val
:
'edit'
,
val
:
'only'
,
type
:
'add'
,
}));
}));
},
},
}
}
},
>
}
}
编辑
tabList=
{
getcolumns
()
}
</
PremButton
>
activeTabKey=
{
activeTabKey
}
);
onTabChange=
{
(
key
)
=>
{
};
setactiveTabKey
(
key
);
}
}
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
/>
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
<
DrawerPro
let
defcolumn
=
getcolumns
(
setdrawer
);
fields=
{
columns
}
return
defcolumn
.
concat
({
detailpath=
{
pathconfig
?.
detail
||
null
}
title
:
'操作'
,
detailData=
{
drawer
?.
item
}
valueType
:
'option'
,
defaultFormValue=
{
drawer
?.
item
}
width
:
150
,
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
render
:
(
text
,
row
,
_
,
action
)
=>
[
formRef=
{
formRef
}
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
placement=
"right"
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
onClose=
{
()
=>
{
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
setdrawer
((
s
)
=>
({
],
...
s
,
});
open
:
false
,
},
[]);
}));
}
}
return
(
{
...
drawer
}
<
div
style=
{
{
position
:
'relative'
}
}
>
onFinish=
{
(
vals
)
=>
{
<
AutoTable
if
(
drawer
?.
val
==
'add'
)
{
pagetitle=
"追踪工单"
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
columns=
{
columns
}
}
else
if
(
drawer
?.
val
==
'edit'
)
{
actionRef=
{
actionRef
}
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
}
}
resizeable=
{
true
}
>
addconfig=
{
{
{
selectType
(
drawer
?.
type
)
}
// access: 'sysDepartment_save',
</
DrawerPro
>
btn
:
{
</
div
>
disabled
:
false
,
);
onClick
:
()
=>
{
}
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
</
div
>
);
}
export
default
Track
;
export
default
Failure
;
\ No newline at end of file
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