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
729e1d5e
Commit
729e1d5e
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detail
parent
fc3688a2
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1839 additions
and
435 deletions
+1839
-435
mtable.jsx
src/components/AutoTable/mtable.jsx
+2
-1
detailnode.jsx
src/components/DetailNode/detailnode.jsx
+35
-0
index.jsx
src/components/DetailNode/index.jsx
+76
-0
index.jsx
src/components/InitForm/Diyrule/index.jsx
+4
-3
index.jsx
src/pages/device/supplier/index.jsx
+1
-1
columns.js
src/pages/maintain/orders/columns.js
+117
-57
index.jsx
src/pages/maintain/orders/index.jsx
+231
-152
columns.js
src/pages/maintain/plan/columns.js
+2
-2
index.jsx
src/pages/maintain/plan/index.jsx
+1
-1
columns.js
src/pages/maintain/workOrder/columns.js
+464
-58
detailColumns.js
src/pages/maintain/workOrder/detailColumns.js
+227
-0
index.jsx
src/pages/maintain/workOrder/index.jsx
+678
-144
index.jsx
src/pages/system/rules/index.jsx
+1
-16
No files found.
src/components/AutoTable/mtable.jsx
View file @
729e1d5e
...
...
@@ -26,6 +26,7 @@ let handlEmptyChild = (tree = []) => {
const
Mtable
=
(
props
)
=>
{
const
{
headerTitle
,
actionRef
,
//表格动作
formRef
,
//表单Ref
rowKey
,
// key
...
...
@@ -42,7 +43,7 @@ const Mtable = (props) => {
resizeable
=
false
,
dataSource
,
}
=
props
;
console
.
log
(
dataSource
);
const
actionRefs
=
actionRef
??
useRef
(),
formRefs
=
formRef
??
useRef
(),
ifspagination
=
pagination
==
'false'
||
pagination
===
false
,
...
...
This diff is collapsed.
Click to expand it.
src/components/DetailNode/detailnode.jsx
0 → 100644
View file @
729e1d5e
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
{
Divider
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
const
DetailNode
=
(
props
)
=>
{
const
{
data
,
index
,
columns
,
hasTable
=
false
,
operationType
}
=
props
;
console
.
log
(
props
);
return
(
<>
<
div
className=
"fault-detail"
>
<
div
style=
{
{
flex
:
1
,
display
:
'flex'
,
flexDirection
:
'row'
}
}
>
<
div
className=
"fault-index"
>
{
Number
(
index
)
+
1
}
</
div
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
<
label
style=
{
{
width
:
'80px'
,
fontSize
:
18
,
fontWeight
:
600
}
}
>
{
data
?.
operationTypeName
}
</
label
>
<
span
>
{
data
?.
updateUserName
}
</
span
>
<
span
>
{
data
?.
updateTime
}
</
span
>
</
div
>
</
div
>
<
div
style=
{
{
flex
:
6
}
}
>
<
div
>
<
h2
className=
"page-title"
style=
{
{
marginBottom
:
16
}
}
>
{
operationType
==
0
?
'基础信息'
:
data
?.
operationTypeName
}
</
h2
>
</
div
>
<
ProDescriptions
dataSource=
{
data
}
columns=
{
columns
}
/>
{
hasTable
?
props
.
children
:
null
}
<
Divider
/>
</
div
>
</
div
>
</>
);
};
export
default
DetailNode
;
This diff is collapsed.
Click to expand it.
src/components/DetailNode/index.jsx
0 → 100644
View file @
729e1d5e
/* eslint-disable react/jsx-key */
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
Divider
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
DetailNode
from
'./detailnode'
;
import
AutoTable
from
'../AutoTable/mtable'
;
const
Detail
=
(
props
)
=>
{
console
.
log
(
props
);
const
{
path
,
params
,
titleColumns
,
detailKey
,
columns
}
=
props
;
let
[
firstcolumns
,
...
mescolumns
]
=
titleColumns
;
// columns?.forEach((it) => {
// if (it?.valueType == 'table') {
// tableColumns.push(it);
// } else {
// detailColumns.push(it);
// }
// });
const
detailData
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
path
,
params
});
return
res
?.
data
?.
dataList
;
});
console
.
log
(
columns
);
return
(
<>
<
h2
style=
{
{
fontWeight
:
700
,
marginBottom
:
16
}
}
>
{
firstcolumns
?.
title
}
:
{
detailData
?.
data
?.[
0
]?.[
firstcolumns
?.
dataIndex
]
||
'--'
}
</
h2
>
<
ProDescriptions
columns=
{
mescolumns
}
dataSource=
{
detailData
?.
data
?.[
0
]
}
/>
<
Divider
/>
<
div
>
{
detailData
?.
data
?.
map
((
it
,
index
)
=>
{
console
.
log
(
it
);
const
detailColumns
=
[],
tableColumns
=
[];
columns
[
it
?.
operationType
]?.
forEach
((
it
)
=>
{
if
(
it
?.
valueType
==
'table'
)
{
tableColumns
.
push
(
it
);
}
else
{
detailColumns
.
push
(
it
);
}
});
return
(
<
DetailNode
key=
{
it
?.
id
}
data=
{
it
}
index=
{
index
}
operationType=
{
it
?.
operationType
}
columns=
{
detailColumns
}
hasTable=
{
true
}
>
{
tableColumns
?.
map
((
t
)
=>
{
return
(
<
div
style=
{
{
marginTop
:
8
,
marginBottom
:
8
}
}
>
<
b
>
{
t
?.
title
}
</
b
>
<
AutoTable
dataSource=
{
it
[
t
?.
key
]
}
columns=
{
t
?.
columns
}
style=
{
{
marginTop
:
8
}
}
/>
</
div
>
);
})
}
</
DetailNode
>
);
})
}
</
div
>
</>
);
};
export
default
Detail
;
This diff is collapsed.
Click to expand it.
src/components/InitForm/Diyrule/index.jsx
View file @
729e1d5e
...
...
@@ -25,7 +25,7 @@ let Diyrule = (props) => {
defval
?.
other
||
{
noRuleCode
:
''
,
sort
:
null
,
formatType
:
3
,
formatType
:
null
,
increaseList
:
[],
}
);
...
...
@@ -34,7 +34,7 @@ let Diyrule = (props) => {
useEffect
(()
=>
{
onChange
(
defval
);
});
console
.
log
(
'other.sort :'
,
other
?.
sort
);
let
{
data
,
loading
}
=
useRequest
(()
=>
{
return
doFetch
({
url
:
'/base/bmNoRule/querySelect'
,
params
:
{}
});
});
...
...
@@ -520,9 +520,10 @@ let Diyrule = (props) => {
value=
{
other
?.
sort
}
options=
{
Array
.
apply
(
null
,
{
length
:
value
?
value
.
length
:
0
}).
map
((
it
,
i
)
=>
({
label
:
`第${i + 1}个`
,
value
:
i
+
2
,
value
:
i
+
1
,
}))
}
onChange=
{
(
val
)
=>
{
console
.
log
(
'改变的val'
,
val
);
onChange
({
value
:
value
,
other
:
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/device/supplier/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 202
2-12-19 14:18:44
* @Last Modified time: 202
3-01-18 15:25:43
*/
import
*
as
React
from
'react'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/orders/columns.js
View file @
729e1d5e
import
dayjs
from
'dayjs'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
getcolumns
(
setdrawer
)
{
return
{
"pathconfig"
:
{
"enableadd"
:
false
,
"enableedit"
:
false
,
"enabledelete"
:
false
,
"enabledetail"
:
false
,
"add"
:
""
,
"edit"
:
""
,
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
"delete"
:
""
,
"detail"
:
""
},
"columns"
:
[
{
"title"
:
"维修单号"
,
"dataIndex"
:
"repairOrderNo"
,
"key"
:
"repairOrderNo"
},
{
"title"
:
"设备编号"
,
"dataIndex"
:
"equipmentNo"
,
"key"
:
"equipmentNo"
},
{
"title"
:
"设备名称"
,
"dataIndex"
:
"equipmentName"
,
"key"
:
"equipmentName"
},
{
"title"
:
"故障描述"
,
"dataIndex"
:
"faultDescription"
,
"key"
:
"faultDescription"
},
{
"title"
:
"报修人员"
,
"dataIndex"
:
"repairUserName"
,
"key"
:
"repairUserName"
},
{
"title"
:
"报修时间"
,
"dataIndex"
:
"repairTime"
,
"key"
:
"repairTimeList"
,
"valueType"
:
"dateTimeRange"
},
{
"title"
:
"报修单号"
,
"dataIndex"
:
"repairNo"
,
"key"
:
"repairNo"
},
{
"title"
:
"工单状态"
,
"dataIndex"
:
"statusName"
,
"key"
:
"statusName"
}
]
};
columns
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'only'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'自主保养'
,
value
:
'1'
,
},
{
label
:
'专业保养'
,
value
:
'2'
,
},
],
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'周'
,
value
:
'0'
,
},
{
label
:
'月度'
,
value
:
'1'
,
},
{
label
:
'季度'
,
value
:
'2'
,
},
{
label
:
'半年'
,
value
:
'3'
,
},
{
label
:
'一年'
,
value
:
'4'
,
},
],
},
{
title
:
'保养截至日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
planMaintainDate
).
valueOf
()
<
dayjs
().
format
(
'YYYY-MM-DD'
).
valueOf
()
?
'#f50'
:
'rgba(0, 0, 0, 0.85)'
}
`
,
}}
>
{
row
.
planMaintainDate
}
<
/span
>
);
},
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/maintain/umMaintainTask/queryReceivingList'
,
delete
:
''
,
detail
:
''
,
},
};
}
export
default
getcolumns
;
\ No newline at end of file
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/orders/index.jsx
View file @
729e1d5e
This diff is collapsed.
Click to expand it.
src/pages/maintain/plan/columns.js
View file @
729e1d5e
...
...
@@ -385,7 +385,7 @@ function getcolumns(setdrawer) {
add
:
'/maintain/umMaintainPlan/save'
,
edit
:
'/maintain/umMaintainPlan/save'
,
list
:
'/maintain/umMaintainPlan/queryList'
,
delete
:
'/maintain/umMaintainPlan/
enableDeactivate
'
,
delete
:
'/maintain/umMaintainPlan/
deleteById
'
,
detail
:
'/maintain/umMaintainPlan/queryById'
,
},
},
...
...
@@ -564,7 +564,7 @@ function getcolumns(setdrawer) {
add
:
'/maintain/umMaintainPlan/save'
,
edit
:
'/maintain/umMaintainPlan/save'
,
list
:
'/maintain/umMaintainPlan/queryList'
,
delete
:
'/maintain/umMaintainPlan/
enableDeactivate
'
,
delete
:
'/maintain/umMaintainPlan/
deleteById
'
,
detail
:
'/maintain/umMaintainPlan/queryById'
,
},
},
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/plan/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-1
7 11:35:36
* @Last Modified time: 2023-01-1
8 15:20:30
*/
import
*
as
React
from
'react'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/columns.js
View file @
729e1d5e
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/detailColumns.js
0 → 100644
View file @
729e1d5e
import
dayjs
from
'dayjs'
;
const
getcolumns
=
{
0
:
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
},
{
title
:
'保养项目'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
},
],
},
],
1
:
[
{
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTime'
,
},
],
2
:
[
{
title
:
'关单人员'
,
dataIndex
:
'customsUserName'
,
key
:
'customsUserName'
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'offSingleDate'
,
key
:
'offSingleDate'
,
},
],
3
:
[
{
title
:
'完成保养时间'
,
dataIndex
:
'maintainEndTime'
,
key
:
'maintainEndTime'
,
},
{
title
:
'保养项目'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
},
{
title
:
'结果'
,
dataIndex
:
'judgeResultName'
,
key
:
'judgeResultName'
,
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
{
title
:
'非寿命件消耗'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'备件料号'
,
dataIndex
:
'sparePartNo'
,
key
:
'sparePartNo'
,
},
{
title
:
'备件名称'
,
dataIndex
:
'sparePartName'
,
key
:
'sparePartName'
,
},
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
},
{
title
:
'消耗数量'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
{
title
:
'寿命件更换'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'备件料号'
,
dataIndex
:
'sparePartNo'
,
key
:
'sparePartNo'
,
},
{
title
:
'备件名称'
,
dataIndex
:
'sparePartName'
,
key
:
'sparePartName'
,
},
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
},
{
title
:
'安装部位'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
{
title
:
'更换数量'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
],
4
:
[
{
title
:
'验证人员'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'验证时间'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'验证结果'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'备注'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
],
};
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/index.jsx
View file @
729e1d5e
This diff is collapsed.
Click to expand it.
src/pages/system/rules/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-1
1 19:37:17
* @Last Modified time: 2023-01-1
7 09:30:00
*/
import
*
as
React
from
'react'
;
...
...
@@ -182,21 +182,6 @@ function Rules(props) {
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
'新增:'
,
vals
);
let
params
=
{
...
vals
};
//console.log('vals:', vals);
// for (let i in vals)
{
// if (i == 'nrList')
{
// let reshow =
{
// value: vals[i].filter((it) => it.noRuleCode != 'increasing_order'),
// other: vals[i].filter((it) => it.noRuleCode == 'increasing_order')[0] ||
{},
//
};
// reshow.other.increaseList = reshow.other.increaseList.maps((it) =>
{
// return reshow.value.filter((item) => item.sort == it)[0].id;
//
});
// reshow.other.sort =
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// //console.log('reshow', reshow);
//
}
//
}
params
.
nrList
=
[];
params
.
nrList
=
params
.
nrList
.
concat
(
vals
?.
nrList
.
value
);
if
(
vals
?.
nrList
.
other
.
sort
)
{
...
...
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