|
|
@ -123,7 +123,7 @@
|
|
|
|
<div class="icon">
|
|
|
|
<div class="icon">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="itemname1">
|
|
|
|
<div class="itemname1" style="max-width: 210px;">
|
|
|
|
{{ n.projectName }}
|
|
|
|
{{ n.projectName }}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -448,80 +448,83 @@ export default {
|
|
|
|
let dataoption = [];
|
|
|
|
let dataoption = [];
|
|
|
|
let totalArr = [];
|
|
|
|
let totalArr = [];
|
|
|
|
_this.optionDatalist3 = [];
|
|
|
|
_this.optionDatalist3 = [];
|
|
|
|
response = [{ name: "1月", code: "100", value: '100', }]
|
|
|
|
console.log(response)
|
|
|
|
if (response.length > 0) {
|
|
|
|
for (let index = 0; index < response.month.length; index++) {
|
|
|
|
response.forEach((item) => {
|
|
|
|
let a = {};
|
|
|
|
let a = {};
|
|
|
|
response.month[index] = moment(response.month[index]).format('MM')
|
|
|
|
a.name = item.equName;
|
|
|
|
a.name = response.month[index] + '月'
|
|
|
|
a.value = item.monthData;
|
|
|
|
a.value = response.monthData[index]
|
|
|
|
a.code = item.equCode;
|
|
|
|
a.code = response.monthData[index]
|
|
|
|
_this.optionDatalist3.push(a);
|
|
|
|
dataoption.push(a);
|
|
|
|
dataoption.push(a);
|
|
|
|
numberlist.push(response.monthData[index]);
|
|
|
|
numberlist.push(item.monthData);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// dataoption.sort((a, b) => {
|
|
|
|
dataoption.sort((a, b) => {
|
|
|
|
// return a.value - b.value;
|
|
|
|
return a.value - b.value;
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
dataoption = dataoption.reverse()
|
|
|
|
let max = Math.max(...numberlist);
|
|
|
|
let max = Math.max(...numberlist);
|
|
|
|
max = max + 100;
|
|
|
|
max = max + 100;
|
|
|
|
dataoption.forEach((item) => {
|
|
|
|
dataoption.forEach((item) => {
|
|
|
|
totalArr.push(max);
|
|
|
|
totalArr.push(max);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
option3 = {
|
|
|
|
console.log(dataoption, numberlist)
|
|
|
|
yAxis: [
|
|
|
|
// response = [{ name: "1月", code: "100", value: '100', }]
|
|
|
|
{
|
|
|
|
// if (response.length > 0) {
|
|
|
|
data: dataoption,
|
|
|
|
option3 = {
|
|
|
|
},
|
|
|
|
yAxis: [
|
|
|
|
],
|
|
|
|
{
|
|
|
|
series: [
|
|
|
|
data: dataoption,
|
|
|
|
{
|
|
|
|
},
|
|
|
|
data: dataoption,
|
|
|
|
],
|
|
|
|
itemStyle: {
|
|
|
|
series: [
|
|
|
|
normal: {
|
|
|
|
{
|
|
|
|
color: function (params) {
|
|
|
|
data: dataoption,
|
|
|
|
var index_num = params.value;
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
for (var i = 0; i < dataoption.length; i++) {
|
|
|
|
color: function (params) {
|
|
|
|
//判断数据是否大于1
|
|
|
|
var index_num = params.value;
|
|
|
|
if (index_num > 1131) {
|
|
|
|
|
|
|
|
//var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
|
|
|
|
for (var i = 0; i < dataoption.length; i++) {
|
|
|
|
//return colorList[params.dataIndex];
|
|
|
|
//判断数据是否大于1
|
|
|
|
return new echarts.graphic.LinearGradient(
|
|
|
|
if (index_num > 1131) {
|
|
|
|
0,
|
|
|
|
//var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
|
|
|
|
0,
|
|
|
|
//return colorList[params.dataIndex];
|
|
|
|
1,
|
|
|
|
return new echarts.graphic.LinearGradient(
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
[
|
|
|
|
0,
|
|
|
|
{ offset: 0, color: "#FFB742" },
|
|
|
|
1,
|
|
|
|
{ offset: 1, color: "#FFB742" },
|
|
|
|
0,
|
|
|
|
]
|
|
|
|
[
|
|
|
|
);
|
|
|
|
{ offset: 0, color: "#FFB742" },
|
|
|
|
} else {
|
|
|
|
{ offset: 1, color: "#FFB742" },
|
|
|
|
//var colorList = ['blue'];
|
|
|
|
]
|
|
|
|
//return colorList[params.dataIndex];
|
|
|
|
);
|
|
|
|
return new echarts.graphic.LinearGradient(
|
|
|
|
} else {
|
|
|
|
0,
|
|
|
|
//var colorList = ['blue'];
|
|
|
|
0,
|
|
|
|
//return colorList[params.dataIndex];
|
|
|
|
1,
|
|
|
|
return new echarts.graphic.LinearGradient(
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
[
|
|
|
|
0,
|
|
|
|
{ offset: 0, color: "#005954" },
|
|
|
|
1,
|
|
|
|
{ offset: 1, color: "#66E1DF" },
|
|
|
|
0,
|
|
|
|
]
|
|
|
|
[
|
|
|
|
);
|
|
|
|
{ offset: 0, color: "#005954" },
|
|
|
|
}
|
|
|
|
{ offset: 1, color: "#66E1DF" },
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
},
|
|
|
|
data: totalArr,
|
|
|
|
{
|
|
|
|
},
|
|
|
|
data: totalArr,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
],
|
|
|
|
myChart3.setOption(option3);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
myChart3.setOption(option3);
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var myChart5 = echarts.init(document.querySelector("#echart5"));
|
|
|
|
var myChart5 = echarts.init(document.querySelector("#echart5"));
|
|
|
@ -581,7 +584,7 @@ export default {
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: 'value',
|
|
|
|
type: 'value',
|
|
|
|
name: '万元',
|
|
|
|
name: '',
|
|
|
|
nameTextStyle: {
|
|
|
|
nameTextStyle: {
|
|
|
|
color: '#D0DEEE'
|
|
|
|
color: '#D0DEEE'
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -618,33 +621,38 @@ export default {
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
if (response) {
|
|
|
|
if (response) {
|
|
|
|
let seriesmyChart5 = []
|
|
|
|
let seriesmyChart5 = []
|
|
|
|
|
|
|
|
let legenddata = []
|
|
|
|
let dataoption = response.series;
|
|
|
|
let dataoption = response.series;
|
|
|
|
let xAxisdata = response.dayStr
|
|
|
|
let xAxisdata = response.dayStr
|
|
|
|
let yAxismax = []
|
|
|
|
let yAxismax = []
|
|
|
|
let yAxismaxall = 0
|
|
|
|
let yAxismaxall = 0
|
|
|
|
dataoption.forEach((n) => {
|
|
|
|
dataoption.forEach((n) => {
|
|
|
|
if (e.data) {
|
|
|
|
if (n.data) {
|
|
|
|
console.log(Math.max(e.data), e.data)
|
|
|
|
console.log(Math.max(...n.data), n.data)
|
|
|
|
yAxismax.push(Math.max(...e.datax))
|
|
|
|
yAxismax.push(Math.max(...n.data))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var item = {
|
|
|
|
var item = {
|
|
|
|
name: e.planktonname,
|
|
|
|
name: n.machineName,
|
|
|
|
data: e.data,
|
|
|
|
data: n.data,
|
|
|
|
emphasis: {
|
|
|
|
emphasis: {
|
|
|
|
focus: 'series'
|
|
|
|
focus: 'series'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
type: "bar",
|
|
|
|
type: "bar",
|
|
|
|
stack: e.planktonname,
|
|
|
|
stack: n.machineName,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
legenddata.push(n.machineName)
|
|
|
|
seriesmyChart5.push(item);
|
|
|
|
seriesmyChart5.push(item);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
yAxismaxall = Math.max(...yAxismax) + 5
|
|
|
|
yAxismaxall = Math.max(...yAxismax) + 5
|
|
|
|
myChart5 = {
|
|
|
|
option5 = {
|
|
|
|
xAxis: [
|
|
|
|
xAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data: xAxisdata,
|
|
|
|
data: xAxisdata,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
legend:{
|
|
|
|
|
|
|
|
data:legenddata
|
|
|
|
|
|
|
|
},
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
max: yAxismaxall
|
|
|
|
max: yAxismaxall
|
|
|
@ -652,6 +660,7 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
series: seriesmyChart5
|
|
|
|
series: seriesmyChart5
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
console.log(seriesmyChart5,'111111111111111')
|
|
|
|
myChart5.setOption(option5);
|
|
|
|
myChart5.setOption(option5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -666,8 +675,13 @@ export default {
|
|
|
|
containLabel: true
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
show: true,
|
|
|
|
trigger: 'axis',
|
|
|
|
trigger: 'item'
|
|
|
|
axisPointer: {
|
|
|
|
|
|
|
|
type: 'cross',
|
|
|
|
|
|
|
|
crossStyle: {
|
|
|
|
|
|
|
|
color: '#999'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
@ -779,9 +793,28 @@ export default {
|
|
|
|
yAxisIndex: 1,
|
|
|
|
yAxisIndex: 1,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: '#00d4c7',
|
|
|
|
color: '#5260CE',
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
|
color: "#00d4c7",
|
|
|
|
color: "#5260CE",
|
|
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: []
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '不合格比例',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
stack: '总量',
|
|
|
|
|
|
|
|
symbol: 'circle',
|
|
|
|
|
|
|
|
symbolSize: 8,
|
|
|
|
|
|
|
|
yAxisIndex: 1,
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: '#88E4E3',
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#88E4E3",
|
|
|
|
width: 1
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -809,6 +842,27 @@ export default {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '不合格数量',
|
|
|
|
|
|
|
|
data: [],
|
|
|
|
|
|
|
|
type: 'bar',
|
|
|
|
|
|
|
|
showBackground: true,
|
|
|
|
|
|
|
|
backgroundStyle: {
|
|
|
|
|
|
|
|
color: 'rgba(180, 180, 180, 0.2)'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
barBorderRadius: 5,
|
|
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
|
|
|
|
|
0, 0, 0, 1,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
{ offset: 0, color: "#66E1DF" },
|
|
|
|
|
|
|
|
{ offset: 1, color: "#005954" },
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
@ -819,10 +873,27 @@ export default {
|
|
|
|
factoryCode: 'ds_' + _this.selectxt,
|
|
|
|
factoryCode: 'ds_' + _this.selectxt,
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
if (response) {
|
|
|
|
if (response) {
|
|
|
|
let seriesdata1 = response[0].data
|
|
|
|
let seriesdata1 = response[0].dataBarArrays
|
|
|
|
let seriesdata2 = response[0].dataStr
|
|
|
|
let seriesdata2 = response[0].dataLineArrays
|
|
|
|
let xAxisdata = response[0].dayStr
|
|
|
|
let xAxisdata = response[0].dayStr
|
|
|
|
let yAxismax = Math.max(...seriesdata1) + 5
|
|
|
|
let seriesdata3 = response[1].dataBarArrays
|
|
|
|
|
|
|
|
let seriesdata4 = response[1].dataLineArrays
|
|
|
|
|
|
|
|
let max1 = Math.max(...seriesdata1) + 5
|
|
|
|
|
|
|
|
let max2 = Math.max(...seriesdata3) + 5
|
|
|
|
|
|
|
|
let max3 = Math.max(...seriesdata2) + 5
|
|
|
|
|
|
|
|
let max4 = Math.max(...seriesdata4) + 5
|
|
|
|
|
|
|
|
let yAxismax1 = 0
|
|
|
|
|
|
|
|
let yAxismax2 = 0
|
|
|
|
|
|
|
|
if (max1 > max2) {
|
|
|
|
|
|
|
|
yAxismax1 = max1
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
yAxismax1 = max2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (max3 > max4) {
|
|
|
|
|
|
|
|
yAxismax2 = max3
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
yAxismax2 = max4
|
|
|
|
|
|
|
|
}
|
|
|
|
option6 = {
|
|
|
|
option6 = {
|
|
|
|
xAxis: [
|
|
|
|
xAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -831,15 +902,24 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
max: yAxismax
|
|
|
|
max: yAxismax1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
max: yAxismax2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data: seriesdata2,
|
|
|
|
data: seriesdata2,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
data: seriesdata4,
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data: seriesdata1,
|
|
|
|
data: seriesdata1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
data: seriesdata3,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -853,14 +933,14 @@ export default {
|
|
|
|
let intactRate = 0
|
|
|
|
let intactRate = 0
|
|
|
|
let numberAngle = 360
|
|
|
|
let numberAngle = 360
|
|
|
|
let intactRate1 = 0
|
|
|
|
let intactRate1 = 0
|
|
|
|
let numberAngle2 = 360
|
|
|
|
let numberAngle1 = 360
|
|
|
|
if (_this.equipmentinfo.todayOkRate) {
|
|
|
|
if (_this.equipmentinfo.todayOkRate) {
|
|
|
|
intactRate = _this.equipmentinfo.todayOkRate
|
|
|
|
intactRate = parseFloat(_this.equipmentinfo.todayOkRate)
|
|
|
|
numberAngle = (100 - parseInt(_this.equipmentinfo.intactRate)) * 3.6
|
|
|
|
numberAngle = (100 - parseInt(_this.equipmentinfo.todayOkRate)) * 3.6
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_this.equipmentinfo.monthOkRate) {
|
|
|
|
if (_this.equipmentinfo.monthOkRate) {
|
|
|
|
intactRate1 = _this.equipmentinfo.monthOkRate
|
|
|
|
intactRate1 = parseFloat(_this.equipmentinfo.monthOkRate)
|
|
|
|
numberAngle2 = (100 - parseInt(_this.equipmentinfo.monthOkRate)) * 3.6
|
|
|
|
numberAngle1 = (100 - parseInt(_this.equipmentinfo.monthOkRate)) * 3.6
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var myChart1 = echarts.init(document.querySelector("#echart1"));
|
|
|
|
var myChart1 = echarts.init(document.querySelector("#echart1"));
|
|
|
|
var option1 = {
|
|
|
|
var option1 = {
|
|
|
@ -1159,7 +1239,7 @@ export default {
|
|
|
|
//起始角度。圆心 正右手侧为0度,正上方为90度,正左手侧为180度。
|
|
|
|
//起始角度。圆心 正右手侧为0度,正上方为90度,正左手侧为180度。
|
|
|
|
startAngle: 360,
|
|
|
|
startAngle: 360,
|
|
|
|
//结束角度。
|
|
|
|
//结束角度。
|
|
|
|
endAngle: numberAngle,
|
|
|
|
endAngle: numberAngle1,
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
//仪表盘轴线相关配置。
|
|
|
|
//仪表盘轴线相关配置。
|
|
|
|
name: "内层盘",
|
|
|
|
name: "内层盘",
|
|
|
@ -1285,7 +1365,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: intactRate,
|
|
|
|
value: intactRate1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -1740,6 +1820,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.app-container {
|
|
|
|
.app-container {
|
|
|
|
padding: 0px 24px;
|
|
|
|
padding: 0px 24px;
|
|
|
|