/**本地缓存 */ var SessionOperation = { type:'session', setType:function(){ if(this.type == 'session'){ return window.sessionStorage; } if(this.type == 'local'){ return window.localStorage; } console.log('类型错误!'); }, set:function($key,$value){ this.setType().setItem($key,$value); }, get:function($key){ return this.setType().getItem($key) }, clearAll:function(){ if(this.type == 'session'){ window.sessionStorage.clear(); } if(this.type == 'local'){ window.localStorage.clear(); } console.log('类型错误!'); }, setToken:function(token){ this.set("TOKEN", token); }, getToken:function(){ return this.get("TOKEN"); }, setUserId:function(userId){ this.set("userId", userId); }, getUserId:function(){ return this.get("userId"); }, setPersonnelId:function(personnelId){ this.set("personnelId", personnelId); }, getPersonnelId:function(){ return this.get("personnelId"); }, setUserDeps:function(userDeps){ this.set("UserDeps", userDeps); }, getUserDeps:function(){ return this.get("UserDeps"); }, setRealName:function(realname){ this.set("RealName", realname); }, getRealName:function(){ return this.get("RealName"); }, setUserName:function(username){ this.set("UserName", username); }, getUserName:function(){ return this.get("UserName"); }, setOrgnizeId(id){ this.set("OrgnizeId", id); }, getOrgnizeId(){ return this.get("OrgnizeId"); }, setOrgnizeName(name){ this.set("OrgnizeName", name); }, getOrgnizeName(){ return this.get("OrgnizeName"); } }; function getQueryVariable(variable){ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i= DataList.length){ pageSize = initSize; pageIndex = 0; } let lsit = DataList.slice(pageIndex, pageSize); // console.log(pageIndex+"---1---"+pageSize); pageIndex = pageSize; pageSize = pageSize + initSize; let map = {} for(let key in lsit) { map[lsit[key][0]] = lsit[key][1]; } ChartsService.initCommonBar(chartsID,map,grid); } function beginFunA(chartsID,dataMap,autoTime,timeName,grid){ return function(){autoInitDateA(chartsID,dataMap,autoTime,timeName,grid)} } function autoInitDateA(chartsID,dataMap,autoTime,timeName,grid){ let DataListA = []; for(let key in dataMap) { DataListA.push([key, dataMap[key]]); } if(DataListA.length < 1){ return; } let lsitA = DataListA.slice(pageIndexA, pageSizeA); pageIndexA = pageSizeA; pageSizeA = pageSizeA + initSize; let map = {} for(let key in lsitA) { map[lsitA[key][0]] = lsitA[key][1]; } ChartsService.initCommonBar(chartsID,map,grid); if(DataListA.length <= initSize){ return; } timeName = setInterval(beginFun2A(chartsID,DataListA,timeName,grid),autoTime); } function beginFun2A(chartsID,DataListA,timeName,grid){ return function(){autoLoadDateA(chartsID,DataListA,timeName,grid)} } function autoLoadDateA(chartsID,DataListA,timeName,grid){ if(DataListA.length <= initSize){ clearInterval(timeName); } if(pageIndexA >= DataListA.length){ pageSizeA = initSize; pageIndexA = 0; } let lsitA = DataListA.slice(pageIndexA, pageSizeA); // console.log(pageIndexA+"---2---"+pageSizeA); pageIndexA = pageSizeA; pageSizeA = pageSizeA + initSize; let map = {} for(let key in lsitA) { map[lsitA[key][0]] = lsitA[key][1]; } ChartsService.initCommonBar(chartsID,map,grid); } //map型看板滚动 //-------------------结束-----------------------