修改bug

这个提交包含在:
‘937886381’ 2024-06-26 10:59:23 +08:00
父节点 196a615f61
当前提交 92c0c33fbd
共有 12 个文件被更改,包括 327 次插入340 次删除

查看文件

@ -147,7 +147,7 @@ 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",

查看文件

@ -109,6 +109,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 +132,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 },
}, },

查看文件

@ -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-20 10:16:25 * @LastEditTime: 2024-06-25 10:34:51
* @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
}, },
@ -244,7 +244,7 @@ export default {
colorList: ['#2760FF', '#8167F6', '#5B9BFF', '#FFD160'] colorList: ['#2760FF', '#8167F6', '#5B9BFF', '#FFD160']
// proLineList: [], // proLineList: [],
// all: {} // all: {}
}; };
}, },
// computed: { // computed: {
// weekNum() { // weekNum() {
@ -374,7 +374,7 @@ export default {
this.seriesList = [] this.seriesList = []
// x // x
xAxisData = Object.keys(data) xAxisData = Object.keys(data)
// y // y
this.factoryArray.forEach(fac => { this.factoryArray.forEach(fac => {
let i = 0 let i = 0

查看文件

@ -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-26 10:42:16
* @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,7 +83,7 @@ export default {
dataZoom: [// dataZoom: [//
{ {
// //
show: false, show: true,
// //
type: "slider", type: "slider",
// //
@ -190,6 +190,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-26 09:25:28
* @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: -60,
right: 0, right: 0,
bottom: 30, bottom: 31,
top: 30, top: 30,
containLabel:true, containLabel:true,
}, },
@ -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,7 +83,7 @@ export default {
dataZoom: [// dataZoom: [//
{ {
// //
show: false, show: true,
// //
type: "slider", type: "slider",
// //
@ -190,6 +190,7 @@ export default {
}, 500)(); }, 500)();
}, },
getMes() { getMes() {
// console.log('222222', this.chartMsg);
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:52 * @Date: 2024-06-20 16:13:52
* @LastEditTime: 2024-06-24 08:46:46 * @LastEditTime: 2024-06-25 10:49:34
* @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,
@ -83,7 +83,7 @@ export default {
dataZoom: [// dataZoom: [//
{ {
// //
show: false, show: true,
// //
type: "slider", type: "slider",
// //

查看文件

@ -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-25 15:13:45
* @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,
@ -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>`;
} }
@ -101,7 +101,7 @@ export default {
dataZoom: [// dataZoom: [//
{ {
// //
show: false, show: true,
// //
type: "slider", type: "slider",
// //

查看文件

@ -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,7 @@ export default {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "单位/", name: "单位/MW",
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -204,7 +204,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 +219,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 +233,16 @@ export default {
yAxis: [ yAxis: [
{ {
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: 5,
scale: true,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -241,8 +250,16 @@ export default {
axisLabel: {}, axisLabel: {},
}, },
{ {
type: "value", type: 'value',
// inverse: true,
name: "单位/%", name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 20,//
// splitNumber: 8,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -259,10 +276,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 +291,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 +311,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 +330,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 +355,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 +507,9 @@ 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 = []
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 +575,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 +585,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 +630,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 +639,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 +648,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]
}) })
} }
} }

查看文件

@ -103,7 +103,7 @@
: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" :table-data="tableData" :max-height="tableH" /> :limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div> </div>
<!-- <div class="containerBottom"> <!-- <div class="containerBottom">
@ -224,7 +224,7 @@ export default {
yAxis: { yAxis: {
type: "value", type: "value",
name: "单位/MW", name: "单位/MW",
show: false, show: true,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -252,13 +252,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: [-40, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value return params.value
@ -310,13 +309,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 +334,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 +489,58 @@ 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
if (this.listQuery.type === 2) {
// 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: [
@ -558,7 +575,7 @@ export default {
// barGap: '-100%', // barGap: '-100%',
stack: 'a', stack: 'a',
data: [ data: [
{ name: "芯片总功率目标值", value: item.componentTotalPower }, { name: "芯片总功率目标值", value: item.chipTotalPower },
// { name: '', value: 22 }, // { name: '', value: 22 },
// { name: "%", value: 21.66 }, // { name: "%", value: 21.66 },
// { name: "%", value: 18.4 }, // { name: "%", value: 18.4 },
@ -579,7 +596,7 @@ export default {
name: "标准组件总功率目标值", name: "标准组件总功率目标值",
stack: 'b', stack: 'b',
data: [ data: [
{ name: "标准组件总功率目标值", value: item.componentYield }, { name: "标准组件总功率目标值", value: item.componentTotalPower },
// { name: '', value: 23 }, // { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
@ -602,7 +619,7 @@ export default {
// barGap: '-100%', // barGap: '-100%',
stack: 'a', stack: 'a',
data: [ data: [
{ name: "芯片总功率完成值", value: item.componentTotalPower }, { name: "芯片总功率完成值", value: item.chipTotalPower },
// { name: '', value: 55 }, // { name: '', value: 55 },
// { name: "%", value: 21.66 }, // { name: "%", value: 21.66 },
// { name: "%", value: 18.4 }, // { name: "%", value: 18.4 },
@ -623,7 +640,7 @@ export default {
name: "标准组件总功率完成值", name: "标准组件总功率完成值",
stack: 'b', stack: 'b',
data: [ data: [
{ name: "标准组件总功率完成值", value: item.componentYield }, { name: "标准组件总功率完成值", value: item.componentTotalPower },
// { name: '', value: 23 }, // { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
@ -646,7 +663,7 @@ export default {
// this.chartMsgTarget.series[3].data.push() // this.chartMsgTarget.series[3].data.push()
}) })
}) })
console.log('arr', arr) console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std] this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => { // arr.forEach((ele) => {
@ -658,55 +675,28 @@ 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));
res.data.list.forEach((ele, index) => {
let i = index + 1
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
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,7 +724,8 @@ 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) => { console.log(' res.data.list.slice(res.data.list.length - 1, res.data.list.length)', res.data.list.slice(res.data.list.length - 2, res.data.list.length));
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)
@ -766,7 +757,7 @@ export default {
name: "标准组件总功率目标值", name: "标准组件总功率目标值",
stack: 'b', stack: 'b',
data: [ data: [
{ name: "标准组件总功率目标值", value: item.componentYield }, { name: "标准组件总功率目标值", value: item.componentTotalPower },
// { name: '', value: 23 }, // { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
@ -810,7 +801,7 @@ export default {
name: "标准组件总功率完成值", name: "标准组件总功率完成值",
stack: 'b', stack: 'b',
data: [ data: [
{ name: "标准组件总功率完成值", value: item.componentYield }, { name: "标准组件总功率完成值", value: item.componentTotalPower },
// { name: '', value: 23 }, // { name: '', value: 23 },
// { name: "%", value: 7.02 }, // { name: "%", value: 7.02 },
// { name: "%", value: 80.2 }, // { name: "%", value: 80.2 },
@ -836,54 +827,17 @@ export default {
console.log('arr', arr) console.log('arr', arr)
this.chartMsgTarget.series = [...chip,...std] this.chartMsgTarget.series = [...chip,...std]
console.log(this.chartMsg.xData) 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
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
} 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 +846,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]
}) })
} }
} }

查看文件

@ -5,7 +5,7 @@
<div class="search"> <div class="search">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type"> <el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择"> <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择" @change="handleChange">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -60,18 +60,18 @@
生产情况对比 生产情况对比
</div> </div>
<bm-line-bar :type="listQuery.type" style="margin-top: 20px;" :show="false" :chartHeight="chartHeight" <bm-line-bar :type="listQuery.type" style="margin-top: 20px;" :show="false" :chartHeight="chartHeight"
:legendList="legendList" :chartMsg="chartMsg" :chartId="chartId" :chartNum="chartNum" /> :legendList="legendList" ref="dayChart" :chartMsg="chartMsg" :chartId="chartId" :chartNum="chartNum" />
</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" ref="dayTargetChart" :chartId=" 'chartTarget'" :chartNum="chartNum" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div class="blueTip"> <div class="blueTip">
{{ title }} {{ title }}
</div> </div>
<bm-line-bar-year-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList" <bm-line-bar-year-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgYearTarget" :chartId=" 'chartYearTarget'" :chartNum="chartNum" /> :chartMsg="chartMsgYearTarget" ref="chartYearTarget" :chartId=" 'chartYearTarget'" :chartNum="chartNum" />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-else-if="this.listQuery.type === 1 || this.listQuery.type === 0"> <el-row v-else-if="this.listQuery.type === 1 || this.listQuery.type === 0">
@ -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">
@ -132,6 +132,8 @@ export default {
showTable:false, showTable:false,
listQuery: { listQuery: {
pageNo: 1, pageNo: 1,
start: undefined,
end: undefined,
pageSize:999, pageSize:999,
// size: 10, // size: 10,
// current: 1, // current: 1,
@ -167,7 +169,7 @@ export default {
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" }, { id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" }, { id: 2, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" }, { id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
this.currentMenu == '瑞昌' ? '' : this.currentMenu == '瑞昌' ? null :
{ id: 4, name: "BIPV产量", type: 1, color: "#7164FF" }, { id: 4, name: "BIPV产量", type: 1, color: "#7164FF" },
], ],
chartMsgYearTarget: { chartMsgYearTarget: {
@ -230,7 +232,6 @@ export default {
}, },
}, },
}, },
this.currentMenu == '瑞昌' ? '' :
{ {
name: "BIPV产量", name: "BIPV产量",
data: [], data: [],
@ -254,7 +255,15 @@ export default {
yAxis:{ yAxis:{
type: "value", type: "value",
name: "单位/片", name: "单位/片",
show:false, show: true,
// min: function (value) {//
// return Math.floor(value.min)
// },
// max: function (value) {//
// return Math.ceil(value.max)
// },
scale: true,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -267,14 +276,21 @@ export default {
color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'], color: ["#8EF0AB", "#288AFF", "#64BDFF", '#7164FF'],
xData: [], xData: [],
yName: "单位/片", yName: "单位/片",
yAxis: yAxis:{
{
type: "value", type: "value",
name: "单位/片", name: "单位/片",
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
}, },
scale: true,
// min: function (value) {//
// return Math.floor(value.min)
// },
splitNumber: 5,
// max: function (value) {//
// return Math.ceil(value.max)
// },
axisLabel: {}, axisLabel: {},
}, },
series: [ series: [
@ -323,7 +339,6 @@ export default {
}, },
}, },
}, },
this.currentMenu == '瑞昌' ? '' :
{ {
name: "BIPV产量", name: "BIPV产量",
data: [], data: [],
@ -394,13 +409,13 @@ export default {
}, },
tableProps() { tableProps() {
return [ return [
{ // {
prop: "factory", // prop: "factory",
label: "工厂名称", // label: "",
// filter: (val) => factoryList[val], // // filter: (val) => factoryList[val],
minWidth: 200, // minWidth: 200,
showOverflowtooltip: true, // showOverflowtooltip: true,
}, // },
{ {
prop: "item", prop: "item",
label: "科目", label: "科目",
@ -429,6 +444,24 @@ export default {
dataArr(val) { dataArr(val) {
this.tableData = val this.tableData = val
}, },
currentMenu(val) {
console.log(val)
if (val === '瑞昌') {
this.legendList = [
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
]
} else {
[
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
{ id: 4, name: "BIPV产量", type: 1, color: "#7164FF" },
]
}
this.getDataList()
},
isOpen(val) { isOpen(val) {
if (this.$route.name === "productionSituationTablets") { if (this.$route.name === "productionSituationTablets") {
this.chartNum++; this.chartNum++;
@ -459,6 +492,11 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
this.listQuery.start = null
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0; // let spanTwoArr = [], concatTwo = 0;
@ -589,44 +627,73 @@ export default {
this.chartMsgYearTarget.series[3].data = [] this.chartMsgYearTarget.series[3].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 getProduceSituationData(this.listQuery) const res = await getProduceSituationData(this.listQuery)
if (this.listQuery.type === 2) { res.data.list.forEach((ele, index) => {
console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length)); let i = index + 1
res.data.list.forEach((ele, index) => { // this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
let i = index + 1 this.otherProps.push({
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " ")) label: ele.titleValue,
this.otherProps.push({ prop: 'value' + i
label: ele.titleValue,
prop: 'value' + i
})
}) })
})
let maxData = []
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationDataVOList.forEach((item) => {
maxData.push(item.ftoInput, item.chipYield, item.componentYield)
this.dataArr[0]['' + m + ''] = item.ftoInput
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.chipYield
this.dataArr[2]['' + m + ''] = item.componentYield
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
if (this.dataArr[3]) {
maxData.push(item.bipvProductOutput)
this.dataArr[3]['' + m + ''] = item.bipvProductOutput
}
})
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
if (this.listQuery.type === 2) {
console.log(res.data.list.length);
// 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.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({ this.chartMsg.series[0].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.ftoInput value: item.ftoInput === 0 ? null : item.ftoInput
}) })
this.chartMsg.series[1].data.push({ this.chartMsg.series[1].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.chipYield value: item.chipYield === 0 ? null : item.chipYield
}) })
this.chartMsg.series[2].data.push({ this.chartMsg.series[2].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.componentYield value: item.componentYield === 0 ? null : item.componentYield
})
this.chartMsg.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput
}) })
if (this.dataArr[3]) {
this.chartMsg.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput === 0 ? null : item.bipvProductOutput
})
}
}) })
}) })
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: [
@ -855,80 +922,53 @@ export default {
ele.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
this.chartMsgYearTarget.series[0].data.push({ this.chartMsgYearTarget.series[0].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.ftoInput value: item.ftoInput === 0 ? null : item.ftoInput
}) })
this.chartMsgYearTarget.series[1].data.push({ this.chartMsgYearTarget.series[1].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.chipYield value: item.chipYield === 0 ? null : item.chipYield
}) })
this.chartMsgYearTarget.series[2].data.push({ this.chartMsgYearTarget.series[2].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.componentYield value: item.componentYield === 0 ? null : item.componentYield
})
this.chartMsgYearTarget.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput
}) })
if (this.dataArr[3]) {
this.chartMsgYearTarget.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput === 0 ? null : item.bipvProductOutput
})
}
}) })
}) })
// }) // })
console.log(this.chartMsg.xData)
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.ftoInput
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[2].factory = item.factory == 1 ? '邯郸' : '瑞昌'
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.chipYield
this.dataArr[2]['' + m + ''] = item.componentYield
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
if (this.dataArr[3]) {
this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
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)); // console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
res.data.list.forEach((ele, index) => {
let i = index + 1
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
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.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({ this.chartMsg.series[0].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.ftoInput value: item.ftoInput === 0 ? null : item.ftoInput
}) })
this.chartMsg.series[1].data.push({ this.chartMsg.series[1].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.chipYield value: item.chipYield === 0 ? null : item.chipYield
}) })
this.chartMsg.series[2].data.push({ this.chartMsg.series[2].data.push({
name: ele.titleValue, name: ele.titleValue,
value: item.componentYield value: item.componentYield === 0 ? null : item.componentYield
})
this.chartMsg.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput
}) })
if (this.dataArr[3]) {
this.chartMsg.series[3].data.push({
name: ele.titleValue,
value: item.bipvProductOutput === 0 ? null : item.bipvProductOutput
})
}
}) })
}) })
console.log(this.chartMsg.series[0]);
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue) this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue)
// this.chartMsgTarget.series = [{ // this.chartMsgTarget.series = [{
// name: "FTO", // name: "FTO",
@ -1148,68 +1188,16 @@ export default {
}) })
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv] this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.ftoInput
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[2].factory = item.factory == 1 ? '邯郸' : '瑞昌'
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.chipYield
this.dataArr[2]['' + m + ''] = item.componentYield
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
if (this.dataArr[3]) {
this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[3]['' + m + ''] = item.bipvProductOutput
}
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
} else { } else {
// if (this.currentMenu !== '') { res.data.list.forEach((ele, index) => {
res.data.list.forEach((ele, index) => { this.chartMsg.xData.push(ele.titleValue)
let i = index + 1 })
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.productionSituationDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.ftoInput
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[2].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1]['' + m + ''] = item.chipYield
this.dataArr[2]['' + m + ''] = item.componentYield
if (this.dataArr[3]) {
this.dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[3]['' + m + ''] = item.bipvProductOutput
}
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
for (let i in this.dataArr[0]) { for (let i in this.dataArr[0]) {
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) {
console.log("this.dataArr[0]['item']", this.dataArr[0]['item'], this.dataArr[0][i]);
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]
}) })
} }
} }
@ -1218,7 +1206,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]
}) })
} }
} }
@ -1227,7 +1215,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: this.dataArr[2]['item'], name: this.dataArr[2]['item'],
value: this.dataArr[2][i] value: this.dataArr[2][i] === 0 ? null : this.dataArr[2][i]
}) })
} }
} }
@ -1237,15 +1225,19 @@ 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: this.dataArr[3]['item'], name: this.dataArr[3]['item'],
value: this.dataArr[3][i] value: this.dataArr[3][i] === 0 ? null : this.dataArr[3][i]
}) })
} }
} }
} }
} }
console.log(this.dataArr) // console.log(this.dataArr)
console.log(this.tableData); // console.log(this.tableData);
// this.$nextTick(() => { // this.$nextTick(() => {
console.log(this.chartMsg.series)
this.$refs.dayChart.getMes()
this.$refs.dayTargetChart.getMes()
this.$refs.chartYearTarget.getMes()
this.tableData = this.dataArr this.tableData = this.dataArr
this.showTable = !this.showTable this.showTable = !this.showTable
// }) // })

查看文件

@ -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">
@ -232,6 +232,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: 5,
scale: true,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -242,6 +251,13 @@ export default {
type: 'value', type: 'value',
// inverse: true, // inverse: true,
name: "单位/%", name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max:100,
// scale: true,
interval: 20,//
// splitNumber: 8,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
align: "right", align: "right",
@ -256,12 +272,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 +286,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 +294,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 +303,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 +326,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 +345,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 +375,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 +527,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 +640,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 +650,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 +659,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 +668,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 +677,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 +710,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 +719,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 +728,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 +737,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]
}) })
} }
} }