<template>
  <div id="debt">
    <el-row>
      <el-col :span="24" class="debt">
        <el-col :span="24" class="top">
          <topInfo :topTitle="topTitle"></topInfo>
        </el-col>
        <el-col :span="24" class="search"> </el-col>
        <el-col :span="24" class="main">
          <newsInfos :debtTable="debtTable" :total="total" @handleClick="handleClick" :noshenhetable="noshenhetable" :shenheTable="shenheTable"></newsInfos>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import topInfo from '@/layout/common/topInfo.vue';
import newsInfos from '@/layout/supermarket/newsInfos.vue';
// import { createNamespacedHelpers } from 'vuex';
// const { mapActions } = createNamespacedHelpers('companyup');
export default {
  name: 'dept',
  props: {},
  components: {
    topInfo, //头部导航
    // searchInfo, //搜素
    newsInfos, //其他用户列表
  },
  data: () => ({
    topTitle: '股权产品',
    display: 'none',
    debtTable: [
      {
        name: '产品1',
        pic: require('@/assets/logo.png'),
        status: '1',
      },
    ],
    shenheTable: [],
    noshenhetable: [],
    total: 1,
  }),
  created() {
    // this.search();
  },
  computed: {},
  methods: {
    // ...mapActions(['query', 'delete','update','fetch']),
    // async search({ skip = 0, limit = 10, ...info } = {}) {
    // const res = await this.query({ skip, limit, ...info });
    // var weishenhe = res.data.filter(item => item.status === '0');
    // var success = res.data.filter(item => item.status === '1');
    // var shibai = res.data.filter(item => item.status === '2');
    // this.$set(this, `debtTable`, weishenhe);
    // this.$set(this, `shenheTable`, success);
    // this.$set(this, `noshenhetable`, shibai);
    // },

    // 修改
    handleClick(newid) {
      this.$router.push({ path: '/supermarket/debtdetails', query: { id: newid } });
    },
  },
};
</script>

<style lang="less" scoped>
.debt {
  padding: 20px;
}
.top {
  border-bottom: 1px solid #ccc;
}
</style>
