修改
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
|
||||
@click="() => $emit('update:than', i)" />
|
||||
<div class="btn-group">
|
||||
<button type="button" class="export-btn" />
|
||||
<button type="button" class="export-btn" @click="handleExport" />
|
||||
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
|
||||
@click="toggleFullScreen" />
|
||||
</div>
|
||||
@@ -25,6 +25,8 @@
|
||||
import FactorySelect from "./FactorySelect.vue";
|
||||
import screenfull from "screenfull";
|
||||
import CopilotButton from "./button.vue";
|
||||
import { exportFactoryDataExcel } from "@/api/produceData";
|
||||
|
||||
export default {
|
||||
name: "FactoryDataHeader",
|
||||
components: { CopilotButton, FactorySelect },
|
||||
@@ -55,6 +57,15 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
handleExport() {
|
||||
exportFactoryDataExcel({
|
||||
factoryId: this.companyId,
|
||||
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||
}).then(response => {
|
||||
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
||||
// this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
toggleFullScreen() {
|
||||
this.isFullscreen = !this.isFullscreen;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user