|
@@ -58,12 +58,13 @@ export default {
|
|
return {
|
|
return {
|
|
opened: this.show,
|
|
opened: this.show,
|
|
spinning: false,
|
|
spinning: false,
|
|
- confirmLoading: false
|
|
|
|
|
|
+ confirmLoading: false,
|
|
|
|
+ list: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
activeSortList () {
|
|
activeSortList () {
|
|
- return this.activeList.sort((a, b) => {
|
|
|
|
|
|
+ return this.list.sort((a, b) => {
|
|
return a.sort - b.sort
|
|
return a.sort - b.sort
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -88,10 +89,11 @@ export default {
|
|
},
|
|
},
|
|
// 排序
|
|
// 排序
|
|
sortRow (item, rowIndex, type) {
|
|
sortRow (item, rowIndex, type) {
|
|
- const temp = this.activeList[type == 1 ? rowIndex - 1 : rowIndex + 1]
|
|
|
|
|
|
+ const temp = this.list[type == 1 ? rowIndex - 1 : rowIndex + 1]
|
|
const tempSort = temp.sort
|
|
const tempSort = temp.sort
|
|
temp.sort = item.sort
|
|
temp.sort = item.sort
|
|
item.sort = tempSort
|
|
item.sort = tempSort
|
|
|
|
+ this.list.splice()
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
cancel () {
|
|
cancel () {
|
|
@@ -103,6 +105,9 @@ export default {
|
|
watch: {
|
|
watch: {
|
|
show (newValue, oldValue) {
|
|
show (newValue, oldValue) {
|
|
this.opened = newValue
|
|
this.opened = newValue
|
|
|
|
+ if (newValue) {
|
|
|
|
+ this.list = this.activeList
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|