|
@@ -254,9 +254,9 @@ export default {
|
|
|
activeModels(){
|
|
|
if(!this.generation) return {}
|
|
|
const generation = this.generation.models.find(item => item.generation == this.generation.active)
|
|
|
- generation.selectedList = generation.models.filter(item => {
|
|
|
- return item.selected
|
|
|
- })
|
|
|
+ // generation.selectedList = generation.models.filter(item => {
|
|
|
+ // return item.selected
|
|
|
+ // })
|
|
|
return generation
|
|
|
},
|
|
|
// 初始化 rows 填充固定数据
|
|
@@ -333,7 +333,7 @@ export default {
|
|
|
}
|
|
|
this.activeModels.models.find(item => item.groupId == row.groupId).selected = true
|
|
|
row.selected = true
|
|
|
- // this.activeModels.selectedList.push(row)
|
|
|
+ this.activeModels.selectedList.push(row)
|
|
|
},
|
|
|
toUnSelect(row) {
|
|
|
this.$confirm(`是否解除选科组合【${row.groupName}】`, '警告', {
|
|
@@ -342,10 +342,10 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.activeModels.models.find(item => item.groupId == row.groupId).selected = false
|
|
|
- // row.selected = false
|
|
|
- // const start = this.activeModels.selectedList.findIndex(item => item.groupId == row.groupId)
|
|
|
- // console.log(start)
|
|
|
- // this.activeModels.selectedList.splice(start, 1)
|
|
|
+ row.selected = false
|
|
|
+ const start = this.activeModels.selectedList.findIndex(item => item.groupId == row.groupId)
|
|
|
+ console.log(start)
|
|
|
+ this.activeModels.selectedList.splice(start, 1)
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|