From 05c6e9727f2b26bce20f37291bb1af362d74c794 Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Wed, 23 Jul 2025 18:04:24 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E9=85=8D=E7=BD=AEchildren?=
=?UTF-8?q?=E4=B8=8A=E4=B8=8B=E7=A7=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/dictionary/checkConfig/index.vue | 35 ++++++++++++++++++----
1 file changed, 29 insertions(+), 6 deletions(-)
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 },