tollchecker.js 25.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673
//数据
//设置签到签退超出距离
var DISTANCE = 300;
//电子围栏半径
var km;
var fun = {
    init: function () {
        //查询围栏半径
        fun.getDict('PARK_ENCLOSURE_RADIUS');
        //时间初始化
        fun.dateInit();
        //收费员初始化
        fun.tollperInit();
        //表格初始化
        fun.createTableData();

    },
    //时间初始化
    dateInit: function () {
        $('#tollcheck-daydaterange-btnsta').val(moment().subtract('days', 0).format('YYYY-MM-DD'));
        $('#tollcheck-daydaterange-btnend').val(moment().subtract('days', 0).format('YYYY-MM-DD'));
        //开始日期
        $("#tollcheck-daydaterange-btnsta").datetimepicker({
            endDate: moment().subtract('days', 0).format('YYYY-MM-DD'),
            format: 'yyyy-mm-dd',
            autoclose: true,
            startView: 2,
            //maxDate:moment().subtract('months', 3),
            minView: 2,
            forceParse: false,
            locale: "zh-CN",
            language: 'zh-CN',
            pickerPosition: "bottom-right"
        })
        $("#tollcheck-daydaterange-btnend").datetimepicker({
            endDate: moment().subtract('days', 0).format('YYYY-MM-DD'),
            //startDate:startVal,
            format: 'yyyy-mm-dd',
            weekStart: 1,
            autoclose: true,
            startView: 2,
            minView: 2,
            forceParse: false,
            locale: "zh-CN",
            language: 'zh-CN',
            pickerPosition: "bottom-right"
        })
    },
    //获取接口收费员信息
    getChargerMsg: function () {
        var plNo = "";
        var chargers = "";
        var req = {
            baseRequest: {pageNum: 1, pageSize: 0},
            plNo: plNo,
            parkAreaCode: "",
            groupCode: "",
            onduty: "",
            status: "",
            nameOrNo: "",
            orgId:fn.getOrgId(),
            sysCode: sysComm.sysCode
        };
        var opt = {
            async: false,
            data: JSON.stringify(req),
            method: "POST",
            url: dataUrl.util.queryCashierListInfo(),
            success: function (res) {
                if (res.code == '8888') {
                    chargers = JSON.stringify(res.data.rows);
                }
            }
        }
        sysAjax(opt);
        return JSON.parse(chargers);
    },
    //收费员下拉框
    tollperInit:function () {
        var data = fun.getChargerMsg();
        var htmls = '';
        var html = '';
        var chargerCodes = [];
        for (var i = 0; i < data.length; i++) {
            chargerCodes.push(data[i].chargerCode);
            html += "<option value='[\"" + data[i].chargerCode + "\"]'>" + data[i].chargerCode + "-" + data[i].chargerName + "</option>";
        }
        var chargerCodesStr = JSON.stringify(chargerCodes);
        htmls = '<option value=' + chargerCodesStr + ' selected>所有收费员</option>' + html;

        $("#tollcheck-tollper").empty();
        $("#tollcheck-tollper").append(htmls);
        $('#tollcheck-tollper').selectpicker('render');
    },
    getDict: function (dictKind) {
        var data = new Array();
        if (undefined == dictKind) {
            return null;
        }

        var req = {
            sysCode: sysComm.sysCode,
            sysCodeKind: dictKind
        }

        var opt = {
            data: JSON.stringify(req),
            method: "POST",
            async: false,
            url: dataUrl.util.getSysCodeValueByKind(),
            async: false,
            success: function (res) {
                console.log(res)
                if (res.code == '8888') {
                    //return res.data;
                    km = res.data[0].codeValue;

                }
            }
        }
        sysAjax(opt);
    },
    //默认数据 table 全部
    createTableData: function () {
        $('#tollchecktable').bootstrapTable('destroy').bootstrapTable({
            striped: true, //表格显示条纹
            pagination: true, //启动分页
            pageNumber: 1, //当前第几页
            // showColumns: true,
            pageSize: 10, //每页显示的记录数
            pageList: [10, 15, 20], //记录数可选列表
            sidePagination: 'server', //表示服务端分页
            queryParamsType: 'limit',
            method: 'POST', //请求方法
//          fixedColumns: true,
//          fixedNumber: 1,
//          leftFixedColumns: true,
//          leftFixedNumber: 3,
            //rightFixedColumns: true,
            //rightFixedNumber: 1,
            // selectItemName: 'personCustName',
            paginationPreText: '<',
            paginationNextText: '>',
            ajax: tableLoadRequest, //自定义ajax加载数据
            uniqueId: 'id',
            rowStyle:fun.markTheTable,
            onClickRow:fun.clickTheRow,
            columns: [
                {
                    field: 'chargerName',
                    title: '<span class="person-icon"></span>收费员名称',
                    width: '10%',
                    visible: true,
                    align: "left",
                    formatter: function (value, row, index) {
                        return '<div data-toggle="tooltip" style="max-width: 110px" class="ITD-common-fontsize12 ITD-common-color070 ITD-cursor-pointer ITD-hidden-nowrap" title=" '+  commonObj.replacenull(value)+ '">'+  commonObj.replacenull(value)+'</div>'
                    }
                },
                {
                    field: 'plName',
                    title: '<span class="parking-icon"></span>车场名称',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {

                        return '<div data-toggle="tooltip" style="max-width: 130px" class="ITD-common-fontsize12 ITD-common-color070 ITD-cursor-pointer ITD-hidden-nowrap" title=" '+commonObj.replacenull(value)+ '">'+commonObj.replacenull(value)+'</div>';
                    }
                },
                {
                    field: 'deviceCode',
                    title: '<span class="business-icon"></span>PDA编号',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        return '<div class="ITD-common-fontsize12 ITD-common-color070" >'+commonObj.replacenull(value)+'</div>';
                    }
                },
                {
                    field: 'parkAreaNames',
                    title: '<span class="berth-icon"></span>泊位区间',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        return '<div data-toggle="tooltip" class="ITD-common-fontsize12 ITD-hidden-nowrap ITD-cursor-pointer ITD-common-color070" style="max-width: 220px;" title="' +commonObj.replacenull(value)+ '">'+commonObj.replacenull(value)+'</div>';
                    }
                },
                {
                    field: 'signInTime',
                    title: '<span class="time-icon"></span>签到时间',
                    width: '15%',
                    align: "left",
                    formatter: function (value, row, index) {
                        return '<div class="ITD-common-fontsize12 ITD-common-color070" >'+commonObj.timeFormatter(value)+'</div>'
                    }
                },
                {
                    field: 'signOutTime',
                    title: '<span class="time-icon"></span>签退时间',
                    width: '15%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var result = "";
                        if(value == null){
                            result = "";
                        }else{
                            result = value;
                        }
                        return '<div class="ITD-common-fontsize12 ITD-common-color070" >'+commonObj.timeFormatter(result)+'</div>'
                    }
                },
                {
                    field: 'signInDistance',
                    title: '<span class="status-icon"></span>签到类型',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var result = "";
                        if(value == null || value <= DISTANCE){
                            result = "正常签到";
                        }else{
                            result = "超距离签到";
                        }
                        return '<div class="ITD-common-fontsize12 ITD-common-color070" >'+commonObj.replacenull(result)+'</div>'
                    }
                },
                {
                    field: 'signOutType',
                    title: '<span class="status-icon"></span>签退类型',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var result = "";
                        if(value == null){
                            result = "";
                        }
                        else{
                            if(1 == (value)){
                                if( row.signOutDistance <= DISTANCE){
                                    result = "正常签退";
                                }else{
                                    result = "超距离签退";
                                }
                            }else if(0 == (value)){
                                result = "云平台操作强制签退";
                            }else if(2 == (value)){
                                result = "重新登录签退";
                            }else if(3 == (value)){
                                result = "超时未上报心跳,系统强制签退";
                            }else{
                                result = "未知";
                            }
                        }
                        
                        return '<div class="ITD-common-fontsize12 ITD-common-color070" >'+commonObj.replacenull(result)+'</div>'
                    }
                },
                {
                    field: 'signInDistance',
                    title: '<span class="state-icon"></span>签到距离/签退距离',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var result = "";
                        if(row.signOutDistance == null){
                            result = "-";
                        }else{
                            result = commonObj.numberFormatter(row.signOutDistance) +'米';
                        }
                        return '<div style="max-width: 150px" data-toggle="tooltip" class="ITD-common-fontsize12 ITD-common-color ITD-hidden-nowrap ITD-cursor-pointer checkerMsg" title="' +commonObj.numberFormatter(value)+'米/' +(result)+'米" >'
                            +commonObj.numberFormatter(value)+'米/'
                            +(result)+'</div>'
                    }
                },

            ]
        });

    },
    //标记
    markTheTable:function (value,row, index) {
        //这里有5个取值代表5中颜色['active', 'success', 'info', 'warning', 'danger'];
        var strclass = "";
        if ((value.signInDistance > DISTANCE || value.signInDistance  == null) || (value.signOutDistance > DISTANCE)) {
            strclass = 'danger';
        }
        else {
            strclass = '';
        }
        return { classes: strclass }
    },
    //点击行
    clickTheRow:function (value,row, index) {
        var plNo = value.plNo;
        var parkLonId =0;
        var parkLatId =0;
        var parks = fn.getParkLot();
        $.each(parks, function(index,item) {
        	if(item.code == plNo){
        	    parkLonId = item.lonId;
        	    parkLatId = item.latId;
            }
        });
        var parkData=[ {"pointX":parkLonId,"pointY":parkLatId}];
        var pdaData=[
            {
                "pointX":value.signInLonid,"pointY":value.signInLatid,"distance":value.signInDistance,"pdatime":commonObj.timeFormatter(value.signInTime),"chargerName":commonObj.replacenull(value.chargerName),"type":"签到"
            },
        ];
        if(value.signOutLonid != null && value.signOutLatid != null){
            var outData = {
                    "pointX":value.signOutLonid,"pointY":value.signOutLatid,"distance":value.signOutDistance,"pdatime":commonObj.timeFormatter(value.signOutTime),"chargerName":commonObj.replacenull(value.chargerName),"type":"签退"
            };
            pdaData.push(outData);
        }
        
        $('#tollcheck_mapmodel').modal('show');
        setTimeout(function () {
            fun.drawMarker(parkData,pdaData)
        },300);
        // fun.drawMarker(parkData,pdaData)
        
    },
    /*获取查询参数*/
    getQueryParam: function () {
        //时间
        var beginTime= $("#tollcheck-daydaterange-btnsta").val()+" 00:00:00";
        var endTime=$("#tollcheck-daydaterange-btnend").val()+" 23:59:59";
        beginTime = new Date(beginTime.replace(new RegExp(/-/gm) ,"/"));
        endTime = new Date(endTime.replace(new RegExp(/-/gm) ,"/"));
        //收费员
        var tollper = JSON.parse($("#tollcheck-tollper").val());
        if (tollper.length < 1) {
            tollper.push("-1X");
        }

        var req = {
            sysCode: sysComm.sysCode,
            chargerCodes: tollper,
            beginTime:beginTime,
            endTime:endTime,
            distance : DISTANCE
        };

        // req.payFinishTimeStart = req.beginTime;
        // req.payFinishTimeEnd = req.endTime;
        // req.payTypes = [1,2,4,5];

        var index =  fun.getDiffIndex();
        // distanceFlag /**全部-null 正常-0 异常-1*/
        //全部
        if(index == 0){
            req.distanceFlag = null;
        }

        //正常
        if(index == 1){
            req.distanceFlag = 0;
        }
        //异常
        if(index == 2){
            req.distanceFlag = 1
        }

        return req;

    },
    //获取正常异常下标
    getDiffIndex:function(){
        return $('#tab-btn-wrap li.tabAction').index();
    },
    // 地图初始化
    drawMarker:function(parkData,pdaData) {
        // 添加百度地图
        var lonPark = parkData[0].pointX;
        var latPark = parkData[0].pointY;
        console.log(lonPark,latPark)
        var map; //Map实例
        //清除以前的点位
        // map.clearOverlays();
        map = new BMap.Map('allmap', {enableMapClick: false});
        map.clearOverlays();
        //第1步:设置地图中心点,当前城市
        var cenpoint = new BMap.Point(lonPark,latPark);
        //第2步:初始化地图,设置中心点坐标和地图级别。
        map.centerAndZoom(cenpoint, 16);
        map.setCurrentCity(sysComm.cityName);  // 设置地图显示的城市 此项是必须设置的
        //坐标强制居中
        // map.panBy(340, 250);
        //第3步:启用滚轮放大缩小
        map.enableScrollWheelZoom(true);
        //第4步:向地图中添加缩放控件
        //第5步:检测浏览器兼容
        function checkhHtml5() {
            if (typeof(Worker) === "undefined") {
                if (navigator.userAgent.indexOf("MSIE 9.0") <= 0) {
                    alert("定制个性地图示例:IE9以下不兼容,推荐使用百度浏览器、chrome、firefox、safari、IE10");
                }

            }
        }
        checkhHtml5();
        //第7步:绘制点
        var parkmarker = [];
        var parknewpoiX = null;//坐标
        var parknewpoiY = null;
        for (var i = 0; i < parkData.length; i++) {
            parknewpoiX = parkData[i].pointX;
            parknewpoiY = parkData[i].pointY;

            var newPoint = new BMap.Point(parknewpoiX, parknewpoiY);

            var myIcon = new BMap.Icon("../../assets/pages/scripts/operMonFile/img/parkIcon1.png",
                new BMap.Size(30, 39), {
                    offset: new BMap.Size(10, 39),
                    textColor: '#fff'
                });
            parkmarker[i] = new BMap.Marker(newPoint, {icon: myIcon});

            map.addOverlay(parkmarker[i]);
            //
            //电子围栏函数
            addCircle(km, parknewpoiX,parknewpoiY);
            pdadrawFun();
        };
        // 停车场画圆 半径:km
        function addCircle(km,parknewpoiX,parknewpoiY) {
            var mPoint = new BMap.Point(parknewpoiX,parknewpoiY);
            var circle = new BMap.Circle(mPoint,km,{fillColor:"#1E95CD",stroke: "#1E95CD",strokeWeight: '2' ,fillOpacity: 0.2, strokeOpacity: 0.1});
            map.addOverlay(circle);
        };
        // pda
        function pdadrawFun(){
            var pdamarker = [];
            var newpoiX = null;//坐标
            var newpoiY = null;
            var distance = null;//签到距离
            var pdatime = null;//签到时间
            var chargerName = null;//收费员名称
            for(var j=0;j<pdaData.length;j++){
//          console.log(pdaData);
                //pda渲染
                newpoiX = pdaData[j].pointX;
                newpoiY = pdaData[j].pointY;
                distance = pdaData[j].distance;
                chargerName= pdaData[j].chargerName;
                pdatime= pdaData[j].pdatime;

                type= pdaData[j].type;

                var pdapoint=new BMap.Point(newpoiX, newpoiY);
                console.log(newpoiX,newpoiY,type)
                if(type=='签到'){
                    //pda标题
                    myLabels = new BMap.Label('<div class="showpdaName">'+type+'时间:'+pdatime+'</div>', {
                        offset: new BMap.Size(8, -36),                  //label的偏移量,为了让label的中心显示在点上
                        position: pdapoint});
                    myLabels.setStyle({
                            color: "#F0F0F0",
                            fontSize: "12px",
                            padding: "5px",
                            whiteSpace: "normal",
                            backgroundColor: "rgba(0, 0, 0, 0)",
                            border: "0px",
                            zIndex: "1000"
                        }
                    );
                    map.addOverlay(myLabels);
                    //添加pdaicon
                    var myIconpda = new BMap.Icon("../../assets/pages/scripts/operMonFile/img/pdaIco.png",
                        new BMap.Size(24, 36)/*, {
                            offset: new BMap.Size(0, 18),
                            textColor: '#fff'
                        }*/);

                    pdamarker[j]= new BMap.Marker(pdapoint, {icon: myIconpda});
                    map.addOverlay(pdamarker[j]);
                }else {
                    //pda标题
                    myLabels = new BMap.Label('<div class="showpdaoutName">'+type+'时间:'+pdatime+'</div>', {
                        offset: new BMap.Size(8, 0),                  //label的偏移量,为了让label的中心显示在点上
                        position: pdapoint});
                    myLabels.setStyle({
                            color: "#F0F0F0",
                            fontSize: "12px",
                            padding: "5px",
                            whiteSpace: "normal",
                            backgroundColor: "rgba(0, 0, 0, 0)",
                            border: "0px",
                            zIndex: "1000"
                        }
                    );
                    map.addOverlay(myLabels);
                    //添加pdaicon
                    var myIconpda = new BMap.Icon("../../assets/pages/scripts/operMonFile/img/pdaIco.png",
                        new BMap.Size(24, 36)/*, {
                            offset: new BMap.Size(0, 0),
                            textColor: '#fff'
                        }*/);

                    pdamarker[j]= new BMap.Marker(pdapoint, {icon: myIconpda});
                    map.addOverlay(pdamarker[j]);
                }


            }

        }

    },
    //导出函数
    exportList:function(){
        //校验日期
        var req = fun.getQueryParam();
        var datesta = $("#tollcheck-daydaterange-btnsta").val();
        var dateend = $("#tollcheck-daydaterange-btnend").val();
        var beginTime = datesta+" 00:00:00";
        var endTime=dateend+" 23:59:59";
        
        var chargerCodes = req.chargeCodes;
        var url = dataUrl.util.exportChargerSignList() + '?chargerCodes=' + req.chargerCodes  + '&distance=' + DISTANCE  +'&distanceFalg=' + req.distanceFlag  + '&beginTime=' + beginTime + '&endTime=' + endTime +'&sysCode='+sysComm.sysCode;
        window.downloadFile(url);
    },
};

