工具-页面调整

main
ysn 1 week ago
parent c59c21e94b
commit 537f50b1be
  1. 82
      src/api/videoCommunication.js
  2. 131
      src/views/utility/index.vue

@ -1,85 +1,9 @@
import request from '@/utils/request'
// 查询会议列表
export function listMeeting(query) {
// 视讯-会议列表
export function listConsultation(query) {
return request({
url: '/videoCommunication/meeting/list',
method: 'get',
params: query
})
}
// 查询会议详情
export function getMeeting(id) {
return request({
url: '/videoCommunication/meeting/' + id,
method: 'get'
})
}
// 新增会议
export function addMeeting(data) {
return request({
url: '/videoCommunication/meeting',
method: 'post',
data: data
})
}
// 修改会议
export function updateMeeting(data) {
return request({
url: '/videoCommunication/meeting',
method: 'put',
data: data
})
}
// 删除会议
export function delMeeting(id) {
return request({
url: '/videoCommunication/meeting/' + id,
method: 'delete'
})
}
// 加入会议
export function joinMeeting(data) {
return request({
url: '/videoCommunication/meeting/join',
method: 'post',
data: data
})
}
// 开始会议
export function startMeeting(id) {
return request({
url: '/videoCommunication/meeting/start/' + id,
method: 'post'
})
}
// 结束会议
export function endMeeting(id) {
return request({
url: '/videoCommunication/meeting/end/' + id,
method: 'post'
})
}
// 获取会议回放
export function getMeetingReplay(id) {
return request({
url: '/videoCommunication/meeting/replay/' + id,
method: 'get'
})
}
// 查询会议统计
export function getMeetingStats(query) {
return request({
url: '/videoCommunication/meeting/stats',
url: '/v1/consultation/list',
method: 'get',
params: query
})

@ -1,21 +1,27 @@
<template>
<div class="app-container">
<!-- 传输管理器卡片 -->
<el-card>
<!-- 头部标题 + 清空按钮 -->
<div slot="header">
<span>传输管理器</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
icon="el-icon-delete"
@click="handleClearRecords"
>
清空记录
</el-button>
</div>
<div v-for="(dateItem, index) in transferDataList" :key="index">
<!-- 日期分割线 -->
<el-divider>
<el-tag type="info">2026-05-13</el-tag>
<el-tag type="info">{{ dateItem.date }}</el-tag>
</el-divider>
<el-table :data="fileList" :show-header="false">
<el-table-column prop="name" label="缩略图" width="80" align="center">
<!-- 传输记录表格 -->
<el-table :data="dateItem.list" :show-header="false">
<el-table-column label="缩略图标" width="80" align="center">
<template slot-scope="scope">
<div class="video-thumb">
<i class="el-icon-video-camera" />
@ -37,58 +43,76 @@
align="center"
>
<template slot-scope="scope">
<el-progress :percentage="scope.row.progress" />
<el-progress :percentage="scope.row.progress" stroke-width="8" />
</template>
</el-table-column>
<el-table-column
prop="time"
label="上传时间"
width="120"
width="100"
align="center"
show-overflow-tooltip
/>
<el-table-column
prop="status"
label="上传状态"
width="90"
width="100"
align="center"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag>
<el-tag
:type="scope.row.status === '上传成功' ? 'success' : 'warning'"
>
{{ scope.row.status }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<!-- 操作按钮 -->
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-view"
@click="handleOpen(scope.row)"
@click="handleOpenFile(scope.row)"
>
打开
</el-button>
<el-button
type="text"
icon="el-icon-folder"
@click="handleOpenPath(scope.row)"
icon="el-icon-folder-opened"
@click="handleOpenFolder(scope.row)"
>
打开位置
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
</template>
<script>
export default {
name: "TransferManager",
name: "Utility",
data() {
return {
// filePath 访
fileList: [
// +
transferDataList: [],
};
},
created() {
this.getList();
},
methods: {
//
getList() {
this.loading = true;
// listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
// (response) => {
this.transferDataList = [
{
date: "2026-05-13",
list: [
{
id: 1,
name: "1633500241136.mp4",
@ -96,19 +120,16 @@ export default {
progress: 100,
time: "14:31",
status: "上传成功",
// 使URL使D
filePath: "https://www.w3school.com.cn/i/movie.mp4",
folderPath: "D:/手机照片/风景宜人",
fileUrl: "https://www.w3school.com.cn/i/movie.mp4",
},
{
id: 2,
name: "TG-2023-01-21-215030828...",
name: "TG-2023-01-21-215030828.mp4",
size: "11.86M",
progress: 100,
time: "14:31",
status: "上传成功",
filePath: "D:/手机照片/风景宜人/1633500241136.mp4", //
folderPath: "D:/手机照片/风景宜人",
fileUrl: "https://www.w3school.com.cn/i/movie.mp4",
},
{
id: 3,
@ -117,48 +138,43 @@ export default {
progress: 100,
time: "14:16",
status: "上传成功",
filePath: "D:/手机照片/风景宜人/1633500241136.mp4", //
folderPath: "D:/手机照片/风景宜人",
fileUrl: "https://www.w3school.com.cn/i/movie.mp4",
},
],
};
},
methods: {
//
];
// this.total = response.total;
// this.loading = false;
// }
// );
},
//
handleClearRecords() {
this.$modal
.confirm("是否要清除本地传输记录?")
.then(() => {
this.fileList = [];
this.transferDataList = [];
this.$modal.msgSuccess("清空成功");
})
.catch(() => {});
},
//
// 访
handleOpen(row) {
window.open(row.filePath, "_blank");
//
handleOpenFile(row) {
if (!row.fileUrl) {
this.$modal.msgWarning("文件地址无效,无法打开");
return;
}
window.open(row.fileUrl, "_blank");
},
//
// 访
handleOpenPath(row) {
// const link = document.createElement("a");
// link.href = row.filePath;
// link.download = row.name;
// link.click();
// 4. a
const link = document.createElement("a");
link.href = row.filePath;
link.download = row.name; // +
document.body.appendChild(link);
link.click();
// 5.
document.body.removeChild(link);
window.URL.revokeObjectURL(downloadUrl);
//
this.$message.info(
"文件已开始下载,请在浏览器下载列表右键打开文件所在文件夹"
);
//
handleOpenFolder(row) {
this.$modal.msg("浏览器安全限制:请下载后在下载列表打开文件夹");
const a = document.createElement("a");
a.href = row.fileUrl;
a.download = row.name;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
},
},
};
@ -166,14 +182,15 @@ export default {
<style lang="scss" scoped>
.video-thumb {
width: 40px;
height: 40px;
border-radius: 4px;
line-height: 40px;
text-align: center;
font-size: 20px;
width: 42px;
height: 42px;
border-radius: 6px;
background: #655dd4;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
margin: 0 auto;
}
</style>
Loading…
Cancel
Save