SOURCE

var areaMainLeader = ["张锋","陈志刚","吴大明","高龄","任杰新"]
var cityMainLeader = ["高建军","李湘豫","卢志军"]
var biaoyangStr =  "[{\"id\":\"1\",\"company\":\"两湖街道办\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"2\",\"company\":\"两湖街道办\",\"leader\":\"马杰\",\"classes\":\"县级\"},{\"id\":\"3\",\"company\":\"两湖街道办\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"4\",\"company\":\"洧川镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"5\",\"company\":\"洧川镇\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"6\",\"company\":\"洧川镇\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":\"7\",\"company\":\"洧川镇\",\"leader\":\"王秋杰\",\"classes\":\"市级\"},{\"id\":\"8\",\"company\":\"朱曲镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"9\",\"company\":\"朱曲镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"10\",\"company\":\"朱曲镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"11\",\"company\":\"朱曲镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"12\",\"company\":\"朱曲镇\",\"leader\":\"王秋杰\",\"classes\":\"市级\"},{\"id\":\"13\",\"company\":\"蔡庄镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"14\",\"company\":\"蔡庄镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"15\",\"company\":\"蔡庄镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"16\",\"company\":\"蔡庄镇\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":\"17\",\"company\":\"蔡庄镇\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"18\",\"company\":\"永兴镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"19\",\"company\":\"永兴镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"20\",\"company\":\"永兴镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"21\",\"company\":\"永兴镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"22\",\"company\":\"张市镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"23\",\"company\":\"张市镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"24\",\"company\":\"十八里镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"25\",\"company\":\"十八里镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"26\",\"company\":\"十八里镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"27\",\"company\":\"十八里镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"28\",\"company\":\"水坡镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"31\",\"company\":\"水坡镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"32\",\"company\":\"水坡镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"33\",\"company\":\"水坡镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"34\",\"company\":\"邢庄乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"35\",\"company\":\"邢庄乡\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"36\",\"company\":\"邢庄乡\",\"leader\":\"王 玲\",\"classes\":\"市级\"},{\"id\":\"38\",\"company\":\"庄头镇\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"39\",\"company\":\"大营镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"40\",\"company\":\"大营镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"41\",\"company\":\"大营镇\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"42\",\"company\":\"大马乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"43\",\"company\":\"大马乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"44\",\"company\":\"大马乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"45\",\"company\":\"岗李乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"46\",\"company\":\"岗李乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"47\",\"company\":\"岗李乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"48\",\"company\":\"岗李乡\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":\"49\",\"company\":\"岗李乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"50\",\"company\":\"岗李乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"51\",\"company\":\"岗李乡\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"52\",\"company\":\"岗李乡\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"53\",\"company\":\"岗李乡\",\"leader\":\"卢志军\",\"classes\":\"市级\"},{\"id\":\"54\",\"company\":\"门楼任乡\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":\"55\",\"company\":\"门楼任乡\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"56\",\"company\":\"大桥乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"57\",\"company\":\"大桥乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"58\",\"company\":\"大桥乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"59\",\"company\":\"大桥乡\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":\"60\",\"company\":\"大桥乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"61\",\"company\":\"大桥乡\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"62\",\"company\":\"大桥乡\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"63\",\"company\":\"大桥乡\",\"leader\":\"徐国现\",\"classes\":\"县级\"},{\"id\":\"64\",\"company\":\"大桥乡\",\"leader\":\"任杰新\",\"classes\":\"县级\"},{\"id\":\"65\",\"company\":\"大桥乡\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"66\",\"company\":\"大桥乡\",\"leader\":\"王秋杰\",\"classes\":\"市级\"},{\"id\":\"67\",\"company\":\"南曹乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"68\",\"company\":\"南曹乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"69\",\"company\":\"南曹乡\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":\"70\",\"company\":\"小陈乡\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"71\",\"company\":\"产业集聚区(东区)\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"72\",\"company\":\"产业集聚区(东区)\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"73\",\"company\":\"产业集聚区(东区)\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"74\",\"company\":\"产业集聚区(西区)\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"75\",\"company\":\"产业集聚区(西区)\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"76\",\"company\":\"检察院\",\"leader\":\"县长陈志刚\",\"classes\":\"县级\"},{\"id\":\"78\",\"company\":\"检察院\",\"leader\":\"卢志军\",\"classes\":\"市级\"},{\"id\":\"79\",\"company\":\"法院\",\"leader\":\"马杰\",\"classes\":\"县级\"},{\"id\":\"80\",\"company\":\"纪委\",\"leader\":\"焦世峰\",\"classes\":\"市级\"},{\"id\":\"81\",\"company\":\"纪委\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"82\",\"company\":\"政法委\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"83\",\"company\":\"政法委\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"84\",\"company\":\"总工会\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"85\",\"company\":\"总工会\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"86\",\"company\":\"信访局\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"87\",\"company\":\"乡村振兴局\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"88\",\"company\":\"乡村振兴局\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":\"89\",\"company\":\"乡村振兴局\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"90\",\"company\":\"乡村振兴局\",\"leader\":\"市乡村振兴局局长于庆\",\"classes\":\"县级\"},{\"id\":\"91\",\"company\":\"应急管理局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"92\",\"company\":\"应急管理局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"93\",\"company\":\"应急管理局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"94\",\"company\":\"应急管理局\",\"leader\":\"市应急管理局局长郑连成\",\"classes\":\"县级\"},{\"id\":\"95\",\"company\":\"政数局\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":\"96\",\"company\":\"农业农村局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"97\",\"company\":\"农业农村局\",\"leader\":\"徐同君\",\"classes\":\"市级\"},{\"id\":\"98\",\"company\":\"农业农村局\",\"leader\":\"陈志刚\",\"classes\":\"县级\"},{\"id\":\"99\",\"company\":\"农业农村局\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"100\",\"company\":\"农业农村局\",\"leader\":\"徐同君\",\"classes\":\"县级\"},{\"id\":\"101\",\"company\":\"林场\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"102\",\"company\":\"林场\",\"leader\":\"赵芳\",\"classes\":\"市级\"},{\"id\":\"103\",\"company\":\"水利局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"104\",\"company\":\"科工信局\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":\"105\",\"company\":\"市场监管局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"106\",\"company\":\"市场监管局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"107\",\"company\":\"住建局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"108\",\"company\":\"住建局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"109\",\"company\":\"住建局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"110\",\"company\":\"城管局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"111\",\"company\":\"生态环境局\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"124\",\"company\":\"人社局\",\"leader\":\"王秋杰\",\"classes\":\"市级\"},{\"id\":\"125\",\"company\":\"统计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"126\",\"company\":\"财政局\",\"leader\":\"赵芳\",\"classes\":\"市级\"},{\"id\":\"127\",\"company\":\"税务局\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":\"128\",\"company\":\"公安局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"129\",\"company\":\"公安局\",\"leader\":\"毛卫超\",\"classes\":\"县级\"},{\"id\":\"130\",\"company\":\"民政局\",\"leader\":\"陈志刚\",\"classes\":\"县级\"},{\"id\":\"131\",\"company\":\"退役军人局\",\"leader\":\"马杰\",\"classes\":\"县级\"},{\"id\":\"132\",\"company\":\"教体局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"112\",\"company\":\"教体局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"113\",\"company\":\"教体局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"114\",\"company\":\"教体局\",\"leader\":\"市乡村振兴局局长于庆\",\"classes\":\"县级\"},{\"id\":\"115\",\"company\":\"卫健委\",\"leader\":\"康青峰\",\"classes\":\"县级\"},{\"id\":\"116\",\"company\":\"卫健委\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"117\",\"company\":\"卫健委\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"118\",\"company\":\"金财公司\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"119\",\"company\":\"攻坚办\",\"leader\":\"朱宁华\",\"classes\":\"县级\"},{\"id\":\"120\",\"company\":\"尉氏三中南校区\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":\"121\",\"company\":\"产业集聚区(西区)\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":\"122\",\"company\":\"宗教局\",\"leader\":\"石德坤\",\"classes\":\"县级\"}]"
var pipingStr = "[{\"id\":1,\"company\":\"两湖街道办\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":2,\"company\":\"两湖街道办\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":3,\"company\":\"两湖街道办\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":4,\"company\":\"两湖街道办\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":5,\"company\":\"朱曲镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":6,\"company\":\"永兴镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":7,\"company\":\"永兴镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":8,\"company\":\"张市镇\",\"leader\":\"马杰\",\"classes\":\"县级\"},{\"id\":9,\"company\":\"张市镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":10,\"company\":\"张市镇\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":11,\"company\":\"十八里镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":12,\"company\":\"十八里镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":13,\"company\":\"十八里镇\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":14,\"company\":\"水坡镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":15,\"company\":\"水坡镇\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":16,\"company\":\"邢庄乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":17,\"company\":\"邢庄乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":18,\"company\":\"邢庄乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":19,\"company\":\"邢庄乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":20,\"company\":\"邢庄乡\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":21,\"company\":\"庄头镇\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":22,\"company\":\"庄头镇\",\"leader\":\"焦世峰\",\"classes\":\"县级\"},{\"id\":23,\"company\":\"大营镇\",\"leader\":\"石德坤\",\"classes\":\"县级\"},{\"id\":24,\"company\":\"大马乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":25,\"company\":\"岗李乡\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":26,\"company\":\"南曹乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":27,\"company\":\"南曹乡\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":28,\"company\":\"产业集聚区(东区)\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":29,\"company\":\"产业集聚区(西区)\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":30,\"company\":\"产业集聚区(西区)\",\"leader\":\"吴大明\",\"classes\":\"县级\"},{\"id\":31,\"company\":\"法院\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":32,\"company\":\"总工会\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":33,\"company\":\"信访局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":34,\"company\":\"文联\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":35,\"company\":\"应急管理局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":36,\"company\":\"政数局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":37,\"company\":\"审计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":38,\"company\":\"审计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":39,\"company\":\"审计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":40,\"company\":\"审计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":41,\"company\":\"农业农村局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":42,\"company\":\"水利局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":43,\"company\":\"水利局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":44,\"company\":\"水利局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":45,\"company\":\"水利局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":46,\"company\":\"科工信局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":47,\"company\":\"商务局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":48,\"company\":\"商务局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":49,\"company\":\"发改委\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":50,\"company\":\"发改委\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":51,\"company\":\"自然资源局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":52,\"company\":\"生态环境局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":53,\"company\":\"生态环境局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":54,\"company\":\"生态环境局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":55,\"company\":\"生态环境局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":56,\"company\":\"统计局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":57,\"company\":\"财政局\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":58,\"company\":\"财政局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":59,\"company\":\"税务局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":60,\"company\":\"税务局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":61,\"company\":\"公安局\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":62,\"company\":\"公安局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":63,\"company\":\"公安局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":64,\"company\":\"公安局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":65,\"company\":\"民政局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":66,\"company\":\"退役军人局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":67,\"company\":\"文广旅局\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":68,\"company\":\"党史办\",\"leader\":\"贾琦\",\"classes\":\"县级\"},{\"id\":69,\"company\":\"党校\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":70,\"company\":\"党校\",\"leader\":\"赵芳\",\"classes\":\"县级\"},{\"id\":71,\"company\":\"党校\",\"leader\":\"赵芳\",\"classes\":\"县级\"}]"

