席位管理

This commit is contained in:
liuye
2023-08-14 11:04:45 +08:00
parent c99a9a1332
commit ed4b58e215

View File

@@ -39,6 +39,11 @@
@closed="dialog=false" :customFooter="false"> @closed="dialog=false" :customFooter="false">
<ai-table :tableData="tableDataGroup" :total="totalGroup" :current.sync="searchGroup.current" :size.sync="searchGroup.size" <ai-table :tableData="tableDataGroup" :total="totalGroup" :current.sync="searchGroup.current" :size.sync="searchGroup.size"
@getList="getTableDataGroup()" :col-configs="colConfigsGroup"> @getList="getTableDataGroup()" :col-configs="colConfigsGroup">
<el-table-column slot="avatar" label="群聊头像" align="left">
<template slot-scope="{ row }">
<img :src="row.avatar" alt="" class="group-avatar">
</template>
</el-table-column>
</ai-table> </ai-table>
</ai-dialog> </ai-dialog>
</section> </section>
@@ -78,7 +83,9 @@ export default {
} }
}, },
created() { created() {
this.getConfigList() this.dict.load('yesOrNo').then(() => {
this.getConfigList()
})
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
@@ -94,7 +101,10 @@ export default {
}, },
colConfigsGroup() { colConfigsGroup() {
return [ return [
{ prop: "nickname", label: '群名称'}, { slot: "avatar", label: '群聊头像'},
{ prop: "nickname", label: '群聊名称', align: 'center'},
{ prop: "is_manager", label: '是否管理员', dict: 'yesOrNo', align: 'center'},
{ prop: "num", label: '群聊成员(人数)', align: 'center'},
// { prop: "phone", label: '群主'}, // { prop: "phone", label: '群主'},
] ]
}, },
@@ -152,7 +162,11 @@ export default {
} }
}).then(res => { }).then(res => {
if(res?.data) { if(res?.data) {
this.tableDataGroup = res.data.records console.log(JSON.parse(res.data))
this.tableDataGroup = JSON.parse(res.data)
this.tableDataGroup.map((item) => {
item.num = item.member_list.length
})
this.totalGroup = res.data.total this.totalGroup = res.data.total
} }
}) })
@@ -191,5 +205,10 @@ export default {
font-size: 14px; font-size: 14px;
margin-left: 16px; margin-left: 16px;
} }
.group-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
}
} }
</style> </style>