fun.init();

//切换  全部 正常 异常
$('#tab-btn-wrap li').on('click',function () {
    //因后面逻辑需要,一定要线切换 tabAction 样式, 然后在调用 对应的函数
    $(this).addClass('tabAction').siblings().removeClass('tabAction');
    fun.createTableData();
});
//查询按钮
$('#tollcheck-Btn').on('click',function () {
    fun.createTableData();
});


/**
 * 自定义table AJAX请求
 * @param {Object} params
 */
function tableLoadRequest(params) {
    var req = fun.getQueryParam();
    //设置请求参数
    var pageNum = (params.data.offset / params.data.limit) + 1;

    //条件查询
    req.baseRequest = {
        pageNum: pageNum,
        pageSize: params.data.limit
    };

    var opt = {
        method: 'post',
        url: dataUrl.util.querySignRecordByChargerCode(),
        data: JSON.stringify(req),
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        success: function (res) {
            //console.log(res);
            if (res.code == '8888') {
                params.success(res.data);
                $("[data-toggle='tooltip']").tooltip({
                    delay: {show: 500, hide: 100},
                });
            }
        }
    };
    sysAjax(opt);
};


//导出
//导出功能
window.downloadFile = function (sUrl) {

    //iOS devices do not support downloading. We have to inform user about this.
    if (/(iP)/g.test(navigator.userAgent)) {
        alert('Your device does not support files downloading. Please try again in desktop browser.');
        return false;
    }

    //If in Chrome or Safari - download via virtual link click
    if (window.downloadFile.isChrome || window.downloadFile.isSafari) {
        //Creating new link node.
        var link = document.createElement('a');
        link.href = sUrl;

        if (link.download !== undefined) {
            //Set HTML5 download attribute. This will prevent file from opening if supported.
            var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);
            link.download = fileName;
        }

        //Dispatching click event.
        if (document.createEvent) {
            var e = document.createEvent('MouseEvents');
            e.initEvent('click', true, true);
            link.dispatchEvent(e);
            return true;
        }
    }

    // Force file download (whether supported by server).
    if (sUrl.indexOf('?') === -1) {
        sUrl += '?download';
    }

    window.open(sUrl, '_self');
    return true;
}

