|
@@ -10,12 +10,15 @@
|
|
|
<hot-new-control :sortType= 'params.content.where.sorttype'
|
|
|
@sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name,'read')"></hot-new-control>
|
|
|
</div>
|
|
|
- <!--文件展示-->
|
|
|
- <file-list :fileData="fileData"
|
|
|
- @upFileData="upFileData"
|
|
|
- @statusChange="statusChange" v-if="tool.checkAuth($route.name,'read')"></file-list>
|
|
|
- <!--文件信息面板-->
|
|
|
- <drawer :isFileInfoPanlShow="isFileInfoPanlShow"></drawer>
|
|
|
+ <div class="content">
|
|
|
+ <!--文件展示-->
|
|
|
+ <file-list :fileData="fileData"
|
|
|
+ @upFileData="upFileData"
|
|
|
+ @statusChange="statusChange" v-if="tool.checkAuth($route.name,'read')"></file-list>
|
|
|
+ <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
|
|
|
+ @pageChange="pageChange">
|
|
|
+ </pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -27,6 +30,7 @@ import BreadCrumbs from '@/components/bread-crumbs/BreadCrumbs'
|
|
|
import Drawer from '@/SManagement/archives/components/Drawer'
|
|
|
import search from '@/components/search/index'
|
|
|
import matchingFileType from '@/utils/matchingFeilType'
|
|
|
+import Pagination from '@/components/pagination/Pagination'
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
data() {
|
|
@@ -38,11 +42,10 @@ export default {
|
|
|
"content": {
|
|
|
"nocache":true,
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 99999999,
|
|
|
+ "pageSize": 25,
|
|
|
"parentid": 1,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
- "sorttype": 1
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -53,22 +56,10 @@ export default {
|
|
|
* @param tempData :临时数据
|
|
|
*/
|
|
|
tempFileData: [{
|
|
|
- filename: '根目录',
|
|
|
+ filename: '文件',
|
|
|
id: null,
|
|
|
tempData: ''
|
|
|
}],
|
|
|
- //类型选择数据
|
|
|
- titleLists: [
|
|
|
- { name: '全部',type: 'all'},
|
|
|
- { name: 'Word',type: 'word'},
|
|
|
- { name: 'Excel',type: 'excel'},
|
|
|
- { name: 'PPT',type: 'ppt'},
|
|
|
- { name: 'PDF',type: 'pdf'},
|
|
|
- { name: '图片',type: 'image'},
|
|
|
- { name: '视频',type: 'video'},
|
|
|
- { name: '压缩包',type: 'zip'},
|
|
|
- { name: '文本',type: 'txt'},
|
|
|
- ],
|
|
|
fileData:[],
|
|
|
//当前选择的文件类型
|
|
|
isType: 'all',
|
|
@@ -86,6 +77,7 @@ export default {
|
|
|
HotNewControl,
|
|
|
BreadCrumbs,
|
|
|
Drawer,
|
|
|
+ Pagination
|
|
|
},
|
|
|
computed:{
|
|
|
},
|
|
@@ -122,20 +114,11 @@ export default {
|
|
|
id: id
|
|
|
})
|
|
|
},
|
|
|
- //监听类型选择组件发出的更改事件
|
|
|
- CurrentSelectType(type) {
|
|
|
- this.isType = type
|
|
|
- this.$api.requested(this.params).then(res => {
|
|
|
- this.fileData = this.filterFileData(matchingFileType.fileList(res.data),type)
|
|
|
- this.total = !this.fileData ? 0 : this.fileData.length
|
|
|
- })
|
|
|
- },
|
|
|
//面包屑发出的事件
|
|
|
BreadCrumbsChange(index) {
|
|
|
if(this.tempFileData.length <=1) return
|
|
|
- this.isType = 'all'
|
|
|
this.params.content.parentid = index
|
|
|
- this.$refs.selectPanl.currentName = 'all'
|
|
|
+ this.params.content.pageNumber = 1
|
|
|
this.tempFileData.splice(this.tempFileData.indexOf(this.tempFileData.find(item => item.id == index)) + 1)
|
|
|
this.getFileList()
|
|
|
|
|
@@ -147,8 +130,6 @@ export default {
|
|
|
},
|
|
|
//监听最热组件变化
|
|
|
async sortTypeChange(id) {
|
|
|
- this.isType = 'all'
|
|
|
- this.$refs.selectPanl.currentName = 'all'
|
|
|
this.params.content.where.sorttype = id
|
|
|
this.params.content.parentid = 1
|
|
|
this.tempFileData.splice(1)
|
|
@@ -161,6 +142,10 @@ export default {
|
|
|
return file.filter(item => {
|
|
|
return item.postfix == type
|
|
|
})
|
|
|
+ },
|
|
|
+ pageChange(b) {
|
|
|
+ this.params.content.pageNumber = b
|
|
|
+ this.getFileList()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -190,4 +175,15 @@ export default {
|
|
|
.normal-card .header-panl .el-dropdown .el-dropdown-link .select {
|
|
|
margin-left: 8px;
|
|
|
}
|
|
|
+ .normal-card .content {
|
|
|
+ position: relative;
|
|
|
+ padding-bottom: 30px;
|
|
|
+ min-height: calc(100vh - 270px);
|
|
|
+ }
|
|
|
+ .normal-card .content .el-pagination {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ right: 16px;
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
</style>
|