修改
Esse commit está contido em:
pai
5ac5da1bf5
commit
26cf9a6ce4
@ -12,7 +12,7 @@
|
||||
<div class="page-title">{{ companyName }}</div>
|
||||
<section class="menu2">
|
||||
<div class="btn-group">
|
||||
<el-tooltip class="item" effect="dark" content="导出" placement="top">
|
||||
<el-tooltip v-if="showPeriod" class="item" effect="dark" content="导出" placement="top">
|
||||
<button type="button" class="export-btn" @click="handleExport" />
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top">
|
||||
@ -48,10 +48,20 @@ export default {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
period(val) {
|
||||
if (val != 1) {
|
||||
this.showPeriod = true
|
||||
} else {
|
||||
this.showPeriod = false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isFullscreen: false,
|
||||
content:'全屏',
|
||||
content: '全屏',
|
||||
showPeriod:false,
|
||||
dataList: [
|
||||
{ id: 1, name: "日" },
|
||||
{ id: 2, name: "周" },
|
||||
@ -63,7 +73,8 @@ export default {
|
||||
computed: {},
|
||||
methods: {
|
||||
handleExport() {
|
||||
if (this.period != 1) {
|
||||
// if (this.period != 1) {
|
||||
this.showPeriod = true
|
||||
exportFactoryDataExcel({
|
||||
factoryId: this.companyId,
|
||||
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||
@ -72,12 +83,9 @@ export default {
|
||||
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
||||
// this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '为日的情况下没有导出功能',
|
||||
})
|
||||
}
|
||||
// } else {
|
||||
// this.showPeriod = false
|
||||
// }
|
||||
|
||||
},
|
||||
toggleFullScreen() {
|
||||
|
@ -568,15 +568,15 @@ export default {
|
||||
})
|
||||
})
|
||||
if (res.data[0].list.length != 0) {
|
||||
this.chartMsg.xData.push(res.data[0].list[0].reportTimep + '目标')
|
||||
this.chartMsg.xData.push(res.data[0].list[res.data[0].list.length-1].reportTimep + '目标')
|
||||
if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) {
|
||||
this.otherProps.push({
|
||||
label: res.data[0].list[0].reportTimep + '目标',
|
||||
label: res.data[0].list[res.data[0].list.length - 1].reportTimep + '目标',
|
||||
prop: 'dayData'
|
||||
})
|
||||
dataArr[0]['dayData'] = res.data[0].list[0].chipTarget
|
||||
dataArr[1]['dayData'] = res.data[0].list[0].standTarget
|
||||
dataArr[2]['dayData'] = res.data[0].list[0].conversionEfficiencyTarget
|
||||
dataArr[0]['dayData'] = res.data[0].list[res.data[0].list.length - 1].chipTarget
|
||||
dataArr[1]['dayData'] = res.data[0].list[res.data[0].list.length - 1].standTarget
|
||||
dataArr[2]['dayData'] = res.data[0].list[res.data[0].list.length - 1].conversionEfficiencyTarget
|
||||
}
|
||||
if (this.listQuery.date === 2 || this.listQuery.date === 3) {
|
||||
this.otherProps.push({
|
||||
@ -587,7 +587,7 @@ export default {
|
||||
dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower
|
||||
dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency
|
||||
}
|
||||
res.data.forEach((ele, index) => {
|
||||
res.data.reverse().forEach((ele, index) => {
|
||||
// let i = index + 1
|
||||
// let m = 'value' + i
|
||||
ele.list.forEach((item, index) => {
|
||||
|
Carregando…
Referência em uma nova issue
Block a user