printdjb.vue 1.97 KB
<!--
 * @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>