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