<template>
  <div class="page-header-index-wide">
    <div>
      <div v-has="'sydwsy'" style="display: flex">
        <a-card  style="margin-bottom: 1rem;width:30%;">
          <div>
            <a-col :sm="24" :md="30" :xl="20">
              <div  @click="handleAdd" class='syxxtbbtn'>
                <span  style="color: white;font-weight: bold">单位信息填报</span>
              </div>
            </a-col>
            <a-col :sm="24" :md="30" :xl="20">
              <div  @click="handleAdd2" class='syxxtbbtn'>
                <span style="color: white;font-weight: bold">地块信息填报</span>
              </div>
            </a-col>
          </div>
        </a-card>
        <a-card :hoverable='false' style="margin-bottom: 1rem;width:70%;">
            <a-row :gutter="24" style="margin-top: 2%;margin-left: 5%">
              <a-col v-show="this.show" :sm="24" :md="12" :xl="10" :style="{ marginBottom: '24px'}" class="xfrw">
                <chart-card   :loading="loading" title="下发任务数(省属企业)" :total='this.xfrws'>
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="yxdls">
                <chart-card :loading="loading" title="有效登录数(省属企业)" :total="this.yxdls">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col  :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="sbdks">
                <chart-card v-if="this.yhjs=='shyh'" :loading="loading" title="上报地块数(省属企业)" :total="this.sbdks">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
                <chart-card v-else  :loading="loading" title="上报地块数" :total="this.sbdks">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>

              <a-col v-show="!this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="dqsbs">
                <chart-card :loading="loading" title="审核通过数" :total="this.shtgs">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
            </a-row>
          <a-row :gutter="24" style="margin-top: 1%;margin-left: 5%">
              <a-col v-show="!this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="shbtg">
                <chart-card :loading="loading" title="审核不通过（退回）" :total="this.cwth">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>

                </chart-card>
              </a-col>
              <a-col  :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="wshsl">
                <chart-card  v-if="this.yhjs=='shyh'" :loading="loading" title="未审核地块数(省属企业)" :total="this.wshsl">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
                <chart-card v-else :loading="loading" title="未审核地块数" :total="this.wshsl">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px'}" class="xfrw">
                <chart-card  :loading="loading" title="下发任务数(省直单位)" :total='this.sydwxfrws'>
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="yxdls">
                <chart-card :loading="loading" title="有效登录数(省直单位)" :total="this.sydwyxdls">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="sbdks">
                <chart-card :loading="loading" title="上报地块数(省直单位)" :total="this.sydwsbdks">
                  <a-tooltip title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
              <a-col  v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="wshsl">
                <chart-card  :loading="loading" title="未审核地块数(省直单位)" :total="this.sydwwsh">
                  <a-tooltip  title="指标说明" slot="action">
                    <a-icon type="info-circle-o" />
                  </a-tooltip>
                </chart-card>
              </a-col>
            </a-row>
          </a-card>
      </div>

    </div>

    <div>
      <div v-has="'ssqysy2'" style="display: flex">
        <a-card   style="margin-bottom: 1rem;width:30%;">
          <div>
            <a-col :sm="24" :md="30" :xl="20">
              <div  @click="handleRouter" class='syxxtbbtn'>
                <span  style="color: white;font-weight: bold">用地单位信息填报</span>
              </div>
            </a-col>
            <a-col :sm="24" :md="30" :xl="20">
              <div  @click="handleRouter2" class='syxxtbbtn'>
                <span style="color: white;font-weight: bold">用地地块信息填报</span>
              </div>
            </a-col>
          </div>
        </a-card>
        <a-card   style="margin-bottom: 1rem;width:70%;">
          <a-row :gutter="24" style="margin-top: 2%;margin-left: 5%">
            <a-col v-show="this.show" :sm="24" :md="12" :xl="10" :style="{ marginBottom: '24px'}" class="xfrw">
              <chart-card   :loading="loading" title="下发任务数(省属企业)" :total='this.xfrws'>
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="yxdls">
              <chart-card :loading="loading" title="有效登录数(省属企业)" :total="this.yxdls">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col  :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="sbdks">
              <chart-card v-if="this.yhjs=='shyh'" :loading="loading" title="上报地块数(省属企业)" :total="this.sbdks">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
              <chart-card v-else  :loading="loading" title="上报地块数" :total="this.sbdks">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>

            <a-col v-show="!this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="dqsbs">
              <chart-card :loading="loading" title="审核通过数" :total="this.shtgs">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
          </a-row>
          <a-row :gutter="24" style="margin-top: 1%;margin-left: 5%">
            <a-col v-show="!this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="shbtg">
              <chart-card :loading="loading" title="审核不通过（退回）" :total="this.cwth">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>

              </chart-card>
            </a-col>
            <a-col  :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="wshsl">
              <chart-card  v-if="this.yhjs=='shyh'" :loading="loading" title="未审核地块数(省属企业)" :total="this.wshsl">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
              <chart-card v-else :loading="loading" title="未审核地块数" :total="this.wshsl">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px'}" class="xfrw">
              <chart-card  :loading="loading" title="下发任务数(省直单位)" :total='this.sydwxfrws'>
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="yxdls">
              <chart-card :loading="loading" title="有效登录数(省直单位)" :total="this.sydwyxdls">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="sbdks">
              <chart-card :loading="loading" title="上报地块数(省直单位)" :total="this.sydwsbdks">
                <a-tooltip title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
            <a-col  v-show="this.show" :sm="24" :md="12" :xl="11" :style="{ marginBottom: '24px' }" class="wshsl">
              <chart-card  :loading="loading" title="未审核地块数(省直单位)" :total="this.sydwwsh">
                <a-tooltip  title="指标说明" slot="action">
                  <a-icon type="info-circle-o" />
                </a-tooltip>
              </chart-card>
            </a-col>
          </a-row>
        </a-card>
      </div>

    </div>

    <a-card v-has="'ssqysy'">
      <a-row :gutter="24">
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px'}" class="xfrw">
          <div  style="cursor:pointer" @click="handleXfrws('A04')">
            <chart-card  :loading="loading" title="下发任务数(省属企业)" :total='this.xfrws'>
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>
        </a-col>
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="yxdls">
          <div style="cursor:pointer" @click="handleYxdl('list2')">
            <chart-card :loading="loading" title="有效登录数(省属企业)" :total="this.yxdls">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>
        </a-col>
        <a-col  :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="sbdks">
          <div  style="cursor:pointer" @click="handleSbdks('qcsb-qcSsgqzysytdqk-list2')">
            <chart-card v-if="this.yhjs=='shyh'" :loading="loading" title="上报地块数(省属企业)" :total="this.sbdks">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
            <chart-card v-else  :loading="loading" title="上报地块数" :total="this.sbdks">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>
        </a-col>
        <a-col v-show="!this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="dqsbs">
          <chart-card :loading="loading" title="审核通过数" :total="this.shtgs">
            <a-tooltip title="指标说明" slot="action">
              <a-icon type="info-circle-o" />
            </a-tooltip>
          </chart-card>
        </a-col>
        <a-col v-show="!this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="shbtg">
          <chart-card :loading="loading" title="审核不通过（退回）" :total="this.cwth">
            <a-tooltip title="指标说明" slot="action">
              <a-icon type="info-circle-o" />
            </a-tooltip>

          </chart-card>
        </a-col>
        <a-col  :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="wshsl">
          <div style="cursor:pointer" @click="handleWsh('qcsb-qcSsgqzysytdqk-list1')">
            <chart-card v-if="this.yhjs=='shyh'" :loading="loading" title="未审核地块数(省属企业)" :total="this.wshsl">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
            <chart-card v-else :loading="loading" title="未审核地块数" :total="this.wshsl">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>
        </a-col>
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px'}" class="xfrw">
          <div  style="cursor:pointer" @click="handleXfrws('A03')">
            <chart-card  :loading="loading"  title="下发任务数(省直单位)" :total='this.sydwxfrws'>
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>
        </a-col>
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="yxdls">
          <div style="cursor:pointer" @click="handleYxdl('list8')">
          <chart-card :loading="loading" title="有效登录数(省直单位)" :total="this.sydwyxdls">
            <a-tooltip title="指标说明" slot="action">
              <a-icon type="info-circle-o" />
            </a-tooltip>
          </chart-card>
          </div>
        </a-col>
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="sbdks">
          <div  style="cursor:pointer" @click="handleSbdks('qcsb-QcSsgqzysytdqkList-list7')">
            <chart-card :loading="loading" title="上报地块数(省直单位)" :total="this.sydwsbdks">
              <a-tooltip title="指标说明" slot="action">
                <a-icon type="info-circle-o" />
              </a-tooltip>
            </chart-card>
          </div>

        </a-col>
        <a-col v-show="this.show" :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" class="wshsl">
          <div style="cursor:pointer" @click="handleWsh('qcsb-QcSsgqzysytdqkList-list6')">
          <chart-card  :loading="loading" title="未审核地块数(省直单位)" :total="this.sydwwsh">
            <a-tooltip title="指标说明" slot="action">
              <a-icon type="info-circle-o" />
            </a-tooltip>
          </chart-card>
          </div>
        </a-col>
      </a-row>
    </a-card>






    <a-card v-has="'chart'" :loading="loading" :bordered="false" :body-style="{padding: '0'}">
      <div class="salesCard">
        <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">

          <a-tab-pane v-if="this.yhjs=='shyh'" loading="true" tab="土地资产上报审核情况(省属企业)" key="1">
            <a-row>
              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
                <Pie :dataSource="this.pieData"></Pie>
              </a-col>
              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
                <rank-list title="土地资产上报审核情况" :list="rankList1"/>
              </a-col>
            </a-row>
          </a-tab-pane>
          <a-tab-pane v-else loading="true" tab="土地资产上报审核情况" key="1">
            <a-row>
              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
                <Pie :dataSource="this.pieData"></Pie>
              </a-col>
              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
                <rank-list title="土地资产上报审核情况" :list="rankList1"/>
              </a-col>
            </a-row>
          </a-tab-pane>
          <a-tab-pane v-if="this.yhjs=='shyh'" tab="土地资产上报审核情况(省直单位)" key="2">
            <a-row>
              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
                <Pie :dataSource="this.sydwpieData"></Pie>
              </a-col>
              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
                <rank-list title="土地资产上报审核情况" :list="sydwrankList1"/>
              </a-col>
            </a-row>
          </a-tab-pane>
        </a-tabs>
      </div>
    </a-card>

    <a-card>
      <a-col>
        <UserAnnouncement></UserAnnouncement>
      </a-col>
    </a-card>

