czt
2025-12-25 a1cc1dca3ad00d2ac1b81c54b0f98b3684c31da1
fzzy-igdss-web/src/main/resources/static/group/gis.js
@@ -6,6 +6,7 @@
var markers = [];//点标记
var type = "0";
var county = "all";
var breedChart = null;
//var switch2AreaNode2;
@@ -29,19 +30,33 @@
    //初始化地图
    initMap();
    //左侧图表
    //初始化左侧图表
    pieChartLoad(
        [
            {value: "0.000", name: '稻谷'},
            {value: "0.000", name: '玉米'},
            {value: "0.000", name: '小麦'}
            {value: "0", name: '伊宁市'},
            {value: "0", name: '奎屯市'},
            {value: "0", name: '霍尔果斯市'},
            {value: "0", name: '伊宁县'},
            {value: "0", name: '察布查尔锡伯自治县'},
            {value: "0", name: '霍城县'},
            {value: "0", name: '巩留县'},
            {value: "0", name: '新源县'},
            {value: "0", name: '昭苏县'},
            {value: "0", name: '特克斯县'},
            {value: "0", name: '尼勒克县'}
        ],
        'breedChart'
    );
    window.onresize = function (e) {
        if (breedChart) {
            breedChart.resize();
        }
    }
    //渲染部门
    renderList();
    renderNum();
    //定位到新疆省
    setTimeout(function () {
        positioning("650000");
@@ -353,6 +368,28 @@
    }
}
function renderNum() {
    $("#foodSum").html(gisData.deptNum);
    var foodNumPerHtml = '';
    var color = ["0, 228, 250", "22, 226, 173", "255, 181, 23", "238, 60, 72", "135, 103, 255", "41, 122, 255", "238, 60, 144", "0, 228, 250", "22, 226, 173", "255, 181, 23", "238, 60, 72", "135, 103, 255", "41, 122, 255", "238, 60, 144"];
    for (var i = 0; i < gisData.deptList.length; i++) {
        foodNumPerHtml += '<li><div class="con" style="background-color: rgba('+color[i]+',.05);">';
        foodNumPerHtml += '<div class="dot" style="background-color: rgb('+color[i]+');"></div>';
        foodNumPerHtml += '<div class="num" style="color: rgb('+color[i]+');">'+gisData.deptList[i].percent+'%</div>';
        foodNumPerHtml += '<div class="type">'+gisData.deptList[i].name+'</div>';
        foodNumPerHtml += '</div></li>';
    }
    $("#foodNumPer").html(foodNumPerHtml);
    if (gisData.deptList.length > 0) {
        var varietyChart = breedChart;
        varietyChart.option.series[0].data = gisData.deptList;
        varietyChart.chart.setOption(varietyChart.option, true);
        breedChart = varietyChart;
    }
    barChartLoad("ss");
}
/**
 * 获取地图行政区域颜色
 * @param adcode