|
@@ -979,7 +979,7 @@ import { number } from 'echarts';
|
|
},
|
|
},
|
|
// 比对
|
|
// 比对
|
|
batchDuiBi(){
|
|
batchDuiBi(){
|
|
- console.log(this.selectedRowKeys,this.selectionRows)
|
|
|
|
|
|
+ // console.log(this.selectedRowKeys,this.selectionRows)
|
|
// console.log(JSON.stringify(this.selectedRowKeys))
|
|
// console.log(JSON.stringify(this.selectedRowKeys))
|
|
|
|
|
|
var selectTasknos = this.selectionRows.map( res => {
|
|
var selectTasknos = this.selectionRows.map( res => {
|
|
@@ -1091,13 +1091,26 @@ import { number } from 'echarts';
|
|
},
|
|
},
|
|
// 比对禁选判断
|
|
// 比对禁选判断
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
|
+ console.log(selectedRowKeys, selectionRows)
|
|
|
|
+ // this.selectedRowKeys = selectedRowKeys;
|
|
|
|
+ // this.selectionRows = selectionRows;
|
|
|
|
+ // 解决分页后selectionRows只获取本页面勾选的问题
|
|
|
|
+ for (let val of selectionRows) {
|
|
|
|
+ if (!this.selectionRows.find((item) => item.id === val.id)) {
|
|
|
|
+ this.selectionRows.push(val);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
- this.selectionRows = selectionRows;
|
|
|
|
|
|
+ this.selectionRows = this.selectionRows.filter((item) =>
|
|
|
|
+ this.selectedRowKeys.includes(item.id)
|
|
|
|
+ );
|
|
|
|
+
|
|
},
|
|
},
|
|
onSelect(record, selected, selectedRows, nativeEvent){
|
|
onSelect(record, selected, selectedRows, nativeEvent){
|
|
console.log(record, selected, selectedRows, nativeEvent)
|
|
console.log(record, selected, selectedRows, nativeEvent)
|
|
|
|
+ console.log(this.selectionRows)
|
|
if(selected) {
|
|
if(selected) {
|
|
- if (selectedRows.length == 1) {
|
|
|
|
|
|
+ if (this.selectionRows.length == 1) {
|
|
this.chooseRowType = record.ji
|
|
this.chooseRowType = record.ji
|
|
this.chooseStatus = true
|
|
this.chooseStatus = true
|
|
} else {
|
|
} else {
|
|
@@ -1108,8 +1121,8 @@ import { number } from 'echarts';
|
|
this.$message.error("请选择同级项进行比对");
|
|
this.$message.error("请选择同级项进行比对");
|
|
} else{
|
|
} else{
|
|
// this.chooseStatus = false
|
|
// this.chooseStatus = false
|
|
- for (let i = 0; i < selectedRows.length; i++) {
|
|
|
|
- const element = selectedRows[i].ji;
|
|
|
|
|
|
+ for (let i = 0; i < this.selectionRows.length; i++) {
|
|
|
|
+ const element = this.selectionRows[i].ji;
|
|
console.log(888,this.chooseRowType,element)
|
|
console.log(888,this.chooseRowType,element)
|
|
if (this.chooseRowType != element) {
|
|
if (this.chooseRowType != element) {
|
|
this.chooseStatus = true
|
|
this.chooseStatus = true
|
|
@@ -1120,13 +1133,13 @@ import { number } from 'echarts';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else{
|
|
} else{
|
|
- if (selectedRows.length == 1) {
|
|
|
|
|
|
+ if (this.selectionRows.length == 1) {
|
|
console.log(777,this.selectionRows[0].ji)
|
|
console.log(777,this.selectionRows[0].ji)
|
|
this.chooseRowType = this.selectionRows[0].ji
|
|
this.chooseRowType = this.selectionRows[0].ji
|
|
this.chooseStatus = true
|
|
this.chooseStatus = true
|
|
} else {
|
|
} else {
|
|
- for (let i = 0; i < selectedRows.length; i++) {
|
|
|
|
- const element = selectedRows[i].ji;
|
|
|
|
|
|
+ for (let i = 0; i < this.selectionRows.length; i++) {
|
|
|
|
+ const element = this.selectionRows[i].ji;
|
|
console.log(888,this.chooseRowType,element)
|
|
console.log(888,this.chooseRowType,element)
|
|
if (this.chooseRowType != element) {
|
|
if (this.chooseRowType != element) {
|
|
this.chooseStatus = true
|
|
this.chooseStatus = true
|