Compare commits

..

No commits in common. "f2cfe94dfc63023f817a012f993177c2b115ecb3" and "196a615f610802e98f38367c084c0aac62cd5bee" have entirely different histories.

20 changed files with 531 additions and 623 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: zhp
# @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-24 16:57:53
# @LastEditors: DY
# @LastEditTime: 2024-06-24 08:29:45
# @LastEditors: zhp
# @Description:
###
# 开发环境配置

View File

@ -147,7 +147,7 @@ export default {
: `${month}月良率`,
: `${year}良率`,
}[this.period];
console.log(vt[0]);
console.log(vt[1]);
const t = getOptions({
// single,
color: this.color == 1 ? "#4CF0E8" : "#1065ff",

View File

@ -109,9 +109,6 @@ export default ({
{
value: previousSum,
name: preName,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
selected: false,
itemStyle: {
borderJoin: "round",
@ -132,11 +129,10 @@ export default ({
},
},
{
value:previousSum === 0 ? 1 : 0,
name: preName,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
value:previousSum == 0
? 1
: 0,
name: "-",
itemStyle: { color: "transparent" },
label: { show: false },
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-25 08:59:33
* @LastEditTime: 2024-06-18 14:41:07
* @LastEditors: DY
* @Description:
-->
@ -58,7 +58,7 @@
<p class="text">{{ dataForm.chipCssMarriageRate }}</p>
</el-col>
<el-col :span="6">
<p class="title">芯片段OEE(%)</p>
<p class="title">芯片段OEE</p>
<p class="text">{{ dataForm.chipOee }}</p>
</el-col>
<el-col :span="6">
@ -116,14 +116,6 @@
<p class="title">标准组件平均功率(W)</p>
<p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col>
<el-col :span="6">
<p class="title">标准组件转化效率</p>
<p class="text">{{ dataForm.componentTransRate }}</p>
</el-col>
<el-col :span="6">
<p class="title">芯片投入</p>
<p class="text">{{ dataForm.chipInput }}</p>
</el-col>
</el-row>
</div>
<div v-if="glass === 2">

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-26 11:00:11
* @LastEditors: zhp
* @LastEditTime: 2024-06-20 10:16:25
* @LastEditors: DY
* @Description:
-->
<template>
@ -10,7 +10,7 @@
<div class="app-container" style="padding: 16px 24px 0; height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type">
<el-select v-model="listQuery.type" size="small" clearable placeholder="请选择">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@ -74,7 +74,7 @@
<!-- <el-row :gutter="24"> -->
<!-- <el-col :span="12" v-for="item in dataList" :key="item.id"> -->
<search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" />
<line-chart ref="lineChart" class="yearChart" style="height: 45vh;width: 100%"></line-chart>
<line-chart class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
<!-- </el-col> -->
<!-- <el-col :span="12">
<line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
@ -135,9 +135,9 @@ export default {
// reportType: 2,
startDate: undefined,
endDate:undefined,
reportTime: null,
start: null,
end: null
reportTime: [],
start: undefined,
end: undefined
},
detailOrUpdateVisible:false,
date1: undefined,
@ -210,7 +210,7 @@ export default {
{
prop: 'factory',
label: '工厂名称',
filter: (val) => [val],
filter: (val) => factoryList[val],
minWidth: 180,
showOverflowtooltip: true
},
@ -241,7 +241,7 @@ export default {
lineData: [],
chart: null,
seriesList: [],
colorList: ['#7164FF', '#63BDFF', '#8EF0AB', '#FFCE6A']
colorList: ['#2760FF', '#8167F6', '#5B9BFF', '#FFD160']
// proLineList: [],
// all: {}
};
@ -289,6 +289,7 @@ export default {
// console.log(e);
},
onValueChange(picker, k) { // k
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
if (this.listQuery.start && this.listQuery.end) {
console.log(this.listQuery.reportTime)
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
@ -350,13 +351,6 @@ export default {
}
},
async getDataList() {
if (this.listQuery.type === '') {
this.$message.warning('请选择时间维度!')
return
}
if (this.listQuery.startDate === undefined) {
this.$message.warning('请选择时间范围!')
} else {
await getProduceDataPage(this.listQuery).then(res => {
console.log(res)
if (res.code === 0) {
@ -374,7 +368,6 @@ export default {
this.$refs.lineChart.initChart([], [])
}
})
}
},
buildChart(data, dataList) {
let xAxisData = []
@ -399,13 +392,6 @@ export default {
barWidth: 20,
itemStyle: {
color: this.colorList[i]
},
label: {
show: i === 2 ? true : false,
position: 'top',
formatter(params) {
return fac.name.substring(0, 2)
}
}
}
dataList.forEach(item => {
@ -425,18 +411,6 @@ export default {
barWidth: 20,
itemStyle: {
color: this.colorList[i]
},
label: {
show: true,
position: 'top',
formatter(params) {
if (params.value === 0) {
return ''
} else {
// return ['', ''][params.seriesName.split('-')[1]]
return fac.name.substring(0, 2)
}
}
}
}
dataList.forEach(item => {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: DY
* @LastEditTime: 2024-06-24 11:13:48
* @LastEditTime: 2024-06-19 15:13:23
* @Description:
-->
<template>
@ -40,7 +40,7 @@ export default {
},
height: {
type: String,
default: '35vh'
default: '30vh'
},
legendPosition: {
type: String,
@ -140,24 +140,20 @@ export default {
xAxis: [
{
type: 'category',
name: '日期',
data: xAxis,
axisLabel: {
rotate: 25
}
// prettier-ignore
data: xAxis
}
],
yAxis: [
{
type: 'value',
name: '单位:个'
type: 'value'
}
],
grid: {
top: '10%',
top: '20%',
left: "1%",
right: "5%",
bottom: "0%",
right: "3%",
bottom: "1%",
containLabel: true
},
series: seriesList

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-17 16:31:51
* @LastEditTime: 2024-06-24 15:43:50
* @LastEditTime: 2024-06-17 16:55:04
* @LastEditors: DY
* @Description:
-->
@ -375,12 +375,7 @@ export default {
this.visible = true
if (this.dataForm.id) {
getProduceTargetDetail(this.dataForm.id).then(res => {
// this.dataForm = res.data
for (const i in res.data) {
if (res.data[i] !== null) {
this.dataForm[i] = res.data[i]
}
}
this.dataForm = res.data
if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) {
// this.dataForm.reportTime = String(this.dataForm.targetTime)
this.$set(this.dataForm, 'reportTime', String(this.dataForm.targetTime))

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-24 15:08:34
* @LastEditTime: 2024-06-17 16:32:02
* @LastEditors: DY
* @Description:
-->
@ -76,8 +76,7 @@ import tableHeightMixin from "@/mixins/tableHeightMixin";
import basicPage from '@/mixins/basic-page'
import AddOrUpdate from './add-or-updata';
import { factoryList, factoryArray } from "@/utils/constants";
// import { publicFormatter } from "@/utils/dict";
import statusChart from "./statusChart.vue";
import { publicFormatter } from "@/utils/dict";
// import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx'
@ -207,13 +206,13 @@ export default {
prop: 'factory',
label: '工厂名称',
filter: (val) => factoryList[val],
minWidth: 220,
minWidth: 200,
showOverflowtooltip: true
},
{
prop: 'workOrderNumber',
label: '工单号',
minWidth: 130,
minWidth: 120,
showOverflowtooltip: true
// filter: (val) => ['', '', 'BIPV', ''][val]
},
@ -247,8 +246,8 @@ export default {
{
prop: 'orderStatus',
label: '工单状态',
subcomponent: statusChart
// filter: (val) => ['', '', '', ''][val],
// filter: publicFormatter('workorder_status')
filter: (val) => ['', '未开始', '生产中', '已完成'][val],
},
{
prop: 'startTime',

View File

@ -1,51 +0,0 @@
<!--
* @Author: Do not edit
* @Date: 2024-06-24 15:03:19
* @LastEditTime: 2024-06-24 15:07:42
* @LastEditors: DY
* @Description:
-->
<template>
<div>
<span class="dot" :class="myClass"></span>
<span>{{ state }}</span>
</div>
</template>
<script>
export default {
name: "statusChart",
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
computed: {
state() {
return ['', '未开始', '生产中', '已完成'][this.injectData.orderStatus]
},
myClass() {
return ['', 'yellow', 'blue', 'green'][this.injectData.orderStatus]
}
},
};
</script>
<style scoped>
.dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 3px;
vertical-align: middle;
margin-right: 8px;
}
.green {
background: #10DC76;
}
.yellow {
background: #FFBD02;
}
.blue {
background: #3B79FF;
}
</style>

View File

@ -26,7 +26,6 @@
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width: 150px"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
@ -39,7 +38,6 @@
placeholder="选择周"
value-format="yyyy-MM-dd"
style="width: 150px"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
@ -99,9 +97,6 @@ export default {
{ id: 2, name: "月" },
{ id: 3, name: "年" },
],
pickerOptions: {
firstDayOfWeek: 1,
},
};
},
methods: {

View File

@ -25,7 +25,6 @@
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width: 150px"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
@ -38,7 +37,6 @@
placeholder="选择周"
value-format="yyyy-MM-dd"
style="width: 150px"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
@ -120,9 +118,6 @@ export default {
{ id: 0, name: "瑞昌" },
{ id: 1, name: "邯郸" },
],
pickerOptions: {
firstDayOfWeek: 1,
},
};
},
methods: {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-19 15:28:34
* @LastEditTime: 2024-06-26 10:42:16
* @LastEditTime: 2024-06-24 08:46:34
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series[0].data.length === 0"></div>
v-show="this.chartMsg.series.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series[0].data.length > 0 ">
<div v-show="this.chartMsg.series.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -63,7 +63,7 @@ export default {
: params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW"
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: true,
show: false,
//
type: "slider",
//
@ -190,7 +190,6 @@ export default {
}, 500)();
},
getMes() {
console.log('222222', this.chartMsg.series);
if (this.myChart) {
this.myChart.dispose();
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-26 09:25:28
* @LastEditTime: 2024-06-24 08:46:42
* @LastEditors: zhp
* @Description:
-->
@ -36,9 +36,9 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: -60,
left: -30,
right: 0,
bottom: 31,
bottom: 30,
top: 30,
containLabel:true,
},
@ -63,7 +63,7 @@ export default {
: params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW"
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: true,
show: false,
//
type: "slider",
//
@ -190,7 +190,6 @@ export default {
}, 500)();
},
getMes() {
// console.log('222222', this.chartMsg);
if (this.myChart) {
this.myChart.dispose();
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:52
* @LastEditTime: 2024-06-25 10:49:34
* @LastEditTime: 2024-06-24 08:46:46
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series[0].data.length === 0"></div>
v-show="this.chartMsg.series.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series[0].data.length > 0">
<div v-show="this.chartMsg.series.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -36,7 +36,7 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: 60,
left: 30,
right: 0,
bottom: 30,
top: 30,
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: true,
show: false,
//
type: "slider",
//

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-06-25 15:13:45
* @LastEditTime: 2024-06-24 08:46:49
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series[0].data.length === 0"></div>
v-show="this.chartMsg.series.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series[0].data.length > 0">
<div v-show="this.chartMsg.series.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -36,7 +36,7 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: 60,
left: -30,
right: 0,
bottom: 30,
top: 30,
@ -66,7 +66,7 @@ export default {
: params[0].name === "转化效率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW"
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
// }
@ -81,7 +81,7 @@ export default {
: params[1].name === "转化效率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i].value : 0) + "MW"
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
@ -101,7 +101,7 @@ export default {
dataZoom: [//
{
//
show: true,
show: false,
//
type: "slider",
//

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-25 08:39:48
* @LastEditTime: 2024-06-24 09:39:27
* @LastEditors: zhp
* @Description:
-->
@ -155,11 +155,6 @@ export default {
// all: {}
};
},
watch: {
currentMenu() {
this.getDataList()
},
},
computed: {
weekNum() {
return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
@ -319,12 +314,9 @@ export default {
}
},
async getDataList() {
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
this.otherProps = []
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
this.listQuery.factory = arr
const res = await getComprehensiveDataPage(this.listQuery)
// this.tableData = res.data.list

View File

@ -84,7 +84,7 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> -->
</el-row>
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -174,7 +174,7 @@ export default {
yAxis: [
{
type: "value",
name: "单位/MW",
name: "单位/",
nameTextStyle: {
fontSize: 12,
align: "right",
@ -204,7 +204,7 @@ export default {
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value
return params.value + "MW";
},
},
},
@ -219,7 +219,7 @@ export default {
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value
return params.value + "%";
},
},
yAxisIndex: 1
@ -234,15 +234,6 @@ export default {
{
type: "value",
name: "单位/片",
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
// splitNumber: 5,
scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -250,16 +241,8 @@ export default {
axisLabel: {},
},
{
type: 'value',
// inverse: true,
type: "value",
name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 20,//
// splitNumber: 8,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -276,10 +259,10 @@ export default {
barWidth: 20,
label: {
show: true,
position: [-50, -16],
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value.toFixed(2)
return params.value.toFixed(2) + "MW";
},
},
},
@ -291,10 +274,10 @@ export default {
barWidth: 20,
label: {
show: true,
position: [10, -16],
position: [0, -16],
color: "#288AFF",
formatter: function (params) {
return params.value.toFixed(2)
return params.value.toFixed(2) + "MW";
},
},
},
@ -311,7 +294,7 @@ export default {
show: true,
color: "#FFAE17",
formatter: function (params) {
return params.value.toFixed(2)
return params.value.toFixed(2) + "%";
},
},
},
@ -330,6 +313,13 @@ export default {
computed: {
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -355,9 +345,6 @@ export default {
},
watch: {
//
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "produceConversion") {
this.chartNum++;
@ -507,9 +494,7 @@ export default {
this.chartMsg.series[2].data = []
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
return this.$message('请选择起止时间')
}
console.log(this.listQuery);
if (this.listQuery.type == 3) {
this.listQuery.beginTime = this.listQuery.reportTime[0]
@ -575,6 +560,9 @@ export default {
dataArr[0]['' + m + ''] = item.chipTotalPowers
dataArr[1]['' + m + ''] = item.scTotalPowers
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
// })
@ -585,7 +573,7 @@ export default {
// })
})
})
this.title = res.data[0].yearTarget.targetTime ? res.data[0].yearTarget.targetTime + '目标值' : ''
this.title = res.data[0].yearTarget.targetTime + '目标值'
this.chartMsgYearTarget.series[0].data = [
{
value: res.data[0].yearTarget.chipTotalPower,
@ -630,7 +618,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
value: dataArr[0][i]
})
}
}
@ -639,7 +627,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
value: dataArr[1][i]
})
}
}
@ -648,7 +636,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
value: dataArr[2][i]
})
}
}

View File

@ -103,7 +103,7 @@
:chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> -->
</el-row>
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -224,7 +224,7 @@ export default {
yAxis: {
type: "value",
name: "单位/MW",
show: true,
show: false,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -252,12 +252,13 @@ export default {
series: [
{
name: "芯片总功率",
data: [],
data: [
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [-40, -16],
position: [10, -16],
color: "#68C483",
formatter: function (params) {
return params.value
@ -309,6 +310,13 @@ export default {
},
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -334,9 +342,6 @@ export default {
},
watch: {
//
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "productionSituationMW") {
this.chartNum++;
@ -489,14 +494,12 @@ export default {
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
console.log(this.listQuery);
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.listQuery.factory = arr
const res = await getProductionSituationMWData(this.listQuery)
let maxData = []
if (this.listQuery.type === 2) {
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, " "))
@ -505,42 +508,22 @@ export default {
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.slice(0, res.data.list.length - 3).forEach((ele, index) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
// let i = index + 1
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
value: item.chipTotalPower
})
this.chartMsg.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
value: item.componentTotalPower
})
})
})
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue)
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue.replace(/[^\d]/g, " "))
// this.chartMsgTarget.series = [{
// name: "FTO",
// data: [
@ -565,167 +548,6 @@ export default {
let chip = []
let std = []
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
chip.push({
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
} else {
chip.unshift({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.chipTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
})
}
// this.chartMsgTarget.series[1].data.push()
// this.chartMsgTarget.series[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => {
// })
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
// let i = index + 1
this.chartMsgYearTarget.xData.push(ele.titleValue)
this.title = ele.titleValue
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsgYearTarget.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
})
this.chartMsgYearTarget.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
})
})
})
// })
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
// let i = index + 1
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
})
this.chartMsg.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
})
})
})
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue)
// this.chartMsgTarget.series = [{
// name: "FTO",
// data: [
// // s
// { name: "FTO", value:res,data,list },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
// ],
// type: "bar",
// barWidth: 20,
// barGap: '0',
// label: {
// show: true,
// position: [-18, -16],
// color: "#FFAE17",
// formatter: function (params) {
// return params.value
// },
// },
// },]
let arr = []
let chip = []
let std = []
console.log(' res.data.list.slice(res.data.list.length - 1, res.data.list.length)', res.data.list.slice(res.data.list.length - 2, res.data.list.length));
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
@ -757,7 +579,7 @@ export default {
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentTotalPower },
{ name: "标准组件总功率目标值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
@ -801,7 +623,194 @@ export default {
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentTotalPower },
{ 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[2].data.push()
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => {
// })
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
// let i = index + 1
this.chartMsgYearTarget.xData.push(ele.titleValue)
this.title = ele.titleValue
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsgYearTarget.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower
})
this.chartMsgYearTarget.series[1].data.push({
name: ele.titleValue,
value: 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) {
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.slice(0, res.data.list.length - 1).forEach((ele, index) => {
// let i = index + 1
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower
})
this.chartMsg.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower
})
})
})
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue)
// this.chartMsgTarget.series = [{
// name: "FTO",
// data: [
// // s
// { name: "FTO", value:res,data,list },
// { name: "%", value: 85 },
// { name: "%", value: 85 },
// ],
// type: "bar",
// barWidth: 20,
// barGap: '0',
// label: {
// show: true,
// position: [-18, -16],
// color: "#FFAE17",
// formatter: function (params) {
// return params.value
// },
// },
// },]
let arr = []
let chip = []
let std = []
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
chip.push({
name: "芯片总功率目标值",
// 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 {
chip.unshift({
name: "芯片总功率完成值",
// 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 },
@ -827,17 +836,54 @@ export default {
console.log('arr', arr)
this.chartMsgTarget.series = [...chip,...std]
console.log(this.chartMsg.xData)
} else {
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 {
// if (this.currentMenu !== '') {
res.data.list.forEach((ele, index) => {
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.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]) {
console.log(this.dataArr[0]['item']);
this.chartMsg.series[0].name = this.dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: this.dataArr[0]['item'],
value: this.dataArr[0][i] === 0 ? null : this.dataArr[0][i]
value: this.dataArr[0][i]
})
}
}
@ -846,7 +892,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: this.dataArr[1]['item'],
value: this.dataArr[1][i] === 0 ? null : this.dataArr[1][i]
value: this.dataArr[1][i]
})
}
}