ResultData = function (id, company, biaoyangTimes, biaoyangScore,
    pipingTimes, pipingScore) {
    this.id = id;
    this.company = company;
    this.biaoyangTimes = biaoyangTimes;
    this.biaoyangScore = biaoyangScore;
    this.pipingTimes = pipingTimes;
    this.pipingScore = pipingScore;
}



var resultDatas = new Array;

var biaoyangData = JSON.parse(biaoyangStr);
var pipingData = JSON.parse(pipingStr);
var cityTimes = 0, areaTimes = 0, itemId = 1, cityMultiple = 1.0, areaMultiple = 0.5;

for (var i = 0; i < biaoyangData.length; i++) {
    var biaoyangTimes = 0, biaoyangScore = 0;
    //这里是确定到底是市局还是县局
    if (biaoyangData[i].classes == "市级") {
        cityTimes++;
    } else {
        areaTimes++;
    }



    var resultdata = {
        id: itemId,
        company: biaoyangData[i].company,
        cityAdmirTimes: cityTimes,
        areaAdmirTimes: areaTimes,
        admirMoney: 0,
        cityPipingTimes: 0,
        areaPipingTimes: 0,
        pipingMoney: 0
    };

    //将第一个item添加到结果数组中
    if (i == 0) {
        resultDatas.push(resultdata);
    } else if (i > 0) {
        if (biaoyangData[i].company == biaoyangData[i - 1].company) {
            resultDatas[resultDatas.length - 1] = resultdata;
        } else {

            //将奖励次数置空
            if (!biaoyangData[i].classes == "市级") {
                areaTimes = 1;
                cityTimes = 0;
            } else {
                areaTimes = 0;
                cityTimes = 1;
            }
            resultdata.cityAdmirTimes = cityTimes;
            resultdata.areaAdmirTimes = areaTimes;

            //这里是将新的item加上去
            itemId++;
            resultdata.id = itemId;
            resultDatas.push(resultdata);


            //这里计算前一个奖惩了多少钱
            var cityTime = resultDatas[resultDatas.length - 2].cityAdmirTimes;
            var areaTime = resultDatas[resultDatas.length - 2].areaAdmirTimes;

            var admirMoney = cityTime * cityMultiple + areaMultiple * areaTime;
            resultDatas[resultDatas.length - 2].admirMoney = admirMoney;
        }
    }
}

