报表
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
<ButtonNav style="padding: 0;" :menus="['邯郸', '瑞昌']" :button-mode="true" @change="currentMenu = $event">
|
||||
</ButtonNav>
|
||||
<!-- </div> -->
|
||||
<div class="containerTop">
|
||||
<div class="search">
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="时间维度" prop="date">
|
||||
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
|
||||
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
|
||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
|
||||
<el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
|
||||
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
|
||||
start-placeholder="开始日期" value-format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
|
||||
<el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
|
||||
<el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
|
||||
style="width: 180px" @change="onValueChange">
|
||||
</el-date-picker>
|
||||
@@ -29,12 +29,12 @@
|
||||
{{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
|
||||
</span> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-show="listQuery.type === 2" label="时间值" prop="reportTime">
|
||||
<el-form-item v-show="listQuery.date === 2" label="时间值" prop="reportTime">
|
||||
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange" value-format="yyyy-MM-DD"
|
||||
range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="listQuery.type === 3" label="时间值" prop="reportTime">
|
||||
<el-form-item v-show="listQuery.date === 3" label="时间值" prop="reportTime">
|
||||
<el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
|
||||
placeholder="开始时间">
|
||||
</el-date-picker>
|
||||
@@ -63,11 +63,40 @@
|
||||
<!-- <el-button type="success" size="small" plain @click="addFactory">新增</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <div class="smallTitle">产量转化效率</div> -->
|
||||
|
||||
<!-- <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" /> -->
|
||||
<bm-line-bar :chartHeight="chartHeight" :legendList="legendList" :chartMsg="chartMsg" :chartId="chartId"
|
||||
:chartNum="chartNum" />
|
||||
</div>
|
||||
<div class="containerTop">
|
||||
<el-row v-if="listQuery.date === 2">
|
||||
<el-col :span="16">
|
||||
<div class="blueTip">
|
||||
产量转化效率
|
||||
</div>
|
||||
<bm-line-bar :chartHeight="chartHeight" :legendList="legendList" :chartMsg="chartMsg" :chartId="chartId"
|
||||
:chartNum="chartNum" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blueTip">
|
||||
{{ title }}
|
||||
</div>
|
||||
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendList"
|
||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else>
|
||||
<!-- <el-col :span="24"> -->
|
||||
<div class="blueTip">
|
||||
产量转化效率
|
||||
</div>
|
||||
<bm-line-bar :chartHeight="chartHeight" :legendList="legendList" :chartMsg="chartMsg" :chartId="chartId"
|
||||
:chartNum="chartNum" />
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<div class="blueTip">
|
||||
{{ title }}
|
||||
</div>
|
||||
<produce-line-bar-year-target :chartHeight="chartHeight" :legendList="legendList"
|
||||
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" :table-data="tableData"
|
||||
:max-height="tableH" />
|
||||
</div>
|
||||
@@ -78,9 +107,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProduceSituationData } from '@/api/report';
|
||||
import bmSearchBar from "./components/bmSearchBar.vue";
|
||||
import BmLineBar from "./components/bmLineBar.vue";
|
||||
import { getProduceTransData, exportProduceTransData } from '@/api/report';
|
||||
import bmSearchBar from "./components/bmSearchBar";
|
||||
import BmLineBar from "./components/produceLineBar.vue";
|
||||
import produceLineBarYearTarget from "./components/produceLineBarYearTarget.vue";
|
||||
|
||||
import ButtonNav from '@/components/ButtonNav'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
@@ -95,11 +126,11 @@ export default {
|
||||
pageSize: 999,
|
||||
// size: 10,
|
||||
// current: 1,
|
||||
factory: null,
|
||||
factorys: null,
|
||||
// total: 0,
|
||||
type: 2,
|
||||
startDate: undefined,
|
||||
endDate: undefined,
|
||||
date: 2,
|
||||
beginTime: undefined,
|
||||
endTime: undefined,
|
||||
reportTime: []
|
||||
},
|
||||
timeList: [
|
||||
@@ -124,35 +155,133 @@ export default {
|
||||
chartHeight: this.tableHeight(137) / 2 - 111,
|
||||
tableH: this.tableHeight(137) / 2 - 70,
|
||||
legendList: [
|
||||
{ id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
|
||||
{ id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
|
||||
{ id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
|
||||
{
|
||||
id: 1, name: "综合良率", type: 2, color: "#FFCE6A"
|
||||
},
|
||||
{
|
||||
id: 2, name: "FTO投入", type: 1, color: "#8EF0AB"
|
||||
},
|
||||
{ id: 3, name: "芯片产量", type: 1, color: "#288AFF" },
|
||||
{
|
||||
id: 3, name: "标准组件产量", type: 1, color: "#288AFF"
|
||||
},
|
||||
],
|
||||
chartMsg: {
|
||||
color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
|
||||
xData: ["成都", "邯郸", "瑞昌"],
|
||||
yName: "单位/%",
|
||||
chartMsgYearTarget: {
|
||||
color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
|
||||
xData: [],
|
||||
// yName: "单位/%",
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
name: "单位/片",
|
||||
nameTextStyle: {
|
||||
fontSize: 12,
|
||||
align: "right",
|
||||
},
|
||||
axisLabel: {},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
// inverse: true,
|
||||
name: "单位/%",
|
||||
nameTextStyle: {
|
||||
fontSize: 12,
|
||||
align: "right",
|
||||
},
|
||||
axisLabel: {},
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: "2024年4月目标值",
|
||||
name: "",
|
||||
// yAxisIndex: 0,
|
||||
data: [
|
||||
{ name: "%", value: 85 },
|
||||
{ name: "%", value: 85 },
|
||||
{ name: "%", value: 85 },
|
||||
],
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
{
|
||||
value: 1,
|
||||
itemStyle: {
|
||||
color: '#8EF0AB'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
itemStyle: {
|
||||
color: '#288AFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
itemStyle: {
|
||||
color: '#64BDFF'
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
color: '#FFCE6A'
|
||||
}
|
||||
}],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
color: "#FFAE17",
|
||||
position: [-18, -16],
|
||||
color: "#68C483",
|
||||
formatter: function (params) {
|
||||
return params.value.toFixed(2) + "%";
|
||||
return params.value + "片";
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "2023年4月",
|
||||
name: '销量折线图',
|
||||
type: 'bar',
|
||||
data: [0, 0, 0,
|
||||
{
|
||||
value: 5,
|
||||
itemStyle: {
|
||||
color: '#FFCE6A'
|
||||
}
|
||||
}],
|
||||
barWith: "40%",
|
||||
label: {
|
||||
show: true,
|
||||
position: "top",
|
||||
formatter: "{c}%"
|
||||
},
|
||||
lineStyle: {
|
||||
color: "#ffb122"
|
||||
},
|
||||
yAxisIndex: 1
|
||||
}
|
||||
],
|
||||
},
|
||||
chartMsg: {
|
||||
color: ["#8EF0AB", "#288AFF", '#64BDFF', "#FFCE6A",],
|
||||
xData: [],
|
||||
yName: "",
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
name: "单位/片",
|
||||
nameTextStyle: {
|
||||
fontSize: 12,
|
||||
align: "right",
|
||||
},
|
||||
axisLabel: {},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "单位/%",
|
||||
nameTextStyle: {
|
||||
fontSize: 12,
|
||||
align: "right",
|
||||
},
|
||||
axisLabel: {},
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: "FTO投入",
|
||||
data: [
|
||||
{ name: "%", value: 57.5 },
|
||||
{ name: "%", value: 21.66 },
|
||||
@@ -170,7 +299,7 @@ export default {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "2024年4月",
|
||||
name: "芯片产量",
|
||||
data: [
|
||||
{ name: "%", value: 23.33 },
|
||||
{ name: "%", value: 7.02 },
|
||||
@@ -187,6 +316,44 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "标准组件产量",
|
||||
data: [
|
||||
{ name: "%", value: 23.33 },
|
||||
{ name: "%", value: 7.02 },
|
||||
{ name: "%", value: 80.2 },
|
||||
],
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: [0, -16],
|
||||
color: "#64BDFF",
|
||||
formatter: function (params) {
|
||||
return params.value.toFixed(2) + "%";
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "综合良率",
|
||||
data: [
|
||||
{ name: "%", value: 85 },
|
||||
{ name: "%", value: 85 },
|
||||
{ name: "%", value: 85 },
|
||||
],
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
// barWidth: 20,
|
||||
symbolSize: 6,
|
||||
yAxisIndex: 1,
|
||||
label: {
|
||||
show: true,
|
||||
color: "#FFAE17",
|
||||
formatter: function (params) {
|
||||
return params.value.toFixed(2) + "%";
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
chartId: "chipYieldBMChart",
|
||||
@@ -196,6 +363,7 @@ export default {
|
||||
components: {
|
||||
bmSearchBar,
|
||||
BmLineBar,
|
||||
produceLineBarYearTarget,
|
||||
ButtonNav
|
||||
},
|
||||
computed: {
|
||||
@@ -279,13 +447,13 @@ export default {
|
||||
this.start = undefined
|
||||
this.end = undefined
|
||||
} else {
|
||||
this.listQuery.startDate = Number(this.start)
|
||||
this.listQuery.endDate = Number(this.end)
|
||||
this.listQuery.beginTime = Number(this.start)
|
||||
this.listQuery.endTime = Number(this.end)
|
||||
}
|
||||
}
|
||||
if (!this.start && !this.end) {
|
||||
this.listQuery.startDate = undefined
|
||||
this.listQuery.endDate = undefined
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
// console.log(e);
|
||||
},
|
||||
@@ -304,12 +472,12 @@ export default {
|
||||
});
|
||||
this.listQuery.reportTime = [];
|
||||
} else {
|
||||
this.listQuery.startDate = this.listQuery.reportTime[0]
|
||||
this.listQuery.endDate = this.listQuery.reportTime[1]
|
||||
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||
this.listQuery.endTime = this.listQuery.reportTime[1]
|
||||
}
|
||||
} else {
|
||||
this.listQuery.startDate = undefined
|
||||
this.listQuery.endDate = undefined
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
onValueChange(picker, k) { // 选中近k周后触发的操作
|
||||
@@ -324,15 +492,15 @@ export default {
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.listQuery.startDate = this.date1
|
||||
this.listQuery.endDate = this.date2
|
||||
// this.listQuery.startDate = Number(moment(this.start.getTime()).format('YYYYWW'))
|
||||
// this.listQuery.endDate = Number(moment(this.end.getTime()).format('YYYYWW'))
|
||||
this.listQuery.beginTime = this.date1
|
||||
this.listQuery.endTime = this.date2
|
||||
// this.listQuery.beginTime = Number(moment(this.start.getTime()).format('YYYYWW'))
|
||||
// this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
|
||||
}
|
||||
}
|
||||
if (!this.start && !this.end) {
|
||||
this.listQuery.startDate = undefined
|
||||
this.listQuery.endDate = undefined
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
changeDayTime() {
|
||||
@@ -345,12 +513,12 @@ export default {
|
||||
});
|
||||
this.listQuery.reportTime = [];
|
||||
} else {
|
||||
this.listQuery.startDate = this.listQuery.reportTime[0]
|
||||
this.listQuery.endDate = this.listQuery.reportTime[1]
|
||||
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||
this.listQuery.endTime = this.listQuery.reportTime[1]
|
||||
}
|
||||
} else {
|
||||
this.listQuery.startDate = undefined
|
||||
this.listQuery.endDate = undefined
|
||||
this.listQuery.beginTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
},
|
||||
getOverView() {
|
||||
@@ -368,65 +536,118 @@ export default {
|
||||
},
|
||||
async getDataList() {
|
||||
this.otherProps = []
|
||||
this.xData = []
|
||||
this.chartMsg.xData = []
|
||||
console.log(this.listQuery);
|
||||
if (this.listQuery.type == 3) {
|
||||
this.listQuery.startDate = this.listQuery.reportTime[0]
|
||||
this.listQuery.endDate = this.listQuery.reportTime[1]
|
||||
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||
this.listQuery.endTime = this.listQuery.reportTime[1]
|
||||
}
|
||||
let arr = []
|
||||
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
|
||||
this.listQuery.factory = arr
|
||||
const res = await getProduceSituationData(this.listQuery)
|
||||
this.listQuery.factorys = arr
|
||||
const res = await getProduceTransData(this.listQuery)
|
||||
let dataArr = [{
|
||||
factory: null,
|
||||
item: 'FTO投入',
|
||||
unit: '片'
|
||||
item: '芯片总功率',
|
||||
unit: 'MW'
|
||||
},
|
||||
{
|
||||
factory: null,
|
||||
item: '芯片产量',
|
||||
unit: '片'
|
||||
item: '标准组件总功率',
|
||||
unit: 'MW'
|
||||
},
|
||||
{
|
||||
factory: null,
|
||||
item: '标准组件产量',
|
||||
unit: '片'
|
||||
},
|
||||
{
|
||||
factory: null,
|
||||
item: '综合良率',
|
||||
item: '转化效率',
|
||||
unit: '%'
|
||||
},]
|
||||
res.data.list.forEach((ele, index) => {
|
||||
let i = index + 1
|
||||
ele.titleValue
|
||||
this.xData.push(ele.titleValue)
|
||||
this.otherProps.push({
|
||||
label: ele.titleValue,
|
||||
props: 'value' + i
|
||||
}
|
||||
]
|
||||
res.data.forEach(element => {
|
||||
element.list.forEach((ele, index) => {
|
||||
let i = index + 1
|
||||
this.chartMsg.xData.push(ele.reportTimep)
|
||||
this.otherProps.push({
|
||||
label: ele.reportTimep,
|
||||
props: 'value' + i
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
console.log(this.otherProps)
|
||||
res.data.list.forEach((ele, index) => {
|
||||
res.data.forEach((ele, index) => {
|
||||
let i = index + 1
|
||||
let m = 'value' + i
|
||||
ele.productionSituationDataVOList.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
|
||||
})
|
||||
ele.list.forEach((item, index) => {
|
||||
let i = index + 1
|
||||
let m = 'value' + i
|
||||
// ele.productionSituationDataVOList.forEach((item) => {
|
||||
dataArr[0]['' + m + ''] = item.chipTotalPowers
|
||||
dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
dataArr[3].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
dataArr[1]['' + m + ''] = ele.scTotalPowers
|
||||
dataArr[2]['' + m + ''] = ele.conversionEfficiency
|
||||
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
|
||||
// })
|
||||
// ele.titleValue
|
||||
// .push({
|
||||
// label: ele.titleValue,
|
||||
// props: 'value' + index + 1,
|
||||
// })
|
||||
})
|
||||
// ele.productionSituationDataVOList.forEach((item) => {
|
||||
// dataArr[0]['' + m + ''] = item.chipTotalPowers
|
||||
// dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
// dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
// dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
// dataArr[3].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
|
||||
// dataArr[1]['' + m + ''] = ele.scTotalPowers
|
||||
// dataArr[2]['' + m + ''] = ele.conversionEfficiency
|
||||
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
|
||||
// })
|
||||
// ele.titleValue
|
||||
// .push({
|
||||
// label: ele.titleValue,
|
||||
// props: 'value' + index + 1,
|
||||
// })
|
||||
})
|
||||
for (let i in dataArr[0]) {
|
||||
this.chartMsg.series[0].name = dataArr[0]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[0].data.push({
|
||||
name: dataArr[0]['item'],
|
||||
name: dataArr[0][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
for (let i in dataArr[1]) {
|
||||
this.chartMsg.series[1].name = dataArr[1]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[1].data.push({
|
||||
name: dataArr[1]['item'],
|
||||
name: dataArr[1][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
for (let i in dataArr[2]) {
|
||||
this.chartMsg.series[2].name = dataArr[2]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[2].data.push({
|
||||
name: dataArr[2]['item'],
|
||||
name: dataArr[2][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
for (let i in dataArr[3]) {
|
||||
this.chartMsg.series[3].name = dataArr[3]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[3].data.push({
|
||||
name: dataArr[3]['item'],
|
||||
name: dataArr[3][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// this.tableProps = otherProps
|
||||
// res.data.list.forEach((ele) => {
|
||||
// console.log(ele);
|
||||
@@ -442,14 +663,50 @@ export default {
|
||||
// dataArr.push(obj)
|
||||
// })
|
||||
// })
|
||||
for (let i in dataArr[0]) {
|
||||
this.chartMsg.series[0].name = dataArr[0]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[0].data.push({
|
||||
name: dataArr[0]['item'],
|
||||
value: dataArr[0][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
for (let i in dataArr[1]) {
|
||||
this.chartMsg.series[1].name = dataArr[1]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[1].data.push({
|
||||
name: dataArr[1]['item'],
|
||||
value: dataArr[1][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
for (let i in dataArr[2]) {
|
||||
this.chartMsg.series[2].name = dataArr[2]['item']
|
||||
if (i.search('value') === 0) {
|
||||
this.chartMsg.series[2].data.push({
|
||||
name: dataArr[2]['item'],
|
||||
value: dataArr[2][i]
|
||||
})
|
||||
}
|
||||
}
|
||||
// for (let i in dataArr[3]) {
|
||||
// this.chartMsg.series[3].name = dataArr[3]['item']
|
||||
// if (i.search('value') === 0) {
|
||||
// this.chartMsg.series[3].data.push({
|
||||
// name: dataArr[3]['item'],
|
||||
// name: dataArr[3][i]
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
console.log(dataArr)
|
||||
this.tableData = dataArr
|
||||
// this.tableProps.push()
|
||||
this.listQuery.total = res.data.total
|
||||
if (this.listQuery.total > 0) {
|
||||
this.tableData.forEach(item => {
|
||||
item.startTime = item.startDate ? item.startDate[0] + '-' + item.startDate[1] + '-' + item.startDate[2] : '--'
|
||||
item.endTime = item.endDate ? item.endDate[0] + '-' + item.endDate[1] + '-' + item.endDate[2] : '--'
|
||||
item.beginTime = item.beginTime ? item.beginTime[0] + '-' + item.beginTime[1] + '-' + item.beginTime[2] : '--'
|
||||
item.endTime = item.endTime ? item.endTime[0] + '-' + item.endTime[1] + '-' + item.endTime[2] : '--'
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -465,6 +722,13 @@ export default {
|
||||
console.log("=========================");
|
||||
},
|
||||
handleExport() {
|
||||
let fileName = "产量转化效率.xls";
|
||||
exportProduceTransData(this.listQuery)
|
||||
.then((response) => {
|
||||
this.$download.excel(response, fileName);
|
||||
this.$message.success("导出成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
console.log("导出");
|
||||
},
|
||||
},
|
||||
@@ -477,7 +741,7 @@ export default {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 16px 16px 0 16px;
|
||||
margin-bottom: 8px;
|
||||
margin: 8px 0px;
|
||||
}
|
||||
|
||||
.containerTop {
|
||||
|
||||
Reference in New Issue
Block a user