Merge branch 'master' of https://codeup.aliyun.com/645deca397d94d909e439238/iotplatform_sourcecode/screenFront into rule
This commit is contained in:
commit
374c2c9c21
@ -83,15 +83,29 @@ let SewingTime = reactive({
|
||||
},
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "4%",
|
||||
right: "10%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
type: "value",
|
||||
|
||||
// boundaryGap: [0, 0.01]
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: "value",
|
||||
name: "缝纫时间",
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "用电量",
|
||||
// min: 0,
|
||||
// max: 100,
|
||||
// interval: 20,
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
],
|
||||
yAxis: {
|
||||
type: "category",
|
||||
name: "min",
|
||||
@ -124,6 +138,27 @@ let SewingTime = reactive({
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '用电量',
|
||||
type: "bar",
|
||||
XAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
},
|
||||
},
|
||||
data: [],
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: "right",
|
||||
textStyle: {
|
||||
color: "rgb(255,255,255,0.9)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
});
|
||||
@ -184,12 +219,16 @@ watch(
|
||||
(newVal, oldVal) => {
|
||||
let y = [];
|
||||
let x = [];
|
||||
let z = []
|
||||
newVal.forEach((res) => {
|
||||
y.push(res.name);
|
||||
x.push(res.workTime);
|
||||
//省略两位小数
|
||||
z.push((res.runTime/10).toFixed(2))
|
||||
});
|
||||
SewingTime.option.yAxis.data = y;
|
||||
SewingTime.option.series[0].data = x;
|
||||
SewingTime.option.series[1].data = z;
|
||||
chartref.value.changeData(SewingTime.option);
|
||||
},
|
||||
{ deep: true, flush: "post" }
|
||||
|
Loading…
Reference in New Issue
Block a user