受众的接口处理

This commit is contained in:
daihh
2023-02-21 11:56:06 +08:00
parent 6fcbe1408c
commit 3f389b7c8a
3 changed files with 32 additions and 15 deletions

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;
//计算总页面
}
})