修改打包下载api
This commit is contained in:
parent
a7ed85d2db
commit
fbbcd72f19
@ -4,14 +4,16 @@
|
|||||||
<v-contextmenu ref="homeContextmenu" :disabled="contextmenuDisabled">
|
<v-contextmenu ref="homeContextmenu" :disabled="contextmenuDisabled">
|
||||||
<div v-for="item of contextMenus" :key="item.operation">
|
<div v-for="item of contextMenus" :key="item.operation">
|
||||||
<!-- 一级菜单 -->
|
<!-- 一级菜单 -->
|
||||||
<v-contextmenu-item v-if="!item.child" :divider="item.divider?true:false" @click="contextmenuClick(item.operation)">
|
<v-contextmenu-item v-if="!item.child" :divider="item.divider?true:false"
|
||||||
|
@click="contextmenuClick(item.operation)">
|
||||||
<svg-icon v-if="item.iconClass" :icon-class="item.iconClass"></svg-icon>
|
<svg-icon v-if="item.iconClass" :icon-class="item.iconClass"></svg-icon>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</v-contextmenu-item>
|
</v-contextmenu-item>
|
||||||
<v-contextmenu-submenu v-if="item.child" :title="item.label">
|
<v-contextmenu-submenu v-if="item.child" :title="item.label">
|
||||||
<!-- 二级菜单 -->
|
<!-- 二级菜单 -->
|
||||||
<div v-for="itemSecond of item.child" :key="itemSecond.operation">
|
<div v-for="itemSecond of item.child" :key="itemSecond.operation">
|
||||||
<v-contextmenu-item v-if="!itemSecond.child" :divider="itemSecond.divider?true:false" @click="contextmenuClick(itemSecond.operation)">
|
<v-contextmenu-item v-if="!itemSecond.child" :divider="itemSecond.divider?true:false"
|
||||||
|
@click="contextmenuClick(itemSecond.operation)">
|
||||||
<svg-icon v-if="itemSecond.iconClass" :icon-class="itemSecond.iconClass"></svg-icon>
|
<svg-icon v-if="itemSecond.iconClass" :icon-class="itemSecond.iconClass"></svg-icon>
|
||||||
{{ itemSecond.label }}
|
{{ itemSecond.label }}
|
||||||
</v-contextmenu-item>
|
</v-contextmenu-item>
|
||||||
@ -25,13 +27,19 @@
|
|||||||
<el-breadcrumb class="app-breadcrumb" separator="">
|
<el-breadcrumb class="app-breadcrumb" separator="">
|
||||||
<transition-group name="breadcrumb" v-if="showNavigation">
|
<transition-group name="breadcrumb" v-if="showNavigation">
|
||||||
<el-breadcrumb-item v-for="(item,index) in pathList" :key="item.folder+index">
|
<el-breadcrumb-item v-for="(item,index) in pathList" :key="item.folder+index">
|
||||||
<el-tooltip v-if="index===0 && pathList.length > 1" class="item" effect="dark" content="返回上一级" placement="top">
|
<el-tooltip v-if="index===0 && pathList.length > 1" class="item" effect="dark" content="返回上一级"
|
||||||
<a @click.prevent="lastLink()"><svg-icon icon-class="back" style="font-size: 24px;"/> </a>
|
placement="top">
|
||||||
|
<a @click.prevent="lastLink()">
|
||||||
|
<svg-icon icon-class="back" style="font-size: 24px;"/> </a>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip v-if="index===0 && pathList.length > 2" class="item" effect="dark" content="根目录" placement="top">
|
<el-tooltip v-if="index===0 && pathList.length > 2" class="item" effect="dark" content="根目录"
|
||||||
<a class="home-link" @click.prevent="handleLink(item,index)"><svg-icon icon-class="home" style="font-size: 24px;"/></a>
|
placement="top">
|
||||||
|
<a class="home-link" @click.prevent="handleLink(item,index)">
|
||||||
|
<svg-icon icon-class="home" style="font-size: 24px;"/>
|
||||||
|
</a>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<breadcrumb-file-path :pathList="pathList" :item="item" :index="index" @clickLink="handleLink"></breadcrumb-file-path>
|
<breadcrumb-file-path :pathList="pathList" :item="item" :index="index"
|
||||||
|
@clickLink="handleLink"></breadcrumb-file-path>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
@ -47,24 +55,31 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li @click="upload">
|
<li @click="upload">
|
||||||
<label class="menuitem">
|
<label class="menuitem">
|
||||||
<svg-icon icon-class="file-upload" /><span class="menuitem text">{{singleFileType !==''?singleFileType:'上传文件'}}</span>
|
<svg-icon icon-class="file-upload"/>
|
||||||
|
<span class="menuitem text">{{ singleFileType !== '' ? singleFileType : '上传文件' }}</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="singleFileType === ''" @click="uploadFolder">
|
<li v-if="singleFileType === ''" @click="uploadFolder">
|
||||||
<label class="menuitem">
|
<label class="menuitem">
|
||||||
<svg-icon icon-class="folder-upload" /><span class="menuitem text">上传文件夹</span>
|
<svg-icon icon-class="folder-upload"/>
|
||||||
|
<span class="menuitem text">上传文件夹</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="singleFileType === ''" @click.prevent="newDocument">
|
<li v-if="singleFileType === ''" @click.prevent="newDocument">
|
||||||
<a href="#" class="menuitem"><svg-icon icon-class="md" /><span class="menuitem text">新建文档</span>
|
<a href="#" class="menuitem">
|
||||||
|
<svg-icon icon-class="md"/>
|
||||||
|
<span class="menuitem text">新建文档</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="singleFileType === ''" @click.prevent="newFolder">
|
<li v-if="singleFileType === ''" @click.prevent="newFolder">
|
||||||
<a href="#" class="menuitem"><svg-icon icon-class="folder-add" /><span class="menuitem text">新建文件夹</span>
|
<a href="#" class="menuitem">
|
||||||
|
<svg-icon icon-class="folder-add"/>
|
||||||
|
<span class="menuitem text">新建文件夹</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<div v-show="showNewFolder" class="folder-name-form">
|
<div v-show="showNewFolder" class="folder-name-form">
|
||||||
<el-input ref="newFolderName" v-model="newFolderName" placeholder="请输入文件夹名称" :clearable="true" @keyup.enter.native="newFolderNameClickEnter">
|
<el-input ref="newFolderName" v-model="newFolderName" placeholder="请输入文件夹名称" :clearable="true"
|
||||||
|
@keyup.enter.native="newFolderNameClickEnter">
|
||||||
<el-button
|
<el-button
|
||||||
slot="append"
|
slot="append"
|
||||||
v-loading="newFolderLoading"
|
v-loading="newFolderLoading"
|
||||||
@ -79,10 +94,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!--<el-button slot="reference" icon="el-icon-plus add-file-button" circle />-->
|
<!--<el-button slot="reference" icon="el-icon-plus add-file-button" circle />-->
|
||||||
<button-upload slot="reference" :name="''" @click.native="upload" style="margin-right: 5px"></button-upload>
|
<button-upload slot="reference" :name="''" @click.native="upload"
|
||||||
|
style="margin-right: 5px"></button-upload>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|
||||||
<el-input placeholder="搜索" v-model="searchFileName" :clearable="true" @keyup.enter.native="searchFile(searchFileName)">
|
<el-input placeholder="搜索" v-model="searchFileName" :clearable="true"
|
||||||
|
@keyup.enter.native="searchFile(searchFileName)">
|
||||||
<el-button slot="prepend" @click="searchFile(searchFileName)">
|
<el-button slot="prepend" @click="searchFile(searchFileName)">
|
||||||
<svg-icon icon-class="search" style="font-size: 22px"/>
|
<svg-icon icon-class="search" style="font-size: 22px"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -111,14 +128,18 @@
|
|||||||
@mouseover.prevent.stop="menuFavoriteOver(index,rowContextData.isFavorite)"
|
@mouseover.prevent.stop="menuFavoriteOver(index,rowContextData.isFavorite)"
|
||||||
@mouseleave.prevent.stop="menuFavoriteLeave(index,rowContextData.isFavorite)"
|
@mouseleave.prevent.stop="menuFavoriteLeave(index,rowContextData.isFavorite)"
|
||||||
>
|
>
|
||||||
<label class="menuitem"><svg-icon :icon-class="item.iconClass" /><span class="menuitem text">{{ item.label }}</span>
|
<label class="menuitem">
|
||||||
|
<svg-icon :icon-class="item.iconClass"/>
|
||||||
|
<span class="menuitem text">{{ item.label }}</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
v-else
|
v-else
|
||||||
@click="menusOperations(item.operation)"
|
@click="menusOperations(item.operation)"
|
||||||
>
|
>
|
||||||
<label class="menuitem"><svg-icon :icon-class="item.iconClass" /><span class="menuitem text">{{ item.label }}</span>
|
<label class="menuitem">
|
||||||
|
<svg-icon :icon-class="item.iconClass"/>
|
||||||
|
<span class="menuitem text">{{ item.label }}</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -195,7 +216,9 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-col v-if="scope.row.index === editingIndex" :span="10">
|
<el-col v-if="scope.row.index === editingIndex" :span="10">
|
||||||
<el-input v-focus v-model="renameFileName" placeholder="" size="small" :clearable="true" @focus="renameInputFocus($event,scope.row.suffix)" @keyup.enter.native="rowRename(renameFileName, scope.row)">
|
<el-input v-focus v-model="renameFileName" placeholder="" size="small" :clearable="true"
|
||||||
|
@focus="renameInputFocus($event,scope.row.suffix)"
|
||||||
|
@keyup.enter.native="rowRename(renameFileName, scope.row)">
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button
|
<el-button
|
||||||
v-loading="renameLoading"
|
v-loading="renameLoading"
|
||||||
@ -213,25 +236,32 @@
|
|||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<a v-else @click.stop="fileClick(scope.row)" class="table-file-name"><span>{{ scope.row.name }}</span></a>
|
<a v-else @click.stop="fileClick(scope.row)" class="table-file-name"><span>{{
|
||||||
|
scope.row.name
|
||||||
|
}}</span></a>
|
||||||
</template>
|
</template>
|
||||||
</pl-table-column>
|
</pl-table-column>
|
||||||
<!--分享-->
|
<!--分享-->
|
||||||
<pl-table-column v-if="index === 3" :key="index" width="50" :index="index" align="center" header-align="center" tooltip-effect="dark">
|
<pl-table-column v-if="index === 3" :key="index" width="50" :index="index" align="center"
|
||||||
|
header-align="center" tooltip-effect="dark">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip v-if="scope.row.index === cellMouseIndex" class="item" effect="light" content="分享" placement="top">
|
<el-tooltip v-if="scope.row.index === cellMouseIndex" class="item" effect="light" content="分享"
|
||||||
|
placement="top">
|
||||||
<svg-icon title="分享" class="button-class" icon-class="share" @click.stop="share(scope.row)"/>
|
<svg-icon title="分享" class="button-class" icon-class="share" @click.stop="share(scope.row)"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</pl-table-column>
|
</pl-table-column>
|
||||||
<!--更多-->
|
<!--更多-->
|
||||||
<pl-table-column v-if="index === 4" :key="index" width="50" :prop="item.name" :label="item.label" :index="index" class="el-icon-more" align="center" header-align="center">
|
<pl-table-column v-if="index === 4" :key="index" width="50" :prop="item.name" :label="item.label"
|
||||||
|
:index="index" class="el-icon-more" align="center" header-align="center">
|
||||||
<!-- 使用组件, 并传值到组件中 -->
|
<!-- 使用组件, 并传值到组件中 -->
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<svg-icon v-if="item.name !== ''" class="button-class" icon-class="more" @click.stop="moreOperation($event)" />
|
<svg-icon v-if="item.name !== ''" class="button-class" icon-class="more"
|
||||||
|
@click.stop="moreOperation($event)"/>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg-icon v-if="scope.row.index === cellMouseIndex" class="button-class" icon-class="more" @click.stop="moreClick(scope.row,$event)" />
|
<svg-icon v-if="scope.row.index === cellMouseIndex" class="button-class" icon-class="more"
|
||||||
|
@click.stop="moreClick(scope.row,$event)"/>
|
||||||
</template>
|
</template>
|
||||||
</pl-table-column>
|
</pl-table-column>
|
||||||
<!--文件大小-->
|
<!--文件大小-->
|
||||||
@ -284,18 +314,24 @@
|
|||||||
element-loading-background="#f6f7fa88">
|
element-loading-background="#f6f7fa88">
|
||||||
<div class="checkbox-group-header">
|
<div class="checkbox-group-header">
|
||||||
<div class="select-operation">
|
<div class="select-operation">
|
||||||
<van-checkbox class="grid-all-checkbox" @click="clickGridAllCheckBox" v-model="allChecked">{{selectRowData.length>0 ? '已选择 '+this.tableHead[2].label : "选择"}}</van-checkbox>
|
<van-checkbox class="grid-all-checkbox" @click="clickGridAllCheckBox" v-model="allChecked">
|
||||||
|
{{ selectRowData.length > 0 ? '已选择 ' + this.tableHead[2].label : "选择" }}
|
||||||
|
</van-checkbox>
|
||||||
<div>
|
<div>
|
||||||
<el-button class="select-operation-button" icon="el-icon-download" v-if="selectRowData.length > 0" @click="downloadFile">
|
<el-button class="select-operation-button" icon="el-icon-download" v-if="selectRowData.length > 0"
|
||||||
|
@click="downloadFile">
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="select-operation-button" icon="el-icon-share" v-if="selectRowData.length === 1" @click="share">
|
<el-button class="select-operation-button" icon="el-icon-share" v-if="selectRowData.length === 1"
|
||||||
|
@click="share">
|
||||||
分享
|
分享
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="select-operation-button" icon="el-icon-document-copy" v-if="selectRowData.length > 0" @click="moveOrCopy">
|
<el-button class="select-operation-button" icon="el-icon-document-copy" v-if="selectRowData.length > 0"
|
||||||
|
@click="moveOrCopy">
|
||||||
移动或复制
|
移动或复制
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="select-operation-button" icon="el-icon-delete" v-if="selectRowData.length > 0" type="danger" @click="deleteFile">
|
<el-button class="select-operation-button" icon="el-icon-delete" v-if="selectRowData.length > 0"
|
||||||
|
type="danger" @click="deleteFile">
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -303,18 +339,25 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-checkbox-group v-model="selectRowData" @change="handleSelectionChange" ref="checkboxGroup">
|
<van-checkbox-group v-model="selectRowData" @change="handleSelectionChange" ref="checkboxGroup">
|
||||||
<van-grid square :center="true" :column-num="gridColumnNum" :gutter="10" :border="false" :style="{'width':'100%','max-height': clientHeight-45+'px','overflow':'auto'}">
|
<van-grid square :center="true" :column-num="gridColumnNum" :gutter="10" :border="false"
|
||||||
|
:style="{'width':'100%','max-height': clientHeight-45+'px','overflow':'auto'}">
|
||||||
<van-grid-item v-for="(item,index) in fileList" ref="gridItem" :key="item.id"
|
<van-grid-item v-for="(item,index) in fileList" ref="gridItem" :key="item.id"
|
||||||
>
|
>
|
||||||
<div class="grid-time van-grid-item__content van-grid-item__content--center van-grid-item__content--square"
|
<div
|
||||||
|
class="grid-time van-grid-item__content van-grid-item__content--center van-grid-item__content--square"
|
||||||
:style="{'background': selectRowData.includes(item)?'#caeaf991':'','border': selectRowData.includes(item)?'solid 1px #7bd7ff':''}"
|
:style="{'background': selectRowData.includes(item)?'#caeaf991':'','border': selectRowData.includes(item)?'solid 1px #7bd7ff':''}"
|
||||||
@mouseover="gridItemHover(item,index)"
|
@mouseover="gridItemHover(item,index)"
|
||||||
@mouseout="gridItemOut(item,index)"
|
@mouseout="gridItemOut(item,index)"
|
||||||
@click="gridItemClick(item)"
|
@click="gridItemClick(item)"
|
||||||
@contextmenu.prevent="rowContextmenu(item)"
|
@contextmenu.prevent="rowContextmenu(item)"
|
||||||
>
|
>
|
||||||
<van-checkbox v-if="gridHoverItemIndex === index || selectRowData.includes(item)" class="grid-item-checkbox" :name="item" @click.stop="clickGridItemCheckBox(item,index)"/>
|
<van-checkbox v-if="gridHoverItemIndex === index || selectRowData.includes(item)"
|
||||||
<div class="grid-item-icon"><icon-file :item="item" :image-url="imageUrl" :audio-cover-url="audioCoverUrl" :grid="true"></icon-file></div>
|
class="grid-item-checkbox" :name="item"
|
||||||
|
@click.stop="clickGridItemCheckBox(item,index)"/>
|
||||||
|
<div class="grid-item-icon">
|
||||||
|
<icon-file :item="item" :image-url="imageUrl" :audio-cover-url="audioCoverUrl"
|
||||||
|
:grid="true"></icon-file>
|
||||||
|
</div>
|
||||||
<!--<el-tooltip effect="light" :content="item.name" placement="top">-->
|
<!--<el-tooltip effect="light" :content="item.name" placement="top">-->
|
||||||
<span :title="item.name" class="grid-item-text">{{ item.name }}</span>
|
<span :title="item.name" class="grid-item-text">{{ item.name }}</span>
|
||||||
<!--</el-tooltip>-->
|
<!--</el-tooltip>-->
|
||||||
@ -331,7 +374,8 @@
|
|||||||
:emptyStatus="emptyStatus"
|
:emptyStatus="emptyStatus"
|
||||||
>
|
>
|
||||||
</empty-file>
|
</empty-file>
|
||||||
<img id="dragImage" draggable="false" style="position: fixed;top: -100px;z-index: 99999" src="~@/assets/img/move-file.png">
|
<img id="dragImage" draggable="false" style="position: fixed;top: -100px;z-index: 99999"
|
||||||
|
src="~@/assets/img/move-file.png">
|
||||||
</div>
|
</div>
|
||||||
<!--为了不受右键区域的影响, 把弹窗之类的提取出来-->
|
<!--为了不受右键区域的影响, 把弹窗之类的提取出来-->
|
||||||
<sim-text-preview :file.sync="textPreviewRow" :status.sync="textPreviewVisible"></sim-text-preview>
|
<sim-text-preview :file.sync="textPreviewRow" :status.sync="textPreviewVisible"></sim-text-preview>
|
||||||
@ -343,7 +387,8 @@
|
|||||||
:title="rowContextData.name"
|
:title="rowContextData.name"
|
||||||
:visible.sync="drawer">
|
:visible.sync="drawer">
|
||||||
<div class="drawer-icon">
|
<div class="drawer-icon">
|
||||||
<icon-file class="drawer-icon-font" :grid="true" :details="true" :item="rowContextData" :image-url="imageUrl" :audio-cover-url="audioCoverUrl"></icon-file>
|
<icon-file class="drawer-icon-font" :grid="true" :details="true" :item="rowContextData" :image-url="imageUrl"
|
||||||
|
:audio-cover-url="audioCoverUrl"></icon-file>
|
||||||
</div>
|
</div>
|
||||||
<el-form class="details-form">
|
<el-form class="details-form">
|
||||||
<el-form-item label="名称:">
|
<el-form-item label="名称:">
|
||||||
@ -372,7 +417,8 @@
|
|||||||
title="提示"
|
title="提示"
|
||||||
top="35vh"
|
top="35vh"
|
||||||
:visible.sync="openCompressionVisible">
|
:visible.sync="openCompressionVisible">
|
||||||
<svg-icon icon-class="open-folder"></svg-icon> <span class="dialog-msg">查看压缩文件</span>
|
<svg-icon icon-class="open-folder"></svg-icon>
|
||||||
|
<span class="dialog-msg">查看压缩文件</span>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="unzipTo(openingFile)">解压到...</el-button>
|
<el-button size="small" @click="unzipTo(openingFile)">解压到...</el-button>
|
||||||
<el-button size="small" @click="unzip(openingFile,openingFile.id,false)">解压到当前目录</el-button>
|
<el-button size="small" @click="unzip(openingFile,openingFile.id,false)">解压到当前目录</el-button>
|
||||||
@ -418,7 +464,8 @@
|
|||||||
>
|
>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="fileTreeAndNewFolder"><i class="el-icon-folder-add"></i> 新建文件夹</el-button>
|
<el-button size="small" @click="fileTreeAndNewFolder"><i class="el-icon-folder-add"></i> 新建文件夹
|
||||||
|
</el-button>
|
||||||
<el-button v-if="!unzipOperating" size="small" type="primary" @click="moveFileTree">移 动</el-button>
|
<el-button v-if="!unzipOperating" size="small" type="primary" @click="moveFileTree">移 动</el-button>
|
||||||
<el-button v-if="!unzipOperating" size="small" type="primary" @click="copyFileTree">复制</el-button>
|
<el-button v-if="!unzipOperating" size="small" type="primary" @click="copyFileTree">复制</el-button>
|
||||||
<el-button v-if="unzipOperating" size="small" type="primary" @click="confirmUnzip">解压</el-button>
|
<el-button v-if="unzipOperating" size="small" type="primary" @click="confirmUnzip">解压</el-button>
|
||||||
@ -431,7 +478,9 @@
|
|||||||
<div v-loading="generateShareLinkLoading">
|
<div v-loading="generateShareLinkLoading">
|
||||||
<el-input readonly="readonly" v-model="shareLink"></el-input>
|
<el-input readonly="readonly" v-model="shareLink"></el-input>
|
||||||
<div slot="footer" class="dialog-footer share-dialog-footer">
|
<div slot="footer" class="dialog-footer share-dialog-footer">
|
||||||
<el-button type="primary" class="tag-share-link" @click="copyShareLink" :data-clipboard-text="shareLink">复制链接</el-button>
|
<el-button type="primary" class="tag-share-link" @click="copyShareLink" :data-clipboard-text="shareLink">
|
||||||
|
复制链接
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -450,7 +499,8 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="newTextFileDialog=false">取消</el-button>
|
<el-button size="small" @click="newTextFileDialog=false">取消</el-button>
|
||||||
<el-button size="small" type="primary" @click="createTextFile(newTextFileName)" v-loading="createTextFileLoading">确定</el-button>
|
<el-button size="small" type="primary" @click="createTextFile(newTextFileName)"
|
||||||
|
v-loading="createTextFileLoading">确定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -463,7 +513,7 @@
|
|||||||
import 'vant/lib/checkbox/style';
|
import 'vant/lib/checkbox/style';
|
||||||
import 'vant/lib/checkbox-group/style';
|
import 'vant/lib/checkbox-group/style';
|
||||||
import {mapGetters} from 'vuex'
|
import {mapGetters} from 'vuex'
|
||||||
import { strlen, substring10, formatTime, formatSize } from '@/utils/number'
|
import {formatSize, formatTime} from '@/utils/number'
|
||||||
import {suffix} from '@/utils/file-type'
|
import {suffix} from '@/utils/file-type'
|
||||||
import Bus from '@/assets/js/bus'
|
import Bus from '@/assets/js/bus'
|
||||||
import api from '@/api/file-api'
|
import api from '@/api/file-api'
|
||||||
@ -843,6 +893,7 @@
|
|||||||
resize: { // 指令的名称
|
resize: { // 指令的名称
|
||||||
bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象
|
bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象
|
||||||
let width = '', height = '';
|
let width = '', height = '';
|
||||||
|
|
||||||
function isReize() {
|
function isReize() {
|
||||||
const style = document.defaultView.getComputedStyle(el);
|
const style = document.defaultView.getComputedStyle(el);
|
||||||
if (width !== style.width || height !== style.height) {
|
if (width !== style.width || height !== style.height) {
|
||||||
@ -851,6 +902,7 @@
|
|||||||
width = style.width;
|
width = style.width;
|
||||||
height = style.height;
|
height = style.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
el.__vueSetInterval__ = setInterval(isReize, 300);
|
el.__vueSetInterval__ = setInterval(isReize, 300);
|
||||||
},
|
},
|
||||||
unbind(el) {
|
unbind(el) {
|
||||||
@ -1329,6 +1381,7 @@
|
|||||||
}
|
}
|
||||||
dragged.style.backgroundColor = dragBackCorlor
|
dragged.style.backgroundColor = dragBackCorlor
|
||||||
}
|
}
|
||||||
|
|
||||||
function getObjPos(obj) {
|
function getObjPos(obj) {
|
||||||
let pos = {x: 0, y: 0}
|
let pos = {x: 0, y: 0}
|
||||||
while (obj) {
|
while (obj) {
|
||||||
@ -2201,10 +2254,12 @@
|
|||||||
contextmenuClick(operation) {
|
contextmenuClick(operation) {
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
case 'vmode-list':
|
case 'vmode-list':
|
||||||
this.grid=true;this.changeVmode()
|
this.grid = true;
|
||||||
|
this.changeVmode()
|
||||||
break
|
break
|
||||||
case 'vmode-grid':
|
case 'vmode-grid':
|
||||||
this.grid=false;this.changeVmode()
|
this.grid = false;
|
||||||
|
this.changeVmode()
|
||||||
break
|
break
|
||||||
case 'orderName':
|
case 'orderName':
|
||||||
this.sortChangeOfMenu('name', 2)
|
this.sortChangeOfMenu('name', 2)
|
||||||
@ -2474,13 +2529,15 @@
|
|||||||
window.event.stopPropagation()
|
window.event.stopPropagation()
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
class="el-button el-icon-check el-button--mini el-input-tree-button" element-loading-spinner="el-icon-loading" element-loading-background="#f6f7fa88"></button>
|
class="el-button el-icon-check el-button--mini el-input-tree-button"
|
||||||
|
element-loading-spinner="el-icon-loading" element-loading-background="#f6f7fa88"></button>
|
||||||
<button type="button" on-click={() => {
|
<button type="button" on-click={() => {
|
||||||
this.$refs.directoryTree.remove(node)
|
this.$refs.directoryTree.remove(node)
|
||||||
window.event.preventDefault()
|
window.event.preventDefault()
|
||||||
window.event.stopPropagation()
|
window.event.stopPropagation()
|
||||||
}}
|
}}
|
||||||
class="el-button el-icon-close el-button--mini el-input-tree-button" element-loading-spinner="el-icon-loading" element-loading-background="#f6f7fa88"></button>
|
class="el-button el-icon-close el-button--mini el-input-tree-button"
|
||||||
|
element-loading-spinner="el-icon-loading" element-loading-background="#f6f7fa88"></button>
|
||||||
</span>
|
</span>
|
||||||
</span>);
|
</span>);
|
||||||
}
|
}
|
||||||
@ -2569,16 +2626,11 @@
|
|||||||
if (window.location.port.length > 0) {
|
if (window.location.port.length > 0) {
|
||||||
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
}
|
}
|
||||||
let protocol = 'http'
|
let api = '/api/packageDownload'
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
let host = window.location.host
|
api = '/api/download'
|
||||||
if(window.location.port.length > 0){
|
|
||||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
|
||||||
}
|
|
||||||
window.open(`${document.location.protocol}//${host}:10010/download?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`,'_self')
|
|
||||||
}else{
|
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + '/download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
|
||||||
}
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件为空',
|
message: '所选文件为空',
|
||||||
@ -2825,69 +2877,89 @@
|
|||||||
.dashboard-container {
|
.dashboard-container {
|
||||||
min-width: 900px;
|
min-width: 900px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .app-wrapper {
|
/deep/ .app-wrapper {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ :focus {
|
/deep/ :focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-drawer__header {
|
/deep/ .el-drawer__header {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-form {
|
.details-form {
|
||||||
margin: 20px 10px 0 20px;
|
margin: 20px 10px 0 20px;
|
||||||
|
|
||||||
/deep/ .el-form-item__content {
|
/deep/ .el-form-item__content {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-form-item {
|
/deep/ .el-form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .details-position {
|
/deep/ .details-position {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
|
||||||
.el-form-item__content {
|
.el-form-item__content {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-icon {
|
.drawer-icon {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-icon-font /deep/ .svg-icon {
|
.drawer-icon-font /deep/ .svg-icon {
|
||||||
font-size: 8rem;
|
font-size: 8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-item {
|
.list-item {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-file-name:hover {
|
.table-file-name:hover {
|
||||||
color: #19ACF9;
|
color: #19ACF9;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .plTableBox .el-table .el-table__header {
|
/deep/ .plTableBox .el-table .el-table__header {
|
||||||
th {
|
th {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-sortable:hover {
|
.is-sortable:hover {
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-table td {
|
/deep/ .el-table td {
|
||||||
height: 50px !important;
|
height: 50px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-link:hover {
|
.home-link:hover {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-statistics {
|
.info-statistics {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
float: right;
|
float: right;
|
||||||
@ -2898,45 +2970,57 @@
|
|||||||
-webkit-box-pack: end;
|
-webkit-box-pack: end;
|
||||||
-ms-flex-pack: end;
|
-ms-flex-pack: end;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-input-tree {
|
/deep/ .el-input-tree {
|
||||||
width: 50% !important;
|
width: 50% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-input-tree-button {
|
/deep/ .el-input-tree-button {
|
||||||
margin-left: 5px !important;
|
margin-left: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
> > > .open-file-dialog {
|
> > > .open-file-dialog {
|
||||||
.el-dialog {
|
.el-dialog {
|
||||||
width: 420px;
|
width: 420px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.svg-icon {
|
.svg-icon {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-msg {
|
.dialog-msg {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> > > .v-contextmenu-item {
|
> > > .v-contextmenu-item {
|
||||||
.svg-icon {
|
.svg-icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> > > .new-text-file-dialog {
|
> > > .new-text-file-dialog {
|
||||||
height: 350px;
|
height: 350px;
|
||||||
top: calc(50% - 175px);
|
top: calc(50% - 175px);
|
||||||
|
|
||||||
.el-dialog {
|
.el-dialog {
|
||||||
width: 420px;
|
width: 420px;
|
||||||
|
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
padding: 15px 20px 15px;
|
padding: 15px 20px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
.el-loading-spinner {
|
.el-loading-spinner {
|
||||||
margin-top: -13px;
|
margin-top: -13px;
|
||||||
|
|
||||||
.circular {
|
.circular {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
width: 26px;
|
width: 26px;
|
||||||
|
|||||||
@ -556,15 +556,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
|
||||||
let host = window.location.host
|
let host = window.location.host
|
||||||
if (window.location.port.length > 0) {
|
if (window.location.port.length > 0) {
|
||||||
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
}
|
}
|
||||||
window.open(`${document.location.protocol}//${host}:10010/download?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`,'_self')
|
let api = '/api/packageDownload'
|
||||||
}else{
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + '/download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
api = '/api/download'
|
||||||
}
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件夹为空',
|
message: '所选文件夹为空',
|
||||||
|
|||||||
@ -867,16 +867,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
|
||||||
let host = window.location.host
|
let host = window.location.host
|
||||||
if (window.location.port.length > 0) {
|
if (window.location.port.length > 0) {
|
||||||
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
}
|
}
|
||||||
window.open(`${document.location.protocol}//${host}:10010/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`,'_self')
|
let api = '/api/packageDownload'
|
||||||
}else{
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + `/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`, '_self')
|
api = '/api/download'
|
||||||
}
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件为空',
|
message: '所选文件为空',
|
||||||
|
|||||||
@ -818,16 +818,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
|
||||||
let host = window.location.host
|
let host = window.location.host
|
||||||
if (window.location.port.length > 0) {
|
if (window.location.port.length > 0) {
|
||||||
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
}
|
}
|
||||||
window.open(`${document.location.protocol}//${host}:10010/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`,'_self')
|
let api = '/api/packageDownload'
|
||||||
}else{
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + `/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`, '_self')
|
api = '/api/download'
|
||||||
}
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件为空',
|
message: '所选文件为空',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user