|
|
@ -262,7 +262,6 @@ export default { |
|
|
|
// 清除当前视图的选中状态 |
|
|
|
this.$refs.multipleTable.$refs.guiptable.clearSelection(); |
|
|
|
this.selectedRows = [];//当前表格选中项 |
|
|
|
// console.log(this.selectedRows, this.sortedProjectRows, 'sortedProjectList=='); |
|
|
|
// 设置当前视图中应该选中的项 |
|
|
|
this.sortedProjectList.forEach(row => { |
|
|
|
if (this.sortedProjectRows.some(selected => selected.id === row.id)) { |
|
|
@ -294,7 +293,7 @@ export default { |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
if (response.code == 0 && response.data.list) { |
|
|
|
this.projectTagData = response.data.classify; |
|
|
|
this.projectList = Object.values(response.data.list).map(item => ({ |
|
|
|
...item, |
|
|
@ -310,17 +309,6 @@ export default { |
|
|
|
}, |
|
|
|
inputBlur(val) { |
|
|
|
// 搜索项目 |
|
|
|
// this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
|
// projectSearchId: this.projectSearchId, |
|
|
|
// search: this.projectSearchName |
|
|
|
// }).then(response => { |
|
|
|
// if (response.code == 0) { |
|
|
|
// this.dialogVisible = false; |
|
|
|
// } |
|
|
|
|
|
|
|
// }).catch(error => { |
|
|
|
// console.error(error, 'error') |
|
|
|
// }) |
|
|
|
console.log(val, '----搜索'); |
|
|
|
}, |
|
|
|
updateSelectionState() { |
|
|
@ -333,6 +321,7 @@ export default { |
|
|
|
|
|
|
|
this.selectAll = allSelected; |
|
|
|
this.isIndeterminate = !noneSelected && !allSelected; |
|
|
|
console.log(this.sortedProjectRows,'sortedProjectRows=='); |
|
|
|
this.selectedCount = this.sortedProjectRows.length; |
|
|
|
}, |
|
|
|
|
|
|
@ -346,8 +335,10 @@ export default { |
|
|
|
this.sortedProjectRows.splice(index, 1) |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log('zoudaolezheli '); |
|
|
|
this.sortedProjectRows.push(row) |
|
|
|
} |
|
|
|
this.updateSelectionState() |
|
|
|
}, |
|
|
|
handleSelectAll(selection) { |
|
|
|
console.log('全选/取消全选:', selection); |
|
|
@ -364,17 +355,7 @@ export default { |
|
|
|
); |
|
|
|
|
|
|
|
// 合并新旧选择 |
|
|
|
// console.log(preservedSelections,currentViewIds,rows,'=currentViewIds==='); |
|
|
|
this.selectedRows = [...preservedSelections, ...rows]; |
|
|
|
// console.log(this.selectedRows, 'selectedRows==='); |
|
|
|
// let arr = [...new Set([...this.selectedRows, ...this.sortedProjectRows])] |
|
|
|
// console.log(arr,'arr,走了这里22'); |
|
|
|
// this.selectedRows.forEach(row => { |
|
|
|
// if (!this.sortedProjectRows.some(selected => selected.id === row.id)) { |
|
|
|
// this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// if(this.) |
|
|
|
this.updateSelectionState(); |
|
|
|
}, |
|
|
|
|
|
|
@ -402,12 +383,6 @@ export default { |
|
|
|
this.sortedProjectRows = this.sortedProjectRows.filter(r => r.id !== row.id); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// console.log('全选操作后:', { |
|
|
|
// selectedRows: this.selectedRows, |
|
|
|
// sortedProjectRows: this.sortedProjectRows |
|
|
|
// }); |
|
|
|
|
|
|
|
// 更新表格选中状态 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.setSelectedRows(); |
|
|
@ -418,7 +393,6 @@ export default { |
|
|
|
// 筛选标签切换 |
|
|
|
selectTag(id) { |
|
|
|
this.projectSearchId = id === 'all' ? 'all' : id; |
|
|
|
// this.setSelectedRows(); |
|
|
|
this.updateSelectionState(); |
|
|
|
}, |
|
|
|
// 只有在原本套餐内的直接修改有效/ 否则无效; |
|
|
@ -438,6 +412,9 @@ export default { |
|
|
|
if (!this.selectedRows.includes(row)) { |
|
|
|
this.selectedRows.push(row); |
|
|
|
} |
|
|
|
if (!this.sortedProjectRows.includes(row)) { |
|
|
|
this.sortedProjectRows.push(row); |
|
|
|
} |
|
|
|
// 更新选择状态 |
|
|
|
this.updateSelectionState(); |
|
|
|
}, |
|
|
|