diff --git a/src/views/dictionary/checkConfig/index.vue b/src/views/dictionary/checkConfig/index.vue
index 2a2fc6aa..e982c807 100644
--- a/src/views/dictionary/checkConfig/index.vue
+++ b/src/views/dictionary/checkConfig/index.vue
@@ -731,8 +731,18 @@
-
+
+ 上移
+ 下移
curr - target ? curr : pre
})
},
- handleUpMove(row) {
+ handleUpMove(row, isChildren = false, isLast = true) {
var index
var target
var list = this.list.filter((v, i) => {
return row.ModuleTypeId === v.ModuleTypeId && v.ModuleTypeValueCN && v.ObjectTypeValueCN && v.OptTypeValueCN && v.ChildrenTypeValueCN
})
+ if (isChildren) {
+ list = this.childrenList
+ }
list.forEach((v, i) => {
if (row.Id === v.Id) {
index = i
}
})
console.log(index)
- if (index === 0) {
- this.$alert('该行排序已是最高')
- return
+ if (isLast) {
+ if (index === 0) {
+ this.$alert('该行排序已是最高')
+ return
+ } else {
+ target = list[index - 1]
+ }
} else {
- target = list[index - 1]
+ if (index === this.list.length) {
+ this.$alert('该行排序已是最底')
+ return
+ } else {
+ target = list[index + 1]
+ }
}
+
console.log(list)
var params = [
{ Id: target.Id, Sort: row.Sort },