projects/mescc/dy #70
@ -289,7 +289,7 @@ function splitCurrentAndPreviousB(factoryListResponse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
|
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
|
||||||
console.log('工厂',targetListResponse);
|
console.log('工厂',preData);
|
||||||
|
|
||||||
// 初始数据
|
// 初始数据
|
||||||
const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
|
const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
|
||||||
@ -343,17 +343,24 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
|
|||||||
// componentYieldRate: 0.73,
|
// componentYieldRate: 0.73,
|
||||||
// },
|
// },
|
||||||
// ];
|
// ];
|
||||||
if (preData && preData[0] != null) {
|
if (preData) {
|
||||||
for (const factory of preData) {
|
for (const factory of preData) {
|
||||||
const fId = getPreFactoryId(factory);
|
const fId = getPreFactoryId(factory)
|
||||||
|
console.log('factory',factory.previousYearOee);
|
||||||
// chipInvest.previous[fId] = factory.previousYearInputNumber;
|
// chipInvest.previous[fId] = factory.previousYearInputNumber;
|
||||||
// chipOeeRate.current[fId] = factory.oee;
|
// chipOeeRate.current[fId] = factory.oee;
|
||||||
chipOeeRate.previous[fId] = factory.previousYearOee;
|
if (factory.previousGlassType === 0) {
|
||||||
|
chipOeeRate.previous[fId] = factory.previousYearOee;
|
||||||
|
}
|
||||||
|
// chipOeeRate.previous[fId] = factory.previousYearOee;
|
||||||
// 转化效率
|
// 转化效率
|
||||||
transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
|
if (factory.previousGlassType === 1) {
|
||||||
|
transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency;
|
||||||
|
}
|
||||||
|
// transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
|
||||||
// 芯片良率 与 标准组件良率
|
// 芯片良率 与 标准组件良率
|
||||||
if (![0, 1].includes(factory.glassType)) continue;
|
if (![0, 1].includes(factory.previousGlassType)) continue;
|
||||||
const _t = [chipRate, stdRate][factory.glassType]
|
const _t = [chipRate, stdRate][factory.previousGlassType]
|
||||||
// _t.current[fId] = factory.yieldRate ;
|
// _t.current[fId] = factory.yieldRate ;
|
||||||
_t.previous[fId] = factory.previousYearYieldRate ;
|
_t.previous[fId] = factory.previousYearYieldRate ;
|
||||||
// }
|
// }
|
||||||
@ -393,6 +400,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
|
|||||||
_t.current[fId] = factory.yieldRate ;
|
_t.current[fId] = factory.yieldRate ;
|
||||||
// _t.previous[fId] = factory.previousYearYieldRate ;
|
// _t.previous[fId] = factory.previousYearYieldRate ;
|
||||||
}
|
}
|
||||||
|
console.log('chipOeeRate',stdRate);
|
||||||
// console.log('chipOeeRate',chipOeeRate);
|
// console.log('chipOeeRate',chipOeeRate);
|
||||||
return {
|
return {
|
||||||
chipOeeRate,
|
chipOeeRate,
|
||||||
|
@ -63,14 +63,22 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
handleExport() {
|
handleExport() {
|
||||||
exportFactoryDataExcel({
|
if (this.period != 1) {
|
||||||
factoryId: this.companyId,
|
exportFactoryDataExcel({
|
||||||
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
factoryId: this.companyId,
|
||||||
compare: this.than === '同比' ? 1 : 2
|
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||||
}).then(response => {
|
compare: this.than === '同比' ? 1 : 2
|
||||||
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
}).then(response => {
|
||||||
// this.exportLoading = false;
|
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
||||||
}).catch(() => { });
|
// this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '为日的情况下没有导出功能',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
toggleFullScreen() {
|
toggleFullScreen() {
|
||||||
this.isFullscreen = !this.isFullscreen;
|
this.isFullscreen = !this.isFullscreen;
|
||||||
|
@ -65,21 +65,26 @@ export default {
|
|||||||
items = [
|
items = [
|
||||||
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '日' && this.than === '环比') {
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '同比') {
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
|
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '环比') {
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `上周`, color: "#12f7f1" },
|
{ label: `上周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '同比') {
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@ -141,14 +146,6 @@ export default {
|
|||||||
// console.log('chipOee', chipOeeRate)
|
// console.log('chipOee', chipOeeRate)
|
||||||
let dataList = null
|
let dataList = null
|
||||||
switch (this.period) {
|
switch (this.period) {
|
||||||
case "日":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = chipOeeRate?.previous;
|
|
||||||
dataList[1] = chipOeeRate?.current;
|
|
||||||
case "周":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = chipOeeRate?.previous;
|
|
||||||
dataList[1] = chipOeeRate?.current;
|
|
||||||
default:
|
default:
|
||||||
dataList = [];
|
dataList = [];
|
||||||
dataList[0] = chipOeeRate?.previous;
|
dataList[0] = chipOeeRate?.previous;
|
||||||
@ -191,6 +188,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '日' && than === '环比') {
|
} else if (period === '日' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@ -203,6 +205,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '同比') {
|
} else if (period === '周' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@ -215,6 +222,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '环比') {
|
} else if (period === '周' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@ -227,6 +239,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '同比') {
|
} else if (period === '月' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
|
@ -65,21 +65,26 @@ export default {
|
|||||||
items = [
|
items = [
|
||||||
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
{ label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
|
|
||||||
];
|
];
|
||||||
} else if (this.period === '日' && this.than === '环比') {
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
{ label: `${dayBeYes}日`, color: "#12f7f1" },
|
||||||
{ label: `${yesterday}日`, color: "#58adfa" },
|
{ label: `${yesterday}日`, color: "#58adfa" },
|
||||||
|
{ label: `${yesterday}日目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '同比') {
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
{ label: `${year-1}年本周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '环比') {
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `上周`, color: "#12f7f1" },
|
{ label: `上周`, color: "#12f7f1" },
|
||||||
{ label: `本周`, color: "#58adfa" },
|
{ label: `本周`, color: "#58adfa" },
|
||||||
|
{ label: `本周目标`, color: "#58adfa" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '同比') {
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@ -112,17 +117,9 @@ export default {
|
|||||||
series() {
|
series() {
|
||||||
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
|
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
|
||||||
const transformRate = this.transformRate
|
const transformRate = this.transformRate
|
||||||
// console.log('chipOee', chipOeeRate)
|
console.log('chipOee', transformRate)
|
||||||
let dataList = null;
|
let dataList = null;
|
||||||
switch (this.period) {
|
switch (this.period) {
|
||||||
case "日":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = transformRate.previous;
|
|
||||||
dataList[1] = transformRate.current;
|
|
||||||
case "周":
|
|
||||||
dataList = [];
|
|
||||||
dataList[0] = transformRate.previous;
|
|
||||||
dataList[1] = transformRate.current;
|
|
||||||
default:
|
default:
|
||||||
dataList = [];
|
dataList = [];
|
||||||
dataList[0] = transformRate.previous;
|
dataList[0] = transformRate.previous;
|
||||||
@ -182,6 +179,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '日' && than === '环比') {
|
} else if (period === '日' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@ -194,6 +196,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `${yesterday}日目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '同比') {
|
} else if (period === '周' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
@ -206,6 +213,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '环比') {
|
} else if (period === '周' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
@ -218,6 +230,11 @@ function getTemplate(period, dataList,than) {
|
|||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: `本周目标`,
|
||||||
|
data: dataList ? dataList[2] : [],
|
||||||
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '同比') {
|
} else if (period === '月' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
|
@ -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 = [
|
||||||
@ -147,12 +151,13 @@ export default {
|
|||||||
月: `${month}月良率`,
|
月: `${month}月良率`,
|
||||||
年: `${year}良率`,
|
年: `${year}良率`,
|
||||||
}[this.period];
|
}[this.period];
|
||||||
console.log(vt[1]);
|
console.log(vt[0]);
|
||||||
const t = getOptions({
|
const t = getOptions({
|
||||||
// single,
|
// single,
|
||||||
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
||||||
titleValue,
|
titleValue,
|
||||||
subtitle,
|
subtitle,
|
||||||
|
yesterday,
|
||||||
currentName: items[0].label,
|
currentName: items[0].label,
|
||||||
preName: items[1].label,
|
preName: items[1].label,
|
||||||
previousSum: vt[0],
|
previousSum: vt[0],
|
||||||
@ -182,22 +187,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 = [
|
||||||
|
@ -47,12 +47,12 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
dataRate() {
|
dataRate() {
|
||||||
// if (this.current != 0 && this.target != 0) {
|
// if (this.current != 0 && this.target != 0) {
|
||||||
console.log( '1111111111', this.current, this.target);
|
console.log( '1111111111', this.current, this.target,this.previous);
|
||||||
return this.current == 0 && this.target == 0
|
return this.current == 0 && this.target == 0
|
||||||
? 0
|
? 0
|
||||||
: this.current != 0 && this.target != 0
|
: this.current != 0 && this.target != 0
|
||||||
? `${((this.current / this.target) * 100).toFixed(2)}%`
|
? `${((this.current / this.target) * 100).toFixed(2)}%`
|
||||||
: this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : this.previous >=100 ? 100 + '%' : this.previous + '%';
|
: this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : 0 + '%'
|
||||||
// } else if(this.previous != 0) {
|
// } else if(this.previous != 0) {
|
||||||
// return this.previous + '%'
|
// return this.previous + '%'
|
||||||
// }
|
// }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 10:25:10
|
* @Date: 2024-05-07 10:25:10
|
||||||
* @LastEditTime: 2024-06-14 09:58:01
|
* @LastEditTime: 2024-06-27 09:13:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -11,21 +11,21 @@
|
|||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="period == '周'" class="std-rate-item">
|
<div v-else-if="period == '周'" class="std-rate-item">
|
||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="period == '月'" class="std-rate-item">
|
<div v-else-if="period == '月'" class="std-rate-item">
|
||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<CityName :value="city.name" />
|
<CityName :value="city.name" />
|
||||||
<div class="std-rate-item__value">
|
<div class="std-rate-item__value">
|
||||||
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
|
||||||
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
<preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
|
||||||
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -42,10 +42,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import CityName from "./CityName.vue";
|
import CityName from "./CityName.vue";
|
||||||
import ProgressBar from "./ProgressBar.vue";
|
import ProgressBar from "./ProgressBar.vue";
|
||||||
|
import preProgressBar from "./preProgressBar.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StdRateItem",
|
name: "StdRateItem",
|
||||||
components: { CityName, ProgressBar },
|
components: { CityName, ProgressBar, preProgressBar },
|
||||||
props: {
|
props: {
|
||||||
city: {
|
city: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -0,0 +1,130 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-06-27 09:12:54
|
||||||
|
* @LastEditTime: 2024-06-27 09:14:21
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="progress-bar" :data-title="title" :data-rate="previous + '%'">
|
||||||
|
<div class="progress-bar__rate" :style="{ width: dataRate == '-' ? 0 : dataRate }"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "ProgressBar",
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
previous: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
current: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
// total: {
|
||||||
|
// type: Number,
|
||||||
|
// default: 0,
|
||||||
|
// },
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dataRate() {
|
||||||
|
// if (this.current != 0 && this.target != 0) {
|
||||||
|
// console.log( '1111111111', this.current, this.target,this.previous);
|
||||||
|
return this.previous >=100 ? 100 + '%' : this.previous + '%';
|
||||||
|
// } else if(this.previous != 0) {
|
||||||
|
// return this.previous + '%'
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.progress-bar {
|
||||||
|
height: 10px;
|
||||||
|
background-color: #002f6b;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: attr(data-title);
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -200%;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: attr(data-rate);
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -200%;
|
||||||
|
right: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
&:after {
|
||||||
|
color: #11eae3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
&:after {
|
||||||
|
color: #0e65fd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar__rate {
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: linear-gradient(to right,
|
||||||
|
#004c5e11 10%,
|
||||||
|
#004c5e,
|
||||||
|
#0ac0c0,
|
||||||
|
#11eae3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
.progress-bar__rate {
|
||||||
|
background: linear-gradient(to right,
|
||||||
|
#004c5e11 10%,
|
||||||
|
#004c5e,
|
||||||
|
#0ac0c0,
|
||||||
|
#11eae3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
.progress-bar__rate {
|
||||||
|
background: linear-gradient(to right, #0048a811, #0048a8, #0e65fd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -6,6 +6,7 @@ export default ({
|
|||||||
targetSum,
|
targetSum,
|
||||||
currentName,
|
currentName,
|
||||||
preName,
|
preName,
|
||||||
|
yesterday,
|
||||||
}) => ({
|
}) => ({
|
||||||
grid: {
|
grid: {
|
||||||
left: 300,
|
left: 300,
|
||||||
@ -25,7 +26,7 @@ export default ({
|
|||||||
fontSize: 26,
|
fontSize: 26,
|
||||||
color: "#fffd",
|
color: "#fffd",
|
||||||
},
|
},
|
||||||
subtext: `\u2002${subtitle}\u2002`,
|
subtext: `\u2002${yesterday + '日良率'}\u2002`,
|
||||||
subtextStyle: {
|
subtextStyle: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 100,
|
fontWeight: 100,
|
||||||
@ -109,6 +110,9 @@ export default ({
|
|||||||
{
|
{
|
||||||
value: previousSum,
|
value: previousSum,
|
||||||
name: preName,
|
name: preName,
|
||||||
|
tooltip: {
|
||||||
|
formatter: `${preName} : ${previousSum}`
|
||||||
|
},
|
||||||
selected: false,
|
selected: false,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderJoin: "round",
|
borderJoin: "round",
|
||||||
@ -129,10 +133,11 @@ export default ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:previousSum == 0
|
value:previousSum === 0 ? 1 : 0,
|
||||||
? 1
|
name: preName,
|
||||||
: 0,
|
tooltip: {
|
||||||
name: "-",
|
formatter: `${preName} : ${previousSum}`
|
||||||
|
},
|
||||||
itemStyle: { color: "transparent" },
|
itemStyle: { color: "transparent" },
|
||||||
label: { show: false },
|
label: { show: false },
|
||||||
},
|
},
|
||||||
|
@ -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,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-06-24 14:38:17
|
* @LastEditTime: 2024-06-26 11:00:11
|
||||||
* @LastEditors: DY
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -210,7 +210,7 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'factory',
|
prop: 'factory',
|
||||||
label: '工厂名称',
|
label: '工厂名称',
|
||||||
filter: (val) => factoryList[val],
|
filter: (val) => [val],
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-19 15:28:34
|
* @Date: 2024-06-19 15:28:34
|
||||||
* @LastEditTime: 2024-06-24 08:46:34
|
* @LastEditTime: 2024-06-27 10:40:57
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 暂无数据 -->
|
<!-- 暂无数据 -->
|
||||||
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
||||||
v-show="this.chartMsg.series.length === 0"></div>
|
v-show="this.chartMsg.series[0].data.length === 0"></div>
|
||||||
<!-- 图例 -->
|
<!-- 图例 -->
|
||||||
<div v-show="this.chartMsg.series.length > 0">
|
<div v-show="this.chartMsg.series[0].data.length > 0 ">
|
||||||
<div class="legendData" v-if="show">
|
<div class="legendData" v-if="show">
|
||||||
<span class="itemData" v-for="item in legendList" :key="item.id">
|
<span class="itemData" v-for="item in legendList" :key="item.id">
|
||||||
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
||||||
@ -63,7 +63,7 @@ export default {
|
|||||||
: params[i].seriesName === "转化效率"
|
: params[i].seriesName === "转化效率"
|
||||||
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
|
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
|
||||||
: params[i].seriesName.search('总功率') != -1
|
: params[i].seriesName.search('总功率') != -1
|
||||||
? (params[i].value ? params[i] : 0) + "MW"
|
? (params[i].value ? params[i].value : 0) + "MW"
|
||||||
: (params[i].value ? params[i].value : 0) + "片"
|
: (params[i].value ? params[i].value : 0) + "片"
|
||||||
}</span>`;
|
}</span>`;
|
||||||
}
|
}
|
||||||
@ -83,15 +83,36 @@ export default {
|
|||||||
dataZoom: [//滚动条
|
dataZoom: [//滚动条
|
||||||
{
|
{
|
||||||
// 设置滚动条的隐藏与显示
|
// 设置滚动条的隐藏与显示
|
||||||
show: false,
|
show: true,
|
||||||
// 设置滚动条类型
|
// 设置滚动条类型
|
||||||
type: "slider",
|
type: "slider",
|
||||||
// 设置背景颜色
|
// 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
backgroundColor: "#F7F7F7",
|
||||||
|
// handleStyle: {
|
||||||
|
// color: '#D6D6D6'
|
||||||
|
// },
|
||||||
|
handleStyle: {
|
||||||
|
borderColor: '#EBEBEB',
|
||||||
|
color: '#EBEBEB'
|
||||||
|
},
|
||||||
|
moveHandleStyle: {
|
||||||
|
borderColor: '#EBEBEB',
|
||||||
|
color: '#EBEBEB'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
handleStyle: {
|
||||||
|
borderColor: '#D6D6D6',
|
||||||
|
color: '#D6D6D6'
|
||||||
|
},
|
||||||
|
moveHandleStyle: {
|
||||||
|
borderColor: '#D6D6D6',
|
||||||
|
color: '#D6D6D6'
|
||||||
|
}
|
||||||
|
},
|
||||||
// 设置选中范围的填充颜色
|
// 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
fillerColor: "#F7F7F7",
|
||||||
// 设置边框颜色
|
// 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
borderColor: "#F7F7F7",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// 数据窗口范围的起始数值
|
||||||
@ -102,9 +123,9 @@ export default {
|
|||||||
// 即不会影响其他轴的数据范围
|
// 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
width: "100%",
|
||||||
// 设置滚动条高度
|
// 设置滚动条高度
|
||||||
height: 8,
|
height: 3,
|
||||||
// 设置滚动条显示位置
|
// 设置滚动条显示位置
|
||||||
left: "center",
|
left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
@ -112,7 +133,7 @@ export default {
|
|||||||
// 控制手柄的尺寸
|
// 控制手柄的尺寸
|
||||||
handleSize: 0,
|
handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
bottom: 14,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// 没有下面这块的话,只能拖动滚动条,
|
||||||
@ -124,7 +145,6 @@ export default {
|
|||||||
moveOnMouseMove: true,
|
moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
moveOnMouseWheel: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
@ -190,6 +210,7 @@ export default {
|
|||||||
}, 500)();
|
}, 500)();
|
||||||
},
|
},
|
||||||
getMes() {
|
getMes() {
|
||||||
|
console.log('222222', this.chartMsg.series);
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.dispose();
|
this.myChart.dispose();
|
||||||
}
|
}
|
||||||
|
@ -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-24 08:46:42
|
* @LastEditTime: 2024-06-27 09:51:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -36,9 +36,9 @@ export default {
|
|||||||
color: [],
|
color: [],
|
||||||
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
||||||
grid: {
|
grid: {
|
||||||
left: -30,
|
left: 20,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 30,
|
bottom: 31,
|
||||||
top: 30,
|
top: 30,
|
||||||
containLabel:true,
|
containLabel:true,
|
||||||
},
|
},
|
||||||
@ -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] : 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;
|
||||||
@ -80,52 +80,52 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: false,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "rgb(19, 63, 100)",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "rgb(16, 171, 198)",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "rgb(19, 63, 100)",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "50%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
|
||||||
],
|
// ],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
@ -136,6 +136,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 300,
|
default: 300,
|
||||||
},
|
},
|
||||||
|
gridLeft: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 2,
|
default: 2,
|
||||||
@ -166,7 +170,12 @@ export default {
|
|||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
this.chartHeight = newVal;
|
this.chartHeight = newVal;
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// gridLeft(val) {
|
||||||
|
// console.log(val)
|
||||||
|
|
||||||
|
// },
|
||||||
type() {
|
type() {
|
||||||
this.canvasReset();
|
this.canvasReset();
|
||||||
},
|
},
|
||||||
@ -190,13 +199,20 @@ export default {
|
|||||||
}, 500)();
|
}, 500)();
|
||||||
},
|
},
|
||||||
getMes() {
|
getMes() {
|
||||||
|
console.log(this.gridLeft)
|
||||||
|
if (this.gridLeft === false) {
|
||||||
|
this.option.grid.left = 20
|
||||||
|
} else {
|
||||||
|
this.option.grid.left = -80
|
||||||
|
}
|
||||||
|
// console.log('222222', this.chartMsg);
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.dispose();
|
this.myChart.dispose();
|
||||||
}
|
}
|
||||||
var chartDom = document.getElementById(this.chartId);
|
var chartDom = document.getElementById(this.chartId);
|
||||||
this.myChart = echarts.init(chartDom);
|
this.myChart = echarts.init(chartDom);
|
||||||
this.option.color = this.chartMsg.color;
|
this.option.color = this.chartMsg.color;
|
||||||
this.option.xAxis.data = this.chartMsg.xData;
|
this.option.xAxis.data = this.chartMsg.xData
|
||||||
// this.option.yAxis.name = this.chartMsg.yName;
|
// this.option.yAxis.name = this.chartMsg.yName;
|
||||||
|
|
||||||
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
|
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-20 16:13:52
|
* @Date: 2024-06-20 16:13:52
|
||||||
* @LastEditTime: 2024-06-24 08:46:46
|
* @LastEditTime: 2024-06-27 09:55:02
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 暂无数据 -->
|
<!-- 暂无数据 -->
|
||||||
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
||||||
v-show="this.chartMsg.series.length === 0"></div>
|
v-show="this.chartMsg.series[0].data.length === 0"></div>
|
||||||
<!-- 图例 -->
|
<!-- 图例 -->
|
||||||
<div v-show="this.chartMsg.series.length > 0">
|
<div v-show="this.chartMsg.series[0].data.length > 0">
|
||||||
<div class="legendData" v-if="show">
|
<div class="legendData" v-if="show">
|
||||||
<span class="itemData" v-for="item in legendList" :key="item.id">
|
<span class="itemData" v-for="item in legendList" :key="item.id">
|
||||||
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
||||||
@ -36,7 +36,7 @@ export default {
|
|||||||
color: [],
|
color: [],
|
||||||
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
||||||
grid: {
|
grid: {
|
||||||
left: 30,
|
left: 60,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
top: 30,
|
top: 30,
|
||||||
@ -80,52 +80,52 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: false,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "rgb(19, 63, 100)",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "rgb(16, 171, 198)",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "rgb(19, 63, 100)",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "50%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
|
||||||
],
|
// ],
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
|
@ -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-24 08:46:49
|
* @LastEditTime: 2024-06-27 10:59:40
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 暂无数据 -->
|
<!-- 暂无数据 -->
|
||||||
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
|
||||||
v-show="this.chartMsg.series.length === 0"></div>
|
v-show="this.chartMsg.series[0].data.length === 0"></div>
|
||||||
<!-- 图例 -->
|
<!-- 图例 -->
|
||||||
<div v-show="this.chartMsg.series.length > 0">
|
<div v-show="this.chartMsg.series[0].data.length > 0">
|
||||||
<div class="legendData" v-if="show">
|
<div class="legendData" v-if="show">
|
||||||
<span class="itemData" v-for="item in legendList" :key="item.id">
|
<span class="itemData" v-for="item in legendList" :key="item.id">
|
||||||
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
|
||||||
@ -36,7 +36,7 @@ export default {
|
|||||||
color: [],
|
color: [],
|
||||||
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
|
||||||
grid: {
|
grid: {
|
||||||
left: -30,
|
left: 60,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
top: 30,
|
top: 30,
|
||||||
@ -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++) {
|
||||||
@ -66,7 +66,7 @@ export default {
|
|||||||
: params[0].name === "转化效率"
|
: params[0].name === "转化效率"
|
||||||
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
|
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
|
||||||
: params[i].seriesName.search('总功率') != -1
|
: params[i].seriesName.search('总功率') != -1
|
||||||
? (params[i].value ? params[i] : 0) + "MW"
|
? (params[i].value ? params[i].value : 0) + "MW"
|
||||||
: (params[i].value ? params[i].value : 0) + "片"
|
: (params[i].value ? params[i].value : 0) + "片"
|
||||||
}</span>`;
|
}</span>`;
|
||||||
// }
|
// }
|
||||||
@ -81,7 +81,7 @@ export default {
|
|||||||
: params[1].name === "转化效率"
|
: params[1].name === "转化效率"
|
||||||
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
|
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
|
||||||
: params[i].seriesName.search('总功率') != -1
|
: params[i].seriesName.search('总功率') != -1
|
||||||
? (params[i].value ? params[i] : 0) + "MW"
|
? (params[i].value ? params[i].value : 0) + "MW"
|
||||||
: (params[i].value ? params[i].value : 0) + "片"
|
: (params[i].value ? params[i].value : 0) + "片"
|
||||||
}</span>`;
|
}</span>`;
|
||||||
}
|
}
|
||||||
@ -98,52 +98,51 @@ export default {
|
|||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataZoom: [//滚动条
|
// dataZoom: [//滚动条
|
||||||
{
|
// {
|
||||||
// 设置滚动条的隐藏与显示
|
// // 设置滚动条的隐藏与显示
|
||||||
show: false,
|
// show: true,
|
||||||
// 设置滚动条类型
|
// // 设置滚动条类型
|
||||||
type: "slider",
|
// type: "slider",
|
||||||
// 设置背景颜色
|
// // 设置背景颜色
|
||||||
backgroundColor: "rgb(19, 63, 100)",
|
// backgroundColor: "#F7F7F7",
|
||||||
// 设置选中范围的填充颜色
|
// // 设置选中范围的填充颜色
|
||||||
fillerColor: "rgb(16, 171, 198)",
|
// fillerColor: "#EBEBEB",
|
||||||
// 设置边框颜色
|
// // 设置边框颜色
|
||||||
borderColor: "rgb(19, 63, 100)",
|
// borderColor: "#F7F7F7",
|
||||||
// 是否显示detail,即拖拽时候显示详细数值信息
|
// // 是否显示detail,即拖拽时候显示详细数值信息
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
// 数据窗口范围的起始数值
|
// // 数据窗口范围的起始数值
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
// 数据窗口范围的结束数值(一页显示多少条数据)
|
// // 数据窗口范围的结束数值(一页显示多少条数据)
|
||||||
endValue: 5,
|
// endValue: 5,
|
||||||
// empty:当前数据窗口外的数据,被设置为空。
|
// // empty:当前数据窗口外的数据,被设置为空。
|
||||||
// 即不会影响其他轴的数据范围
|
// // 即不会影响其他轴的数据范围
|
||||||
filterMode: "empty",
|
// filterMode: "empty",
|
||||||
// 设置滚动条宽度,相对于盒子宽度
|
// // 设置滚动条宽度,相对于盒子宽度
|
||||||
width: "50%",
|
// width: "100%",
|
||||||
// 设置滚动条高度
|
// // 设置滚动条高度
|
||||||
height: 8,
|
// height: 8,
|
||||||
// 设置滚动条显示位置
|
// // 设置滚动条显示位置
|
||||||
left: "center",
|
// left: "center",
|
||||||
// 是否锁定选择区域(或叫做数据窗口)的大小
|
// // 是否锁定选择区域(或叫做数据窗口)的大小
|
||||||
zoomLoxk: true,
|
// zoomLoxk: true,
|
||||||
// 控制手柄的尺寸
|
// // 控制手柄的尺寸
|
||||||
handleSize: 0,
|
// handleSize: 0,
|
||||||
// dataZoom-slider组件离容器下侧的距离
|
// // dataZoom-slider组件离容器下侧的距离
|
||||||
bottom: 3,
|
// bottom: 3,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// 没有下面这块的话,只能拖动滚动条,
|
// // 没有下面这块的话,只能拖动滚动条,
|
||||||
// 鼠标滚轮在区域内不能控制外部滚动条
|
// // 鼠标滚轮在区域内不能控制外部滚动条
|
||||||
type: "inside",
|
// type: "inside",
|
||||||
// 滚轮是否触发缩放
|
// // 滚轮是否触发缩放
|
||||||
zoomOnMouseWheel: false,
|
// zoomOnMouseWheel: false,
|
||||||
// 鼠标滚轮触发滚动
|
// // 鼠标滚轮触发滚动
|
||||||
moveOnMouseMove: true,
|
// moveOnMouseMove: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
},
|
// },
|
||||||
|
// ],
|
||||||
],
|
|
||||||
yAxis:undefined,
|
yAxis:undefined,
|
||||||
series: [],
|
series: [],
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-06-24 09:39:27
|
* @LastEditTime: 2024-06-25 08:39:48
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -155,6 +155,11 @@ export default {
|
|||||||
// all: {}
|
// all: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
currentMenu() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
weekNum() {
|
weekNum() {
|
||||||
return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
|
return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
|
||||||
@ -314,9 +319,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
|
if (!this.listQuery.startDate && !this.listQuery.endDate) {
|
||||||
|
return this.$message('请选择起止时间')
|
||||||
|
}
|
||||||
this.otherProps = []
|
this.otherProps = []
|
||||||
let arr = []
|
let arr = []
|
||||||
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
|
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
||||||
this.listQuery.factory = arr
|
this.listQuery.factory = arr
|
||||||
const res = await getComprehensiveDataPage(this.listQuery)
|
const res = await getComprehensiveDataPage(this.listQuery)
|
||||||
// this.tableData = res.data.list
|
// this.tableData = res.data.list
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
|
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
|
||||||
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="containerBottom">
|
<!-- <div class="containerBottom">
|
||||||
@ -174,7 +174,15 @@ export default {
|
|||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
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,
|
||||||
@ -204,7 +218,7 @@ export default {
|
|||||||
position: [-18, -16],
|
position: [-18, -16],
|
||||||
color: "#68C483",
|
color: "#68C483",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value + "MW";
|
return params.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -219,7 +233,7 @@ export default {
|
|||||||
position: [-18, -16],
|
position: [-18, -16],
|
||||||
color: "#68C483",
|
color: "#68C483",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value + "%";
|
return params.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
yAxisIndex: 1
|
yAxisIndex: 1
|
||||||
@ -233,7 +247,16 @@ export default {
|
|||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
|
// return 0
|
||||||
|
// },
|
||||||
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
|
// return Math.ceil(value.max)
|
||||||
|
// },
|
||||||
|
alignTicks: true,
|
||||||
|
// splitNumber: 5,
|
||||||
|
// scale: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@ -241,8 +264,16 @@ export default {
|
|||||||
axisLabel: {},
|
axisLabel: {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "value",
|
type: 'value',
|
||||||
|
// inverse: true,
|
||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
|
scale: true,
|
||||||
|
alignTicks: true,
|
||||||
|
// min: 0,
|
||||||
|
// max: 100,
|
||||||
|
// scale: true,
|
||||||
|
// interval: 25,//间隔
|
||||||
|
// splitNumber: 5,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@ -259,10 +290,10 @@ export default {
|
|||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: [-18, -16],
|
position: [-50, -16],
|
||||||
color: "#68C483",
|
color: "#68C483",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value.toFixed(2) + "MW";
|
return params.value.toFixed(2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -274,10 +305,10 @@ export default {
|
|||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: [0, -16],
|
position: [10, -16],
|
||||||
color: "#288AFF",
|
color: "#288AFF",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value.toFixed(2) + "MW";
|
return params.value.toFixed(2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -294,7 +325,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
color: "#FFAE17",
|
color: "#FFAE17",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value.toFixed(2) + "%";
|
return params.value.toFixed(2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -313,13 +344,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
tableProps() {
|
tableProps() {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
prop: "factory",
|
|
||||||
label: "工厂名称",
|
|
||||||
// filter: (val) => factoryList[val],
|
|
||||||
minWidth: 200,
|
|
||||||
showOverflowtooltip: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: "item",
|
prop: "item",
|
||||||
label: "科目",
|
label: "科目",
|
||||||
@ -345,6 +369,9 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 监听左侧菜单栏是否展开
|
// 监听左侧菜单栏是否展开
|
||||||
|
currentMenu() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
isOpen(val) {
|
isOpen(val) {
|
||||||
if (this.$route.name === "produceConversion") {
|
if (this.$route.name === "produceConversion") {
|
||||||
this.chartNum++;
|
this.chartNum++;
|
||||||
@ -494,7 +521,10 @@ export default {
|
|||||||
this.chartMsg.series[2].data = []
|
this.chartMsg.series[2].data = []
|
||||||
this.chartMsgYearTarget.series[0].data = []
|
this.chartMsgYearTarget.series[0].data = []
|
||||||
this.chartMsgYearTarget.series[1].data = []
|
this.chartMsgYearTarget.series[1].data = []
|
||||||
|
this.title = ''
|
||||||
|
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
|
||||||
|
return this.$message('请选择起止时间')
|
||||||
|
}
|
||||||
console.log(this.listQuery);
|
console.log(this.listQuery);
|
||||||
if (this.listQuery.type == 3) {
|
if (this.listQuery.type == 3) {
|
||||||
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||||
@ -560,9 +590,6 @@ export default {
|
|||||||
dataArr[0]['' + m + ''] = item.chipTotalPowers
|
dataArr[0]['' + m + ''] = item.chipTotalPowers
|
||||||
dataArr[1]['' + m + ''] = item.scTotalPowers
|
dataArr[1]['' + m + ''] = item.scTotalPowers
|
||||||
dataArr[2]['' + m + ''] = item.conversionEfficiency
|
dataArr[2]['' + m + ''] = item.conversionEfficiency
|
||||||
dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
|
||||||
|
|
||||||
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
|
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
|
||||||
// })
|
// })
|
||||||
@ -573,7 +600,7 @@ export default {
|
|||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.title = res.data[0].yearTarget.targetTime + '目标值'
|
this.title = res.data[0].yearTarget.targetTime ? 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,
|
||||||
@ -618,7 +645,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: dataArr[0]['item'],
|
name: dataArr[0]['item'],
|
||||||
value: dataArr[0][i]
|
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -627,7 +654,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[1][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -636,7 +663,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[2][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" :chartId="'chartTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartTarget'" :chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="margin-top: 30px">
|
<el-col :span="6" style="margin-top: 30px">
|
||||||
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
|
||||||
:chartMsg="chartMsgTarget" :chartId="'chartDayTarget'" :chartNum="chartNum" />
|
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartDayTarget'" :chartNum="chartNum" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="6">
|
<!-- <el-col :span="6">
|
||||||
<div class="blueTip">
|
<div class="blueTip">
|
||||||
@ -103,8 +103,8 @@
|
|||||||
:chartId="chartId" :chartNum="chartNum" />
|
:chartId="chartId" :chartNum="chartNum" />
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
|
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size"
|
||||||
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
:table-data="tableData" :max-height="tableH" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="containerBottom">
|
<!-- <div class="containerBottom">
|
||||||
|
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
currentMenu: '邯郸',
|
currentMenu: '邯郸',
|
||||||
end: undefined,
|
end: undefined,
|
||||||
title: '',
|
title: '',
|
||||||
|
gridLeft:true,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 999,
|
pageSize: 999,
|
||||||
@ -222,9 +223,10 @@ export default {
|
|||||||
xData: [],
|
xData: [],
|
||||||
yName: "单位/MW",
|
yName: "单位/MW",
|
||||||
yAxis: {
|
yAxis: {
|
||||||
|
show: true,
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/MW",
|
name: "单位/MW",
|
||||||
show: false,
|
// splitNumber: 4,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@ -239,10 +241,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",
|
||||||
@ -252,13 +254,12 @@ export default {
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "芯片总功率",
|
name: "芯片总功率",
|
||||||
data: [
|
data: [],
|
||||||
],
|
|
||||||
type: "bar",
|
type: "bar",
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: [10, -16],
|
position: [-30, -16],
|
||||||
color: "#68C483",
|
color: "#68C483",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value
|
return params.value
|
||||||
@ -310,13 +311,6 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps() {
|
tableProps() {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
prop: "factory",
|
|
||||||
label: "工厂名称",
|
|
||||||
// filter: (val) => factoryList[val],
|
|
||||||
minWidth: 200,
|
|
||||||
showOverflowtooltip: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: "item",
|
prop: "item",
|
||||||
label: "科目",
|
label: "科目",
|
||||||
@ -342,6 +336,9 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 监听左侧菜单栏是否展开
|
// 监听左侧菜单栏是否展开
|
||||||
|
currentMenu() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
isOpen(val) {
|
isOpen(val) {
|
||||||
if (this.$route.name === "productionSituationMW") {
|
if (this.$route.name === "productionSituationMW") {
|
||||||
this.chartNum++;
|
this.chartNum++;
|
||||||
@ -494,36 +491,66 @@ export default {
|
|||||||
this.chartMsgYearTarget.series[0].data = []
|
this.chartMsgYearTarget.series[0].data = []
|
||||||
this.chartMsgYearTarget.series[1].data = []
|
this.chartMsgYearTarget.series[1].data = []
|
||||||
console.log(this.listQuery);
|
console.log(this.listQuery);
|
||||||
|
if (!this.listQuery.startDate && !this.listQuery.endDate) {
|
||||||
|
return this.$message('请选择起止时间')
|
||||||
|
}
|
||||||
let arr = []
|
let arr = []
|
||||||
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
||||||
this.listQuery.factory = arr
|
this.listQuery.factory = arr
|
||||||
const res = await getProductionSituationMWData(this.listQuery)
|
const res = await getProductionSituationMWData(this.listQuery)
|
||||||
if (this.listQuery.type === 2) {
|
let maxData = []
|
||||||
console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
|
res.data.list.forEach((ele, index) => {
|
||||||
res.data.list.forEach((ele, index) => {
|
let i = index + 1
|
||||||
let i = index + 1
|
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
||||||
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
this.otherProps.push({
|
||||||
this.otherProps.push({
|
label: ele.titleValue,
|
||||||
label: ele.titleValue,
|
prop: 'value' + i
|
||||||
prop: 'value' + i
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
res.data.list.forEach((ele, index) => {
|
||||||
|
let i = index + 1
|
||||||
|
let m = 'value' + i
|
||||||
|
ele.productionSituationPowerDataVOList.forEach((item) => {
|
||||||
|
maxData.push(item.chipTotalPower, item.componentTotalPower)
|
||||||
|
this.dataArr[0]['' + m + ''] = item.chipTotalPower
|
||||||
|
// this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
||||||
|
this.dataArr[1]['' + m + ''] = item.componentTotalPower
|
||||||
|
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
|
||||||
|
})
|
||||||
|
// ele.titleValue
|
||||||
|
// .push({
|
||||||
|
// label: ele.titleValue,
|
||||||
|
// props: 'value' + index + 1,
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
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) {
|
||||||
|
if (res.data.list.length === 3) {
|
||||||
|
this.gridLeft = false
|
||||||
|
} else {
|
||||||
|
this.gridLeft = true
|
||||||
|
}
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
|
||||||
// let i = index + 1
|
// let i = index + 1
|
||||||
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
|
||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
ele.productionSituationPowerDataVOList.forEach((item) => {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.chipTotalPower
|
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
|
||||||
})
|
})
|
||||||
this.chartMsg.series[1].data.push({
|
this.chartMsg.series[1].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.componentTotalPower
|
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue.replace(/[^\d]/g, " "))
|
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue)
|
||||||
// this.chartMsgTarget.series = [{
|
// this.chartMsgTarget.series = [{
|
||||||
// name: "FTO投入",
|
// name: "FTO投入",
|
||||||
// data: [
|
// data: [
|
||||||
@ -547,98 +574,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.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.componentYield },
|
|
||||||
// { 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.componentYield },
|
|
||||||
// { 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()
|
||||||
@ -646,7 +594,89 @@ export default {
|
|||||||
// this.chartMsgTarget.series[3].data.push()
|
// this.chartMsgTarget.series[3].data.push()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log('arr', arr)
|
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)
|
||||||
this.chartMsgTarget.series = [...chip, ...std]
|
this.chartMsgTarget.series = [...chip, ...std]
|
||||||
// arr.forEach((ele) => {
|
// arr.forEach((ele) => {
|
||||||
|
|
||||||
@ -658,55 +688,33 @@ export default {
|
|||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
ele.productionSituationPowerDataVOList.forEach((item) => {
|
||||||
this.chartMsgYearTarget.series[0].data.push({
|
this.chartMsgYearTarget.series[0].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.chipTotalPower
|
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
|
||||||
})
|
})
|
||||||
this.chartMsgYearTarget.series[1].data.push({
|
this.chartMsgYearTarget.series[1].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.componentTotalPower
|
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// })
|
// })
|
||||||
console.log(this.chartMsg.xData)
|
|
||||||
res.data.list.forEach((ele, index) => {
|
|
||||||
let i = index + 1
|
|
||||||
let m = 'value' + i
|
|
||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
|
||||||
this.dataArr[0]['' + m + ''] = item.chipTotalPower
|
|
||||||
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
// this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
this.dataArr[1]['' + m + ''] = item.componentTotalPower
|
|
||||||
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
|
|
||||||
})
|
|
||||||
// ele.titleValue
|
|
||||||
// .push({
|
|
||||||
// label: ele.titleValue,
|
|
||||||
// props: 'value' + index + 1,
|
|
||||||
// })
|
|
||||||
})
|
|
||||||
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
|
||||||
console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
|
if (res.data.list.length === 2) {
|
||||||
res.data.list.forEach((ele, index) => {
|
this.gridLeft = false
|
||||||
let i = index + 1
|
} else {
|
||||||
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
this.gridLeft = true
|
||||||
this.otherProps.push({
|
}
|
||||||
label: ele.titleValue,
|
|
||||||
prop: 'value' + i
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// res.data.list.forEach((ele) => {
|
// res.data.list.forEach((ele) => {
|
||||||
res.data.list.slice(0, res.data.list.length - 1).forEach((ele, index) => {
|
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
|
||||||
// let i = index + 1
|
// let i = index + 1
|
||||||
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
|
||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
ele.productionSituationPowerDataVOList.forEach((item) => {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.chipTotalPower
|
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
|
||||||
})
|
})
|
||||||
this.chartMsg.series[1].data.push({
|
this.chartMsg.series[1].data.push({
|
||||||
name: ele.titleValue,
|
name: ele.titleValue,
|
||||||
value: item.componentTotalPower
|
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -734,98 +742,19 @@ export default {
|
|||||||
let arr = []
|
let arr = []
|
||||||
let chip = []
|
let chip = []
|
||||||
let std = []
|
let std = []
|
||||||
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
|
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('目标'));
|
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.componentYield },
|
|
||||||
// { 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.componentYield },
|
|
||||||
// { 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()
|
||||||
@ -833,57 +762,101 @@ 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%',
|
||||||
res.data.list.forEach((ele, index) => {
|
stack: 'a',
|
||||||
let i = index + 1
|
data: [
|
||||||
let m = 'value' + i
|
{ name: "芯片总功率完成值", value: obj.chipTotalPower, titleValue: obj.chipTotalPower },
|
||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
// { name: '芯片总功率完成值', value: 55 },
|
||||||
this.dataArr[0]['' + m + ''] = item.chipTotalPower
|
// { name: "%", value: 21.66 },
|
||||||
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
// { name: "%", value: 18.4 },
|
||||||
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
],
|
||||||
// this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
type: "bar",
|
||||||
this.dataArr[1]['' + m + ''] = item.componentTotalPower
|
barWidth: 20,
|
||||||
})
|
// barGap: '-100%',
|
||||||
// ele.titleValue
|
label: {
|
||||||
// .push({
|
show: true,
|
||||||
// label: ele.titleValue,
|
position: [-18, -16],
|
||||||
// props: 'value' + index + 1,
|
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 {
|
||||||
// if (this.currentMenu !== '瑞昌') {
|
|
||||||
res.data.list.forEach((ele, index) => {
|
res.data.list.forEach((ele, index) => {
|
||||||
let i = index + 1
|
|
||||||
this.chartMsg.xData.push(ele.titleValue)
|
this.chartMsg.xData.push(ele.titleValue)
|
||||||
this.otherProps.push({
|
|
||||||
label: ele.titleValue,
|
|
||||||
prop: 'value' + i
|
|
||||||
})
|
|
||||||
})
|
|
||||||
console.log(this.otherProps)
|
|
||||||
res.data.list.forEach((ele, index) => {
|
|
||||||
let i = index + 1
|
|
||||||
let m = 'value' + i
|
|
||||||
ele.productionSituationPowerDataVOList.forEach((item) => {
|
|
||||||
this.dataArr[0]['' + m + ''] = item.chipTotalPower
|
|
||||||
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
this.dataArr[1]['' + m + ''] = item.componentTotalPower
|
|
||||||
})
|
|
||||||
// ele.titleValue
|
|
||||||
// .push({
|
|
||||||
// label: ele.titleValue,
|
|
||||||
// props: 'value' + index + 1,
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
for (let i in this.dataArr[0]) {
|
for (let i in this.dataArr[0]) {
|
||||||
|
console.log(this.dataArr[0]['item']);
|
||||||
this.chartMsg.series[0].name = this.dataArr[0]['item']
|
this.chartMsg.series[0].name = this.dataArr[0]['item']
|
||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: this.dataArr[0]['item'],
|
name: this.dataArr[0]['item'],
|
||||||
value: this.dataArr[0][i]
|
value: this.dataArr[0][i] === 0 ? null : this.dataArr[0][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -892,7 +865,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[1].data.push({
|
this.chartMsg.series[1].data.push({
|
||||||
name: this.dataArr[1]['item'],
|
name: this.dataArr[1]['item'],
|
||||||
value: this.dataArr[1][i]
|
value: this.dataArr[1][i] === 0 ? null : this.dataArr[1][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -84,7 +84,7 @@
|
|||||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
|
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
|
||||||
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="containerBottom">
|
<!-- <div class="containerBottom">
|
||||||
@ -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,
|
||||||
@ -232,6 +246,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
|
// min: function (value) {//取最小值向下取整为最小刻度
|
||||||
|
// return Math.floor(value.min)
|
||||||
|
// },
|
||||||
|
// max: function (value) {//取最大值向上取整为最大刻度
|
||||||
|
// return Math.ceil(value.max)
|
||||||
|
// },
|
||||||
|
alignTicks:true,
|
||||||
|
// splitNumber: 4,
|
||||||
|
// scale: true,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@ -242,6 +265,12 @@ export default {
|
|||||||
type: 'value',
|
type: 'value',
|
||||||
// inverse: true,
|
// inverse: true,
|
||||||
name: "单位/%",
|
name: "单位/%",
|
||||||
|
alignTicks: true,
|
||||||
|
// min: 0,
|
||||||
|
// max:100,
|
||||||
|
// scale: true,
|
||||||
|
// interval: 25,//间隔
|
||||||
|
splitNumber: 4,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: "right",
|
align: "right",
|
||||||
@ -256,12 +285,13 @@ export default {
|
|||||||
data: [],
|
data: [],
|
||||||
type: "bar",
|
type: "bar",
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
|
yAxisIndex: 0,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: [-18, -16],
|
position: [-18, -16],
|
||||||
color: "#68C483",
|
color: "#68C483",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value + "片";
|
return params.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -269,6 +299,7 @@ export default {
|
|||||||
name: "",
|
name: "",
|
||||||
// yAxisIndex: 0,
|
// yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
|
yAxisIndex: 0,
|
||||||
type: "bar",
|
type: "bar",
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
label: {
|
label: {
|
||||||
@ -276,7 +307,7 @@ export default {
|
|||||||
position: [0, -16],
|
position: [0, -16],
|
||||||
color: "#288AFF",
|
color: "#288AFF",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value + "片";
|
return params.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -285,13 +316,14 @@ export default {
|
|||||||
// yAxisIndex: 0,
|
// yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
type: "bar",
|
type: "bar",
|
||||||
|
yAxisIndex: 0,
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: [0, -16],
|
position: [0, -16],
|
||||||
color: "#64BDFF",
|
color: "#64BDFF",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value+ "片";
|
return params.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -307,7 +339,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
color: "#FFAE17",
|
color: "#FFAE17",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.value.toFixed(2) + "%";
|
return params.value.toFixed(2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -326,13 +358,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
tableProps() {
|
tableProps() {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
prop: "factory",
|
|
||||||
label: "工厂名称",
|
|
||||||
// filter: (val) => factoryList[val],
|
|
||||||
minWidth: 200,
|
|
||||||
showOverflowtooltip: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: "item",
|
prop: "item",
|
||||||
label: "科目",
|
label: "科目",
|
||||||
@ -363,6 +388,9 @@ export default {
|
|||||||
// 监听左侧菜单栏是否展开
|
// 监听左侧菜单栏是否展开
|
||||||
type(val) {
|
type(val) {
|
||||||
|
|
||||||
|
},
|
||||||
|
currentMenu() {
|
||||||
|
this.getDataList()
|
||||||
},
|
},
|
||||||
isOpen(val) {
|
isOpen(val) {
|
||||||
if (this.$route.name === "productionYield") {
|
if (this.$route.name === "productionYield") {
|
||||||
@ -512,8 +540,12 @@ export default {
|
|||||||
this.chartMsg.series[1].data = []
|
this.chartMsg.series[1].data = []
|
||||||
this.chartMsg.series[2].data = []
|
this.chartMsg.series[2].data = []
|
||||||
this.chartMsg.series[3].data = []
|
this.chartMsg.series[3].data = []
|
||||||
|
this.chartMsgYearTarget.xData = []
|
||||||
this.chartMsgYearTarget.series[0].data = []
|
this.chartMsgYearTarget.series[0].data = []
|
||||||
this.chartMsgYearTarget.series[1].data = []
|
this.chartMsgYearTarget.series[1].data = []
|
||||||
|
if (!this.listQuery.startDate && !this.listQuery.endDate) {
|
||||||
|
return this.$message('请选择起止时间')
|
||||||
|
}
|
||||||
let arr = []
|
let arr = []
|
||||||
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
||||||
this.listQuery.factory = arr
|
this.listQuery.factory = arr
|
||||||
@ -621,10 +653,6 @@ export default {
|
|||||||
let m = 'value' + i
|
let m = 'value' + i
|
||||||
ele.productYieldDataVOList.forEach((item) => {
|
ele.productYieldDataVOList.forEach((item) => {
|
||||||
dataArr[0]['' + m + ''] = item.ftoInput
|
dataArr[0]['' + m + ''] = item.ftoInput
|
||||||
dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[2].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
|
||||||
dataArr[1]['' + m + ''] = item.chipYield
|
dataArr[1]['' + m + ''] = item.chipYield
|
||||||
dataArr[2]['' + m + ''] = item.componentYield
|
dataArr[2]['' + m + ''] = item.componentYield
|
||||||
dataArr[3]['' + m + ''] = item.comprehensiveYieldRate
|
dataArr[3]['' + m + ''] = item.comprehensiveYieldRate
|
||||||
@ -635,7 +663,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: dataArr[0]['item'],
|
name: dataArr[0]['item'],
|
||||||
value: dataArr[0][i]
|
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -644,7 +672,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[1][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -653,7 +681,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[2][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -662,7 +690,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[3].data.push({
|
this.chartMsg.series[3].data.push({
|
||||||
name: dataArr[3]['item'],
|
name: dataArr[3]['item'],
|
||||||
value: dataArr[3][i]
|
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -695,7 +723,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[0].data.push({
|
this.chartMsg.series[0].data.push({
|
||||||
name: dataArr[0]['item'],
|
name: dataArr[0]['item'],
|
||||||
value: dataArr[0][i]
|
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -704,7 +732,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[1][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -713,7 +741,7 @@ export default {
|
|||||||
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] === 0 ? null : dataArr[2][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -722,7 +750,7 @@ export default {
|
|||||||
if (i.search('value') === 0) {
|
if (i.search('value') === 0) {
|
||||||
this.chartMsg.series[3].data.push({
|
this.chartMsg.series[3].data.push({
|
||||||
name: dataArr[3]['item'],
|
name: dataArr[3]['item'],
|
||||||
value: dataArr[3][i]
|
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user