//这里计算最后一个奖惩了多少钱
var cityTime = resultDatas[resultDatas.length - 1].cityAdmirTimes;
var areaTime = resultDatas[resultDatas.length - 1].areaAdmirTimes;

var admirMoney = cityTime * cityMultiple + areaMultiple * areaTime;
resultDatas[resultDatas.length - 1].admirMoney = admirMoney;





///////////////////////////我是华丽的分割线/////////////////////////////////
var criticismDatas = JSON.parse(pipingStr);

for (var i = 0; i < resultDatas.length; i++) {
    var itemData = resultDatas[i];
    var cityTimes = 0, areaTimes = 0;
    var currentName = "";
    var haveItem = false;
    for (var j = 0; j < criticismDatas.length; j++) {
        var companyName = criticismDatas[j].company;
        if (criticismDatas[j].company == resultDatas[i].company) {
            haveItem = true;
            if (!criticismDatas[j].classes == "市级") {
                areaTimes++;
            } else {
                cityTimes++;
            }
        }

        if (j == criticismDatas.length - 1) {
            if (haveItem) {
                resultDatas[i].cityPipingTimes = cityTimes;
                resultDatas[i].areaPipingTimes = areaTimes;
                resultDatas[i].pipingMoney = cityTimes * -1.0 + areaTimes * -0.5;
                haveItem = false;
            } else {

                // itemId++;
                // var resultdata = {
                //     id: itemId,
                //     company: companyName,
                //     cityAdmirTimes: 0,
                //     areaAdmirTimes: 0,
                //     admirMoney: 0,
                //     cityPipingTimes: cityTimes,
                //     areaPipingTimes: areaTimes,
                //     pipingMoney: 0
                // };
                // resultDatas.push(resultdata);
            }

            cityTimes = 0, areaTimes = 0;
        }
    }
}