window.downloadFile.isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
window.downloadFile.isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;
var InterValObj; //timer变量,控制时间
var count = 8; //间隔函数,1秒执行
var curCount;//当前剩余秒数

function sendMessage() {
    curCount = count;
    //设置button效果,开始计时
    $("#caryardReport").attr("disabled", "true");
    $(".ITD-export-btn").css("width", "138px");
    $("#caryardReport").val(curCount + "秒后可再次导出");
    InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
}

//timer处理函数
function SetRemainTime() {
    if (curCount == 0) {
        window.clearInterval(InterValObj);//停止计时器
        $("#caryardReport").removeAttr("disabled");//启用按钮
        $(".ITD-export-btn").css("width", "72px");
        $("#caryardReport").val("导出");
    }
    else {
        curCount--;
        $("#caryardReport").val(curCount + "秒后可再次导出");
    }
}
//导出excle
documentBindFunc.on('click','#caryardReport',function (){
    //获取table所有行数据
    var parkLot = $("#tollchecktable").bootstrapTable('getData');
    //获取table总条数
    var numTotal = $("#tollchecktable").bootstrapTable('getOptions').totalRows;
    //提示 无数据不导出
    if(parkLot.length<1){
        $('.ITD-alertmodel-contentmsg').text('无数据可导出!');
        $('#ITD-tipsmodel').modal('show');
        setTimeout(function () {
            $('.ITD-alertmodel-contentmsg').text('');
            $('#ITD-tipsmodel').modal('hide');
        },3000);
        return false;
    }
    //超1万条 缩短查询范围
    if(numTotal>10000){
        $('.ITD-alertmodel-contentmsg').text('数据量过大,请缩小查询范围!');
        $('#ITD-tipsmodel').modal('show');
        setTimeout(function () {
            $('.ITD-alertmodel-contentmsg').text('');
            $('#ITD-tipsmodel').modal('hide');
        },3000);
        return false;
    }

    //执行倒计时函数
    sendMessage();
    
    fun.exportList();
});