<template>
  <div>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        label="id"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.id }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="企业名称"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.enterpriseName }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="法定代表人"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.legalPerson }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="经营执照凭证号码"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.businessLicenseNumber }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="企业成立日期"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.estabinessDate }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="注册地址"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.address }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="企业状态"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px" v-if="scope.row.status==1">正常</span>
          <span style="margin-left: 10px" v-if="scope.row.status==2">停用</span>
        </template>
      </el-table-column>

      <el-table-column
        label="企业入住平台日期"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.registrationDate }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="会员级别"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.member }}</span>
        </template>
      </el-table-column>

      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            size="mini"
            @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
          <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.$index, scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）,
//例如：import 《组件名称》 from '《组件路径》,
import {findEnterpriseList} from "@/api/firm/enter";
export default {
  //import引入的组件需要注入到对象中才能使用"
  components: {},
  props: {},
  data() {
    //这里存放数据"

    return {
      tableData:[],
      enterpriseForm:{},
    };
  },
  //计算属性 类似于data概念",
  computed: {},
  //监控data中的数据变化",
  watch: {},
  //方法集合",
  methods: {
    findEnterpriseList(){
      findEnterpriseList(this.enterpriseForm).then((res)=>{
        this.tableData=res.data;
      })
    }
  },
  //生命周期 - 创建完成（可以访问当前this实例）",
  created() {
    this.findEnterpriseList();
  },
  //生命周期 - 挂载完成（可以访问DOM元素）",
  mounted() {
  },
  beforeCreate() {
  }, //生命周期 - 创建之前",
  beforeMount() {
  }, //生命周期 - 挂载之前",
  beforeUpdate() {
  }, //生命周期 - 更新之前",
  updated() {
  }, //生命周期 - 更新之后",
  beforeDestroy() {
  }, //生命周期 - 销毁之前",
  destroyed() {
  }, //生命周期 - 销毁完成",
  activated() {
  } //如果页面有keep-alive缓存功能，这个函数会触发",
};
</script>
<style scoped>

</style>