//定义一个pipingDatas,让它获取到resultdata里面没有的项
var pipingDatas = new Array;
for (var i = 0; i < criticismDatas.length; i++) {
    for (var j = 0; j < resultDatas.length; j++) {
        var isExist = false;
        if (criticismDatas[i].company == resultDatas[j].company) {
            isExist = true;
            break;
        }

        if (j == resultDatas.length - 1 && !isExist) {
            pipingDatas.push(criticismDatas[i]);

        }
    }
}

for (var i = 0; i < pipingDatas.length; i++) {
    for (var j = i; j < resultDatas.length; j++) {
        if (pipingDatas[i].company == resultDatas[j].company) {
            if (!pipingDatas[i].classes == "市级") {
                resultDatas[j].areaPipingTimes = resultDatas[j].areaPipingTimes + 1;
            } else {
                resultDatas[j].cityPipingTimes = resultDatas[j].cityPipingTimes + 1;
            }

            break;
        }

        if (j == resultDatas.length - 1) {
            var cityTimes = 0, areaTimes = 0;
            if (!pipingDatas[i].classes == "市级") {
                areaTimes++;
            } else {
                cityTimes++;
            }


            itemId++;
            //这里我也不知道为什么,反正就是要剪一个数
            if (cityTimes > 0) {
                cityTimes--
            }
            if (areaTimes > 0) {
                areaTimes--
            }

            var resultdata = {
                id: itemId,
                company: pipingDatas[i].company,
                cityAdmirTimes: 0,
                areaAdmirTimes: 0,
                admirMoney: 0,
                cityPipingTimes: cityTimes,
                areaPipingTimes: areaTimes,
                pipingMoney: 0
            };
            resultDatas.push(resultdata);
            areaTimes = 0, citytimes = 0;
        }
    }
}


// for (var i = 0; i < resultDatas.length; i++) {
//     document.write(
//         resultDatas[i].id + " " + resultDatas[i].company + " " +
//         resultDatas[i].cityAdmirTimes + " " + resultDatas[i].areaAdmirTimes + " " +
//         resultDatas[i].admirMoney + " " +
//         resultDatas[i].cityPipingTimes + " " + resultDatas[i].areaPipingTimes + " " +
//         resultDatas[i].pipingMoney + "</br>");
// }

// document.write(
//     JSON.stringify(resultDatas))



console 命令行工具 X clear

                    
>
console