|
@ -321,7 +321,7 @@ export default { |
|
|
|
|
|
|
|
|
this.selectAll = allSelected; |
|
|
this.selectAll = allSelected; |
|
|
this.isIndeterminate = !noneSelected && !allSelected; |
|
|
this.isIndeterminate = !noneSelected && !allSelected; |
|
|
console.log(this.sortedProjectRows,'sortedProjectRows=='); |
|
|
// console.log(this.sortedProjectRows,'sortedProjectRows=='); |
|
|
this.selectedCount = this.sortedProjectRows.length; |
|
|
this.selectedCount = this.sortedProjectRows.length; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -329,13 +329,11 @@ export default { |
|
|
// console.log('操作的行:', row); |
|
|
// console.log('操作的行:', row); |
|
|
// console.log('当前所有选中行:', selection); |
|
|
// console.log('当前所有选中行:', selection); |
|
|
if (this.sortedProjectRows.includes(row)) { |
|
|
if (this.sortedProjectRows.includes(row)) { |
|
|
// console.log('删除当前选中项',this.sortedProjectRows); |
|
|
|
|
|
let index = this.sortedProjectRows.findIndex((item) => item.id === row.id); |
|
|
let index = this.sortedProjectRows.findIndex((item) => item.id === row.id); |
|
|
if (index > -1) { |
|
|
if (index > -1) { |
|
|
this.sortedProjectRows.splice(index, 1) |
|
|
this.sortedProjectRows.splice(index, 1) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
console.log('zoudaolezheli '); |
|
|
|
|
|
this.sortedProjectRows.push(row) |
|
|
this.sortedProjectRows.push(row) |
|
|
} |
|
|
} |
|
|
this.updateSelectionState() |
|
|
this.updateSelectionState() |
|
@ -448,7 +446,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleConfirm() { |
|
|
handleConfirm() { |
|
|
let project_infos = []; |
|
|
let project_infos = []; |
|
|
this.selectedRows.forEach(item => { |
|
|
this.sortedProjectRows.forEach(item => { |
|
|
project_infos.push({ project_id: item.id, num: item.num || item.unit_num }) |
|
|
project_infos.push({ project_id: item.id, num: item.num || item.unit_num }) |
|
|
}) |
|
|
}) |
|
|
let props = { |
|
|
let props = { |
|
@ -494,8 +492,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
confirmClick() { |
|
|
confirmClick() { |
|
|
console.log(this.sortedProjectList, 'sortedProjectList=='); |
|
|
// console.log(this.sortedProjectList, 'sortedProjectList=='); |
|
|
console.log(this.sortedProjectRows, 'sortedProjectRows=='); |
|
|
// console.log(this.sortedProjectRows, 'sortedProjectRows=='); |
|
|
// // 校验必输 |
|
|
// // 校验必输 |
|
|
this.$refs['siteForm1'].validate((valid) => { |
|
|
this.$refs['siteForm1'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|