<template>
  <style id="style">
    td {
      height: 30px;
      padding: 0px;
      text-align: center;
    }

    table {
      margin: auto;
      width: 100%;
      border-collapse: collapse;
      border: 1px solid black;
    }

    h1, h2, h3, h4, h5, h6 {
      text-align: center;
    }

    .top {
      display: flex;
      justify-content: space-around;
      margin: 0px;
    }

    .bottom {
      display: flex;
      justify-content: space-around;
      margin: 5px 0 0 0;
    }
  </style>
  <div id="print">
    <h4 style="margin: 0 0 5px 0"><b>安检员无计划安检单</b></h4>
    <table border="1">
      <tr>
        <td colspan="12"><b>公司：{{gongsi}}</b></td>
      </tr>
      <tr>
      </tr>
      <tr>
        <td>安检员</td>
        <td>小区</td>
        <td>无计划总数</td>
        <td>无计划入户</td>
        <td>无计划拒检</td>
        <td>无计划到访不遇</td>
        <td>无计划未检</td>
      </tr>
      <tr v-for="item in data">
        <td>{{ item.f_checker_name }}</td>
        <td>{{ item.f_residential_area }}</td>
        <td>{{ item.noplannum }}</td>
        <td>{{ item.wuruhu }}</td>
        <td>{{ item.wujujian }}</td>
        <td>{{ item.wudaofang }}</td>
        <td>{{ item.wuweijian }}</td>
      </tr>
      <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <tr>
      </tr>
    </table>
    <p class="bottom">
      <span><b>打印人：{{ Printpeople}}</b></span>
      <span><b>打印时间：{{ PrintTime}}</b></span><br>
      <span><b>确定打印安检员考核单？</b></span>
    </p>
  </div>

  <!--  <button type="button" class="btn btn-cancel" @click="cancel()">取消</button>-->
  <!--  <print-element class="btn btn-primary" id="print1" styleid='style1' top='40' left='60' width='100%' height='100%' v-ref:printelement>打印</print-element>-->

</template>
<script>

  import co from 'co'
  import {PagedList} from 'vue-client'
  import * as Util from "../../../components/Util";
  import {toStandardTimeString} from '../../../components/Util'

  export default {
    title: '安检信息',
    data() {
      return {
        deviceCollects: [],
        isBack: false,
        datareslut: '',
        PrintTime: Util.toStandardTimeString(),
        Printpeople: this.$login.f.name,
        gongsi: this.$login.f.orgs
      }
    },
    props: ['data', 'show'],
    ready() {
      console.log("公司" + this.gongsi)
    },
    methods: {

      cancel() {
        this.showcheckmsg = false
      },

      //获取当前时间
      getNowFormatDate() {
        var date = new Date(this.userinfo.f_check_date);
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
          month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
          strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + '年' + month + '月' + strDate
          + "日" + date.getHours() + "时" + date.getMinutes() + '分'
        return currentdate;
      },
      // getId(){
      //   //tag
      // },
      //获取隐患信息
      getHidden() {
        //清空所有数据
        this.deviceCollects = []
        for (let datas of this.data) {
          this.datareslut = datas
        }

        /*setTimeout(()=> {
          //tag
          this.$parent.showcheckmsg = false
        }, 1000)*/
      },
    }
  }
</script>
<style media="screen" scoped>
  .divtext {
    min-width: 50px;
    max-width: 200px;
    border: 1px solid green;
    display: inline-block;
  }

  .bg-info {
    border-left: 5px solid #5989be;
  }

  .bg-cus-body {
    margin-left: 5px;
  }

</style>