View File

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

View File

@ -84,7 +84,7 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> -->
</el-row>
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -232,15 +232,6 @@ export default {
{
type: "value",
name: "单位/片",
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks:true,
// splitNumber: 5,
scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -251,13 +242,6 @@ export default {
type: 'value',
// inverse: true,
name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max:100,
// scale: true,
interval: 20,//
// splitNumber: 8,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -272,13 +256,12 @@ export default {
data: [],
type: "bar",
barWidth: 20,
yAxisIndex: 0,
label: {
show: true,
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value
return params.value + "片";
},
},
},
@ -286,7 +269,6 @@ export default {
name: "",
// yAxisIndex: 0,
data: [],
yAxisIndex: 0,
type: "bar",
barWidth: 20,
label: {
@ -294,7 +276,7 @@ export default {
position: [0, -16],
color: "#288AFF",
formatter: function (params) {
return params.value
return params.value + "片";
},
},
},
@ -303,14 +285,13 @@ export default {
// yAxisIndex: 0,
data: [],
type: "bar",
yAxisIndex: 0,
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#64BDFF",
formatter: function (params) {
return params.value
return params.value+ "片";
},
},
},
@ -326,7 +307,7 @@ export default {
show: true,
color: "#FFAE17",
formatter: function (params) {
return params.value.toFixed(2)
return params.value.toFixed(2) + "%";
},
},
},
@ -345,6 +326,13 @@ export default {
computed: {
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -375,9 +363,6 @@ export default {
//
type(val) {
},
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "productionYield") {
@ -527,12 +512,8 @@ export default {
this.chartMsg.series[1].data = []
this.chartMsg.series[2].data = []
this.chartMsg.series[3].data = []
this.chartMsgYearTarget.xData = []
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.listQuery.factory = arr
@ -640,6 +621,10 @@ export default {
let m = 'value' + i
ele.productYieldDataVOList.forEach((item) => {
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[2]['' + m + ''] = item.componentYield
dataArr[3]['' + m + ''] = item.comprehensiveYieldRate
@ -650,7 +635,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
value: dataArr[0][i]
})
}
}
@ -659,7 +644,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
value: dataArr[1][i]
})
}
}
@ -668,7 +653,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
value: dataArr[2][i]
})
}
}
@ -677,7 +662,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
name: dataArr[3]['item'],
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
value: dataArr[3][i]
})
}
}
@ -710,7 +695,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
value: dataArr[0][i]
})
}
}
@ -719,7 +704,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
value: dataArr[1][i]
})
}
}
@ -728,7 +713,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
value: dataArr[2][i]
})
}
}
@ -737,7 +722,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
name: dataArr[3]['item'],
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
value: dataArr[3][i]
})
}
}