|
|
@@ -11,211 +11,284 @@ |
|
|
|
<div class="listfilewarp1">
|
|
|
|
<div class="layout_content2">
|
|
|
|
<!-- 文件大box -->
|
|
|
|
<div class="juzhongtext" v-if="isShowRecycleTip"> 回收站暂时没有文件!</div>
|
|
|
|
<section class="yiyun_section_warp list_fileBox"
|
|
|
|
v-if="!isShowRecycleTip"
|
|
|
|
v-for="(folder, index) in filesList"
|
|
|
|
:key="index">
|
|
|
|
<div class="yinyong_warpBox hidescollbar" @click="clickYinyongWarpBox()">
|
|
|
|
<div class="yiyun_section_top" id="bignav">
|
|
|
|
<!-- 系统时间 -->
|
|
|
|
<div class="section_item fl section_item_aside_fl ">
|
|
|
|
<h3 class="yiyuntitle">{{ folder.folderName }}</h3>
|
|
|
|
</div>
|
|
|
|
<!-- 右侧操作栏 -->
|
|
|
|
<div class="section_item fr section_item_aside_fr">
|
|
|
|
<div class="fr ml-10">
|
|
|
|
<el-button @click="clearRecycle(folder)">清空</el-button>
|
|
|
|
<div class="juzhongtext" v-if="isShowRecycleTip">
|
|
|
|
回收站暂时没有文件!
|
|
|
|
</div>
|
|
|
|
<template v-if="!isShowRecycleTip">
|
|
|
|
<section
|
|
|
|
class="yiyun_section_warp list_fileBox"
|
|
|
|
v-for="(folder, index) in filesList"
|
|
|
|
:key="index"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
class="yinyong_warpBox hidescollbar"
|
|
|
|
@click="clickYinyongWarpBox()"
|
|
|
|
>
|
|
|
|
<div class="yiyun_section_top" id="bignav">
|
|
|
|
<!-- 系统时间 -->
|
|
|
|
<div class="section_item fl section_item_aside_fl">
|
|
|
|
<h3 class="yiyuntitle">{{ folder.folderName }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="fifle_search fr">
|
|
|
|
<!-- <el-input placeholder="搜索我的文件" prefix-icon="icon font_family icon-icon_sousuo searchsize" class="el-input_mini"
|
|
|
|
v-model="searchMyFile"></el-input> -->
|
|
|
|
<!-- 右侧操作栏 -->
|
|
|
|
<div class="section_item fr section_item_aside_fr">
|
|
|
|
<div class="fr ml-10">
|
|
|
|
<el-button @click="clearRecycle(folder)">清空</el-button>
|
|
|
|
</div>
|
|
|
|
<div class="fifle_search fr">
|
|
|
|
<!-- <el-input placeholder="搜索我的文件" prefix-icon="icon font_family icon-icon_sousuo searchsize" class="el-input_mini" v-model="searchMyFile"></el-input> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<!-- 应用列表(缩略图) -->
|
|
|
|
<div class="yiyun_row_recyle_warp">
|
|
|
|
<div v-for="file in folder.listArchive"
|
|
|
|
:key="file.archID"
|
|
|
|
@contextmenu.prevent="rightShowMenu($event, file)">
|
|
|
|
<div class="yiyun_wenjian_list">
|
|
|
|
<div :class="'defultImage-mid ' + file.extension +'-mid'" v-if="
|
|
|
|
file.extension != 'jpg' &&
|
|
|
|
<div class="clear"></div>
|
|
|
|
<!-- 应用列表(缩略图) -->
|
|
|
|
<div class="yiyun_row_recyle_warp">
|
|
|
|
<div
|
|
|
|
v-for="file in folder.listArchive"
|
|
|
|
:key="file.archID"
|
|
|
|
@contextmenu.prevent="rightShowMenu($event, file)"
|
|
|
|
>
|
|
|
|
<div class="yiyun_wenjian_list">
|
|
|
|
<div
|
|
|
|
:class="'defultImage-mid ' + file.extension + '-mid'"
|
|
|
|
v-if="
|
|
|
|
file.extension != 'jpg' &&
|
|
|
|
file.extension != 'png' &&
|
|
|
|
file.extension != 'bmp' &&
|
|
|
|
file.extension != 'gif' &&
|
|
|
|
file.extension != 'jpeg'"></div>
|
|
|
|
<div class="defultImage-mid img_bg-mid" v-if="
|
|
|
|
file.extension == 'jpg' ||
|
|
|
|
file.extension != 'jpeg'
|
|
|
|
"
|
|
|
|
></div>
|
|
|
|
<div
|
|
|
|
class="defultImage-mid img_bg-mid"
|
|
|
|
v-if="
|
|
|
|
file.extension == 'jpg' ||
|
|
|
|
file.extension == 'png' ||
|
|
|
|
file.extension == 'bmp' ||
|
|
|
|
file.extension == 'gif' ||
|
|
|
|
file.extension == 'jpeg'">
|
|
|
|
<div class="file_Imgbox-mid">
|
|
|
|
<img v-lazy="imgSrc + file.alias" alt="" class="file_Img" />
|
|
|
|
file.extension == 'jpeg'
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<div class="file_Imgbox-mid">
|
|
|
|
<img
|
|
|
|
v-lazy="imgSrc + file.alias"
|
|
|
|
alt=""
|
|
|
|
class="file_Img"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="top_optionBar">
|
|
|
|
<el-dropdown>
|
|
|
|
<span class="el-dropdown-link">
|
|
|
|
<i
|
|
|
|
class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
|
|
|
|
></i>
|
|
|
|
</span>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item
|
|
|
|
><span
|
|
|
|
@click="downLoadMyFile(file)"
|
|
|
|
v-if="
|
|
|
|
file.extension != 'map' &&
|
|
|
|
file.extension != 'supermap'
|
|
|
|
"
|
|
|
|
>下载</span
|
|
|
|
></el-dropdown-item
|
|
|
|
>
|
|
|
|
<el-dropdown-item divided
|
|
|
|
><span @click="returnMyFile(file)"
|
|
|
|
>放回原处</span
|
|
|
|
></el-dropdown-item
|
|
|
|
>
|
|
|
|
<el-dropdown-item divided
|
|
|
|
><span @click="delMyFile(file)"
|
|
|
|
>彻底删除</span
|
|
|
|
></el-dropdown-item
|
|
|
|
>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</div>
|
|
|
|
<strong class="yiyunwenjian_name" :title="file.archName">
|
|
|
|
{{ file.archName }}
|
|
|
|
</strong>
|
|
|
|
<span class="yiyunwenjian_infodesc">我的文件</span>
|
|
|
|
</div>
|
|
|
|
<div class="top_optionBar">
|
|
|
|
<el-dropdown>
|
|
|
|
<span class="el-dropdown-link">
|
|
|
|
<i class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"></i>
|
|
|
|
</span>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-item><span @click="downLoadMyFile(file)" v-if="file.extension !='map' && file.extension !='supermap' ">下载</span></el-dropdown-item>
|
|
|
|
<el-dropdown-item divided><span @click="returnMyFile(file)">放回原处</span></el-dropdown-item>
|
|
|
|
<el-dropdown-item divided><span @click="delMyFile(file)">彻底删除</span></el-dropdown-item>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</div>
|
|
|
|
<strong class="yiyunwenjian_name" :title="file.archName">
|
|
|
|
{{file.archName}}
|
|
|
|
</strong>
|
|
|
|
<span class="yiyunwenjian_infodesc">我的文件</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--删除的文件分组 start-->
|
|
|
|
<div class="yiyun_wenjian_list"
|
|
|
|
v-for="foldergroup in folder.listFoldergroup"
|
|
|
|
:key="foldergroup.folderGroupID"
|
|
|
|
@contextmenu.prevent="rightFoldergroupShowMenu($event, foldergroup)"
|
|
|
|
@click="clickFoldergroup(foldergroup)">
|
|
|
|
<div class="defultImage-mid foldernew-mid" >
|
|
|
|
</div>
|
|
|
|
<strong class="yiyunwenjian_name" >
|
|
|
|
{{foldergroup.folderGroupName}}
|
|
|
|
<!--删除的文件分组 start-->
|
|
|
|
<div
|
|
|
|
class="yiyun_wenjian_list"
|
|
|
|
v-for="foldergroup in folder.listFoldergroup"
|
|
|
|
:key="foldergroup.folderGroupID"
|
|
|
|
@contextmenu.prevent="
|
|
|
|
rightFoldergroupShowMenu($event, foldergroup)
|
|
|
|
"
|
|
|
|
@click="clickFoldergroup(foldergroup)"
|
|
|
|
>
|
|
|
|
<div class="defultImage-mid foldernew-mid"></div>
|
|
|
|
<strong class="yiyunwenjian_name">
|
|
|
|
{{ foldergroup.folderGroupName }}
|
|
|
|
</strong>
|
|
|
|
<!-- <strong class="yiyunwenjian_name">{{foldergroup.childCount}}个项目</strong> -->
|
|
|
|
</div>
|
|
|
|
<!--删除的文件分组 end-->
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_line_border"></div>
|
|
|
|
<!-- 右键文件菜单 -->
|
|
|
|
<div
|
|
|
|
v-show="rightMenuvisible"
|
|
|
|
:style="{ left: left + 'px', top: top + 'px' }"
|
|
|
|
class="contextmenu"
|
|
|
|
>
|
|
|
|
<ul class="rightMenu">
|
|
|
|
<li
|
|
|
|
@click="downLoadMyFile(BtnRightFile)"
|
|
|
|
v-if="
|
|
|
|
BtnRightFile.extension != 'map' &&
|
|
|
|
BtnRightFile.extension != 'supermap'
|
|
|
|
"
|
|
|
|
>
|
|
|
|
下载
|
|
|
|
</li>
|
|
|
|
<li @click="returnMyFile(BtnRightFile)">放回原处</li>
|
|
|
|
<li @click="delMyFile(BtnRightFile)">彻底删除</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<!-- 右键文件分组菜单 -->
|
|
|
|
<div
|
|
|
|
v-show="rightFoldergroupMenuvisible"
|
|
|
|
:style="{ left: left + 'px', top: top + 'px' }"
|
|
|
|
class="contextmenu"
|
|
|
|
>
|
|
|
|
<ul class="rightMenu">
|
|
|
|
<!-- <li @click="downLoadMyFoldergroup()">下载</li> -->
|
|
|
|
<li @click="returnMyFoldergroup()">放回原处</li>
|
|
|
|
<li @click="delMyFoldergroup()">彻底删除</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_line_border"></div>
|
|
|
|
<!-- 右键文件菜单 -->
|
|
|
|
<div v-show="rightMenuvisible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
|
|
|
|
<ul class="rightMenu">
|
|
|
|
<li @click="downLoadMyFile(BtnRightFile)" v-if="BtnRightFile.extension !='map' && BtnRightFile.extension !='supermap' ">下载</li>
|
|
|
|
<li @click="returnMyFile(BtnRightFile)">放回原处</li>
|
|
|
|
<li @click="delMyFile(BtnRightFile)">彻底删除</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<!-- 右键文件分组菜单 -->
|
|
|
|
<div v-show="rightFoldergroupMenuvisible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
|
|
|
|
<ul class="rightMenu">
|
|
|
|
<!-- <li @click="downLoadMyFoldergroup()">下载</li> -->
|
|
|
|
<li @click="returnMyFoldergroup()">放回原处</li>
|
|
|
|
<li @click="delMyFoldergroup()">彻底删除</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
imgSrc: process.env.API_HOST + "archives/cover?path=",
|
|
|
|
filesList: [],
|
|
|
|
projId: sessionStorage.projId,
|
|
|
|
userId: sessionStorage.userId,
|
|
|
|
BtnRightFile: "", //右键文件对象
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
rightMenuvisible: false,
|
|
|
|
isShowRecycleTip:false,
|
|
|
|
/*********分组菜单 ***************/
|
|
|
|
rightFoldergroupMenuvisible:false,
|
|
|
|
btnRightFoldergroup:{},
|
|
|
|
};
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
imgSrc: process.env.API_HOST + "archives/cover?path=",
|
|
|
|
filesList: [],
|
|
|
|
projId: sessionStorage.projId,
|
|
|
|
userId: sessionStorage.userId,
|
|
|
|
BtnRightFile: "", //右键文件对象
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
rightMenuvisible: false,
|
|
|
|
isShowRecycleTip: false,
|
|
|
|
/*********分组菜单 ***************/
|
|
|
|
rightFoldergroupMenuvisible: false,
|
|
|
|
btnRightFoldergroup: {},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
this.listFiles();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
/**
|
|
|
|
* 获取当前工作下文件
|
|
|
|
*/
|
|
|
|
listFiles: function () {
|
|
|
|
var thisApp = this;
|
|
|
|
thisApp.rightMenuvisible = false;
|
|
|
|
thisApp
|
|
|
|
.$axios({
|
|
|
|
method: "get",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST + "folders/resource/recycle/" + thisApp.userId
|
|
|
|
),
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
thisApp.filesList = response.data.data;
|
|
|
|
if (thisApp.filesList.length > 0) {
|
|
|
|
thisApp.isShowRecycleTip = false;
|
|
|
|
} else {
|
|
|
|
thisApp.isShowRecycleTip = true;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
this.listFiles();
|
|
|
|
/**
|
|
|
|
* 下载文件
|
|
|
|
* item:文件对象
|
|
|
|
*/
|
|
|
|
downLoadMyFile: function (item) {
|
|
|
|
if (item.alias != null) {
|
|
|
|
var url = process.env.API_HOST + "archives/download/" + item.archID;
|
|
|
|
var iframe = document.createElement("iframe");
|
|
|
|
iframe.style.display = "none";
|
|
|
|
iframe.src = url;
|
|
|
|
document.body.appendChild(iframe);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
/**
|
|
|
|
* 获取当前工作下文件
|
|
|
|
*/
|
|
|
|
listFiles: function () {
|
|
|
|
var thisApp = this;
|
|
|
|
thisApp.rightMenuvisible = false;
|
|
|
|
thisApp.$axios({
|
|
|
|
method: "get",
|
|
|
|
/**
|
|
|
|
* 还原文件
|
|
|
|
* file:源数据
|
|
|
|
*/
|
|
|
|
returnMyFile: function (file) {
|
|
|
|
var thisApp = this;
|
|
|
|
file.deleted = 0;
|
|
|
|
this.$axios({
|
|
|
|
method: "put",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST +
|
|
|
|
"archives/update/restore/" +
|
|
|
|
file.archID +
|
|
|
|
"/" +
|
|
|
|
sessionStorage.userId
|
|
|
|
),
|
|
|
|
data: file,
|
|
|
|
})
|
|
|
|
.then(function (response) {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
thisApp.listFiles();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 删除我的文件
|
|
|
|
* file:源数据
|
|
|
|
*/
|
|
|
|
delMyFile: function (file) {
|
|
|
|
var thisApp = this;
|
|
|
|
this.$confirm("您正在删除 " + file.archName + " 文件是否继续?", "", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
this.$axios({
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST + "folders/resource/recycle/" + thisApp.userId
|
|
|
|
)
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
thisApp.filesList = response.data.data;
|
|
|
|
if(thisApp.filesList.length>0){
|
|
|
|
thisApp.isShowRecycleTip=false;
|
|
|
|
}else{
|
|
|
|
thisApp.isShowRecycleTip=true;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 下载文件
|
|
|
|
* item:文件对象
|
|
|
|
*/
|
|
|
|
downLoadMyFile: function (item) {
|
|
|
|
if (item.alias != null) {
|
|
|
|
var url = process.env.API_HOST + "archives/download/" + item.archID;
|
|
|
|
var iframe = document.createElement("iframe");
|
|
|
|
iframe.style.display = "none";
|
|
|
|
iframe.src = url;
|
|
|
|
document.body.appendChild(iframe);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 还原文件
|
|
|
|
* file:源数据
|
|
|
|
*/
|
|
|
|
returnMyFile: function (file) {
|
|
|
|
var thisApp = this;
|
|
|
|
file.deleted = 0;
|
|
|
|
this.$axios({
|
|
|
|
method: "put",
|
|
|
|
url: encodeURI(process.env.API_HOST + "archives/update/restore/"+file.archID+'/'+sessionStorage.userId),
|
|
|
|
data: file
|
|
|
|
})
|
|
|
|
.then(function (response) {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
thisApp.listFiles();
|
|
|
|
}
|
|
|
|
process.env.API_HOST +
|
|
|
|
"folders/resource/recycle/" +
|
|
|
|
file.archID +
|
|
|
|
"/" +
|
|
|
|
sessionStorage.userId
|
|
|
|
),
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 删除我的文件
|
|
|
|
* file:源数据
|
|
|
|
*/
|
|
|
|
delMyFile: function (file) {
|
|
|
|
var thisApp = this;
|
|
|
|
this.$confirm("您正在删除 " + file.archName + " 文件是否继续?", "", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
}).then(() => {
|
|
|
|
this.$axios({
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(process.env.API_HOST + "folders/resource/recycle/" +file.archID+'/'+sessionStorage.userId),
|
|
|
|
})
|
|
|
|
.then(function (response) {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
thisApp.$notify({
|
|
|
@@ -223,7 +296,7 @@ |
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
thisApp.listFiles();
|
|
|
|
}
|
|
|
@@ -231,149 +304,165 @@ |
|
|
|
.catch(function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}).catch(()=>{
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 清空
|
|
|
|
*/
|
|
|
|
clearRecycle: function (currFileList) {
|
|
|
|
if (currFileList.length <= 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var listFolder=[];
|
|
|
|
listFolder.push(currFileList);
|
|
|
|
var data= {userId:sessionStorage.userId,listFolder:listFolder};
|
|
|
|
var thisApp = this;
|
|
|
|
this.$confirm("您正在进行清空操作,是否继续?", "", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
}).then(() => {
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 清空
|
|
|
|
*/
|
|
|
|
clearRecycle: function (currFileList) {
|
|
|
|
if (currFileList.length <= 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var listFolder = [];
|
|
|
|
listFolder.push(currFileList);
|
|
|
|
var data = { userId: sessionStorage.userId, listFolder: listFolder };
|
|
|
|
var thisApp = this;
|
|
|
|
this.$confirm("您正在进行清空操作,是否继续?", "", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
this.$axios({
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST + "folders/resource/recycle/listarch"
|
|
|
|
),
|
|
|
|
data: data
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST + "folders/resource/recycle/listarch"
|
|
|
|
),
|
|
|
|
data: data,
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: "清空成功!",
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
thisApp.listFiles();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
.catch((error) => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}).catch(()=>{
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 右键文件
|
|
|
|
*/
|
|
|
|
rightShowMenu: function (e, file) {
|
|
|
|
const menuMinWidth = 10;
|
|
|
|
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
|
|
|
|
const offsetWidth = this.$el.offsetWidth; // container width
|
|
|
|
const maxLeft = offsetWidth - menuMinWidth; // left boundary
|
|
|
|
const left = e.clientX - offsetLeft; // 15: margin right
|
|
|
|
if (left > maxLeft) {
|
|
|
|
this.left = maxLeft;
|
|
|
|
} else {
|
|
|
|
this.left = left;
|
|
|
|
}
|
|
|
|
this.left = e.clientX; // fix 位置bug
|
|
|
|
this.top = e.clientY; // fix 位置bug
|
|
|
|
this.rightMenuvisible = true;
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.BtnRightFile = file;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 关闭右键
|
|
|
|
*/
|
|
|
|
closeShowMenu: function () {
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
},
|
|
|
|
/******* 右键文件分组菜单 *********/
|
|
|
|
clickYinyongWarpBox:function(){
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 单机分组
|
|
|
|
*/
|
|
|
|
clickFoldergroup:function(foldergroup){
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 右键文件分组
|
|
|
|
*/
|
|
|
|
rightFoldergroupShowMenu: function (e, foldergroup){
|
|
|
|
const menuMinWidth = 10;
|
|
|
|
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
|
|
|
|
const offsetWidth = this.$el.offsetWidth; // container width
|
|
|
|
const maxLeft = offsetWidth - menuMinWidth; // left boundary
|
|
|
|
const left = e.clientX - offsetLeft; // 15: margin right
|
|
|
|
if (left > maxLeft) {
|
|
|
|
this.left = maxLeft;
|
|
|
|
} else {
|
|
|
|
this.left = left;
|
|
|
|
}
|
|
|
|
this.left = e.clientX; // fix 位置bug
|
|
|
|
this.top = e.clientY; // fix 位置bug
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
this.rightFoldergroupMenuvisible = true;
|
|
|
|
this.btnRightFoldergroup = foldergroup;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 下载
|
|
|
|
*/
|
|
|
|
downLoadMyFoldergroup(){
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 返回原处
|
|
|
|
*/
|
|
|
|
returnMyFoldergroup(){
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.$confirm("您确定要还原 " + this.btnRightFoldergroup.folderGroupName + " 文件夹,是否继续?", "", {
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 右键文件
|
|
|
|
*/
|
|
|
|
rightShowMenu: function (e, file) {
|
|
|
|
const menuMinWidth = 10;
|
|
|
|
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
|
|
|
|
const offsetWidth = this.$el.offsetWidth; // container width
|
|
|
|
const maxLeft = offsetWidth - menuMinWidth; // left boundary
|
|
|
|
const left = e.clientX - offsetLeft; // 15: margin right
|
|
|
|
if (left > maxLeft) {
|
|
|
|
this.left = maxLeft;
|
|
|
|
} else {
|
|
|
|
this.left = left;
|
|
|
|
}
|
|
|
|
this.left = e.clientX; // fix 位置bug
|
|
|
|
this.top = e.clientY; // fix 位置bug
|
|
|
|
this.rightMenuvisible = true;
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.BtnRightFile = file;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 关闭右键
|
|
|
|
*/
|
|
|
|
closeShowMenu: function () {
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
},
|
|
|
|
/******* 右键文件分组菜单 *********/
|
|
|
|
clickYinyongWarpBox: function () {
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 单机分组
|
|
|
|
*/
|
|
|
|
clickFoldergroup: function (foldergroup) {
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 右键文件分组
|
|
|
|
*/
|
|
|
|
rightFoldergroupShowMenu: function (e, foldergroup) {
|
|
|
|
const menuMinWidth = 10;
|
|
|
|
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
|
|
|
|
const offsetWidth = this.$el.offsetWidth; // container width
|
|
|
|
const maxLeft = offsetWidth - menuMinWidth; // left boundary
|
|
|
|
const left = e.clientX - offsetLeft; // 15: margin right
|
|
|
|
if (left > maxLeft) {
|
|
|
|
this.left = maxLeft;
|
|
|
|
} else {
|
|
|
|
this.left = left;
|
|
|
|
}
|
|
|
|
this.left = e.clientX; // fix 位置bug
|
|
|
|
this.top = e.clientY; // fix 位置bug
|
|
|
|
this.rightMenuvisible = false;
|
|
|
|
this.rightFoldergroupMenuvisible = true;
|
|
|
|
this.btnRightFoldergroup = foldergroup;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 下载
|
|
|
|
*/
|
|
|
|
downLoadMyFoldergroup() {
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 返回原处
|
|
|
|
*/
|
|
|
|
returnMyFoldergroup() {
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.$confirm(
|
|
|
|
"您确定要还原 " +
|
|
|
|
this.btnRightFoldergroup.folderGroupName +
|
|
|
|
" 文件夹,是否继续?",
|
|
|
|
"",
|
|
|
|
{
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
}).then(() => {
|
|
|
|
type: "warning",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
.then(() => {
|
|
|
|
this.$axios({
|
|
|
|
method: "get",
|
|
|
|
url: encodeURI(process.env.API_HOST + "folders/recycle/update/" +this.btnRightFoldergroup.folderGroupID+'/'+sessionStorage.userId),
|
|
|
|
})
|
|
|
|
.then(response=> {
|
|
|
|
method: "get",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST +
|
|
|
|
"folders/recycle/update/" +
|
|
|
|
this.btnRightFoldergroup.folderGroupID +
|
|
|
|
"/" +
|
|
|
|
sessionStorage.userId
|
|
|
|
),
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
this.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.listFiles();
|
|
|
@@ -382,38 +471,52 @@ |
|
|
|
.catch(function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}).catch(()=>{
|
|
|
|
this.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
this.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消操作",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 彻底删除
|
|
|
|
*/
|
|
|
|
delMyFoldergroup:function(){
|
|
|
|
this.rightFoldergroupMenuvisible =false
|
|
|
|
this.$confirm("您正在彻底删除 " + this.btnRightFoldergroup.folderGroupName + " 文件夹,是否继续?", "", {
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 彻底删除
|
|
|
|
*/
|
|
|
|
delMyFoldergroup: function () {
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.$confirm(
|
|
|
|
"您正在彻底删除 " +
|
|
|
|
this.btnRightFoldergroup.folderGroupName +
|
|
|
|
" 文件夹,是否继续?",
|
|
|
|
"",
|
|
|
|
{
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
}).then(() => {
|
|
|
|
type: "warning",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
.then(() => {
|
|
|
|
this.$axios({
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(process.env.API_HOST + "folders/recycle/delete/" +this.btnRightFoldergroup.folderGroupID+'/'+sessionStorage.userId),
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
method: "delete",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST +
|
|
|
|
"folders/recycle/delete/" +
|
|
|
|
this.btnRightFoldergroup.folderGroupID +
|
|
|
|
"/" +
|
|
|
|
sessionStorage.userId
|
|
|
|
),
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
this.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
this.rightFoldergroupMenuvisible = false;
|
|
|
|
this.listFiles();
|
|
|
@@ -422,28 +525,28 @@ |
|
|
|
.catch(function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}).catch(()=>{
|
|
|
|
this.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消删除",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
this.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: "已取消删除",
|
|
|
|
type: "info",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
rightMenuvisiblerightMenuvisible(value) {
|
|
|
|
if (value) {
|
|
|
|
document.body.addEventListener("click", this.closeShowMenu);
|
|
|
|
} else {
|
|
|
|
document.body.removeEventListener("click", this.closeShowMenu);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
rightMenuvisiblerightMenuvisible(value) {
|
|
|
|
if (value) {
|
|
|
|
document.body.addEventListener("click", this.closeShowMenu);
|
|
|
|
} else {
|
|
|
|
document.body.removeEventListener("click", this.closeShowMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style></style>
|