$(function(){
var path="";
// var _deptid="bba80316d8d246da9970fdece8c6f779";
var _deptid="b36b28ce91204159b602d612cca92622";
var newpath = '//www.xjnj.gov.cn',
site = '&site=6500000011',//站点代号
xjurl = '/hd/hd_xjxq',//ejs信件详情
ftr = '/hd/zxdc_result',//ejs调查结果
dcurl = '/hd/zxdc_details',//ejs调查详情
xjstrurl = '/xjnj/zxzx/new_hd_xjxq.shtml',//new信件详情
dcxqstrurl = '/xjnj/wsdc/new_hd_zxdc_details.shtml',//new调查详情
dcrstrurl = '/xjnj/wsdc/new_hd_zxdc_result.shtml';//new调查结果
// 饼图
function tjbt(frontdata){
$("#xjtotal").html(frontdata.ybj);
$("#xjfinish").html(frontdata.blz);
$("#xjhand").html(frontdata.ybj-frontdata.blz);
var dom = document.getelementbyid("tjbt");
var mychart = echarts.init(dom);
var app = {};
option = null;
app.title = '环形图';
option = {
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
series: [
{
name:'总调查数',
type:'pie',
radius: ['50%;', '30%'],
avoidlabeloverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: false,
}
},
labelline: {
normal: {
show: false
}
},
color:['#9cc3f9','#578add'],
data:[
{value:frontdata.blz, name:'办理中'},
{value:frontdata.ybj, name:'已完成'}
]
}
]
};
if (option && typeof option === "object") {
mychart.setoption(option, true);
}
}
function xjtj(){
$.ajax({
type: "get",
url: path+"/communication/api-mailbox/frontmail/selectmailhistorybydept?deptid="+_deptid,
success: function (response) {
console.log(response)
var _data=response.data;
$("#xjtotal").html(_data.total);
$("#xjfinish").html(_data.finish);
$("#xjhand").html(_data.total-_data.finish);
}
});
}
function xjlist(){
var data = {
pagenum: '1',
pagesize: '5',
sortmap: {starttime1: "desc"},
params: {
deptid: _deptid
}
}
var xqurl=""+"?id=";
jquery.support.cors = true;
$.ajax({
url: path + "/communication/api-mailbox/frontmail/maillist",
data: json.stringify(data),
type: 'post',
datatype: 'json',
contenttype: "application/json",
success: function(json) {
//console.log(json);
var _num=0;
$.each(json.data.rows, function(index, item) {
_num++;
var time=item.createtime.split(" ");
var _title=item.title;
_title=(_title.length>27)?(_title.substring(0, 27)+"..."):(_title);
var lxxd_list ='