fzzy-igdss-web/src/main/resources/static/group/index.js
@@ -76,7 +76,8 @@
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify({
            "companyId": companyId
            "companyId": companyId,
            "deptId": deptId
        }),
        success: function (result) {
            if (result.code == "0000") {
@@ -97,27 +98,27 @@
            html += '<li style="float: left; width: 246px;">';
            html += '<div class="item">';
            html += '<div class="pic">';
            html += '<img src="'+item.imgName+'" alt="">';
            html += '</div><div class="tit">'+item.snapTime+'</div>';
            html += '<div class="tit" style="white-space: nowrap;">'+deptListMap[item.deptId]+'</div>';
            html += '<img src="' + item.imgName + '" alt="">';
            html += '</div><div class="tit">' + item.time + '</div>';
            html += '<div class="tit" style="white-space: nowrap;">' + deptListMap[item.deptId] + '</div>';
            html += '</div></li>';
        })
    }else {
    } else {
        $.each(deptAllList, function (index, item) {
            html += '<li style="float: left; width: 246px;">';
            html += '<div class="item">';
            html += '<div class="pic">';
            html += '<img src="/img/img-fail.jpg" alt="">';
            html += '</div><div class="tit">近期暂无抓拍图</div>';
            html += '<div class="tit" style="white-space: nowrap;">'+item.kqmc+'</div>';
            html += '<div class="tit" style="white-space: nowrap;">' + item.kqmc + '</div>';
            html += '</div></li>';
        })
    }
    $("#snapList").html(html);
    //抓拍跟踪滚动
    jQuery(".block2").slide({ mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4 });
    jQuery(".follow").slide({ mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 40 });
    jQuery(".block2").slide({mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4});
    jQuery(".follow").slide({mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 40});
}
@@ -125,8 +126,8 @@
 * 库区定时切换
 */
