function showTools(a){
if($(a).find(".tooltips").css("display") == 'none') {
$(a).find(".tooltips").show();
$(a).parents('tr').siblings().find(".tooltips").hide();
}else{
$(a).find(".tooltips").hide();
}
}
$(document).ready(function(){
laydate.render({
elem: '#time1',
theme: '#00a1cb'
});
laydate.render({
elem: '#time2',
theme: '#00a1cb'
});
laydate.render({
elem: '#time3',
theme: '#00a1cb'
});
laydate.render({
elem: '#time4',
theme: '#00a1cb'
});
laydate.render({
elem: '#time5',
theme: '#00a1cb'
});
laydate.render({
elem: '#time6',
theme: '#00a1cb'
});
//投诉举报汇总 part1
var quantity = echarts.init(document.getElementById('quantity'));
quantity.setOption({
// title: {
// text: '投诉/举报汇总',
// x: 'center',
// textStyle: {
// color: '#fff',
// fontSize: 18
// },
// },
tooltip: {
trigger: 'item',
formatter: "{a}
{b} : {c} ({d}%)",
axisPointer: {
crossStyle: {
color: '#fff'
}
}
},
legend: {
// orient: 'vertical',
bottom: 'bottom',
data: [],
textStyle: {
color: '#fff'
}
},
series: [{
name: '数据',
type: 'pie',
radius: '55%',
center: ['50%', '50%'],
data: [],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
normal:{
label:{
show: true,
formatter: '{b} : {c} ({d}%)'
},
labelLine :{show:true}
}
},
label: {
normal: {
textStyle: {
color: '#fff'
}
}
}
}]
});
function partOne(){
var index = layer.load(1, {
shade: [0.5, '#030303'] //0.1透明度的白色背景
});
$.ajax({
type:"get",
url:huayi.config.callcenter_url + "info/GetTypeCountByDate",
async:true,
dataType:'json',
data:{
start:$('#time1').val(),
end:$('#time2').val()
},
success:function(data){
if(data.state.toLowerCase()=='success'){
layer.close(index);
var con=data.data;
var part_1_legend =[];
var part_1_ser = [];
$(con).each(function(i, n) {
part_1_legend.push(n.TypeName)
var part_1_obj = {};
part_1_obj.value = n.Count;
part_1_obj.name = n.TypeName;
part_1_ser.push(part_1_obj)
})
quantity.setOption({
legend: {
data: part_1_legend
},
series: [{
data: part_1_ser
}]
})
}
}
});
}
$('.part1Btn').click(function(){
partOne()
})
//举报单位/个人统计 part2
var tsdwgr = echarts.init(document.getElementById('tsdwgr'));
tsdwgr.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
show: true,
backgroundColor: '#333'
}
}
},
legend: {
data: [],
bottom:'bottom',
textStyle: {
color: '#ccc'
}
},
xAxis: {
name: '月份',
data: [],
axisLine: {
lineStyle: {
color: '#ccc'
}
}
},
yAxis: {
name: '数量',
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#ccc'
}
}
},
series: []
});
function partTwo(){
var index = layer.load(1, {
shade: [0.5, '#030303'] //0.1透明度的白色背景
});
$.ajax({
type:"get",
url:huayi.config.callcenter_url + "info/GetTypeCountMonthByDate",
async:true,
dataType:'json',
success:function(data){
if(data.state.toLowerCase()=='success'){
layer.close(index);
var con=data.data;
var counts = con.counts;
var sers = [];
$(counts).each(function(i, n) {
var obj = {};
obj.name = con.cols[i];
obj.type = "line";
obj.smooth = true;
obj.showAllSymbol = true;
obj.symbol = "emptyCircle";
obj.symbolSize = 10;
obj.data = n;
sers.push(obj)
});
tsdwgr.setOption({
xAxis: {
data: con.months
},
legend: {
data: con.cols
},
series: sers
});
}
}
});
}
//投诉关键字 part3
function partThree(){
$('.table1 tbody').html('');
var index = layer.load(1, {
shade: [0.5, '#030303'] //0.1透明度的白色背景
});
$.ajax({
type:"get",
url:huayi.config.callcenter_url + "info/GetKeyCountByDate",
async:true,
dataType:'json',
data:{
start:$('#time3').val(),
end:$('#time4').val()
},
success:function(data){
if(data.state.toLowerCase()=='success'){
layer.close(index);
var con=data.data;
$(con).each(function(i,n){
if(i<10){
var html="";
// $('
' + m.TypeName + ':' + m.Count + '
' }) html += '' + m.TypeName + ':' + m.Count + '
' }) htmls += '