caryard.js 50.1 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 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328
var fun = {
    init:function(){
        fun.queryParkRealTimeDatasByPlNos();
        fun.initPark();
        fun.createTableData();
    },
    //初始化停车场下拉框
    initPark: function () {
        var data = fn.getParkLot();
        $("#caryard_parkIds").empty();
        var html = '';
        plNos = [];
        for (var i = 0; i < data.length; i++) {
            plNos.push(data[i].code);
            html += "<option value='[\"" + data[i].code + "\"]'>" + data[i].name + "</option>";
        }

        var plnosStr = JSON.stringify(plNos);
        html = '<option value=' + plnosStr + ' selected>所有停车场</option>' + html;
        $("#caryard_parkIds").append(html);
        $('#caryard_parkIds').selectpicker('render');
    },
    /*获取查询参数*/
    getQueryParam: function() {
        //停车场
        var plnos = JSON.parse($("#caryard_parkIds").val());
        var plType = $('#caryard_parkTypes').val();

        var filterPark = fn.getParkLot();
        var filterPlNos = [];
        for (var i = 0; i < filterPark.length; i++) {

            if(filterPark[i].type == plType || plType == '-1'){
                filterPlNos.push(filterPark[i].code);
            }

        }
        var resultPlNos = [];
        $.each(plnos,function (index,item) {
            console.log(item)
            console.log(filterPlNos.indexOf(item))
            if(filterPlNos.indexOf(item)>=0){
                resultPlNos.push(item);
            }
        })

        if(resultPlNos.length == 0){
            resultPlNos.push('X');
        }

        var req = {
            plNos: resultPlNos,
        };
        return req;
    },
    //占用率
    rateEchart: function (chartRate, berthNum, useBerthNum) {
        console.log(chartRate);
        console.log(berthNum);
        console.log(useBerthNum);
        var chart = echarts.init(document.getElementById('caryard-parking-echart'));
        var option = {
            title: {
                text: chartRate + '%',
                textStyle: {
                    color: '#000',
                    fontSize: '18',
                    align: 'center',
                    fontFamily: '微软雅黑'
                },
                top: '60',
                left: 'center'
            },
            legendHoverLink: false,
            series: [
                {
                    name: '',
                    type: 'pie',
                    radius: '65%',
                    center: ['50%', '50%'],
                    legendHoverLink: false,
                    avoidLabelOverlap: false,
                    startAngle: 180,
                    hoverAnimation: false,
                    label: {normal: {show: false}},
                    data: [
                        {
                            value: 50,
                            name: '',
                            itemStyle: {normal: {color: '#edf7fb'}, emphasis: {color: '#edf7fb'}},
                            label: {normal: {show: false}}
                        },
                        {
                            value: 50,
                            name: '',
                            itemStyle: {normal: {color: '#edf7fb'}, emphasis: {color: '#edf7fb'}},
                            label: {normal: {show: false}}
                        }
                    ]
                },
                {
                    name: '具体比例',
                    type: 'pie',
                    radius: ['75%', '85%'],
                    //radius: ['50%', '50%'],
                    center: ['50%', '50%'],
                    legendHoverLink: false,
                    avoidLabelOverlap: false,
                    hoverAnimation: false,
                    // hoverOffset:0,
                    startAngle: 180,
                    color: ['#5fe98f', '#cccc'],
                    label: {
                        normal: {
                            show: false,
                            position: 'inside',
                            formatter: '{c}%'
                        },
                        emphasis: {
                            show: false,
                            textStyle: {
                                fontSize: '30',
                                fontWeight: 'bold'
                            }
                        }

                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data: [

                        {
                            value: useBerthNum,
                            name: '20~25岁',
                            itemStyle: {normal: {color: '#5fe98f'}, emphasis: {color: '#5fe98f'}},
                            label: {normal: {show: false}}
                        },
                        {
                            value: (berthNum-useBerthNum),
                            name: '25~30岁',
                            itemStyle: {normal: {color: '#cccc'}, emphasis: {color: '#cccc'}},
                            label: {normal: {show: false}}
                        },
                        // {
                        //     value: 25,
                        //     name: '20~25岁',
                        //     itemStyle: {normal: {color: '#5fe98f'}, emphasis: {color: '#5fe98f'}},
                        //     label: {normal: {show: false}}
                        // },
                        // {
                        //     value: 5,
                        //     name: '25~30岁',
                        //     itemStyle: {normal: {color: '#cccc'}, emphasis: {color: '#cccc'}},
                        //     label: {normal: {show: false}}
                        // },
                        // {value:4, name:'',itemStyle:{normal:{color:'#fff'},emphasis:{color:'#fff'}}, label:{normal: {show: false}}}
                    ]
                }
            ]
        };
        chart.setOption(option, true);
        //自适应
        /*  window.onresize = function(){
         chart.resize();
         };*/
    },
    //利用率
    usageEchart: function (xTimeDatas,occupyDatas) {
        var mychart = echarts.init(document.getElementById('berth-usage-echart'));
        var option = {
            color: ['#5fe98f'],
            animationDuration:2000,
            tooltip : {
                trigger: 'axis',
                textStyle:{
                    fontSize:'12px'
                },
                padding:[10,10,10,10],
                formatter: function (params) {
                    //return params[0].value+'%'
                    return (params[0].value*100).toFixed(2) +'%'
                },
            },


            grid: {
                top: '10%',
                left: '2%',
                right: '2%',
                bottom: '0%',
                containLabel: true
            },
            // legend: {
            //     top: '0',
            //     right: '24',
            //
            // },


            xAxis: {
                type: 'category',
                boundaryGap: true,
                data: xTimeDatas,
                // nameGap:'2',
                // boundaryGap:['2%','2%'],
                axisLabel: {
                    // interval:0,
                    show: true,
                    textStyle: {
                        color: 'rgba(0,0,0,0.8)',
                        fontSize: '12px',
                        fontFamily: '微软雅黑'
                    },

                },

                // splitNumber:2,
                // // minInterval:2,
                axisTick: {
                    show: false,
                },
                splitLine:{
                    lineStyle:{
                        color:'rgba(0,0,0,0.1)',
                    }
                },

                axisLine: {
                    show: true,
                    lineStyle: {
                        color: 'rgba(0,0,0,0.1)',
                        // width: 1,//这里是为了突出显示加上的
                    }
                },
            },
            yAxis: {
                type: 'value',
                splitNumber: 2,
                // minInterval:2,
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: 'rgba(0,0,0,0.8)',
                        fontSize: '12px',
                        fontFamily: '微软雅黑'
                    },
                    formatter: function (value) {
                        return value*100 +'%'
                    },
                },
                axisTick: {
                    show: false,
                },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(0,0,0,0.1)',
                        width: 1,//这里是为了突出显示加上的
                    }
                },
                splitLine:{
                    lineStyle:{
                        // type:'dashed',
                        color:'rgba(0,0,0,0.1)',
                    }
                }
            },
            series: [
                {
                    name: '24小时泊位占用率',
                    type: 'line',
                    data: occupyDatas,
                    symbol: 'circle',
                    symbolSize: 10,
                    itemStyle: {
                        normal: {
                            lineStyle: {
                                color: '#f0f0f2',
                            }
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: '#effdf4'
                        }
                    },
                    lineStyle: {
                        normal: {
                            color: '#5fe98f',
                            width: 2,
                        }
                    }
                },

            ]
        };
        mychart.setOption(option, true);
       // 自适应
        window.onresize = mychart.resize;
    },
    queryParkRealTimeDatasByPlNos: function () {
        var data = fn.getParkLot();
        var plNos = [];
        var openParkCount = 0;
        var closeParkCount = 0;
        var allParkCount = data.length;
        var berthsNum = 0;
        for (var i = 0; i < data.length; i++) {
            plNos.push(data[i].code);
            if (parseInt(data[i].type) == 1) {
                openParkCount += 1;
            } else {
                closeParkCount += 1;
            }
            berthsNum += parseInt(data[i].berthsNum);

        }
        $("#allParkCount").text(allParkCount);
        $("#openParkCount").text(openParkCount);
        $("#closeParkCount").text(closeParkCount);


        if (plNos.length < 1) {
            plNos.push("-1X");
        }

        var req = {
            sysCode: sysComm.sysCode,
            plNos: plNos
        };
        var opt = {
            method: 'post',
            url: dataUrl.util.queryParkRealTimeDatasByPlNos(),
            data: JSON.stringify(req),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (res) {
                if (res.code == '8888') {
                    var data = res.data;
                    var berthFreeNum = data.berthFreeNum;
                    var berthNum = data.berthNum;
                    var parkIncome = data.parkIncome;
                    var allIncome=data.allIncome;
                    var useBerthNum = parseInt(berthNum) - parseInt(berthFreeNum);
                    var rate = (useBerthNum * 100 / berthNum).toFixed(2);

                    var parkOnLinePayNum=data.parkOnLinePayNum==null?0:data.parkOnLinePayNum;
                    var parkOffLinePayNum=data.parkOffLinePayNum==null?0:data.parkOffLinePayNum;
                    var vipPayNum=data.vipCardChargeNum==null?0:data.vipCardChargeNum;
                    $("#allParkBerthNum").text(berthsNum);
                    $("#allFreeBerthNum").text(berthFreeNum);
                    $("#incomeCount").text(parkOnLinePayNum+parkOffLinePayNum+vipPayNum);
                    $("#parkIncome").text(fun.money(allIncome));
                   if(isNaN(rate)){
                        rate = 0;
                    }
		    $("#rate").text(rate);

                }
            }
        };
        sysAjax(opt);
    },
    money:function (value) {
        if(value==null || value==undefined || value =="0.00"){
            return 0.00;
        }else{
            return (value/100).toFixed(2);
        }
    },
    //生成表格数据
    createTableData: function () {
        $('#recordtable').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',
            columns: [
                {
                    field: 'plName',
                    title: '<span class="information-icon"></span>车场基本信息',
                    width: '10%',
                    visible: true,
                    align: "left",
                    formatter: function (value, row, index) {
                        // console.log(row.plNo)
                        if(row.plAddress==null||row.plAddress==undefined||row.plAddress==''){
                            row.plAddress = '-'
                        }
                        if(value==null||value==undefined||value==''){
                            value = '-'
                        }
                        return '<div class="ITD-common-fontsize16 ITD-common-color margin-bottom-5 info-alert " dataplno="' + row.plNo + '" dataplname="' + row.plName + '">' + value + '</div>' +
                            '<div class="ITD-common-fontsize12 ITD-common-color070">' + row.plAddress + '</div>'
                    }
                },
                {
                    field: 'carNumber',
                    title: '<span class="berth-icon"></span>泊位信息',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var berthNum = row.berthNum;
                        var freeBerthNum = row.berthFreeNum;
                        if(freeBerthNum==undefined || freeBerthNum ==null || freeBerthNum==""){
                            freeBerthNum = 0;
                        }
                        if(berthNum==undefined || berthNum ==null || berthNum==""){
                            berthNum = 0;
                        }
                        var useBerthNum = berthNum - freeBerthNum;
                        console.log(berthNum+','+freeBerthNum)
                        var rate = 0;
                        if(berthNum!=undefined && berthNum !=null && berthNum!=0){
                            rate=useBerthNum * 100 / berthNum;
                        }
                        if(berthNum == 0){
                            rate = 100;
                        }
                        if (rate < 40) {
                            return '<div class="ITD-common-fontsize16 ITD-common-color000 margin-bottom-5">占用' + useBerthNum + '个<span class="caryard-table-berth-status-green float-right">充足</span></div><div class="ITD-common-fontsize12 ITD-common-color070">总共' + berthNum + '个 占用率 : ' + rate.toFixed(2) + '%</div>'
                        } else if (rate >= 40 && rate <= 60) {
                            return '<div class="ITD-common-fontsize16 ITD-common-color000 margin-bottom-5">占用' + useBerthNum + '个<span class="caryard-table-berth-status-black float-right">平衡</span></div><div class="ITD-common-fontsize12 ITD-common-color070">总共' + berthNum + '个 占用率 : ' + rate.toFixed(2) + '%</div>'
                        } else {
                            return '<div class="ITD-common-fontsize16 ITD-common-color000 margin-bottom-5">占用' + useBerthNum + '个<span class="caryard-table-berth-status-red float-right">紧张</span></div><div class="ITD-common-fontsize12 ITD-common-color070">总共' + berthNum + '个 占用率 : ' + rate.toFixed(2) + '%</div>'
                        }

                    }
                },
                {
                    field: 'cardType',
                    title: '<span class="carflow-icon"></span>车流量',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var incarNum = row.inCarNum;
                        if(incarNum==undefined || incarNum ==null || incarNum==""){
                            incarNum = 0;
                        }
                        var outCarNum = row.outCarNum;
                        if(outCarNum==undefined || outCarNum ==null || outCarNum==""){
                            outCarNum = 0;
                        }
                        return '<div class="ITD-common-fontsize12 ITD-common-color070 margin-bottom-5">入场:' + incarNum + '辆</div>' +
                            '<div class="ITD-common-fontsize12 ITD-common-color070">出场:' + outCarNum + '辆</div>'
                    }
                },
                {
                    field: 'num',
                    title: '<span class="device-icon"></span>设备信息',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var onlinePDACount = row.onlinePDACount == null ? 0 : row.onlinePDACount;
                        var allPDACount = row.allPDACount == null ? 0 : row.allPDACount;
                        var onlineEqpCount = row.onlineEqpCount == null ? 0 : row.onlineEqpCount;
                        var allEqpCount = row.allEqpCount == null ? 0 : row.allEqpCount;
                        var signInTollCollector = row.signInTollCollector == null ? 0 : row.signInTollCollector;
                        return '<div class="ITD-common-fontsize12 ITD-common-color070 margin-bottom-5">地磁:在线' + onlineEqpCount + '/' + allEqpCount + '</div>' +
                            '<div class="ITD-common-fontsize12 ITD-common-color070">PDA:在线' + signInTollCollector + '</div>'
                    }
                },
                {
                    field: 'price',
                    title: '<span class="person-icon"></span>人员信息',
                    width: '10%',
                    align: "left",
                    formatter: function (value, row, index) {
                        var allTollCollector = row.allTollCollector == null ? 0 : row.allTollCollector;
                        var signInTollCollector = row.signInTollCollector == null ? 0 : row.signInTollCollector;
                        return '<div class="ITD-common-fontsize12 ITD-common-color070 margin-bottom-5">收费员:</div>' +
                            '<div class="ITD-common-fontsize12 ITD-common-color070">应签到:' + allTollCollector + '人&nbsp;&nbsp;&nbsp;&nbsp;实签到:' + signInTollCollector + '人</div>'
                    }
                },


            ]
        });

    },
    alertIfo: function (plNo, plName) {
        plNo = $("#dataplno").val();

        //初始化
        $("#basePlName").text('');
        $("#basePlType").text('');
        $("#baseDeviceType").text('');
        $("#baseBerthNum").text('0个');
        $("#baseInOutNum").text("2出2入");
        $("#baseBusiCircle").text('');
        $("#baseAddress").text('');
        $("#baseParkImg").empty();
        $("#baseMaxCarTwo").text('0');
        $("#baseMaxCarThree").text('0');
        $("#baseMaxCarFirst").text('0');

        $("#baseSmallCarFirst").text('0');
        $("#baseSmallCarTwo").text('0');
        $("#baseSmallCarThree").text('0');


        var req = {
            sysCode: sysComm.sysCode,
            pklNo: plNo
        };
        var getParkLotEqpCountChart = {
            method: "post",
            url: dataUrl.util.queryParkingBaseInfo(),
            data: JSON.stringify(req),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (res) {
                if (res.code == '8888') {

                    var result = res.data;
                    console.log(result);
                     $("[data-toggle='tooltip']").tooltip({
                                                delay: {show: 500, hide: 100},
                                            });
                    //停车类型
                    var parkType;
                    var eqpName;
                    if (1 == result.plType) {
                        parkType = '路侧';
                        eqpName = '地磁';

                    } else if (2 == result.plType) {
                        parkType = '封闭';
                        eqpName = '道闸';
                    } else {
                        parkType = '未知';
                        eqpName = '地磁';
                    }


                    //商圈属性1:商场、2:医院、3:小区、4:学校、5:写字楼、6:景区、7:交通场站、8:其他
                    var busiCircle;
                    if (1 == result.busiCircle) {
                        busiCircle = '商场'
                    } else if (2 == result.busiCircle) {
                        busiCircle = '医院'
                    } else if (3 == result.busiCircle) {
                        busiCircle = '小区'
                    } else if (4 == result.busiCircle) {
                        busiCircle = '学校'
                    } else if (5 == result.busiCircle) {
                        busiCircle = '写字楼'
                    } else if (6 == result.busiCircle) {
                        busiCircle = '景区'
                    } else if (7 == result.busiCircle) {
                        busiCircle = '交通场站'
                    } else {
                        busiCircle = '其他'
                    }
                    $("#basePlName").text(result.plName);
                    $("#basePlType").text(parkType);
                    $("#baseDeviceType").text(eqpName);
                    $("#baseBerthNum").text(result.plBerthNum + '个');
                    $("#baseInOutNum").text((result.plExitNum == null ? 0 : result.plExitNum) + "出" + (result.plEntranceNum == null ? 0 : result.plEntranceNum) + "入");
                    $("#baseBusiCircle").text(busiCircle);
                    $("#baseAddress").text(result.plAddress);

//			            photoList
                    var photos = result.picUrls;
                    var html = '';
                    $.each(photos, function (index, item) {
                        html += "<li><img src=" + item + " alt=''></li>";
                    });
                    html += '<div class="clearfix"></div>';
                    $("#baseParkImg").html(html);
                    var plRate=result.plRate;
                    if(plRate==null || plRate==undefined || plRate==''||plRate==='[]'){

                        $("#plRate").empty();
                        var htmlnew='<li class="caryard-basic-borderbototm ITD-common-fontsize12 ITD-common-color000">'+
                                '<div class="caryard-basic-ifo-fees-cricle"></div>'+
                                // '<div class="caryard-basic-ifo-fees-type ITD-hidden-nowrap"></div>'+
                                '<div class="caryard-basic-ifo-fees-rule ITD-hidden-nowrap ITD-cursor-pointer">暂未配置</div>'+
                                '<div class="ITD-hidden-nowrap caryard-basic-ifo-fees-max text-center ITD-cursor-pointer">暂未配置</div>'+
                                '</li>';


                        $("#plRate").html(htmlnew);
                    }else{
                        plRate = JSON.parse(plRate);

                        console.log(plRate);
                        $("#plRate").empty();
                        var htmlnew='';
                        for(var index in plRate){
                            htmlnew += '<li class="caryard-basic-borderbototm ITD-common-fontsize12 ITD-common-color000">'+
                                '<div class="caryard-basic-ifo-fees-cricle"></div>'+
                                // '<div class="caryard-basic-ifo-fees-type ITD-hidden-nowrap"></div>'+
                                '<div class="caryard-basic-ifo-fees-rule ITD-hidden-nowrap ITD-cursor-pointer" data-toggle="tooltip" title="'+plRate[index].standard+'">'+plRate[index].standard+'</div>'+
                                '<div class="ITD-hidden-nowrap caryard-basic-ifo-fees-max text-center ITD-cursor-pointer" data-toggle="tooltip" title="'+plRate[index].standardInfo+'">'+plRate[index].standardInfo+'</div>'+
                                '</i>';
                        }

                        $("#plRate").html(htmlnew);
                         $("[data-toggle='tooltip']").tooltip({
                            delay: {show: 500, hide: 100},
                        });

                    }



                }
            }
        };
        sysAjax(getParkLotEqpCountChart);
        // $('#m_r_bar li').eq(0).click();

        $('#caryard_alertmodel').modal('show');


    },
    //根据停车场编码获取车位信息
    getBerthInfoByPlNo: function (plNo) {
        //数据初始化
        $('#allBerthNum').text('');
        $('#freeBerthNum').text('');
        $('#useBerthNum').text('');
        $('#caryard-berth-ifo-main').html('');
        //判断是否为封闭停车场
        var plTypeStr = $("#basePlType").text();
        if(plTypeStr == '封闭'){
            plNo = $("#dataplno").val();
            var plName = $("#dataplname").val();
            $("#parkDataPlName").text(plName);
            /**1、查询实时停车场数据 **/
            var plNos = [];
            plNos.push(plNo);
            var req = {
                sysCode: sysComm.sysCode,
                plNos: plNos
            };
            var opt = {
                method: 'post',
                url: dataUrl.util.queryParkRealTimeDatasByPlNos(),
                data: JSON.stringify(req),
                contentType: 'application/json; charset=utf-8',
                dataType: 'json',
                success: function (res) {
                    console.log(res);
                    if (res.code == '8888') {
                        var data = res.data;
                        var berthFreeNum = data.berthFreeNum;
                        var berthNum = data.berthNum;
                        var useBerthNum = parseInt(berthNum) - parseInt(berthFreeNum);
                        $('#allBerthNum').text(berthNum);
                        $('#freeBerthNum').text(berthFreeNum);
                        $('#useBerthNum').text(useBerthNum);
                        $('#caryard-berth-ifo-main').html('<div class="pop_nomatch">封闭停车场暂无泊位数据</div>');
                    }
                }
            };
            sysAjax(opt);
            return;
        }
        plNo = $("#dataplno").val();
        var allBerths = 0;
        var freeBerths = 0;
        var req = {
            baseRequest: {
                pageNum: 1,
                pageSize: 0
            },
            sysCode: sysComm.sysCode,
            plNo: plNo
        }
        var opt = {
            method: 'post',
            url: dataUrl.util.queryBerthByBerthForPage(),
            data: JSON.stringify(req),
            success: function (res) {
                if (res.code == '8888') {
                    var data = res.data.rows;
                    $('#caryard-berth-ifo-main').empty();
                    var _html = '';
                    // var allBerthData=[];
                    var freeBerthData = [];
                    var useBerthData = [];
                    if (data != null && data.length > 0) {
                        for (var m = data.length - 1; m >= 0; m--) {
                            allBerths += 1;
                            // allBerthData.push(data[m].berthNo);
                            if (parseInt(data[m].isOccupy) == 2) {
                                freeBerths += 1;
                                freeBerthData.push(data[m].berthNo);
                            } else if (parseInt(data[m].isOccupy) == 1) {
                                useBerthData.push(data[m].berthNo);
                            }
                        }
                    }

                    $('#allBerthNum').text(allBerths);
                    $('#freeBerthNum').text(freeBerths);
                    $('#useBerthNum').text(parseInt(allBerths) - parseInt(freeBerths));

                    var number = data.length;
                    var num = Math.ceil(number / 9);
                    console.log(num);


                   // var number = 45;
                   // var num = Math.ceil(number/15);
                   // $('#caryard-berth-ifo-main').empty();
                   // var _html = '';
                    for(var i=0;i<num;i++){

                        _html += '<li class="clearfix">';
                        if(i==(num-1)){
                            var newNum=parseInt(data.length-9*i);
                            for(var k=newNum-1;k>=0;k--){
                                    if (parseInt(data[number-1-k].isOccupy) == 2) {
                                        _html += '<div class="caryard-berth-ifo-status-green" title="' + data[number-1-k].berthNo + '">' + data[number-1-k].berthNo + '</div>';
                                    } else if (parseInt(data[number-1-k].isOccupy) == 1) {
                                        _html += '<div class="caryard-berth-ifo-status-gray" title="' + data[number-1-k].berthNo + '">' + data[number-1-k].berthNo + '</div>';
                                    }
                            }
                        }else{
                                for(var j=0;j<9;j++){
                                    if (parseInt(data[9*i+j].isOccupy) == 2) {
                                        _html += '<div class="caryard-berth-ifo-status-green" title="' + data[9*i+j].berthNo + '">' + data[9*i+j].berthNo + '</div>';
                                    } else if (parseInt(data[9*i+j].isOccupy) == 1) {
                                        _html += '<div class="caryard-berth-ifo-status-gray" title="' + data[9*i+j].berthNo + '">' + data[9*i+j].berthNo + '</div>';
                                    }
                                }
                        }

                        _html += '</li>';
                    }





                    // for(var i=0;i<num;i++){
                    //     if(i==(num-1)){
                    //         //    // for(var k=0;k<(number-15*i);k++){
                    //         //         //根据状态加载caryard-berth-ifo-status-green或者caryard-berth-ifo-status-gray
                    //         //     //}
                    //         _html += '<li class="clearfix">';
                    //         for (var m = data.length - 1-15; m >= 0; m--) {
                    //             if (parseInt(data[m].isOccupy) == 2) {
                    //                 _html += '<div class="caryard-berth-ifo-status-green" title="' + data[m].berthNo + '">' + data[m].berthNo + '</div>';
                    //             } else if (parseInt(data[m].isOccupy) == 1) {
                    //                 _html += '<div class="caryard-berth-ifo-status-gray" title="' + data[m].berthNo + '">' + data[m].berthNo + '</div>';
                    //             }
                    //         }
                    //         _html += '</li>';
                    //     }else{
                    //
                    //     }
                    // }




                    //for(var i=0;i<num;i++){


                    // if(i==(num-1)){
                    //    // for(var k=0;k<(number-15*i);k++){
                    //         //根据状态加载caryard-berth-ifo-status-green或者caryard-berth-ifo-status-gray
                    //     //}
                    // }else{
                    //     //for(var j=0;j<15;j++){
                    //         for (var m = data.length - 1; m >= 0; m--) {
                    //             if (parseInt(data[m].isOccupy) == 2) {
                    //                 _html += '<div class="caryard-berth-ifo-status-green" title="' + data[m].berthNo + '">' + data[m].berthNo + '</div>';
                    //             } else {
                    //                 _html += '<div class="caryard-berth-ifo-status-gray" title="' + data[m].berthNo + '">' + data[m].berthNo + '</div>';
                    //             }
                    //         }
                    //     //}
                    // }


                    //}


                    // for (var i = 0; i < num; i++) {
                    //     _html += '<li class="clearfix">';
                    //     if (i != (num - 1)) {
                    //         for (var k = 0; k < useBerthData.length; k++) {
                    //             _html += '<div class="caryard-berth-ifo-status-gray" title="' + useBerthData[k] + '">' + useBerthData[k] + '</div>';
                    //         }
                    //     } else {
                    //         for (var j = 0; j < freeBerthData.length; j++) {
                    //             _html += '<div class="caryard-berth-ifo-status-green" title="' + freeBerthData[j] + '">' + freeBerthData[j] + '</div>';
                    //         }
                    //     }
                    //
                    //     _html += '</li>';
                    // }
                    //
                    $('#caryard-berth-ifo-main').html(_html);

                }

            }
        }
        sysAjax(opt);
    },
    turnOverRateOccupyCarFlowLineCharts:function () {

        var plNos = [];
        var plNo = $("#dataplno").val();
        plNos.push(plNo);

        if (plNos.length < 1) {
            plNos.push("-1X");
        }
        var req = {
            sysCode: sysComm.sysCode,
            plNos: plNos,
        }
        var opt = {
            method: 'post',
            url: dataUrl.util.queryTodayVehicleFlowOccupyRateAndTurnOver(),
            async: false,
            data: JSON.stringify(req),
            success: function (res) {
                if (res.code == '8888') {
                    //获取数据成功
                    var data = res.data;

                    var xAxisData = [];
                    var seriesData = [];


                    var time = new Date().getHours() + 1;
                    for (var i = 0; i < time; i++) {
                        var item = data[i];
                        var hour = item.hour + '';
                        if (hour.length == 1) {
                            hour = '0' + hour;
                        }
                        hour += ':00';
                        xAxisData.push(hour);
                        seriesData.push(item.avgTurnoverRate.toFixed(2));
                    }


                }
            }
        }
        sysAjax(opt);
    },
    loadParkDatas: function (plNo) {
        plNo = $("#dataplno").val();
        var plName = $("#dataplname").val();
        $("#parkDataPlName").text(plName);
        /**1、查询实时停车场数据 **/
        var plNos = [];
        plNos.push(plNo);
        var req = {
            sysCode: sysComm.sysCode,
            plNos: plNos
        };
        var opt = {
            method: 'post',
            url: dataUrl.util.queryParkRealTimeDatasByPlNos(),
            data: JSON.stringify(req),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (res) {
                console.log(res);
                if (res.code == '8888') {
                    var data = res.data;
                    var berthFreeNum = data.berthFreeNum;
                    var berthNum = data.berthNum;


                    var useBerthNum = parseInt(berthNum) - parseInt(berthFreeNum);
                    var rate = 0;
                    if(berthNum!=undefined && berthNum !=null && berthNum!=0){
                        rate = parseInt(useBerthNum * 100 / berthNum);
                    }
                    $("#parkDataFreeBerthNum").text(berthNum);
                    var parkDataAllIncome = data.allIncome;
                    $("#parkDataAllIncome").text(fun.money(parkDataAllIncome));
                    var parkOnLinePayNum=data.parkOnLinePayNum==null?0:data.parkOnLinePayNum;
                    var parkOffLinePayNum=data.parkOffLinePayNum==null?0:data.parkOffLinePayNum;
                    var vipPayNum=data.vipCardChargeNum==null?0:data.vipCardChargeNum;

                    $("#parkDataIncomeCount").text(parkOnLinePayNum+parkOffLinePayNum+vipPayNum);


                    /**今日交易 **/
                    var parkIncome = data.parkIncome;
                    var parkWxIncome=data.parkWxIncome;
                    var parkAliIncome = data.parkAliIncome;
                    var parkCashIncome=data.parkCashIncome;
                    var parkBalanceIncome = data.parkBalanceIncome;

                    if(parseInt(parkIncome)==0){
                        var wxRate=0;
                        var aliRate=0;
                        var cashRate=0;
                        var otherRate=0;
                    }else{
                        var wxRate=parseInt(parkWxIncome*100/parkIncome);
                        var aliRate=parseInt(parkAliIncome*100/parkIncome);
                        var cashRate=parseInt(parkCashIncome*100/parkIncome);
                        var otherRate=parseInt(parkBalanceIncome*100/parkIncome);
                    }

                    $("#wxRate").css("width",wxRate+'%');
                    $("#aliRate").css("width",aliRate+'%');
                    $("#cashRate").css("width",cashRate+'%');
                    $("#otherRate").css("width",otherRate+'%');

                    /**占用率 **/
                    fun.rateEchart(rate, berthNum, useBerthNum);



                }
            }
        };
        sysAjax(opt);


        //2左下角设备状态
        $("#eqpInfo").empty();

        //初始化
        $("#eqpInfo").html('<li><span class="ITD-common-color000 ITD-hidden-nowrap">岗亭服务器</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">地磁</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">视频桩</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">地锁</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">网关</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">道闸</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>' +
            '<li><span class="ITD-common-color000 ITD-hidden-nowrap">PDA</span>' +
            '<span class="ITD-common-color000 ITD-hidden-nowrap"  ">' +
            '   无	</span></li>');


            fun.queryParkData(plNo);

    },
    queryParkData:function (plNo) {
        var occupydData=getOccupyXDatas();
        var req = {
            sysCode: sysComm.sysCode,
            pklNo: plNo,
        };
        var opttwo={
            method: "post",
            url: dataUrl.util.queryParkingdatas(),
            data: JSON.stringify(req),
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            async: true,
            success: function (res) {
                console.log(res);
                if (res.code == '8888') {
                    var parkDatas = res.data;
                    //console.log(displayCountry);

                    //1-地磁;2-视频桩;3-地锁,4-网关,5-中继器等' 9-PDA
                    var eqpType = [0, 1, 2, 3, 4, 5, 9];
                    $.each(parkDatas.deviceVoList, function (index, item) {
                        var sub = eqpType.indexOf(item.type);
                        if (sub != -1) {
                            var html = $("#eqpInfo").find('li').eq(sub).html();
                            html = html.replace("无", "在线");
                            if (item.onlineCount < item.allCount) {
                                html = html.replace("ITD-common-color000", "color-status-abnormal").replace("在线", "故障");
                            }
                            $("#eqpInfo").find('li').eq(sub).html(html);
                        }
                    });

                    if(parkDatas.statisList != null && (parkDatas.statisList).length >0){
                        $.each(parkDatas.statisList, function (index, item) {
                            var curDate = new Date();
                            curDate.setTime(item.statisticEndTime);
                            for(inData in occupydData.xTimeDatas){
                                if(occupydData.xTimeDatas[inData] == (curDate.getHours()+':00')){
                                    occupydData.occupyDatas[inData]=(1-(item.freeRatio < 0 ? 0 : item.freeRatio)).toFixed(2);
                                    occupydData.turnOverDatas[inData]=item.turnoverRatio < 0 ? 0 : (item.turnoverRatio).toFixed(2);
                                }
                            }

                        });
                        //第一、二个数后台未返回,补零
                        //occupydData.occupyDatas[0]=0;
                        //occupydData.turnOverDatas[0]=0;
                    }

                    // console.log(occupydData.xTimeDatas);
                    // console.log(occupydData.occupyDatas);

                    /**24小时利用率 **/
                    fun.usageEchart(occupydData.xTimeDatas,occupydData.occupyDatas);

                }
            }};

        sysAjax(opttwo);
    },
};

