席位管理
This commit is contained in:
		| @@ -39,6 +39,11 @@ | ||||
|       @closed="dialog=false" :customFooter="false"> | ||||
|         <ai-table :tableData="tableDataGroup" :total="totalGroup" :current.sync="searchGroup.current" :size.sync="searchGroup.size" | ||||
|           @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-dialog> | ||||
|   </section> | ||||
| @@ -78,7 +83,9 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getConfigList() | ||||
|     this.dict.load('yesOrNo').then(() => { | ||||
|       this.getConfigList() | ||||
|     }) | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
| @@ -94,7 +101,10 @@ export default { | ||||
|     }, | ||||
|     colConfigsGroup() { | ||||
|       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: '群主'}, | ||||
|       ] | ||||
|     }, | ||||
| @@ -152,7 +162,11 @@ export default { | ||||
|         } | ||||
|       }).then(res => { | ||||
|         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 | ||||
|         } | ||||
|       }) | ||||
| @@ -191,5 +205,10 @@ export default { | ||||
|     font-size: 14px; | ||||
|     margin-left: 16px; | ||||
|   } | ||||
|   .group-avatar { | ||||
|     width: 50px; | ||||
|     height: 50px; | ||||
|     border-radius: 50%; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user