This commit is contained in:
‘937886381’
2024-06-21 16:04:50 +08:00
parent 0eb17fa08b
commit 670d7e5600
12 changed files with 1214 additions and 903 deletions

View File

@@ -100,8 +100,8 @@
:chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> -->
</el-row>
<base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
:max-height="tableH" />
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@@ -160,14 +160,14 @@ export default {
chartHeight: this.tableHeight(137) / 2 - 111,
tableH: this.tableHeight(137) / 2 - 70,
legendList: [
{ id: 1, name: "FTO投入", type: 1, color: "#FFCE6A" },
{ id: 2, name: "芯片产量", type: 1, color: "#8EF0AB" },
{ id: 3, name: "标准组件产量", type: 1, color: "#288AFF" },
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
this.currentMenu == '瑞昌' ? '' :
{ id: 4, name: "BIPV产量", type: 1, color: "#64BDFF" },
{ id: 4, name: "BIPV产量", type: 1, color: "#7164FF" },
],
chartMsgYearTarget: {
color: ["#FFCE6A", "#8EF0AB", "#288AFF", '#64BDFF'],
color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'],
xData: [],
yName: "单位/片",
yAxis: {
@@ -184,15 +184,12 @@ export default {
{
name: "FTO投入",
data: [
{ name: "%", value: 85 },
{ name: "%", value: 85 },
{ name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
color: "#FFAE17",
color: "#8EF0AB",
position: [-18, -16],
formatter: function (params) {
return params.value
@@ -202,16 +199,13 @@ export default {
{
name: "芯片产量",
data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [-18, -16],
color: "#68C483",
color: "#288AFF",
formatter: function (params) {
return params.value
},
@@ -220,16 +214,13 @@ export default {
{
name: "标准组件产量",
data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#288AFF",
color: "#64BDFF",
formatter: function (params) {
return params.value
},
@@ -238,17 +229,13 @@ export default {
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量",
data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
data: [],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#64BDFF",
color: "#7164FF",
formatter: function (params) {
return params.value
},
@@ -257,7 +244,7 @@ export default {
],
},
chartMsgTarget: {
color: ["#FFCE6A", "#8EF0AB", "#288AFF", '#64BDFF', 'rgba(255, 174, 23, .5)', 'rgba(104, 196, 131, .5)', 'rgba(40, 138, 255, .5)', 'rgba(100,189,255,.2)'],
color: [ "#8EF0AB", 'rgba(104, 196, 131, .3)', "#288AFF", 'rgba(40, 138, 255, .2)', "#64BDFF", 'rgba(100,189,255,.3)', '#7164FF', 'rgba(113,100,255,.2)',],
xData: [],
yName: "单位/片",
yAxis:{
@@ -275,7 +262,7 @@ export default {
],
},
chartMsg: {
color: ["#FFCE6A", "#8EF0AB", "#288AFF",'#64BDFF'],
color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'],
xData: [],
yName: "单位/片",
yAxis:
@@ -292,16 +279,13 @@ export default {
{
name: "FTO投入",
data: [
{ name: "%", value: 85 },
{ name: "%", value: 85 },
{ name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [-18, -16],
color: "#FFAE17",
color: "#8EF0AB",
formatter: function (params) {
return params.value
},
@@ -310,16 +294,13 @@ export default {
{
name: "芯片产量",
data: [
{ name: "%", value: 57.5 },
{ name: "%", value: 21.66 },
{ name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [10, -16],
color: "#68C483",
color: "#288AFF",
formatter: function (params) {
return params.value
},
@@ -328,16 +309,13 @@ export default {
{
name: "标准组件产量",
data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#288AFF",
color: "#64BDFF",
formatter: function (params) {
return params.value
},
@@ -346,17 +324,13 @@ export default {
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量",
data: [
{ name: "%", value: 23.33 },
{ name: "%", value: 7.02 },
{ name: "%", value: 80.2 },
],
data: [],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [10, -16],
color: "#64BDFF",
color: "#7164FF",
formatter: function (params) {
return params.value
},
@@ -480,6 +454,35 @@ export default {
this.getDataList()
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0;
this.tableData.map((item, index) => {
// console.log(inde);
if (index === 0) {
spanOneArr.push(1);
} else {
//第一列需合并相同内容的判断条件
if (item.factory === this.tableData[index - 1].factory) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
};
}
});
if (columnIndex === 0) {
const _row = spanOneArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col
}
}
},
getYear(e) {
if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
this.$message({
@@ -579,7 +582,7 @@ export default {
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({
label: ele.titleValue,
props: 'value' + i
prop: 'value' + i
})
})
// res.data.list.forEach((ele) => {
@@ -626,105 +629,25 @@ export default {
// },
// },
// },]
let arr = []
let fto = []
let chip = []
let std = []
let bipv = []
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",ele.titleValue);
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
arr.push({
if (ele.titleValue.search('完成') == -1) {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('目标') != -1) {
fto.push({
name: "FTO投入目标值",
data: [
// s
// { name: 'FTO投入目标', value: item.ftoInput },
{ name: 'FTO投入目标值', value: 11 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack:'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(255,174,23,.5)",
formatter: function (params) {
return params.value
},
},
},
{
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
// { name: "芯片产量目标值", value: item.chipYield },
{ name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},
{
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
},
},
},
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量目标值",
stack: 'c',
data: [
// { name: "BIPV产量目标值", value: item.bipvProductOutput },
{ name: 'BIPV产量目标值', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
} else {
arr.push({
name: "FTO投入完成值",
data: [
// s
// { name: 'FTO投入完成值', value: item.ftoInput },
{ name: 'FTO投入完成值', value: 33 },
{ name: 'FTO投入目标', value: item.ftoInput },
// { name: 'FTO投入目标值', value: 11 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
@@ -734,40 +657,62 @@ export default {
label: {
show: true,
position: [-18, -16],
color: "rgba(255,174,23)",
color: "rgba(104,196,131,.3)",
formatter: function (params) {
return params.value
},
},
},
{
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
// { name: "芯片产量完成值", value: item.chipYield },
{ name: '芯片产量完成值', value:55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},)
chip.push({
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
// { name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(40,138,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
// { name: '标准组件产量目标值', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.3)",
formatter: function (params) {
return params.value
},
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{
name: "标准组件产量完成值",
stack: 'b',
name: "BIPV产量目标值",
stack: 'c',
data: [
// { name: "标准组件产量完成值", value: item.componentYield },
{ name: '标准组件产量完成值', value: 23 },
{ name: "BIPV产量目标值", value: item.bipvProductOutput },
// { name: 'BIPV产量目标值', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
@@ -776,42 +721,112 @@ export default {
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
color: "rgba(113,100,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
// } else {
// }
})
console.log("fto",ele.titleValue,fto);
} else {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('目标') != -1) {
// } else {
fto.unshift({
name: "FTO投入完成值",
data: [
// s
{ name: 'FTO投入完成值', value: item.ftoInput },
// { name: 'FTO投入完成值', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
type: "bar",
barWidth: 20,
stack: 'f',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
// { name: "BIPV产量完成值", value: item.bipvProductOutput },
{ name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255)",
formatter: function (params) {
return params.value
},
})
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '芯片产量完成值', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '标准组件产量完成值', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
{ name: "BIPV产量完成值", value: item.bipvProductOutput },
// { name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},)
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
},
},)
// }
})
}
})
console.log('arr', arr)
this.chartMsgTarget.series = arr
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
console.log('arr', this.chartMsgTarget.series)
// arr.forEach((ele) => {
// })
@@ -870,7 +885,7 @@ export default {
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({
label: ele.titleValue,
props: 'value' + i
prop: 'value' + i
})
})
// res.data.list.forEach((ele) => {
@@ -917,19 +932,26 @@ export default {
// },
// },
// },]
let arr = []
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
let fto = []
let chip = []
let std = []
let bipv = []
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
// console.log("ele", ele.titleValue);
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
arr.push({
if (ele.titleValue.search('完成') == -1) {
console.log(ele);
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('目标') != -1) {
fto.push({
name: "FTO投入目标值",
data: [
// s
// { name: 'FTO投入目标', value: item.ftoInput },
{ name: 'FTO投入目标值', value: 11 },
{ name: 'FTO投入目标', value: item.ftoInput },
// { name: 'FTO投入目标值', value: 11 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
@@ -939,41 +961,62 @@ export default {
label: {
show: true,
position: [-18, -16],
color: "rgba(255,174,23,.5)",
color: "rgba(104,196,131,.3)",
formatter: function (params) {
return params.value
},
},
},
{
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
// { name: "芯片产量目标值", value: item.chipYield },
{ name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},)
chip.push({
name: "芯片产量目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量目标值", value: item.chipYield },
// { name: '芯片产量目标值', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(40,138,255,.2)",
formatter: function (params) {
return params.value
},
},
{
name: "标准组件产量目标值",
stack: 'b',
data: [
// { name: "标准组件产量目标值", value: item.componentYield },
{ name: '标准组件产量目标值', value: 23 },
},)
std.push({
name: "标准组件产量目标值",
stack: 'b',
data: [
{ name: "标准组件产量目标值", value: item.componentYield },
// { name: '标准组件产量目标值', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.3)",
formatter: function (params) {
return params.value
},
},
})
bipv.push(this.currentMenu == '瑞昌' ? null :
{
name: "BIPV产量目标值",
stack: 'c',
data: [
{ name: "BIPV产量目标值", value: item.bipvProductOutput },
// { name: 'BIPV产量目标值', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
@@ -982,40 +1025,27 @@ export default {
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
color: "rgba(113,100,255,.2)",
formatter: function (params) {
return params.value
},
},
},
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量目标值",
stack: 'c',
data: [
// { name: "BIPV产量目标值", value: item.bipvProductOutput },
{ name: 'BIPV产量目标值', value: 24 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255,.2)",
formatter: function (params) {
return params.value
},
},
},)
} else {
arr.push({
},)
// } else {
// }
})
console.log("fto", ele.titleValue, fto);
} else {
ele.productionSituationDataVOList.forEach((item) => {
console.log(item);
// if (ele.titleValue.search('目标') != -1) {
// } else {
fto.unshift({
name: "FTO投入完成值",
data: [
// s
// { name: 'FTO投入完成值', value: item.ftoInput },
{ name: 'FTO投入完成值', value: 33 },
{ name: 'FTO投入完成值', value: item.ftoInput },
// { name: 'FTO投入完成值', value: 33 },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
],
@@ -1025,40 +1055,61 @@ export default {
label: {
show: true,
position: [-18, -16],
color: "rgba(255,174,23)",
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},
{
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
// { name: "芯片产量完成值", value: item.chipYield },
{ name: '芯片产量完成值', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
})
chip.unshift({
name: "芯片产量完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片产量完成值", value: item.chipYield },
// { name: '芯片产量完成值', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
color: "rgba(40,138,255)",
position: [-18, -16],
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件产量完成值",
stack: 'b',
data: [
{ name: "标准组件产量完成值", value: item.componentYield },
// { name: '标准组件产量完成值', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
color: "rgba(100,189,255)",
show: true,
position: [0, -16],
formatter: function (params) {
return params.value
},
},
})
bipv.unshift(this.currentMenu == '瑞昌' ? null :
{
name: "标准组件产量完成值",
stack: 'b',
name: "BIPV产量完成值",
stack: 'c',
data: [
// { name: "标准组件产量完成值", value: item.componentYield },
{ name: '标准组件产量完成值', value: 23 },
{ name: "BIPV产量完成值", value: item.bipvProductOutput },
// { name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
@@ -1067,43 +1118,18 @@ export default {
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
color: "rgba(113,100,255)",
formatter: function (params) {
return params.value
},
},
},
this.currentMenu == '瑞昌' ? '' :
{
name: "BIPV产量完成值",
stack: 'c',
data: [
// { name: "BIPV产量完成值", value: item.bipvProductOutput },
{ name: 'BIPV产量完成值', value: 32 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(100,189,255)",
formatter: function (params) {
return params.value
},
},
},)
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
},)
// }
})
}
})
console.log('arr', arr)
this.chartMsgTarget.series = arr
console.log(this.chartMsg.xData)
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
@@ -1134,7 +1160,7 @@ export default {
this.chartMsg.xData.push(ele.titleValue)
this.otherProps.push({
label: ele.titleValue,
props: 'value' + i
prop: 'value' + i
})
})
console.log(this.otherProps)
@@ -1198,7 +1224,7 @@ export default {
}
}
}
this.tableData = this.dataArr
this.tableData = res.data.length != 0 ? this.dataArr : []
// this.tableProps = otherProps
// res.data.list.forEach((ele) => {
// console.log(ele);