|
@@ -11,7 +11,7 @@
|
|
|
</div>
|
|
|
<el-divider />
|
|
|
<el-container>
|
|
|
- <el-main class="scroll" style="height: calc(100vh - 279px);">
|
|
|
+ <el-main class="scroll" style="height: calc(100vh - 279px);" @scroll.native="getScroll($event)">
|
|
|
<el-checkbox-group v-if="citiesLeft.length>0" v-model="checkedCitiesLeft" @change="handleCheckedCitiesChange1">
|
|
|
<el-checkbox v-for="item in citiesLeft" :key="item.id" :label="item" class="Layout_flex_start" style="margin: 10px 0;">
|
|
|
<span
|
|
@@ -38,8 +38,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer style="text-align: center; height: 35px;">
|
|
|
- <div v-if="citiesLeft.length > 15" class="solt public_Jump" @click="LoadMore">加载更多 </div>
|
|
|
+ <el-footer v-show="scrollBottom === 0" style="text-align: center; height: 35px;">
|
|
|
+ <el-button class="solt public_Jump" type="text" :loading="loadingBtn" :disabled="Load === '没有更多了'" @click="LoadMore">{{ Load }}</el-button>
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</div>
|
|
@@ -61,7 +61,7 @@
|
|
|
</div>
|
|
|
<el-divider />
|
|
|
<el-container>
|
|
|
- <el-main class="scroll" style="height: calc(100vh - 279px);">
|
|
|
+ <el-main class="scroll" style="height: calc(100vh - 279px);" @scroll.native="getScrollTow($event)">
|
|
|
<el-checkbox-group v-if="cities.length>0" v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
|
<el-checkbox v-for="item in cities" :key="item.id" :label="item" class="Layout_flex_start" style="margin: 10px 0;">
|
|
|
<span
|
|
@@ -88,8 +88,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer style="text-align: center; height: 35px;">
|
|
|
- <div v-if="cities.length > 15" class="solt public_Jump" @click="LoadMore">加载更多 </div>
|
|
|
+ <el-footer v-show="scrollBottomRight === 0" style="text-align: center; height: 35px;">
|
|
|
+ <el-button class="solt public_Jump" type="text" :loading="loadingBtn" :disabled="LoadTow === '没有更多了'" @click="LoadMore">{{ LoadTow }}</el-button>
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</div>
|
|
@@ -134,9 +134,16 @@ export default {
|
|
|
checkedLeft: '',
|
|
|
visibleplanning: this.show,
|
|
|
value1: '',
|
|
|
+ Load: '加载更多',
|
|
|
+ LoadTow: '加载更多',
|
|
|
iterationData: {}, // 当前迭代数据
|
|
|
leftArray: [],
|
|
|
rightArray: [],
|
|
|
+ scrollBottom: '', // 滚动条(左)
|
|
|
+ scrollBottomRight: '', // 滚动条(右)
|
|
|
+ loadingBtn: false, // 更多loading
|
|
|
+ citiesLeftTotal: '', // 左total
|
|
|
+ citiesTotal: '', // 右total
|
|
|
reqRight: [],
|
|
|
size: 50,
|
|
|
bizId: localStorage.getItem('bizId')
|
|
@@ -163,7 +170,9 @@ export default {
|
|
|
const iterationRequireList = iterationRequire({ id: this.iterationId, curIndex: 1, pageSize: 50, bizId: this.bizId })
|
|
|
const iterationRequireRes = await iterationRequireList
|
|
|
this.citiesLeft = iterationRequireRes.data.left.list // 无归属需求
|
|
|
+ this.citiesLeftTotal = iterationRequireRes.data.left.total
|
|
|
this.cities = iterationRequireRes.data.right.list // 迭代下需求
|
|
|
+ this.citiesTotal = iterationRequireRes.data.right.total // 迭代下需求total
|
|
|
},
|
|
|
|
|
|
handleCheckAllChange(val) { // 迭代下需求全选
|
|
@@ -222,6 +231,23 @@ export default {
|
|
|
this.checkedCitiesLeft = []
|
|
|
this.checkedCities = []
|
|
|
},
|
|
|
+
|
|
|
+ getScroll(event) { // 左侧滚动条监控
|
|
|
+ const scrollBottom = event.target.scrollHeight - event.target.scrollTop - event.target.clientHeight // 滚动条距离底部的距离scrollBottom
|
|
|
+ this.scrollBottom = scrollBottom
|
|
|
+ if (this.scrollBottom === 0) {
|
|
|
+ this.citiesLeft.length === this.citiesLeftTotal ? this.Load = '没有更多了' : ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getScrollTow(event) { // 右侧滚动条监控
|
|
|
+ const scrollBottom = event.target.scrollHeight - event.target.scrollTop - event.target.clientHeight // 滚动条距离底部的距离scrollBottom
|
|
|
+ this.scrollBottomRight = scrollBottom
|
|
|
+ if (this.scrollBottomRight === 0) {
|
|
|
+ this.cities.length === this.citiesTotal ? this.LoadTow = '没有更多了' : ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
addRequired() { // 保存迭代下需求
|
|
|
const requirementIds = []
|
|
|
const requiredArr = []
|
|
@@ -238,15 +264,18 @@ export default {
|
|
|
iterationUpdateBelongingIteration(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$emit('update:show', false)
|
|
|
+ this.$emit('iteratioFilter')
|
|
|
this.$message({ showClose: true, message: '保存成功', type: res.msg })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
LoadMore() { // 加载更多
|
|
|
+ this.loadingBtn = true
|
|
|
requirementQueryRequirementInfoList({ name: '', curIndex: 1, pageSize: this.size + 50, iterationId: -1, bizId: this.bizId }).then(res => {
|
|
|
this.citiesLeft = res.data.list
|
|
|
this.size = this.size + 50
|
|
|
+ this.loadingBtn = false
|
|
|
})
|
|
|
},
|
|
|
|