|
@@ -4,17 +4,19 @@
|
|
|
<bread-crumbs :tempFileData="tempFileData" @BreadCrumbsChange="BreadCrumbsChange">
|
|
|
</bread-crumbs>
|
|
|
<div class="header-panl">
|
|
|
- <!--类型选择面板-->
|
|
|
- <!-- <select-panl :titleLists="titleLists" @CurrentSelectType="CurrentSelectType" ref="selectPanl" v-if="tool.checkAuth($route.name,'read')"></select-panl> -->
|
|
|
<search @searchActive="searchActive" @clearData="clearData"></search>
|
|
|
<!--切换最热最新-->
|
|
|
<hot-new-control @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name, 'read')"></hot-new-control>
|
|
|
</div>
|
|
|
- <!--文件展示-->
|
|
|
- <file-list :fileData="fileData" @upFileData="upFileData" @statusChange="statusChange" :isCollect="true"
|
|
|
- v-if="tool.checkAuth($route.name, 'read')">
|
|
|
- </file-list>
|
|
|
-
|
|
|
+ <div class="content">
|
|
|
+ <!--文件展示-->
|
|
|
+ <file-list :fileData="fileData" @upFileData="upFileData" @statusChange="statusChange" :isCollect="true"
|
|
|
+ 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>
|
|
|
|
|
@@ -24,6 +26,8 @@ import SelectPanl from '@/SManagement/submitedit_one/components/SelectPanl'
|
|
|
import HotNewControl from '@/components/hot-new-control/HotNewControl'
|
|
|
import search from '@/components/search/index'
|
|
|
import BreadCrumbs from '@/components/bread-crumbs/BreadCrumbs'
|
|
|
+import Pagination from '@/components/pagination/Pagination'
|
|
|
+
|
|
|
import { log } from '@antv/g2plot/lib/utils'
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -36,7 +40,7 @@ export default {
|
|
|
"content": {
|
|
|
"nocache": true,
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 9999999999999,
|
|
|
+ "pageSize": 2,
|
|
|
"parentid": JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
@@ -52,18 +56,6 @@ export default {
|
|
|
filename: '文件',
|
|
|
id: null,
|
|
|
}],
|
|
|
- //类型选择数据
|
|
|
- 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: [],
|
|
|
allFileData: [],
|
|
|
//当前选择的文件类型
|
|
@@ -82,6 +74,7 @@ export default {
|
|
|
FileList,
|
|
|
HotNewControl,
|
|
|
BreadCrumbs,
|
|
|
+ Pagination
|
|
|
},
|
|
|
computed: {
|
|
|
},
|
|
@@ -102,6 +95,10 @@ export default {
|
|
|
this.allFileData = this.fileType.fileList(res.data)
|
|
|
this.fileData = this.filterFileData(this.allFileData, this.isType)
|
|
|
},
|
|
|
+ pageChange(n) {
|
|
|
+ this.params.content.pageNumber = n
|
|
|
+ this.getFileList()
|
|
|
+ },
|
|
|
searchActive(txt) {
|
|
|
this.params.content.where.condition = txt
|
|
|
this.getFileList()
|
|
@@ -122,20 +119,13 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- //监听类型选择组件发出的更改事件
|
|
|
- CurrentSelectType(type) {
|
|
|
- this.isType = type
|
|
|
- this.fileData = this.filterFileData(this.allFileData, type)
|
|
|
- },
|
|
|
//面包屑发出的事件
|
|
|
BreadCrumbsChange(index) {
|
|
|
if (this.tempFileData.length <= 1) return
|
|
|
- this.isType = 'all'
|
|
|
this.params.content.parentid = index
|
|
|
- this.$refs.selectPanl.currentName = 'all'
|
|
|
this.tempFileData.splice(this.tempFileData.indexOf(this.tempFileData.find(item => item.id == index)) + 1)
|
|
|
+ this.params.content.pageNumber = 1
|
|
|
this.getFileList()
|
|
|
-
|
|
|
},
|
|
|
//修改收藏状态
|
|
|
statusChange(id, item) {
|
|
@@ -192,4 +182,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 - 240px);
|
|
|
+}
|
|
|
+.normal-card .content .el-pagination {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ right: 16px;
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
</style>
|