<template>
    <div class="app-container">
      <van-sticky>
      <van-nav-bar
        title="宅基地管理"
      >
        <template #left>
            <van-icon name="location" color="3A80FB" size="16"/>
            <p  style="color: #878787;margin-left: 5px" @click="selectDept">{{deptName}}</p>
          <van-popup v-model="villageVisbile" round position="bottom" style="bottom: 2rem;">
            <van-cascader
              v-model="villageValue"
              title="请选择所在村"
              :options="hcAreaInfoOption"
              @close="hcAreaInfoClose"
              @finish="hcAreaInfoFinish"
              active-color="#1989fa"
              :field-names="hcAreaInfoFieldName"
            />
          </van-popup>
        </template>
<!--        <template #right>-->
<!--&lt;!&ndash;          <van-icon name="wap-nav" color="#000" size="18"/>&ndash;&gt;-->
<!--          <p  style="color: #878787;margin-left: 5px" @click="bookVisbile = true">{{bookName}}</p>-->
<!--          <van-popup v-model="bookVisbile" round position="bottom">-->
<!--            <van-picker-->
<!--              title="请选择账套"-->
<!--              show-toolbar-->
<!--              :columns="bookList"-->
<!--              @confirm="onConfirmBook"-->
<!--              @cancel="onCancelBook"-->
<!--              value-key="bookName"-->
<!--            />-->
<!--          </van-popup>-->
<!--        </template>-->
      </van-nav-bar>
      </van-sticky>
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="width: 96%;margin: 2%;height:120px;border-radius: 6px;">
        <van-swipe-item v-for="(image,index) in images" :key="index">
          <img :src="image" style="width:100%;height: 120px"/>
        </van-swipe-item>
      </van-swipe>
      <van-row style="min-height: 100px;" class="indexCard">
        <van-cell style="border-radius: 6px;" is-link to="done">
          <template #title>
            <p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p>
            <p style="font-weight: bold;font-size: 18px;display: inline-block;">待办</p>
          </template>
          <template #label>
            <p style="padding-left: 10px;">
              {{taskList&&taskList.length>0?taskList[0].projectName+'等，共'+taskList.length+'条':'暂无待办事项'}}
            </p>
          </template>
        </van-cell>
      </van-row>

      <!--
      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="display:inline-block;background: #FFA63E;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">业务申请</p>
          </template>
        </van-cell>
          <van-grid :border="false">
            <van-grid-item text="用章申请" >
              <div slot="default" class="icon" style="background:#FFA63E;" >
                <img src="../../../static/images/onlineHome/icon1.png" style="height: 25px;vertical-align: center;" alt />
              </div>
              <p style="margin-top: 5px;color: #666666;">用章申请</p>
            </van-grid-item>
            <van-grid-item text="宅基地申请" >
              <div slot="default">
                <div class="icon" style="background:#539FFD;">
                  <img src="../../../static/images/onlineHome/icon_Z1.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">宅基地申请</p>
            </van-grid-item>
            <van-grid-item text="宅基地流转" >
              <div slot="default">
                <div class="icon" style="background:#FFA63E;">
                  <img src="../../../static/images/onlineHome/icon_Z2.png" style="width: 25px;" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">宅基地流转</p>
            </van-grid-item>
            <van-grid-item text="宅基地退出" >
              <div slot="default">
                <div class="icon" style="background:#539FFD;">
                  <img src="../../../static/images/onlineHome/icon_Z3.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">宅基地退出</p>
            </van-grid-item>
            <van-grid-item text="付款申请" >
              <div slot="default">
                <div class="icon" style="background:#FF4646;">
                  <img src="../../../static/images/onlineHome/icon5.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">付款申请</p>
            </van-grid-item>
            <van-grid-item text="项目申报" >
              <div slot="default">
                <div class="icon" style="background:#FF6464;">
                  <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">项目申报</p>
            </van-grid-item>
            <van-grid-item text="拨付申请" >
              <div slot="default">
                <div class="icon" style="background:#FF7E45;">
                  <img src="../../../static/images/onlineHome/icon7.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">拨付申请</p>
            </van-grid-item>
            <van-grid-item text="验收申请" >
              <div slot="default">
                <div class="icon" style="background:#7DDA4F;">
                  <img src="../../../static/images/onlineHome/icon8.png" style="width: 25px" alt />
                </div>
              </div>
              <p style="margin-top: 5px;color: #666666;">验收申请</p>
            </van-grid-item>
          </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">农村三资管理</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="支出明细" to="expenditureDetail">
            <div class="icon" slot="default" style="background:#FF4646;" >
              <img src="../../../static/images/onlineHome/icon9.png" style="height: 25px;vertical-align: center;" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">支出明细</p>
          </van-grid-item>
          <van-grid-item text="收入明细" to="incomeDetail">
            <div slot="default">
              <div class="icon" style="background:#FF4646;">
                <img src="../../../static/images/onlineHome/icon10.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">收入明细</p>
          </van-grid-item>
          <van-grid-item text="收支明细" to="inAndOutDetail">
            <div slot="default">
              <div class="icon" style="background:#FF4646;">
                <img src="../../../static/images/onlineHome/icon11.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">收支明细</p>
          </van-grid-item>
          <van-grid-item text="现金银行" >
            <div slot="default">
              <div class="icon" style="background:#3AC2DB;">
                <img src="../../../static/images/onlineHome/icon12.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">现金银行</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">农村产权交易管理</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="供应项目" >
            <div class="icon" slot="default" style="background:#FF4646;" >
              <img src="../../../static/images/onlineHome/icon13.png" style="width: 25px;" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">供应项目</p>
          </van-grid-item>
          <van-grid-item text="成交公示" >
            <div slot="default">
              <div class="icon" style="background:#C5685F;">
                <img src="../../../static/images/onlineHome/icon14.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">成交公示</p>
          </van-grid-item>
          <van-grid-item text="合同管理" >
            <div slot="default">
              <div class="icon" style="background:#539FFD;">
                <img src="../../../static/images/onlineHome/icon15.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">合同管理</p>
          </van-grid-item>
          <van-grid-item text="招标管理" >
            <div slot="default">
              <div class="icon" style="background:#3AC2DB;">
                <img src="../../../static/images/onlineHome/icon16.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">招标管理</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">宅基地业务</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="宅基地申请" :to="{name:'applicationList'}">
            <div slot="default"class="icon"  style="background:#539FFD;" >
              <img src="../../../static/images/onlineHome/icon_Z1.png" style="width: 25px;" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">宅基地申请</p>
          </van-grid-item>
          <van-grid-item text="证书查看" :to="{name:'houseLicense'}">
            <div slot="default">
              <div class="icon" style="background:#7790FE;">
                <img src="../../../static/images/onlineHome/icon12.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">证书查看</p>
          </van-grid-item>
          <van-grid-item text="公示查询" :to="{name:'houseAnnounce'}">
            <div slot="default">
              <div class="icon" style="background:#C5685F;">
                <img src="../../../static/images/onlineHome/icon11.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">公示查询</p>
          </van-grid-item>
          <van-grid-item text="巡查执法" >
            <div slot="default">
              <div class="icon" style="background:#1D6FE9;">
                <img src="../../../static/images/onlineHome/icon16.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">巡查执法</p>
          </van-grid-item>
          <van-grid-item text="村庄规划" >
            <div slot="default">
              <div class="icon" style="background:#FFCE05;">
                <img src="../../../static/images/onlineHome/icon17.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">村庄规划</p>
          </van-grid-item>
          <van-grid-item text="基础档案" >
            <div slot="default">
              <div class="icon" style="background:#FF7E45;">
                <img src="../../../static/images/onlineHome/icon18.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">基础档案</p>
          </van-grid-item>
          <van-grid-item text="盘活利用" >
            <div slot="default">
              <div class="icon" style="background:#7DDA4F;">
                <img src="../../../static/images/onlineHome/icon19.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">盘活利用</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">农村产权制度改革管理</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="财务管理" >
            <div slot="default" class="icon"  style="background:#FF4646;" >
              <img src="../../../static/images/onlineHome/icon17.png" style="width: 25px;" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">财务管理</p>
          </van-grid-item>
          <van-grid-item text="资产管理" >
            <div slot="default">
              <div class="icon" style="background:#FF6464;">
                <img src="../../../static/images/onlineHome/icon18.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">资产管理</p>
          </van-grid-item>
          <van-grid-item text="合同管理" >
            <div slot="default">
              <div class="icon" style="background:#539FFD;">
                <img src="../../../static/images/onlineHome/icon15.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">合同管理</p>
          </van-grid-item>
          <van-grid-item text="股权管理" >
            <div slot="default">
              <div class="icon" style="background:#FFA63E;">
                <img src="../../../static/images/onlineHome/icon19.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">股权管理</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">农民专业合作社管理</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="财务管理" >
            <div slot="default" class="icon"  style="background:#FF4646;" >
              <img src="../../../static/images/onlineHome/icon17.png" style="width: 25px;" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">财务管理</p>
          </van-grid-item>
          <van-grid-item text="资产管理" >
            <div slot="default">
              <div class="icon" style="background:#FF6464;">
                <img src="../../../static/images/onlineHome/icon18.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">资产管理</p>
          </van-grid-item>
          <van-grid-item text="合同管理" >
            <div slot="default">
              <div class="icon" style="background:#539FFD;">
                <img src="../../../static/images/onlineHome/icon15.png" style="width: 25px;" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">合同管理</p>
          </van-grid-item>
          <van-grid-item text="盈余分配" >
            <div slot="default">
              <div class="icon" style="background:#FFA63E;">
                <img src="../../../static/images/onlineHome/icon20.png" style="width: 25px" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">盈余分配</p>
          </van-grid-item>
        </van-grid>
      </van-row>
      -->

