Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-kanban
Project
Project
Details
Activity
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
ximai
mes-kanban
Commits
dd9c8a34
Commit
dd9c8a34
authored
Nov 21, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除了没用的组件
parent
716f1f0d
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
1009 deletions
+79
-1009
routes.ts
config/routes.ts
+7
-7
DeviceItem.tsx
...intingProcessKanban/components/DeviceGroup/DeviceItem.tsx
+0
-1
deviceAbnormal.tsx
...ngProcessKanban/components/DeviceGroup/deviceAbnormal.tsx
+0
-216
index.tsx
...an/paintingProcessKanban/components/DeviceGroup/index.tsx
+12
-27
qualityAbnormal.tsx
...gProcessKanban/components/DeviceGroup/qualityAbnormal.tsx
+0
-244
passSlice.tsx
...aintingProcessKanban/components/PassingRate/passSlice.tsx
+0
-43
passTower.tsx
...aintingProcessKanban/components/PassingRate/passTower.tsx
+0
-44
passingRateChart.tsx
...ProcessKanban/components/PassingRate/passingRateChart.tsx
+0
-81
modalChart.tsx
...intingProcessKanban/components/ProcessFail/modalChart.tsx
+0
-72
qualityErrorTable.tsx
...rocessKanban/components/ProcessFail/qualityErrorTable.tsx
+0
-240
index.tsx
...an/paintingProcessKanban/components/SettingForm/index.tsx
+60
-33
api.ts
src/pages/kanban/paintingProcessKanban/services/api.ts
+0
-1
No files found.
config/routes.ts
View file @
dd9c8a34
...
@@ -118,13 +118,13 @@ export default [
...
@@ -118,13 +118,13 @@ export default [
layout
:
false
,
layout
:
false
,
component
:
'./kanban/paintingProcessKanban'
,
component
:
'./kanban/paintingProcessKanban'
,
},
},
{
//
{
path
:
'productionProgressKanban'
,
//
path: 'productionProgressKanban',
name
:
'productionProgressKanban'
,
//
name: 'productionProgressKanban',
target
:
'_blank'
,
//
target: '_blank',
layout
:
false
,
//
layout: false,
component
:
'./kanban/ProductionProgress'
,
//
component: './kanban/ProductionProgress',
},
//
},
// {
// {
// path: 'materialSynthesisKanban',
// path: 'materialSynthesisKanban',
// name: 'materialSynthesisKanban',
// name: 'materialSynthesisKanban',
...
...
src/pages/kanban/paintingProcessKanban/components/DeviceGroup/DeviceItem.tsx
View file @
dd9c8a34
...
@@ -13,7 +13,6 @@ export type InfoProps = {
...
@@ -13,7 +13,6 @@ export type InfoProps = {
const
DeviceItem
:
React
.
FC
<
InfoProps
>
=
(
props
)
=>
{
const
DeviceItem
:
React
.
FC
<
InfoProps
>
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
intl
=
useIntl
();
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
'props'
,
props
.
data
)
},
[
props
.
data
]);
},
[
props
.
data
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
},
[
props
.
setting
]);
},
[
props
.
setting
]);
...
...
src/pages/kanban/paintingProcessKanban/components/DeviceGroup/deviceAbnormal.tsx
deleted
100644 → 0
View file @
716f1f0d
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
*
as
echarts
from
'echarts/lib/echarts'
;
import
{
ECharts
,
getInstanceByDom
}
from
'echarts'
;
import
{
Modal
}
from
'antd'
;
import
DeviceAbnormal
from
'../../../materialSynthesis/components/abnormal/deviceAbnormal'
;
type
ErrorDetailCriteria
=
KANBAN
.
ProductionComprehens
.
ErrorDetailCriteria
;
type
ErrorDetailSetting
=
KANBAN
.
ProductionComprehens
.
ErrorDetailSetting
;
import
{
useIntl
,
getIntl
}
from
'umi'
;
const
formatOptions
=
(
data
:
any
)
=>
{
const
intl
=
getIntl
();
const
option
=
{
color
:
[
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
// 100% 处的颜色
},
{
offset
:
0
,
color
:
'#4ad4fe'
,
// 0% 处的颜色
},
],
global
:
false
,
// 缺省为 false
},
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
},
{
offset
:
0
,
color
:
'#ffc000'
,
},
],
global
:
false
,
// 缺省为 false
},
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
},
{
offset
:
0
,
color
:
'#ff0000'
,
},
],
global
:
false
,
// 缺省为 false
},
],
legend
:
{
show
:
false
,
},
grid
:
{
bottom
:
10
,
containLabel
:
true
,
left
:
10
,
top
:
20
,
},
xAxis
:
{
type
:
'value'
,
show
:
false
,
},
yAxis
:
{
type
:
'category'
,
data
:
[
intl
.
formatMessage
({
id
:
'设备'
})],
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
16
,
},
axisTick
:
{
show
:
false
,
},
axisLine
:
{
show
:
false
,
},
},
series
:
[],
};
const
temp
=
{
type
:
'bar'
,
name
:
''
,
barGap
:
0
,
label
:
{
show
:
true
,
position
:
'right'
,
color
:
'#fff'
,
},
data
:
[],
};
option
.
series
.
push
({
...
temp
,
name
:
intl
.
formatMessage
({
id
:
'当月异常'
}),
data
:
[
data
.
totalCt
]
});
option
.
series
.
push
({
...
temp
,
name
:
intl
.
formatMessage
({
id
:
'未关闭'
}),
data
:
[
data
.
unCloseCt
]
});
option
.
series
.
push
({
...
temp
,
name
:
intl
.
formatMessage
({
id
:
'超期'
}),
data
:
[
data
.
expireUnClose
]
});
return
option
;
};
const
Main
:
React
.
FC
<
{
data
:
any
;
setting
:
ErrorDetailSetting
}
>
=
({
data
,
setting
})
=>
{
const
chartRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
closeModal
=
()
=>
setIsModalOpen
(
false
);
const
[
criteria
,
setCriteria
]
=
useState
<
ErrorDetailCriteria
>
();
const
intl
=
useIntl
();
useEffect
(()
=>
{
// Initialize chart
let
chart
:
ECharts
|
undefined
;
if
(
chartRef
.
current
!==
null
)
{
chart
=
echarts
.
init
(
chartRef
.
current
);
}
// Add chart resize listener
// ResizeObserver is leading to a bit janky UX
function
resizeChart
()
{
chart
?.
resize
();
}
window
.
addEventListener
(
'resize'
,
resizeChart
);
// Return cleanup function
return
()
=>
{
chart
?.
dispose
();
window
.
removeEventListener
(
'resize'
,
resizeChart
);
};
},
[]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
chart
?.
off
(
'click'
);
// chart?.on('click', (params) => {
// if (params.seriesName == '当月异常') {
// setCriteria({
// workshopName: setting.workshopName,
// status: '2,3,5',
// createdDateFrom: moment()
// .date(1)
// .hour(0)
// .minute(0)
// .second(0)
// .millisecond(0)
// .format('YYYY-MM-DD HH:mm'),
// createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// current: 1,
// pageSize: 10,
// });
// } else if (params.seriesName == '未关闭') {
// setCriteria({
// workshopName: setting.workshopName,
// createdDateFrom: null,
// createdDateTo: null,
// //createdDateFrom: moment().date(1).hour(0).minute(0).second(0).millisecond(0).format('YYYY-MM-DD HH:mm'),
// //createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// status: '2,3',
// current: 1,
// pageSize: 10,
// });
// } else if (params.seriesName == '超期') {
// setCriteria({
// workshopName: setting.workshopName,
// createdDateFrom: null,
// createdDateTo: null,
// //createdDateFrom: moment().date(1).hour(0).minute(0).second(0).millisecond(0).format('YYYY-MM-DD HH:mm'),
// //createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// status: '2,3',
// gtErrorDays: setting.abnormalOverdueSetting.diffDayEquipment,
// current: 1,
// pageSize: 10,
// });
// }
// setIsModalOpen(true);
// });
}
},
[
setting
]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
const
option
=
formatOptions
(
data
);
chart
?.
setOption
(
option
);
}
},
[
data
]);
return
(
<>
<
div
ref=
{
chartRef
}
style=
{
{
height
:
'210px'
}
}
/>
<
Modal
title=
{
intl
.
formatMessage
({
id
:
'设备异常明细'
})
}
visible=
{
isModalOpen
}
footer=
{
null
}
width=
{
'70%'
}
onCancel=
{
closeModal
}
>
<
DeviceAbnormal
values=
{
criteria
}
/>
</
Modal
>
</>
);
};
export
default
Main
;
src/pages/kanban/paintingProcessKanban/components/DeviceGroup/index.tsx
View file @
dd9c8a34
import
FactoryItem
from
'./FactoryItem'
;
import
FactoryItem
from
'./FactoryItem'
;
import
{
useEffect
}
from
'react'
;
import
{
useEffect
,
useRef
}
from
'react'
;
import
QualityAbnormal
from
'./qualityAbnormal'
;
import
DeviceAbnormal
from
'./deviceAbnormal'
;
import
DeviceCountTable
from
'./deviceCount'
;
import
styles
from
'../../index.less'
;
import
styles
from
'../../index.less'
;
import
{
Modal
}
from
'antd'
;
import
{
useState
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
type
EquipmentDetailCriteria
=
KANBAN
.
ProductionComprehens
.
EquipmentDetailCriteria
;
type
ErrorDetailSetting
=
KANBAN
.
ProductionComprehens
.
ErrorDetailSetting
;
type
ErrorDetailSetting
=
KANBAN
.
ProductionComprehens
.
ErrorDetailSetting
;
const
Abnormal
:
React
.
FC
<
{
const
Abnormal
:
React
.
FC
<
{
...
@@ -17,19 +10,7 @@ const Abnormal: React.FC<{
...
@@ -17,19 +10,7 @@ const Abnormal: React.FC<{
factoryLine
:
Array
<
any
>
;
factoryLine
:
Array
<
any
>
;
setting
:
ErrorDetailSetting
;
setting
:
ErrorDetailSetting
;
}
>
=
({
abnormalProdData
,
abnormalQualityData
,
abnormalDeviceData
,
factoryLine
,
setting
,
})
=>
{
}
>
=
({
abnormalProdData
,
abnormalQualityData
,
abnormalDeviceData
,
factoryLine
,
setting
,
})
=>
{
const
intl
=
useIntl
();
const
leftScroll
=
useRef
<
HTMLDivElement
>
(
null
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
[
criteria
,
setCriteria
]
=
useState
<
EquipmentDetailCriteria
>
();
const
closeModal
=
()
=>
setIsModalOpen
(
false
);
const
openModal
=
(
type
:
number
)
=>
{
setIsModalOpen
(
true
);
setCriteria
({
workshopName
:
setting
.
workshopName
||
''
,
current
:
1
,
pageSize
:
10
,
status
:
type
,
});
};
let
timer
:
NodeJS
.
Timer
|
null
=
null
;
let
timer
:
NodeJS
.
Timer
|
null
=
null
;
const
stopLoop
=
()
=>
{
const
stopLoop
=
()
=>
{
if
(
timer
)
{
if
(
timer
)
{
...
@@ -39,12 +20,16 @@ const Abnormal: React.FC<{
...
@@ -39,12 +20,16 @@ const Abnormal: React.FC<{
};
};
const
startLoop
=
()
=>
{
const
startLoop
=
()
=>
{
stopLoop
();
stopLoop
();
let
leftScroll
=
document
.
getElementById
(
'leftScroll'
)
as
HTMLElement
if
(
leftScroll
&&
leftScroll
.
current
)
{
if
(
leftScroll
)
{
timer
=
setInterval
(()
=>
{
timer
=
setInterval
(()
=>
{
leftScroll
.
scrollTop
+=
60
let
scrollTop
=
leftScroll
.
current
.
scrollTop
if
(
leftScroll
.
scrollTop
+
leftScroll
.
offsetHeight
>=
leftScroll
.
scrollHeight
)
{
if
(
scrollTop
+
60
+
leftScroll
.
current
.
offsetHeight
>=
leftScroll
.
current
.
scrollHeight
)
{
leftScroll
.
scrollTop
=
0
leftScroll
.
current
.
scrollTo
({
top
:
0
,
behavior
:
'instant'
,
});
}
else
{
leftScroll
.
current
.
scrollTop
+=
60
}
}
},
setting
.
rowMovingTime
*
1000
)
},
setting
.
rowMovingTime
*
1000
)
}
}
...
@@ -59,7 +44,7 @@ const Abnormal: React.FC<{
...
@@ -59,7 +44,7 @@ const Abnormal: React.FC<{
},
[
setting
]);
},
[
setting
]);
return
(
return
(
<>
<>
<
div
className=
{
styles
.
leftWrapper
}
id=
"leftScroll"
onMouseOver=
{
stopLoop
}
//移出关闭
<
div
className=
{
styles
.
leftWrapper
}
ref=
{
leftScroll
}
onMouseOver=
{
stopLoop
}
//移出关闭
onMouseOut=
{
startLoop
}
>
onMouseOut=
{
startLoop
}
>
{
factoryLine
.
map
((
factory
)
=>
(
{
factoryLine
.
map
((
factory
)
=>
(
<
div
className=
{
styles
.
Factorycard
}
>
<
div
className=
{
styles
.
Factorycard
}
>
...
...
src/pages/kanban/paintingProcessKanban/components/DeviceGroup/qualityAbnormal.tsx
deleted
100644 → 0
View file @
716f1f0d
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
*
as
echarts
from
'echarts/lib/echarts'
;
import
type
{
ECharts
}
from
'echarts'
;
import
{
getInstanceByDom
}
from
'echarts'
;
import
{
Modal
}
from
'antd'
;
import
QualityAbnormal
from
'../../../materialSynthesis/components/abnormal/qualityAbnormal'
;
import
moment
from
'moment'
;
type
ErrorDetailCriteria
=
KANBAN
.
ProductionComprehens
.
ErrorDetailCriteria
;
type
ErrorDetailSetting
=
KANBAN
.
ProductionComprehens
.
ErrorDetailSetting
;
import
{
useIntl
,
getIntl
}
from
'umi'
;
const
formatOptions
=
(
data
:
any
)
=>
{
const
intl
=
getIntl
();
const
option
=
{
tooltip
:
{},
color
:
[
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
// 100% 处的颜色
},
{
offset
:
0
,
color
:
'#4ad4fe'
,
// 0% 处的颜色
},
],
global
:
false
,
// 缺省为 false
},
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
},
{
offset
:
0
,
color
:
'#ffc000'
,
},
],
global
:
false
,
// 缺省为 false
},
{
type
:
'linear'
,
x
:
1
,
y
:
0
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
1
,
color
:
'#00214d'
,
},
{
offset
:
0
,
color
:
'#ff0000'
,
},
],
global
:
false
,
// 缺省为 false
},
],
legend
:
{
show
:
false
,
},
grid
:
{
bottom
:
20
,
top
:
20
,
},
xAxis
:
{
type
:
'category'
,
show
:
true
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
16
,
},
axisTick
:
{
show
:
false
,
},
axisLine
:
{
show
:
false
,
}
},
yAxis
:
{
type
:
'value'
,
data
:
[],
splitLine
:
{
show
:
false
},
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
16
,
},
axisTick
:
{
show
:
false
,
},
axisLine
:
{
show
:
false
,
},
},
series
:
[],
};
const
temp
=
{
type
:
'line'
,
name
:
''
,
barGap
:
0
,
smooth
:
true
,
label
:
{
show
:
true
,
position
:
'right'
,
color
:
'#fff'
,
},
data
:
[],
};
const
now
=
moment
();
// 存储最近七天日期的数组
const
lastSevenDays
=
[];
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
lastSevenDays
.
push
(
moment
(
now
).
subtract
(
i
,
'days'
).
format
(
'MM/DD'
));
}
console
.
log
(
'lastSevenDays'
,
lastSevenDays
)
option
[
'xAxis'
][
'data'
]
=
lastSevenDays
.
reverse
()
// option.series.push({ ...temp, name: '当月异常', data: [data.totalCt] });
// option.series.push({ ...temp, name: '未关闭', data: [data.unCloseCt] });
option
.
series
.
push
({
...
temp
,
name
:
intl
.
formatMessage
({
id
:
'设备故障总数'
}),
data
:
data
.
reverse
()}
);
return
option
;
};
const
Main
:
React
.
FC
<
{
data
:
any
;
setting
:
ErrorDetailSetting
}
>
=
({
data
,
setting
})
=>
{
const
chartRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
closeModal
=
()
=>
setIsModalOpen
(
false
);
const
[
criteria
,
setCriteria
]
=
useState
<
ErrorDetailCriteria
>
();
useEffect
(()
=>
{
// Initialize chart
let
chart
:
ECharts
|
undefined
;
if
(
chartRef
.
current
!==
null
)
{
chart
=
echarts
.
init
(
chartRef
.
current
);
}
// Add chart resize listener
// ResizeObserver is leading to a bit janky UX
function
resizeChart
()
{
chart
?.
resize
();
}
window
.
addEventListener
(
'resize'
,
resizeChart
);
// Return cleanup function
return
()
=>
{
chart
?.
dispose
();
window
.
removeEventListener
(
'resize'
,
resizeChart
);
};
},
[]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
chart
?.
off
(
'click'
);
// chart?.on('click', (params) => {
// if (params.seriesName == '当月异常') {
// setCriteria({
// werks: setting.werks,
// fevor: setting.fevors,
// status: '1,2,3',
// createdDateFrom: moment()
// .date(1)
// .hour(0)
// .minute(0)
// .second(0)
// .millisecond(0)
// .format('YYYY-MM-DD HH:mm'),
// createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// current: 1,
// pageSize: 10,
// });
// } else if (params.seriesName == '未关闭') {
// setCriteria({
// werks: setting.werks,
// fevor: setting.fevors,
// createdDateFrom: null,
// createdDateTo: null,
// //createdDateFrom: moment().date(1).hour(0).minute(0).second(0).millisecond(0).format('YYYY-MM-DD HH:mm'),
// //createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// status: '1,2',
// current: 1,
// pageSize: 10,
// });
// } else if (params.seriesName == '超期') {
// setCriteria({
// werks: setting.werks,
// fevor: setting.fevors,
// createdDateFrom: null,
// createdDateTo: null,
// //createdDateFrom: moment().date(1).hour(0).minute(0).second(0).millisecond(0).format('YYYY-MM-DD HH:mm'),
// //createdDateTo: moment(params.to).format('YYYY-MM-DD HH:mm'),
// status: '1,2',
// gtErrorDays: setting.abnormalOverdueSetting.diffDayQuality,
// current: 1,
// pageSize: 10,
// });
// }
// setIsModalOpen(true);
// });
}
},
[
setting
]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
const
option
=
formatOptions
(
data
);
chart
?.
setOption
(
option
);
}
},
[
data
]);
return
(
<>
<
Modal
title=
{
'质量异常明细'
}
visible=
{
isModalOpen
}
footer=
{
null
}
width=
{
'70%'
}
onCancel=
{
closeModal
}
>
<
QualityAbnormal
values=
{
criteria
}
/>
</
Modal
>
<
div
ref=
{
chartRef
}
style=
{
{
height
:
'210px'
}
}
/>
</>
);
};
export
default
Main
;
src/pages/kanban/paintingProcessKanban/components/PassingRate/passSlice.tsx
deleted
100644 → 0
View file @
716f1f0d
import
type
{
PieConfig
}
from
'@ant-design/charts'
;
import
{
Pie
}
from
'@ant-design/plots'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
const
Main
:
React
.
FC
<
{
data
:
number
}
>
=
({
data
})
=>
{
const
[
chartData
,
setChartData
]
=
useState
<
PieConfig
[
'data'
]
>
([]);
useEffect
(()
=>
{
const
res
=
[];
res
.
push
({
type
:
'按片未通过率'
,
value
:
100
-
data
});
res
.
push
({
type
:
'按片通过率'
,
value
:
data
});
setChartData
(
res
);
},
[
data
]);
const
config
:
PieConfig
&
React
.
RefAttributes
<
unknown
>
=
{
data
:
chartData
,
width
:
100
,
color
:
[
'#213045'
,
'#28a8c3'
],
angleField
:
'value'
,
colorField
:
'type'
,
radius
:
1
,
innerRadius
:
0.6
,
yAxis
:
false
,
xAxis
:
false
,
legend
:
false
,
label
:
false
,
pieStyle
:
{
stroke
:
null
,
},
statistic
:
{
title
:
false
,
content
:
{
content
:
data
+
'%'
,
style
:
{
fontSize
:
'14px'
,
color
:
'#fff'
,
},
},
},
tooltip
:
false
,
};
return
<
Pie
{
...
config
}
/>;
};
export
default
Main
;
src/pages/kanban/paintingProcessKanban/components/PassingRate/passTower.tsx
deleted
100644 → 0
View file @
716f1f0d
import
type
{
PieConfig
}
from
'@ant-design/charts'
;
import
{
Pie
}
from
'@ant-design/plots'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
const
Main
:
React
.
FC
<
{
data
:
number
}
>
=
({
data
})
=>
{
const
[
chartData
,
setChartData
]
=
useState
<
PieConfig
[
'data'
]
>
([]);
useEffect
(()
=>
{
const
res
=
[];
res
.
push
({
type
:
'整台未通过率'
,
value
:
100
-
data
});
res
.
push
({
type
:
'整台通过率'
,
value
:
data
});
setChartData
(
res
);
},
[
data
]);
const
config
:
PieConfig
&
React
.
RefAttributes
<
unknown
>
=
{
data
:
chartData
,
width
:
100
,
color
:
[
'#213045'
,
'#28a8c3'
],
angleField
:
'value'
,
colorField
:
'type'
,
radius
:
1
,
innerRadius
:
0.6
,
yAxis
:
false
,
xAxis
:
false
,
legend
:
false
,
label
:
false
,
pieStyle
:
{
stroke
:
null
,
},
statistic
:
{
title
:
false
,
content
:
{
content
:
data
+
'%'
,
style
:
{
fontSize
:
'14px'
,
color
:
'#fff'
,
},
},
},
tooltip
:
false
,
};
return
<
Pie
{
...
config
}
/>;
};
export
default
Main
;
src/pages/kanban/paintingProcessKanban/components/PassingRate/passingRateChart.tsx
deleted
100644 → 0
View file @
716f1f0d
import
{
useEffect
,
useRef
}
from
'react'
;
import
*
as
echarts
from
'echarts/lib/echarts'
;
import
{
ECharts
,
getInstanceByDom
}
from
'echarts'
;
const
formatOptions
=
(
data
:
any
)
=>
{
const
currentChartResultList
=
data
.
currentChartResultList
.
sort
((
a
,
b
)
=>
a
.
period
-
b
.
period
);
const
beforeYearChartResultList
=
data
.
beforeYearChartResultList
.
sort
(
(
a
,
b
)
=>
a
.
period
-
b
.
period
,
);
const
option
=
{
tooltip
:
{
trigger
:
'axis'
,
valueFormatter
:
(
v
)
=>
v
+
'%'
,
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
],
},
legend
:
{
show
:
true
,
},
yAxis
:
{
type
:
'value'
,
},
series
:
[
{
name
:
'去年'
,
data
:
beforeYearChartResultList
.
map
((
v
)
=>
v
.
val
),
type
:
'line'
,
smooth
:
true
,
},
{
name
:
'今年'
,
data
:
currentChartResultList
.
map
((
v
)
=>
v
.
val
),
type
:
'line'
,
smooth
:
true
,
},
],
};
return
option
;
};
const
PassingRateChart
:
React
.
FC
<
{
data
:
KANBAN
.
ProductionComprehens
.
PassRateTrendChart
[]
}
>
=
({
data
,
})
=>
{
const
chartRef
=
useRef
<
HTMLDivElement
>
(
null
);
useEffect
(()
=>
{
// Initialize chart
let
chart
:
ECharts
|
undefined
;
if
(
chartRef
.
current
!==
null
)
{
chart
=
echarts
.
init
(
chartRef
.
current
);
}
// Add chart resize listener
// ResizeObserver is leading to a bit janky UX
function
resizeChart
()
{
chart
?.
resize
();
}
window
.
addEventListener
(
'resize'
,
resizeChart
);
// Return cleanup function
return
()
=>
{
chart
?.
dispose
();
window
.
removeEventListener
(
'resize'
,
resizeChart
);
};
},
[]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
const
option
=
formatOptions
(
data
);
chart
?.
setOption
(
option
);
}
},
[
data
]);
return
<
div
ref=
{
chartRef
}
style=
{
{
height
:
'500px'
}
}
/>;
};
export
default
PassingRateChart
;
src/pages/kanban/paintingProcessKanban/components/ProcessFail/modalChart.tsx
deleted
100644 → 0
View file @
716f1f0d
import
{
useEffect
,
useRef
}
from
'react'
;
import
*
as
echarts
from
'echarts/lib/echarts'
;
import
{
ECharts
,
getInstanceByDom
}
from
'echarts'
;
const
formatOptions
=
(
data
:
any
)
=>
{
const
option
=
{
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
data
.
map
((
v
)
=>
v
.
period
),
},
yAxis
:
{
type
:
'value'
,
},
tooltip
:
{
trigger
:
'axis'
,
formatter
:
'{c}%'
,
},
series
:
[
{
data
:
data
.
map
((
v
)
=>
v
.
val
),
type
:
'line'
,
smooth
:
true
,
label
:
{
show
:
true
,
position
:
'top'
,
color
:
'#333'
,
},
},
],
};
return
option
;
};
const
PassingRateChart
:
React
.
FC
<
{
data
:
KANBAN
.
ProductionComprehens
.
PassRateTrendChart
[]
}
>
=
({
data
,
})
=>
{
const
chartRef
=
useRef
<
HTMLDivElement
>
(
null
);
useEffect
(()
=>
{
// Initialize chart
let
chart
:
ECharts
|
undefined
;
if
(
chartRef
.
current
!==
null
)
{
chart
=
echarts
.
init
(
chartRef
.
current
);
}
// Add chart resize listener
// ResizeObserver is leading to a bit janky UX
function
resizeChart
()
{
chart
?.
resize
();
}
window
.
addEventListener
(
'resize'
,
resizeChart
);
// Return cleanup function
return
()
=>
{
chart
?.
dispose
();
window
.
removeEventListener
(
'resize'
,
resizeChart
);
};
},
[]);
useEffect
(()
=>
{
if
(
chartRef
.
current
!==
null
)
{
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
const
option
=
formatOptions
(
data
);
chart
?.
setOption
(
option
);
}
},
[
data
]);
return
<
div
ref=
{
chartRef
}
style=
{
{
height
:
'500px'
}
}
/>;
};
export
default
PassingRateChart
;
src/pages/kanban/paintingProcessKanban/components/ProcessFail/qualityErrorTable.tsx
deleted
100644 → 0
View file @
716f1f0d
import
ProTable
,
{
ActionType
}
from
'@ant-design/pro-table'
;
import
{
queryProcessFailQualityError
}
from
'@/pages/kanban/productionComprehens/services/api'
;
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
const
QualityErrorTable
:
React
.
FC
<
{
params
:
any
}
>
=
({
params
})
=>
{
const
actionRef
=
useRef
<
ActionType
>
();
useEffect
(()
=>
{
actionRef
.
current
?.
reload
();
},
[
params
]);
const
columns
=
/*[
{
title: '批次号',
dataIndex: 'lotNo',
key: 'lotNo',
width: 100,
},
{
title: '异常时间',
dataIndex: 'eventDate',
key: 'eventDate',
width: 120,
},
];*/
[
{
title
:
'异常单号'
,
dataIndex
:
'exceptionNo'
,
key
:
'exceptionNo'
,
width
:
120
,
},
{
title
:
'异常单状态'
,
dataIndex
:
'exceptionStateName'
,
key
:
'exceptionStateName'
,
width
:
120
,
},
{
title
:
'批号'
,
dataIndex
:
'productionOrderNo'
,
key
:
'productionOrderNo'
,
width
:
120
,
},
{
title
:
'作业单元'
,
dataIndex
:
'workUnitName'
,
key
:
'workUnitName'
,
width
:
120
,
},
{
title
:
'产品编码'
,
dataIndex
:
'partCode'
,
key
:
'partCode'
,
width
:
120
,
},
{
title
:
'产品描述'
,
dataIndex
:
'partName'
,
key
:
'partName'
,
width
:
120
,
},
{
title
:
'发现工序'
,
dataIndex
:
'operationName'
,
key
:
'operationName'
,
width
:
120
,
},
{
title
:
'责任工序'
,
dataIndex
:
'dutyOperationName'
,
key
:
'dutyOperationName'
,
width
:
120
,
},
{
title
:
'异常数量'
,
dataIndex
:
'exceptionQuantity'
,
key
:
'exceptionQuantity'
,
width
:
120
,
},
{
title
:
'异常现象组'
,
dataIndex
:
'exceptionCaseGroupName'
,
key
:
'exceptionCaseGroupName'
,
width
:
120
,
},
{
title
:
'异常现象'
,
dataIndex
:
'exceptionCaseDetailName'
,
key
:
'exceptionCaseDetailName'
,
width
:
120
,
},
{
title
:
'异常原因组'
,
dataIndex
:
'exceptionReasonGroupName'
,
key
:
'exceptionReasonGroupName'
,
width
:
120
,
},
{
title
:
'异常原因'
,
dataIndex
:
'exceptionReasonDetailName'
,
key
:
'exceptionReasonDetailName'
,
width
:
120
,
},
{
title
:
'处理方法'
,
dataIndex
:
'exceptionHandlingMethodName'
,
key
:
'exceptionHandlingMethodName'
,
width
:
120
,
},
{
title
:
'创建人'
,
dataIndex
:
'createdByName'
,
key
:
'createdByName'
,
width
:
120
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createdDate'
,
key
:
'createdDate'
,
width
:
120
,
},
{
title
:
'提交人'
,
dataIndex
:
'submittedByName'
,
key
:
'submittedByName'
,
width
:
120
,
},
{
title
:
'提交时间'
,
dataIndex
:
'submittedDate'
,
key
:
'submittedDate'
,
width
:
120
,
},
{
title
:
'处理人'
,
dataIndex
:
'handledByName'
,
key
:
'handledByName'
,
width
:
120
,
},
{
title
:
'处理时间'
,
dataIndex
:
'handledByName'
,
key
:
'handledByName'
,
width
:
120
,
},
{
title
:
'取消人'
,
dataIndex
:
'cancelledByName'
,
key
:
'cancelledByName'
,
width
:
120
,
},
{
title
:
'接收角色'
,
dataIndex
:
'receiverRoleName'
,
key
:
'receiverRoleName'
,
width
:
120
,
},
{
title
:
'备注'
,
dataIndex
:
'remarks'
,
key
:
'remarks'
,
width
:
120
,
},
{
title
:
'DTO试环编号'
,
dataIndex
:
'dotTestringNo'
,
key
:
'dotTestringNo'
,
width
:
120
,
},
{
title
:
'ISO试环编号'
,
dataIndex
:
'isoTestringNo'
,
key
:
'isoTestringNo'
,
width
:
120
,
},
{
title
:
'GB试环编号'
,
dataIndex
:
'gbTestringNo'
,
key
:
'gbTestringNo'
,
width
:
120
,
},
{
title
:
'ASME试环编号'
,
dataIndex
:
'asmeTestringNo'
,
key
:
'asmeTestringNo'
,
width
:
120
,
},
{
title
:
'TC试环编号'
,
dataIndex
:
'tcTestringNo'
,
key
:
'tcTestringNo'
,
width
:
120
,
},
{
title
:
'UN试环编号'
,
dataIndex
:
'unTestringNo'
,
key
:
'unTestringNo'
,
width
:
120
,
},
{
title
:
'其他试环编号'
,
dataIndex
:
'otherTestringNo'
,
key
:
'otherTestringNo'
,
width
:
120
,
},
];
return
(
<>
<
ProTable
options=
{
false
}
search=
{
false
}
actionRef=
{
actionRef
}
request=
{
async
()
=>
{
const
sr
=
await
queryProcessFailQualityError
({
...
params
});
const
pageResult
:
Common
.
PageResult
<
any
>
=
{
current
:
params
.
current
,
pageSize
:
params
.
pageSize
,
total
:
sr
.
data
.
total
,
data
:
sr
.
data
.
data
,
};
return
pageResult
;
/*return {
data: sr.data,
success: true
};*/
}
}
pagination=
{
{
pageSize
:
10
,
}
}
columns=
{
columns
}
size=
{
'middle'
}
bordered
scroll=
{
{
x
:
4000
}
}
/>
</>
);
};
export
default
QualityErrorTable
;
src/pages/kanban/paintingProcessKanban/components/SettingForm/index.tsx
View file @
dd9c8a34
...
@@ -37,12 +37,31 @@ export type SettingFormProps = {
...
@@ -37,12 +37,31 @@ export type SettingFormProps = {
};
};
const
SettingForm
:
React
.
FC
<
SettingFormProps
>
=
(
props
)
=>
{
const
SettingForm
:
React
.
FC
<
SettingFormProps
>
=
(
props
)
=>
{
const
intervalTimeRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
rowMovingTimeRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
lineNameRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
formRef
=
useRef
<
ProFormInstance
>
();
const
formRef
=
useRef
<
ProFormInstance
>
();
const
intl
=
useIntl
();
const
intl
=
useIntl
();
const
[
lineName
,
setLineName
]
=
useState
<
const
[
lineName
,
setLineName
]
=
useState
<
KanbanSetting
[]
KanbanSetting
[]
>
([]);
>
([]);
const
handleKeyDown
=
(
e
,
name
)
=>
{
if
(
e
.
key
===
'ArrowUp'
)
{
if
(
name
===
'lineName'
)
{
rowMovingTimeRef
.
current
?.
children
[
0
].
focus
()
}
else
if
(
name
===
'rowMovingTime'
)
{
intervalTimeRef
.
current
?.
children
[
0
].
focus
()
}
// 在这里添加你的增加逻辑
}
else
if
(
e
.
key
===
'ArrowDown'
)
{
if
(
name
===
'intervalTime'
)
{
rowMovingTimeRef
.
current
?.
children
[
0
].
focus
()
}
else
if
(
name
===
'rowMovingTime'
)
{
lineNameRef
.
current
?.
children
[
0
].
focus
()
}
// 在这里添加你的减少逻辑
}
};
return
(
return
(
<
DrawerForm
<
DrawerForm
formRef=
{
formRef
}
formRef=
{
formRef
}
...
@@ -69,6 +88,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...
@@ -69,6 +88,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
}
}
}
}
>
>
<
ProFormCheckbox
name=
"autoResize"
label=
{
intl
.
formatMessage
({
id
:
'适配窗口'
})
}
width=
"xl"
/>
<
ProFormCheckbox
name=
"autoResize"
label=
{
intl
.
formatMessage
({
id
:
'适配窗口'
})
}
width=
"xl"
/>
<
div
onKeyDown=
{
(
e
)
=>
handleKeyDown
(
e
,
'intervalTime'
)
}
ref=
{
intervalTimeRef
}
>
<
ProFormDigit
<
ProFormDigit
name=
"intervalTime"
name=
"intervalTime"
label=
{
intl
.
formatMessage
({
id
:
'刷新时间间隔(秒)'
})
}
label=
{
intl
.
formatMessage
({
id
:
'刷新时间间隔(秒)'
})
}
...
@@ -77,6 +97,8 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...
@@ -77,6 +97,8 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
min=
{
10
}
min=
{
10
}
fieldProps=
{
{
precision
:
0
}
}
fieldProps=
{
{
precision
:
0
}
}
/>
/>
</
div
>
<
div
onKeyDown=
{
(
e
)
=>
handleKeyDown
(
e
,
'rowMovingTime'
)
}
ref=
{
rowMovingTimeRef
}
>
<
ProFormDigit
<
ProFormDigit
name=
"rowMovingTime"
name=
"rowMovingTime"
label=
{
intl
.
formatMessage
({
id
:
'内容滚动(秒)'
})
}
label=
{
intl
.
formatMessage
({
id
:
'内容滚动(秒)'
})
}
...
@@ -85,10 +107,13 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...
@@ -85,10 +107,13 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
min=
{
1
}
min=
{
1
}
fieldProps=
{
{
precision
:
0
}
}
fieldProps=
{
{
precision
:
0
}
}
/>
/>
</
div
>
<
div
onKeyDown=
{
(
e
)
=>
handleKeyDown
(
e
,
'lineName'
)
}
>
<
ProFormSelect
<
ProFormSelect
name=
"lineName"
name=
"lineName"
label=
{
intl
.
formatMessage
({
id
:
'产线选择'
})
}
label=
{
intl
.
formatMessage
({
id
:
'产线选择'
})
}
required
required
ref=
{
lineNameRef
}
width=
"xl"
width=
"xl"
request=
{
async
()
=>
{
request=
{
async
()
=>
{
const
{
data
}
=
await
queryProductionComprehensKanbanData
();
const
{
data
}
=
await
queryProductionComprehensKanbanData
();
...
@@ -101,6 +126,8 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...
@@ -101,6 +126,8 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
return
data
.
map
((
a
)
=>
({
label
:
a
,
value
:
a
}));
return
data
.
map
((
a
)
=>
({
label
:
a
,
value
:
a
}));
}
}
}
}
/>
/>
</
div
>
</
DrawerForm
>
</
DrawerForm
>
);
);
};
};
...
...
src/pages/kanban/paintingProcessKanban/services/api.ts
View file @
dd9c8a34
...
@@ -206,7 +206,6 @@ export async function findAbnormalOverdueSetting(options?: { [p: string]: any })
...
@@ -206,7 +206,6 @@ export async function findAbnormalOverdueSetting(options?: { [p: string]: any })
query
:
gqlString
,
query
:
gqlString
,
};
};
const
result
=
await
graphql
(
graphqlParams
,
options
);
const
result
=
await
graphql
(
graphqlParams
,
options
);
console
.
log
(
result
);
return
result
.
data
.
abnormalOverdueSetting
as
AbnormalOverdueSettingDto
[];
return
result
.
data
.
abnormalOverdueSetting
as
AbnormalOverdueSettingDto
[];
}
}
...
...
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