|
|
@ -4,13 +4,13 @@ |
|
|
<div style="display: flex"> |
|
|
<div style="display: flex"> |
|
|
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu"> |
|
|
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu"> |
|
|
<div> |
|
|
<div> |
|
|
<el-table :data="tableData" border |
|
|
|
|
|
|
|
|
<u-table :data="tableData" border |
|
|
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)" |
|
|
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)" |
|
|
highlight-current-row @row-click="rowClick" size="small" row-key="id" |
|
|
highlight-current-row @row-click="rowClick" size="small" row-key="id" |
|
|
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info" |
|
|
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info" |
|
|
:row-class-name="handleRowClassName"> |
|
|
|
|
|
<el-table-column type="selection" width="40" align="center"></el-table-column> |
|
|
|
|
|
<el-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type" |
|
|
|
|
|
|
|
|
:row-class-name="handleRowClassName" use-virtual :row-height="30" @table-body-scroll="scrollFull" big-data-checkbox :data-changes-scroll-top="false"> |
|
|
|
|
|
<u-table-column type="selection" width="40" align="center"></u-table-column> |
|
|
|
|
|
<u-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type" |
|
|
:min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label" |
|
|
:min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label" |
|
|
:prop="dragCol[index].prop" :sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"> |
|
|
:prop="dragCol[index].prop" :sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"> |
|
|
<template slot-scope="scope" v-if="!(dragCol[index].type)"> |
|
|
<template slot-scope="scope" v-if="!(dragCol[index].type)"> |
|
|
@ -91,7 +91,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</u-table-column> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
<!-- |
|
|
@ -120,7 +120,7 @@ |
|
|
"creatorId": null, |
|
|
"creatorId": null, |
|
|
"id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f" |
|
|
"id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f" |
|
|
--> |
|
|
--> |
|
|
</el-table> |
|
|
|
|
|
|
|
|
</u-table> |
|
|
<div style="display: flex;justify-content:space-between;"> |
|
|
<div style="display: flex;justify-content:space-between;"> |
|
|
<div></div> |
|
|
<div></div> |
|
|
<div> |
|
|
<div> |
|
|
@ -428,7 +428,7 @@ export default { |
|
|
dialogColSort: false, |
|
|
dialogColSort: false, |
|
|
|
|
|
|
|
|
dom: null, //用于滚动加载数据 |
|
|
dom: null, //用于滚动加载数据 |
|
|
lazyLoading: false, //是否懒加载中 |
|
|
|
|
|
|
|
|
// lazyLoading: false, //是否懒加载中 |
|
|
loadOpts: { |
|
|
loadOpts: { |
|
|
totalCount: 0, |
|
|
totalCount: 0, |
|
|
skipCount: 0, |
|
|
skipCount: 0, |
|
|
@ -480,13 +480,11 @@ export default { |
|
|
this.quickAsb = this.dict.asbItemAll; |
|
|
this.quickAsb = this.dict.asbItemAll; |
|
|
|
|
|
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.scrollFull() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if(this.$refs.info){ |
|
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
|
// this.scrollFull() |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState([ |
|
|
...mapState([ |
|
|
@ -1230,25 +1228,33 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//滚动加载数据 |
|
|
//滚动加载数据 |
|
|
scrollFull() { |
|
|
|
|
|
this.dom = this.$refs['info'].bodyWrapper |
|
|
|
|
|
// console.log('this.dom', this.dom) |
|
|
|
|
|
|
|
|
|
|
|
this.dom.addEventListener('scroll', async () => { |
|
|
|
|
|
// // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); |
|
|
|
|
|
if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { |
|
|
|
|
|
// 获取到的不是全部数据 当滚动到底部 |
|
|
|
|
|
// console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); |
|
|
|
|
|
|
|
|
async scrollFull(scroll,event) { |
|
|
|
|
|
console.log(scroll) |
|
|
|
|
|
if(scroll.judgeFlse){ |
|
|
if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
this.lazyLoading = false |
|
|
|
|
|
|
|
|
return |
|
|
} else { |
|
|
} else { |
|
|
this.lazyLoading = true |
|
|
|
|
|
await this.load() |
|
|
await this.load() |
|
|
this.lazyLoading = false |
|
|
|
|
|
// this.dom.scrollTop = this.dom.scrollTop - 100 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
// this.dom = this.$refs.info.bodyWrapper |
|
|
|
|
|
// console.log('this.dom', this.dom) |
|
|
|
|
|
|
|
|
|
|
|
// this.dom.addEventListener('scroll', async () => { |
|
|
|
|
|
// // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); |
|
|
|
|
|
// if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { |
|
|
|
|
|
// // 获取到的不是全部数据 当滚动到底部 |
|
|
|
|
|
// // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); |
|
|
|
|
|
// if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
|
|
|
// this.lazyLoading = false |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.lazyLoading = true |
|
|
|
|
|
// await this.load() |
|
|
|
|
|
// this.lazyLoading = false |
|
|
|
|
|
// // this.dom.scrollTop = this.dom.scrollTop - 100 |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|