diff --git a/public/resource/font_2024484_fwthqwcsomd.js b/public/resource/font_2024484_fwthqwcsomd.js
deleted file mode 100644
index 87cafde..0000000
--- a/public/resource/font_2024484_fwthqwcsomd.js
+++ /dev/null
@@ -1 +0,0 @@
-window._iconfont_svg_string_2024484='',function(c){var l=(l=document.getElementsByTagName("script"))[l.length-1],a=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,t,p,i,M,d=function(l,a){a.parentNode.insertBefore(l,a)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,a=document.createElement("div");a.innerHTML=c._iconfont_svg_string_2024484,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(l=document.body).firstChild?d(a,l.firstChild):l.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),h()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(p=h,i=c.document,M=!1,F(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,z())})}function z(){M||(M=!0,p())}function F(){try{i.documentElement.doScroll("left")}catch(l){return void setTimeout(F,50)}z()}}(window);
diff --git a/public/resource/font_2024484_jfax4gppvg.js b/public/resource/font_2024484_jfax4gppvg.js
new file mode 100644
index 0000000..9bb7434
--- /dev/null
+++ b/public/resource/font_2024484_jfax4gppvg.js
@@ -0,0 +1 @@
+window._iconfont_svg_string_2024484='',function(c){var l=(l=document.getElementsByTagName("script"))[l.length-1],a=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,t,p,i,M,d=function(l,a){a.parentNode.insertBefore(l,a)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,a=document.createElement("div");a.innerHTML=c._iconfont_svg_string_2024484,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(l=document.body).firstChild?d(a,l.firstChild):l.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),h()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(p=h,i=c.document,M=!1,F(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,z())})}function z(){M||(M=!0,p())}function F(){try{i.documentElement.doScroll("left")}catch(l){return void setTimeout(F,50)}z()}}(window);
diff --git a/src/api/file-api.js b/src/api/file-api.js
index 9b59fed..438399d 100644
--- a/src/api/file-api.js
+++ b/src/api/file-api.js
@@ -100,6 +100,35 @@ export default {
}
})
},
+ // 返回原处
+ restore: function(params) {
+ return request({
+ url: 'restore',
+ method: 'post',
+ params,
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { arrayFormat: 'repeat' })
+ }
+ })
+ },
+ // 彻底删除
+ sweep: function(params) {
+ return request({
+ url: 'sweep',
+ method: 'delete',
+ params,
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { arrayFormat: 'repeat' })
+ }
+ })
+ },
+ // 清空回收站
+ clearTrash: function() {
+ return request({
+ url: 'clear-trash',
+ method: 'delete'
+ })
+ },
// 重名名
rename: function(params) {
return request({
diff --git a/src/components/Icon/Icon.vue b/src/components/Icon/Icon.vue
index dedbfc0..bb33a19 100644
--- a/src/components/Icon/Icon.vue
+++ b/src/components/Icon/Icon.vue
@@ -5,7 +5,7 @@
import { Icon } from 'ant-design-vue'
const IconFont = Icon.createFromIconfontCN({
- scriptUrl: document.location.protocol + '/resource/font_2024484_fwthqwcsomd.js'
+ scriptUrl: document.location.protocol + '/resource/font_2024484_jfax4gppvg.js'
})
// 把此段代码贴到iconfont项目页面的控制台中, 以获取图标列表
@@ -15,7 +15,7 @@ const IconFont = Icon.createFromIconfontCN({
// console.log(iconNames.slice(80,160))
export const iconFonts = {
- list: ['gengxinjindu', 'duigou', 'bars-solid', 'sort-amount-down-solid', 'sort-amount-up-alt-solid', 'tag2', 'guazai', 'duplicate', 'play1', "qrcode", "arrow1_left", "wulianwang-","zuji","disk-drive", "menu-fuzhi", "iso", "zuijinhuoyue","key", "shouquan", "sort", "grid", "list", "emoji-a", "emoji-bizui", "emoji-baiyan", "emoji-aixin", "emoji-dajing", "emoji-ziya", "emoji-daxiao", "emoji-esi", "emoji-fadai", "emoji-fankun", "emoji-ganga", "emoji-fennu", "emoji-hanyan", "emoji-jingkong", "emoji-haochi", "emoji-emo", "emoji-jingsong", "emoji-jingya", "emoji-kaixin", "emoji-lengku", "emoji-danao", "emoji-liukoushui", "emoji-liulei", "emoji-mengbi", "mianwubiaoqing", "nanguo", "shuizhuo", "taoyan", "tanchi", "siliao", "tiaopi", "xiaochulei", "wuliao", "xingxingyan", "xieyan", "xiasi", "xiaolian", "ku", "shengqi", "yousiliao", "en", "bushufu", "bianbian", "fankun1", "feiwen", "ganmao", "huaixiao", "liuhan", "outu", "keshui", "renzhe", "santiaoxian", "guaiwu", "shoushang", "tianshi", "shuai", "xianwen", "xiaodiaodaya", "xiong", "yiwen", "yun", "liubixie", "shimo", "dianzan", "biti", "fendou", "huqi", "heng", "kulou", "leng", "taoyan1", "shuixing", "aini", "aixin1", "zhadan", "xinsui",
+ list: ['huanyuan', 'huishouzhan', 'glb', 'gengxinjindu', 'duigou', 'bars-solid', 'sort-amount-down-solid', 'sort-amount-up-alt-solid', 'tag2', 'guazai', 'duplicate', 'play1', "qrcode", "arrow1_left", "wulianwang-","zuji","disk-drive", "menu-fuzhi", "iso", "zuijinhuoyue","key", "shouquan", "sort", "grid", "list", "emoji-a", "emoji-bizui", "emoji-baiyan", "emoji-aixin", "emoji-dajing", "emoji-ziya", "emoji-daxiao", "emoji-esi", "emoji-fadai", "emoji-fankun", "emoji-ganga", "emoji-fennu", "emoji-hanyan", "emoji-jingkong", "emoji-haochi", "emoji-emo", "emoji-jingsong", "emoji-jingya", "emoji-kaixin", "emoji-lengku", "emoji-danao", "emoji-liukoushui", "emoji-liulei", "emoji-mengbi", "mianwubiaoqing", "nanguo", "shuizhuo", "taoyan", "tanchi", "siliao", "tiaopi", "xiaochulei", "wuliao", "xingxingyan", "xieyan", "xiasi", "xiaolian", "ku", "shengqi", "yousiliao", "en", "bushufu", "bianbian", "fankun1", "feiwen", "ganmao", "huaixiao", "liuhan", "outu", "keshui", "renzhe", "santiaoxian", "guaiwu", "shoushang", "tianshi", "shuai", "xianwen", "xiaodiaodaya", "xiong", "yiwen", "yun", "liubixie", "shimo", "dianzan", "biti", "fendou", "huqi", "heng", "kulou", "leng", "taoyan1", "shuixing", "aini", "aixin1", "zhadan", "xinsui",
"maren", "zhutou", "qie", "youling", "apple-fill", "attachment", "android-fill", "apple", "download", "arrow-up-circle", "arrow-right-circle", "arrow-down", "ashbin", "add", "file_music", "menu", "role", "jiaoseguanli", "yemianshezhi", "drop_down", "yuandian", "tag", "service-directory", "fabu", "wailian", "bianji-", "WEBSITE", "wangzhanguanli", "Up", "up", "fenlei", "guanlizhuanjiawenzhang", "pifu", "tuichudenglu", "shezhi", "wangzhan", "huaban", "yunshezhi", "UserSettings", "blogger", "biaoqian", "myself", "guidang", "quxiaoyulan1-copy", "yulan-copy", "quxiaoyulan1", "yulan"]
}
diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue
index e6b01ba..bfbc770 100644
--- a/src/components/ShowFile/ShowFile.vue
+++ b/src/components/ShowFile/ShowFile.vue
@@ -434,15 +434,6 @@
align="center"
header-align="center"
>
-
-
-
-
{
+ if (this.queryFileType === 'trash') {
+ e.preventDefault()
+ e.stopPropagation()
+ return false
+ }
// 正在选区获取按住关键键时禁止拖拽
if (_this.drawFlag || _this.isCmd || _this.selectPin) {
e.preventDefault()
@@ -2604,10 +2590,12 @@ export default {
child[0].iconClass = 'menu-point'
child[1].iconClass = 'menu-empty'
}
- if (localStorage.getItem('showFolderSize') === 'true') {
- child[2].iconClass = 'duigou'
- } else {
- child[2].iconClass = 'menu-empty'
+ if (child[2]) {
+ if (localStorage.getItem('showFolderSize') === 'true') {
+ child[2].iconClass = 'duigou'
+ } else {
+ child[2].iconClass = 'menu-empty'
+ }
}
}
if (arrangementModeIndex > -1) {
@@ -2863,6 +2851,7 @@ export default {
order: this.sortable.order,
isFolder: this.queryCondition.isFolder,
isFavorite: this.queryCondition.isFavorite,
+ isTrash: this.queryCondition.isTrash,
tagId: this.queryCondition.tagId,
queryCondition: this.queryCondition,
pageIndex: this.pagination.pageIndex,
@@ -3000,7 +2989,8 @@ export default {
if (fileSize > 0) {
fileSum = fileSize + '个文件'
}
- return folderSum + ' ' + fileSum
+ const stand = folderSize > 0 && fileSize > 0 ? '、' : ''
+ return folderSum + stand + fileSum
},
// 计算总大小
getShowSumSize(totalSize) {
@@ -3298,12 +3288,6 @@ export default {
this.clearOnCreateFilename()
}
},
- // 更多操作(多选)
- moreOperation(event) {
- this.menusIsMultiple = true
- this.menus = this.multipleMenus
- this.showOperationMenus(event)
- },
setMenus(row) {
this.menus = JSON.parse(JSON.stringify(this.singleMenus))
// 挂载的文件
@@ -3326,12 +3310,8 @@ export default {
reservations.includes(item.operation)
)
}
- if (!row.isFolder) {
- this.menus.splice(-2, 0, {
- iconClass: 'duplicate',
- label: '创建副本',
- operation: 'duplicate',
- })
+ if (!row.isFolder && this.queryFileType !== 'trash') {
+ this.menus.splice(-2, 0, { iconClass: 'duplicate', label: '创建副本', operation: 'duplicate'})
}
if ((row.isShare && !row.shareBase) || row.ossFolder) {
// 删除分享选项
@@ -3557,6 +3537,9 @@ export default {
case 'createMarkdownFile':
this.newDocument()
break
+ case 'clearTrash':
+ this.clearTrash()
+ break
}
},
// 新建文件
@@ -3642,6 +3625,14 @@ export default {
// 删除
this.deleteFile()
break
+ case 'sweep':
+ // 清空回收站
+ this.sweepFile()
+ break
+ case 'restore':
+ // 返回原处
+ this.restoreFile()
+ break
}
this.$refs.contextShow.hideMenu()
},
@@ -4027,32 +4018,55 @@ export default {
})
} else {
fileIds.push(this.rowContextData.id)
+ fileList.push(this.rowContextData)
}
const str = this.getShowSumFileAndFolder(fileList)
- this.$confirm('此操作将永久删除' + str + ', 是否继续?', '提示', {
+ this.$confirm('将 ' + str + ' 移至回收站, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
- api
- .delete({
+ api.delete({
currentDirectory: this.getQueryPath(),
username: this.$store.state.user.name,
fileIds: fileIds,
- })
- .then(() => {
+ }).then(() => {
// 刷新列表
if (this.$route.query.folder) {
this.getFileList()
}
})
- .then(() => {
- this.$notify({
- title: '删除成功',
- type: 'success',
- duration: 1000,
- })
- })
+ })
+ },
+ restoreFile() {
+ const fileIds = this.getSelectIdList()
+ api.restore({fileIds: fileIds}).then(() => {
+ this.getFileList()
+ })
+ },
+ sweepFile() {
+ const fileIds = this.getSelectIdList()
+ this.$confirm(`此操作将永久删除 ${fileIds.length}个文件, 是否继续?`, '提示', {
+ confirmButtonText: '彻底删除',
+ confirmButtonClass: 'el-button--danger',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }).then(() => {
+ api.sweep({fileIds: fileIds}).then(() => {
+ this.getFileList()
+ })
+ })
+ },
+ clearTrash() {
+ this.$confirm(`是否清空回收站? 此操作将无法还原!!!`, '提示', {
+ confirmButtonText: '清空',
+ confirmButtonClass: 'el-button--danger',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }).then(() => {
+ api.clearTrash().then(() => {
+ this.getFileList()
+ })
})
},
// 获取选中项id列表
@@ -4158,6 +4172,9 @@ export default {
},
// 点击文件或文件夹
fileClick(row) {
+ if (this.queryFileType === 'trash') {
+ return
+ }
if (this.editingIndex === row.index) {
return
}
diff --git a/src/views/setting/sys/logList.vue b/src/views/setting/sys/logList.vue
index c25b61d..1e96248 100644
--- a/src/views/setting/sys/logList.vue
+++ b/src/views/setting/sys/logList.vue
@@ -123,7 +123,7 @@ export default {
isLoginType: this.type === 'LOGIN',
// 查询条件
queryCondition: {
- excludeUsername: 'other',
+ excludeUsername: undefined,
username: undefined,
ip: undefined,
type: this.type,
@@ -191,12 +191,7 @@ export default {
}
this.queryLogList()
},
- queryLogList() {
- if (this.queryCondition.username) {
- this.queryCondition.excludeUsername = null;
- } else {
- this.queryCondition.excludeUsername = 'other';
- }
+ queryLogList(val) {
this.$refs.tableList.initPageIndex()
this.getLogList()
},
diff --git a/src/views/trash/index.vue b/src/views/trash/index.vue
new file mode 100644
index 0000000..ecbacf6
--- /dev/null
+++ b/src/views/trash/index.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+