Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal

This commit is contained in:
dongruihua
2023-02-21 12:04:06 +08:00
3 changed files with 32 additions and 15 deletions

View File

@@ -40,6 +40,13 @@ const getUserCrowds = function() {
return ajax.postJson(baseURL,'/audience/userAudiences',{}); return ajax.postJson(baseURL,'/audience/userAudiences',{});
} }
/**
* 获取用户过滤后的受众,只是查询已发布的
* {"page":1,pageSize:100,"keyword":""}
*/
const getUserAudiences = function(data) {
return ajax.postJson(baseURL,'/audience/userAudiencesFilter',data);
}
/** /**
* 获取hrbp数据 * 获取hrbp数据
@@ -63,6 +70,7 @@ export default {
findOrgTreeByOrgId, findOrgTreeByOrgId,
getUserInfoById, getUserInfoById,
getUserCrowds, getUserCrowds,
getUserAudiences,
getOrgHrbpInfo, getOrgHrbpInfo,
modifyPassword modifyPassword
} }

View File

@@ -606,6 +606,11 @@ export default {
}), }),
loadUserGroup(){ loadUserGroup(){
let $this=this; let $this=this;
let params = {
keyword:'',
page:1,
pageSize:1000
}
// apiUserGroup.findByName('').then(rs=>{ // apiUserGroup.findByName('').then(rs=>{
// if(rs.status==200){ // if(rs.status==200){
// let crowdList=[]; // let crowdList=[];
@@ -619,10 +624,10 @@ export default {
// this.userGroupList=crowdList; // this.userGroupList=crowdList;
// } // }
// }); // });
apiUserBasic.getUserCrowds().then(rs=>{ apiUserBasic.getUserAudiences(params).then(rs=>{
if(rs.status==200){ if(rs.status==200){
let crowdList=[]; let crowdList=[];
rs.result.forEach(item=>{ rs.result.audienceList.forEach(item=>{
crowdList.push({ crowdList.push({
id:item.id, id:item.id,
name:item.audienceName, name:item.audienceName,

View File

@@ -628,10 +628,10 @@
<span v-if="scope.row.status == 0">未发布</span> <span v-if="scope.row.status == 0">未发布</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="gtype" label="类型" width="80px" align="center"> <el-table-column prop="type" label="类型" width="80px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.gtype == 1">普通受众</span> <span v-if="scope.row.type == 1">普通受众</span>
<span v-if="scope.row.gtype == 2">自动受众</span> <span v-if="scope.row.type == 2">自动受众</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -861,12 +861,11 @@ export default {
this.pushLoading=false; this.pushLoading=false;
}, },
getUserGroup(){ getUserGroup(){
// let params = { let params = {
// status:'1', keyword:this.pushData.keyword,
// name:this.pushData.keyword, page:this.pushData.pageIndex,
// pageIndex:this.pushData.pageIndex, pageSize:this.pushData.pageSize
// pageSize:this.pushData.pageSize }
// }
// usergroupApi.list(params).then((res) => { // usergroupApi.list(params).then((res) => {
// if (res.status == 200) { // if (res.status == 200) {
// this.pushData.data = res.result.list; // this.pushData.data = res.result.list;
@@ -874,19 +873,24 @@ export default {
// } // }
// }); // });
//从接口中获取受众数据,22/11/28 //从接口中获取受众数据,22/11/28
apiUserBasic.getUserCrowds().then(res=>{ apiUserBasic.getUserAudiences(params).then(res=>{
if(res.status==200){ if(res.status==200){
let list=[]; let list=[];
res.result.forEach(crowd=>{ this.pushData.count = res.result.totalElement;
res.result.audienceList.forEach(crowd=>{
list.push({ list.push({
id:crowd.id, id:crowd.id,
kid:crowd.kid, kid:crowd.kid,
name:crowd.audienceName, name:crowd.audienceName,
sysCreateTime:crowd.createAt,
audienceType:crowd.audienceType, audienceType:crowd.audienceType,
type:crowd.type users:crowd.totalMember,
type:crowd.type,
status:crowd.status
}) })
}); });
this.pushData.data=list this.pushData.data=list;
//计算总页面
} }
}) })