<!--      <van-row  class="indexCard">-->
<!--        <van-cell style="border-radius: 6px;">-->
<!--          <template #title>-->
<!--            <p style="font-weight: bold;font-size: 18px;display: inline-block">银农支付</p>-->
<!--          </template>-->
<!--        </van-cell>-->
<!--        <van-grid :border="false">-->
<!--          <van-grid-item text="村户转账" :to="{name:'approvalList'}" >-->
<!--            <div class="icon" slot="default" style="background:#FF4646;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y1.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">村户转账</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="代管转账" :to="{name:'approvalList4'}" >-->
<!--            <div class="icon" slot="default" style="background:#c568f5;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y4.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">代管转账</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="公务卡转账" :to="{name:'approvalList2'}" >-->
<!--            <div class="icon" slot="default" style="background:#3ac2db;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y2.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">公务卡转账</p>-->
<!--          </van-grid-item>-->
<!--          &lt;!&ndash;-->
<!--          <van-grid-item text="虚拟挂账" :to="{name:'approvalList3'}" >-->
<!--            <div class="icon" slot="default" style="background:#FFA63E;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y3.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">虚拟挂账</p>-->
<!--          </van-grid-item>-->

<!--          <van-grid-item text="母子转账" :to="{name:'approvalList5'}" >-->
<!--            <div class="icon" slot="default" style="background:#1D6FE9;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y5.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">母子转账</p>-->
<!--          </van-grid-item>-->
<!--          &ndash;&gt;-->
<!--          <van-grid-item text="现金提现" :to="{name:'approvalList10'}" >-->
<!--            <div class="icon" slot="default" style="background:#FF6464;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y6.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">现金提现</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="现金使用" :to="{name:'approvalList11'}" >-->
<!--            <div class="icon" slot="default" style="background:#7790FE;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y7.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">现金使用</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="汇票支出" :to="{name:'approvalList12'}" >-->
<!--            <div class="icon" slot="default" style="background:#539ffd;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y8.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">汇票支出</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="收款账户" :to="{name:'collectionList'}" >-->
<!--            <div class="icon" slot="default" style="background:#7dda4f;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y9.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">收款账户</p>-->
<!--          </van-grid-item>-->
<!--          <van-grid-item text="付款账户" :to="{name:'paymentAccountList'}" >-->
<!--            <div class="icon" slot="default" style="background:#FF4646;" >-->
<!--              <img src="../../../static/images/onlineHome/icon_Y10.png" alt />-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">付款账户</p>-->
<!--          </van-grid-item>-->
<!--        </van-grid>-->
<!--      </van-row>-->

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">申请审批</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="宅基地申请" @click="applicationList('applicationList')">
            <div class="icon" slot="default" style="background:#539ffd;" >
              <img src="../../../static/images/onlineHome/icon_Z1.png" alt />
            </div>
            <p style="margin-top: 5px;color: #666666;">宅基地申请</p>
          </van-grid-item>
          <van-grid-item text="证书查看" @click="applicationList('certificateList')">
            <div slot="default">
              <div class="icon" style="background:#7790fe;">
                <img src="../../../static/images/onlineHome/icon_Z7.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">证书查看</p>
          </van-grid-item>
          <van-grid-item text="使用权流转"  @click="applicationList('circulationList')">
            <div slot="default">
              <div class="icon" style="background:#ffa63e;">
                <img src="../../../static/images/onlineHome/icon_Z2.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">使用权流转</p>
          </van-grid-item>
