修改
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<CopilotButton v-for="i in ['日', '周', '月', '年']" :key="i" :label="i" :active="i === period"
|
||||
@click="() => $emit('update:period', 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" />
|
||||
<!-- <button class="times-btn"> {{ times }} </button> -->
|
||||
@@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import CopilotButton from "./button.vue";
|
||||
import screenfull from "screenfull";
|
||||
import { exportFactoryDataExcel } from "@/api/produceData";
|
||||
|
||||
export default {
|
||||
name: "CopilotHeader",
|
||||
@@ -58,6 +59,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, `生产数据.xls`);
|
||||
// this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 60000);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user