<!--    <a-card style='margin-top: 20px'>-->
<!--      <a-row>-->
<!--        <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24" style='z-index: 3000; position:fixed;top: 67%;left: 0.4%;width:220px;height:300px;background-color: white;text-align: center;box-shadow: rgb(0 0 0 / 24%) 0px 3px 8px;' v-show="showCallCenter" class="call-center"  >-->
<!--          <div class="ant-card-extra" style='padding: 0;position: absolute;right: 0.5em' @click='onClose'><i aria-label="图标: close" tabindex="-1" class="anticon anticon-close" style="cursor: pointer; color: rgb(236,150,45);"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></div>-->
<!--          <div v-if="this.Showchat==0"  style='margin-top: 15px'>-->
<!--            <img width='350px' style=" width:220px;height:260px" src='@/assets/wechat1.jpg' alt=''>-->
<!--          </div>-->
<!--          <div v-else-if="this.Showchat==1"  style='margin-top: 15px'>-->
<!--            <img width='350px' style=" width:200px;height:260px" src='@/assets/1666055160594.jpg' alt=''><img>-->
<!--          </div>-->
<!--          <span style="color: red">扫码进群，在线咨询</span>-->

<!--        </a-col>-->
<!--&lt;!&ndash;        <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">-->
<!--          <div>-->
<!--            <a class="logout_title" target="_blank" href="/shuomingshu.pdf">-->
<!--              系统简明使用手册-->
<!--            </a>-->
<!--          </div>-->
<!--        </a-col>&ndash;&gt;-->

