|
@@ -2631,37 +2631,39 @@ export default {
|
|
|
list.push(element.id)
|
|
list.push(element.id)
|
|
|
});
|
|
});
|
|
|
this.agreementSelectionList = list;
|
|
this.agreementSelectionList = list;
|
|
|
- if(val.length>0) {
|
|
|
|
|
- this.$set(this.hasSelectedList, this.pageNum-1, val)
|
|
|
|
|
- this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
- if(this.hadSelectedList.length> 0) {
|
|
|
|
|
- this.selectedLength = 0
|
|
|
|
|
- this.hadSelectedList.forEach(item => {
|
|
|
|
|
- this.selectedLength += item.length
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$set(this.hasSelectedList, this.pageNum-1, [])
|
|
|
|
|
- this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
- if(this.hadSelectedList.length> 0) {
|
|
|
|
|
- this.selectedLength = 0
|
|
|
|
|
- this.hadSelectedList.forEach(item => {
|
|
|
|
|
- this.selectedLength += item.length
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.selectedLength = val.length>0?val.length:0
|
|
|
|
|
+ // if(val.length>0) {
|
|
|
|
|
+ // this.$set(this.hasSelectedList, this.pageNum-1, val)
|
|
|
|
|
+ // this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
+ // if(this.hadSelectedList.length> 0) {
|
|
|
|
|
+ // this.selectedLength = 0
|
|
|
|
|
+ // this.hadSelectedList.forEach(item => {
|
|
|
|
|
+ // this.selectedLength += item.length
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.$set(this.hasSelectedList, this.pageNum-1, [])
|
|
|
|
|
+ // this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
+ // if(this.hadSelectedList.length> 0) {
|
|
|
|
|
+ // this.selectedLength = 0
|
|
|
|
|
+ // this.hadSelectedList.forEach(item => {
|
|
|
|
|
+ // this.selectedLength += item.length
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
handleSelectChange(rows) {
|
|
handleSelectChange(rows) {
|
|
|
- if(rows.length>0) {
|
|
|
|
|
- this.$set(this.hasSelectedList, this.pageNum-1, rows)
|
|
|
|
|
- this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
- if(this.hadSelectedList.length> 0) {
|
|
|
|
|
- this.selectedLength = 0
|
|
|
|
|
- this.hadSelectedList.forEach(item => {
|
|
|
|
|
- this.selectedLength += item.length
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.selectedLength = rows.length>0?rows.length:0
|
|
|
|
|
+ // if(rows.length>0) {
|
|
|
|
|
+ // this.$set(this.hasSelectedList, this.pageNum-1, rows)
|
|
|
|
|
+ // this.hadSelectedList = [...this.hasSelectedList]
|
|
|
|
|
+ // if(this.hadSelectedList.length> 0) {
|
|
|
|
|
+ // this.selectedLength = 0
|
|
|
|
|
+ // this.hadSelectedList.forEach(item => {
|
|
|
|
|
+ // this.selectedLength += item.length
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
agreementCurrentChange(val) {
|
|
agreementCurrentChange(val) {
|
|
|
this.agreementActiveInfo = val;
|
|
this.agreementActiveInfo = val;
|
|
@@ -3913,20 +3915,6 @@ export default {
|
|
|
this.pageNum = res.data.pageNum;
|
|
this.pageNum = res.data.pageNum;
|
|
|
this.pageSize = res.data.pageSize;
|
|
this.pageSize = res.data.pageSize;
|
|
|
this.totalSize = res.data.totalSize;
|
|
this.totalSize = res.data.totalSize;
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- if(this.hadSelectedList[this.pageNum-1]) {
|
|
|
|
|
- this.hadSelectedList[this.pageNum-1].forEach(item => {
|
|
|
|
|
- let row = this.pageResult.find(sub => item.id === sub.id)
|
|
|
|
|
- this.$refs.multipleTable.toggleRowSelection(row)
|
|
|
|
|
- })
|
|
|
|
|
- if(this.hadSelectedList.length> 0) {
|
|
|
|
|
- this.selectedLength = 0
|
|
|
|
|
- this.hadSelectedList.forEach(item => {
|
|
|
|
|
- this.selectedLength += item.length
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
}
|