|
@@ -101,14 +101,11 @@ export default {
|
|
|
width:'100',
|
|
|
fixed: 'right'
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ selectedList: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- selectedList() {
|
|
|
- if (!this.list.length) return []
|
|
|
- return this.list.filter(item => item.selected)
|
|
|
- },
|
|
|
formatList() {
|
|
|
if (!this.list.length) return []
|
|
|
if (!this.optionalMajors.length) return []
|
|
@@ -141,6 +138,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
row.selected = true
|
|
|
+ this.selectedList.push(row)
|
|
|
this.$refs.drage.init(this.selectedList)
|
|
|
},
|
|
|
toUnSelect(row) {
|
|
@@ -150,6 +148,11 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
row.selected = false
|
|
|
+ this.selectedList.splice(
|
|
|
+ this.selectedList.indexOf(this.selectedList.find((selected) => {
|
|
|
+ return selected.groupId === row.groupId }
|
|
|
+ )
|
|
|
+ ), 1);
|
|
|
this.$refs.drage.init(this.selectedList)
|
|
|
}).catch(() => {
|
|
|
this.$message({
|