u
This commit is contained in:
1 parent
35951777b0
commit
63f1d4d1dc
39 files changed
+880
-133
No files matched your search
@@ -0,0 +1,67 @@
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useUserStore } from '@/stores/userStore'
|
||||
import { axiosGet, axiosPost } from '@/utils/axios'
|
||||
import { useWebSocket } from '../../stores/websocketStore'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const websocket = useWebSocket()
|
||||
|
||||
const tableData = ref([])
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const res = await axiosGet('/loadCompanyList')
|
||||
tableData.value = res.data
|
||||
}
|
||||
catch (err) {
|
||||
ElMessage.error(`请求错误:${err.response?.data?.message || err.message}`)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="home-container">
|
||||
<div class="welcome">
|
||||
{{ userStore.userInfo.username }},欢迎登录
|
||||
</div>
|
||||
<div class="home-header">
|
||||
IM 聊天列表(支持多公司,单公司聊天)
|
||||
</div>
|
||||
<el-table :data="tableData" border stripe style="width: 50%;">
|
||||
<el-table-column prop="b_name" label="用户名称" />
|
||||
<el-table-column prop="_online" label="在线状态" />
|
||||
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button v-if="userStore.userInfo.userid !== scope.row.b_id" link type="primary" size="small">
|
||||
聊天
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.home-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 40px 20px;
|
||||
}
|
||||
|
||||
.welcome {
|
||||
font-size: 16px;
|
||||
color: #555;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.home-header {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 24px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user