<template>
  <div class="app-container home">
    <div class="header">
      <div class="iconTitle"></div>
      <div class="headerMain">我的待办事项</div>
    </div>
    <div class="homeMain">
      <div class="cardList" v-hasPermi="['home:caseApply']" @click="pushPage(0)">
        <div class="badge">{{ dataCount.caseApply }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待立案申请</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyCheck']" @click="pushPage(1)">
        <div class="badge">{{ dataCount.caseApplyCheck }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待立案审查</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyPay']" @click="pushPage(2)">
        <div class="badge">{{ dataCount.caseApplyPay }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待缴费</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyPayCheck']" @click="pushPage(3)">
        <div class="badge">{{ dataCount.caseApplyPayCheck }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待缴费确认</div>
        </div>
      </div>
      <!-- <div class="cardList" v-hasPermi="['home:caseApplyEvidence']" @click="pushPage(4)">
        <div class="badge">{{ dataCount.caseApplyEvidence }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待案件质证</div>
        </div>
      </div> -->
      <div class="cardList" v-hasPermi="['home:caseApplyGroupCheck']" @click="pushPage(5)">
        <div class="badge">{{ dataCount.caseApplyGroupCheck }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待组庭审核</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyGroupConfirm']" @click="pushPage(6)">
        <div class="badge">{{ dataCount.caseApplyGroupConfirm }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待组庭确定</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyArbitrateWay']" @click="pushPage(7)">
        <div class="badge">{{ dataCount.caseApplyArbitrateWay }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待审核仲裁方式</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseModifyHearDate']" @click="pushPage(31)">
        <div class="badge">{{ dataCount.updateOnlineHearDate }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待确认开庭时间</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyGroupOnline']" @click="pushPage(8)">
        <div class="badge">{{ dataCount.caseApplyGroupOnline }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待开庭审理</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyGroupOffline']" @click="pushPage(9)">
        <div class="badge">{{ dataCount.caseApplyGroupOffline }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待书面审理</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyAwardCheck']" @click="pushPage(11)">
        <div class="badge">{{ dataCount.caseApplyAwardCheck }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待核验仲裁文书</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyAwardConfirm']" @click="pushPage(12)">
        <div class="badge">{{ dataCount.caseApplyAwardConfirm }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待审核仲裁文书</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyAwardSignature']" @click="pushPage(13)">
        <div class="badge">{{ dataCount.caseApplyAwardSign }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待仲裁文书签名</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyAwardSignature']" @click="pushPage(14)">
        <div class="badge">{{ dataCount.caseApplyAwardSeal }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待仲裁文书用印</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyAwardSend']" @click="pushPage(15)">
        <div class="badge">{{ dataCount.caseApplyAwardSend }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待仲裁文书送达</div>
        </div>
      </div>
      <div class="cardList" v-hasPermi="['home:caseApplyStored']" @click="pushPage(16)">
        <div class="badge">{{ dataCount.caseApplyStored }}</div>
        <div class="cardMain">
          <img class="iconImg" src="@/assets/images/daishencha.png" alt="">
        </div>
        <div class="cardMain">
          <div class="imgTitle">待案件归档</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {
  toDoCount
} from "@/api/home.js";
export default {
  name: "Index",
  data() {
    return {
      dataCount: {

      }
    };
  },
  methods: {
    // 获取数字角标数量
    getToDoCount() {
      toDoCount().then(res => {
        this.dataCount = res.data;
      })
    },
    // 点击代办案件按钮
    pushPage(status) {
      if (status == 0 || status == 1 || status == 2 || status == 5 || status == 6 || status == 7 || status == 31 || status == 8 || status == 9) {
        this.$router.push({ name: 'CaseManagement/caseList', params: { status: status } })
      } else if (status == 11 || status == 12 || status == 13 || status == 14 || status == 15 || status == 16) {
        this.$router.push({ name: 'AwardManagement/listofAwards', params: { status: status } })
      } else if (status == 3){
        this.$router.push({ name: 'PaymentManagement/paymentList', params: { status: status } })
      }
    }
    // goTarget(href) {
    //   window.open(href, "_blank");
    // }
  },
  created() {
    this.getToDoCount()
  }
};
</script>

<style scoped lang="scss">
.home {
  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;
  background-color: #f1f1f1;
  height: 100vh;

  .header {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;

    .iconTitle {
      width: 5px;
      height: 25px;
      background-color: #0f5c9b;
      margin-right: 25px;
    }

    .headerMain {
      font-size: 20px;
    }
  }

  .homeMain {
    width: 100%;
    display: flex;
    flex-wrap: wrap;

    // justify-content: space-between;
    .cardList {
      width: 14%;
      height: 200px;
      border-radius: 30px;
      background-color: #ffffff;
      position: relative;
      margin-right: 30px;
      margin-bottom: 30px;

      .badge {
        width: 50px;
        height: 30px;
        text-align: center;
        line-height: 30px;
        font-size: 18px;
        font-weight: 500;
        color: #e32a4f;
        border-radius: 10px 30px 10px 30px;
        background-color: #05baf1;
        position: absolute;
        right: 0;
      }

      .cardMain {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20px;

        .iconImg {
          width: 100px;
          height: 110px;
        }

        .imgTitle {
          font-size: 20px;
          font-weight: 600;
        }
      }
    }
  }
}
</style>

