<template>
  <div id="info-1">
    <el-row>
      <el-col :span="24" class="main">
        <el-col :span="24" class="one">
          <el-form ref="info" :model="info" label-width="130px">
            <el-col :span="24">
              <el-form-item label="保安员证编码" prop="baoan_num">
                <el-input v-model="info.baoan_num" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="保安员姓名" prop="name">
                <el-input v-model="info.name" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="公民身份证号" prop="card">
                <el-input v-model="info.card" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="保安员等级" prop="exam_grade">
                <el-input v-model="info.exam_grade" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="打印公安机关名称" prop="cert_police">
                <el-input v-model="info.cert_police" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="申领原因" prop="receive_reason">
                <el-input v-model="info.receive_reason" readonly type="textarea" rows="2"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="打印人" prop="print_personal">
                <el-input v-model="info.print_personal" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="打印时间" prop="print_date">
                <el-input v-model="info.print_date" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="领取时间" prop="receive_date">
                <el-input v-model="info.receive_date" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="领取姓名" prop="receive_name">
                <el-input v-model="info.receive_name" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="领取人身份证号" prop="receive_card">
                <el-input v-model="info.receive_card" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="领取人联系电话" prop="receive_phone">
                <el-input v-model="info.receive_phone" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="登记人" prop="register_personal">
                <el-input v-model="info.register_personal" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="登记时间" prop="register_date">
                <el-input v-model="info.register_date" readonly></el-input>
              </el-form-item>
            </el-col>
          </el-form>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info-1',
  props: {
    info: { type: Object },
  },
  components: {},
  data: function () {
    return {};
  },
  created() {},
  methods: {
    // 取消保存
    close() {
      this.$emit('close');
    },
    onSubmit(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.$emit('onSubmit', { data: this.form });
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped></style>