fun.init();
//查询 事件
documentBindFunc.on('click', '#caryard_queryBtn', function () {
    fun.createTableData();
});


setInterval(function () {
    fun.queryParkRealTimeDatasByPlNos();
},commonObj.refreshDataTime);

/*弹窗js---------------------------------------------------------------------------*/


//上下滚动播报
(function ($) {
    $.fn.myScroll = function (options) {
        //榛樿閰嶇疆
        var defaults = {
            speed: 40,
            rowHeight: 24 //姣忚鐨勯珮搴�
        };

        var opts = $.extend({}, defaults, options), intId = [];

        function marquee(obj, step) {

            obj.find("ul").animate({
                marginTop: '-=1'
            }, 0, function () {
                var s = Math.abs(parseInt($(this).css("margin-top")));
                if (s >= step) {
                    $(this).find("li").slice(0, 1).appendTo($(this));
                    $(this).css("margin-top", 0);
                }
            });
        }

        this.each(function (i) {
            var sh = opts["rowHeight"], speed = opts["speed"], _this = $(this);
            intId[i] = setInterval(function () {
                if (_this.find("ul").height() <= _this.height()) {
                    clearInterval(intId[i]);
                } else {
                    marquee(_this, sh);
                }
            }, speed);

            _this.hover(function () {
                clearInterval(intId[i]);
            }, function () {
                intId[i] = setInterval(function () {
                    if (_this.find("ul").height() <= _this.height()) {
                        clearInterval(intId[i]);
                    } else {
                        marquee(_this, sh);
                    }
                }, speed);
            });

        });

    }

})(jQuery);
$("div.list_lh").myScroll({
    speed: 40, //数值越大,速度越慢
    rowHeight: 28 //li的高度
});
// $(document).delegate('.info-alert', 'click', function () {
//     // var plNo = $(this).attr("dataplno");
//     // var plName = $(this).attr("dataplname");
//     // console.log(plNo);
//     // $("#dataplno").val(plNo);
//     // $("#dataplname").val(plName);
//     // $('#ITD-alert-tab-wrap li').eq(0).click();
//     // fun.alertIfo();
// });
$('#recordtable').on('click-row.bs.table', function (e, row, element)
{
    //$(element).css({"color":"blue","font-size":"16px;"});
    console.log(row);
    var plNo = row.plNo;
    var plName = row.plName;
    console.log(plNo);
    $("#dataplno").val(plNo);
    $("#dataplname").val(plName);
    $('#ITD-alert-tab-wrap li').eq(0).click();

});
/**
 *弹窗切换
 **/