<!--      </a-row>-->
<!--    </a-card>-->
    <QcQyxxModal  ref="modalForm" ></QcQyxxModal>
    <QcSsgqzysytdqkModal ref="modalForm1"></QcSsgqzysytdqkModal>
  </div>

</template>

<script>
  import store from '@/store'
  import ChartCard from '@/components/ChartCard'
  import ACol from "ant-design-vue/es/grid/Col"
  import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
  import MiniArea from '@/components/chart/MiniArea'
  import MiniBar from '@/components/chart/MiniBar'
  import MiniProgress from '@/components/chart/MiniProgress'
  import RankList from '@/components/chart/RankList'
  import Bar from '@/components/chart/Bar'
  import LineChartMultid from '@/components/chart/LineChartMultid'
  import HeadInfo from '@/components/tools/HeadInfo.vue'
  import { getAction } from '../../api/manage'
  import Trend from '@/components/Trend'
  import { getLoginfo,getVisitInfo } from '@/api/api'
  import Pie from "../../components/chart/Pie";
  import UserAnnouncement from "../../views/system/UserAnnouncementList";
  import QcQyxxModal from "@views/sydwqcsb/sydwxx/modules/QcQyxxModal";
  import QcSsgqzysytdqkModal from "@views/sydwqcsb/modules/QcSsgqzysytdqkModal";
  const rankList = []
  for (let i = 0; i < 7; i++) {
    rankList.push({
      name: '白鹭岛 ' + (i+1) + ' 号店',
      total: 1234.56 - i * 100
    })
  }
  const barData = []
  for (let i = 0; i < 12; i += 1) {
    barData.push({
      x: `${i + 1}月`,
      y: Math.floor(Math.random() * 1000) + 200
    })
  }

  export default {
    name: "IndexChart",
    components: {
      ATooltip,
      QcSsgqzysytdqkModal,
      Pie,
      ACol,
      ChartCard,
      MiniArea,
      MiniBar,
      MiniProgress,
      RankList,
      Bar,
      QcQyxxModal,
      Trend,
      LineChartMultid,
      HeadInfo,
      UserAnnouncement
    },
    data() {
      return {
        dataSource:[],
        yxdls:'',
        yhjs:'',
        wshsl:'',
        xfrws:'',
        sbdks:'',
        dqsbs:'',
        tgsh:'',
        btgsh:'',
        shtgs:'',
        cwth:'',
       sydwxfrws:'',//下发任务数
       sydwyxdls:'',//有效登录数
       sydwsbdks:'',//上报地块数
        sydwwsh:'',//未审核数量
        sydwyhjs:'',//用戶角色
        showDqsbs:true,
        show:false,
        pieData:[],
        sydwpieData:[],
        sydwrankList1:[],

          rankList1:[],
        loading: true,
        center: null,
        rankList,
        Showchat:0,
        barData,
        loginfo:{},
        visitFields:['ip','visit'],
        visitInfo:[],
        indicator: <a-icon type="loading" style="font-size: 24px" spin />,
        // 按下时的坐标
        startX: '',
        startY: '',
        // 抬起时的坐标
        endX: '',
        endY: '',
        showCallCenter:true,
        cardStyle:"position:fixed;top: 160px;left: 400px;width:135px;height:121px",
        time:null,
      }
    },
    mounted() {
      //控制显示二维码
      if(store.getters.userInfo.orgCode!=null){
        if(store.getters.userInfo.orgCode.substring(0,3)=='A03'){
          this.Showchat=1        //显示机关上报用户
        }else if(store.getters.userInfo.orgCode.substring(0,3)=='A04'){
          this.Showchat=0        //显示企业上报用户
        }
      }
      this.selectDqsbs();
      this.selectWshsl();
      this.selectXfrws();
      this.selectShzt();
      this.selectsydw();
      this.selectsydwShzt();
    /*  this.$nextTick(()=>{
        this.time=setInterval(()=>{
          /!*let callCenter = document.querySelector('#callCenter')
          let x=callCenter.offsetLeft;
          let y=callCenter.offsetTop;
          if(x<document.body.clientWidth - 30){
            callCenter.style.left = x + 20 + 'px'
          }else if(x>30) {
            callCenter.style.left = x - 20 + 'px'
          }
          if(y<document.body.clientHeight - 30){
            callCenter.style.top = y + 20 + 'px'
          }else if(y>30) {
            callCenter.style.top = y - 20 + 'px'
          }*!/
          console.log(11)
          this.autoMoveBox()
        },2000)
      })*/
    },
    created() {
      setTimeout(() => {
        this.loading = !this.loading
      }, 1000)
      this.initLogInfo();
    },
    destroyed() {
      console.log(999)
      clearInterval(this.time)
    },
    methods: {
      handleYxdl(view){
        this.$router.push({name:'qcsb.qyxx-qcQyxx-'+view})
      },
      onClose(){
        this.showCallCenter=false;
        clearInterval(this.time)
      },
      handleAdd(){
       this.$router.push({name:'qcsb.qyxx-qcQyxx-list5'})

      },
      handleRouter(){
        this.$router.push({name:'qcsb.qyxx-qcQyxx-list'})

      },
      handleRouter2(){
        this.$router.push({name:'qcsb-qcSsgqzysytdqk-list'})
      },
      handleSbdks(view){
        this.$router.push({name:view})
      },
      handleXfrws(orgCode){
        if (JSON.stringify(this.$store.state.permission.routers[6]).includes('isystem-user')) {
          this.$router.push({name:'isystem-user',query:{orgCode: orgCode}})
        } else {
          this.$notification.error({
            message: '提示',
            description: `没有该菜单权限，不支持查看！`,
            duration:3
          });
        }
      },
      handleWsh(view){
        this.$router.push({name:view})
      },
      handleAdd2(){
        this.$router.push({name:'qcsb-QcSsgqzysytdqkList-list5'})
       /* getAction("/qcsb/qcSsgqzysytdqk/selectQyxx").then(res=>{

          if(res.result==null){
            this.$message.warn("请先补全用地单位信息并上报！")
          }else
          if(res.result.sfsjtdzc=='是'){
            this.$refs.modalForm1.add();
            this.$refs.modalForm1.title = "新增";
            this.$refs.modalForm1.disableSubmit = false;
          }else if(res.result.sfsjtdzc=='否'){
            this.$message.warn("未涉及省内土地资产！")
          }
        })*/
      },
      autoMoveBox(){
        var windowHeight = window.innerHeight;
        var windowWidth = window.innerWidth;
        var box = document.getElementById("callCenter");
        var boxWidth = parseInt(box.style.width);
        var boxHeight = parseInt(box.style.height);
        var boxTop = parseInt(box.style.top);
        var boxLeft = parseInt(box.style.left);
        var size = 20;
        //	左上角，开始右移
        if( (boxTop-boxHeight<=0) && (boxLeft+boxWidth)<windowWidth )
        {
          box.style.left =  boxLeft + size + "px";
        }
        else if((boxTop+boxHeight<windowHeight) && (boxLeft+boxWidth)>=windowWidth)
        {
          //	右上角，开始下移
          box.style.top =  boxTop + size + "px";
        }
        else if((boxTop+boxHeight)>=windowHeight  && (boxLeft- boxWidth)>0)
        {
          //	右下角，开始左移
          box.style.left = boxLeft - size + "px";
        }
        else if((boxTop-boxHeight)>=0 && (boxLeft-boxWidth)<=0)
        {
          //	左下角，开始上移
          box.style.top =  boxTop - size + "px";
        }else {
          box.style.left =  boxLeft + size + "px";
          box.style.top =  boxTop + size + "px";
        }
        // setTimeout(()=>{this.autoMoveBox()},50);
      },
      // 拖动窗口,鼠标按下
      move(event) {
        /*if(this.time){
          clearInterval(this.time)
        }
        // 给对应div添加拖拽属性
        let callCenter = document.querySelector('#callCenter');
        console.log(callCenter)
        callCenter.style.cursor = 'move'
        var distanceX = event.clientX - callCenter.offsetLeft
        var distanceY = event.clientY - callCenter.offsetTop
        // 获取按下时对应的坐标
        this.startX = event.pageX
        this.startY = event.pageY
        document.onmousemove = function (ev) {
          var oevent = ev || event
          // 加入判断，让浮窗在限定的页面内可拖动
          if (ev.clientX < 40 || ev.clientX > document.body.clientWidth - 30) {
            return
          }
          if (ev.clientY < 40 || ev.clientY > document.body.clientHeight - 30) {
            return
          }
          callCenter.style.left = oevent.clientX - distanceX + 'px'
          callCenter.style.top = oevent.clientY - distanceY + 'px'
        }
        document.onmouseup = function () {
          document.onmousemove = null
          document.onmouseup = null
          callCenter.style.cursor = 'default'
        }*/
      },
      // 鼠标抬起触发
      moveEnd(event) {
       /* // 获取鼠标抬起时的坐标
        this.endX = event.pageX
        this.endY = event.pageY
        this.time=setInterval(()=>this.autoMoveBox(),1000)
        // 计算按下与抬起位置差值
        var d = Math.sqrt((this.startX - this.endX) * (this.startX - this.endX) + (this.startY - this.endY) * (this.startY - this.endY))
        console.log(1)
        if (d === 0 || d < 7) {
          console.log("执行了点击事件")
        }else {
          console.log("执行了拖拽事件")
        }*/
      },
      selectXfrws(){

        getAction("/qcsb.qyxx/qcQyxx/rwdls").then(res=>{
          if(res.code==200){
            for (let i = 0; i <res.result1.length; i++) {
              this.xfrws=res.result1[0];//下发任务数
              this.yxdls=res.result1[1];//有效登录数
              this.sbdks=res.result1[2];//上报地块数
              this.yhjs=res.result1[3];//用戶角色
            }
          }
          if(this.yhjs=='shyh'||this.yhjs=='sjzh'){

             this.show=true;
          }
        })

      },
      selectsydw(){

        getAction("/qcsb.qyxx/qcQyxx/sydw").then(res=>{
          if(res.code==200){
            for (let i = 0; i <res.result1.length; i++) {
              this.sydwxfrws=res.result1[0];//下发任务数
              this.sydwyxdls=res.result1[1];//有效登录数
              this.sydwsbdks=res.result1[2];//上报地块数
              this.sydwwsh=res.result1[3];//未审核数量
              this.sydwyhjs=res.result1[4];//用戶角色
            }
          }
        })

      },
      selectShzt(){
        getAction("/qcsb.qyxx/qcQyxx/shzt").then(res=>{
          if(res.code==200){
            this.pieData=[
                { item: '审核通过地块', count:parseInt(res.result1[0]) },
              { item: '审核不通过地块',count:parseInt(res.result1[1]) },
                { item: '未审核地块', count:parseInt(res.result1[2]) },
                { item: '审核中地块', count:parseInt(res.result1[3]) }
            ]
            for (let i = 0; i < this.pieData.length; i++) {
              this.rankList1.push({
                name: this.pieData[i].item,
                total: this.pieData[i].count
              })
            }
          }
        })
        debugger

      },
      selectsydwShzt(){
        getAction("/qcsb.qyxx/qcQyxx/sydwshzt").then(res=>{
          if(res.code==200){
            this.sydwpieData=[
              { item: '审核通过地块', count:parseInt(res.result1[0]) },
              { item: '审核不通过地块',count:parseInt(res.result1[1]) },
              { item: '未审核地块', count:parseInt(res.result1[2]) },
              { item: '审核中地块', count:parseInt(res.result1[3]) }
            ]
            for (let i = 0; i < this.sydwpieData.length; i++) {
              this.sydwrankList1.push({
                name: this.sydwpieData[i].item,
                total: this.sydwpieData[i].count
              })
            }
          }
        })
      },
      selectDqsbs(){
        let usercode=''
        usercode = store.getters.userInfo.username
        getAction("/dqsbs").then(res=>{
          if(res.code==200){
            this.shtgs=res.result1[0]//审核通过数
            this.cwth=res.result1[1]//错误退回
            this.yhjs=res.result1[3];
             if(this.yhjs=="shyh"){
               this.showDqsbs=false;
             }
          }
        })
      },
      selectWshsl(){
        getAction("/qcsb.qyxx/qcQyxx/wshsl").then(res=>{
          if(res.code==200){
          this.wshsl= res.result
          }
        })
      },
      initLogInfo () {
        getLoginfo(null).then((res)=>{
          if(res.success){
            Object.keys(res.result).forEach(key=>{
              res.result[key] =res.result[key]+""
            })
            this.loginfo = res.result;
          }
        })
        getVisitInfo().then(res=>{
          if(res.success){
             this.visitInfo = res.result;
           }
         })
      },
    }
  }