function timing() {
    timer = setInterval(function() {
        if(deptNum === deptList.length){
    timer = setInterval(function () {
        if (deptNum === deptList.length) {
            deptNum = 0;
        }
@@ -147,11 +148,11 @@
//加载指定地区地图和点位
function renderMapPoints(areaName) {
    if(!areaName){
    if (!areaName) {
        return;
    }
    var names = areaName.split(",");
    if(names.length < 1){
    if (names.length < 1) {
        return;
    }
@@ -166,13 +167,13 @@
    geoMap = [];
    for (var j = 0; j < names.length; j++) {
        for (var i = 0; i < all.length; i++) {
            if(all[i].properties.name === names[j]){
            if (all[i].properties.name === names[j]) {
                map.features.push(all[i]);
                // if(all[i].properties.name === "伊犁哈萨克自治州"){
                    geoMap.push({
                        name: all[i].properties.centerName,
                        value: [all[i].properties.center[0], all[i].properties.center[1], 12]
                    });
                geoMap.push({
                    name: all[i].properties.centerName,
                    value: [all[i].properties.center[0], all[i].properties.center[1], 12]
                });
                // }
                // renderMap();
                break;
@@ -192,7 +193,7 @@
    echarts.registerMap('chinaMapOutline', map);
    var option = {
        backgroundColor:'transparent',
        backgroundColor: 'transparent',
        tooltip: {
            show: false,
            trigger: 'item'
@@ -309,7 +310,7 @@
                type: 'effectScatter',
                coordinateSystem: 'geo',
                data: geoMap,
                symbolSize:  function (val) {
                symbolSize: function (val) {
                    return val[2];
                },
                rippleEffect: {
@@ -338,7 +339,7 @@
        ]
    };
    myChart.setOption( option );
    myChart.setOption(option);
    mapChart = {"chart": myChart, "option": option};
}
@@ -353,36 +354,41 @@
    var flag = false;
    if (deptList != null && deptList.length > 0) {
        $.each(deptList, function (index, item) {
            if(item.dailyTotal === 0){
            if (item.dailyTotal === 0) {
                num1 = '当日一切正常';
            }else{
                num1 = '当日数量'+ item.dailyTotal + '个';
            } else if (item.dailyTotal < 0) {
                num1 = '未检测到网关';
            } else {
                num1 = '当日数量' + item.dailyTotal + '个';
            }
            if(item.warnNum7 === 0){
            if (item.warnNum7 === 0) {
                num7 = '近七天一切正常';
            }else{
                num7 = '近七天数量'+ item.warnNum7 + '个';
            } else {
                num7 = '近七天数量' + item.warnNum7 + '个';
            }
            html += '<div class="panel-content-body-tr">';
            if (item.warnNum7 > 10) {
            if (item.dailyTotal > 0) {
                flag = true;
                html += '<span class="body-item sp" style="color: #bc2032;flex: 1.5;">' + item.deptName + '</span>';
                html += '<span class="body-item sp" style="color: #bc2032;">' + num1 + '</span>';
                html += '<span class="body-item sp" style="color: #bc2032;">' + num7 + '</span>';
            } else if (item.warnNum7 > 1 && item.warnNum7 < 10) {
                flag = true;
                html += '<span class="body-item sp" style="color: #f37b3d;flex: 1.5;">' + item.deptName + '</span>';
                html += '<span class="body-item sp" style="color: #f37b3d;">' + num1+ '</span>';
                html += '<span class="body-item sp" style="color: #f37b3d;">' + num7 + '</span>';
            }else {
                html += '<span class="body-item sp" style="flex: 1.5;">' + item.deptName + '</span>';
                html += '<span class="body-item sp">' + num1 + '</span>';
                html += '<span class="body-item sp">' + num7 + '</span>';
            }
            // if (item.warnNum7 > 10) {
            //     flag = true;
            //     html += '<span class="body-item sp" style="color: #bc2032;flex: 1.5;">' + item.deptName + '</span>';
            //     html += '<span class="body-item sp" style="color: #bc2032;">' + num1 + '</span>';
            //     html += '<span class="body-item sp" style="color: #bc2032;">' + num7 + '</span>';
            // } else if (item.warnNum7 > 1 && item.warnNum7 < 10) {
            //     flag = true;
            //     html += '<span class="body-item sp" style="color: #f37b3d;flex: 1.5;">' + item.deptName + '</span>';
            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num1+ '</span>';
            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num7 + '</span>';
            // }else {
            html += '<span class="body-item sp" style="flex: 1.5;">' + item.deptName + '</span>';
            html += '<span class="body-item sp">' + num1 + '</span>';
            html += '<span class="body-item sp">' + num7 + '</span>';
            // }
            html += '</div>';
        })
    }
    if(flag){
    if (flag) {
        $("#panel-title").html('库区AI事件信息  <i class="dot"></i>');
    }
    $("#inventoryInfo").html(html);
@@ -437,13 +443,13 @@
function updateDeptMap() {
    var points = [];
    $.each(deptList, function(index, item) {
    $.each(deptList, function (index, item) {
        var val = [];
        var name = '';
        if(index === deptNum){
        if (index === deptNum) {
            name = item.deptName;
            val = [item.jd, item.wd, 17];
        }else {
        } else {
            val = [item.jd, item.wd, 8];
        }
        points.push({
@@ -496,12 +502,15 @@
    $("#depotBankNum").html(data.depotBankNum);
    /*----- 监管数量信息 -----*/
    if (data.foodSum.length > 8 || data.packFoodSum.length > 8) {
    // if (data.foodSum.length > 8 || data.packFoodSum.length > 8) {
    //     $("#foodSum").css("font-size", "32px");
    //     $("#packFoodSum").css("font-size", "32px");
    // }
    if (data.foodSum.length > 8) {
        $("#foodSum").css("font-size", "32px");
        $("#packFoodSum").css("font-size", "32px");
    }
    $("#foodSum").html(data.foodSum);
    $("#packFoodSum").html(data.packFoodSum);
    // $("#packFoodSum").html(data.packFoodSum);
    /*----- 分品种柱状图 -----*/
    if (data.xaxis.length > 0 && data.seriesData.length > 0) {
@@ -559,7 +568,7 @@
function initChart() {
    /* 库存图表加载 */
    allInventoryChartLoad(
        ['小麦', '玉米', '稻谷', '成品粮',  '成品油', '其他'],
        ['小麦', '玉米', '稻谷', '成品粮', '成品油', '其他'],
        [1000, 1200, 1500, 1300, 1100, 1600]
    );
}