烟花爆竹批发企业仓库安全风险监测前端
zhouwx
2025-04-03 15c3a0082b51422801f1985e5d9e68eef76c3039
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
<template>
  <div class="form-container">
      <div class="certContent" @click="getPdf()">
        <div class="certNo">证书编号:新应急({{ info.bigClassifyName }})- {{info.id?.toString().padStart(5, '0')}}</div>
        <div class="main-content">
          兹聘任{{info.name}}同志为自治区应急管理厅安全生产{{info.domain}}领域{{info.ratingLevel == 1?'一级':info.ratingLevel == 2?'二级':info.ratingLevel == 3?'三级':''}}专家,聘任期为{{info.employmentDateStart?.substring(0,4)}}年{{info.employmentDateStart?.substring(5,7)}}月至{{info.employmentDateEnd?.substring(0,4)}}年{{info.employmentDateEnd?.substring(5,7)}}月。
        </div>
        <div class="main-content">
          特发此证!
        </div>
        <div class="footer-content">
          新疆维吾尔自治区应急管理厅<br/>
          {{info.employmentDateStart?.substring(0,4)}}年{{info.employmentDateStart?.substring(5,7)}}月
        </div>
      </div>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs, onMounted, nextTick} from 'vue'
import {ElMessage, ElMessageBox} from "element-plus"
import htmlToPdf from '@/utils/htmlToPdf';
import { useRoute } from 'vue-router'
const { proxy } = getCurrentInstance();
const route = useRoute();
const data = reactive({
  info: {}
})
const {info} = toRefs(data)
onMounted(()=>{
  data.info = route.query
  nextTick(()=>{
    getPdf()
  })
})
 
function getPdf() {
  let title = data.info.name + '专家聘书'
  htmlToPdf(title);
}
 
onMounted(()=>{
 
})
</script>
 
<style scoped lang="scss">
@font-face {
  font-family: "fangzhengKT";
  src: url("@/assets/styles/font/fangzhengKT.ttf");
  font-style: normal;
  font-weight: normal;
}
.form-container{
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
 
  .certContent{
    width: calc(1920px * 0.8);
    height: calc(1280px * 0.8);
    background: url("@/assets/images/certBg.jpg") no-repeat center;
    background-size: contain;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 420px 300px 120px;
    color: #333;
    position: relative;
 
    .certNo{
      position: absolute;
      left: 235px;
      top: 130px;
    }
 
    .main-content{
      width: 100%;
      font-size: 2.5rem;
      text-align: left;
      line-height: 1.8;
      text-indent: 5rem;
      letter-spacing: 2px;
      font-family: 'fangzhengKT';
    }
 
    .footer-content{
      font-size: 1.8rem;
      transform: translate(250px,50px);
      text-align: center;
      line-height: 1.8;
    }
  }
}
</style>