projects/mescc/zhp #57

Merged
juzi merged 3 commits from projects/mescc/zhp into projects/mescc/develop 2024-06-21 16:19:02 +08:00
Showing only changes of commit c7205e32a3 - Show all commits

View File

@ -106,7 +106,8 @@ export default {
data() { data() {
return { return {
otherProps: [], otherProps: [],
title:'', title: '',
currentMenu:'邯郸',
listQuery: { listQuery: {
start: undefined, start: undefined,
end: undefined, end: undefined,
@ -547,29 +548,30 @@ export default {
}) })
}) })
}) })
this.chartMsg.xData.push(res.data[0].list[0].reportTimep + '目标') if (res.data[0].list.length != 0) {
if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) { this.chartMsg.xData.push(res.data[0].list[0].reportTimep + '目标')
this.otherProps.push({ if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) {
label: res.data[0].list[0].reportTimep + '目标', this.otherProps.push({
prop: 'dayData' label: res.data[0].list[0].reportTimep + '目标',
}) prop: 'dayData'
dataArr[0]['dayData'] = res.data[0].chipTarget })
dataArr[1]['dayData'] = res.data[0].standTarget dataArr[0]['dayData'] = res.data[0].list[0].chipTarget
dataArr[2]['dayData'] = res.data[0].conversionEfficiencyTarget dataArr[1]['dayData'] = res.data[0].list[0].standTarget
} dataArr[2]['dayData'] = res.data[0].list[0].conversionEfficiencyTarget
if (this.listQuery.date === 2 || this.listQuery.date === 3) { }
this.otherProps.push({ if (this.listQuery.date === 2 || this.listQuery.date === 3) {
label: res.data[0].yearTarget.targetTime, this.otherProps.push({
prop: 'yearData' label: res.data[0].yearTarget.targetTime,
}) prop: 'yearData'
dataArr[0]['yearData'] = res.data[0].yearTarget.chipTotalPower })
dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower dataArr[0]['yearData'] = res.data[0].yearTarget.chipTotalPower
dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower
} dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency
res.data.forEach((ele, index) => { }
// let i = index + 1 res.data.forEach((ele, index) => {
// let m = 'value' + i // let i = index + 1
ele.list.forEach((item, index) => { // let m = 'value' + i
ele.list.forEach((item, index) => {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
// ele.productionSituationDataVOList.forEach((item) => { // ele.productionSituationDataVOList.forEach((item) => {
@ -588,73 +590,77 @@ export default {
// props: 'value' + index + 1, // props: 'value' + index + 1,
// }) // })
}) })
}) })
this.title = res.data[0].yearTarget.targetTime + '目标值' this.title = res.data[0].yearTarget.targetTime + '目标值'
this.chartMsgYearTarget.series[0].data = [ this.chartMsgYearTarget.series[0].data = [
{ {
value: res.data[0].yearTarget.chipTotalPower, value: res.data[0].yearTarget.chipTotalPower,
itemStyle: { itemStyle: {
color: '#8EF0AB' color: '#8EF0AB'
}
},
{
value: res.data[0].yearTarget.componentTotalPower,
itemStyle: {
color: '#288AFF'
}
},
{
value: null,
itemStyle: {
color: '#64BDFF'
}
}]
this.chartMsgYearTarget.series[1].data = [
{
value: null,
itemStyle: {
color: '#8EF0AB'
}
},
{
value: null,
itemStyle: {
color: '#288AFF'
}
},
{
value: res.data[0].yearTarget.componentConversionEfficiency,
itemStyle: {
color: '#64BDFF'
}
}]
console.log(dataArr);
for (let i in dataArr[0]) {
this.chartMsg.series[0].name = dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
})
} }
},
{
value: res.data[0].yearTarget.componentTotalPower,
itemStyle: {
color: '#288AFF'
}
},
{
value: null,
itemStyle: {
color: '#64BDFF'
}
}]
this.chartMsgYearTarget.series[1].data = [
{
value: null,
itemStyle: {
color: '#8EF0AB'
}
},
{
value: null,
itemStyle: {
color: '#288AFF'
}
},
{
value: res.data[0].yearTarget.componentConversionEfficiency,
itemStyle: {
color: '#64BDFF'
}
}]
console.log(dataArr);
for (let i in dataArr[0]) {
this.chartMsg.series[0].name = dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
})
} }
} for (let i in dataArr[1]) {
for (let i in dataArr[1]) { this.chartMsg.series[1].name = dataArr[1]['item']
this.chartMsg.series[1].name = dataArr[1]['item'] if (i.search('value') === 0) {
if (i.search('value') === 0) { this.chartMsg.series[1].data.push({
this.chartMsg.series[1].data.push({ name: dataArr[1]['item'],
name: dataArr[1]['item'], value: dataArr[1][i]
value: dataArr[1][i] })
}) }
} }
} for (let i in dataArr[2]) {
for (let i in dataArr[2]) { this.chartMsg.series[2].name = dataArr[2]['item']
this.chartMsg.series[2].name = dataArr[2]['item'] if (i.search('value') === 0) {
if (i.search('value') === 0) { this.chartMsg.series[2].data.push({
this.chartMsg.series[2].data.push({ name: dataArr[2]['item'],
name: dataArr[2]['item'], value: dataArr[2][i]
value: dataArr[2][i] })
}) }
} }
} else {
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
} }
// for (let i in dataArr[3]) { // for (let i in dataArr[3]) {
// this.chartMsg.series[3].name = dataArr[3]['item'] // this.chartMsg.series[3].name = dataArr[3]['item']
@ -665,7 +671,7 @@ export default {
// }) // })
// } // }
// } // }
this.tableData = dataArr this.tableData =res.data[0].list.length !== 0? dataArr : []
}, },
_setTableHeight() { _setTableHeight() {
this.tableH = this.tableHeight(137) / 2 - 70; this.tableH = this.tableHeight(137) / 2 - 70;