<!--          <van-grid-item text="使用权抵押"  @click="applicationList('mortgage')">-->
<!--            <div slot="default">-->
<!--              <div class="icon" style="background:#3ac2db;">-->
<!--                <img src="../../../static/images/onlineHome/icon_Z4.png" alt />-->
<!--              </div>-->
<!--            </div>-->
<!--            <p style="margin-top: 5px;color: #666666;">使用权抵押</p>-->
<!--          </van-grid-item>-->
          <van-grid-item text="有偿退出" @click="applicationList('paidExit')">
            <div slot="default">
              <div class="icon" style="background:#539ffd;">
                <img src="../../../static/images/onlineHome/icon_Z3.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">有偿退出</p>
          </van-grid-item>
          <van-grid-item text="无偿退出" @click="applicationList('freeExit')">
            <div slot="default">
              <div class="icon" style="background:#7dda4f;">
                <img src="../../../static/images/onlineHome/icon_Z3.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">无偿退出</p>
          </van-grid-item>
          <van-grid-item text="纠纷调解"  @click="applicationList('arbitrationList')">
            <div slot="default">
              <div class="icon" style="background:#1D6FE9;">
                <img src="../../../static/images/onlineHome/icon_Z13.png"  alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">纠纷调解</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">管理利用</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="有偿使用" @click="applicationList('paidUtilizeList')">
            <div slot="default">
              <div class="icon" style="background:#FFA63E;">
                <img src="../../../static/images/onlineHome/icon_Z9.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">有偿使用</p>
          </van-grid-item>
          <van-grid-item text="农房利用" @click="applicationList('utilization')">
            <div slot="default">
              <div class="icon" style="background:#7dda4f;">
                <img src="../../../static/images/onlineHome/icon_Z5.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">农房利用</p>
          </van-grid-item>
          <van-grid-item text="宅基地利用" @click="applicationList('homesteadUtilize')">
            <div slot="default">
              <div class="icon" style="background:#7dda4f;">
                <img src="../../../static/images/onlineHome/icon_Z6.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">宅基地利用</p>
          </van-grid-item>
