Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
2b902dfb
Commit
2b902dfb
authored
Jul 24, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
07c8d9e9
bff946e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
229 additions
and
195 deletions
+229
-195
api.js
pages/home/api.js
+6
-0
staChart.vue
pages/home/component/staChart.vue
+223
-195
No files found.
pages/home/api.js
View file @
2b902dfb
...
...
@@ -7,4 +7,10 @@ export default {
getpaged
(
params
)
{
return
Api
.
post
(
`
${
workflowUrl
}
/instance/getpaged`
,
params
);
},
planorderstatuscount
(
params
)
{
return
Api
.
post
(
`
${
PlanUrl
}
/mesplan/planorderstatuscount`
,
params
);
},
orderstatuscount
(
params
)
{
return
Api
.
post
(
`
${
PlanUrl
}
/mesorders/orderstatuscount`
,
params
);
//订单各车间下各状态的数量
},
}
\ No newline at end of file
pages/home/component/staChart.vue
View file @
2b902dfb
...
...
@@ -39,6 +39,7 @@
</div>
</
template
>
<
script
>
import
Api
from
"../api"
;
import
ECharts
from
"vue-echarts"
;
import
echarts
from
"echarts/lib/echarts"
;
// import "echarts/lib/chart/pie";
...
...
@@ -50,13 +51,13 @@ import "echarts/lib/component/grid";
export
default
{
name
:
"echarts"
,
components
:
{
"v-chart"
:
ECharts
"v-chart"
:
ECharts
,
},
data
()
{
return
{
value2
:
""
,
braking
:
{},
braking1
:
{}
braking1
:
{}
,
};
},
mounted
()
{
...
...
@@ -65,117 +66,143 @@ export default {
},
methods
:
{
statistics
()
{
let
conditions
=
[
{
fieldName
:
"status"
,
fieldValue
:
"1"
,
conditionalType
:
"Equal"
}
];
let
data
=
{
conditions
:
conditions
,
};
Api
.
planorderstatuscount
(
data
).
then
((
r
)
=>
{
var
allTotal
=
""
;
var
listData
=
[];
var
status
=
[
"计划数量"
];
r
.
result
.
chidren
.
map
((
e
)
=>
{
status
.
push
(
e
.
status
);
});
allTotal
=
r
.
result
.
allTotal
;
listData
=
r
.
result
.
chidren
;
this
.
braking
=
{
xAxis
:
{
// type: "category",
data
:
[
"计划数量"
,
"已完成"
,
"执行中"
,
"暂停中"
,
"未开工"
],
data
:
[
'计划数量'
,
],
axisTick
:
{
show
:
false
show
:
false
,
},
axisLine
:
{
show
:
false
show
:
false
,
},
axisLabel
:
{
textStyle
:
{
color
:
"#515A6E"
}
}
color
:
"#515A6E"
,
},
},
},
yAxis
:
{
splitLine
:
{
show
:
true
,
lineStyle
:
{
color
:
"#eee"
,
type
:
"solid"
}
type
:
"solid"
,
},
},
axisTick
:
{
show
:
false
show
:
false
,
},
axisLine
:
{
show
:
false
show
:
false
,
},
axisLabel
:
{
textStyle
:
{
color
:
"#515A6E"
}
}
color
:
"#515A6E"
,
},
},
},
grid
:
{
left
:
"3%"
,
right
:
"4%"
,
bottom
:
"3%"
,
containLabel
:
true
containLabel
:
true
,
},
tooltip
:
{
trigger
:
"axis"
,
axisPointer
:
{
type
:
"shadow"
}
type
:
"shadow"
,
},
},
color
:
[
"#73DDFF"
],
series
:
[
{
data
:
[
{
value
:
120
,
value
:
allTotal
,
itemStyle
:
{
normal
:
{
color
:
"#2680EB"
,
barBorderRadius
:
[
30
,
30
,
0
,
0
]
}
}
barBorderRadius
:
[
30
,
30
,
0
,
0
],
},
},
},
{
value
:
60
,
value
:
listData
[
0
].
count
,
itemStyle
:
{
normal
:
{
color
:
"#0DD78D"
,
barBorderRadius
:
[
30
,
30
,
0
,
0
]
}
}
barBorderRadius
:
[
30
,
30
,
0
,
0
],
},
},
},
{
value
:
210
,
value
:
listData
[
1
].
count
,
itemStyle
:
{
normal
:
{
color
:
"#FFA000"
,
barBorderRadius
:
[
30
,
30
,
0
,
0
]
}
}
barBorderRadius
:
[
30
,
30
,
0
,
0
],
},
},
},
{
value
:
210
,
value
:
listData
[
2
].
count
,
itemStyle
:
{
normal
:
{
color
:
"#FE7777"
,
barBorderRadius
:
[
30
,
30
,
0
,
0
]
}
}
barBorderRadius
:
[
30
,
30
,
0
,
0
],
},
},
},
{
value
:
210
,
itemStyle
:
{
normal
:
{
color
:
"#515A6E"
,
barBorderRadius
:
[
30
,
30
,
0
,
0
]
}
}
}
],
type
:
"bar"
,
barWidth
:
10
,
//柱图宽度
barGap
:
"-20%"
//柱图间距
}
]
barGap
:
"-20%"
,
//柱图间距
},
],
};
});
},
statistics1
()
{
let
conditions
=
[];
let
data
=
{
conditions
:
conditions
,
};
Api
.
orderstatuscount
(
data
).
then
((
r
)
=>
{
let
listData
=
[];
let
name
=
[];
let
allTotal
=
[]
listData
=
r
.
result
;
r
.
result
.
map
((
e
)
=>
{
name
.
push
(
e
.
name
);
allTotal
.
push
(
e
.
allTotal
)
});
this
.
braking1
=
{
color
:
[
"#2680EB"
,
"#0DD78D"
,
"#FFA000"
,
"#FE7777"
,
"#515A6E"
],
legend
:
{
data
:
[
"计划数量"
,
"已完成"
,
"执行中"
,
"暂停中"
,
"未开工"
],
top
:
12
top
:
12
,
// textStyle: {
// color: "#515A6E"
// },
...
...
@@ -187,31 +214,31 @@ export default {
trigger
:
"axis"
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
"shadow"
// 默认为直线,可选为:'line' | 'shadow'
}
type
:
"shadow"
,
// 默认为直线,可选为:'line' | 'shadow'
},
},
grid
:
{
left
:
"0"
,
right
:
"4%"
,
bottom
:
"3%"
,
containLabel
:
true
containLabel
:
true
,
},
xAxis
:
{
// type: "category",
data
:
[
"三车间"
,
"五车间"
,
"六车间"
,
"七车间"
]
,
data
:
name
,
axisTick
:
{
show
:
false
show
:
false
,
},
axisLine
:
{
show
:
false
show
:
false
,
},
axisLabel
:
{
textStyle
:
{
color
:
"#515A6E"
}
}
color
:
"#515A6E"
,
},
},
},
yAxis
:
{
// type: "value",
...
...
@@ -219,20 +246,20 @@ export default {
show
:
true
,
lineStyle
:
{
color
:
"#eee"
,
type
:
"solid"
}
type
:
"solid"
,
},
},
axisTick
:
{
show
:
false
show
:
false
,
},
axisLine
:
{
show
:
false
show
:
false
,
},
axisLabel
:
{
textStyle
:
{
color
:
"#515A6E"
}
}
color
:
"#515A6E"
,
},
},
},
series
:
[
...
...
@@ -241,36 +268,37 @@ export default {
type
:
"bar"
,
barWidth
:
20
,
//柱图宽度
barGap
:
"100%"
,
//柱图间距
data
:
[
110
,
40
,
100
,
70
,
50
]
data
:
allTotal
,
},
{
name
:
"已完成"
,
type
:
"bar"
,
barWidth
:
20
,
//柱图宽度
data
:
[
5
,
40
,
70
,
50
,
20
]
data
:
[
5
,
40
,
70
,
50
,
20
],
},
{
name
:
"执行中"
,
type
:
"bar"
,
barWidth
:
20
,
//柱图宽度
data
:
[
50
,
40
,
60
,
110
,
40
]
data
:
[
50
,
40
,
60
,
110
,
40
],
},
{
name
:
"暂停中"
,
type
:
"bar"
,
barWidth
:
20
,
//柱图宽度
data
:
[
60
,
110
,
90
,
50
,
20
]
data
:
[
60
,
110
,
90
,
50
,
20
],
},
{
name
:
"未开工"
,
type
:
"bar"
,
barWidth
:
20
,
//柱图宽度
data
:
[
50
,
68
,
40
,
100
,
55
]
}
]
data
:
[
50
,
68
,
40
,
100
,
55
],
},
],
};
}
}
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
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