</script>

<style lang="less" scoped>
  .circle-cust{
    position: relative;
    top: 28px;
    left: -100%;
  }
  .logout_title {
    font-size: 1.5rem;
  }
  .chart-card-header{
    text-align: center;
  }
  .extra-wrapper {
    line-height: 55px;
    padding-right: 24px;

    .extra-item {
      display: inline-block;
      margin-right: 24px;

      a {
        margin-left: 24px;
      }
    }
  }

  /* 首页访问量统计 */
  .head-info {
    position: relative;
    text-align: left;
    padding: 0 32px 0 0;
    min-width: 125px;

    &.center {
      text-align: center;
      padding: 0 32px;
    }

    span {
      color: rgba(0, 0, 0, .45);
      display: inline-block;
      font-size: .95rem;
      line-height: 42px;
      margin-bottom: 4px;
    }
    p {
      line-height: 42px;
      margin: 0;
      a {
        font-weight: 600;
        font-size: 1rem;
      }
    }
  }
</style>
<style>
  .syxxtbbtn{
    height: 80%;
    width: 100%;
    background-color: #1890FF;
    background-image: url('~@/assets/syxxtb_bg.png');
    background-size: 100% 100%;
    margin-left: 2rem;
    margin-top:1rem;
    margin-bottom: 1rem;
    font-size:32px;
    text-align: center ;
    line-height: 9rem;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 1rem;cursor:pointer
  }
  .xfrw .ant-card{
    /*border: 2px solid rgb(204,204,255);*/
    text-align: center;
    background-image: url('~@/assets/sytj_1.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;
  }
  .yxdls .ant-card{
    text-align: center;
    background-image: url('~@/assets/sytj_2.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;
  }
  .sbdks .ant-card{
  /*  border: 2px solid rgb(192,192,192);*/
    text-align: center;
    background-image: url('~@/assets/sytj_3.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;
  }
  .wshsl .ant-card{
   /* border: 2px solid rgb( 124,130,96);*/
   /* border: 2px solid rgb(225,215,100);*/
    text-align: center;
    background-image: url('~@/assets/sytj_4.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;

  }
  .shbtg .ant-card{
    text-align: center;
    background-image: url('~@/assets/sytj_2.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;
  }
  .dqsbs .ant-card{
    text-align: center;
    background-image: url('~@/assets/sytj_1.png');
    background-size: 100% 100%;
    box-shadow: 10px 10px 15px -10px;
    border-radius: 6px;
  }
  .chart-card-footer{
    border-top: 0px solid #e8e8e8 !important;
  }

</style>