2025-10-14
发送图片
This commit is contained in:
@@ -6,43 +6,43 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 统计卡片 -->
|
<!-- 统计卡片 -->
|
||||||
<!-- <el-card class="stats-card">-->
|
<!-- <el-card class="stats-card">-->
|
||||||
<!-- <el-row :gutter="24" class="stats-row">-->
|
<!-- <el-row :gutter="24" class="stats-row">-->
|
||||||
<!-- <el-col :span="8">-->
|
<!-- <el-col :span="8">-->
|
||||||
<!-- <el-card class="stat-card">-->
|
<!-- <el-card class="stat-card">-->
|
||||||
<!-- <div class="stat-content">-->
|
<!-- <div class="stat-content">-->
|
||||||
<!-- <div class="stat-number">{{ stats.totalTransfers }}</div>-->
|
<!-- <div class="stat-number">{{ stats.totalTransfers }}</div>-->
|
||||||
<!-- <div class="stat-label">总转账数</div>-->
|
<!-- <div class="stat-label">总转账数</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- <el-icon class="stat-icon">-->
|
<!-- <el-icon class="stat-icon">-->
|
||||||
<!-- <Money/>-->
|
<!-- <Money/>-->
|
||||||
<!-- </el-icon>-->
|
<!-- </el-icon>-->
|
||||||
<!-- </el-card>-->
|
<!-- </el-card>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="8">-->
|
<!-- <el-col :span="8">-->
|
||||||
<!-- <el-card class="stat-card">-->
|
<!-- <el-card class="stat-card">-->
|
||||||
<!-- <div class="stat-content">-->
|
<!-- <div class="stat-content">-->
|
||||||
<!-- <div class="stat-number">{{ stats.confirmedTransfers }}</div>-->
|
<!-- <div class="stat-number">{{ stats.confirmedTransfers }}</div>-->
|
||||||
<!-- <div class="stat-label">已确认</div>-->
|
<!-- <div class="stat-label">已确认</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- <el-icon class="stat-icon">-->
|
<!-- <el-icon class="stat-icon">-->
|
||||||
<!-- <Check/>-->
|
<!-- <Check/>-->
|
||||||
<!-- </el-icon>-->
|
<!-- </el-icon>-->
|
||||||
<!-- </el-card>-->
|
<!-- </el-card>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="8">-->
|
<!-- <el-col :span="8">-->
|
||||||
<!-- <el-card class="stat-card">-->
|
<!-- <el-card class="stat-card">-->
|
||||||
<!-- <div class="stat-content">-->
|
<!-- <div class="stat-content">-->
|
||||||
<!-- <div class="stat-number">¥{{ stats.totalAmount }}</div>-->
|
<!-- <div class="stat-number">¥{{ stats.totalAmount }}</div>-->
|
||||||
<!-- <div class="stat-label">总欠额</div>-->
|
<!-- <div class="stat-label">总欠额</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- <el-icon class="stat-icon">-->
|
<!-- <el-icon class="stat-icon">-->
|
||||||
<!-- <Wallet/>-->
|
<!-- <Wallet/>-->
|
||||||
<!-- </el-icon>-->
|
<!-- </el-icon>-->
|
||||||
<!-- </el-card>-->
|
<!-- </el-card>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
<!-- </el-card>-->
|
<!-- </el-card>-->
|
||||||
|
|
||||||
<!-- 筛选和操作 -->
|
<!-- 筛选和操作 -->
|
||||||
<el-card class="filter-card">
|
<el-card class="filter-card">
|
||||||
@@ -107,16 +107,16 @@
|
|||||||
<!-- >修改-->
|
<!-- >修改-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- type="danger"-->
|
<!-- type="danger"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="Delete"-->
|
<!-- icon="Delete"-->
|
||||||
<!-- :disabled="single"-->
|
<!-- :disabled="single"-->
|
||||||
<!-- @click="handleDelete"-->
|
<!-- @click="handleDelete"-->
|
||||||
<!-- >删除-->
|
<!-- >删除-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
<!-- <el-button link type="primary" icon="Document" @click="handleDetail(scope.row)">详情</el-button>-->
|
<!-- <el-button link type="primary" icon="Document" @click="handleDetail(scope.row)">详情</el-button>-->
|
||||||
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>-->
|
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>-->
|
||||||
<el-button link type="primary" :icon="inChatSvg" @click="handleChat(scope.row)">进入聊天</el-button>
|
<el-button link type="primary" :icon="inChatSvg" @click="handleChat(scope.row)">进入聊天</el-button>
|
||||||
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>-->
|
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -279,7 +279,23 @@
|
|||||||
:rows="3"
|
:rows="3"
|
||||||
placeholder="请输入消息..."
|
placeholder="请输入消息..."
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button type="primary" @click="handleSendMsg">发送</el-button>
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-upload
|
||||||
|
action="/mid/upload/image"
|
||||||
|
:headers="headers"
|
||||||
|
:on-success="uploadSuccess"
|
||||||
|
:on-error="uploadError"
|
||||||
|
:show-file-list="false"
|
||||||
|
accept="image/png, image/jpeg"
|
||||||
|
:limit="1">
|
||||||
|
<el-button type="primary">发送图片</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button type="primary" @click="handleSendMsg">发送</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -302,6 +318,9 @@ import {io} from 'socket.io-client';
|
|||||||
|
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const headers = {
|
||||||
|
Authorization: `Bearer ${userStore.token}`
|
||||||
|
}
|
||||||
|
|
||||||
// 统计
|
// 统计
|
||||||
const stats = ref({
|
const stats = ref({
|
||||||
@@ -557,6 +576,20 @@ const handleSendMsg = () => {
|
|||||||
inputText.value = ''
|
inputText.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uploadSuccess = (res) => {
|
||||||
|
socket.value.emit('clientMsg', {
|
||||||
|
groupId: params.value.groupId,
|
||||||
|
createId: userStore.user.id,
|
||||||
|
content: res.data.url,
|
||||||
|
type: 'img'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadError = (res) => {
|
||||||
|
const result = JSON.parse(res.message)
|
||||||
|
ElMessage.error(result.message)
|
||||||
|
}
|
||||||
|
|
||||||
// 头像字
|
// 头像字
|
||||||
const getRoleInitial = (createId) => {
|
const getRoleInitial = (createId) => {
|
||||||
if (messageUserId.value === createId) {
|
if (messageUserId.value === createId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user