var myChart = echarts.init(document.getElementById('main')); var myChart1 = echarts.init(document.getElementById('main1')); var myChart3 = echarts.init(document.getElementById('main3')); var img = './images/frame.png'; var sourceImg = './images/1.png' var workStateAct; let acceptId; //受理id let sourceId; //渠道id let handling; //督办 let detailId; getSourceCount(); //受理渠道统计(一二级) getAcceptanceCount(); //受理量统计(一级) timeTable(); //单位办理时长统计(一级) testTable(); //月度考核(一级) areaMap(); //地图(一级) chart4(); //受理关键词热度分析(一级) getData() getNowFormatDate() //时间 //滚动 //原理:把marquee下面的子盒子都复制一遍 加入到marquee中 // 然后动画向上滚动,滚动到一半重新开始滚动 //因为选取的是两个marquee 所以要遍历 $('.time_statistics .maquee ul').each(function(index, dom) { //将每个 的所有子级都复制一遍 var rows = $(dom).children().clone(); //再将新的到的加入原来的 $(dom).append(rows); }); $('.test_rank .maquee ul').each(function(index, dom) { //将每个 的所有子级都复制一遍 var rows = $(dom).children().clone(); //再将新的到的加入原来的 $(dom).append(rows); }); //每两分钟刷新一次 setInterval(function() { getSourceCount(); //受理渠道统计(一二级) getAcceptanceCount(); //受理量统计(一级) testTable(); //月度考核(一级) timeTable(); //单位办理时长统计(一级) areaMap(); //地图(一级) }, 120000) //二级话务坐席 $('.call_situation').click(function() { $('.bulletFrame').show(); $('.traffic_wrap').show(); $('.traffic_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } let trafficName = []; let trafficTime = []; let sum = []; let consult = []; let help = []; let complaint = []; let proposal = []; let praise = []; let report = []; let other = []; new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount24ByNow", data: {}, callBack: function(res) { console.log(res) trafficName = res.data.cols; trafficTime = res.data.hours; sum = res.data.counts[0]; consult = res.data.counts[1]; help = res.data.counts[2]; complaint = res.data.counts[3]; proposal = res.data.counts[4]; praise = res.data.counts[5]; report = res.data.counts[6]; other = res.data.counts[7] traffic_chart(trafficName, trafficTime, sum, consult, help, complaint, proposal, praise, report, other) } }); }) //二级今日受理量统计 $('.accept_statistics').click(function() { let acceptanceTime = []; //时间 let callInData = []; //呼入 let callOutData = []; //呼出 let directData = []; //工单录入 let inputData = []; //工单直办 $('.bulletFrame').show(); $('.acceptance_wrap').show(); $('.acceptance_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetAcceptanceCount24ByNow", data: {}, callBack: function(res) { acceptanceTime = res.data.hours; callInData = res.data.hrcount[0]; callOutData = res.data.jtcount[0]; directData = res.data.counts[0]; inputData = res.data.count[0]; acceptance_chart(acceptanceTime, callInData, callOutData, inputData, directData) } }); }) //受理渠道 $('.accept_channel').click(function() { $('.bulletFrame').show(); $('.channel_wrap').show(); $('.channel_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } }) //二级关键词热度分析 $('.key_word').click(function() { $('.bulletFrame').show(); $('.keyword_wrap').show(); $('.keyword_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } keyWordTable() }) //二级办理时长统计 $('.time_statistics').click(function() { $('.bulletFrame').show(); $('.timeSta_wrap').show(); $('.timeSta_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } timeSecTable(); }) //二级月度考核 $('.test_rank').click(function() { $('.bulletFrame').show(); $('.rank_wrap').show(); $('.rank_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } testSecTable('#orderlist2', 0); testSecTable('#orderlist4', 1, 0); testSecTable('#orderlist5', 1, 1); testSecTable('#orderlist6', 2); }) $('.acceptance_state').click(function() { $('.bulletFrame').show(); //二级受理情况 $('.acceptanceState_wrap').show(); $('.acceptanceState_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetHandling", data: {}, callBack: function(res) { $('.db').text(res[0].db) $('.bdrate').text(res[0].dbrate) $('.zb').text(res[0].zhib) $('.zbrate').text(res[0].zhibrate) $('.zub').text(res[0].zub) $('.zubrate').text(res[0].zubrate) $('.cb').text(res[0].cb) $('.cbrate').text(res[0].cbrate) $('.stattotal').text(res[0].total) let handingData = [{ value: res[0].db, name: '督办' }, { value: res[0].zhib, name: '直办' }, { value: res[0].zub, name: '转办' }, { value: res[0].cb, name: '催办' } ] getHandling(handingData); } }); }) //关闭按钮 $('.close_icon').click(function() { $('.bulletFrame').hide(); if ($('.bulletFrame').css('display') == 'none') { $('.body').css('opacity', '1') } }) $('.close_iconT').click(function() { $('.bulletFrameT').hide(); if ($('.bulletFrameT').css('display') == 'none') { $('.body').css('opacity', '1') } }) $('.close_iconP').click(function() { $('.workDetails').show(); $('.workDetails').siblings().hide() // $('#timeline').html(''); }) $('.close_iconR').click(function() { $('.rankList').show(); $('.rankList').siblings().hide() }) //受理分析 $('.state-share').click(function(e) { if (e.target.tagName == 'DIV' || e.target.tagName == 'P' || e.target.tagName == 'LI') { if ($(e.target).attr('pos') == '1') { handling = 0 } else if ($(e.target).attr('pos') == '2') { handling = 1 } else if ($(e.target).attr('pos') == '3') { handling = 2 } else if ($(e.target).attr('pos') == '4') { handling = 3 } $('.bulletFrameT').show() $('.acceptCont').show(); $('.acceptCont').siblings().hide() acceptlist(handling); } }) //受理量统计 function getAcceptanceCount() { new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetAcceptanceCountByNow", data: {}, callBack: function(res) { var traffic = [{ name: '呼出', value: res.data.hw[0].hccount }, { name: '呼入', value: res.data.hw[0].hrcount }, { name: '接通', value: res.data.hw[0].jtcount }]; //话务 var workOrde = [{ name: '处理', value: res.data.gd[0].lrcount }, { name: '录入', value: res.data.gd[0].blcount }, { name: '完结', value: res.data.gd[0].wjcount }]; //工单 let lineHeifht = 0; let fq = setInterval(function() { lineHeifht++; if (lineHeifht == 55) { clearInterval(fq); } acceptStatistics('main2', traffic, lineHeifht) acceptStatistics('main5', workOrde, lineHeifht) }, 20) } }); } //受理渠道统计 function getSourceCount() { var nameData = []; var conNum = []; var maxNum = [] var secData = []; new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow", data: {}, callBack: function(res) { res.data.forEach(function(v, n) { nameData.push(v.TypeName); conNum.push(v.Count) secData.push({ level: v.TypeName, landArea: v.Count }) }) for (var i = 0; i < secData.length; i++) { maxNum.push(Math.max.apply(null, conNum) + 200); } chart2(nameData, conNum, maxNum) channel_chart(secData); } }); } //一级话务坐席 function chart1(data) { option = { tooltip: { trigger: 'item', textStyle: { color: '#ffe400', fontSize: '14', fontWeight: '500' }, position: 'top', backgroundColor: 'rgba(250,250,250,0)', transitionDuration: 0.4, formatter: function(params) { return '
' + params.value + '
'; } }, grid: { left: "4%", right: "4%", bottom: "3%", top: "15%", containLabel: true }, xAxis: { type: "category", triggerEvent: true, boundaryGap: true, data: ['坐席数量', '签入', '通话中', '话后处理', '置忙', '置闲', '离线'], axisLabel: { //坐标轴刻度标签的相关设置。 interval: 0, //设置为 1,表示『隔一个标签显示一个标签』 // margin:15, textStyle: { color: "#fff", fontStyle: "normal", fontSize: 10 } }, axisTick: { //坐标轴刻度相关设置。 show: false }, axisLine: { //坐标轴轴线相关设置 lineStyle: { color: "#036376" } }, splitLine: { //坐标轴在 grid 区域中的分隔线。 show: false, lineStyle: { color: "rgba(77, 128, 254, 0.2)" } } }, yAxis: [{ type: "value", // splitNumber: 3, axisLabel: { textStyle: { color: "#fff", fontStyle: "normal", fontSize: 12 }, formatter: function() { return ""; } }, axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: false, lineStyle: { color: "rgba(77, 128, 254, 0.2)" } } }], // color: ["#e54035"], series: [{ name: "数量", barMinHeight: 10, type: "pictorialBar", barCategoryGap: "60%", symbol: 'path://M0,10 L10,10 L5,0 L0,10 z', // symbol: "path://M12.000,-0.000 C12.000,-0.000 16.074,60.121 22.731,60.121 C26.173,60.121 -3.234,60.121 0.511,60.121 C7.072,60.121 12.000,-0.000 12.000,-0.000 Z", itemStyle: { normal: { color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "#00edfc" // 0% 处的颜色 }, { offset: 1, color: "#05293d" // 100% 处的颜色 } ], globalCoord: false // 缺省为 false } //渐变颜色 } }, label: { normal: { show: false } }, emphasis: { itemStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [{ offset: 0, color: '#fde301' }, { offset: 1, color: '#0a2f3e' } ] ) } }, data: data }] } myChart.setOption(option); myChart.resize(); } //一级受理渠道 function chart2(data, count, count1) { myChart1.resize(); option = { "textStyle": { "color": "#c0c3cd", "fontSize": 11 }, "toolbox": { "show": false, "feature": { "saveAsImage": { "backgroundColor": "#031245" }, "restore": {} }, "iconStyle": { "borderColor": "#c0c3cd" } }, "legend": { "top": 10, "itemWidth": 8, "itemHeight": 8, "icon": "circle", "left": "center", "padding": 0, "textStyle": { "color": "#c0c3cd", "fontSize": 11, "padding": [2, 0, 0, 0] } }, "color": ["#63caff", "#49beff", "#395568", "#395568", "#395568", "#6c93ee", "#a9abff", "#f7a23f", "#27bae7", "#ff6d9d", "#cb79ff", "#f95b5a", "#ccaf27", "#38b99c", "#93d0ff", "#bd74e0", "#fd77da", "#dea700" ], "grid": { "containLabel": true, "left": 20, "right": 20, "bottom": 10, "top": 40 }, "xAxis": { "nameTextStyle": { "color": "#c0c3cd", "padding": [0, 0, -10, 0], "fontSize": 11 }, "axisLabel": { "color": "#c0c3cd", "fontSize": 11, "interval": 0, "formatter": function(value) { var ret = ""; //拼接加\n返回的类目项 var maxLength = 3; //每项显示文字个数 var valLength = value.length; //X轴类目项的文字个数 var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数 if (rowN > 1) { for (var i = 0; i < rowN; i++) { var temp = ""; //每次截取的字符串 var start = i * maxLength; //开始截取的位置 var end = start + maxLength; //结束截取的位置 //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧 temp = value.substring(start, end) + "\n"; ret += temp; //凭借最终的字符串 } return ret; } else { return value; } } }, "axisTick": { "lineStyle": { "color": "#384267", "width": 1 }, "show": false }, "minorTick": { "length": 8 }, "splitLine": { "show": false }, "axisLine": { "lineStyle": { "color": "#384267", "width": 1, "type": "solid" }, "show": true }, "data": data, "type": "category" }, "yAxis": { "nameTextStyle": { "color": "#c0c3cd", "padding": [0, 0, 10, -5], "fontSize": 11 }, "axisLabel": { "color": "#c0c3cd", "fontSize": 11 }, "axisTick": { "lineStyle": { "color": "#384267", "width": 1 }, "show": true }, "splitLine": { "show": true, "lineStyle": { "color": "#384267", "type": "dashed" } }, "axisLine": { "lineStyle": { "color": "#384267", "width": 1, "type": "solid" }, "show": true, // "symbol":['none', 'arrow'], "symbol": ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'], 'symbolOffset': 5, 'symbolSize': [35, 38], }, "name": "条" }, "series": [{ "data": count, "type": "bar", "barMaxWidth": "auto", "barWidth": 15, "itemStyle": { "color": { "x": 0, "y": 0, "x2": 0, "y2": 1, "type": "linear", "global": false, "colorStops": [{ "offset": 0, "color": "#3ffeea" }, { "offset": 1, "color": "#0181ff" }] }, barBorderRadius: [30, 30, 0, 0] }, "label": { "show": true, "position": "insideBottom", "distance": 125, "color": "rgb(62,252,235)", "fontSize": 12, "fontWeight": 'bold', // "position": [30, 10], }, emphasis: { itemStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [{ offset: 0, color: '#fde301' }, { offset: 1, color: '#0a2f3e' } ] ) } }, }, { "data": [1, 1, 1, 1, 1, 1], "type": "pictorialBar", "barMaxWidth": "20", "symbol": "none", }, { // "data": [1500, 1148, 756, 1395, 1750, 1148], "type": "pictorialBar", "barMaxWidth": "20", "symbolPosition": "end", "symbol": "none", "symbolOffset": [0, "-50%"], "symbolSize": [30, 12], "zlevel": 1 }, { "data": count1, "type": "bar", "barMaxWidth": "auto", "barWidth": 15, "barGap": "-100%", "zlevel": -1 }, { "data": [1, 1, 1, 1, 1, 1], "type": "pictorialBar", "barMaxWidth": "20", "symbol": "none", "symbolOffset": [0, "50%"], "symbolSize": [30, 15], "zlevel": -2 }, { "data": count1, "type": "pictorialBar", "barMaxWidth": "20", "symbolPosition": "end", "symbol": "circle", "symbolOffset": [0, "-60%"], "symbolSize": [15, 12], "zlevel": -1 }, ] } myChart1.setOption(option); } //一级受理统计 function acceptStatistics(dom, dataList, lineH) { let myChart = echarts.init(document.getElementById(dom)); myChart.resize(); var data = []; var color = ['#00ffff', '#ffe000', '#006ced'] for (var i = 0; i < dataList.length; i++) { data.push({ value: dataList[i].value, name: dataList[i].name, itemStyle: { normal: { borderWidth: 3, shadowBlur: 10, borderColor: color[i], shadowColor: color[i] } } }); } var seriesOption = [{ name: '', type: 'pie', clockWise: false, radius: [53, 57], hoverAnimation: false, itemStyle: { normal: { label: { show: true, position: 'outside', color: '#ddd', fontSize: 13, formatter: function(params) { return params.name + ':' + params.value }, padding: [0, -50, 15, -55] }, labelLine: { length: 0, length2: lineH, show: true, color: '#00ffff', lineStyle: { width: 2, join: 'bevel' }, minTurnAngle: 180 }, borderWidth: 1, } }, data: data }]; option = { color: color, title: { text: '', top: '48%', textAlign: "center", left: "49%", textStyle: { color: '#fff', fontSize: 22, fontWeight: '400' } }, graphic: { elements: [{ type: "image", z: 3, style: { image: img, width: 92, height: 92 }, left: 'center', top: 'center', position: [100, 100] }] }, tooltip: { show: false }, toolbox: { show: false }, series: seriesOption } myChart.setOption(option); } //一级关键字热度分析 function chart4() { myChart3.resize(); var reslult; let num = 0; let ldValue = 0; let ldR = 45; let aqValue = 0; let aqR = 50; let aqL = 45; let hjValue = 0; let hjR = 50; let hjL = 45; let ysValue = 0; let ysR = 50; let ysL = 45; let wtValue = 0; let wtR = 50; let wtL = 45; let wsValue = 0; let wsR = 50; let wsL = 45; let jtValue = 0; let jtR = 50; let jtL = 45; var fq = setInterval(function() { num++; if (ldR != 0) { ldR--; } if (aqR != 35) { aqR--; } if (aqL != 22) { aqL--; } if (aqValue != 70) { aqValue++; } if (hjValue != 60) { hjValue++; } if (hjR != 65) { hjR++; } if (hjL != 18) { hjL--; } if (ysValue != 55) { ysValue++; } if (ysR != 66) { ysR++; } if (ysL != 95) { ysL++; } if (wtValue != 65) { wtValue++; } if (wtR != 58) { wtR++; } if (wtL != 70) { wtL++; } if (wsValue != 60) { wsValue++; } if (wsR != 30) { wsR--; } if (wsL != 70) { wsL++; } if (jtValue != 75) { jtValue++; } if (jtR != 40) { jtR--; } if (jtL != 90) { jtL++; } if (ldValue != 90) { ldValue++; } if (num == 95) { clearInterval(fq); } reslult = [{ name: "劳动和社会保障", value: ldValue, color: "#d1c00d", position: [ldR, 50], fontSize: "14", number: "4", }, { name: "公共安全", value: aqValue, color: "#d1c00d", position: [aqL, aqR], fontSize: "14", number: "4", }, { name: "环境保护", value: hjValue, color: "#d1c00d", position: [hjL, hjR], number: "4", fontSize: "14", }, { name: "公共服务", value: 95, color: "#064d60", position: [45, 50], number: "4", fontSize: "16" }, { name: "营商管理", value: ysValue, color: "#03d1d3", position: [ysL, ysR], fontSize: "12", number: "4", }, { name: "文体科教", value: wtValue, color: "#03d1d3", position: [wtL, wtR], fontSize: "14", number: "4", }, { name: "卫生健康", value: wsValue, color: "#00FFFF", position: [wsL, wsR], number: "4", fontSize: "14", }, { name: "交通管理", value: jtValue, color: "#00FFFF", position: [jtL, jtR], fontSize: "14", number: "4", }, ]; var data = []; // 渲染数据,并写入chart reslult.map((item) => { data.push({ name: item.name, value: item.position, symbolSize: item.value, label: { normal: { formatter: function(param) { var newParamsName = ""; //返回文字格式 var paramsNameNumber = param.name.length; //获取显示文字长度 var number = parseInt(item.number); //超过多少字换行 var rowNumber = Math.ceil(paramsNameNumber / number); //最多能显示几行 if (paramsNameNumber > number) { //如果长度大于每行最多显示的字数 for (var p = 0; p < rowNumber; p++) { //循环次数就是行数 var tempStr = ""; //每次截取的字符 var start = p * number; //截取的起点 var end = start + number; //截取的终点 if (p == rowNumber - 1) { //最后一行就不换行了 tempStr = param.name.substring(start); } else { tempStr = param.name.substring(start, end) + "\n"; } newParamsName += tempStr; //拼接字符串 } } else { newParamsName = param.name; //如果小于每行最多显示的字数就返回原来的字符串 } return newParamsName; }, show: true, textStyle: { fontSize: item.fontSize, fontFamily: "Microsoft YaHei", color: "#FFFFFF", fontWeight: "bold", opacity: 1, }, }, }, itemStyle: { normal: { //右 下 左 color: new echarts.graphic.RadialGradient(0, 0, 1, [{ offset: 0.2, color: "#2a413b", }, { offset: 1, color: item.color, }, ]), opacity: 1, borderWidth: 1, borderColor: item.color, }, }, }); }); option = { // backgroundColor:'#092844', grid: { show: false, top: 10, bottom: 10, }, graphic: { elements: [{ type: "image", z: 3, style: { image: sourceImg, }, left: '33%', top: '27%', }] }, xAxis: [{ gridIndex: 0, type: "value", show: false, min: 0, max: 100, nameLocation: "middle", nameGap: 5, }, ], yAxis: [{ gridIndex: 0, min: 0, show: false, max: 100, nameLocation: "middle", nameGap: 30, }, ], series: [{ type: "scatter", symbol: "circle", symbolSize: 120, label: { normal: { show: true, formatter: "{b}", color: "#fff", textStyle: { fontSize: "20", }, }, }, animationDurationUpdate: 500, animationEasingUpdate: 500, animationDelay: function(idx) { // 越往后的数据延迟越大 return idx * 100; }, data: data, }, ], } myChart3.setOption(option) }, 5) // console.log(valueNum) } //一级地图 function areaMap() { //地图 let lz; let ay; let yx; let la; let bg; let gx; let yd; let ty; let nh; let wf; let newJson; //平台受理情况概况 new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetAreaAcceptance", data: {}, callBack: function(res) { console.log(res) console.log(res[0].jttate.split('%')[0]) $('.sqcount').text(res[0].sqcount) $('.jttate').text(Number(res[0].jttate.split('%')[0])) $('.zbrate').text(Number(res[0].zbrate.split('%')[0])) $('.hfrate').text(Number(res[0].hfrate.split('%')[0])) $('.contNum').countUp(); } }); new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetAreaCount", data: {}, callBack: function(res) { res.splice(0, 1); wf = res[0]; bg = res[1]; yd = res[2]; la = res[3]; ay = res[4]; ty = res[5]; nh = res[6]; hx = res[7]; lz = res[8]; gx = res[9]; $('.map').click(function(e) { $('.bulletFrame').show(); $('.map_wrap').show(); $('.map_wrap').siblings().hide() if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } if (e.target.tagName != 'LI') { return; } if ($(e.target).text() == '林州市') { map(lz.Areaid) } else if ($(e.target).text() == '安阳县') { map(ay.Areaid) } else if ($(e.target).text() == '滑县') { map(hx.Areaid) } else if ($(e.target).text() == '龙安区') { map(la.Areaid) } else if ($(e.target).text() == '北关区') { map(bg.Areaid) } else if ($(e.target).text() == '高新区') { map(gx.Areaid) } else if ($(e.target).text() == '殷都区') { map(yd.Areaid) } else if ($(e.target).text() == '文峰区') { map(wf.Areaid) } else if ($(e.target).text() == '汤阴县') { map(ty.Areaid) } else if ($(e.target).text() == '内黄县') { map(nh.Areaid) } }) } }); //地图 $('.lzmap,.aymap,.lamap,.bgmap,.gxmap,.ydmap,.wfmap,.tymap,.nhmap,.hxmap').mouseleave(function(e) { $('.wrap').css({ 'display': 'none' }) }) $('.map').mouseover(function(e) { if (e.target.tagName != 'LI') { return; } if ($(e.target).text() == '林州市') { $('.wrap').css({ 'display': 'block', 'top': '30px', 'left': '35px' }) newJson = Object.assign({}, lz); console.log(newJson) if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '安阳县') { $('.wrap').css({ 'display': 'block', 'top': '-59px', 'left': '161px' }) console.log(newJson) newJson = Object.assign({}, ay); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; // if(key=='blrate'||key=='mydrate'){ // newJson[key]=Number(newJson[key].split('%')[0]) // } // console.log(Number(newJson[key])) // $('.lable_num')[n].innerText =Number(newJson[key]); }) // $('.lable_num').countUp(); } if ($(e.target).text() == '滑县') { $('.wrap').css({ 'display': 'block', 'top': '343px', 'left': '439px' }) newJson = Object.assign({}, hx); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '龙安区') { $('.wrap').css({ 'display': 'block', 'top': '-53px', 'left': '240px' }) newJson = Object.assign({}, la); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '北关区') { $('.wrap').css({ 'display': 'block', 'top': '-58px', 'left': '279px' }) newJson = Object.assign({}, bg); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '高新区') { $('.wrap').css({ 'display': 'block', 'top': '-26px', 'left': '270px' }) newJson = Object.assign({}, gx); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '殷都区') { $('.wrap').css({ 'display': 'block', 'top': '-13px', 'left': '228px' }) newJson = Object.assign({}, yd); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '文峰区') { $('.wrap').css({ 'display': 'block', 'top': '-13px', 'left': '300px' }) newJson = Object.assign({}, wf); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '汤阴县') { $('.wrap').css({ 'display': 'block', 'top': '90px', 'left': '327px' }) newJson = Object.assign({}, ty); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } if ($(e.target).text() == '内黄县') { $('.wrap').css({ 'display': 'block', 'top': '76px', 'left': '501px' }) newJson = Object.assign({}, nh); if (newJson.AreaName != undefined || newJson.Areaid != undefined) { delete newJson.AreaName; delete newJson.Areaid; } Object.keys(newJson).forEach((key, n) => { $('.lable_num')[n].innerText = newJson[key]; }) } }) } //二级坐席 function traffic_chart(trafficName, trafficTime, sum, consult, help, complaint, proposal, praise, report, other) { let trafficChart = echarts.init(document.getElementById('traffic')); trafficChart.resize(); option = { tooltip: { trigger: 'axis', axisPointer: { show: true, type: 'line', lineStyle: { type: 'dashed' } }, textStyle: { color: '#ffe400', fontSize: '14' }, backgroundColor: 'rgba(250,250,250,0)', formatter: function(params) { let trafficStr = '' params.forEach(function(v, n) { trafficStr += '
  • ' + v.seriesName + ':
    ' + parseInt(v.value % 10000 / 1000) + '' + parseInt(v.value % 1000 / 100) + '' + parseInt((v.value % 100) / 10) + '' + parseInt(v.value % 10) + '
  • '; }) $('.traffic').html(trafficStr); let str = '
    ' params.forEach(function(v, n) { str += '
    ' + v.seriesName + ': ' + v.value + '
    ' }) str += '
    '; return str; } }, toolbox: { feature: { saveAsImage: { show: false } } }, legend: { data: trafficName, textStyle: { color: '#fff', fontSize:16, padding: [0, 5] } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true, tooltip: { textStyle: { color: '#fff' } } }, xAxis: [{ type: 'category', boundaryGap: false, axisLabel: { color: "#f4f5f5", fontSize: 16 }, data: trafficTime }], yAxis: [{ nameTextStyle: { color: "#f4f5f5", padding: [0, 0, 10, -5], fontSize: 16 }, axisLabel: { color: "#f4f5f5", fontSize: 16 }, axisTick: { lineStyle: { color: "#687f8a", width: 1 }, show: true }, splitLine: { show: true, lineStyle: { color: "#687f8a", type: "dashed" } }, axisLine: { lineStyle: { color: "#687f8a", width: 1, type: "solid" }, show: true, // "symbol":['none', 'arrow'], symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20' ], symbolOffset: 5, symbolSize: [35, 38], }, name: "条" }], series: [{ name: '总数', type: 'line', smooth: true, symbol: 'circle', // symbolSize: 3, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#8bffab' }, { offset: 1, color: '#8bf0ff' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#8bffab', borderColor: '#8bffab', borderWidth: 2 } }, data: sum }, { name: '咨询', type: 'line', smooth: true, // symbolSize: 5, symbol: 'circle', showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#2e90ff' }, { offset: 1, color: '#2ddffe' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#2e90ff', borderColor: '#2e90ff', borderWidth: 2 } }, data: consult }, { name: '求助', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#3d2eff' }, { offset: 1, color: '#39a5fc' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#3d2eff', borderColor: '#3d2eff', borderWidth: 2 } }, data: help }, { name: '建议', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#ff9126' }, { offset: 1, color: '#fff226' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#ff9126', borderColor: '#ff9126', borderWidth: 2 } }, data: proposal }, { name: '投诉', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#fa0084' }, { offset: 1, color: '#fa004c' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#fa0084', borderColor: '#fa0084', borderWidth: 2 } }, data: complaint }, { name: '表扬', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#36ff00' }, { offset: 1, color: '#8dff6e' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#36ff00', borderColor: '#36ff00', borderWidth: 2 } }, data: praise }, { name: '举报', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#e097ff' }, { offset: 1, color: '#b400ff' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#e097ff', borderColor: '#e097ff', borderWidth: 2 } }, data: report }, { name: '其他', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 0 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#00fff6' }, { offset: 1, color: '#45fff8' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#00fff6', borderColor: '#00fff6', borderWidth: 1 } }, data: other }] }; trafficChart.setOption(option); trafficChart.on('click', function(params) { if (params.seriesName == '总数') { acceptId = 0; } else if (params.seriesName == '咨询') { acceptId = 9; } else if (params.seriesName == '求助') { acceptId = 10; } else if (params.seriesName == '投诉') { acceptId = 11; } else if (params.seriesName == '建议') { acceptId = 12; } else if (params.seriesName == '表扬') { acceptId = 13; } else if (params.seriesName == "举报") { acceptId = 89; } else { acceptId = 90; } workTable(Number(params.name), acceptId) }); } //二级受理量统计 function acceptance_chart(data, data1, data2, data3, data4) { let acceptanceChart = echarts.init(document.getElementById('acceptance')); option = { tooltip: { trigger: 'axis', axisPointer: { show: true, type: 'line', lineStyle: { type: 'dashed' } }, textStyle: { color: '#ffe400', fontSize: '14' }, backgroundColor: 'rgba(250,250,250,0)', formatter: function(params) { let acceptanceStr = '' params.forEach(function(v, n) { acceptanceStr += '
  • ' + parseInt(v .value % 10000 / 1000) + '' + parseInt(v.value % 1000 / 100) + '' + parseInt((v.value % 100) / 10) + '' + parseInt(v.value % 10) + '
  • ' }) $('.acceptance_info').html(acceptanceStr); let str = '
    ' let connectionRate = ((params[1].value / params[0].value) * 100).toFixed() + '%'; let workorderRate = ((params[3].value / params[2].value) * 100).toFixed() + '%'; params.splice(2, 0, { seriesName: '电话接通率', value: connectionRate }) params.splice(5, 0, { seriesName: '工单直办率', value: workorderRate }) params.forEach(function(v, n) { str += '
    ' + v.seriesName + ':' + v.value + '
    ' }) str += '
    '; return str; } }, toolbox: { feature: { saveAsImage: { show: false } } }, legend: { data: ['电话呼入量', '电话接通量', '工单录入量', '工单直办量'], textStyle: { color: '#fff', fontSize:16, padding: [0, 5] } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, axisLabel: { color: "#f4f5f5", fontSize: 16 }, data: data }], yAxis: [{ nameTextStyle: { color: "#f4f5f5", padding: [0, 0, 10, -5], fontSize: 16 }, axisLabel: { color: "#f4f5f5", fontSize: 16 }, axisTick: { lineStyle: { color: "#687f8a", width: 1 }, show: true }, splitLine: { show: true, lineStyle: { color: "#687f8a", type: "dashed" } }, axisLine: { lineStyle: { color: "#687f8a", width: 1, type: "solid" }, show: true, // "symbol":['none', 'arrow'], symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20' ], symbolOffset: 5, symbolSize: [35, 38], }, name: "条" }], series: [{ name: '电话呼入量', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 2 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#3ca086' }, { offset: 0.8, color: '#257f76' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#85f8a8', borderColor: '#8bffab', borderWidth: 2 } }, data: data1 }, { name: '电话接通量', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 2 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#30b5b9' }, { offset: 0.8, color: '#24999d' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#30b5b9', borderColor: '#2ddffe', borderWidth: 2 } }, data: data2 }, { name: '工单录入量', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 2 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#1682c4' }, { offset: 0.8, color: '#1276aa' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#38a4fa', borderColor: '#39a5fc', borderWidth: 2 } }, data: data3 }, { name: '工单直办量', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { width: 2 } }, areaStyle: { normal: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#dd8d38' }, { offset: 0.8, color: '#225f67' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: '#dd8d38', borderColor: '#ac8753', borderWidth: 2 } }, data: data4 }] }; acceptanceChart.setOption(option); acceptanceChart.on('click', function(params) { $('.bulletFrameT').show(); $('.callLogList').show(); $('.callLogList').siblings().hide() if ($('.bulletFrameT').css('display') == 'block') { $('.body').css('opacity', '0.4') } getCallList(Number(params.name)) }) } //二级渠道统计 function channel_chart(data) { let channelChart = echarts.init(document.getElementById('channel')); const CubeLeft = echarts.graphic.extendShape({ shape: { x: 0, y: 0 }, buildPath: function(ctx, shape) { const xAxisPoint = shape.xAxisPoint const c0 = [shape.x, shape.y] const c1 = [shape.x - 20, shape.y - 4] const c2 = [xAxisPoint[0] - 20, xAxisPoint[1] - 4] const c3 = [xAxisPoint[0], xAxisPoint[1]] ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]) .closePath() } }) const CubeRight = echarts.graphic.extendShape({ shape: { x: 0, y: 0 }, buildPath: function(ctx, shape) { const xAxisPoint = shape.xAxisPoint const c1 = [shape.x, shape.y] const c2 = [xAxisPoint[0], xAxisPoint[1]] const c3 = [xAxisPoint[0] + 8, xAxisPoint[1] - 4] const c4 = [shape.x + 8, shape.y - 4] ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]) .closePath() } }) const CubeTop = echarts.graphic.extendShape({ shape: { x: 0, y: 0 }, buildPath: function(ctx, shape) { // 逆时针 角 y 负数向上 X 负数向左 const c1 = [shape.x, shape.y] const c2 = [shape.x + 8, shape.y - 4] const c3 = [shape.x - 11, shape.y - 8] const c4 = [shape.x - 20, shape.y - 4] ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]) .closePath() } }) echarts.graphic.registerShape('CubeLeft', CubeLeft) echarts.graphic.registerShape('CubeRight', CubeRight) echarts.graphic.registerShape('CubeTop', CubeTop) let MAX = [] let VALUE = [] let LEV = [] let chartData = [].concat(data) chartData.forEach(item => { VALUE.push(item.landArea) LEV.push(item.level) }) let maxItem = [].concat(VALUE).sort((a, b) => b - a)[0] let SUM = 0 for (let item of VALUE) { SUM += item MAX.push(maxItem) } option = { tooltip: { trigger: 'item', textStyle: { color: '#ffe400', fontSize: '16', fontWeight: '500' }, position: 'top', backgroundColor: 'rgba(250,250,250,0)', transitionDuration: 0.4, formatter: function(params) { return '
    ' + VALUE[params.dataIndex] + '
    '; } }, grid: { right: "5%", top: "20%", left: "5%", bottom: "5%", containLabel: true }, xAxis: { type: 'category', data: LEV, axisLine: { show: true, lineStyle: { color: '#687e89' } }, offset: 10, axisTick: { show: false }, axisLabel: { fontSize: 14, color: '#fff' } }, yAxis: [{ nameTextStyle: { color: "#f4f5f5", padding: [0, 0, 10, -5], fontSize: 16 }, axisLabel: { color: "#f4f5f5", fontSize: 16 }, axisTick: { lineStyle: { color: "#687f8a", width: 1 }, show: true }, splitLine: { show: true, lineStyle: { color: "#687f8a", type: "dashed" } }, axisLine: { lineStyle: { color: "#687f8a", width: 1, type: "solid" }, show: true, // "symbol":['none', 'arrow'], symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20' ], symbolOffset: 5, symbolSize: [35, 38], }, name: "条" }], series: [{ type: 'custom', renderItem: (params, api) => { const location = api.coord([api.value(0), api.value(1)]) return { type: 'group', children: [{ type: 'CubeLeft', shape: { api, xValue: api.value(0), yValue: api.value(1), x: location[0], y: location[1], xAxisPoint: api.coord([api.value(0), 0]) }, style: { fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#3fffea' }, { offset: 1, color: '#007eff' }]) }, }, { type: 'CubeRight', shape: { api, xValue: api.value(0), yValue: api.value(1), x: location[0], y: location[1], xAxisPoint: api.coord([api.value(0), 0]) }, style: { fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#2fbeaf' // 顶部 }, { offset: 1, color: '#015fbf' // 底部 }]) } }, { type: 'CubeTop', shape: { api, xValue: api.value(0), yValue: api.value(1), x: location[0], y: location[1], xAxisPoint: api.coord([api.value(0), 0]) }, style: { fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#9ffff5' }, { offset: 1, color: '#9ffff5' }]) }, } ] } }, data: VALUE }, { type: 'bar', itemStyle: { color: 'rgba(255,255,255,0)' }, emphasis: { itemStyle: { opacity: 0.2, color: 'rgb(60,118,77)' } }, data: MAX }, ] } channelChart.setOption(option); channelChart.on('click', function(params) { if (params.name == '市长信箱') { sourceId = 2; } else if (params.name == '市长电话') { sourceId = 1; } else if (params.name == '微博') { sourceId = 3; } else if (params.name == '微信') { sourceId = 5; } else if (params.name == '短信平台') { sourceId = 6; } else if (params.name == '中国政府网') { sourceId = 2459; } else if (params.name == "人民网") { sourceId = 4; } else if (params.name == '连线政府') { sourceId = 2458; } else if (params.name == "连线政府") { acceptId = 2501; } else { sourceId = 7; } workTable('', '', sourceId) }) } //二级关键字饼图 function keyword_chart(id, data, data1) { let keywordPieChart = echarts.init(document.getElementById(id)); let keywordNum = []; let keywordName = []; var rich = { percent: { color: "#FFF", align: 'right', fontSize: 15, fontWeight: '500', //padding: [0, 5] } } data.forEach(function(v, n) { keywordNum.push({ num: Number(v.substr(v.length - 2, 2)), value: v }) }) let max; for (let i = 0; i < keywordNum.length; i++) { for (let j = i; j < keywordNum.length; j++) { if (keywordNum[i].num < keywordNum[j].num) { max = keywordNum[j]; keywordNum[j] = keywordNum[i]; keywordNum[i] = max; } } } keywordNum.forEach(function(v, n) { keywordName.push(v.value); }) keywordName.reverse(); option = { legend: [{ icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`, orient: 'vertical', top: '680', data: keywordName.slice(0, 8), width: 28, height: 25, textStyle: { color: '#fff', padding: [0, 5], fontSize: 15 }, padding: [40, 10] }, { icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`, orient: 'vertical', top: '670', data: keywordName.slice(8, 16), width: 28, height: 25, itemGap: 20, textStyle: { color: '#fff', padding: [0, 5], fontSize: 15 }, padding: [80, 10] }], color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76', '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff', '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722', '#00BFA5', "#EAEA26" ], series: [{ name: '访问来源', type: 'pie', radius: '58%', data: data1, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } }, label: { normal: { show: false, position: 'inner', formatter: params => { return ( '{percent|' + params.percent.toFixed(0) + '%}' ); }, rich: rich, } }, // label: { // normal: { // show: false, // formatter: function(params) { // return params.name + ':' + params.value // // return // }, // }, // emphasis: { // position: 'left', // show: true, // textStyle: { // color: '#fff', // fontSize: '14', // fontWeight: 'bold' // }, // length: 1 // } // }, }] }; keywordPieChart.setOption(option); } //二级关键字表格 function keyWordTable(id) { var $tableLeft = $('#orderlist'); $tableLeft.bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $tableLeft.bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow", striped: false, //表格显示条纹 pagination: false, //启动分页 pageSize: 12, //每页显示的记录数 pageNumber: 1, //当前第几页 fixedColumns: false, fixedNumber: 3, pageList: [5, 10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { pid: id } return param }, onLoadSuccess: function(data) { //加载成功时执行 const newDataL = {}; const piData = []; newDataL.state = data.state; newDataL.message = data.message; newDataL.rows = data.data.Date; // newDataL.total = data.data.total; console.log(newDataL); data.data.Date.forEach(function(v, n) { piData.push({ value: v.Count, name: v.KeyName }) }) var nameArray = piData.map(item => { return item.name }) keyword_chart('keywordPie', nameArray, piData); $('.total').text(data.data.Total) $('.classTotal').text(data.data.ClaseeCount) $('.prot').text(data.data.ClassTotal) $tableLeft.bootstrapTable('load', newDataL); }, onLoadError: function() { //加载失败时执行 layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function getHandling(cont) { let sortPie = echarts.init(document.getElementById('sortPie')); option = { legend: [{ icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`, orient: 'vertical', data: ['督办', '直办', '转办', '催办'], left: '80%', top: 'center', align: 'left', textStyle: { color: "#fff", fontSize:18 }, padding: [10, 60], itemGap: 20 }], color: ['#c046ff', '#00a8ff', '#00ffe4', '#f1b31e'], series: [{ name: '访问来源', type: 'pie', radius: '58%', data: cont, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } }, label: { normal: { show: false, formatter: function(params) { return params.name + ':' + params.value // return }, }, emphasis: { position: 'left', show: true, textStyle: { color: '#fff', fontSize: '18', fontWeight: 'bold' }, length: 1 } }, }] }; sortPie.setOption(option); } function getNowFormatDate() { var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); var Hour = date.getHours(); // 获取当前小时数(0-23) var Minute = date.getMinutes(); // 获取当前分钟数(0-59) var Second = date.getSeconds(); // 获取当前秒数(0-59) var show_day = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'); var day = date.getDay(); if (Hour < 10) { Hour = "0" + Hour; } if (Minute < 10) { Minute = "0" + Minute; } if (Second < 10) { Second = "0" + Second; } if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } var currentdate = '

    ' + year + '-' + month + '-' + strDate + ' 

    '; var HMS = Hour + ':' + Minute + ':' + Second; var temp_time = year + '-' + month + '-' + strDate + ' ' + HMS; $('.nowTime li:nth-child(2)').html(HMS); $('.nowTime li:nth-child(3)').html(currentdate); $('.statisticsTime').text(temp_time); setTimeout(getNowFormatDate, 1000); //每隔1秒重新调用一次该函数 } function getData() { const date = new Date(); const year = date.getFullYear(); const month = date.getMonth() + 1; const lastdate = new Date(); //中国标准时间 lastdate.setMonth(lastdate.getMonth()); const y = lastdate.getFullYear(); //获取完整的年份(4位) const m = lastdate.getMonth(); //获取当前月份(0-11,0代表1月) $('.data_time').text(y + '-' + m + '-20' + ' 至 ' + year + '-' + month + '-21'); $('.renkList_time').text(y + '-' + m + '-20' + ' 至 ' + year + '-' + month + '-21'); } function map(id) { let typeId = 0 mapTable(typeId, id); $('.showInfo .btn_left').click(function() { if (typeId != 0) { typeId--; } mapTable(typeId, id); }) $('.showInfo .btn_right').click(function() { if (typeId != 2) { typeId++; } mapTable(typeId, id); }) // 在指定容器创建地图实例并设置最大最小缩放级别 var map = new BMap.Map("allmap", { minZoom: 5, maxZoom: 19 }); // 初始化地图,设置中心点和显示级别 var point = new BMap.Point(114.364451, 36.097709); map.centerAndZoom(point, 13); var myIcon = new BMap.Icon("./images/secondary_img/map_icon.png", new BMap.Size(45, 45)); var marker = new BMap.Marker(point, { icon: myIcon }); // 创建标注 map.addOverlay(marker); // 开启鼠标滚轮缩放功能,仅对PC上有效 map.enableScrollWheelZoom(true); //将控件(平移缩放控件)添加到地图上 map.addControl(new BMap.NavigationControl({ type: BMAP_NAVIGATION_CONTROL_LARGE, //缩放控件类型 仅包含缩放按钮 anchor: BMAP_ANCHOR_BOTTOM_RIGHT, //右下角 })); var opts = { boxStyle: { width: "350px", height: "195px" }, // enableAutoPan: true, // align: INFOBOX_AT_TOP, // closeIconUrl: 'icon/close.png', closeIconMargin: '0px', closeIconZIndex: 1, closeIconWidth: '15px' } var html = ""; var infoWindow = new BMap.InfoWindow(html, opts); // 创建信息窗口对象 marker.addEventListener("click", function() { map.openInfoWindow(infoWindow, point); //开启信息窗口 }); } function timeTable() { new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime", data: {}, callBack: function(res) { // res.reverse(); let str = '' let num; res.forEach(function(v, n) { num = 1 + n if (n == 0) { str += '
  • ' + v.deptname + '
    ' + v.timeday + 'h
  • ' } else if (n == 1) { str += '
  • ' + v.deptname + '
    ' + v.timeday + 'h
  • ' } else if (n == 2) { str += '
  • ' + v.deptname + '
    ' + v.timeday + 'h
  • ' } else { str += '
  • ' + num + '
    ' + v.deptname + '
    ' + v .timeday + 'h
  • ' } }) $('.time_statistics ul').html(str); } }); } function timeSecTable() { var $tableLeft = $('#timeSecList'); $tableLeft.bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $tableLeft.bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime", striped: false, //表格显示条纹 pagination: false, //启动分页 pageSize: 12, //每页显示的记录数 pageNumber: 1, //当前第几页 fixedColumns: false, fixedNumber: 3, pageList: [5, 10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 }, onLoadSuccess: function(data) { //加载成功时执行 // data.reverse(); const newDataL = {}; newDataL.state = "success"; newDataL.message = "加载成功"; newDataL.rows = data; $tableLeft.bootstrapTable('load', newDataL); }, onLoadError: function() { //加载失败时执行 layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function testTable() { new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetDeptDeptAchievements", data: {}, callBack: function(data) { var max; for (var i = 0; i < data.length; i++) { for (var j = i; j < data.length; j++) { if (data[i].total < data[j].total) { max = data[j]; data[j] = data[i]; data[i] = max; } } } let str = '' let num; data.forEach(function(v, n) { num = 1 + n if (n == 0) { str += '
  • ' + v.deptname + '
    ' + v.total + '
  • ' } else if (n == 1) { str += '
  • ' + v.deptname + '
    ' + v.total + '
  • ' } else if (n == 2) { str += '
  • ' + v.deptname + '
    ' + v.total + '
  • ' } else { str += '
  • ' + num + '
    ' + v.deptname + '
    ' + v .total + '
  • ' } }) console.log(str) $('.test_rank ul').html(str); } }); //表格滚动 } function testSecTable(id, type, group) { var $tableLeft = $(id); $tableLeft.bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $tableLeft.bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetDeptDeptAchievements", striped: false, //表格显示条纹 pagination: false, //启动分页 pageSize: 12, //每页显示的记录数 pageNumber: 1, //当前第几页 fixedColumns: false, fixedNumber: 3, pageList: [5, 10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 return { type: type, } }, onLoadSuccess: function(data) { //加载成功时执行 const newDataL = {}; const typeData1 = []; const typeData2 = []; var max; for (var i = 0; i < data.length; i++) { for (var j = i; j < data.length; j++) { if (data[i].total < data[j].total) { max = data[j]; data[j] = data[i]; data[i] = max; } } } if (type == 1) { data.forEach(function(v, n) { if (v.workordrcount <= 10) { typeData1.push(v) } else { typeData2.push(v) } }) if (group == 0) { newDataL.rows = typeData2; } else { newDataL.rows = typeData1; } } else { newDataL.rows = data; } newDataL.state = "success"; newDataL.message = "加载成功"; $tableLeft.bootstrapTable('load', newDataL); }, onLoadError: function() { //加载失败时执行 layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function workTable(hours, type, source, handling, deptid, timetype, KeyId, kpcontent, kptype, key, sourceArea, Satisfie,dptype) { $('.bulletFrameT').show(); $('.workList').show(); $('.workList').siblings().hide() if ($('.bulletFrameT').css('display') == 'block') { $('.body').css('opacity', '0.4') } //先销毁表格 $('#workList').bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $('#workList').bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/WorkOrdrList", //获取数据的Servlet地址 // url:"http://192.168.8.9:1042/InfoNew/WorkOrdrList", //获取数据的Servlet地址 contentType: "application/x-www-form-urlencoded", striped: false, //表格显示条纹 pagination: true, //启动分页 pageSize: 13, //每页显示的记录数 pageNumber: 1, //当前第几页 pageList: [15, 30, 60, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { page: params.pageNumber, pagesize: params.pageSize, hours: hours, type: type, source: source, deptid: deptid, timetype: timetype, KeyId: KeyId, kpcontent: kpcontent, kptype: kptype, key: key, sourceArea: sourceArea, Satisfie: Satisfie, dptype: dptype }; return param; }, responseHandler: function(res) { // //格式化数据 return { "rows": res.rows, //数据 "total": res.total }; }, onLoadSuccess: function(res) { //加载成功时执行 }, onLoadError: function() { //加载失败时执行 //layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function getCallList(hours) { $('#callList').bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $('#callList').bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetCallList", //获取数据的Servlet地址 contentType: "application/x-www-form-urlencoded", striped: true, //表格显示条纹 smartDisplay: false, pagination: true, //启动分页 pageSize: 13, //每页显示的记录数 pageNumber: 1, //当前第几页 // pageList: [10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { PageIndex: params.pageNumber, PageSize: params.pageSize, hours: hours, callstate: 1, calltype: 0 }; return param; }, responseHandler: function(res) { //格式化数据 return { "rows": res.rows, //数据 "total": res.total }; }, onLoadSuccess: function(res) { //加载成功时执行 }, onLoadError: function() { //加载失败时执行 //layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } //二级地图 function mapTable(type, areaid) { $('.bulletFrameT').hide(); $('.bulletFrame').show(); $('.map_wrap').show(); $('.map_wrap').siblings().hide(); $('#mapList').bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $('#mapList').bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetMapByNow", //获取数据的Servlet地址 // url:"http://192.168.8.9:1042/InfoNew/GetMapByNow", contentType: "application/x-www-form-urlencoded", striped: true, //表格显示条纹 pagination: false, //启动分页 pageSize: 10, //每页显示的记录数 pageNumber: 1, //当前第几页 pageList: [10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { type: type, areaid: areaid }; return param; }, // responseHandler: function(res) { // return { // "rows": res.rows, //数据 // // "total":res.total // }; // }, onLoadSuccess: function(res) { //加载成功时执行 const newDataL = {}; let str = '' res.forEach(function(v, n) { str += '
  • ' v.areaid = areaid; v.type = type; }) console.log(res) newDataL.state = "success"; newDataL.message = "加载成功"; newDataL.rows = res; console.log(newDataL) $('#mapList').bootstrapTable('load', newDataL); $('.infoTitle').html(str); }, onLoadError: function() { //加载失败时执行 //layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } //平台状况表格 function acceptlist(id) { if (id == 0) { $('.acceptCont .key_content h3').text('督办分类统计') } else if (id == 1) { $('.acceptCont .key_content h3').text('直办分类统计') } else if (id == 2) { $('.acceptCont .key_content h3').text('转办分类统计') } else { $('.acceptCont .key_content h3').text('催办分类统计') } var $tableLeft = $('#acceptContlist'); $tableLeft.bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $tableLeft.bootstrapTable({ method: "get", //使用get请求到服务器获取数据 // url: huayi.config.callcenter_url + "handling", url: huayi.config.callcenter_url + "InfoNew/GetHandleCount", striped: false, //表格显示条纹 pagination: false, //启动分页 pageSize: 12, //每页显示的记录数 pageNumber: 1, //当前第几页 fixedColumns: false, fixedNumber: 3, pageList: [5, 10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { type: id } return param }, onLoadSuccess: function(data) { //加载成功时执行 const newDataL = {}; const piData = []; const totalSum = []; newDataL.state = "success"; newDataL.message = "加载成功"; newDataL.rows = data; data.forEach(function(v, n) { piData.push({ value: v.total, name: v.deptname }) console.log(v.total) if (n > 9) { totalSum.push(v.total); } }) var nameArray = piData.map(item => { return item.name }) let newpiData = piData.splice(0, 13); newpiData.push({ value: totalSum.reduce(function(prev, curr, idx, arr) { return prev + curr; }), name: '其他' }) let newnameArray = nameArray.splice(0, 13); newnameArray.push('其他') keyword_chart('keywordPie2', newnameArray, newpiData); $tableLeft.bootstrapTable('load', newDataL); }, onLoadError: function() { //加载失败时执行 layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function acceptlist1(id, con) { // debugger $('.bulletFrameT').show() $('.acceptCont2').show(); $('.acceptCont2').siblings().hide() $('.acceptContTitle').text(con + '分类统计') var $tableLeft = $('#acceptContlist2'); $tableLeft.bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $tableLeft.bootstrapTable({ method: "get", //使用get请求到服务器获取数据 // url: huayi.config.callcenter_url + "handling", url: huayi.config.callcenter_url + "InfoNew/GetKeyByNow", striped: false, //表格显示条纹 pagination: false, //启动分页 pageSize: 12, //每页显示的记录数 pageNumber: 1, //当前第几页 fixedColumns: false, fixedNumber: 3, pageList: [5, 10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { deptid: id } return param }, onLoadSuccess: function(data) { //加载成功时执行 const newDataL = {}; const piData = []; const totalSum = []; newDataL.state = data.state; newDataL.message = data.message; newDataL.rows = data.data.Date; // newDataL.total = data.data.total; console.log(newDataL); data.data.Date.forEach(function(v, n) { piData.push({ value: v.Count, name: v.KeyName }) }) var nameArray = piData.map(item => { return item.name }) keyword_chart('keywordPie3', nameArray, piData); $('.total').text(data.data.Total) $('.classTotal').text(data.data.ClaseeCount) $('.prot').text(data.data.ClassTotal) $tableLeft.bootstrapTable('load', newDataL); }, onLoadError: function() { //加载失败时执行 layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } //整理代码处 function acceptlist2(id) { workTable('', '', '', '', '', '', '', '', '', id) } //表格操作 //获取序号 function Code(val, row, index) { return index + 1; } //二级地图 function getCallTypeId(v, r) { if (r.type == 0) { // console.log(r) return '
    ' + v + '
    ' } else if (r.type == 1) { return '
    ' + v + '
    ' } else if (r.type == 2) { if (r.name == '满意') { return '
    ' + v + '
    ' } else { return '
    ' + v + '
    ' } } } //单位名称 function getDeptname(val, row) { return '' + val + '' } //平台办理二级单位 function getDeptnameP(v, r) { return '' + v + '' } //平台办理三级单位 function getCompanyNameP2(v, r) { // return '' + v + '' return '' + v + '' } //通话列表的呼叫类型 function getCallType(v, r) { if (v == 0) { return "呼入" } else if (v == 1) { return "呼出" } } //通话列表的呼叫状态 function getCallState(v) { if (v == 0) { return "未接通电话" } else if (v == 1) { return "已接通电话" } } //内容省略 function getDeptnameC(v) { return "" + v + "" } //通话列表的处理方式 function getDisposalType(v) { if (v == 0) { return "" } else if (v == 1) { return "" } else if (v == 2) { return "" } else if (v == 3) { return "转值班电话" } else if (v == 4) { return "留言" } else if (v == 5) { return "呼损" } else if (v == 6) { return "人工处理" } } //通话列表工单详情 function getWorkOrder(v) { if (v == null) { v = ''; } workStateAct = 1 return '' + v + '' } //通话列表的话机类型 function getActionType(v, r) { if (v == 1) { if (r.CallType == 0) { return '
    呼入
    ' } else { return '
    呼出
    ' } } else if (v == 2) { return '
    转移
    ' } else { return '
    三方通话
    ' } } //工单状态 function getWorkState(v, r) { if (r.F_WorkState == 0) { return "新工单"; } else if (r.F_WorkState == 1) { return "待交办"; } else if (r.F_WorkState == 2) { return "待查收"; } else if (r.F_WorkState == 3) { return "退回审核中"; } else if (r.F_WorkState == 4) { return "办理中"; } else if (r.F_WorkState == 5) { return "延时审核中"; } else if (r.F_WorkState == 6) { return "已办理"; } else if (r.F_WorkState == 7) { return "已回访"; } else if (r.F_WorkState == 8) { return "重办中"; } else if (r.F_WorkState == 9) { return "已结案"; } else if (r.F_WorkState == 10) { return "待审核"; } else if (r.F_WorkState == 11) { return "重办待交办"; } else if (r.F_WorkState == 13) { return "重办驳回"; } } //工单详情 function getformatter(v) { workStateAct = 2 return '' + v + '' } //工单详情 function btn_detail(id, state) { detailId = id; $('.bulletFrameT').show(); $('.workDetails').show(); $('.workDetails').siblings().hide() if ($('.bulletFrameT').css('display') == 'block') { $('.body').css('opacity', '0.4') } $('.btn_right').click(function() { if (state == 1) { $('.callLogList').show(); $('.callLogList').siblings().hide() } else { $('.workList').show(); $('.workList').siblings().hide() } }) $('.urgency').text(''); $('.workState').text(""); $('.acceptType').text(""); $('.isSecrecy').text(""); $('.workNo').text(''); //工单编号 $('.acceptNumber').text(''); //受理人工号 $('.acceptName').text(''); //受理人 $('.contacts').text(''); //来单联系人 $('.phone').text(''); //联系号码 $('.contactInformation').text(''); //联系方式 $('.contactAddress').text(''); $('.acceptChannel').text(''); $('.phoneType').text(''); $('.KeyName').text(''); $('.F_ComContent').text(''); $('.deptname').text(''); $('.AreaName').text(''); $('.F_ComTitle').text(''); $('.deptname').text(''); $('.F_Result').text(''); new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetWorkOrder", data: { workorderid: id }, Type: 'GET', callBack: function(res) { let data = res.data[0]; let level; //紧急程度 for (i in data) { if (data[i] == '' || data[i] == null) { data[i] = '-' } } if (data.F_Level == 1) { $('.urgency').text('一般'); } else { $('.urgency').text('严重'); } if (data.F_WorkState == 0) { $('.workState').text("新工单"); } else if (data.F_WorkState == 1) { $('.workState').text("待交办"); } else if (data.F_WorkState == 2) { $('.workState').text("待查收"); } else if (data.F_WorkState == 3) { $('.workState').text("退回审核中"); } else if (data.F_WorkState == 4) { $('.workState').text("办理中"); } else if (data.F_WorkState == 5) { $('.workState').text("延时审核中"); } else if (data.F_WorkState == 6) { $('.workState').text("已办理"); } else if (data.F_WorkState == 7) { $('.workState').text("已回访"); } else if (data.F_WorkState == 8) { if (data.F_Identification === 0) { $('.workState').text("重置转发"); } else if (data.F_Identification === 1) { $('.workState').text("退回重办"); } else { $('.workState').text("重办中"); } } else if (data.F_WorkState == 9) { $('.workState').text("已结案"); } else if (data.F_WorkState == 10) { $('.workState').text("待审核"); } else if (data.F_WorkState == 11) { $('.workState').text("重办待交办"); } else if (data.F_WorkState == 13) { $('.workState').text("重办驳回"); } if (data.F_IsResult == 0) { $('.acceptType').text("网络转办"); } else { $('.acceptType').text("当即办理"); } if (data.F_IsProtect == 0) { $('.isSecrecy').text("否"); } else { $('.isSecrecy').text("是"); } $('.workNo').text(data.F_WorkOrderId); //工单编号 $('.acceptNumber').text(data.F_CreateUser); //受理人工号 $('.acceptName').text(data.UserName); //受理人 $('.contacts').text(data.F_CusName); //来单联系人 $('.phone').text(data.F_CusPhone); //联系号码 $('.contactInformation').text(data.F_ConPhone); //联系方式 $('.contactAddress').text(data.F_CusAddress); $('.acceptChannel').text(data.SourceName); $('.phoneType').text(data.TypeName1); $('.KeyName').text(data.KeyName); $('.F_ComContent').text(data.F_ComContent); $('.deptname').text(data.deptname); $('.AreaName').text(data.AreaName); $('.F_ComTitle').text(data.F_ComTitle); $('.deptname').text(data.deptname); $('.F_Result').text(data.F_Result); } }); } function getClick() { $('#timeline').html(''); $('.bulletFrameT').show(); $('.workProcedure').show(); $('.workProcedure').siblings().hide() if ($('.bulletFrameT').css('display') == 'block') { $('.body').css('opacity', '0.4') } new doAjax({ url: huayi.config.callcenter_url + "InfoNew/GetWorkOrderProcess", data: { workorderid: detailId }, Type: 'GET', callBack: function(res) { let str = ''; res.data.forEach(function(v, n) { str += "
  • " + "" + v.F_CreateTime + "

    " + v .F_Message+ "

  • " }) $('#timeline').html(str); } }); } //绩效排名 function rankingOperate(val, row, index) { var str = ''; if (index < 3) { str = '
      ' + '
    • ' + '
    '; } else { str = '
      ' + '
    • ' + (index + 1) + '
    • ' + '
    '; } return str } //趋势 function trend(val, row) { var str = ''; if (row.trend.substring(0, 1) == '-' && row.trend.length > 1) { str = '
      ' + '
    • ' + row .trend.substring(1) + '
    • ' + '
    '; } else if (row.trend.substring(0, 1) != '-' && row.trend.length > 1) { str = '
      ' + '
    • ' + row .trend + '
    • ' + '
    '; } else { str = '
      ' + '
    • ' + row.trend + '
    • ' + '
    '; } return str } //办理时长 function getCompanyName(v, r) { return '' + v + '' } //办理时长转工单详情(整理代码) function btn_getWorkList(name) { workTable('', '', '', '', name, ''); } //绩效 function getWorkList(v, r) { return '' + v + '' } function btn_getRankList(row) { $('.rankList').siblings().hide() $('.rankList').show(); let rowJson = row; $('.Satisfaction').text(rowJson.Satisfaction) $('.Onschedule').text(rowJson.Onschedule) $('.Processingrate').text(rowJson.Processingrate) $('.backrate').text(rowJson.backrate) $('.knowledgerate').text(rowJson.knowledgerate) $('.secrecyrate').text(rowJson.secrecyrate) $('.total').text(rowJson.total) //绩效的点击事件 $('.myd').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '40*(1-' + rowJson.dissatisfied + '/' + rowJson.workordrcount + ')'; $('.headline').text('综合满意度'); $('.totalScore').text('40'); $('.headline1').text('权重'); $('.headline1_score').text('40'); $('.formula1').text('权重分数*(1-不满意工单量/承办工单量)'); $('.nowScore').text(rowJson.Satisfaction); $('.headline2').text('承办工单量'); $('.headline2_score').text(rowJson.workordrcount); $('.formula2').text('权重分数*(1-不满意率)'); $('.headline3').text('不满意工单量'); $('.headline3_score').text(rowJson.dissatisfied); $('.formula3').text(formula); }) $('.aqbl').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '20*(1-' + rowJson.overcount + '/' + rowJson.workordrcount + ')'; $('.headline').text('按期办理'); $('.totalScore').text('20'); $('.headline1').text('权重'); $('.headline1_score').text('20'); $('.formula1').text('权重分数*(1-超期工单量/承办工单量)'); $('.nowScore').text(rowJson.Onschedule); $('.headline2').text('承办工单量'); $('.headline2_score').text(rowJson.workordrcount); $('.formula2').text('权重分数*(1-超期率)'); $('.headline3').text('超期工单量'); $('.headline3_score').text(rowJson.overcount); $('.formula3').text(formula); }) $('.blsc').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '10*(1-' + rowJson.Processing + ')'; $('.headline').text('平均办理时长'); $('.totalScore').text('10'); $('.headline1').text('权重'); $('.headline1_score').text('10'); $('.formula1').text('权重分数*(1-平均办理时长)'); $('.nowScore').text(rowJson.Processingrate); $('.headline2').text('承办工单量'); $('.headline2_score').text(rowJson.workordrcount); $('.formula2').text('权重分数*(1-平均办理时长)'); $('.headline3').text('平均办理时长'); $('.headline3_score').text(rowJson.Processing); $('.formula3').text(formula); }) $('.jsth').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '10*(1-' + rowJson.backover + '/' + rowJson.back + ')'; $('.headline').text('及时退回'); $('.totalScore').text('10'); $('.headline1').text('权重'); $('.headline1_score').text('10'); $('.formula1').text('权重分数*(1-退回超期量/退回工单量)'); $('.nowScore').text(rowJson.backrate); $('.headline2').text('退回工单量'); $('.headline2_score').text(rowJson.back); $('.formula2').text('权重分数*(1-退回超期率)'); $('.headline3').text('退回超期量'); $('.headline3_score').text(rowJson.backover); $('.formula3').text(formula); }) $('.zskgx').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '10*(1-' + rowJson.knowledgeover + '/' + rowJson.knowledge + ')'; $('.headline').text('知识库及时更新'); $('.totalScore').text('10'); $('.headline1').text('权重'); $('.headline1_score').text('10'); $('.formula1').text('权重分数*(1-未及时提交数量/知识索要数量)'); $('.nowScore').text(rowJson.knowledgerate); $('.headline2').text('知识索要数量'); $('.headline2_score').text(rowJson.knowledge); $('.formula2').text('权重分数*(1-未及时提交率)'); $('.headline3').text('未及时提交数量'); $('.headline3_score').text(rowJson.knowledgeover); $('.formula3').text(formula); }) $('.bmgd').click(function() { $('.rankListDetial').show(); $('.rankListDetial').siblings().hide() let formula = '10*(1-' + rowJson.secrecy + '*5-' + rowJson.divulge + '*5)'; $('.headline').text('保密规定'); $('.totalScore').text('10'); $('.headline1').text('权重'); $('.headline1_score').text('10'); $('.formula1').text('权重分数-公民信息泄密次数*5-工单处理泄密次数*5'); $('.nowScore').text(rowJson.secrecyrate); $('.headline2').text('公民信息泄密次数'); $('.headline2_score').text(rowJson.secrecy); $('.formula2').text('权重分数-公民信息泄密次数*5-工单处理泄密次数*5'); $('.headline3').text('工单处理泄密次数'); $('.headline3_score').text(rowJson.divulge); $('.formula3').text(formula); }) } //绩效退回工单 function numReturned(v, r) { return '' + v + ''; } function numReturnedOverdue(v, r) { return '' + v + ''; } function btn_numReturned(deptid, id) { $('.backworkList').show(); $('.bulletFrameT').show() $('.backworkList').siblings().hide() $('#backworkList').bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $('#backworkList').bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/WorkBackOrdrList", //获取数据的Servlet地址 // url:"http://192.168.8.9:1042/InfoNew/WorkBackOrdrList", //获取数据的Servlet地址 contentType: "application/x-www-form-urlencoded", striped: true, //表格显示条纹 pagination: true, //启动分页 pageSize: 13, //每页显示的记录数 pageNumber: 1, //当前第几页 pageList: [10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { page: params.pageNumber, pagesize: params.pageSize, deptid: deptid, type: id }; return param; }, responseHandler: function(res) { // //格式化数据 return { "rows": res.rows, //数据 "total": res.total }; }, onLoadSuccess: function(res) { //加载成功时执行 }, onLoadError: function() { //加载失败时执行 //layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } //绩效知识库列表 function getKnowledge(v, r) { return '' + v + ''; } function getKnowledgeNo(v, r) { return '' + v + ''; } function btn_Knowledge(deptid, id) { $('.knowledgeBase').show(); $('.bulletFrameT').show() $('.knowledgeBase').siblings().hide() $('#orderlist3').bootstrapTable('destroy'); //初始化表格,动态从服务器加载数据 $('#orderlist3').bootstrapTable({ method: "get", //使用get请求到服务器获取数据 url: huayi.config.callcenter_url + "/InfoNew/GetListDemands", //获取数据的Servlet地址 contentType: "application/x-www-form-urlencoded", striped: true, //表格显示条纹 pagination: true, //启动分页 pageSize: 13, //每页显示的记录数 pageNumber: 1, //当前第几页 pageList: [10, 20, 50, 100], //记录数可选列表 search: false, //是否启用查询 showColumns: false, //显示下拉框勾选要显示的列 showRefresh: false, //显示刷新按钮 sidePagination: "server", //表示服务端请求 //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder //设置为limit可以获取limit, offset, search, sort, order queryParamsType: "undefined", queryParams: function queryParams(params) { //设置查询参数 var param = { page: params.pageNumber, pagesize: params.pageSize, deptid: deptid, type: id }; return param; }, responseHandler: function(res) { // //格式化数据 return { "rows": res.rows, //数据 "total": res.total }; }, onLoadSuccess: function(res) { //加载成功时执行 }, onLoadError: function() { //加载失败时执行 //layer.msg("加载数据失败", { time: 1500, icon: 2 }); } }); } function minusPoints(v) { return '' + v + '' } function extraPoints(v) { return '' + v + '' } $('#orderlist2').on('click-cell.bs.table', function(e, field, value, row, $element) { let cont; let id; if (JSON.stringify(field) == '\"secrecy\"') { cont = '公民信息保密'; id = 1; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"divulge\"') { cont = '工单处理保密'; id = 1; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"cityinformation\"') { cont = '市媒体宣传'; id = 2; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"knowledgerate\"') { cont = '省媒体宣传'; id = 2; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"inspection\"') { cont = '市领导视察'; id = 2; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"extension\"') { cont = '全市推广或收入市平台汇报材料'; id = 2; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"notice\"') { cont = '涉及民生重大事项及时报送'; id = 2; workTable('', '', '', '', row.deptid, '', '', cont, id); } else if (JSON.stringify(field) == '\"deptname\"') { $('.bulletFrameT').show() $('.rankList').siblings().hide() $('.rankList').show(); btn_getRankList(row) } else if (JSON.stringify(field) == '\"workordrcount\"') { workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 3); } else if (JSON.stringify(field) == '\"dissatisfied\"') { workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 4); } else if (JSON.stringify(field) == '\"overcount\"') { workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 5); } else if (JSON.stringify(field) == '\"Processing\"') { workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 1); } else { return; } }) //关键字热度分析 function getKeyName(v, r) { console.log(r) return '' + v + '' } function btn_keyName(id, classId, con) { if (classId == '1') { $('.keyword_wrap').hide() $('.bulletFrame').hide() workTable('', '', '', '', '', '', id); } else { $('.keyWordTitle').text(con.substring(0, con.length - 2) + '问题分类') keyWordTable(id); } }