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
911a41cd
Commit
911a41cd
authored
Jan 18, 2023
by
TZW
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.100.234.193:9527/wuhao/ems3.3
parents
729e1d5e
a2b28a59
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
74 deletions
+82
-74
.gitignore
.gitignore
+1
-0
index.jsx
src/components/InitForm/EditTable/index.jsx
+1
-0
columns.js
src/pages/check/plan/columns.js
+1
-0
columns.js
src/pages/check/task/columns.js
+8
-4
index.jsx
src/pages/check/task/index.jsx
+3
-0
index.jsx
src/pages/maintain/plan/index.jsx
+68
-70
No files found.
.gitignore
View file @
911a41cd
...
@@ -8,6 +8,7 @@ _roadhog-api-doc
...
@@ -8,6 +8,7 @@ _roadhog-api-doc
#
production
#
production
/
dist
/
dist
/
static
#
misc
#
misc
.
DS_Store
.
DS_Store
...
...
src/components/InitForm/EditTable/index.jsx
View file @
911a41cd
...
@@ -164,6 +164,7 @@ const EditTable = (props) => {
...
@@ -164,6 +164,7 @@ const EditTable = (props) => {
}
}
}
}
search=
{
{
search=
{
{
filterType
:
'light'
,
//轻量模式
filterType
:
'light'
,
//轻量模式
placement
:
'bottomLeft'
}
}
}
}
/>
/>
);
);
...
...
src/pages/check/plan/columns.js
View file @
911a41cd
...
@@ -248,6 +248,7 @@ function getcolumns(setdrawer) {
...
@@ -248,6 +248,7 @@ function getcolumns(setdrawer) {
path
:
'/asset/equipment/list/user/shop'
,
path
:
'/asset/equipment/list/user/shop'
,
columns
,
columns
,
hideInDescriptions
:
true
,
hideInDescriptions
:
true
,
rowName
:
"equipmentNo"
},
},
],
],
pathconfig
:
{
pathconfig
:
{
...
...
src/pages/check/task/columns.js
View file @
911a41cd
...
@@ -219,6 +219,7 @@ function getcolumns(setdrawer) {
...
@@ -219,6 +219,7 @@ function getcolumns(setdrawer) {
dataIndex
:
'checkStartTime'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
key
:
'checkStartTime'
,
hideInForm
:
true
,
hideInForm
:
true
,
hideInSearch
:
true
,
},
},
{
{
title
:
'点检人员'
,
title
:
'点检人员'
,
...
@@ -232,8 +233,9 @@ function getcolumns(setdrawer) {
...
@@ -232,8 +233,9 @@ function getcolumns(setdrawer) {
params
:
{},
params
:
{},
},
},
fieldProps
:
{
fieldProps
:
{
dropdownMatchSelectWidth
:
100
placeholder
:
'请选择'
,
}
showSearch
:
true
,
},
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
...
@@ -370,6 +372,7 @@ function getcolumns(setdrawer) {
...
@@ -370,6 +372,7 @@ function getcolumns(setdrawer) {
dataIndex
:
'checkStartTime'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
key
:
'checkStartTime'
,
hideInForm
:
true
,
hideInForm
:
true
,
hideInSearch
:
true
,
},
},
{
{
title
:
'关单时间'
,
title
:
'关单时间'
,
...
@@ -392,8 +395,9 @@ function getcolumns(setdrawer) {
...
@@ -392,8 +395,9 @@ function getcolumns(setdrawer) {
params
:
{},
params
:
{},
},
},
fieldProps
:
{
fieldProps
:
{
dropdownMatchSelectWidth
:
100
placeholder
:
'请选择'
,
}
showSearch
:
true
,
},
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
...
...
src/pages/check/task/index.jsx
View file @
911a41cd
...
@@ -461,6 +461,9 @@ function Task(props) {
...
@@ -461,6 +461,9 @@ function Task(props) {
dataIndex
:
'result'
,
dataIndex
:
'result'
,
key
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
judgeType
==
1
?
row
.
result
==
1
?
"正常"
:
"异常"
:
row
.
result
}
</
span
>
}
},
},
{
{
title
:
'下限值'
,
title
:
'下限值'
,
...
...
src/pages/maintain/plan/index.jsx
View file @
911a41cd
...
@@ -21,8 +21,8 @@ function Plan(props) {
...
@@ -21,8 +21,8 @@ function Plan(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'
);
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
...
@@ -460,43 +460,32 @@ function Plan(props) {
...
@@ -460,43 +460,32 @@ function Plan(props) {
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
return
activeTabKey
==
1
?
defcolumn
.
concat
([
?
defcolumn
.
concat
([
{
{
title
:
'启用/停用'
,
title
:
'启用/停用'
,
dataIndex
:
'isStopStatus'
,
dataIndex
:
'isStopStatus'
,
key
:
'isStopStatus'
,
key
:
'isStopStatus'
,
hideInForm
:
true
,
hideInForm
:
true
,
hideInSearch
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
//"1停用 2启用 *"
return
row
.
isStopStatus
==
1
?
(
return
row
.
isStopStatus
==
1
?
(
<
Popconfirm
<
Popconfirm
title=
"是否开启或停用?"
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
onConfirm=
{
async
()
=>
{
if
(
row
.
isStopStatus
==
1
)
{
if
(
row
.
isStopStatus
==
1
)
{
await
runAsync
({
await
runAsync
({
url
:
'/maintain/umMaintainPlan/enableDeactivate'
,
url
:
'/maintain/umMaintainPlan/enableDeactivate'
,
params
:
{
id
:
row
.
id
,
isStopFlag
:
2
},
params
:
{
id
:
row
.
id
,
isStopFlag
:
2
},
});
});
}
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
}
>
}
}
<
Switch
okText=
"确定"
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
cancelText=
"取消"
checkedChildren=
"开启"
disabled=
{
unCheckedChildren=
"停用"
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
defaultChecked=
{
false
}
}
disabled=
{
>
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
/>
</
Popconfirm
>
)
:
(
<
Switch
<
Switch
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
checkedChildren=
"开启"
checkedChildren=
"开启"
...
@@ -505,36 +494,47 @@ function Plan(props) {
...
@@ -505,36 +494,47 @@ function Plan(props) {
disabled=
{
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
}
onChange=
{
(
checked
)
=>
{
if
(
checked
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
id
:
row
?.
id
,
from
:
'tq'
,
}));
}
}
}
/>
/>
);
</
Popconfirm
>
},
)
:
(
hideInDescriptions
:
true
,
<
Switch
},
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
{
checkedChildren=
"开启"
title
:
'操作'
,
unCheckedChildren=
"停用"
valueType
:
'option'
,
defaultChecked=
{
false
}
width
:
150
,
disabled=
{
render
:
(
text
,
row
,
_
,
action
)
=>
[
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
&&
}
editDate
(
text
,
row
,
_
,
action
),
onChange=
{
(
checked
)
=>
{
row
.
maintainStatus
==
2
&&
close
(
text
,
row
,
_
,
action
),
if
(
checked
)
{
defpath
?.
enabledelete
&&
row
.
maintainStatus
==
1
&&
remove
(
text
,
row
,
_
,
action
),
setdrawer
((
s
)
=>
({
],
...
s
,
open
:
true
,
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
id
:
row
?.
id
,
from
:
'tq'
,
}));
}
}
}
/>
);
},
},
])
hideInDescriptions
:
true
,
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
maintainStatus
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
maintainStatus
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
},
])
:
defcolumn
;
:
defcolumn
;
},
[
activeTabKey
]);
},
[
activeTabKey
]);
...
@@ -579,8 +579,8 @@ function Plan(props) {
...
@@ -579,8 +579,8 @@ function Plan(props) {
drawer
?.
val
==
'detailaddon'
drawer
?.
val
==
'detailaddon'
?
editDateColumns
?
editDateColumns
:
drawer
?.
val
==
'detail'
:
drawer
?.
val
==
'detail'
?
detailsColumns
?
detailsColumns
:
columns
:
columns
}
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailpath=
{
pathconfig
?.
detail
||
null
}
// detailData={drawer?.item}
// detailData={drawer?.item}
...
@@ -596,7 +596,6 @@ function Plan(props) {
...
@@ -596,7 +596,6 @@ function Plan(props) {
}
}
}
}
{
...
drawer
}
{
...
drawer
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
vals
));
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
vals
));
params
.
equipmentList
=
vals
?.
paramList
?.
map
((
it
)
=>
{
params
.
equipmentList
=
vals
?.
paramList
?.
map
((
it
)
=>
{
return
{
return
{
...
@@ -610,7 +609,6 @@ function Plan(props) {
...
@@ -610,7 +609,6 @@ function Plan(props) {
message
.
warning
(
'下次保养日期必填!'
);
message
.
warning
(
'下次保养日期必填!'
);
return
;
return
;
}
}
console
.
log
(
params
);
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'
)
{
...
...
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