projects/mescc/zhp #66

Merged
juzi merged 2 commits from projects/mescc/zhp into projects/mescc/develop 2024-06-26 15:53:44 +08:00
8 changed files with 620 additions and 578 deletions
Showing only changes of commit f67e781146 - Show all commits

View File

@ -65,13 +65,13 @@ export default {
valueTuple() {
const getter = this.chipRate;
// console.log(getter)
if (this.period === "日" || this.period === "周") {
return [
getter.previous[this.factoryId],
getter.current[this.factoryId],
0,
];
}
// if (this.period === "" || this.period === "") {
// return [
// getter.previous[this.factoryId],
// getter.current[this.factoryId],
// 0,
// ];
// }
// [100, 200, 200]
return [
getter.previous[this.factoryId],
@ -105,21 +105,25 @@ export default {
items = [
{ label: `${yesterday}日良率`, },
{ label: `${year - 1}${yesterday}日良率` },
{ label: `${yesterday}日目标` },
];
} else if (this.period === '日' && this.than === '环比') {
items = [
{ label: `${yesterday}日良率` },
{ label: `${dayBeYes}日良率` },
{ label: `${yesterday}日目标` },
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `本周良率`, },
{ label: `${year - 1}年本周良率` },
{ label: `本周目标`, },
];
} else if (this.period === '周' && this.than === '环比') {
items = [
{ label: `本周良率`, },
{ label: `上周良率`, },
{ label: `本周目标`, },
];
} else if (this.period === '月' && this.than === '同比') {
items = [
@ -182,22 +186,25 @@ export default {
items = [
{ label: `${year - 1}${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '日' && this.than === '环比') {
items = [
{ label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '周' && this.than === '环比') {
items = [
{ label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '月' && this.than === '同比') {
items = [

View File

@ -17,7 +17,7 @@ export default ({
tooltip: {},
title: {
text: titleValue,
left: "44%",
left: "48%",
top: "37%",
textAlign: "center",
textStyle: {
@ -39,7 +39,7 @@ export default ({
type: "pie",
name: "当前目标",
radius: ["80%", "90%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
emptyCircleStyle: {
color: "#042c5f33",
},
@ -48,7 +48,7 @@ export default ({
{
type: "pie",
radius: ["80%", "90%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
avoidLabelOvervlap: false,
label: {
show: false,
@ -97,7 +97,7 @@ export default ({
{
type: "pie",
radius: ["70%", "80%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
avoidLabelOvervlap: false,
label: {
show: false,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-26 09:25:28
* @LastEditTime: 2024-06-26 14:48:49
* @LastEditors: zhp
* @Description:
-->
@ -51,7 +51,7 @@ export default {
},
},
formatter: function (params) {
// console.log('params', params);
console.log('params', params.data)
var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
res +=
@ -59,12 +59,12 @@ export default {
`<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%"
: params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
? (params[i].data.titleValue ? params[i].data.titleValue : 0) + "MW"
: (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片"
}</span>`;
}
return res;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-06-25 15:13:45
* @LastEditTime: 2024-06-26 14:49:15
* @LastEditors: zhp
* @Description:
-->
@ -51,7 +51,7 @@ export default {
},
},
formatter: function (params) {
console.log('params', params)
// console.log('params', params)
let arr = []
var res = ``;
// for (var i = 0, l = params.length; i < l; i++) {

View File

@ -175,6 +175,14 @@ export default {
{
type: "value",
name: "单位/MW",
// splitNumber: 5,
min: function (value) {//
return 0
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -183,7 +191,13 @@ export default {
},
{
type: 'value',
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 25,//
// inverse: true,
splitNumber: 5,
name: "单位/%",
nameTextStyle: {
fontSize: 12,
@ -235,7 +249,7 @@ export default {
type: "value",
name: "单位/片",
min: function (value) {//
return Math.floor(value.min)
return 0
},
max: function (value) {//
return Math.ceil(value.max)
@ -258,8 +272,8 @@ export default {
min: 0,
max: 100,
// scale: true,
interval: 20,//
// splitNumber: 8,
interval: 25,//
// splitNumber: 5,
nameTextStyle: {
fontSize: 12,
align: "right",

View File

@ -222,9 +222,10 @@ export default {
xData: [],
yName: "单位/MW",
yAxis: {
show: true,
type: "value",
name: "单位/MW",
show: true,
// splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -239,10 +240,10 @@ export default {
color: ["#8EF0AB", "#288AFF"],
xData: [],
yName: "单位/MW",
yAxis:
{
yAxis:{
type: "value",
name: "单位/MW",
// splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -257,7 +258,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [-40, -16],
position: [-30, -16],
color: "#68C483",
formatter: function (params) {
return params.value
@ -523,6 +524,10 @@ export default {
})
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
if (this.listQuery.type === 2) {
// res.data.list.forEach((ele) => {
@ -564,62 +569,32 @@ export default {
let arr = []
let chip = []
let std = []
let obj = {}
let targetObj = {}
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
chip.push({
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
} else {
chip.unshift({
obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
chip.push({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.chipTotalPower },
{ name: "芯片总功率完成值", value: obj.chipTotalPower, titleValue: obj.chipTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
@ -635,12 +610,32 @@ export default {
return params.value
},
},
},)
std.unshift({
}, {
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: (targetObj.chipTotalPower - obj.chipTotalPower) > 0 ? (targetObj.chipTotalPower - obj.chipTotalPower) : null, titleValue: targetObj.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
})
std.push({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentTotalPower },
{ name: "标准组件总功率完成值", value: obj.componentTotalPower,titleValue:obj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
@ -655,13 +650,26 @@ export default {
return params.value
},
},
})
}
}, {
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.componentTotalPower },
// { name: '', value: 23 },
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std]
@ -724,26 +732,59 @@ export default {
let arr = []
let chip = []
let std = []
console.log(' res.data.list.slice(res.data.list.length - 1, res.data.list.length)', res.data.list.slice(res.data.list.length - 2, res.data.list.length));
let obj = {}
let targetObj = {}
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
} else {
obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
chip.push({
name: "芯片总功率目标值",
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.componentTotalPower },
// { name: '', value: 22 },
{ name: "芯片总功率完成值", value: obj.chipTotalPower, titleValue: obj.chipTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
}, {
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: (targetObj.chipTotalPower - obj.chipTotalPower) > 0 ? (targetObj.chipTotalPower - obj.chipTotalPower) : null, titleValue: targetObj.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
@ -752,12 +793,31 @@ export default {
return params.value
},
},
},)
})
std.push({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: obj.componentTotalPower, titleValue: obj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
}, {
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentTotalPower },
{ name: "标准组件总功率目标值", value: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
@ -774,59 +834,8 @@ export default {
},
},
})
} else {
chip.unshift({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.componentTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
})
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
console.log('arr', chip, std)
this.chartMsgTarget.series = [...chip, ...std]
console.log(this.chartMsg.xData)
} else {
res.data.list.forEach((ele, index) => {
this.chartMsg.xData.push(ele.titleValue)

View File

@ -180,6 +180,7 @@ export default {
type: "value",
name: "单位/片",
show: true,
splitNumber: 5,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -210,7 +211,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [-18, -16],
position: [0, -16],
color: "#288AFF",
formatter: function (params) {
return params.value
@ -225,7 +226,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [0, -16],
position: [18, -16],
color: "#64BDFF",
formatter: function (params) {
return params.value
@ -239,7 +240,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [0, -16],
position: [20, -16],
color: "#7164FF",
formatter: function (params) {
return params.value
@ -263,7 +264,7 @@ export default {
// max: function (value) {//
// return Math.ceil(value.max)
// },
scale: true,
splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -283,11 +284,11 @@ export default {
fontSize: 12,
align: "right",
},
scale: true,
// scale: true,
// min: function (value) {//
// return Math.floor(value.min)
// },
splitNumber: 5,
splitNumber: 4,
// max: function (value) {//
// return Math.ceil(value.max)
// },
@ -317,7 +318,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [10, -16],
position: [0, -16],
color: "#288AFF",
formatter: function (params) {
return params.value
@ -332,7 +333,7 @@ export default {
barWidth: 20,
label: {
show: true,
position: [0, -16],
position: [5, -16],
color: "#64BDFF",
formatter: function (params) {
return params.value
@ -660,6 +661,11 @@ export default {
})
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
// ele.titleValue
// .push({
// label: ele.titleValue,
@ -718,20 +724,57 @@ export default {
let chip = []
let std = []
let bipv = []
let targetObj = {}
let obj = {}
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log("ele",ele.titleValue);
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
if (ele.titleValue.search('完成') == -1) {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
targetObj.ftoInput = item.ftoInput
targetObj.chipYield = item.chipYield
targetObj.componentYield = item.componentYield
targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
})
console.log("fto",ele.titleValue,fto);
} else {
ele.productionSituationDataVOList.forEach((item) => {
obj.ftoInput = item.ftoInput
obj.chipYield = item.chipYield
obj.componentYield = item.componentYield
obj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
// if (ele.titleValue.search('') != -1) {
// } else {
})
}
})
fto.push({
name: "FTO投入完成值",
data: [
// s
{ name: 'FTO投入完成值', value: obj.ftoInput,titleValue: obj.ftoInput },
// { name: 'FTO', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack: 'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
}, {
name: "FTO投入目标值",
data: [
// s
{ name: 'FTO投入目标', value: item.ftoInput },
{ name: 'FTO投入目标', value: (targetObj.ftoInput - obj.ftoInput) > 0 ? (targetObj.ftoInput - obj.ftoInput) : null, titleValue: targetObj.ftoInput },
// { name: 'FTO', value: 11 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
@ -747,13 +790,34 @@ export default {
return params.value
},
},
},)
})
chip.push({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: obj.chipYield, titleValue: obj.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
}, {
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
{ name: "芯片产量目标值", value: (targetObj.chipYield - obj.chipYield) > 0 ? (targetObj.chipYield - obj.chipYield) : null, titleValue: targetObj.chipYield },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
@ -769,12 +833,31 @@ export default {
return params.value
},
},
},)
})
std.push({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: obj.componentYield, titleValue: obj.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
}, {
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
{ name: "标准组件产量目标值", value: (targetObj.componentYield - obj.componentYield) > 0 ? (targetObj.componentYield - obj.componentYield) : null, titleValue: targetObj.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
@ -792,11 +875,31 @@ export default {
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
{ name: "BIPV产量完成值", value: obj.bipvProductOutput, titleValue: obj.bipvProductOutput },
// { name: 'BIPV', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},
}, this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量目标值",
stack: 'c',
data: [
{ name: "BIPV产量目标值", value: item.bipvProductOutput },
{ name: "BIPV产量目标值", value: (targetObj.bipvProductOutput - obj.bipvProductOutput) > 0 ? (targetObj.bipvProductOutput - obj.bipvProductOutput) : null, titleValue: targetObj.bipvProductOutput },
// { name: 'BIPV', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
@ -812,104 +915,7 @@ export default {
},
},
},)
// } else {
// }
})
console.log("fto",ele.titleValue,fto);
} else {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('') != -1) {
// } else {
fto.unshift({
name: "FTO投入完成值",
data: [
// s
{ name: 'FTO投入完成值', value: item.ftoInput },
// { name: 'FTO', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack: 'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
})
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
{ name: "BIPV产量完成值", value: item.bipvProductOutput },
// { name: 'BIPV', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},
},)
// }
})
}
})
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
console.log('arr', this.chartMsgTarget.series)
// arr.forEach((ele) => {
@ -994,21 +1000,55 @@ export default {
let chip = []
let std = []
let bipv = []
let targetObj = {}
let obj = {}
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
// console.log("ele", ele.titleValue);
console.log("ele", ele.titleValue);
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
if (ele.titleValue.search('完成') == -1) {
console.log(ele);
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
if (ele.titleValue.search('完成') == -1) {
targetObj.ftoInput = item.ftoInput
targetObj.chipYield = item.chipYield
targetObj.componentYield = item.componentYield
targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
console.log("fto", ele.titleValue, fto);
} else {
obj.ftoInput = item.ftoInput
obj.chipYield = item.chipYield
obj.componentYield = item.componentYield
obj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
// if (ele.titleValue.search('') != -1) {
// } else {
}
})
})
fto.push({
name: "FTO投入完成值",
data: [
// s
{ name: 'FTO投入完成值', value: obj.ftoInput, titleValue: obj.ftoInput },
// { name: 'FTO', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack: 'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
}, {
name: "FTO投入目标值",
data: [
// s
{ name: 'FTO投入目标', value: item.ftoInput },
{ name: 'FTO投入目标', value: (targetObj.ftoInput - obj.ftoInput) > 0 ? (targetObj.ftoInput - obj.ftoInput) : null, titleValue: targetObj.ftoInput },
// { name: 'FTO', value: 11 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
@ -1024,13 +1064,34 @@ export default {
return params.value
},
},
},)
})
chip.push({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: obj.chipYield, titleValue: obj.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
}, {
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
{ name: "芯片产量目标值", value: (targetObj.chipYield - obj.chipYield) > 0 ? (targetObj.chipYield - obj.chipYield) : null, titleValue: targetObj.chipYield },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
@ -1046,12 +1107,31 @@ export default {
return params.value
},
},
},)
})
std.push({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: obj.componentYield, titleValue: obj.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
}, {
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
{ name: "标准组件产量目标值", value: (targetObj.componentYield - obj.componentYield) > 0 ? (targetObj.componentYield - obj.componentYield) : null, titleValue: targetObj.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
@ -1069,11 +1149,31 @@ export default {
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
{ name: "BIPV产量完成值", value: obj.bipvProductOutput, titleValue: obj.bipvProductOutput },
// { name: 'BIPV', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},
}, this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量目标值",
stack: 'c',
data: [
{ name: "BIPV产量目标值", value: item.bipvProductOutput },
{ name: "BIPV产量目标值", value: (targetObj.bipvProductOutput - obj.bipvProductOutput) > 0 ? (targetObj.bipvProductOutput - obj.bipvProductOutput) : null, titleValue: targetObj.bipvProductOutput },
// { name: 'BIPV', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
@ -1089,104 +1189,7 @@ export default {
},
},
},)
// } else {
// }
})
} else {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('') != -1) {
// } else {
fto.unshift({
name: "FTO投入完成值",
data: [
// s
{ name: 'FTO投入完成值', value: item.ftoInput },
// { name: 'FTO', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack: 'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
})
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
{ name: "BIPV产量完成值", value: item.bipvProductOutput },
// { name: 'BIPV', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},
},)
// }
})
}
})
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
} else {
res.data.list.forEach((ele, index) => {
@ -1234,10 +1237,6 @@ export default {
// console.log(this.dataArr)
// console.log(this.tableData);
// this.$nextTick(() => {
console.log(this.chartMsg.series)
this.$refs.dayChart.getMes()
this.$refs.dayTargetChart.getMes()
this.$refs.chartYearTarget.getMes()
this.tableData = this.dataArr
this.showTable = !this.showTable
// })

View File

@ -173,6 +173,14 @@ export default {
{
type: "value",
name: "单位/片",
splitNumber: 4,
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -182,6 +190,12 @@ export default {
{
type: 'value',
// inverse: true,
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 25,//
splitNumber: 4,
name: "单位/%",
nameTextStyle: {
fontSize: 12,
@ -239,7 +253,7 @@ export default {
return Math.ceil(value.max)
},
alignTicks:true,
// splitNumber: 5,
splitNumber: 4,
scale: true,
nameTextStyle: {
fontSize: 12,
@ -251,13 +265,12 @@ export default {
type: 'value',
// inverse: true,
name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max:100,
// scale: true,
interval: 20,//
// splitNumber: 8,
interval: 25,//
splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",