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
d47a343e
Commit
d47a343e
authored
Jan 13, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1730
parent
b674812c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
628 additions
and
24 deletions
+628
-24
columns.js
src/pages/check/order/columns.js
+3
-4
columns.js
src/pages/check/plan/columns.js
+1
-2
columns.js
src/pages/check/standard/columns.js
+2
-3
procolumns.js
src/pages/check/standard/procolumns.js
+3
-1
columns.js
src/pages/check/task/columns.js
+146
-3
index.jsx
src/pages/check/task/index.jsx
+473
-11
No files found.
src/pages/check/order/columns.js
View file @
d47a343e
...
...
@@ -59,9 +59,8 @@ function getcolumns(setdrawer) {
},
],
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'点检截止日期'
,
...
...
@@ -69,7 +68,7 @@ function getcolumns(setdrawer) {
key
:
'checkCloseDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
checkCloseDate
).
valueOf
()
<
dayjs
().
valueOf
()
?
"#f50"
:
"rgba(0, 0, 0, 0.85)"
}
`
}}
>
{
row
.
checkCloseDate
}
<
/span
>
return
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
checkCloseDate
).
valueOf
()
<
dayjs
().
format
(
"YYYY-MM-DD"
).
valueOf
()
?
"#f50"
:
"rgba(0, 0, 0, 0.85)"
}
`
}}
>
{
row
.
checkCloseDate
}
<
/span
>
}
},
],
...
...
src/pages/check/plan/columns.js
View file @
d47a343e
...
...
@@ -214,8 +214,7 @@ function getcolumns(setdrawer) {
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
dropdownMatchSelectWidth
:
100
},
options
:
[
{
...
...
src/pages/check/standard/columns.js
View file @
d47a343e
...
...
@@ -31,9 +31,8 @@ function getcolumns(id) {
}
],
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
dropdownMatchSelectWidth
:
100
}
},
{
"title"
:
"设备型号"
,
...
...
src/pages/check/standard/procolumns.js
View file @
d47a343e
...
...
@@ -22,7 +22,7 @@ function procolumns(id) {
},
{
title
:
'判断类型'
,
dataIndex
:
'judgeType'
,
dataIndex
:
'judgeType
Name
'
,
key
:
'judgeType'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'select'
,
...
...
@@ -40,6 +40,7 @@ function procolumns(id) {
hideInForm
:
{
judgeType
:
[
1
,
null
,
undefined
]
},
valueType
:
'digit'
,
hideInSearch
:
true
,
min
:
-
10000000000000000
},
{
title
:
'上限值'
,
...
...
@@ -49,6 +50,7 @@ function procolumns(id) {
valueType
:
'digit'
,
hideInForm
:
{
judgeType
:
[
1
,
null
,
undefined
]
},
hideInSearch
:
true
,
min
:
-
10000000000000000
},
{
title
:
'预计工时'
,
...
...
src/pages/check/task/columns.js
View file @
d47a343e
import
dayjs
from
"dayjs"
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
getcolumns
(
setdrawer
)
{
return
[
{
...
...
@@ -9,6 +11,36 @@ function getcolumns(setdrawer) {
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
==
"0000"
)
{
const
{
taskNo
,
createTime
,
statusName
,
planNo
,
status
}
=
res
?.
data
?.
basics
;
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'detail'
,
title
:
'详细信息'
,
item
:
{
task
:
{
taskNo
,
createTime
,
statusName
,
planNo
,
status
},
...
res
?.
data
}
}));
}
}}
>
{
row
?.
taskNo
}
<
/a
>
);
}
},
{
title
:
'设备编号'
,
...
...
@@ -38,6 +70,9 @@ function getcolumns(setdrawer) {
value
:
'2'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'点检截止日期'
,
...
...
@@ -45,6 +80,9 @@ function getcolumns(setdrawer) {
key
:
'checkCloseDateList'
,
hideInForm
:
true
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
checkCloseDate
).
valueOf
()
<
dayjs
().
format
(
"YYYY-MM-DD"
).
valueOf
()
?
"#f50"
:
"rgba(0, 0, 0, 0.85)"
}
`
}}
>
{
row
.
checkCloseDate
}
<
/span
>
}
},
{
title
:
'接单时间'
,
...
...
@@ -54,7 +92,7 @@ function getcolumns(setdrawer) {
hideInSearch
:
true
,
},
{
title
:
'点检人'
,
title
:
'点检人
员
'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserName'
,
hideInForm
:
true
,
...
...
@@ -77,6 +115,9 @@ function getcolumns(setdrawer) {
value
:
'2'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
],
pathconfig
:
{
...
...
@@ -100,6 +141,36 @@ function getcolumns(setdrawer) {
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
==
"0000"
)
{
const
{
taskNo
,
createTime
,
statusName
,
planNo
,
status
}
=
res
?.
data
?.
basics
;
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'detail'
,
title
:
'详细信息'
,
item
:
{
task
:
{
taskNo
,
createTime
,
statusName
,
planNo
,
status
},
...
res
?.
data
}
}));
}
}}
>
{
row
?.
taskNo
}
<
/a
>
);
}
},
{
title
:
'设备编号'
,
...
...
@@ -129,6 +200,9 @@ function getcolumns(setdrawer) {
value
:
'2'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'点检截止日期'
,
...
...
@@ -136,6 +210,9 @@ function getcolumns(setdrawer) {
key
:
'checkCloseDateList'
,
hideInForm
:
true
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
checkCloseDate
).
valueOf
()
<
dayjs
().
format
(
"YYYY-MM-DD"
).
valueOf
()
?
"#f50"
:
"rgba(0, 0, 0, 0.85)"
}
`
}}
>
{
row
.
checkCloseDate
}
<
/span
>
}
},
{
title
:
'接单时间'
,
...
...
@@ -144,7 +221,7 @@ function getcolumns(setdrawer) {
hideInForm
:
true
,
},
{
title
:
'点检人'
,
title
:
'点检人
员
'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserId'
,
hideInSearch
:
false
,
...
...
@@ -154,6 +231,9 @@ function getcolumns(setdrawer) {
path
:
'/auth/sysUser/selection'
,
params
:
{},
},
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'状态'
,
...
...
@@ -171,6 +251,9 @@ function getcolumns(setdrawer) {
value
:
'2'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
],
pathconfig
:
{
...
...
@@ -194,6 +277,51 @@ function getcolumns(setdrawer) {
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/check/umEquipmentCheckTaskHis/queryDetails"
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
==
"0000"
)
{
const
{
taskNo
,
createTime
,
statusName
,
planNo
,
endTime
,
status
}
=
res
?.
data
?.
basics
;
let
newArr
=
[];
if
(
row
.
status
==
4
)
{
newArr
=
res
?.
data
?.
delay
?.
item
?.
map
(
it
=>
{
return
{
...
it
,
result
:
it
.
judgeType
==
1
?
it
.
judgeResultQualitative
:
it
.
judgeResultRation
}
});
}
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'detail'
,
title
:
'详细信息'
,
item
:
{
task
:
{
taskNo
,
createTime
,
statusName
,
planNo
,
endTime
,
status
:
row
.
status
},
...
res
?.
data
,
delay
:
res
?.
data
?.
delay
&&
{
...
res
?.
data
?.
delay
,
itemlist
:
newArr
}
}
}));
}
}}
>
{
row
?.
taskNo
}
<
/a
>
);
}
},
{
title
:
'设备编号'
,
...
...
@@ -223,6 +351,9 @@ function getcolumns(setdrawer) {
value
:
'2'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'点检截止日期'
,
...
...
@@ -230,6 +361,9 @@ function getcolumns(setdrawer) {
key
:
'checkCloseDateList'
,
hideInForm
:
true
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
checkCloseDate
}
<
/span
>
}
},
{
title
:
'接单时间'
,
...
...
@@ -243,9 +377,12 @@ function getcolumns(setdrawer) {
key
:
'endDateList'
,
hideInForm
:
true
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
endTime
}
<
/span
>
}
},
{
title
:
'点检人'
,
title
:
'点检人
员
'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserId'
,
hideInForm
:
true
,
...
...
@@ -254,6 +391,9 @@ function getcolumns(setdrawer) {
path
:
'/auth/sysUser/selection'
,
params
:
{},
},
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
{
title
:
'状态'
,
...
...
@@ -275,6 +415,9 @@ function getcolumns(setdrawer) {
value
:
'5'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
100
}
},
],
pathconfig
:
{
...
...
src/pages/check/task/index.jsx
View file @
d47a343e
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
Radio
,
InputNumber
,
Input
}
from
'antd'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTables
from
'@/components/AutoTable/mtable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
...
...
@@ -13,9 +15,10 @@ function Task(props) {
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
);
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
),
[
detailData
,
cd
]
=
useState
({});
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
...
...
@@ -92,20 +95,450 @@ function Task(props) {
</
PremButton
>
);
};
const
order
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否接单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/check/umEquipmentCheckTask/meet'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
}
}
>
接单
</
PremButton
>
);
};
const
close
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否关单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/check/umEquipmentCheckTask/shut'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
关单
</
PremButton
>
);
};
const
finish
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
{
...
res
.
data
?.
basics
,
...
res
.
data
?.
meet
,
id
:
row
.
id
},
title
:
'点检工单'
,
val
:
'detailaddon'
,
}));
}
})
},
}
}
>
完成点检
</
PremButton
>
);
};
const
detailaddonColumns
=
useMemo
(()
=>
{
if
(
activeTabKey
==
1
)
{
const
columnsc
=
[
{
title
:
'点检项目'
,
dataIndex
:
'checkItem'
,
key
:
'checkItem'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'checkPosition'
,
key
:
'checkPosition'
,
hideInForm
:
true
,
},
{
title
:
'点检方法'
,
dataIndex
:
'checkWay'
,
key
:
'checkWay'
,
hideInForm
:
true
,
},
{
title
:
'结果'
,
dataIndex
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
row
.
judgeType
==
1
?
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
row
.
result
=
e
.
target
.
value
;
}
}
>
<
Radio
value=
{
1
}
>
正常
</
Radio
>
<
Radio
value=
{
2
}
>
异常
</
Radio
>
</
Radio
.
Group
>
:
<
InputNumber
onChange=
{
(
value
)
=>
{
row
.
result
=
value
;
}
}
min=
{
row
.
lowerLimit
}
max=
{
row
.
upperLimit
}
/>
}
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
Input
onChange=
{
(
e
)
=>
{
row
.
remark
=
e
.
target
.
value
;
}
}
/>
}
},
];
return
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
},
{
title
:
'点检计划单号'
,
dataIndex
:
'planNo'
,
key
:
'planNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'点检类型'
,
dataIndex
:
'checkTypeName'
,
key
:
'checkTypeName'
,
},
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
},
{
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
},
{
title
:
'完成点检'
,
valueType
:
'split'
,
},
{
title
:
'点检方法'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
item
??
[]
}
/>
);
},
},
]
}
},
[
drawer
?.
item
,
activeTabKey
]);
const
detailColumns
=
useMemo
(()
=>
{
if
(
drawer
?.
val
==
"detail"
)
{
const
columnsc
=
[
{
title
:
'点检项目'
,
dataIndex
:
'checkItem'
,
key
:
'checkItem'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'checkPosition'
,
key
:
'checkPosition'
,
hideInForm
:
true
,
},
{
title
:
'点检方法'
,
dataIndex
:
'checkWay'
,
key
:
'checkWay'
,
hideInForm
:
true
,
}
];
const
allObj
=
{
task
:
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
},
{
title
:
'点检计划单号'
,
dataIndex
:
'planNo'
,
key
:
'planNo'
,
span
:
activeTabKey
==
3
?
1
:
3
,
},
{
title
:
'关单时间'
,
dataIndex
:
'endTime'
,
key
:
'endTime'
,
hideInDescriptions
:
activeTabKey
==
3
?
false
:
true
,
},
],
basics
:
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'点检类型'
,
dataIndex
:
'checkTypeName'
,
key
:
'checkTypeName'
,
},
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
basics
?.
item
??
[]
}
/>
);
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
!=
4
?
false
:
true
},
],
meet
:
[
{
title
:
'接单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检人员'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserName'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
span
:
2
},
],
delay
:
[
{
title
:
'完成点检'
,
valueType
:
'split'
,
},
{
title
:
'完成点检时间'
,
dataIndex
:
'checkEndTime'
,
key
:
'checkEndTime'
,
span
:
3
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
.
concat
([
{
title
:
'结果'
,
dataIndex
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
},
])?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
delay
?.
itemlist
??
[]
}
/>
);
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
==
4
?
false
:
true
},
],
shut
:
[
{
title
:
'关单信息'
,
valueType
:
'split'
,
},
{
title
:
'关单人员'
,
dataIndex
:
'shutUserName'
,
key
:
'shutUserName'
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'shutTime'
,
key
:
'shutTime'
,
},
]
},
newObject
=
{};
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
drawer
?.
item
)),
objectData
=
{};
let
dataKeys
=
Object
.
keys
(
data
),
allObjKeys
=
Object
.
keys
(
allObj
),
newObjKes
=
allObjKeys
.
filter
(
it
=>
dataKeys
.
indexOf
(
it
)
>
-
1
);
newObjKes
.
map
(
it
=>
{
newObject
[
it
]
=
allObj
[
it
];
});
let
newColumns
=
[];
for
(
let
i
in
newObject
)
{
newColumns
=
[...
newColumns
,
...
newObject
[
i
]]
}
for
(
let
i
in
data
)
{
objectData
=
Object
.
assign
(
objectData
,
data
[
i
]);
}
cd
(
objectData
);
return
newColumns
;
}
},
[
drawer
?.
item
,
activeTabKey
]);
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
({
return
activeTabKey
==
1
?
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
),
row
.
status
==
1
&&
order
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
finish
(
text
,
row
,
_
,
action
)
],
});
})
:
defcolumn
;
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
@@ -121,7 +554,7 @@ function Task(props) {
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
tru
e
}
resizeable=
{
fals
e
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
...
...
@@ -145,9 +578,9 @@ function Task(props) {
/>
<
DrawerPro
fields=
{
c
olumns
}
fields=
{
drawer
?.
val
==
"detailaddon"
?
detailaddonColumns
:
detailC
olumns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
detailData=
{
drawer
.
val
==
"detail"
?
detailData
:
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
...
...
@@ -166,7 +599,36 @@ function Task(props) {
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
<
div
>
<
PremButton
btn=
{
{
type
:
'primary'
,
loading
,
onClick
:
()
=>
{
let
itemList
=
drawer
?.
item
?.
item
?.
map
(
it
=>
{
if
(
it
.
judgeType
==
1
)
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
judgeResultQualitative
:
it
.
result
}
}
else
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
judgeResultRation
:
it
.
result
}
}
});
run
({
url
:
"/check/umEquipmentCheckTask/complele"
,
params
:
{
id
:
drawer
?.
item
?.
id
,
itemList
}
})
},
}
}
>
提交
</
PremButton
>
</
div
>
</
DrawerPro
>
</
div
>
);
}
...
...
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