<template>
  <div class="guidance flex flexc">
    <Header>
      <div slot="title" class="title">办事指南</div>
    </Header>
    <div class="main flex1 flex flexc">
      <PageTop>
        <div slot="count" class="count">
          共计<span class="data-count">142</span>件事项
        </div>
        <SearchBox
          slot="search-right"
          width="834px"
          v-model="searchVal"
          @click="handleSearch"
        >
        </SearchBox>
      </PageTop>
      <!-- 指南列表 -->
      <div class="guidance-box flex1">
        <div class="guidance-list flex flexwrap jcb" v-if="list.length">
          <div
            class="guidance-item"
            v-for="(v, i) in list"
            :key="i"
            @click="handleCheck"
          >
            ·{{ v }}
          </div>
        </div>
        <el-empty :image-size="200" v-else></el-empty>
        <!-- 分页 -->
        <div class="tac">
          <el-pagination
            prev-text="上一页"
            next-text="下一页"
            layout="prev,next"
            hide-on-single-page
            :total="total"
            :current-page="current"
            :page-size="size"
            @current-change="changePage"
          >
          </el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Header from "@/components/Header.vue";
import PageTop from "@/components/PageTop.vue";
import SearchBox from "@/components/SearchBox.vue";
export default {
  components: {
    Header,
    PageTop,
    SearchBox,
  },
  data() {
    return {
      searchVal: "",
      list: [
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
        "翻建建造大修自住住房提取",
      ],
      total: 0,
      current: 1,
      size: 12,
    };
  },
  methods: {
    handleSearch() {
      console.log(this.searchVal);
    },
    handleCheck() {
      this.$router.push("/guidancedetails");
    },
    // 分页
    changePage(cur) {
      this.current = cur;
    },
  },
};
</script>

<style lang="less" scoped>
.guidance {
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
}
.main {
  padding-right: 40px;
  padding-left: 40px;
  padding-bottom: 40px;
  .data-count {
    color: var(--main-assist-color3);
  }
}
.guidance-box {
  width: 100%;
  padding: 30px;
  padding-bottom: 0px;
  background: #ffffff;
  border-radius: 16px;
}
.guidance-item {
  width: 870px;
  height: 80px;
  margin-bottom: 30px;
  padding: 0px 20px;
  line-height: 80px;
  background: #edf6fe;
  border-radius: 8px;
  font-size: 24px;
  font-family: Source Han Sans CN;
  font-weight: 500;
  color: var(--main-theme-color1);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/deep/.btn-prev {
  margin-right: 80px;
}
/deep/.btn-prev,
/deep/ .btn-next {
  width: 78px;
  height: 25px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: var(--main-theme-color1);
  line-height: 28px;
  span {
    font-size: 28px;
  }
}
</style>