diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 912f4f1..18c8c91 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -1,7 +1,7 @@ - + {}) this.path = row.path + row.name }, + openDir(row) { + this.tableLoading = true + api.searchFileAndOpenDir({ + userId: this.$store.state.user.userId, + id: row.id, + currentDirectory: this.$route.query.path, + pageIndex: this.pagination.pageIndex, + pageSize: this.pagination.pageSize + }).then(res => { + this.fileList = res.data + this.fileList.map((item,index) => { + item.index = index + }) + this.clientHeight = document.documentElement.clientHeight - 165 + this.listModeSearch = false + this.listModeSearchOpenDir = false + this.pagination['total'] = res.count + this.$nextTick(()=>{ + this.containerResize() + this.tableLoading = false + }) + // 使列表可拖拽 + this.rowDrop() + }).catch(e => {}) + this.path = row.path + row.name + }, getFileList() { this.tableLoading = true api.fileList({ @@ -1143,11 +1190,19 @@ } }, sortChange(column, prop, order) { - if(this.orderCustom){ + // console.log(this.listModeSearch) + if(this.orderCustom || this.listModeSearch){ console.log('sortChange',column) this.sortable.prop = column.prop this.sortable.order = column.order - this.getFileList(); + + this.pagination.pageIndex = 1 + + if(this.listModeSearch){ + this.searchFile(this.searchFileName) + }else{ + this.getFileList(); + } } }, getSummaries(param) { @@ -1198,7 +1253,8 @@ getShowSumSize(totalSize) { let sizeSum = '' if (totalSize > 0) { - sizeSum = ' 共' + // sizeSum = ' 共' + sizeSum = ' ' } if (totalSize < 1024) { sizeSum += totalSize + 'B' @@ -1834,7 +1890,7 @@ this.pagination.pageIndex = 1 const path = encodeURIComponent(this.path); this.$router.push(`?vmode=${this.vmode}&path=${path}`) - this.searchFileAndOpenDir(row) + this.openDir(row) // this.getFileList() } } else { diff --git a/src/components/SimpleUploader/globalUploader.vue b/src/components/SimpleUploader/globalUploader.vue index 59f970d..e782b03 100755 --- a/src/components/SimpleUploader/globalUploader.vue +++ b/src/components/SimpleUploader/globalUploader.vue @@ -125,7 +125,6 @@ export default { query() {} }, attrs: { - // accept: ACCEPT_CONFIG.getAll() accept: '*' }, statusText: { diff --git a/src/main.js b/src/main.js index d7add96..d06b6fd 100644 --- a/src/main.js +++ b/src/main.js @@ -80,6 +80,14 @@ Vue.use(EVueContextmenu) Vue.config.productionTip = false +import plTable from 'pl-table' + +import 'pl-table/themes/index.css' // 引入样式(必须引入),请查看webpack是否配置了url-loader对woff,ttf文件的引用,不配置会报错哦 + +// import 'pl-table/themes/plTableStyle.css' // 默认表格样式很丑 引入这个样式就可以好看啦(如果你不喜欢这个样式,就不要引入,不引入就跟ele表格样式一样) + +Vue.use(plTable); + new Vue({ el: '#app', router, diff --git a/src/views/demo/index.vue b/src/views/demo/index.vue index caba8bd..39d2bc3 100644 --- a/src/views/demo/index.vue +++ b/src/views/demo/index.vue @@ -114,18 +114,4 @@ } diff --git a/src/views/favorite/index.vue b/src/views/favorite/index.vue index 209b63e..9f1ef4b 100644 --- a/src/views/favorite/index.vue +++ b/src/views/favorite/index.vue @@ -3,8 +3,9 @@
- +
diff --git a/src/views/fileType/document.vue b/src/views/fileType/document.vue index f879b39..9c7224e 100644 --- a/src/views/fileType/document.vue +++ b/src/views/fileType/document.vue @@ -1,6 +1,10 @@ diff --git a/src/views/fileType/image.vue b/src/views/fileType/image.vue index f07c480..0ac6d9a 100644 --- a/src/views/fileType/image.vue +++ b/src/views/fileType/image.vue @@ -1,6 +1,10 @@ diff --git a/src/views/fileType/video.vue b/src/views/fileType/video.vue index f17273d..3aa493a 100644 --- a/src/views/fileType/video.vue +++ b/src/views/fileType/video.vue @@ -1,6 +1,10 @@ diff --git a/src/views/recently/index.vue b/src/views/recently/index.vue index b51e7fe..7e3f62d 100644 --- a/src/views/recently/index.vue +++ b/src/views/recently/index.vue @@ -1,6 +1,12 @@