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
7b6fce2b
Commit
7b6fce2b
authored
Dec 06, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12060914
parent
2c4a903a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
301 additions
and
157 deletions
+301
-157
columns.js
src/pages/repair/fault/columns.js
+30
-31
index.jsx
src/pages/repair/fault/index.jsx
+2
-3
columns.js
src/pages/repair/order/columns.js
+222
-95
index.jsx
src/pages/repair/order/index.jsx
+47
-28
No files found.
src/pages/repair/fault/columns.js
View file @
7b6fce2b
function
getcolumns
(
setdrawer
)
{
return
[
{
"title"
:
"故障类型"
,
"dataIndex"
:
"faultType"
,
"key"
:
"faultType"
},
{
"title"
:
"故障代码"
,
"dataIndex"
:
"faultCode"
,
"key"
:
"faultCode"
},
{
"title"
:
"设备类型"
,
"dataIndex"
:
"equipmentTypeName"
,
"key"
:
"equipmentTypeId"
,
"valueType"
:
"treeSelect"
,
"options"
:
{
"path"
:
"/asset/equipmentType/queryTreeList"
,
"params"
:
{}
}
},
{
"title"
:
"备注"
,
"dataIndex"
:
"remark"
,
"key"
:
"remark"
,
"valueType"
:
"textarea"
}
];
}
export
default
getcolumns
;
\ No newline at end of file
return
[
{
title
:
'故障类型'
,
dataIndex
:
'faultType'
,
key
:
'faultType'
,
},
{
title
:
'故障代码'
,
dataIndex
:
'faultCode'
,
key
:
'faultCode'
,
},
{
title
:
'设备类型'
,
dataIndex
:
'equipmentTypeName'
,
key
:
'equipmentTypeId'
,
valueType
:
'treeSelect'
,
options
:
{
path
:
'/asset/equipmentType/queryTreeList'
,
params
:
{},
},
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
valueType
:
'textarea'
,
},
];
}
export
default
getcolumns
;
src/pages/repair/fault/index.jsx
View file @
7b6fce2b
...
...
@@ -44,7 +44,6 @@ function Fault(props) {
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -57,7 +56,7 @@ function Fault(props) {
},
}
}
>
详情
故障名称
</
PremButton
>
);
};
...
...
@@ -121,7 +120,7 @@ function Fault(props) {
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
故障
类型
</
h3
>
}
pagetitle=
{
<
h3
className=
"page-title"
>
故障
设置
</
h3
>
}
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
...
...
src/pages/repair/order/columns.js
View file @
7b6fce2b
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
title
:
'用户名'
,
dataIndex
:
'accountName'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
?.((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
}}
>
{
text
}
<
/a
>
);
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
tab
:
'我的待办'
,
key
:
'1'
,
columns
:
[
{
title
:
'维修单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'报修人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'报修时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
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
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
tab
:
'未完成'
,
key
:
'2'
,
columns
:
[
{
title
:
'维修单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'报修人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'报修时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
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
:
true
,
enabledelete
:
true
,
enabledetail
:
true
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryFinishList'
,
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
:
'上传样式-图片'
,
dataIndex
:
'uploadImage'
,
key
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
limit
:
2
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
tab
:
'已完成'
,
key
:
'3'
,
columns
:
[
{
title
:
'维修单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'报修人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'报修时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'最新维修人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
{
title
:
'关单时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'报修单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
{
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
true
,
enabledelete
:
true
,
enabledetail
:
true
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
];
}
export
default
getcolumns
;
src/pages/repair/order/index.jsx
View file @
7b6fce2b
/* 故障报修
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-06 09:04:06
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
@@ -7,24 +14,13 @@ import getcolumns from './columns';
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
const
pathconfig
=
{
enableadd
:
true
,
enableedit
:
true
,
enabledelete
:
true
,
enabledetail
:
true
,
add
:
''
,
edit
:
''
,
list
:
''
,
delete
:
''
,
detail
:
''
,
};
function
Order
(
props
)
{
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
...
...
@@ -105,53 +101,74 @@ function Order(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
);
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
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[]);
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
},
[
activeTabKey
]);
const
selectType
=
(
type
)
=>
{
switch
(
type
)
{
case
'add'
:
return
<
Addform
/>;
default
:
break
;
}
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"维修工单"
pagetitle=
{
<
h3
className=
"page-title"
>
维修工单
</
h3
>
}
columns=
{
columns
}
actionRef=
{
actionRef
}
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
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
val
:
'only'
,
type
:
'add'
,
}));
},
},
}
}
tabList=
{
getcolumns
()
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
);
}
}
/>
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -166,9 +183,11 @@ function Order(props) {
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
{
selectType
(
drawer
?.
type
)
}
</
DrawerPro
>
</
div
>
);
}
export
default
Order
;
export
default
Failure
;
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