|
@@ -92,7 +92,6 @@ var cloudService={
|
|
|
|
|
|
//console.log(compilationList);
|
|
|
|
|
|
-
|
|
|
//数据组合--cld客户数据
|
|
|
var cid=[];
|
|
|
curingCloudList.forEach(function(v,i){
|
|
@@ -143,7 +142,6 @@ var cloudService={
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
});
|
|
@@ -157,60 +155,6 @@ var cloudService={
|
|
|
|
|
|
|
|
|
return {curingList:curingCloudList,pageData:pageData};
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //获得本地用户
|
|
|
- /*var limit=12;
|
|
|
- var offset=0;
|
|
|
- if(page!=1){
|
|
|
- var pg=page-1;
|
|
|
- offset=pg*limit;
|
|
|
- }
|
|
|
-
|
|
|
- var option={offset: offset,
|
|
|
- limit: limit,
|
|
|
- raw:true,
|
|
|
- order:[['id','desc']]};
|
|
|
- if(hash.isExistence(compilation_id)){
|
|
|
- option.where={compilation_id: compilation_id};
|
|
|
- }
|
|
|
-
|
|
|
- var curingList = await models.cloud_curing.findAll(option);
|
|
|
- var parameter='?compilation_id='+compilation_id;
|
|
|
- //分页计算
|
|
|
- var pageData = await getPage(models.cloud_curing,option.where,page,limit,parameter);
|
|
|
-
|
|
|
-
|
|
|
- //数据组合--cld客户数据
|
|
|
- var cid=[];
|
|
|
- curingList.forEach(function(v,i){
|
|
|
- cid.push(v.client_id);
|
|
|
- });
|
|
|
- var attributes= ['cid', 'clientname', 'companyid', 'companyname'];
|
|
|
- var clientList = await models.CLD_client.findAllInCid(cid,attributes);
|
|
|
-
|
|
|
-
|
|
|
- //组合页面需要展示的数据
|
|
|
- curingList.forEach(function(v,i){
|
|
|
- curingList[i].clientInfo={};
|
|
|
- clientList.forEach(function(clientVal,clientI){
|
|
|
- if(v.client_id==clientVal.cid){
|
|
|
- curingList[i].clientInfo=clientVal;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- curingList[i].addtime=moment.unix(v.addtime).format('YYYY-MM-DD HH:mm');
|
|
|
- curingList[i].id=hash.hashEncode(v.id.toString());
|
|
|
- curingList[i].client_id=hash.hashEncode(v.client_id.toString());
|
|
|
- curingList[i].sso_id=v.sso_id;
|
|
|
- });
|
|
|
- //curingList['pageData']=pageData;
|
|
|
-
|
|
|
- return {curingList:curingList,pageData:pageData};*/
|
|
|
},
|
|
|
|
|
|
//获得本地编办列表
|
|
@@ -537,6 +481,10 @@ var getPage= async function(modelsTable,where,currentPage,pageSize,parameter,tot
|
|
|
}
|
|
|
var totalPage = (totalCount % pageSize) == 0 ? total : total + 1;
|
|
|
|
|
|
+ //开始页数
|
|
|
+ //var startPage=
|
|
|
+ //结束页数
|
|
|
+
|
|
|
var page={
|
|
|
'currentPage':currentPage, //当前页
|
|
|
'previousPage':currentPage!=0?currentPage-1:currentPage, //上一页
|