Administrator
2022-01-12 21c7375b7b38ebf2c8a2ca8fbf6fe9fb4f28250f
src/views/securityGuard/securityCertificate.vue
@@ -61,6 +61,9 @@
<script>
import { mapGetters } from "vuex";
import dictVertical from "../util/demo/dict-vertical.vue";
import {
  updatePaperTime
} from "@/api/system/user";
export default {
    data () {
        return {
@@ -84,7 +87,13 @@
                this.$message({ message: '请完善住址信息', type: 'warning' })
                return
            }
            var printDom = document.getElementById("securityCertificate");
            //更新发证时间
            this.updateUserInfo();
            var printDom = document.getElementById("securityCertificates");
            console.log(printDom)
            printDom.style.position = "fixed";
            printDom.style.top = "-28.5%";
            printDom.style.left = "-23%";
@@ -109,6 +118,22 @@
             */
            return [oneHoursAgoY, oneHoursAgoM]
        },
        //更新用户发证时间
        updateUserInfo () {
            var nowTime = new Date()
            var oneHoursAgo = new Date(new Date(nowTime).getTime() - 1 * 60 * 60 * 1000)
            var oneHoursAgoY = oneHoursAgo.getFullYear()
            var oneHoursAgoM = oneHoursAgo.getMonth() + 1 < 10 ? '0' + (oneHoursAgo.getMonth() + 1) : oneHoursAgo.getMonth() + 1
            var day = oneHoursAgo.getDay();
            var date = oneHoursAgoY + "-" + oneHoursAgoM + "-" + day;
            const data = {
                id:this.data.id,
                rtime:this.data.rtime,
                userType:6,
                paperTime:date
            }
            updatePaperTime(data);
        }
    },
};
</script>
@@ -139,7 +164,7 @@
}
// 标题
$upTop: 45px;
$downTop: 260px; //整体高度
$downTop: 265px; //整体高度
//经国家保安员考试审查合格。<br />特颁此证。
.security_main-title {
    position: absolute;
@@ -151,14 +176,14 @@
//发证公安机关&nbsp;(印章)
.security_m_l_center {
    position: absolute;
    top: $downTop;
    left: 15px;
    top: 267px;
    left: 30px;
    line-height: 40px;
}
//证件编号 &nbsp;
.security_m_l_down {
    position: absolute;
    top: 379px;
    top: 370px;
    left: 32px;
}
@@ -197,7 +222,7 @@
//公民身份证
.security_m_r_d {
    position: absolute;
    top: $downTop + $lineHigeht * 4;
    top: 382px;
    left: $rightLeft;
    width: $rightWidth;
    text-align: justify;
@@ -222,25 +247,25 @@
// 抬头名字
.security_m_l_titleName {
    position: absolute;
    top: 35px;
    top: 45px;
    left: 121px;
    line-height: 45px;
    letter-spacing: 3px;
}
//发证时间
$timeTop: 299px; //整体高度
$timeTop: 306px; //整体高度
//年
.security_m_l_titlepaperTimenian {
    position: absolute;
    top: $timeTop;
    left: 95px;
    left: 107px;
    line-height: 40px;
}
//月
.security_m_l_titlepaperTimeyue {
    position: absolute;
    top: $timeTop;
    left: 154px;
    left: 166px;
    line-height: 40px;
}
//日
@@ -253,30 +278,30 @@
//证件编号
.security_m_l_downsecuritynumber {
    position: absolute;
    top: 379px; //整体高度
    left: 125px;
    top: 370px; //整体高度
    left: 145px;
}
//内容
// 姓名
$centerLeft: 450px;
$centerLeft: 458px;
.security_m_r_o_right {
    position: absolute;
    top: $downTop + $lineHigeht*0+ 0px;
    top: $downTop + $lineHigeht * 0-2px;
    left: $centerLeft;
    // width: $rightWidth;
}
// 生日
.security_m_r_o_rightbirthday {
    position: absolute;
    top: $downTop + $lineHigeht * 1-2px;
    top: $downTop + $lineHigeht * 1-4px;
    left: $centerLeft;
    // width: $rightWidth;
}
// 地址
.security_m_r_o_rightaddress {
    position: absolute;
    top: $downTop + $lineHigeht * 2 -4px;
    top: $downTop + $lineHigeht * 2 -6px;
    left: $centerLeft;
    width: 160px;
    font: bold 16px 'SimSun' !important;
@@ -284,7 +309,7 @@
// 身份证
.security_m_r_o_rightcardid {
    position: absolute;
    top: $downTop + $lineHigeht * 4 +6px;
    top: $downTop + $lineHigeht * 4+6px;
    left: $centerLeft;
    // width: $rightWidth;
}