修改
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);
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<!--
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-28 13:42:51
|
||||
* @LastEditTime: 2024-05-31 13:26:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<!--
|
||||
filename: button.vue
|
||||
author: liubin
|
||||
date: 2024-04-16 15:02:34
|
||||
description:
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
@@ -50,7 +57,7 @@ button {
|
||||
padding: 12px;
|
||||
padding-left: 20px;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-size: 18px;
|
||||
letter-spacing: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-23 15:49:14
|
||||
* @LastEditTime: 2024-05-29 10:56:21
|
||||
* @LastEditTime: 2024-05-31 16:06:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<!--
|
||||
filename: BarChartBase.vue
|
||||
author: liubin
|
||||
date: 2024-04-10 08:59:28
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<chart-container class="bar-chart-base">
|
||||
|
||||
Reference in New Issue
Block a user