zhongrj
2024-03-27 cc1c0a396698648256c350f6f0fe2cb2f0b02c7e
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<template>
  <div class="baoanzheng-1" id="baoanzheng-1">
    <div class="baz-main-1" ref="baoanzheng1">
      <img class="baz-main-img1" :src="data.avatar" alt="" />
      <div class="baz-main-img1-2">
        <img class="baz-main-img1-2-i" :src="erweima" alt="" />
      </div>
      <div class="b-m-ups-1">
        {{ data.realName }}
      </div>
      <div class="b-m-ups-1">
        {{ data.$sex }}
      </div>
      <div class="b-m-ups-1 securitynumber-1">
        {{ data.securitynumber }}
      </div>
      <div class="b-m-ups-1 b-m-ups-2">
        <!-- {{ data.securitynumber }} -->南昌市公安局
      </div>
      <div class="b-m-ups-1 b-m-ups-2">
        {{ data.paperTime || "---" }}
      </div>
    </div>
    <span slot="footer" class="dialog-footer no-print PrintBut">
      <el-button type="primary" @click="Print">打 印</el-button>
      <el-button type="primary" @click="closePrint"> 取 消 </el-button>
    </span>
  </div>
</template>
 
<script>
// export const getER = (securityNumber) => {
//     return request({
//         url: '/api/qrCode/getQrCodeBase64',
//         method: 'get',
//         params: {
//             securityNumber
//         }
//     })
// }
 
// import { getER } from "@/api/performance/performance"; //外网路径
import { getER } from "@/api/register/honor";
export default {
  props: ["data"],
  data() {
    return {
      erweima: "",
    };
  },
  mounted() {
    getER(this.data.securitynumber).then((res) => {
      this.erweima = res.data;
      // console.log(res.data);
    });
  },
  methods: {
    Print() {
      var printDom = document.getElementById("baoanzheng-1");
      printDom.style.position = "fixed";
      printDom.style.left = "-10%";
      printDom.style.width = "120%";
      printDom.style.height = "100%";
      this.$Print(this.$refs.baoanzheng1);
      printDom.style.position = "relative";
      printDom.style.left = "0";
      printDom.style.width = "100%";
      printDom.style.height = "calc(100% - 100px)";
    },
    closePrint() {
      this.$parent.closePrint();
    },
  },
};
</script>
 
<style lang="scss" scoped>
//保安证
.baoanzheng-1 {
  width: 100%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  .baz-main-1 {
    background-image: url("/img/register/bazbj2.png");
    background-size: 100% 100%;
    width: calc(1274px * 0.5) !important;
    height: calc(828px * 0.5) !important;
    position: relative;
    margin-bottom: 10px;
    .baz-main-img1 {
      width: 170px;
      position: absolute;
      left: 51px;
      top: 57px;
      height: 237px;
    }
    .baz-main-img1-2 {
      width: 91px;
      position: absolute;
      left: 474px;
      // top: 120px;
      top: 78px;
      height: 93px;
      overflow: hidden;
      .baz-main-img1-2-i {
        width: 115px;
        height: 115px;
        position: relative;
        top: -10px;
        left: -11px;
      }
    }
    .b-m-ups-1 {
      width: 50%;
      font-size: 22px;
      font-weight: 400;
      position: relative;
      top: 91px;
      left: 320px;
      margin-bottom: 20px;
    }
    // .securitynumber-1 {
    //   font-size: 22px;
    //   margin-bottom: 18px;
    // }
    .b-m-ups-2 {
      left: 358px;
    }
  }
}
</style>