<template>
  <div id="seniority-1">
    <el-row>
      <el-col :span="24" class="main">
        <el-form :model="form" ref="form" label-width="140px">
          <el-col :span="24" class="one">
            <el-col :span="2" class="one_1"> 审查情况 </el-col>
            <el-col :span="22">
              <el-col :span="12">
                <el-form-item label="是否受到过收容教育，强制隔离戒毒，劳动教养者3次以上行政拘留" prop="check_xzjl" label-width="500px">
                  <el-radio-group v-model="form.check_xzjl" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否因故意犯罪被刑事处罚" prop="check_xscf" label-width="500px">
                  <el-radio-group v-model="form.check_xscf" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否吊销保安员证未满3年" prop="check_certthr" label-width="500px">
                  <el-radio-group v-model="form.check_certthr" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否两次被吊销保安员证" prop="check_certtwo" label-width="500px">
                  <el-radio-group v-model="form.check_certtwo" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="疑似精神病人，风险评估不能担任保安员" prop="check_fxpg" label-width="500px">
                  <el-radio-group v-model="form.check_fxpg" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否有其他不合适担任保安的综合评定" prop="check_zhpd" label-width="500px">
                  <el-radio-group v-model="form.check_zhpd" disabled>
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-col>
          </el-col>
          <el-col :span="24" class="two">
            <el-col :span="24" class="two_2">
              <el-form-item label="报名考试审核意见" prop="exam_examinereason" readonly>
                <el-input v-model="form.exam_examinereason" type="textarea" placeholder="请输入报名考试审核意见"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="报名考试审核结果" prop="exam_examineresult">
                <el-input v-model="form.exam_examineresult" placeholder="请输入报名考试审核结果" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="报名考试审核机关" prop="exam_office">
                <el-input v-model="form.exam_office" placeholder="请输入报名考试审核机关" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="报名考试审核人" prop="exam__examine">
                <el-input v-model="form.exam__examine" placeholder="请输入报名考试审核人" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="报名考试审核时间" prop="baoan_examinedate">
                <el-date-picker
                  v-model="form.baoan_examinedate"
                  placeholder="请选择"
                  value-format="yyyy-MM-dd"
                  format="yyyy-MM-dd"
                  type="date"
                  style="width: 100%"
                  readonly
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24" class="two">
            <el-col :span="24" class="two_2">
              <el-form-item label="保安员报名审批意见" prop="baoan_examine">
                <el-input v-model="form.baoan_examine" type="textarea" placeholder="请输入保安员报名审批意见" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="发证审批结果" prop="issue_result">
                <el-input v-model="form.issue_result" placeholder="请输入发证审批结果" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="发证审批公安机关" prop="issue_office">
                <el-input v-model="form.issue_office" placeholder="请输入发证审批公安机关" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="发证审核人" prop="issue_examinepersonal">
                <el-input v-model="form.issue_examinepersonal" placeholder="请输入发证审核人" readonly></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" class="two_2">
              <el-form-item label="发证审批时间" prop="issue_date">
                <el-date-picker
                  v-model="form.issue_date"
                  placeholder="请选择"
                  value-format="yyyy-MM-dd"
                  format="yyyy-MM-dd"
                  type="date"
                  style="width: 100%"
                  readonly
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-col>
        </el-form>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
const { mapActions: security_guard_qualifications } = createNamespacedHelpers('security_guard_qualifications');

export default {
  name: 'seniority-1',
  props: {
    basic_id: { type: String },
  },
  components: {},
  data: function () {
    return {
      form: {},
    };
  },
  created() {},
  methods: {
    ...security_guard_qualifications(['fetch']),
    async search() {
      let res = await this.fetch({ security_guard_id: this.basic_id });
      if (this.$checkRes(res)) {
        this.$set(this, `form`, res.data);
      }
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    basic_id: {
      deep: true,
      immediate: true,
      handler(val) {
        if (val) this.search();
      },
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    margin: 0 0 10px 0;
    .one_1 {
      border: 1px solid #ccc;
      height: 125px;
      text-align: center;
      line-height: 125px;
    }
    /deep/.el-form-item {
      margin: 0;
      border: 1px solid #ccc;
    }
  }
  .two {
    .two_2 {
      margin: 10px 0;
      /deep/.el-form-item {
        margin: 0;
      }
    }
  }
}
</style>
