|
@@ -1,282 +1,205 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div style="padding-right: 5px">
|
|
|
|
|
- <el-row style="padding: 5px">
|
|
|
|
|
- <el-button size="small" type="primary" icon="el-icon-upload" round @click="onClickUpload">上传</el-button>
|
|
|
|
|
- <el-button size="small" type="primary" icon="el-icon-folder-add" round @click="onCreateFolder">新建文件夹</el-button>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="inputData"
|
|
|
|
|
- placeholder="搜索我的文件"
|
|
|
|
|
- size="small"
|
|
|
|
|
- style="width: 30%; padding-left: 5px"
|
|
|
|
|
- clearable
|
|
|
|
|
- @keyup.enter.native="onSearchFile"
|
|
|
|
|
- >
|
|
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="onSearchFile" />
|
|
|
|
|
- </el-input>
|
|
|
|
|
- <el-divider />
|
|
|
|
|
- <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
|
|
- <el-breadcrumb-item
|
|
|
|
|
- v-for="(item, index) in pathList"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- style="padding: 1px"
|
|
|
|
|
- :replace="true"
|
|
|
|
|
- :to="{ path: item.path }"
|
|
|
|
|
- >
|
|
|
|
|
- <span style="color: #0a84ff">
|
|
|
|
|
|
|
+ <div class="file-list-container">
|
|
|
|
|
+ <div class="toolbar">
|
|
|
|
|
+ <div class="toolbar-left">
|
|
|
|
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
|
|
+ <el-breadcrumb-item
|
|
|
|
|
+ v-for="(item, index) in pathList"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :to="{ path: item.path }"
|
|
|
|
|
+ >
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
- </span>
|
|
|
|
|
- </el-breadcrumb-item>
|
|
|
|
|
- </el-breadcrumb>
|
|
|
|
|
- <el-divider />
|
|
|
|
|
|
|
+ </el-breadcrumb-item>
|
|
|
|
|
+ </el-breadcrumb>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="toolbar-right">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="inputData"
|
|
|
|
|
+ placeholder="搜索我的文件"
|
|
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
|
|
+ size="medium"
|
|
|
|
|
+ class="search-input"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ @keyup.enter.native="onSearchFile"
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-upload" class="action-btn" @click="onClickUpload">上传</el-button>
|
|
|
|
|
+ <el-button icon="el-icon-folder-add" class="action-btn" @click="onCreateFolder">新建</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <transition name="el-zoom-in-bottom">
|
|
|
|
|
+ <div v-if="selectedTable.length > 0" class="selection-bar">
|
|
|
|
|
+ <span class="selection-count">已选择 {{ selectedTable.length }} 项</span>
|
|
|
|
|
+ <el-divider direction="vertical" />
|
|
|
|
|
+ <el-button type="text" icon="el-icon-collection" @click="addToAlbum">保存到合集</el-button>
|
|
|
|
|
+ <el-button type="text" icon="el-icon-rank" @click="moveToFolder">移动</el-button>
|
|
|
|
|
+ <el-button type="text" icon="el-icon-delete" class="delete-text" @click="onDeleteFile">删除</el-button>
|
|
|
|
|
+ <el-button type="text" @click="toggleSelection()">取消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </transition>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-infinite-scroll="loadMore"
|
|
|
|
|
+ class="table-wrapper"
|
|
|
|
|
+ infinite-scroll-disabled="infiniteDisabled"
|
|
|
|
|
+ infinite-scroll-distance="20"
|
|
|
|
|
+ >
|
|
|
<el-table
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
ref="multipleTable"
|
|
|
:data="dataList"
|
|
:data="dataList"
|
|
|
- :show-header="true"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
|
|
+ class="pikpak-table"
|
|
|
@selection-change="handleTableSectionChange"
|
|
@selection-change="handleTableSectionChange"
|
|
|
>
|
|
>
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- type="selection"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="filename"
|
|
|
|
|
- label="文件名"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="文件名" min-width="400">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.fileType === 1000" class="el-icon-folder">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1001" class="el-icon-picture">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1002" class="el-icon-film">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1003" class="el-icon-headset">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1004" class="el-icon-document">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1005" class="el-icon-files">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1006" class="el-icon-files">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else class="el-icon-files">
|
|
|
|
|
- <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <div class="file-name-cell" @click="onClickFilename(scope.row)">
|
|
|
|
|
+ <i :class="getFileIcon(scope.row.fileType)" :style="getIconStyle(scope.row.fileType)" />
|
|
|
|
|
+ <span class="file-text">{{ scope.row.filename }}</span>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="size"
|
|
|
|
|
- label="大小"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="fileTypeStr"
|
|
|
|
|
- label="类型"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="updateTime"
|
|
|
|
|
- label="修改时间"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="size" label="大小" width="120" />
|
|
|
|
|
+ <el-table-column prop="updateTime" label="修改时间" width="180" align="right" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <div style="margin-top: 20px">
|
|
|
|
|
- <el-button v-if="selectedTable.length !== 0" type="primary" size="small" @click="addToAlbum">添加 {{ selectedTable.length }} 到合集</el-button>
|
|
|
|
|
- <el-button v-if="selectedTable.length !== 0" type="primary" size="small" @click="moveToFolder">移动 {{ selectedTable.length }} 个文件</el-button>
|
|
|
|
|
- <el-button v-if="selectedTable.length !== 0" type="primary" size="small" @click="onDeleteFile">删除 {{ selectedTable.length }} 个文件/文件夹</el-button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="load-status">
|
|
|
|
|
+ <p v-if="loading"><i class="el-icon-loading" /> 加载中...</p>
|
|
|
|
|
+ <p v-if="noMore && dataList.length > 0">没有更多文件了</p>
|
|
|
|
|
+ <el-empty v-if="dataList.length === 0 && !loading" description="暂无文件" />
|
|
|
</div>
|
|
</div>
|
|
|
- <el-pagination
|
|
|
|
|
- background
|
|
|
|
|
- hide-on-single-page
|
|
|
|
|
- :small="screenWidth <= 768"
|
|
|
|
|
- layout="prev, pager, next"
|
|
|
|
|
- :page-size="pageSize"
|
|
|
|
|
- :current-page="currentPage"
|
|
|
|
|
- :total="totalSize"
|
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
|
- @prev-click="handleCurrentChange"
|
|
|
|
|
- @next-click="handleCurrentChange"
|
|
|
|
|
- />
|
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
:visible.sync="showPreviewDialog"
|
|
:visible.sync="showPreviewDialog"
|
|
|
:before-close="handlePreviewClose"
|
|
:before-close="handlePreviewClose"
|
|
|
- width="100%"
|
|
|
|
|
- center
|
|
|
|
|
|
|
+ width="70%"
|
|
|
|
|
+ top="5vh"
|
|
|
|
|
+ custom-class="pikpak-preview-dialog"
|
|
|
|
|
+ append-to-body
|
|
|
>
|
|
>
|
|
|
- <div v-if="fileDetail !== null">
|
|
|
|
|
- <el-row style="padding: 5px">
|
|
|
|
|
- <span style="color: #0a84ff">{{ fileDetail.filename }}</span>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-row style="padding: 5px">
|
|
|
|
|
- <el-col v-if="fileType === 1001" :md="12">
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-image
|
|
|
|
|
- lazy
|
|
|
|
|
- fit="cover"
|
|
|
|
|
- class="coverImg"
|
|
|
|
|
- :src="fileDetail.url"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else-if="fileType === 1002" :md="12">
|
|
|
|
|
- <video
|
|
|
|
|
- :src="fileDetail.url"
|
|
|
|
|
- class="video"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- controls
|
|
|
|
|
- autoplay
|
|
|
|
|
- loop
|
|
|
|
|
- />
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else-if="fileType === 1003" :md="12">
|
|
|
|
|
- <audio
|
|
|
|
|
- :src="fileDetail.url"
|
|
|
|
|
- controls
|
|
|
|
|
- autoplay
|
|
|
|
|
- class="audio"
|
|
|
|
|
- />
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else-if="fileType === 1004" :md="12">
|
|
|
|
|
- 文档
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else-if="fileType === 1005" :md="12">
|
|
|
|
|
- 文件
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else-if="fileType === 1006" :md="12">
|
|
|
|
|
- <iframe :src="getPdfUrl(fileDetail.url)" width="100%" height="480px" />
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-else :md="12">
|
|
|
|
|
- 未知文件类型
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
+ <div slot="title" class="preview-header">
|
|
|
|
|
+ <i :class="getFileIcon(fileType)" :style="getIconStyle(fileType)" />
|
|
|
|
|
+ <span class="preview-filename">{{ fileDetail ? fileDetail.filename : '预览' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- :visible.sync="showCreateFolderDialog"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- center
|
|
|
|
|
- >
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-form ref="createFolderForm" :model="createFolderForm">
|
|
|
|
|
- <el-form-item label="新文件夹名" label-width="120px" prop="title">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="createFolderForm.folderName"
|
|
|
|
|
- style="margin-left: 5px"
|
|
|
|
|
- clearable
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- plain
|
|
|
|
|
- size="small"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- style="margin-left: 10px"
|
|
|
|
|
- @click="createFolder"
|
|
|
|
|
- >
|
|
|
|
|
- 创建文件夹
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="fileDetail" class="preview-body">
|
|
|
|
|
+ <template v-if="fileType === 1001">
|
|
|
|
|
+ <el-image
|
|
|
|
|
+ :src="fileDetail.url"
|
|
|
|
|
+ fit="contain"
|
|
|
|
|
+ class="preview-img"
|
|
|
|
|
+ :preview-src-list="[fileDetail.url]"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-else-if="fileType === 1002">
|
|
|
|
|
+ <video
|
|
|
|
|
+ ref="videoPlayer"
|
|
|
|
|
+ :src="fileDetail.url"
|
|
|
|
|
+ class="preview-video"
|
|
|
|
|
+ controls
|
|
|
|
|
+ autoplay
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-else-if="fileType === 1003">
|
|
|
|
|
+ <div class="audio-container">
|
|
|
|
|
+ <i class="el-icon-headset audio-icon" />
|
|
|
|
|
+ <audio :src="fileDetail.url" controls autoplay class="preview-audio" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-else-if="fileType === 1006">
|
|
|
|
|
+ <iframe :src="getPdfUrl(fileDetail.url)" width="100%" height="600px" frameborder="0" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <el-empty description="该文件格式暂不支持直接预览">
|
|
|
|
|
+ <el-button type="primary" plain @click="handleDownload(fileDetail)">下载到本地查看</el-button>
|
|
|
|
|
+ </el-empty>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div slot="footer" class="preview-footer">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <span>大小: {{ fileDetail ? fileDetail.size : '-' }}</span>
|
|
|
|
|
+ <el-divider direction="vertical" />
|
|
|
|
|
+ <span>修改时间: {{ fileDetail ? fileDetail.updateTime : '-' }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-button type="primary" round icon="el-icon-download" @click="handleDownload(fileDetail)">下载文件</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
|
|
+ title="上传文件"
|
|
|
:visible.sync="showUploadDialog"
|
|
:visible.sync="showUploadDialog"
|
|
|
|
|
+ width="560px"
|
|
|
:before-close="handleUploadClose"
|
|
:before-close="handleUploadClose"
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- center
|
|
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ custom-class="pikpak-upload-dialog"
|
|
|
>
|
|
>
|
|
|
- <div>
|
|
|
|
|
- <uploader
|
|
|
|
|
- v-if="options !== null"
|
|
|
|
|
- style="padding: 5px;"
|
|
|
|
|
- :options="options"
|
|
|
|
|
- :auto-start="true"
|
|
|
|
|
- @file-added="onFileAdded"
|
|
|
|
|
- @file-success="onFileSuccess"
|
|
|
|
|
- @file-progress="onFileProgress"
|
|
|
|
|
- @file-error="onFileError"
|
|
|
|
|
- >
|
|
|
|
|
- <uploader-unsupport />
|
|
|
|
|
- <uploader-drop>
|
|
|
|
|
- <p>拖动文件到此处或</p>
|
|
|
|
|
- <uploader-btn :attrs="attrs">选择文件</uploader-btn>
|
|
|
|
|
- </uploader-drop>
|
|
|
|
|
- <uploader-list />
|
|
|
|
|
- </uploader>
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="padding: 5px;"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="onUploadComplete"
|
|
|
|
|
- >完成上传</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <uploader
|
|
|
|
|
+ v-if="options"
|
|
|
|
|
+ :options="options"
|
|
|
|
|
+ :auto-start="true"
|
|
|
|
|
+ class="uploader-app"
|
|
|
|
|
+ @file-added="onFileAdded"
|
|
|
|
|
+ @file-success="onFileSuccess"
|
|
|
|
|
+ @file-progress="onFileProgress"
|
|
|
|
|
+ @file-error="onFileError"
|
|
|
|
|
+ @complete="onUploadComplete"
|
|
|
|
|
+ >
|
|
|
|
|
+ <uploader-unsupport />
|
|
|
|
|
+
|
|
|
|
|
+ <uploader-drop class="upload-drop-zone">
|
|
|
|
|
+ <div class="drop-content">
|
|
|
|
|
+ <i class="el-icon-upload" />
|
|
|
|
|
+ <p>将文件拖到此处,或 <uploader-btn :attrs="attrs" class="select-btn">点击上传</uploader-btn></p>
|
|
|
|
|
+ <span class="upload-tip">支持大文件秒传及断点续传</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </uploader-drop>
|
|
|
|
|
+
|
|
|
|
|
+ <uploader-list class="upload-list-view" />
|
|
|
|
|
+ </uploader>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- :visible.sync="showAddToAlbumUploadDialog"
|
|
|
|
|
- width="50%"
|
|
|
|
|
- center
|
|
|
|
|
|
|
+ title="新建文件夹"
|
|
|
|
|
+ :visible.sync="showCreateFolderDialog"
|
|
|
|
|
+ width="400px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ custom-class="pikpak-dialog"
|
|
|
>
|
|
>
|
|
|
- <el-table
|
|
|
|
|
- :data="albumList"
|
|
|
|
|
- :show-header="true"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="folderForm"
|
|
|
|
|
+ :model="createFolderForm"
|
|
|
|
|
+ @submit.native.prevent="createFolder"
|
|
|
>
|
|
>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="albumName"
|
|
|
|
|
- label="合集名"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="fileType"
|
|
|
|
|
- label="合集类型"
|
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ prop="folderName"
|
|
|
|
|
+ :rules="[{ required: true, message: '请输入文件夹名称', trigger: 'blur' }]"
|
|
|
>
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <span v-if="scope.row.fileType === 1001" class="el-icon-picture">
|
|
|
|
|
- 图片
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1002" class="el-icon-film">
|
|
|
|
|
- 视频
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.row.fileType === 1003" class="el-icon-headset">
|
|
|
|
|
- 音频
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else class="el-icon-files">
|
|
|
|
|
- 图片
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="onAddToAlbum(scope.row)"
|
|
|
|
|
- >选择</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- :visible.sync="showMoveToFolderDialog"
|
|
|
|
|
- width="50%"
|
|
|
|
|
- center
|
|
|
|
|
- >
|
|
|
|
|
- <div style="padding: 5px;">
|
|
|
|
|
- <el-card style="padding: 5px;">
|
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
|
- <span>目录树</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="text item">
|
|
|
|
|
- <el-tree :data="folderTree" :props="defaultProps" @node-click="handleNodeClick" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-card>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="createFolderForm.folderName"
|
|
|
|
|
+ placeholder="文件夹名称"
|
|
|
|
|
+ prefix-icon="el-icon-folder"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ autofocus
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button round @click="showCreateFolderDialog = false">取 消</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- style="padding: 5px;"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="onMoveToFolder"
|
|
|
|
|
- >确定</el-button>
|
|
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ round
|
|
|
|
|
+ @click="createFolder"
|
|
|
|
|
+ >确 定</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
@@ -314,6 +237,8 @@ export default {
|
|
|
fileType: 0,
|
|
fileType: 0,
|
|
|
videoProp: null,
|
|
videoProp: null,
|
|
|
pathList: [],
|
|
pathList: [],
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ noMore: false,
|
|
|
queryForm: {
|
|
queryForm: {
|
|
|
pn: 1,
|
|
pn: 1,
|
|
|
path: '/',
|
|
path: '/',
|
|
@@ -353,6 +278,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ infiniteDisabled() {
|
|
|
|
|
+ return this.loading || this.noMore
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
const pn = this.$route.query.pn
|
|
const pn = this.$route.query.pn
|
|
|
if (pn !== undefined) {
|
|
if (pn !== undefined) {
|
|
@@ -363,10 +293,83 @@ export default {
|
|
|
if (path !== undefined) {
|
|
if (path !== undefined) {
|
|
|
this.queryForm.path = path
|
|
this.queryForm.path = path
|
|
|
}
|
|
}
|
|
|
- document.title = '所有文件'
|
|
|
|
|
- this.getData()
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ loadMore() {
|
|
|
|
|
+ if (this.infiniteDisabled) return
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+
|
|
|
|
|
+ getDiskFile(this.queryForm).then(resp => {
|
|
|
|
|
+ if (resp.code === 0) {
|
|
|
|
|
+ const { list, hasNext } = resp.data.pageList
|
|
|
|
|
+
|
|
|
|
|
+ // 追加数据而不是覆盖
|
|
|
|
|
+ this.dataList = [...this.dataList, ...list]
|
|
|
|
|
+
|
|
|
|
|
+ // 更新路径列表(仅在第一次或路径改变时)
|
|
|
|
|
+ if (this.queryForm.pn === 1) {
|
|
|
|
|
+ this.updatePathInfo(resp.data)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 判断是否还有更多
|
|
|
|
|
+ if (!hasNext) {
|
|
|
|
|
+ this.noMore = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.queryForm.pn++
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ updatePathInfo(respData) {
|
|
|
|
|
+ const { namePathList } = respData
|
|
|
|
|
+ this.currentPid = respData.currentPid
|
|
|
|
|
+
|
|
|
|
|
+ this.pathList = []
|
|
|
|
|
+ if (!namePathList || namePathList.length === 0) {
|
|
|
|
|
+ this.pathList.push({ path: '/disk', name: '全部文件' })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 这里的逻辑要根据你的后端返回格式调整
|
|
|
|
|
+ namePathList.forEach(item => {
|
|
|
|
|
+ this.pathList.push({
|
|
|
|
|
+ path: `/disk?path=${item.path}`,
|
|
|
|
|
+ name: item.filename
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 切换目录时重置状态
|
|
|
|
|
+ changeDirectory(newPath) {
|
|
|
|
|
+ this.queryForm.path = newPath
|
|
|
|
|
+ this.queryForm.pn = 1
|
|
|
|
|
+ this.dataList = []
|
|
|
|
|
+ this.noMore = false
|
|
|
|
|
+ this.loadMore()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 动态图标映射
|
|
|
|
|
+ getFileIcon(type) {
|
|
|
|
|
+ const iconMap = {
|
|
|
|
|
+ 1000: 'el-icon-folder-opened',
|
|
|
|
|
+ 1001: 'el-icon-picture-outline',
|
|
|
|
|
+ 1002: 'el-icon-video-play',
|
|
|
|
|
+ 1003: 'el-icon-headset',
|
|
|
|
|
+ 1004: 'el-icon-document',
|
|
|
|
|
+ 1005: 'el-icon-files'
|
|
|
|
|
+ }
|
|
|
|
|
+ return iconMap[type] || 'el-icon-files'
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getIconStyle(type) {
|
|
|
|
|
+ const colorMap = {
|
|
|
|
|
+ 1000: '#ffca28', // 文件夹黄
|
|
|
|
|
+ 1001: '#4caf50', // 图片绿
|
|
|
|
|
+ 1002: '#f44336', // 视频红
|
|
|
|
|
+ 1003: '#9c27b0' // 音频紫
|
|
|
|
|
+ }
|
|
|
|
|
+ return { color: colorMap[type] || '#909399', fontSize: '22px', marginRight: '12px' }
|
|
|
|
|
+ },
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
|
onFileAdded(file) {
|
|
onFileAdded(file) {
|
|
|
if (file.file.size > 1024 * 1024 * 1024 * 20) {
|
|
if (file.file.size > 1024 * 1024 * 1024 * 20) {
|
|
@@ -405,13 +408,24 @@ export default {
|
|
|
onFileError(rootFile, file, response, chunk) {
|
|
onFileError(rootFile, file, response, chunk) {
|
|
|
this.$message.error('文件上传错误')
|
|
this.$message.error('文件上传错误')
|
|
|
},
|
|
},
|
|
|
|
|
+ // 上传全部完成后,刷新当前目录列表
|
|
|
onUploadComplete() {
|
|
onUploadComplete() {
|
|
|
- this.showUploadDialog = false
|
|
|
|
|
|
|
+ this.$message.success('所有文件处理完成')
|
|
|
|
|
+ // 延迟一秒刷新,给后端处理索引留出时间
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.changeDirectory(this.queryForm.path)
|
|
|
|
|
+ }, 1000)
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ // 修改原来的 handleUploadClose
|
|
|
handleUploadClose() {
|
|
handleUploadClose() {
|
|
|
this.showUploadDialog = false
|
|
this.showUploadDialog = false
|
|
|
|
|
+ // 可以在这里提示:关闭弹窗不会停止后台上传(取决于 simple-uploader 配置)
|
|
|
},
|
|
},
|
|
|
onClickUpload() {
|
|
onClickUpload() {
|
|
|
|
|
+ // 确保上传到当前正在浏览的目录
|
|
|
|
|
+ this.uploadForm.pid = this.currentPid
|
|
|
|
|
+
|
|
|
getDiskChannelInfo().then(resp => {
|
|
getDiskChannelInfo().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
const respData = resp.data
|
|
const respData = resp.data
|
|
@@ -454,7 +468,14 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
|
|
|
+ handleDownload(file) {
|
|
|
|
|
+ if (!file || !file.url) return
|
|
|
|
|
+ window.open(file.url, '_blank')
|
|
|
|
|
+ },
|
|
|
handlePreviewClose() {
|
|
handlePreviewClose() {
|
|
|
|
|
+ if (this.$refs.videoPlayer) {
|
|
|
|
|
+ this.$refs.videoPlayer.pause()
|
|
|
|
|
+ }
|
|
|
this.showPreviewDialog = false
|
|
this.showPreviewDialog = false
|
|
|
this.fileDetail = null
|
|
this.fileDetail = null
|
|
|
this.fileType = 0
|
|
this.fileType = 0
|
|
@@ -462,22 +483,14 @@ export default {
|
|
|
onClickFilename(row) {
|
|
onClickFilename(row) {
|
|
|
this.fileType = row.fileType
|
|
this.fileType = row.fileType
|
|
|
if (this.fileType === 1000) {
|
|
if (this.fileType === 1000) {
|
|
|
- const filename = row.filename
|
|
|
|
|
- const url = this.pathList[this.pathList.length - 1].path
|
|
|
|
|
- const arr = url.split('?')
|
|
|
|
|
- let path = ''
|
|
|
|
|
- if (arr.length === 1) {
|
|
|
|
|
- path = '/' + filename
|
|
|
|
|
- } else {
|
|
|
|
|
- path = arr[1].split('=')[1] + '/' + filename
|
|
|
|
|
- }
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/disk',
|
|
|
|
|
- query: {
|
|
|
|
|
- path: path
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- this.$router.go(0)
|
|
|
|
|
|
|
+ // 文件夹类型
|
|
|
|
|
+ const newPath = this.queryForm.path === '/'
|
|
|
|
|
+ ? `/${row.filename}`
|
|
|
|
|
+ : `${this.queryForm.path}/${row.filename}`
|
|
|
|
|
+
|
|
|
|
|
+ // 更新路由不刷新页面,而是触发逻辑跳转
|
|
|
|
|
+ this.$router.push({ query: { path: newPath }})
|
|
|
|
|
+ this.changeDirectory(`path=${newPath}`)
|
|
|
} else {
|
|
} else {
|
|
|
getFileDetail(row.fileId).then(resp => {
|
|
getFileDetail(row.fileId).then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
@@ -500,51 +513,39 @@ export default {
|
|
|
return '/pdfjs/web/viewer.html?file=' + encodeURIComponent(url)
|
|
return '/pdfjs/web/viewer.html?file=' + encodeURIComponent(url)
|
|
|
},
|
|
},
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
|
|
|
+ // 1. 打开对话框
|
|
|
onCreateFolder() {
|
|
onCreateFolder() {
|
|
|
|
|
+ this.createFolderForm.folderName = '' // 清空旧数据
|
|
|
this.showCreateFolderDialog = true
|
|
this.showCreateFolderDialog = true
|
|
|
- },
|
|
|
|
|
- createFolder() {
|
|
|
|
|
- this.showCreateFolderDialog = false
|
|
|
|
|
- this.createFolderForm.pid = this.currentPid
|
|
|
|
|
- createFolder(this.createFolderForm).then(resp => {
|
|
|
|
|
- if (resp.code === 0) {
|
|
|
|
|
- this.$router.go(0)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(resp.msg)
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
- this.$message.error(error.message)
|
|
|
|
|
|
|
+ // 自动聚焦处理 (可选)
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.folderForm.clearValidate()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // ****************************************************************************************************************
|
|
|
|
|
- handleCurrentChange(pageNumber) {
|
|
|
|
|
- this.currentPage = pageNumber
|
|
|
|
|
- this.queryForm.pn = this.currentPage
|
|
|
|
|
- this.getData()
|
|
|
|
|
- // 回到顶部
|
|
|
|
|
- scrollTo(0, 0)
|
|
|
|
|
- },
|
|
|
|
|
- getData() {
|
|
|
|
|
- getDiskFile(this.queryForm).then(resp => {
|
|
|
|
|
- if (resp.code === 0) {
|
|
|
|
|
- const respData = resp.data
|
|
|
|
|
- const namePathList = respData.namePathList
|
|
|
|
|
- const pageList = respData.pageList
|
|
|
|
|
- this.currentPid = respData.currentPid
|
|
|
|
|
-
|
|
|
|
|
- this.dataList = pageList.list
|
|
|
|
|
- this.totalSize = pageList.totalSize
|
|
|
|
|
- this.pathList = []
|
|
|
|
|
- if (namePathList.length === 0) {
|
|
|
|
|
- this.pathList.push({ path: '/disk', name: '全部文件' })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 2. 执行创建逻辑
|
|
|
|
|
+ createFolder() {
|
|
|
|
|
+ this.$refs.folderForm.validate((valid) => {
|
|
|
|
|
+ if (!valid) return
|
|
|
|
|
+
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ // 设置父级 ID 为当前目录 ID
|
|
|
|
|
+ this.createFolderForm.pid = this.currentPid
|
|
|
|
|
+
|
|
|
|
|
+ createFolder(this.createFolderForm).then(resp => {
|
|
|
|
|
+ if (resp.code === 0) {
|
|
|
|
|
+ this.$message.success('创建成功')
|
|
|
|
|
+ this.showCreateFolderDialog = false
|
|
|
|
|
+ // 刷新当前列表
|
|
|
|
|
+ this.changeDirectory(this.queryForm.path)
|
|
|
} else {
|
|
} else {
|
|
|
- for (const namePath of namePathList) {
|
|
|
|
|
- this.pathList.push({ path: '/disk?path=' + namePath.path, name: namePath.filename })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$message.error(resp.msg || '创建失败')
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(resp.msg)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ this.$message.error(error.message)
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 处理表格被选中
|
|
// 处理表格被选中
|
|
@@ -664,10 +665,264 @@ export default {
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style>
|
|
|
|
|
-.coverImg {
|
|
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.file-list-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 顶部工具栏 */
|
|
|
|
|
+.toolbar {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.search-input {
|
|
|
|
|
+ width: 240px;
|
|
|
|
|
+ margin-right: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+.search-input ::v-deep .el-input__inner {
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ background-color: #f1f3f4;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.action-btn {
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 表格样式重塑 */
|
|
|
|
|
+.table-wrapper {
|
|
|
|
|
+ flex-grow: 1;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.pikpak-table ::v-deep .el-table__row {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ transition: background 0.2s;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.pikpak-table ::v-deep .el-table__row:hover {
|
|
|
|
|
+ background-color: #f8faff !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.pikpak-table ::v-deep .el-table__header th {
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+ color: #5f6368;
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.file-name-cell {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.file-text:hover {
|
|
|
|
|
+ color: #1a73e8;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 悬浮操作条 */
|
|
|
|
|
+.selection-bar {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ bottom: 40px;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
|
+ background: #1a1a1a;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ padding: 10px 24px;
|
|
|
|
|
+ border-radius: 30px;
|
|
|
|
|
+ z-index: 1000;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.selection-count {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ margin-right: 15px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.selection-bar .el-button--text {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ margin: 0 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.selection-bar .delete-text {
|
|
|
|
|
+ color: #ff4d4f;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.load-status {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ padding: 20px;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* Dialog 整体圆角优化 */
|
|
|
|
|
+::v-deep .pikpak-preview-dialog {
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 标题栏 */
|
|
|
|
|
+.preview-header {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding-right: 30px;
|
|
|
|
|
+}
|
|
|
|
|
+.preview-filename {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ margin-left: 8px;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 预览主体内容区 */
|
|
|
|
|
+.preview-body {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ min-height: 400px;
|
|
|
|
|
+ background-color: #f9f9f9;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.preview-img {
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+ max-height: 70vh;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.preview-video {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 480px;
|
|
|
|
|
|
|
+ max-height: 70vh;
|
|
|
|
|
+ outline: none;
|
|
|
|
|
+ background: #000;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 音频样式 */
|
|
|
|
|
+.audio-container {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ padding: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.audio-icon {
|
|
|
|
|
+ font-size: 60px;
|
|
|
|
|
+ color: #409EFF;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+}
|
|
|
|
|
+.preview-audio {
|
|
|
|
|
+ width: 400px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 底部操作区 */
|
|
|
|
|
+.preview-footer {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 10px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.file-info {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 适配移动端 */
|
|
|
|
|
+@media screen and (max-width: 768px) {
|
|
|
|
|
+ ::v-deep .pikpak-preview-dialog {
|
|
|
|
|
+ width: 95% !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .preview-audio {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 上传弹窗样式 */
|
|
|
|
|
+::v-deep .pikpak-upload-dialog {
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-drop-zone {
|
|
|
|
|
+ border: 2px dashed #dcdfe6;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ background-color: #f8f9fa;
|
|
|
|
|
+ padding: 40px 0;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ transition: border-color 0.3s;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-drop-zone:hover {
|
|
|
|
|
+ border-color: #1a73e8;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.drop-content i {
|
|
|
|
|
+ font-size: 48px;
|
|
|
|
|
+ color: #1a73e8;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.select-btn {
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ color: #1a73e8;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ text-decoration: underline;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.upload-tip {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #909399;
|
|
|
display: block;
|
|
display: block;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 上传列表美化 */
|
|
|
|
|
+.upload-list-view {
|
|
|
|
|
+ max-height: 300px;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 隐藏 simple-uploader 默认的一些难看按钮 */
|
|
|
|
|
+::v-deep .uploader-file-icon {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .uploader-file-actions > span {
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 复用之前的 pikpak-dialog 样式,或者单独微调 */
|
|
|
|
|
+::v-deep .pikpak-dialog {
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+::v-deep .pikpak-dialog .el-dialog__body {
|
|
|
|
|
+ padding: 10px 25px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 底部按钮平铺或靠右 */
|
|
|
|
|
+.dialog-footer {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 输入框聚焦时的动画感 */
|
|
|
|
|
+::v-deep .el-input__inner:focus {
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ border-color: #1a73e8;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|