'+comment+'
//[0,item.project_name.name,item.name,item.id,item.project_name.icon,item.desktop,
// parse.quote(item.name),item.remark,item.image_url(),item.project_name.remark,item.project_name.seq]
var table_show_list = "";
var favor_show_list = [];
var disreport =[];
var report_list =[];
var disproject =[];
var first_menu_sets = "";
var dev = '';
var nowreport = '';
var nowreportid = 0;
var nowreportflag = 10;
refresh_index();
function reset_dev() {
if(dev){
dev = ''; $('#devchange').css('color','#606266');refresh_index();
}else{dev='&dev=1';$('#devchange').css('color','red');refresh_index();}
if(nowreport){embedurl(nowreport);}
}
function gen_report_list() {
report_list =[];
$(table_show_list).each(function(index, array) {report_list.push(array[0]+array[2]);});
}
function refresh_index(){
let url = '/echart/index_api/?'+dev;
let title = $.trim($("#id_title").val());
if (title !== "") {
if(report_list.includes(title)){
if(title.slice(0,1)==='1'){
url = '/echart/tableau?type=' + title.slice(1);
}else{url = '/echart?type=' + title.slice(1); }
embedurl(url); return;}
url = url + '&s='+title;
}
$.ajax({type: "get",url: url,dataType:'json',success: function (data) {
if (data.hasOwnProperty('msg')){embedurl(data.msg); return}
table_show_list = data.show_list;
favor_show_list = [];
disreport = data.disreport;
disproject = data.disproject;
let tmplist = [];
let favorlist =[];
first_menu_sets = new Map();
first_menu_sets.set('我的关注',favorlist);
//[projecticon,reportname,reportname,reporttype,projectremark,reportid]
$(table_show_list).each(function(index, array) {
if (first_menu_sets.has(array[1])){
tmplist = first_menu_sets.get(array[1]);
tmplist.push([array[4],array[2],array[2],array[0],array[9],array[3]]);
} else {
tmplist = [[array[4],array[2],array[2],array[0],array[9],array[3]]];
}
first_menu_sets.set(array[1], tmplist);
if(disreport.includes(array[3])){
favor_show_list.push(array);
favorlist.push(['iconfont ic-paid1',array[2],array[2],array[0],'smartchart.cn',array[3]]);
}
});
if(favorlist.length===0){favorlist=[['iconfont ic-paid1','no_favorite','Contact',0,'smartchart.cn',-1]];}
if(dev){
favorlist.push(['iconfont ic-paid1','/admin/echart/echartdashboardsetup_v2/add/?','新增Dashboard',2,'新增图形集装箱',-1]);
favorlist.push(['iconfont ic-paid1','/admin/echart/echartdataset/?','浏览数据集',2,'浏览数据集',-1]);
}
first_menu_sets.set('我的关注',favorlist);
$("#show_list").html("");
first_menu_sets.forEach(generate_first_menu);
generate_favor();
if (title ===''){gen_report_list();}
}})}
function help() {
$("#tbshow_list").html(
`
SmartChart 窗口显示报表: 点击左方菜单中项目名,显示报表列表后点击列表中链接 右方显示报表: 左方菜单中滑动选择报表后点击 或 上方搜索选择随机报表后点击查询
'+comment+'