修改bug

This commit is contained in:
‘937886381’ 2024-06-26 15:18:38 +08:00
parent f2cfe94dfc
commit f67e781146
8 changed files with 620 additions and 578 deletions

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:36 * @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-26 09:25:28 * @LastEditTime: 2024-06-26 14:48:49
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -51,7 +51,7 @@ export default {
}, },
}, },
formatter: function (params) { 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>`; 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++) { for (var i = 0, l = params.length; i < l; i++) {
res += 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;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='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 === "综合良率" `<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].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].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW" ? (params[i].data.titleValue ? params[i].data.titleValue : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片" : (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片"
}</span>`; }</span>`;
} }
return res; return res;

View File

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

View File

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

View File

@ -222,9 +222,10 @@ export default {
xData: [], xData: [],
yName: "单位/MW", yName: "单位/MW",
yAxis: { yAxis: {
show: true,
type: "value", type: "value",
name: "单位/MW", name: "单位/MW",
show: true, // splitNumber: 4,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -239,10 +240,10 @@ export default {
color: ["#8EF0AB", "#288AFF"], color: ["#8EF0AB", "#288AFF"],
xData: [], xData: [],
yName: "单位/MW", yName: "单位/MW",
yAxis: yAxis:{
{
type: "value", type: "value",
name: "单位/MW", name: "单位/MW",
// splitNumber: 4,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -257,7 +258,7 @@ export default {
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [-40, -16], position: [-30, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
@ -523,6 +524,10 @@ export default {
}) })
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100 this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.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) { if (this.listQuery.type === 2) {
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
@ -564,98 +569,19 @@ export default {
let arr = [] let arr = []
let chip = [] let chip = []
let std = [] let std = []
let obj = {}
let targetObj = {}
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log(ele.titleValue.search('目标')); console.log(ele.titleValue.search('目标'));
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => { ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) { if (ele.titleValue.search('目标') != -1) {
chip.push({ targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
name: "芯片总功率目标值", targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
// 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
},
},
})
} else { } else {
chip.unshift({ obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
name: "芯片总功率完成值", obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.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
},
},
},)
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[1].data.push()
@ -663,6 +589,88 @@ export default {
// this.chartMsgTarget.series[3].data.push() // this.chartMsgTarget.series[3].data.push()
}) })
}) })
chip.push({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ 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],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
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: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.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
},
},
})
console.log('arr', chip,std) console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std] this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => { // arr.forEach((ele) => {
@ -724,99 +732,19 @@ export default {
let arr = [] let arr = []
let chip = [] let chip = []
let std = [] 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) => { res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标')); console.log(ele.titleValue.search('目标'));
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => { ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) { if (ele.titleValue.search('目标') != -1) {
chip.push({ targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
name: "芯片总功率目标值", targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.componentTotalPower },
// { 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
},
},
})
} else { } else {
chip.unshift({ obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
name: "芯片总功率完成值", obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
// 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[1].data.push()
@ -824,9 +752,90 @@ export default {
// this.chartMsgTarget.series[3].data.push() // this.chartMsgTarget.series[3].data.push()
}) })
}) })
console.log('arr', arr) chip.push({
this.chartMsgTarget.series = [...chip,...std] name: "芯片总功率完成值",
console.log(this.chartMsg.xData) // barGap: '-100%',
stack: 'a',
data: [
{ 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],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
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: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.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
},
},
})
console.log('arr', chip, std)
this.chartMsgTarget.series = [...chip, ...std]
} else { } else {
res.data.list.forEach((ele, index) => { res.data.list.forEach((ele, index) => {
this.chartMsg.xData.push(ele.titleValue) this.chartMsg.xData.push(ele.titleValue)

View File

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

View File

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