|
|
@@ -85,7 +85,21 @@
|
|
|
<el-table-column label="大小" align="center" prop="size" />
|
|
|
<el-table-column label="截图" align="center" prop="screenshot">
|
|
|
<template #default="scope">
|
|
|
- <image-preview :src="scope.row.screenshot" style="width: 40px; height: 40px; cursor: pointer" />
|
|
|
+ <div v-if="scope.row.type === 1">
|
|
|
+ <!-- 图片类型 -->
|
|
|
+ <image-preview :src="scope.row.screenshot" style="width: 40px; height: 40px; cursor: pointer" />
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.row.type === 2">
|
|
|
+ <el-icon class="VideoPlay" @click="viewVideo(scope.row.screenshot)" size="40" style="cursor: pointer">
|
|
|
+ <VideoPlay />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.row.type === 4">
|
|
|
+ <!-- PPT类型 -->
|
|
|
+ <el-icon :size="40" @click="downloadFile(scope.row.fileUrl)" style="cursor: pointer;">
|
|
|
+ <Document />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -96,6 +110,11 @@
|
|
|
<SubmitVerifySmsb ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
|
<!-- 审批记录 -->
|
|
|
<approvalRecordSmsb ref="approvalRecordRef" />
|
|
|
+
|
|
|
+ <!-- 用于展示播放的视频 -->
|
|
|
+ <el-dialog v-model="videoDialogVisible" append-to-body>
|
|
|
+ <video width="100%" controls :src="videoUrl"></video>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -130,6 +149,8 @@ const itemPushBase = ref<ItemPushVO>();
|
|
|
const deviceList = ref<DeviceVO[]>([]);
|
|
|
const sourceList = ref<MinioDataVO[]>([]);
|
|
|
const timeList = ref<ItemPushTimeRangeVO[]>([]);
|
|
|
+const videoUrl = ref('');
|
|
|
+const videoDialogVisible = ref(false);
|
|
|
|
|
|
//提交组件
|
|
|
const submitVerifyRef = ref<InstanceType<typeof SubmitVerifySmsb>>();
|
|
|
@@ -200,7 +221,26 @@ const getInfo = () => {
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
+const viewVideo = (url: string) => {
|
|
|
+ videoUrl.value = url;
|
|
|
+ videoDialogVisible.value = true;
|
|
|
+};
|
|
|
+const downloadFile = (fileUrl) => {
|
|
|
+ if (fileUrl) {
|
|
|
+ // 创建一个隐藏的a标签来触发下载
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = fileUrl;
|
|
|
+ link.download = ''; // 浏览器会自动使用URL中的文件名
|
|
|
+ link.target = '_blank';
|
|
|
+ link.style.display = 'none';
|
|
|
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ document.body.removeChild(link);
|
|
|
+ } else {
|
|
|
+ proxy?.$modal.msgError('文件地址不存在,无法下载');
|
|
|
+ }
|
|
|
+};
|
|
|
/** 提交按钮 */
|
|
|
const submitForm = (status: string) => {
|
|
|
if (leaveTime.value.length === 0) {
|