|
@@ -0,0 +1,513 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="questionsAndAnswers">
|
|
|
|
|
+ <div class="qaa_title">{{ work.answerQ }}</div>
|
|
|
|
|
+ <div class="qaa_img" v-if="work.imageList && work.imageList.length > 0">
|
|
|
|
|
+ <div v-for="(item, index) in work.imageList" :key="index">
|
|
|
|
|
+ <img :src="item.url" alt="" @click="$hevueImgPreview(item.url)">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="qaa_type">{{ lang.ssFile }}</div>
|
|
|
|
|
+ <!-- 文件列表 -->
|
|
|
|
|
+ <div class="imageList" v-if="work.fileList && work.fileList.length > 0">
|
|
|
|
|
+ <div v-for="(file, fileIndex) in work.fileList" :key="fileIndex" class="image-item" @click="previewFile(file)">
|
|
|
|
|
+ <!-- 图片:缩略图 -->
|
|
|
|
|
+ <el-image v-if="isImage(file.url)" style="width: 100px; height: 100px" :src="file.url" fit="cover"></el-image>
|
|
|
|
|
+ <!-- 视频:缩略图 + 播放按钮 -->
|
|
|
|
|
+ <div v-else-if="isVideo(file.url)" class="video-thumb">
|
|
|
|
|
+ <video :src="file.url" muted></video>
|
|
|
|
|
+ <div class="play-btn">
|
|
|
|
|
+ <svg viewBox="0 0 24 24" width="32" height="32" fill="#fff"><path d="M8 5v14l11-7z"></path></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 其他文件:图标 + 文件名 -->
|
|
|
|
|
+ <div v-else class="file-thumb">
|
|
|
|
|
+ <svg viewBox="0 0 24 24" width="48" height="48" fill="currentColor">
|
|
|
|
|
+ <path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"></path>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <div class="file-name">{{ getFileName(file.url) }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg class="delete-icon" @click.stop="delImage(fileIndex)" t="1774237005199" viewBox="0 0 1024 1024" width="20" height="20">
|
|
|
|
|
+ <path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM305.956571 370.395429L447.488 512 305.956571 653.604571a45.568 45.568 0 1 0 64.438858 64.438858L512 576.512l141.604571 141.531429a45.568 45.568 0 0 0 64.438858-64.438858L576.512 512l141.531429-141.604571a45.568 45.568 0 1 0-64.438858-64.438858L512 447.488 370.395429 305.956571a45.568 45.568 0 0 0-64.438858 64.438858z" fill="#FF2525" p-id="4716"></path>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 文件预览弹窗 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ :visible.sync="previewVisible"
|
|
|
|
|
+ :append-to-body="true"
|
|
|
|
|
+ :show-close="true"
|
|
|
|
|
+ custom-class="filePreviewDialog"
|
|
|
|
|
+ width="80%"
|
|
|
|
|
+ @closed="onPreviewClosed"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="previewBody" v-if="currentFile">
|
|
|
|
|
+ <!-- 图片预览 -->
|
|
|
|
|
+ <img v-if="isImage(currentFile.url)" :src="currentFile.url" class="previewImg" />
|
|
|
|
|
+ <!-- 视频预览 -->
|
|
|
|
|
+ <video v-else-if="isVideo(currentFile.url)" :src="currentFile.url" controls autoplay class="previewVideo"></video>
|
|
|
|
|
+ <!-- Word/PPT/Excel 预览 -->
|
|
|
|
|
+ <iframe v-else-if="isOffice(currentFile.url)" :src="officePreviewUrl" class="previewIframe" frameborder="0" allowfullscreen></iframe>
|
|
|
|
|
+ <!-- PDF 预览 -->
|
|
|
|
|
+ <iframe v-else-if="isPdf(currentFile.url)" :src="pdfPreviewUrl" class="previewIframe" frameborder="0" allowfullscreen></iframe>
|
|
|
|
|
+ <!-- 不支持预览:下载 -->
|
|
|
|
|
+ <div v-else class="unsupportedBox">
|
|
|
|
|
+ <div class="unsupportedTip">{{ lang.ssUnsupportedFile }}</div>
|
|
|
|
|
+ <a :href="currentFile.url" download class="downloadBtn">{{ lang.ssDownloadFile }}</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 操作按钮区域 -->
|
|
|
|
|
+ <div class="upload-area" v-if="!work.fileList || work.fileList.length == 0">
|
|
|
|
|
+ <button class="photo-btn" @click="uploadImage" v-loading="uploadLoading">
|
|
|
|
|
+ <span class="plus-icon">+</span>
|
|
|
|
|
+ <span>{{ lang.ssUpload }}</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import { uploadOneFile } from '@/components/tools/uploadFile'
|
|
|
|
|
+export default {
|
|
|
|
|
+ props: {
|
|
|
|
|
+ workData: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default: () => {
|
|
|
|
|
+ return {};
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ work: {
|
|
|
|
|
+ fileList: []
|
|
|
|
|
+ },
|
|
|
|
|
+ recordObj: {},
|
|
|
|
|
+ isMobile: false,
|
|
|
|
|
+ uploadLoading: false,
|
|
|
|
|
+ previewVisible: false,
|
|
|
|
|
+ currentFile: null
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ officePreviewUrl() {
|
|
|
|
|
+ if (!this.currentFile) return "";
|
|
|
|
|
+ return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(this.currentFile.url)}&time=${new Date().getTime()}`;
|
|
|
|
|
+ // return `https://view.officeapps.live.com/op/view.aspx?src=${this.currentFile.url)}&time=${new Date().getTime()}`;
|
|
|
|
|
+ },
|
|
|
|
|
+ pdfPreviewUrl() {
|
|
|
|
|
+ if (!this.currentFile) return "";
|
|
|
|
|
+ return `https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=${encodeURIComponent(this.currentFile.url)}&time=${new Date().getTime()}`;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ work: {
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ handler(newValue) {
|
|
|
|
|
+ if (JSON.stringify(newValue) != JSON.stringify(this.workData.json)) {
|
|
|
|
|
+ this.changeWorkData(newValue);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ workData: {
|
|
|
|
|
+ handler: function (newValue, oldValue) {
|
|
|
|
|
+ let _data = JSON.parse(JSON.stringify(this.workData.json));
|
|
|
|
|
+ if (JSON.stringify(newValue) != JSON.stringify(oldValue) || JSON.stringify(this.work) != JSON.stringify(_data)) {
|
|
|
|
|
+ let _data = JSON.parse(JSON.stringify(this.workData.json));
|
|
|
|
|
+ if (!_data.fileList) {
|
|
|
|
|
+ _data.fileList = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ this.work = _data;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ changeWorkData(newValue) {
|
|
|
|
|
+ this.$emit("changeWorkData", JSON.stringify(newValue));
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取文件扩展名
|
|
|
|
|
+ getFileExt(url) {
|
|
|
|
|
+ if (!url) return "";
|
|
|
|
|
+ return (url.split("?")[0].split("#")[0].split(".").pop() || "").toLowerCase();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取文件名
|
|
|
|
|
+ getFileName(url) {
|
|
|
|
|
+ if (!url) return "";
|
|
|
|
|
+ return decodeURIComponent(url.split("?")[0].split("#")[0].split("/").pop() || url);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断是否为图片
|
|
|
|
|
+ isImage(url) {
|
|
|
|
|
+ return ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg"].includes(this.getFileExt(url));
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断是否为视频
|
|
|
|
|
+ isVideo(url) {
|
|
|
|
|
+ return ["mp4", "webm", "ogg", "mov", "avi", "wmv", "flv", "m4v", "mkv"].includes(this.getFileExt(url));
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断是否为 Office 文档(Word/Excel/PPT)
|
|
|
|
|
+ isOffice(url) {
|
|
|
|
|
+ return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url));
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断是否为 PDF
|
|
|
|
|
+ isPdf(url) {
|
|
|
|
|
+ return this.getFileExt(url) === "pdf";
|
|
|
|
|
+ },
|
|
|
|
|
+ // 打开预览弹窗
|
|
|
|
|
+ previewFile(file) {
|
|
|
|
|
+ this.currentFile = file;
|
|
|
|
|
+ this.previewVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 预览弹窗关闭后清理
|
|
|
|
|
+ onPreviewClosed() {
|
|
|
|
|
+ this.currentFile = null;
|
|
|
|
|
+ },
|
|
|
|
|
+ takePhoto() {
|
|
|
|
|
+ const input = document.createElement('input');
|
|
|
|
|
+ input.type = 'file';
|
|
|
|
|
+ input.accept = 'image/*';
|
|
|
|
|
+ input.capture = 'environment';
|
|
|
|
|
+ input.click();
|
|
|
|
|
+ input.onchange = (e) => {
|
|
|
|
|
+ if (e.target.files[0]) {
|
|
|
|
|
+ uploadOneFile(e.target.files[0]).then(res => {
|
|
|
|
|
+ res.src = res.url;
|
|
|
|
|
+ this.work.fileList = [...this.work.fileList, res];
|
|
|
|
|
+ this.changeWorkData(this.work);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ uploadImage() {
|
|
|
|
|
+ if(this.uploadLoading){
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const input = document.createElement('input');
|
|
|
|
|
+ input.type = 'file';
|
|
|
|
|
+ input.accept = '*';
|
|
|
|
|
+ input.multiple = true;
|
|
|
|
|
+ input.click();
|
|
|
|
|
+ input.onchange = (e) => {
|
|
|
|
|
+ const files = e.target.files;
|
|
|
|
|
+ if (files.length > 1){
|
|
|
|
|
+ this.$message.error(this.lang.ssOnlyUploadOneFile);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (files && files.length > 0) {
|
|
|
|
|
+ // 限制文件大小不超过20MB
|
|
|
|
|
+ // const maxSize = 20 * 1024 * 1024; // 20MB
|
|
|
|
|
+ // for (let i = 0; i < files.length; i++) {
|
|
|
|
|
+ // if (files[i].size > maxSize) {
|
|
|
|
|
+ // this.$message.error(this.lang.ssFileTooBig);
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.uploadLoading = true;
|
|
|
|
|
+ const uploadPromises = [];
|
|
|
|
|
+ for (let i = 0; i < files.length; i++) {
|
|
|
|
|
+ uploadPromises.push(uploadOneFile(files[i]));
|
|
|
|
|
+ }
|
|
|
|
|
+ Promise.all(uploadPromises).then(results => {
|
|
|
|
|
+ const newImages = results.map(res => ({ ...res, src: res.url }));
|
|
|
|
|
+ this.work.fileList = [...this.work.fileList, ...newImages];
|
|
|
|
|
+ this.uploadLoading = false;
|
|
|
|
|
+ this.changeWorkData(this.work);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ delImage(index) {
|
|
|
|
|
+ this.work.fileList.splice(index, 1);
|
|
|
|
|
+ this.changeWorkData(this.work);
|
|
|
|
|
+ },
|
|
|
|
|
+ checkMobile() {
|
|
|
|
|
+ const ua = navigator.userAgent;
|
|
|
|
|
+ const isMobileDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Android/i.test(ua);
|
|
|
|
|
+ const isTablet = /iPad|Android(?!.*Mobile)/i.test(ua);
|
|
|
|
|
+ this.isMobile = isMobileDevice || isTablet;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.checkMobile();
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeUnmount() {
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.questionsAndAnswers {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 70px 10%;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qaa_title {
|
|
|
|
|
+ font-size: 2rem;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qaa_img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qaa_img>div {
|
|
|
|
|
+ max-width: 200px;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ margin: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qaa_img>div>img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ object-fit: cover;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qaa_type {
|
|
|
|
|
+ margin: 20px 0 40px 0;
|
|
|
|
|
+ font-size: 1rem;
|
|
|
|
|
+ color: #808080;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.imageList {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 16px;
|
|
|
|
|
+ margin-bottom: 30px;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.image-item {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.video-thumb {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ background: #000;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.video-thumb video {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ object-fit: cover;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.play-btn {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ top: 50%;
|
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
|
+ width: 32px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.file-thumb {
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: #3681FC;
|
|
|
|
|
+ padding: 8px 4px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.file-name {
|
|
|
|
|
+ margin-top: 4px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ word-break: break-all;
|
|
|
|
|
+ display: -webkit-box;
|
|
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.delete-icon {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -10px;
|
|
|
|
|
+ right: -10px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.delete-text {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+ color: #FF2525;
|
|
|
|
|
+ font-size: .9rem;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-area {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.photo-btn {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ padding: 12px 32px;
|
|
|
|
|
+ border: 2px solid #FF9500;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ color: #FF9500;
|
|
|
|
|
+ font-size: 1rem;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ transition: all 0.3s;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.photo-btn:hover {
|
|
|
|
|
+ background-color: #fff8f0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.photo-btn + .photo-btn {
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.plus-icon {
|
|
|
|
|
+ font-size: 1.2rem;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-btn {
|
|
|
|
|
+ color: #67C23A;
|
|
|
|
|
+ font-size: 1rem;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ transition: color 0.3s;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-btn:hover {
|
|
|
|
|
+ color: #85CE61;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 文件预览弹窗 */
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog {
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ box-shadow: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog__header {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog__headerbtn {
|
|
|
|
|
+ top: -2.5rem;
|
|
|
|
|
+ right: -2.5rem;
|
|
|
|
|
+ width: 2.5rem;
|
|
|
|
|
+ height: 2.5rem;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ z-index: 10;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog__close {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-size: 1.5rem;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog__body {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.filePreviewDialog >>> .el-dialog__headerbtn:hover .el-dialog__close {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.previewBody {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background: #000;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ min-height: 400px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.previewImg {
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+ max-height: 80vh;
|
|
|
|
|
+ object-fit: contain;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.previewVideo {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ max-height: 80vh;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.previewIframe {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 80vh;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.unsupportedBox {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: 1rem;
|
|
|
|
|
+ padding: 3rem 1rem;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #000;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.unsupportedTip {
|
|
|
|
|
+ font-size: 1rem;
|
|
|
|
|
+ color: #bbb;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.downloadBtn {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ padding: 0.5rem 1.5rem;
|
|
|
|
|
+ background: #3681FC;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ text-decoration: none;
|
|
|
|
|
+ font-size: 0.875rem;
|
|
|
|
|
+ transition: opacity 0.2s;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.downloadBtn:hover {
|
|
|
|
|
+ opacity: 0.85;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|