|
@@ -4,8 +4,7 @@
|
|
|
<div class="left-section">
|
|
|
<el-tabs
|
|
|
v-model="selectIndex"
|
|
|
- type="card"
|
|
|
- closable
|
|
|
+ type="card"
|
|
|
@tab-remove="handleRemoveSheet"
|
|
|
@tab-click="handleSwitchSheet"
|
|
|
>
|
|
@@ -97,7 +96,7 @@ export default {
|
|
|
|
|
|
if (this.currentPage<this.maxPage) {
|
|
|
this.currentPage++
|
|
|
- setTimeout(this.loadDataSync(), 1000); // 1秒后加载下一页数据
|
|
|
+ requestAnimationFrame(this.loadDataSync());
|
|
|
}else {
|
|
|
this.isLoadOver = true;
|
|
|
}
|
|
@@ -105,28 +104,26 @@ export default {
|
|
|
|
|
|
/* 分割数据 */
|
|
|
splitSheetData(sheets) {
|
|
|
- this.allSheetData = sheets.map(_ => ({
|
|
|
- index: _.index, //工作表索引
|
|
|
- order: _.order, //工作表的下标
|
|
|
- name: _.name,
|
|
|
- calcChain: _.calcChain,
|
|
|
- celldata: _.celldata,
|
|
|
- config: _.config
|
|
|
- }));
|
|
|
+ // this.allSheetData = sheets.map(_ => ({
|
|
|
+ // index: _.index, //工作表索引
|
|
|
+ // order: _.order, //工作表的下标
|
|
|
+ // name: _.name,
|
|
|
+ // calcChain: _.calcChain,
|
|
|
+ // celldata: _.celldata,
|
|
|
+ // config: _.config
|
|
|
+ // }));
|
|
|
+ // this.maxPage = Math.max(...sheets.map(_ => Math.ceil(_.celldata.length / this.pageSize)))
|
|
|
|
|
|
- this.maxPage = Math.max(...sheets.map(_ => Math.ceil(_.celldata.length / this.pageSize)))
|
|
|
-
|
|
|
- this.sheetConfig.data = this.allSheetData.map(_ => ({
|
|
|
+ this.sheetConfig.data = sheets.map(_ => ({
|
|
|
index: _.index, //工作表索引
|
|
|
order: _.order, //工作表的下标
|
|
|
name: _.name,
|
|
|
calcChain: _.calcChain,
|
|
|
config: _.config,
|
|
|
- celldata: _.celldata
|
|
|
+ celldata: _.celldata,
|
|
|
}));
|
|
|
|
|
|
// this.loadDataSync();
|
|
|
- // console.log(this.sheetConfig.data)
|
|
|
this.isLoading = false;
|
|
|
},
|
|
|
|