拖旺项目:聊城公交辅助决策系统
master
2022-04-29 941f6f70206d33c3f507c092c32fc5647a240c37
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<template>
    <div class="v-asseaa-report-create colorfff">
        <div class="_create-content">
            <div class="_box">
                <div class="g-action-btn _export-btn">
                    <div class="action-item orange pointer" @click="generateReport">
                        数据导出
                    </div>
                </div>
                <vue-html2pdf
                    :show-layout="true"
                    :float-layout="true"
                    :enable-download="true"
                    :preview-modal="true"
                    :paginate-elements-by-height="1400"
                    filename="运营评估报告"
                    :pdf-quality="2"
                    :manual-pagination="true"
                    pdf-format="a4"
                    pdf-orientation="landscape"
                    pdf-content-width="1180px"
            
                    @progress="onProgress($event)"
                    @hasStartedGeneration="hasStartedGeneration()"
                    @hasGenerated="hasGenerated($event)"
                    ref="html2Pdf"
                >
                    <pdfContent @domRendered="domRendered()" slot="pdf-content" />
            </vue-html2pdf>
                
            </div>
 
        
        </div>
    </div>
  
</template>
<script>
import * as echarts from "echarts";
import moment from "moment";
import pdfContent from '@/components/assessReport/pdfContent';
import VueHtml2pdf from 'vue-html2pdf'
export default {
  name: "driverappraise",
  components: {VueHtml2pdf, pdfContent },
  data() {
    return {
     
    };
  },
  created() {
    
  },
  computed: {
     
  },
  activated() {
    this.getData();
  },
  mounted() {
  },
  methods: {
    generateReport () {
        this.$refs.html2Pdf.generatePdf()
     },
  },
};
</script>
 
<style lang="less">
.v-asseaa-report-create {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    .vue-html2pdf .layout-container.show-layout {
        z-index: 1 !important;
        top: 80px;
        background: #141A26;
        padding-bottom: 200px;
    }
    .page-break-after {
        page-break-after: always;
 
    }
 
 
    ._create-content {
        width: 1180px;
        position: relative;
        ._export-btn  {
            position: absolute;
            right: -100px;
            z-index: 1000;
        }
 
    }
}
 
</style>