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
c08a9aa5
Commit
c08a9aa5
authored
Dec 08, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12081752
parent
ab6d67e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
214 additions
and
27 deletions
+214
-27
index.jsx
src/pages/repair/fault/index.jsx
+64
-7
index.jsx
src/pages/repair/order/index.jsx
+150
-20
No files found.
src/pages/repair/fault/index.jsx
View file @
c08a9aa5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-07 11:19:30
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-08 1
5:48:49
* @Last Modified time: 2022-12-08 1
6:06:42
*/
import
*
as
React
from
'react'
;
...
...
@@ -142,6 +142,14 @@ function Fault(props) {
title
:
'故障名称'
,
dataIndex
:
'faultDetailName'
,
key
:
'faultDetailName'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'故障代码'
,
...
...
@@ -152,11 +160,13 @@ function Fault(props) {
title
:
'故障描述'
,
dataIndex
:
'faultPhenomenon'
,
key
:
'faultPhenomenon'
,
valueType
:
'textarea'
,
},
{
title
:
'解决方案'
,
dataIndex
:
'faultSolution'
,
key
:
'faultSolution'
,
valueType
:
'textarea'
,
search
:
false
,
},
];
...
...
@@ -171,9 +181,42 @@ function Fault(props) {
},
[]);
return
(
<>
<
ProDescriptions
dataSource=
{
request
}
columns=
{
columns
}
/>
<
ProDescriptions
dataSource=
{
request
}
columns=
{
[
{
title
:
'故障类型'
,
dataIndex
:
'faultType'
,
key
:
'faultType'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'故障代码'
,
dataIndex
:
'faultCode'
,
key
:
'faultCode'
,
},
{
title
:
'设备类型'
,
dataIndex
:
'equipmentTypeName'
,
key
:
'equipmentTypeId'
,
valueType
:
'treeSelect'
,
options
:
{
path
:
'/asset/equipmentType/queryTreeList'
,
params
:
{},
},
},
]
}
/>
<
AutoTable
columns=
{
columns
}
formRef=
{
gzmcref
}
path=
"/repair/umFaultSettingDetail/queryById"
params=
{
{
id
:
drawer
?.
item
.
id
}
}
pageextra=
{
'add'
}
...
...
@@ -186,12 +229,26 @@ function Fault(props) {
setdrawergz
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
{
isShutdown
:
1
,
},
title
:
'新建追踪工单'
,
title
:
'新建故障名称'
,
val
:
'add'
,
type
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
id
:
drawer
?.
item
.
id
,
};
let
res
=
await
doFetch
({
url
:
'/repair/umFaultSettingDetail/save'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setdrawergz
((
s
)
=>
({
...
s
,
open
:
false
,
}));
gzmcref
.
current
.
reload
();
}
},
}));
},
},
...
...
src/pages/repair/order/index.jsx
View file @
c08a9aa5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-08
09:02:50
* @Last Modified time: 2022-12-08
17:52:09
*/
import
*
as
React
from
'react'
;
...
...
@@ -14,6 +14,7 @@ import getcolumns from './columns';
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
Dropdown
,
Menu
,
Button
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -101,6 +102,7 @@ function Failure(props) {
);
};
// 更多
const
more
=
(
text
,
row
,
_
,
action
)
=>
{
const
menu
=
(
<
Menu
...
...
@@ -109,9 +111,9 @@ function Failure(props) {
label
:
(
<
a
onClick=
{
()
=>
{
set
D
rawer
((
s
)
=>
({
set
d
rawer
((
s
)
=>
({
...
s
,
visible
:
true
,
open
:
true
,
type
:
'editChildEquipment'
,
item
:
{
id
:
row
.
id
,
...
...
@@ -130,9 +132,9 @@ function Failure(props) {
//
});
// if (res.code === '0000')
{
// message.success('新增成功!');
// set
D
rawer((s) => (
{
// set
d
rawer((s) => (
{
// ...s,
//
visible
: false,
//
open
: false,
//
}));
// actionRef.current.reload();
//
}
...
...
@@ -149,15 +151,15 @@ function Failure(props) {
label
:
(
<
a
onClick=
{
()
=>
{
set
D
rawer
((
s
)
=>
({
set
d
rawer
((
s
)
=>
({
...
s
,
visible
:
true
,
type
:
'
resume
'
,
open
:
true
,
type
:
'
wcwx
'
,
item
:
{
id
:
row
.
id
,
},
val
:
'only'
,
title
:
'
履历登记
'
,
title
:
'
完成维修
'
,
// onFinish: async (vals) =>
{
// //console.log(1);
// let params =
{
...
...
@@ -170,9 +172,9 @@ function Failure(props) {
//
});
// if (res.code === '0000')
{
// message.success('新增成功!');
// set
D
rawer((s) => (
{
// set
d
rawer((s) => (
{
// ...s,
//
visible
: false,
//
open
: false,
//
}));
// actionRef.current.reload();
//
}
...
...
@@ -232,6 +234,142 @@ function Failure(props) {
);
};
// ++++++下拉菜单+++++++
// 接单
const
Recevive
=
()
=>
{};
// 完成维修
const
Finishrepair
=
()
=>
{
const
columns
=
[
{
title
:
'故障类型'
,
dataIndex
:
'faultSettingId'
,
key
:
'faultSettingId'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umFaultSetting/selected/queryList'
,
params
:
{
equipmentId
:
drawer
?.
item
.
id
,
},
},
},
{
title
:
'故障名称'
,
dataIndex
:
'faultDetailId'
,
key
:
'faultDetailId'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umFaultSettingDetail/selected/queryList'
,
linkParams
:
{
faultSettingId
:
''
,
},
},
},
{
title
:
'故障原因'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'开始维修时间'
,
dataIndex
:
'equipmentId'
,
key
:
'equipmentId'
,
fieldProps
:
{
disabled
:
true
,
},
},
{
title
:
'维修类型'
,
dataIndex
:
'equipmentId'
,
key
:
'equipmentId'
,
valueType
:
'select'
,
options
:
{
path
:
'/asset/equipment/selection/user/shop'
,
params
:
{}
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'是否停机维修'
,
dataIndex
:
'isShutdown'
,
key
:
'isShutdown'
,
valueType
:
'radio'
,
options
:
[
{
value
:
1
,
label
:
'是'
,
},
{
value
:
2
,
label
:
'否'
,
},
],
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'维修内容'
,
dataIndex
:
'repairContent'
,
key
:
'repairContent'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'协助维修人员'
,
dataIndex
:
'repairAssistList'
,
key
:
'repairAssistList'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umRepairOrder/selection'
,
params
:
{
id
:
drawer
?.
item
.
id
}
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
},
];
return
(
<>
<
InitForm
fields=
{
columns
}
onFinish=
{
(
vals
)
=>
{
console
.
log
(
vals
);
}
}
{
...
drawer
}
/>
</>
);
};
const
selectType
=
{
jd
:
<
Recevive
/>,
wcwx
:
<
Finishrepair
/>,
};
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
??
{};
...
...
@@ -248,14 +386,6 @@ function Failure(props) {
return
defpath
;
},
[
activeTabKey
]);
const
selectType
=
(
type
)
=>
{
switch
(
type
)
{
case
'add'
:
return
;
default
:
break
;
}
};
const
containderef
=
useRef
();
return
(
<
div
style=
{
{
position
:
'relative'
}
}
ref=
{
containderef
}
>
...
...
@@ -313,7 +443,7 @@ function Failure(props) {
}
}
}
>
{
selectType
(
drawer
?.
type
)
}
{
selectType
[
drawer
?.
type
]
}
</
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