<template>
    <div class="widthCommon" >
      <commonBanner mainTitle="中兴智能交通" subTitle="构建绿色交通 享受安全便利出行"></commonBanner>
      <div class="tab-wrapper">
        <ul class="tab-main widthCommon">
          <li
            v-for="(item, index) in tabData"
            :key="item"
            @click="changeTab(index,item)"
            :class="{tabActive:currentIndex==index}"
          >{{item}}</li>
        </ul>
      </div>

      <div class="bread ">
        <div class=" widthCommon">
          您所在位置: <span class="pointer" @click="$router.push({name:'home'})">首页</span> -> 经典案例 -> {{name}}
        </div>
      </div>

      <div class="widthCommon" style="margin-bottom: 20px;">
        <ul class="caseList">
          <li v-for="item in 10" :key="item">
            <img src="../../assets/images/case/case.png" alt="">
            <p class="caseName">项目名称：黄石智慧停车项目</p>
            <p class="caseAddress">项目地址：  湖北· 黄石</p>
            <ul class="mark-wrapper">
              <li>
                <span>车位：10000</span>
              </li>
              <li>
                <span>规划、</span>
                <span>建设、</span>
                <span>运营</span>
              </li>
            </ul>

            <div class="pointer toDetail">查看详情 》</div>
          </li>
        </ul>

        <v-page :total-row="100" align="center" :page-size-menu="false" :info="false" @page-change="pagePhotoChange">
        </v-page>
      </div>

    </div>
</template>

<script>
import commonBanner from '@/components/commonBanner'
import selectTab0 from './components/selectTab0'
import selectTab1 from './components/selectTab1'
import selectTab2 from './components/selectTab2'
export default {
  name: 'index',
  components:{
    commonBanner, selectTab0, selectTab1, selectTab2
  },
  data(){
    return{
      tabData:[
        '智慧停车','公安交通','公共交通'
      ],
      currentIndex:0,
      tabView:'selectTab0',
      name:'智慧停车'
    }
  },
  methods:{
    changeTab:function (index,item) {
      console.log(index)
      this.currentIndex = index
      this.tabView = 'selectTab'+index
      this.name = item
    },
    pagePhotoChange:function (pInfo) {
      console.log(pInfo)
    },
  }
}
</script>

<style scoped lang="scss">
.caseList{
  overflow: hidden;
}
.caseList>li{
  width: 400px;
  height: 529px;
  float: left;
  margin-right:90px ;
  margin-bottom: 92px;
  background:rgba(228,228,228,1);
  img{
    width: 400px;
    height: 354px;
  }
}
.caseList>li:nth-of-type(3n+0){
  margin-right: 0;
}
  .caseName,.caseAddress{
    padding-left: 20px;
    font-size: 14px;
    color: #333;
  }
  .caseName{
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .mark-wrapper{
    margin: 20px 0;
    padding-left: 20px;
    overflow: hidden;
  }
  .mark-wrapper li{
    padding: 5px 10px;
    float: left;
    margin-right: 17px;
    background:rgba(54,114,248,.4);
    border-radius:4px;
    font-size: 14px;
    color: #333;
  }
  .toDetail{
    text-align: center;
    font-size: 14px;
    color: #3366CC;
  }
</style>
