报表
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<div class="blueTip">
|
||||
{{ title }}
|
||||
</div>
|
||||
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendList"
|
||||
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendListTarget"
|
||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,8 +84,8 @@
|
||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :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">
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
import { getProductionYieldSituationMWData, exportProductionYieldSituationMWData } from '@/api/report';
|
||||
import bmSearchBar from "./components/bmSearchBar";
|
||||
import BmLineBar from "./components/produceLineBar.vue";
|
||||
import produceLineBarYearTarget from "./components/produceLineBarYearTarget.vue";
|
||||
import produceLineBarYearTarget from "./components/produceLineYieldBarTarget.vue";
|
||||
import ButtonNav from '@/components/ButtonNav'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
@@ -145,15 +145,27 @@ export default {
|
||||
tableH: this.tableHeight(137) / 2 - 70,
|
||||
legendList: [
|
||||
{
|
||||
id: 1, name: "综合良率", type: 1, color: "#FFCE6A" },
|
||||
id: 1, name: "综合良率", type: 2, color: "#FFCE6A" },
|
||||
{
|
||||
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB" },
|
||||
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
|
||||
{
|
||||
id: 4, name: "标准组件产量", type: 1, color: "#64BDFF" },
|
||||
],
|
||||
legendListTarget: [
|
||||
{
|
||||
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB"
|
||||
},
|
||||
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
|
||||
{
|
||||
id: 4, name: "标准组件产量", type: 1, color: "#64BDFF"
|
||||
},
|
||||
{
|
||||
id: 1, name: "综合良率", type: 1, color: "#7164FF"
|
||||
},
|
||||
],
|
||||
chartMsgYearTarget: {
|
||||
color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
|
||||
color: ["#8EF0AB", "#288AFF", '#64BDFF', "#7164FF",],
|
||||
xData: [],
|
||||
// yName: "单位/%",
|
||||
yAxis: [
|
||||
@@ -181,32 +193,7 @@ export default {
|
||||
{
|
||||
name: "",
|
||||
// yAxisIndex: 0,
|
||||
data: [
|
||||
{
|
||||
value: 1,
|
||||
itemStyle: {
|
||||
color: '#8EF0AB'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
itemStyle: {
|
||||
color: '#288AFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
itemStyle: {
|
||||
color: '#64BDFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
color: '#FFCE6A'
|
||||
}
|
||||
}],
|
||||
data: [],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
@@ -214,31 +201,26 @@ export default {
|
||||
position: [-18, -16],
|
||||
color: "#68C483",
|
||||
formatter: function (params) {
|
||||
return params.value + "片";
|
||||
return params.value
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// name: '销量折线图',
|
||||
// type: 'bar',
|
||||
// data: [ 0,0,0,
|
||||
// {
|
||||
// value: 5,
|
||||
// itemStyle: {
|
||||
// color: '#FFCE6A'
|
||||
// }
|
||||
// }],
|
||||
// barWith: "40%",
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "top",
|
||||
// formatter: "{c}%"
|
||||
// },
|
||||
// lineStyle: {
|
||||
// color: "#ffb122"
|
||||
// },
|
||||
// yAxisIndex: 1
|
||||
// }
|
||||
{
|
||||
name: '',
|
||||
// type: 'bar',
|
||||
data: [],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: [-18, -16],
|
||||
color: "#68C483",
|
||||
formatter: function (params) {
|
||||
return params.value
|
||||
},
|
||||
},
|
||||
yAxisIndex: 1
|
||||
}
|
||||
],
|
||||
},
|
||||
chartMsg: {
|
||||
@@ -270,11 +252,7 @@ export default {
|
||||
{
|
||||
name: "",
|
||||
// yAxisIndex: 0,
|
||||
data: [
|
||||
{ name: "%", value: 57.5 },
|
||||
{ name: "%", value: 21.66 },
|
||||
{ name: "%", value: 18.4 },
|
||||
],
|
||||
data: [],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
@@ -289,11 +267,7 @@ export default {
|
||||
{
|
||||
name: "",
|
||||
// yAxisIndex: 0,
|
||||
data: [
|
||||
{ name: "%", value: 23.33 },
|
||||
{ name: "%", value: 7.02 },
|
||||
{ name: "%", value: 80.2 },
|
||||
],
|
||||
data: [],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
@@ -308,17 +282,12 @@ export default {
|
||||
{
|
||||
name: "",
|
||||
// yAxisIndex: 0,
|
||||
data: [
|
||||
{ name: "%", value: 23.33 },
|
||||
{ name: "%", value: 7.02 },
|
||||
{ name: "%", value: 80.2 },
|
||||
],
|
||||
data: [],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: [0, -16],
|
||||
stack: '标准组件产量',
|
||||
color: "#64BDFF",
|
||||
formatter: function (params) {
|
||||
return params.value+ "片";
|
||||
@@ -327,11 +296,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
data: [
|
||||
{ name: "%", value: 115 },
|
||||
{ name: "%", value: 5 },
|
||||
{ name: "%", value: 8 },
|
||||
],
|
||||
data: [],
|
||||
type: "line",
|
||||
// barWidth: 20,
|
||||
symbol: "circle",
|
||||
@@ -428,6 +393,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({
|
||||
@@ -543,7 +537,7 @@ export default {
|
||||
this.chartMsg.xData.push(ele.titleValue)
|
||||
this.otherProps.push({
|
||||
label: ele.titleValue,
|
||||
props: 'value' + i
|
||||
prop: 'value' + i
|
||||
})
|
||||
})
|
||||
this.chartMsgYearTarget.xData.push('FTO投入', '芯片产量', '标准组件产量', '综合良率')
|
||||
@@ -554,31 +548,56 @@ export default {
|
||||
// this.chartMsgYearTarget.series[1].name = '芯片产量目标值',
|
||||
// this.chartMsgYearTarget.series[2].name = '标准组件产量目标值',
|
||||
// this.chartMsgYearTarget.series[3].name = '综合良率目标值',
|
||||
// this.chartMsgYearTarget.series[0].data = [
|
||||
// {
|
||||
// value: item.ftoInput,
|
||||
// itemStyle: {
|
||||
// color: '#8EF0AB'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// value: item.chipYield,
|
||||
// itemStyle: {
|
||||
// color: '#288AFF'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// value: item.componentYield,
|
||||
// itemStyle: {
|
||||
// color: '#64BDFF'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// value: item.ftoInput,
|
||||
// itemStyle: {
|
||||
// color: '#FFCE6A'
|
||||
// }
|
||||
// }]
|
||||
this.chartMsgYearTarget.series[0].data = [
|
||||
{
|
||||
value: item.ftoInput,
|
||||
itemStyle: {
|
||||
color: '#8EF0AB'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: item.chipYield,
|
||||
itemStyle: {
|
||||
color: '#288AFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: item.componentYield,
|
||||
itemStyle: {
|
||||
color: '#64BDFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: null,
|
||||
itemStyle: {
|
||||
color: '#FFCE6A'
|
||||
}
|
||||
}]
|
||||
this.chartMsgYearTarget.series[1].data = [
|
||||
{
|
||||
value: null,
|
||||
itemStyle: {
|
||||
color: '#8EF0AB'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: null,
|
||||
itemStyle: {
|
||||
color: '#288AFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: null,
|
||||
itemStyle: {
|
||||
color: '#64BDFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: item.ftoInput,
|
||||
itemStyle: {
|
||||
color: '#FFCE6A'
|
||||
}
|
||||
}]
|
||||
// dataArr[0]['' + m + ''] = item.ftoInput
|
||||
// dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
||||
// dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
|
||||
@@ -646,13 +665,10 @@ export default {
|
||||
this.chartMsg.xData.push(ele.titleValue)
|
||||
this.otherProps.push({
|
||||
label: ele.titleValue,
|
||||
props: 'value' + i
|
||||
prop: 'value' + i
|
||||
})
|
||||
})
|
||||
console.log(this.otherProps)
|
||||
if (this.listQuery.type == 2) {
|
||||
|
||||
}
|
||||
res.data.list.forEach((ele, index) => {
|
||||
let i = index + 1
|
||||
let m = 'value' + i
|
||||
@@ -706,7 +722,7 @@ export default {
|
||||
}
|
||||
|
||||
console.log(dataArr)
|
||||
this.tableData = dataArr
|
||||
this.tableData = res.data.length != 0 ? dataArr : []
|
||||
// this.tableProps.push()
|
||||
this.listQuery.total = res.data.total
|
||||
if (this.listQuery.total > 0) {
|
||||
|
||||
Reference in New Issue
Block a user