$('#ITD-alert-tab-wrap li').on('click', function () {
    var _index = $(this).index();
    $('#ITD-alert-tab-wrap>li').eq(_index).addClass('ITD-alert-tab-active').siblings().removeClass('ITD-alert-tab-active');
    $('#ITD-alertcon-tab-wrap>li').eq(_index).removeClass('display-none').siblings().addClass('display-none');

    if (0 == _index) {
        fun.alertIfo();
    } else if (1 == _index) {
        fun.getBerthInfoByPlNo();
    } else {
        console.log(33333);
        fun.loadParkDatas();
    }

});

/**
 * 自定义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
    };
    req.sysCode = sysComm.sysCode;
    var opt = {
        method: 'post',
        url: dataUrl.util.queryParkinglotBasicFactsByPlNos(),
        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);
            }
        }
    };
    sysAjax(opt);
}


//导出
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 = $("#recordtable").bootstrapTable('getData');
    //获取table总条数
    var numTotal = $("#recordtable").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;
    }
    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();
    var data = fn.getParkLot();
    var plNos = [];
    for (var i = 0; i < data.length; i++) {
        plNos.push(data[i].code);

    }
    if (plNos.length < 1) {
        plNos.push("-1X");
    }

    var plNos = fun.getQueryParam().plNos;

    var url = dataUrl.util.exportParkinglotBasicFactsByPlNos();

    var form = caryardForm(url,  plNos);
    console.log(form);
    form.submit();


});


function caryardForm(url,plNos){
    var form = document.createElement("form");
    form.style.display='none';;
    form.action = url;
    form.method="post";
    document.body.appendChild(form);

    var input = document.createElement("input");
    //input.type = "hidden";
    input.name = "plNos";
    input.value = plNos;
    form.appendChild(input);
    return form;

}




//费率转换
function parsePlRate(plRate) {
    if (null == plRate) {
        return [];
    }
    var plRateData = JSON.parse(plRate);
    console.log(plRateData);
    var result = [];
    var patrn = /\d+(\.\d+)?/g;
    $.each(plRateData, function (index, item) {
        var temp = item.standard;
        var data = {};
        data.carType = temp.substring(0, temp.indexOf(":"));
        var nums = temp.match(patrn);
        data.first = nums[0];//第一小时10元
        data.second = nums[1];//后1.5元/半小时
        temp = item.standardInfo;
        nums = temp.match(patrn);
        data.third = nums[0];//24小时
        data.four = nums[1];//60元
        result.push(data);
    })


    return result;
}





//5、24小时占用率x时间轴获取
function getOccupyXDatas(){

    var occupyDatas=[];
    var turnOverDatas=[];
    var xTimeDatas=[];


    var curDate = new Date();
    for (var i=0;i<24;i++){
    	curDate.setTime(curDate.getTime()+60*60*1000);
        xTimeDatas.push(curDate.getHours()+':00');

        occupyDatas[i]=0;
        turnOverDatas[i]=0;
    }
    var occupydData={
        occupyDatas:occupyDatas,
        turnOverDatas:turnOverDatas,
        xTimeDatas:xTimeDatas
    }
    return occupydData;
}