<template>
  <div id="recruitLists">
    <el-row>
      <el-col :span="24">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
          <el-tab-pane label="我的需求" name="first">
            <el-row style="padding: 0 20px;">
              <el-tabs v-model="activeNameFirst" @tab-click="handleClickFirst">
                <el-tab-pane label="已经审核信息" name="first">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <p class="textOver">产品：{{ item.name }}</p>
                          <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })">编辑</el-link
                            ><br />
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                            <!-- <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })"
                              >查看申请</el-link
                            > -->
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
                <el-tab-pane label="审核中信息" name="second">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <p class="textOver">产品：{{ item.name }}</p>
                          <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })">编辑</el-link
                            ><br />
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
                <el-tab-pane label="交易成功信息" name="thirth">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <p class="textOver">产品：{{ item.name }}</p>
                          <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
              </el-tabs>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="我的供给" name="second">
            <el-row style="padding: 0 20px;">
              <el-tabs v-model="activeNameFirst" @tab-click="handleClickFirst">
                <el-tab-pane label="已经审核信息" name="first">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <p class="textOver">产品：{{ item.name }}</p>
                          <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })">编辑</el-link
                            ><br />
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                            <!-- <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })"
                              >查看申请</el-link
                            > -->
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
                <el-tab-pane label="审核中信息" name="second">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <el-col :span="24" class="listName">
                            <p class="textOver">产品：{{ item.name }}</p>
                            <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                            <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                          </el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>
                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })">编辑</el-link
                            ><br />
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
                <el-tab-pane label="交易成功信息" name="thirth">
                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
                    <el-col class="xqborder">
                      <el-col :span="24" class="fbListTop">
                        <el-col :span="20"> {{ item.name }} </el-col>
                        <el-col :span="4">
                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                        </el-col>
                      </el-col>
                      <el-col :span="24" class="fbListCenter">
                        <el-col :span="6" class="fimage">
                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
                        </el-col>
                        <el-col :span="6" class="fbListCenterC">
                          <p class="textOver">产品：{{ item.name }}</p>
                          <p>类别：{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
                        </el-col>
                        <el-col :span="6" class="fbListCenterTwo">
                          <el-col :span="24">最新申请：</el-col>
                        </el-col>

                        <el-col :span="6" class="fbListCenterR">
                          <el-col :span="24" class="bainji">
                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
                          </el-col>
                        </el-col>
                      </el-col>
                    </el-col>
                  </el-col>
                  <el-col class="page" :span="24">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="currentPage"
                      layout="total,  prev, pager, next, jumper"
                      :total="total"
                    >
                    </el-pagination>
                  </el-col>
                </el-tab-pane>
              </el-tabs>
            </el-row>
          </el-tab-pane>
        </el-tabs>
        <el-link :underline="false" class="fabuBtn" @click="messFabu()">信息发布</el-link>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'recruitLists',
  props: {
    recruitData: null,
    columnName: null,
    total: null,
  },
  components: {},
  data: () => ({
    currentPage: 1,
    activeName: 'first',
    activeNameFirst: 'first',
  }),
  created() {},
  computed: {},
  methods: {
    handleDelete(item) {
      this.$emit('delete', { item });
    },
    messFabu() {
      this.$router.push({ path: '/enterprise/enterprisexuqiu' });
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
    handleClickFirst(tab, event) {
      console.log(tab, event);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.xqborder {
  width: 889px;
  height: 183px;
  border: 1px solid #ccc;
  margin-top: 20px;
}
.fbListTop {
  width: 885px;
  height: 43px;
  margin-left: 1px;
  background: #fafafa;
  line-height: 43px;
  text-indent: 10px;
  font-size: 13px;
  color: #888888;
}
.fbListCenter {
  width: 870px;
  height: 119px;
  margin: 20px 0 0 12px;
}
.fimage {
  width: 110px;
  height: 119px;
  float: left;
}
.fbListCenterC {
  width: 196px;
  border-right: 1px solid #ccc;
  height: 100px;
}
.fbListCenterC p {
  padding: 5px 0;
}
.fbListCenterR {
  border-left: 1px solid #ccc;
  width: 125px;
  height: 100px;
  float: left;
}
.listName {
  width: 196px;
  height: 30px;
  font-size: 16px;
  color: #555555;
}
.listMoney {
  height: 30px;
  font-size: 16px;
  color: #fe0000;
  width: 196px;
}
.fbListCenterTwo {
  width: 385px;
  float: left;
  margin-left: 10px;
  margin-right: 10px;
  background: #fafafa;
  height: 100px;
}
.bainji {
  padding: 0 0 0 20px;
}
.page {
  padding: 11px 0 0 0;
  text-align: center;
}
.fabuBtn {
  position: absolute;
  top: 65px;
  right: 30px;
}
</style>
