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
2ac1643d
Commit
2ac1643d
authored
Dec 04, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
c1e3b8ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
47 deletions
+98
-47
index.tsx
...ban/productionComprehens/components/PassingRate/index.tsx
+47
-29
index.tsx
...ban/productionComprehens/components/ProcessFail/index.tsx
+48
-17
index.tsx
...n/productionComprehens/components/ProcessOutput/index.tsx
+3
-1
No files found.
src/pages/kanban/productionComprehens/components/PassingRate/index.tsx
View file @
2ac1643d
...
...
@@ -81,31 +81,54 @@ const formatOptions = (data: any) => {
},
],
grid
:
{
left
:
82
,
left
:
10
,
bottom
:
30
,
right
:
40
,
},
legend
:
{
show
:
false
},
yAxis
:
{
yAxis
:
[
{
type
:
'category'
,
triggerEvent
:
true
,
data
:
[],
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
14
,
formatter
:
function
(
value
:
string
)
{
return
(
value
.
length
>
4
?
(
value
.
slice
(
0
,
4
)
+
"..."
)
:
value
)
}
},
axisTick
:
{
show
:
false
,
},
show
:
false
,
axisLine
:
{
show
:
false
,
},
},
{
type
:
"category"
,
axisLine
:
{
show
:
false
,
},
axisTick
:
{
show
:
false
,
},
axisLabel
:
{
show
:
true
,
inside
:
false
,
textStyle
:
{
color
:
"#fff"
,
fontSize
:
"14"
,
fontFamily
:
"PingFangSC-Regular"
,
},
formatter
:
function
(
val
)
{
return
`
${
val
}
`
;
},
},
splitArea
:
{
show
:
false
,
},
splitLine
:
{
show
:
false
,
},
data
:
[],
}
],
series
:
[],
};
if
(
data
&&
data
.
length
)
{
...
...
@@ -114,13 +137,22 @@ const formatOptions = (data: any) => {
type
:
'bar'
,
barGap
:
0
,
label
:
{
show
:
true
,
position
:
'right'
,
color
:
'#fff'
,
normal
:
{
color
:
"#fff"
,
show
:
true
,
position
:
[
0
,
"-14px"
],
textStyle
:
{
fontSize
:
17
,
},
formatter
:
function
(
a
)
{
return
a
.
name
;
},
},
},
data
:
data
.
map
((
item
:
any
)
=>
item
.
ct
),
}];
option
.
yAxis
.
data
=
xAxisData
;
option
.
yAxis
[
0
].
data
=
xAxisData
;
option
.
yAxis
[
1
].
data
=
data
.
map
((
item
:
any
)
=>
item
.
ct
);
option
.
series
=
series
;
}
console
.
log
(
'option'
,
option
)
...
...
@@ -168,25 +200,11 @@ const Main: React.FC<ProcessOutProps> = ({ data, setting }) => {
const
chart
=
getInstanceByDom
(
chartRef
.
current
);
const
option
=
formatOptions
(
data
);
chart
?.
setOption
(
option
);
chart
?.
off
(
'click'
);
chart
?.
on
(
'click'
,
(
p
)
=>
{
if
(
p
.
seriesName
===
'完成量'
)
{
console
.
log
(
setting
.
productionComprehensKanbanSettingId
,
'----'
);
setProcessParams
({
dataRange
:
setting
.
dataRange
,
processName
:
p
.
name
,
current
:
1
,
pageSize
:
10
,
kanbanSettingId
:
setting
.
productionComprehensKanbanSettingId
,
});
setIsModalOpen
(
true
);
}
});
// 如果数据工序大于5那么需要自动轮训播放
if
(
option
.
yAxis
.
data
.
length
>
4
&&
setting
.
rowMovingTime
>
0
)
{
if
(
option
.
yAxis
[
0
]
.
data
.
length
>
4
&&
setting
.
rowMovingTime
>
0
)
{
timer
=
setInterval
(()
=>
{
option
.
dataZoom
[
0
].
startValue
++
;
if
(
option
.
dataZoom
[
0
].
endValue
++
>=
option
.
yAxis
.
data
.
length
-
1
)
{
if
(
option
.
dataZoom
[
0
].
endValue
++
>=
option
.
yAxis
[
0
]
.
data
.
length
-
1
)
{
option
.
dataZoom
[
0
].
startValue
=
0
;
option
.
dataZoom
[
0
].
endValue
=
3
;
}
...
...
src/pages/kanban/productionComprehens/components/ProcessFail/index.tsx
View file @
2ac1643d
...
...
@@ -73,9 +73,9 @@ const formatOptions = (data: any) => {
},
],
grid
:
{
left
:
7
0
,
left
:
1
0
,
bottom
:
30
,
right
:
4
0
,
right
:
5
0
,
},
legend
:
{
orient
:
'vertical'
,
...
...
@@ -88,17 +88,11 @@ const formatOptions = (data: any) => {
fontSize
:
14
,
},
},
yAxis
:
{
yAxis
:
[
{
type
:
'category'
,
triggerEvent
:
true
,
data
:
[],
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
14
,
formatter
:
function
(
value
:
string
)
{
return
(
value
.
length
>
4
?
(
value
.
slice
(
0
,
4
)
+
"..."
)
:
value
)
}
},
show
:
false
,
axisTick
:
{
show
:
false
,
},
...
...
@@ -106,6 +100,35 @@ const formatOptions = (data: any) => {
show
:
false
,
},
},
{
type
:
"category"
,
axisLine
:
{
show
:
false
,
},
axisTick
:
{
show
:
false
,
},
axisLabel
:
{
show
:
true
,
inside
:
false
,
textStyle
:
{
color
:
"#fff"
,
fontSize
:
"14"
,
fontFamily
:
"PingFangSC-Regular"
,
},
formatter
:
function
(
val
)
{
return
`
${
val
}
%`
;
},
},
splitArea
:
{
show
:
false
,
},
splitLine
:
{
show
:
false
,
},
data
:
[],
}
],
series
:
[],
};
if
(
data
&&
data
.
length
)
{
...
...
@@ -119,15 +142,23 @@ const formatOptions = (data: any) => {
name
:
item
.
label
,
barGap
:
0
,
label
:
{
show
:
true
,
position
:
'right'
,
color
:
'#fff'
,
formatter
:
'{c}%'
,
normal
:
{
color
:
"#fff"
,
show
:
true
,
position
:
[
0
,
"-14px"
],
textStyle
:
{
fontSize
:
17
,
},
formatter
:
function
(
a
)
{
return
a
.
name
;
},
},
},
data
:
data
.
map
((
v
)
=>
v
[
item
.
field
]),
};
});
option
.
yAxis
.
data
=
xAxisData
;
option
.
yAxis
[
0
].
data
=
xAxisData
;
option
.
yAxis
[
1
].
data
=
data
.
map
((
v
)
=>
v
[
'qualifiedRate'
]);
option
.
series
=
series
;
}
return
option
;
...
...
@@ -199,10 +230,10 @@ const Main: React.FC<ProcessFailProps> = ({ data, setting }) => {
}
});
// 如果数据工序大于5那么需要自动轮训播放
if
(
option
.
yAxis
.
data
.
length
>
4
&&
setting
.
rowMovingTime
>
0
)
{
if
(
option
.
yAxis
[
0
]
.
data
.
length
>
4
&&
setting
.
rowMovingTime
>
0
)
{
timer
=
setInterval
(()
=>
{
option
.
dataZoom
[
0
].
startValue
++
;
if
(
option
.
dataZoom
[
0
].
endValue
++
>=
option
.
yAxis
.
data
.
length
-
1
)
{
if
(
option
.
dataZoom
[
0
].
endValue
++
>=
option
.
yAxis
[
0
]
.
data
.
length
-
1
)
{
option
.
dataZoom
[
0
].
startValue
=
0
;
option
.
dataZoom
[
0
].
endValue
=
3
;
}
...
...
src/pages/kanban/productionComprehens/components/ProcessOutput/index.tsx
View file @
2ac1643d
...
...
@@ -80,6 +80,8 @@ const formatOptions = (data: any) => {
interval
:
0
,
color
:
'#fff'
,
fontSize
:
14
,
width
:
120
,
overflow
:
'breakAll'
},
axisTick
:
{
show
:
false
,
...
...
@@ -99,7 +101,7 @@ const formatOptions = (data: any) => {
grid
:
{
left
:
5
,
// right: 60,
bottom
:
3
0
,
bottom
:
4
0
,
},
legend
:
{
orient
:
'vertical'
,
...
...
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