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

View File

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

View File

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