<!--          <van-grid-item text="公示信息" :to="{name:'informationList'}" >
            <div slot="default">
              <div class="icon" style="background:#c568f5">
                <img src="../../../static/images/onlineHome/icon_Z8.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">公示信息</p>
          </van-grid-item>-->
        </van-grid>
      </van-row>
      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">盘活方式</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="自主经营" @click="applicationList('zzjyList')">
            <div slot="default">
              <div class="icon" style="background:#FFA63E;">
                <img src="../../../static/images/onlineHome/icon_zzjy.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">自主经营</p>
          </van-grid-item>
          <van-grid-item text="出租经营" @click="applicationList('czjyList')">
            <div slot="default">
              <div class="icon" style="background:#7dda4f;">
                <img src="../../../static/images/onlineHome/icon_czjy.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">出租经营</p>
          </van-grid-item>
          <van-grid-item text="入股经营" @click="applicationList('rgjyList')">
            <div slot="default">
              <div class="icon" style="background:#7790FE;">
                <img src="../../../static/images/onlineHome/icon_rgjy.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">入股经营</p>
          </van-grid-item>
          <van-grid-item text="合作经营" @click="applicationList('hzjyList')">
            <div slot="default">
              <div class="icon" style="background:#3AC2DB;">
                <img src="../../../static/images/onlineHome/icon_hzjy.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">合作经营</p>
          </van-grid-item>
          <van-grid-item text="整治利用" @click="applicationList('zzlyList')">
            <div slot="default">
              <div class="icon" style="background:#FF6446;">
                <img src="../../../static/images/onlineHome/icon_zzly.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">整治利用</p>
          </van-grid-item>
          <!--          <van-grid-item text="公示信息" :to="{name:'informationList'}" >
                      <div slot="default">
                        <div class="icon" style="background:#c568f5">
                          <img src="../../../static/images/onlineHome/icon_Z8.png" alt />
                        </div>
                      </div>
                      <p style="margin-top: 5px;color: #666666;">公示信息</p>
                    </van-grid-item>-->
        </van-grid>
      </van-row>

      <van-row  class="indexCard">
        <van-cell style="border-radius: 6px;">
          <template #title>
            <p style="font-weight: bold;font-size: 18px;display: inline-block">综合执法</p>
          </template>
        </van-cell>
        <van-grid :border="false">
          <van-grid-item text="任务发布"  @click="applicationList('task')">
            <div slot="default">
              <div class="icon" style="background:#1D6FE9;">
                <img src="../../../static/images/onlineHome/icon_Z11.png"  alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">任务发布</p>
          </van-grid-item>
          <van-grid-item text="任务上报"  @click="applicationList('taskReportingList')">
            <div slot="default">
              <div class="icon" style="background:#1D6FE9">
                <img src="../../../static/images/onlineHome/icon_Z10.png" alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">任务上报</p>
          </van-grid-item>
          <van-grid-item text="违法监管" @click="applicationList('supervisionList')">
            <div slot="default">
              <div class="icon" style="background:#1D6FE9;">
                <img src="../../../static/images/onlineHome/icon_Z12.png"  alt />
              </div>
            </div>
            <p style="margin-top: 5px;color: #666666;">违法监管</p>
          </van-grid-item>
        </van-grid>
      </van-row>

      <onlineHomeIndex></onlineHomeIndex>
    </div>
