|
|
@@ -8,12 +8,12 @@
|
|
|
</span>
|
|
|
</filterList>
|
|
|
<!--素材列表-->
|
|
|
- <list :fileData="fileData" @listItemClick="listItemClick" :isHandle="false"
|
|
|
+ <list @pullElementLoad="pullElementLoad" :fileData="fileData" @listItemClick="listItemClick" :isHandle="false"
|
|
|
v-if="tool.checkAuth($route.name, 'read')">
|
|
|
</list>
|
|
|
- <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
|
|
|
+ <!-- <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
|
|
|
@pageChange="pageChange">
|
|
|
- </pagination>
|
|
|
+ </pagination> -->
|
|
|
<detail ref="detail" v-if="currentFile" :currentSelectFile="currentFile"></detail>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
"method": "selectList",
|
|
|
"content": {
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 12,
|
|
|
+ "pageSize": 30,
|
|
|
"nocache": true,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
@@ -60,6 +60,7 @@ export default {
|
|
|
//分类列表
|
|
|
selectList: [],
|
|
|
total: 0,
|
|
|
+ totalPage:0,
|
|
|
//当前查看的素材
|
|
|
currentFile: ''
|
|
|
};
|
|
|
@@ -87,6 +88,7 @@ export default {
|
|
|
if (init) this.params.content.pageNumber = 1;
|
|
|
let res = await this.$api.requested(this.params)
|
|
|
this.total = res.total
|
|
|
+ this.totalPage = res.pageTotal
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
let list = this.fileType.fileList(res.data[i].attinfos)
|
|
|
if (!list.length) continue;
|
|
|
@@ -99,10 +101,17 @@ export default {
|
|
|
let deleteList = [];
|
|
|
res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
|
|
|
if (deleteList.length != 0) this.handleDelete(deleteList);
|
|
|
- this.fileData = res.data
|
|
|
+ this.fileData = this.params.content.pageNumber == 1 ? res.data : this.fileData.concat(res.data)
|
|
|
+ // this.fileData = res.data
|
|
|
this.params.content.sort = res.sort
|
|
|
console.log(this.fileData);
|
|
|
},
|
|
|
+ pullElementLoad () {
|
|
|
+ if (this.params.content.pageNumber == this.totalPage) return
|
|
|
+ this.params.content.pageNumber += 1
|
|
|
+ this.getFileList()
|
|
|
+ console.log('触底');
|
|
|
+ },
|
|
|
/* 改变分类ID */
|
|
|
changeTypeId(id) {
|
|
|
this.params.content.where.sat_sharematerial_classid = id == 0 ? null : id;
|