<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="12">
                  <el-form-item label="企业名称">
                    <el-input v-model="searchFrom.company_name"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="法人姓名">
                    <el-input v-model="searchFrom.legal_personal"></el-input>
                  </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-select v-model="searchFrom.is_approve" clearable placeholder="请选择">
                      <el-option label="是" value="是"> </el-option>
                      <el-option label="否" value="否"> </el-option>
                    </el-select>
                  </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="8">
                  <el-form-item label="负责人姓名">
                    <el-input v-model="searchFrom.charge_name"></el-input>
                  </el-form-item>
                </el-col>
                <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>
              <el-col :span="24" class="one_2txt">
                <el-col :span="8">
                  <el-form-item label="负责人身份证号">
                    <el-input v-model="searchFrom.charge_card"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="16">
                  <el-form-item label="市局监管核查时间">
                    <el-date-picker
                      v-model="searchFrom.bureau_approve"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
              </el-col>
              <el-col :span="24" class="one_2txt">
                <el-col :span="24" 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"> </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: 'legal_personal' },
        { label: '法人电话', model: 'legal_phone' },
        { label: '负责人', model: 'charge_name' },
        { label: '负责人电话', model: 'charge_phone' },
        { label: '提交时间', model: 'submit_date' },
        { label: '市局监管审核时间', model: 'bureau_approve' },
        { label: '管辖单位', model: 'tube_company' },
      ],
      opera: [],
      list: [],
      total: 0,
    };
  },
  created() {},
  methods: {
    async search() {
      console.log(this.searchFrom);
    },
  },
  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>