</template>

<script>
  import onlineHomeIndex from "../onlineHomeIndex";
  import {getInfo} from "../../api/login";
  import {changeDept, ListTodo,changeBook} from "../../api/onlineHome/done";
  import {treeselectByUser,bookListByDeptId} from "../../api/homestead";
    export default {
      components: {
        onlineHomeIndex
      },
        name: "workbench",
      data() {
        return {
          list1: [],
          images:['../../../static/images/onlineHome/home_img.png'],
          deptName:"",
          queryParams: {
            pageNum: 1,
            pageSize: 100,
          },
          taskList:[],
          //省市区区级list
          hcAreaInfoOption: [],
          //省市区区级显示
          villageVisbile: false,
          //选中的值
          villageValue: "",
          hcAreaInfoFieldName: {
            text: "label",
            value: "value",
            children: "children",
          },
          //角色
          currentUserRole:"",
          //账套列表
          bookVisbile:false,
          bookList:[],
          bookName:"",
          bookId:"",
          book:"",
        };
      },
      created() {
        getInfo().then(response => {
          console.log(response.user);
          this.bookName = response.user.bookName
          this.deptName = response.user.deptName
          this.getBookList(response.user.loginDeptId);
        });

        treeselectByUser().then((res) => {
          if (res.code == 200) {
            this.hcAreaInfoOption = res.data;
          }
        }),
          this.$set(this.queryParams, "systemType", '11'); // 4
        ListTodo(this.queryParams).then((response) => {
          this.taskList = response.rows
        }),
        this.currentUserRole = this.$store.getters.roles[0];
        console.log("当前用户角色: " + this.currentUserRole);
      },
      methods:{
        applicationList(data){
          if(this.currentUserRole !="nature_resource" && this.currentUserRole !="building" && this.currentUserRole !="agriculture" && this.currentUserRole !="town_leader"){
            if(data == 'applicationList'){
              this.$router.push({ path: "/applicationList" });
            } else if (data == 'certificateList') {
              this.$router.push({ path: "/certificateList" });
            } else if (data == 'circulationList') {
              this.$router.push({ path: "/circulationList" });
            } else if (data == 'mortgage') {
              this.$router.push({ path: "/mortgage" });
            } else if (data == 'paidExit') {
              this.$router.push({ path: "/paidExit" });
            } else if (data == 'freeExit') {
              this.$router.push({ path: "/freeExit" });
            } else if (data == 'arbitrationList') {
              console.log("arbitrationList");
              this.$router.push({ path: "/onlineHome/arbitrationList" });
            } else if (data == 'utilization') {
              this.$router.push({ path: "/utilization" });
            } else if (data == 'homesteadUtilize') {
              this.$router.push({ path: "/homesteadUtilize" });
            } else if (data == 'task') {
              this.$router.push({ path: "/task" });
            } else if (data == 'taskReportingList') {
              this.$router.push({ path: "/taskReportingList" });
            } else if (data == 'supervisionList') {
              this.$router.push({ path: "/supervisionList" });
            } else if (data == 'paidUtilizeList') {
              this.$router.push({ path: "/paidUtilizeList" });
            }else if (data == 'zzjyList') {
              this.$router.push({ path: "/zzjyList" });
            }else if (data == 'czjyList') {
              this.$router.push({ path: "/czjyList" });
            }else if (data == 'rgjyList') {
              this.$router.push({ path: "/rgjyList" });
            }else if (data == 'hzjyList') {
              this.$router.push({ path: "/hzjyList" });
            }else if (data == 'zzlyList') {
              this.$router.push({ path: "/zzlyList" });
            }
          } else {
            this.$dialog.alert({
              message: "当前用户无操作权限",
            });
          }
        },
        onConfirmBook(e){
          this.bookVisbile = false
          this.bookName = e.bookName
          let param={"loginBookId":e.id}
          changeBook(param).then((response) => {
            if (response.code === 200) {
              this.$store.dispatch("GetInfo").then(() => {
                // this.$router.go(0);
                window.location.href = "/onlineHome/workbench";
              });
            }
          });
        },
        onCancelBook(e){
          this.bookVisbile = false
        },
        getBookList(e){
          let params = {
            loginDeptID:e
          }
          bookListByDeptId(params).then((response) => {
            if (response.code == 200) {
              this.bookList = response.rows;

            }
          })
        },
        selectDept(){
          this.villageVisbile = true;
        },
        //关闭选择地址弹窗
        hcAreaInfoClose() {
          this.villageVisbile = false;
        },
        hcAreaInfoFinish({ value, selectedOptions, tabIndex }) {
          // 切换部门
          let Depquery={"loginDeptID":value}
            changeDept(Depquery).then((response) => {
              if (response.code === 200) {
                this.$store.dispatch("GetInfo").then(() => {
                  // this.$router.go(0);
                  window.location.href = "/onlineHome/workbench";
                });
              }
            });
          this.villageVisbile = false;
        },
      }
    }
</script>

<style scoped>
    >>>.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 144px;
    text-align: center;
  }
  >>>.van-grid-item__content{
    padding:0.213333rem;
  }
  >>>.van-cell::after{
    border: none;
  }
  >>>.app-container{
    padding:0;
  }
  >>> .icon{
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;
    width: 80px;
    height: 80px;
    text-align:center;
  }
  >>> .icon img{
    width:50px;
  }
  >>> .indexCard{
    margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff
  }
</style>
