printdjb.vue
1.97 KB
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
101
102
103
<!--
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-08-23 15:57:40
-->
<template>
  <div class="all">
    <!-- <el-button v-if="isshow" @click="printdjb" class="printdjb"
      >开始打印</el-button> -->
              <component
        :is="currentTabComponent"
        class="tab"
      ></component>
  </div>
</template>
<script>
import  djbfm  from "./components/djbfm.vue";
import  zdjbxx from "./components/zdjbxx.vue";
import  fdcq1 from "./components/fdcq1.vue";
import  fdcq2 from "./components/fdcq2.vue";
import  jsydsyq from "./components/jsydsyq.vue";
import  ldsyq from "./components/ldsyq.vue";
import  nydsyq  from "./components/nydsyq.vue";
import  yydj from "./components/yydj.vue";
import  ygdj from "./components/ygdj.vue";
import  cfdj  from "./components/cfdj.vue";
import  diyiq from "./components/diyiq.vue";
import  diyaq from "./components/diyaq.vue";
import  bdcqljqtsx from "./components/bdcqljqtsx.vue";
export default {
  components: {
    djbfm,
    zdjbxx,
    fdcq1,
    fdcq2,
    jsydsyq,
    ldsyq,
    nydsyq,
    yydj,
    cfdj,
    diyiq,
    diyaq,
    ygdj,
    bdcqljqtsx
    // currentTab:this.$route.query.content,
  },
  data() {
    return {
      isshow: true,
    };
  },
  computed: {
    currentTabComponent() {
      return this.$route.query.content
    }
  },
  mounted() {
    this.currentTab=this.$route.query.content
 this.printdjb()
  },
  methods: {
    printdjb() {
      this.isshow = false;
      setTimeout(() => {
        window.print();
      }, 200);
    },
  },
};
</script>
<style scoped lang="scss">
/* 斜线 */
.slash1 {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 133px;
  height: 1px;
  background-color: #949393;
  transform: rotate(17.93010235415598deg);
  transform-origin: top left;
}
/* 左下角文字 */
.left {
  position: absolute;
  left: 30px;
  bottom: 5px;
}
/* 右上角文字 */
.mid {
  position: absolute;
  /* 右上角 right:0; top: 0; */
  right: 29px;
  top: 4px;
}
</style>