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
72fc86d5
Commit
72fc86d5
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点检计划
parent
fd466937
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
460 additions
and
335 deletions
+460
-335
index.jsx
src/pages/check/order/index.jsx
+8
-11
index.jsx
src/pages/check/plan/index.jsx
+110
-91
columns.js
src/pages/check/standard/columns.js
+25
-0
index.jsx
src/pages/check/standard/index.jsx
+1
-1
index.jsx
src/pages/check/task/index.jsx
+254
-227
columns.js
src/pages/maintain/criterion/columns.js
+25
-1
index.jsx
src/pages/repair/outsourcing/index.jsx
+3
-2
index.jsx
src/pages/repair/track/index.jsx
+3
-2
columns.js
src/pages/spare/supplier/columns.js
+31
-0
No files found.
src/pages/check/order/index.jsx
View file @
72fc86d5
...
@@ -140,10 +140,7 @@ function Order(props) {
...
@@ -140,10 +140,7 @@ function Order(props) {
title
:
'操作'
,
title
:
'操作'
,
valueType
:
'option'
,
valueType
:
'option'
,
width
:
120
,
width
:
120
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
)],
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
)
],
});
});
},
[]);
},
[]);
...
@@ -168,7 +165,7 @@ function Order(props) {
...
@@ -168,7 +165,7 @@ function Order(props) {
hideInForm
:
true
,
hideInForm
:
true
,
},
},
];
];
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
return
[
return
[
{
{
title
:
'计划信息'
,
title
:
'计划信息'
,
...
@@ -222,7 +219,7 @@ function Order(props) {
...
@@ -222,7 +219,7 @@ function Order(props) {
title
:
'点检截止日期'
,
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
span
:
2
,
},
},
{
{
title
:
'点检项目'
,
title
:
'点检项目'
,
...
@@ -245,15 +242,15 @@ function Order(props) {
...
@@ -245,15 +242,15 @@ function Order(props) {
/>
/>
);
);
},
},
}
}
,
]
]
;
}
}
},
[
drawer
?.
val
,
drawer
?.
item
?.
id
]);
},
[
drawer
?.
val
,
drawer
?.
item
?.
id
]);
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"点检接单"
pagetitle=
{
<
h3
className=
"page-title"
>
点检接单
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
...
@@ -277,7 +274,7 @@ function Order(props) {
...
@@ -277,7 +274,7 @@ function Order(props) {
/>
/>
<
DrawerPro
<
DrawerPro
fields=
{
drawer
.
val
==
"detail"
?
detailsColumns
:
columns
}
fields=
{
drawer
.
val
==
'detail'
?
detailsColumns
:
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
...
...
This diff is collapsed.
Click to expand it.
src/pages/check/plan/index.jsx
View file @
72fc86d5
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
message
,
Popconfirm
,
Switch
}
from
"antd"
;
import
{
message
,
Popconfirm
,
Switch
}
from
'antd'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DetailPro
from
'@/components/DetailPro'
;
import
DetailPro
from
'@/components/DetailPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
...
@@ -67,7 +67,7 @@ function Plan(props) {
...
@@ -67,7 +67,7 @@ function Plan(props) {
item
:
row
,
item
:
row
,
title
:
'调整日期'
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
val
:
'detailaddon'
,
id
:
row
?.
id
id
:
row
?.
id
,
}));
}));
},
},
}
}
}
}
...
@@ -121,7 +121,8 @@ function Plan(props) {
...
@@ -121,7 +121,8 @@ function Plan(props) {
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
activeTabKey
==
1
?
defcolumn
.
concat
([
return
activeTabKey
==
1
?
defcolumn
.
concat
([
{
{
title
:
'启用/停用'
,
title
:
'启用/停用'
,
dataIndex
:
'checkEnable'
,
dataIndex
:
'checkEnable'
,
...
@@ -131,7 +132,8 @@ function Plan(props) {
...
@@ -131,7 +132,8 @@ function Plan(props) {
valueType
:
'switch'
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
//"1停用 2启用 *"
return
row
.
checkEnable
==
1
?
<
Popconfirm
return
row
.
checkEnable
==
1
?
(
<
Popconfirm
title=
"是否开启或停用?"
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
onConfirm=
{
async
()
=>
{
if
(
row
.
checkEnable
==
1
)
{
if
(
row
.
checkEnable
==
1
)
{
...
@@ -153,7 +155,7 @@ function Plan(props) {
...
@@ -153,7 +155,7 @@ function Plan(props) {
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
/>
/>
</
Popconfirm
>
</
Popconfirm
>
:
)
:
(
<
Switch
<
Switch
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren=
"开启"
checkedChildren=
"开启"
...
@@ -166,15 +168,15 @@ function Plan(props) {
...
@@ -166,15 +168,15 @@ function Plan(props) {
...
s
,
...
s
,
open
:
true
,
open
:
true
,
item
:
row
,
item
:
row
,
title
:
'调整日期
'
,
title
:
'启用点检计划
'
,
val
:
'detailaddon'
,
val
:
'detailaddon'
,
type
:
"delay"
,
type
:
'delay'
,
id
:
row
?.
id
id
:
row
?.
id
,
}));
}));
}
}
}
}
}
}
/>
/>
;
)
;
},
},
hideInDescriptions
:
true
,
hideInDescriptions
:
true
,
},
},
...
@@ -183,12 +185,14 @@ function Plan(props) {
...
@@ -183,12 +185,14 @@ function Plan(props) {
valueType
:
'option'
,
valueType
:
'option'
,
width
:
150
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
status
==
1
&&
remove
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
status
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
],
}
},
])
:
defcolumn
;
])
:
defcolumn
;
},
[
activeTabKey
]);
},
[
activeTabKey
]);
const
editDateColumns
=
useMemo
(()
=>
{
const
editDateColumns
=
useMemo
(()
=>
{
...
@@ -196,7 +200,10 @@ function Plan(props) {
...
@@ -196,7 +200,10 @@ function Plan(props) {
if
(
drawer
?.
item
?.
status
==
1
)
{
if
(
drawer
?.
item
?.
status
==
1
)
{
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
}
else
{
}
else
{
if
(
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
).
valueOf
()
>=
dayjs
().
endOf
(
'day'
).
valueOf
())
{
if
(
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
).
valueOf
()
>=
dayjs
().
endOf
(
'day'
).
valueOf
()
)
{
return
current
&&
current
<=
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
);
return
current
&&
current
<=
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
);
}
else
{
}
else
{
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
...
@@ -243,7 +250,7 @@ function Plan(props) {
...
@@ -243,7 +250,7 @@ function Plan(props) {
title
:
'计划类型'
,
title
:
'计划类型'
,
dataIndex
:
'checkLoopName'
,
dataIndex
:
'checkLoopName'
,
key
:
'checkLoop'
,
key
:
'checkLoop'
,
hideInForm
:
true
hideInForm
:
true
,
},
},
{
{
title
:
'调整信息'
,
title
:
'调整信息'
,
...
@@ -267,7 +274,7 @@ function Plan(props) {
...
@@ -267,7 +274,7 @@ function Plan(props) {
},
},
valueType
:
'date'
,
valueType
:
'date'
,
hideInSearch
:
true
,
hideInSearch
:
true
,
hideInDescriptions
:
true
hideInDescriptions
:
true
,
},
},
{
{
title
:
'周期(天)'
,
title
:
'周期(天)'
,
...
@@ -278,7 +285,6 @@ function Plan(props) {
...
@@ -278,7 +285,6 @@ function Plan(props) {
valueType
:
'digit'
,
valueType
:
'digit'
,
hideInForm
:
drawer
?.
item
?.
checkLoop
==
2
?
false
:
true
,
hideInForm
:
drawer
?.
item
?.
checkLoop
==
2
?
false
:
true
,
precision
:
0
,
precision
:
0
,
},
},
];
];
},
[
drawer
?.
item
]);
},
[
drawer
?.
item
]);
...
@@ -304,7 +310,7 @@ function Plan(props) {
...
@@ -304,7 +310,7 @@ function Plan(props) {
hideInForm
:
true
,
hideInForm
:
true
,
},
},
];
];
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
return
[
return
[
{
{
title
:
'计划信息'
,
title
:
'计划信息'
,
...
@@ -334,7 +340,7 @@ function Plan(props) {
...
@@ -334,7 +340,7 @@ function Plan(props) {
title
:
'下次点检日期'
,
title
:
'下次点检日期'
,
dataIndex
:
'planCheckDate'
,
dataIndex
:
'planCheckDate'
,
key
:
'planCheckDate'
,
key
:
'planCheckDate'
,
span
:
activeTabKey
==
1
?
2
:
1
span
:
activeTabKey
==
1
?
2
:
1
,
},
},
{
{
title
:
'关单日期'
,
title
:
'关单日期'
,
...
@@ -385,7 +391,7 @@ function Plan(props) {
...
@@ -385,7 +391,7 @@ function Plan(props) {
title
:
'周期(天)'
,
title
:
'周期(天)'
,
dataIndex
:
'checkCycle'
,
dataIndex
:
'checkCycle'
,
key
:
'checkCycle'
,
key
:
'checkCycle'
,
span
:
activeTabKey
==
1
?
2
:
2
span
:
activeTabKey
==
1
?
2
:
2
,
},
},
{
{
title
:
'点检项目'
,
title
:
'点检项目'
,
...
@@ -429,7 +435,7 @@ function Plan(props) {
...
@@ -429,7 +435,7 @@ function Plan(props) {
key
:
'shutTime'
,
key
:
'shutTime'
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
},
},
]
]
;
}
}
},
[
drawer
?.
val
,
activeTabKey
,
drawer
?.
item
?.
id
]);
},
[
drawer
?.
val
,
activeTabKey
,
drawer
?.
item
?.
id
]);
const
pathconfig
=
useMemo
(()
=>
{
const
pathconfig
=
useMemo
(()
=>
{
...
@@ -446,7 +452,7 @@ function Plan(props) {
...
@@ -446,7 +452,7 @@ function Plan(props) {
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"点检计划"
pagetitle=
{
<
h3
className=
"page-title"
>
点检计划
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
...
@@ -475,7 +481,13 @@ function Plan(props) {
...
@@ -475,7 +481,13 @@ function Plan(props) {
/>
/>
<
DrawerPro
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
drawer
?.
val
==
"detail"
?
detailsColumns
:
columns
}
fields=
{
drawer
?.
val
==
'detailaddon'
?
editDateColumns
:
drawer
?.
val
==
'detail'
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailpath=
{
pathconfig
?.
detail
||
null
}
defaultFormValue=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
...
@@ -490,21 +502,24 @@ function Plan(props) {
...
@@ -490,21 +502,24 @@ function Plan(props) {
{
...
drawer
}
{
...
drawer
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
vals
));
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
vals
));
params
.
paramList
=
params
?.
paramList
?.
map
(
it
=>
{
params
.
paramList
=
params
?.
paramList
?.
map
(
(
it
)
=>
{
return
{
return
{
equipmentId
:
it
.
id
,
equipmentId
:
it
.
id
,
checkPlanDate
:
it
.
checkPlanDate
checkPlanDate
:
it
.
checkPlanDate
,
}
}
;
});
});
let
flag
=
params
.
paramList
?.
some
(
it
=>
!
it
.
checkPlanDate
);
let
flag
=
params
.
paramList
?.
some
(
(
it
)
=>
!
it
.
checkPlanDate
);
if
(
flag
)
{
if
(
flag
)
{
message
.
warning
(
"下次点检日期必填!"
)
message
.
warning
(
'下次点检日期必填!'
);
return
;
return
;
}
}
if
(
drawer
?.
val
==
'add'
)
{
if
(
drawer
?.
val
==
'add'
)
{
await
runAsync
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
params
}
});
await
runAsync
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
params
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
}
else
if
(
drawer
?.
val
==
'edit'
)
{
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
params
,
id
:
drawer
?.
item
?.
id
}
});
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
params
,
id
:
drawer
?.
item
?.
id
},
});
}
}
}
}
}
}
>
>
...
@@ -512,12 +527,16 @@ function Plan(props) {
...
@@ -512,12 +527,16 @@ function Plan(props) {
fields=
{
editDateColumns
}
fields=
{
editDateColumns
}
defaultFormValue=
{
{
checkCycle
:
drawer
?.
item
?.
checkCycle
}
}
defaultFormValue=
{
{
checkCycle
:
drawer
?.
item
?.
checkCycle
}
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
await
runAsync
({
url
:
drawer
?.
type
==
"delay"
?
"/check/umEquipmentCheckPlan/enable"
:
"/check/umEquipmentCheckPlan/adjustDate"
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
checkEnable
:
1
}
});
await
runAsync
({
url
:
drawer
?.
type
==
'delay'
?
'/check/umEquipmentCheckPlan/enable'
:
'/check/umEquipmentCheckPlan/adjustDate'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
checkEnable
:
1
},
});
}
}
}
}
/>
/>
</
DrawerPro
>
</
DrawerPro
>
</
div
>
</
div
>
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/check/standard/columns.js
View file @
72fc86d5
...
@@ -38,6 +38,7 @@ function getcolumns(id) {
...
@@ -38,6 +38,7 @@ function getcolumns(id) {
title
:
'设备型号'
,
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
key
:
'equipmentModelId'
,
hideInSearch
:
true
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -60,6 +61,30 @@ function getcolumns(id) {
...
@@ -60,6 +61,30 @@ function getcolumns(id) {
showSearch
:
true
,
showSearch
:
true
,
},
},
},
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
hideInForm
:
true
,
hideInTable
:
true
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
valueType
:
'select'
,
mode
:
'radio'
,
options
:
{
path
:
'/asset/equipmentModel/query/selection'
,
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/check/standard/index.jsx
View file @
72fc86d5
...
@@ -135,7 +135,7 @@ function Standard(props) {
...
@@ -135,7 +135,7 @@ function Standard(props) {
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
" 点检标准"
pagetitle=
{
<
h3
className=
"page-title"
>
点检标准
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/check/task/index.jsx
View file @
72fc86d5
...
@@ -15,7 +15,7 @@ function Task(props) {
...
@@ -15,7 +15,7 @@ function Task(props) {
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
}),
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
),
[
detailData
,
cd
]
=
useState
({});
[
detailData
,
cd
]
=
useState
({});
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
...
@@ -140,22 +140,24 @@ function Task(props) {
...
@@ -140,22 +140,24 @@ function Task(props) {
btn=
{
{
btn=
{
{
size
:
'small'
,
size
:
'small'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
}).
then
(
res
=>
{
doFetch
({
if
(
res
.
code
==
"0000"
)
{
url
:
'/check/umEquipmentCheckTask/queryDetails'
,
params
:
{
id
:
row
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'0000'
)
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
true
,
open
:
true
,
item
:
{
item
:
{
...
res
.
data
?.
basics
,
...
res
.
data
?.
basics
,
...
res
.
data
?.
meet
,
...
res
.
data
?.
meet
,
id
:
row
.
id
id
:
row
.
id
,
},
},
title
:
'点检工单'
,
title
:
'点检工单'
,
val
:
'detailaddon'
,
val
:
'detailaddon'
,
}));
}));
}
}
})
});
},
},
}
}
}
}
>
>
...
@@ -191,18 +193,23 @@ function Task(props) {
...
@@ -191,18 +193,23 @@ function Task(props) {
key
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
row
.
judgeType
==
1
?
return
row
.
judgeType
==
1
?
(
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
row
.
result
=
e
.
target
.
value
;
row
.
result
=
e
.
target
.
value
;
}
}
>
}
}
>
<
Radio
value=
{
1
}
>
正常
</
Radio
>
<
Radio
value=
{
1
}
>
正常
</
Radio
>
<
Radio
value=
{
2
}
>
异常
</
Radio
>
<
Radio
value=
{
2
}
>
异常
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
:
)
:
(
<
InputNumber
onChange=
{
(
value
)
=>
{
<
InputNumber
onChange=
{
(
value
)
=>
{
row
.
result
=
value
;
row
.
result
=
value
;
}
}
/>
}
}
}
/>
);
},
},
},
{
{
title
:
'下限值'
,
title
:
'下限值'
,
...
@@ -222,10 +229,14 @@ function Task(props) {
...
@@ -222,10 +229,14 @@ function Task(props) {
key
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
Input
onChange=
{
(
e
)
=>
{
return
(
<
Input
onChange=
{
(
e
)
=>
{
row
.
remark
=
e
.
target
.
value
;
row
.
remark
=
e
.
target
.
value
;
}
}
/>
}
}
}
/>
);
},
},
},
];
];
return
[
return
[
...
@@ -276,12 +287,12 @@ function Task(props) {
...
@@ -276,12 +287,12 @@ function Task(props) {
{
{
title
:
'点检截止日期'
,
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
key
:
'checkCloseDate'
,
},
},
{
{
title
:
'接单时间'
,
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
key
:
'checkStartTime'
,
},
},
{
{
title
:
'完成点检'
,
title
:
'完成点检'
,
...
@@ -305,14 +316,12 @@ function Task(props) {
...
@@ -305,14 +316,12 @@ function Task(props) {
);
);
},
},
},
},
];
]
}
}
},
[
drawer
?.
item
,
activeTabKey
]);
},
[
drawer
?.
item
,
activeTabKey
]);
const
detailColumns
=
useMemo
(()
=>
{
const
detailColumns
=
useMemo
(()
=>
{
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
const
columnsc
=
[
const
columnsc
=
[
{
{
title
:
'点检项目'
,
title
:
'点检项目'
,
...
@@ -331,7 +340,7 @@ function Task(props) {
...
@@ -331,7 +340,7 @@ function Task(props) {
dataIndex
:
'checkWay'
,
dataIndex
:
'checkWay'
,
key
:
'checkWay'
,
key
:
'checkWay'
,
hideInForm
:
true
,
hideInForm
:
true
,
}
}
,
];
];
const
allObj
=
{
const
allObj
=
{
task
:
[
task
:
[
...
@@ -396,7 +405,7 @@ function Task(props) {
...
@@ -396,7 +405,7 @@ function Task(props) {
title
:
'点检截止日期'
,
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
span
:
2
,
},
},
{
{
title
:
'点检项目'
,
title
:
'点检项目'
,
...
@@ -415,7 +424,7 @@ function Task(props) {
...
@@ -415,7 +424,7 @@ function Task(props) {
/>
/>
);
);
},
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
!=
4
?
false
:
true
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
!=
4
?
false
:
true
,
},
},
],
],
meet
:
[
meet
:
[
...
@@ -432,7 +441,7 @@ function Task(props) {
...
@@ -432,7 +441,7 @@ function Task(props) {
title
:
'接单时间'
,
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
key
:
'checkStartTime'
,
span
:
2
span
:
2
,
},
},
],
],
delay
:
[
delay
:
[
...
@@ -444,7 +453,7 @@ function Task(props) {
...
@@ -444,7 +453,7 @@ function Task(props) {
title
:
'完成点检时间'
,
title
:
'完成点检时间'
,
dataIndex
:
'checkEndTime'
,
dataIndex
:
'checkEndTime'
,
key
:
'checkEndTime'
,
key
:
'checkEndTime'
,
span
:
3
span
:
3
,
},
},
{
{
title
:
'点检项目'
,
title
:
'点检项目'
,
...
@@ -455,15 +464,24 @@ function Task(props) {
...
@@ -455,15 +464,24 @@ function Task(props) {
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
AutoTables
<
AutoTables
columns=
{
columnsc
.
concat
([
columns=
{
columnsc
.
concat
([
{
{
title
:
'结果'
,
title
:
'结果'
,
dataIndex
:
'result'
,
dataIndex
:
'result'
,
key
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
judgeType
==
1
?
row
.
result
==
1
?
"正常"
:
"异常"
:
row
.
result
}
</
span
>
return
(
}
<
span
>
{
row
.
judgeType
==
1
?
row
.
result
==
1
?
'正常'
:
'异常'
:
row
.
result
}
</
span
>
);
},
},
},
{
{
title
:
'下限值'
,
title
:
'下限值'
,
...
@@ -483,7 +501,8 @@ function Task(props) {
...
@@ -483,7 +501,8 @@ function Task(props) {
key
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
hideInForm
:
true
,
},
},
])?.
map
((
it
)
=>
({
])
?.
map
((
it
)
=>
({
...
it
,
...
it
,
hideInSearch
:
true
,
hideInSearch
:
true
,
}))
}
}))
}
...
@@ -491,7 +510,7 @@ function Task(props) {
...
@@ -491,7 +510,7 @@ function Task(props) {
/>
/>
);
);
},
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
==
4
?
false
:
true
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
==
4
?
false
:
true
,
},
},
],
],
shut
:
[
shut
:
[
...
@@ -509,16 +528,20 @@ function Task(props) {
...
@@ -509,16 +528,20 @@ function Task(props) {
dataIndex
:
'shutTime'
,
dataIndex
:
'shutTime'
,
key
:
'shutTime'
,
key
:
'shutTime'
,
},
},
]
],
},
newObject
=
{};
},
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
drawer
?.
item
)),
objectData
=
{};
newObject
=
{};
let
dataKeys
=
Object
.
keys
(
data
),
allObjKeys
=
Object
.
keys
(
allObj
),
newObjKes
=
allObjKeys
.
filter
(
it
=>
dataKeys
.
indexOf
(
it
)
>
-
1
);
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
drawer
?.
item
)),
newObjKes
.
map
(
it
=>
{
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
];
newObject
[
it
]
=
allObj
[
it
];
});
});
let
newColumns
=
[];
let
newColumns
=
[];
for
(
let
i
in
newObject
)
{
for
(
let
i
in
newObject
)
{
newColumns
=
[...
newColumns
,
...
newObject
[
i
]]
newColumns
=
[...
newColumns
,
...
newObject
[
i
]]
;
}
}
for
(
let
i
in
data
)
{
for
(
let
i
in
data
)
{
objectData
=
Object
.
assign
(
objectData
,
data
[
i
]);
objectData
=
Object
.
assign
(
objectData
,
data
[
i
]);
...
@@ -531,17 +554,18 @@ function Task(props) {
...
@@ -531,17 +554,18 @@ function Task(props) {
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
activeTabKey
==
1
?
defcolumn
.
concat
({
return
activeTabKey
==
1
?
defcolumn
.
concat
({
title
:
'操作'
,
title
:
'操作'
,
valueType
:
'option'
,
valueType
:
'option'
,
width
:
150
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
row
.
status
==
1
&&
order
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
order
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
finish
(
text
,
row
,
_
,
action
)
row
.
status
==
2
&&
finish
(
text
,
row
,
_
,
action
),
],
],
})
:
})
defcolumn
;
:
defcolumn
;
},
[
activeTabKey
]);
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
const
pathconfig
=
useMemo
(()
=>
{
...
@@ -552,7 +576,7 @@ function Task(props) {
...
@@ -552,7 +576,7 @@ function Task(props) {
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"点检工单"
pagetitle=
{
<
h3
className=
"page-title"
>
点检工单
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
...
@@ -581,9 +605,9 @@ function Task(props) {
...
@@ -581,9 +605,9 @@ function Task(props) {
/>
/>
<
DrawerPro
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
detailaddonColumns
:
detailColumns
}
fields=
{
drawer
?.
val
==
'detailaddon'
?
detailaddonColumns
:
detailColumns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
.
val
==
"detail"
?
detailData
:
drawer
?.
item
}
detailData=
{
drawer
.
val
==
'detail'
?
detailData
:
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
...
@@ -609,22 +633,25 @@ function Task(props) {
...
@@ -609,22 +633,25 @@ function Task(props) {
type
:
'primary'
,
type
:
'primary'
,
loading
,
loading
,
onClick
:
()
=>
{
onClick
:
()
=>
{
let
itemList
=
drawer
?.
item
?.
item
?.
map
(
it
=>
{
let
itemList
=
drawer
?.
item
?.
item
?.
map
(
(
it
)
=>
{
if
(
it
.
judgeType
==
1
)
{
if
(
it
.
judgeType
==
1
)
{
return
{
return
{
id
:
it
.
id
,
id
:
it
.
id
,
remark
:
it
.
remark
,
remark
:
it
.
remark
,
judgeResultQualitative
:
it
.
result
judgeResultQualitative
:
it
.
result
,
}
}
;
}
else
{
}
else
{
return
{
return
{
id
:
it
.
id
,
id
:
it
.
id
,
remark
:
it
.
remark
,
remark
:
it
.
remark
,
judgeResultRation
:
it
.
result
judgeResultRation
:
it
.
result
,
}
}
;
}
}
});
});
run
({
url
:
"/check/umEquipmentCheckTask/complele"
,
params
:
{
id
:
drawer
?.
item
?.
id
,
itemList
}
})
run
({
url
:
'/check/umEquipmentCheckTask/complele'
,
params
:
{
id
:
drawer
?.
item
?.
id
,
itemList
},
});
},
},
}
}
}
}
>
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/criterion/columns.js
View file @
72fc86d5
...
@@ -40,6 +40,7 @@ function getcolumns(equipmentModelId) {
...
@@ -40,6 +40,7 @@ function getcolumns(equipmentModelId) {
dataIndex
:
'equipmentModelName'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
key
:
'equipmentModelId'
,
valueType
:
'select'
,
valueType
:
'select'
,
hideInSearch
:
true
,
fieldProps
:
{
fieldProps
:
{
showSearch
:
true
,
showSearch
:
true
,
},
},
...
@@ -55,13 +56,36 @@ function getcolumns(equipmentModelId) {
...
@@ -55,13 +56,36 @@ function getcolumns(equipmentModelId) {
options
:
{
options
:
{
path
:
'/maintain/umMaintainStandard/selected/queryList'
,
path
:
'/maintain/umMaintainStandard/selected/queryList'
,
linkParams
:
{
linkParams
:
{
maintainType
:
'
maintainType
'
,
maintainType
:
''
,
},
},
extraParams
:
{
extraParams
:
{
equipmentModelId
,
equipmentModelId
,
},
},
},
},
},
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
hideInForm
:
true
,
hideInTable
:
true
,
valueType
:
'select'
,
fieldProps
:
{
showSearch
:
true
,
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
mode
:
'radio'
,
options
:
{
path
:
'/asset/equipmentModel/query/selection'
,
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/repair/outsourcing/index.jsx
View file @
72fc86d5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 1
1:45:14
* @Last Modified time: 2023-02-08 1
4:50:40
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -18,8 +18,9 @@ import Addform from '@/components/Addform';
...
@@ -18,8 +18,9 @@ import Addform from '@/components/Addform';
import
{
Menu
,
Dropdown
,
Button
,
message
}
from
'antd'
;
import
{
Menu
,
Dropdown
,
Button
,
message
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
import
InitForm
from
'@/components/InitForm'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Failure
(
props
)
{
function
Failure
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
containderef
=
useRef
(),
containderef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
...
...
This diff is collapsed.
Click to expand it.
src/pages/repair/track/index.jsx
View file @
72fc86d5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 1
3:30:00
* @Last Modified time: 2023-02-08 1
4:50:08
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -19,8 +19,9 @@ import { Menu, Dropdown, Button, message } from 'antd';
...
@@ -19,8 +19,9 @@ import { Menu, Dropdown, Button, message } from 'antd';
import
InitForm
from
'@/components/InitForm'
;
import
InitForm
from
'@/components/InitForm'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
OrderHandle
from
'../platform/RepairOrderHandle'
;
import
OrderHandle
from
'../platform/RepairOrderHandle'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Failure
(
props
)
{
function
Failure
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
containderef
=
useRef
(),
containderef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
...
...
This diff is collapsed.
Click to expand it.
src/pages/spare/supplier/columns.js
View file @
72fc86d5
...
@@ -107,6 +107,35 @@ function getcolumns(changeState) {
...
@@ -107,6 +107,35 @@ function getcolumns(changeState) {
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'statusName'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
key
:
'status'
,
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'启用'
,
value
:
1
,
},
{
label
:
'停用'
,
value
:
2
,
},
],
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
hideInDescriptions
:
true
,
valueType
:
'select'
,
valueType
:
'select'
,
mode
:
'radio'
,
mode
:
'radio'
,
options
:
[
options
:
[
...
@@ -140,10 +169,12 @@ function getcolumns(changeState) {
...
@@ -140,10 +169,12 @@ function getcolumns(changeState) {
);
);
},
},
},
},
{
{
title
:
'联系信息'
,
title
:
'联系信息'
,
valueType
:
'formList'
,
valueType
:
'formList'
,
dataIndex
:
'userList'
,
dataIndex
:
'userList'
,
span
:
3
,
colProps
:
{
colProps
:
{
xs
:
24
,
xs
:
24
,
sm
:
24
,
sm
:
24
,
...
...
This diff is collapsed.
Click to expand it.
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