<template>
  <div class="search-case-box">
    <navbar title="查案件"></navbar>
    <div class="title-box">
      <div class="title-h2">高效探查企业诉讼信息</div>
      <div class="search-box" @click="goSearch">
        <div>
          <van-icon name="search" />
        </div>
        <div class="search-text">请输入当事人 / 案号 / 公司名</div>
      </div>
    </div>

    <search-result-content class="padding-1rem" :caseInfoList="caseInfoList"></search-result-content>
  </div>
</template>

<script>
import { Icon, Divider, Tag, Col, Row } from 'vant';//button组件
import navbar from '../../../components/navbar/navbar.vue';
import SearchResultContent from './components/searchResultContent/searchResultContent.vue'
import { getQueryZhixing } from "@/service/api/home";

export default {
  name: "Sowing",
  data() {
    return {
      caseInfoList: []

    }
  },
  mounted() {
    this.getQueryCompanyPageData();

  },
  methods: {
    goSearch() {
      this.$router.push('/dashboard/home/searchCase/result');
    },

    async getQueryCompanyPageData() {
      let params = {
        keyword: '',// 搜索关键字
        pageNum: 1,
        pageSize: 10,
      }
      let result = await getQueryZhixing(params);
      this.caseInfoList = result.records;
    },
  },
  components: {
    VanIcon: Icon,
    Divider,
    navbar: navbar,
    SearchResultContent: SearchResultContent,
  },
}
</script>

<style scoped>
.title-box {
  height: 12rem;
  /* background: #5572f2; */
  text-align: center;
  color: #ffffff;
  margin-bottom: 16px;
  padding-top: 82px;
  background: url(../../../images/part_one/search-bg.png) no-repeat;
  background-size: 100% 100%;
}

.title-h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 24px;
}

.title-h4 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.title-h4-text {
  margin: 0 6px;
}

.search-box {
  width: calc(100% - 2rem);
  margin: 0 auto 16px;
  height: 2.6rem;
  background: #ffffff;
  color: #999999;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-radius: 6px;
  font-size: 1rem;
  padding-left: 0.625rem;
}

.search-text {
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

.box-line {
  width: 30px;
  height: 1px;
  background: #ffffff;
}

.padding-1rem {
  padding: 1rem;
}
</style>
