<template>
  <div id="index">
    <el-row>
      <el-col :span="24" class="main">
        <el-col :span="24" class="one">
          <el-col :span="24" class="one_1"> 保安培训机构资料审核查询 </el-col>
          <el-col :span="24" class="one_2">
            <el-form ref="searchFrom" :model="searchFrom" label-width="140px">
              <el-col :span="24" class="one_2txt">
                <el-col :span="16">
                  <el-form-item label="企业名称">
                    <el-input v-model="searchFrom.company_name"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="材料审核意见">
                    <el-select v-model="searchFrom.examine_reason" clearable placeholder="请选择">
                      <el-option label="是" value="是"> </el-option>
                      <el-option label="否" value="否"> </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-col>
              <el-col :span="24" class="one_2txt">
                <el-col :span="8">
                  <el-form-item label="管辖单位">
                    <el-input v-model="searchFrom.tube_company"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="法人姓名">
                    <el-input v-model="searchFrom.legal_name"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="法人身份号码">
                    <el-input v-model="searchFrom.legal_card"></el-input>
                  </el-form-item>
                </el-col>
              </el-col>
              <el-col :span="24" class="one_2txt">
                <el-col :span="16">
                  <el-form-item label="提交时间">
                    <el-date-picker
                      v-model="searchFrom.submit_date"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="8" class="btn">
                  <el-button type="primary" size="mini" @click="search()">查询</el-button>
                </el-col>
              </el-col>
            </el-form>
          </el-col>
        </el-col>
        <el-col :span="24" class="two">
          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @approve="toApprove" @view="toView"> </data-table>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
const { industry_type, industry_cell, personal_status, nation } = require('@common/src/layout/deploy/dict');
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'index',
  props: {},
  components: {},
  data: function () {
    return {
      // 查询
      searchFrom: {},
      // 列表
      fields: [
        { label: '企业名称', model: 'company_name' },
        { label: '企业类别', model: 'industry_type' },
        { label: '法定负责人', model: 'legal_personal' },
        { label: '联系人', model: 'contact' },
        { label: '联系电话', model: 'phone' },
        { label: '提交时间', model: 'submit_date' },
        { label: '管辖单位', model: 'tube_company' },
      ],
      opera: [
        { label: '审批', method: 'approve' },
        { label: '详情', method: 'view' },
      ],
      list: [
        {
          id: '1',
          company_name: '2',
        },
      ],
      total: 0,
    };
  },
  created() {},
  methods: {
    async search() {
      console.log(this.searchFrom);
    },
    // 审批
    toApprove({ data }) {},
    // 详情
    toView({ data }) {
      this.$router.push({ path: '/adminPolice/permit/pxslsqsl/info', query: { id: data.id } });
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    .one_1 {
      height: 40px;
      line-height: 40px;
      border-bottom: 1px solid #ccc;
      margin: 0 0 10px 0;
      font-size: 18px;
      font-weight: bold;
    }
    .one_2 {
      .one_2txt {
        border: 1px solid #ccc;
        /deep/.el-form-item {
          margin: 0;
        }
        /deep/.el-date-editor.el-input,
        .el-date-editor.el-input__inner {
          width: 100%;
        }
        /deep/.el-select {
          width: 100%;
        }
        .btn {
          text-align: right;
          padding: 5px 5px;
        }
      }
    }
  }
}
</style>
