Browse Source

侧边栏暂存

xiaohaizhao 2 tuần trước cách đây
mục cha
commit
0763fc43ce
3 tập tin đã thay đổi với 424 bổ sung45 xóa
  1. 164 16
      src/MAR/archivesMag/index.vue
  2. 128 14
      src/MAR/assetsStore/index.vue
  3. 132 15
      src/MAR/productManage/index.vue

+ 164 - 16
src/MAR/archivesMag/index.vue

@@ -264,20 +264,41 @@ const onDrop = (info) => {
   let dragObj
   let originalParentArr
   let originalIndex
+  let originalParentId = 0
   
   loop(data, dragKey, (item, index, arr) => {
     originalParentArr = arr
     originalIndex = index
     dragObj = item
+    // 查找原始父节点的 ID
+    const findParentId = (nodes, childId) => {
+      for (let i = 0; i < nodes.length; i++) {
+        if (nodes[i].children) {
+          for (let j = 0; j < nodes[i].children.length; j++) {
+            if (nodes[i].children[j].sat_courseware_classid === childId) {
+              return nodes[i].sat_courseware_classid || 0
+            }
+          }
+          const parentId = findParentId(nodes[i].children, childId)
+          if (parentId) {
+            return parentId
+          }
+        }
+      }
+      return 0
+    }
+    originalParentId = findParentId(data, dragKey)
   })
 
   // 层级检查和处理
   let isValidDrop = true
   let dropSuccess = false
+  let affectedParentIds = new Set()
   
   // 先从数据中移除拖动的节点
   if (originalParentArr && originalIndex !== undefined) {
     originalParentArr.splice(originalIndex, 1)
+    affectedParentIds.add(originalParentId)
   }
 
   if (!info.dropToGap) {
@@ -285,8 +306,40 @@ const onDrop = (info) => {
     loop(data, dropKey, (item) => {
       // 检查拖动节点的层级是否比目标节点低一级,且目标节点不是三级分类
       if (item.level >= 3) {
-        isValidDrop = false
-        utils.message({ msg: '失败' }, '最多支持三级分类', 'error')
+        // 特殊处理:拖到三级分类上,放到该三级分类的下方(平级)
+        // 找到三级分类的父级二级分类
+        let parentNode
+        let parentArr
+        let parentIndex
+        
+        // 查找父级二级分类
+        const findParent = (nodes) => {
+          for (let i = 0; i < nodes.length; i++) {
+            if (nodes[i].children) {
+              for (let j = 0; j < nodes[i].children.length; j++) {
+                if (nodes[i].children[j].sat_courseware_classid === item.sat_courseware_classid) {
+                  parentNode = nodes[i]
+                  parentArr = nodes[i].children
+                  parentIndex = j
+                  return true
+                }
+              }
+              if (findParent(nodes[i].children)) {
+                return true
+              }
+            }
+          }
+          return false
+        }
+        
+        findParent(data)
+        
+        if (parentArr && parentIndex !== undefined) {
+          // 将拖动节点插入到三级分类的下方(平级)
+          parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(parentNode.sat_courseware_classid)
+          dropSuccess = true
+        }
       } else if (dragObj.level !== item.level + 1) {
         // 特殊处理:一级分类拖到二级分类上
         if (dragObj.level === 1 && item.level === 2) {
@@ -320,16 +373,50 @@ const onDrop = (info) => {
           if (parentArr && parentIndex !== undefined) {
             // 将一级分类插入到父级一级分类的后面
             parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(0) // 一级分类的父ID是0
             dropSuccess = true
           }
         } else {
-          isValidDrop = false
-          utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+          // 特殊处理:拖到平级的子级,放到该子级的下方(平级)
+          // 找到子级的父级(即平级分类)
+          let parentNode
+          let parentArr
+          let parentIndex
+          
+          // 查找父级
+          const findParent = (nodes) => {
+            for (let i = 0; i < nodes.length; i++) {
+              if (nodes[i].children) {
+                for (let j = 0; j < nodes[i].children.length; j++) {
+                  if (nodes[i].children[j].sat_courseware_classid === item.sat_courseware_classid) {
+                    parentNode = nodes[i]
+                    parentArr = nodes[i].children
+                    parentIndex = j
+                    return true
+                  }
+                }
+                if (findParent(nodes[i].children)) {
+                  return true
+                }
+              }
+            }
+            return false
+          }
+          
+          findParent(data)
+          
+          if (parentArr && parentIndex !== undefined) {
+            // 将拖动节点插入到子级的下方(平级)
+            parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(parentNode.sat_courseware_classid)
+            dropSuccess = true
+          }
         }
       } else {
         item.children = item.children || []
         // where to insert. New item was inserted to the start of the array in this example, but can be anywhere
         item.children.unshift(dragObj)
+        affectedParentIds.add(item.sat_courseware_classid)
         dropSuccess = true
       }
     })
@@ -337,10 +424,30 @@ const onDrop = (info) => {
     let ar = []
     let i
     let targetNode
+    let targetParentId = 0
+    
     loop(data, dropKey, (item, index, arr) => {
       ar = arr
       i = index
       targetNode = item
+      // 查找目标节点的父节点 ID
+      const findParentId = (nodes, childId) => {
+        for (let i = 0; i < nodes.length; i++) {
+          if (nodes[i].children) {
+            for (let j = 0; j < nodes[i].children.length; j++) {
+              if (nodes[i].children[j].sat_courseware_classid === childId) {
+                return nodes[i].sat_courseware_classid || 0
+              }
+            }
+            const parentId = findParentId(nodes[i].children, childId)
+            if (parentId) {
+              return parentId
+            }
+          }
+        }
+        return 0
+      }
+      targetParentId = findParentId(data, dropKey)
     })
     
     // 检查拖动节点的层级是否与目标节点相同
@@ -377,11 +484,44 @@ const onDrop = (info) => {
         if (parentArr && parentIndex !== undefined) {
           // 将一级分类插入到父级一级分类的后面
           parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(0) // 一级分类的父ID是0
           dropSuccess = true
         }
       } else {
-        isValidDrop = false
-        utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+        // 特殊处理:拖到不同层级的间隙,找到合适的位置
+        // 找到目标节点的父级
+        let parentNode
+        let parentArr
+        let parentIndex
+        
+        // 查找父级
+        const findParent = (nodes) => {
+          for (let i = 0; i < nodes.length; i++) {
+            if (nodes[i].children) {
+              for (let j = 0; j < nodes[i].children.length; j++) {
+                if (nodes[i].children[j].sat_courseware_classid === targetNode.sat_courseware_classid) {
+                  parentNode = nodes[i]
+                  parentArr = nodes[i].children
+                  parentIndex = j
+                  return true
+                }
+              }
+              if (findParent(nodes[i].children)) {
+                return true
+              }
+            }
+          }
+          return false
+        }
+        
+        findParent(data)
+        
+        if (parentArr && parentIndex !== undefined) {
+          // 将拖动节点插入到目标节点的下方(平级)
+          parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(parentNode.sat_courseware_classid)
+          dropSuccess = true
+        }
       }
     } else {
       if (dropPosition === -1) {
@@ -391,6 +531,7 @@ const onDrop = (info) => {
         // Drop on the bottom of the drop node
         ar.splice(i + 1, 0, dragObj)
       }
+      affectedParentIds.add(targetParentId)
       dropSuccess = true
     }
   }
@@ -405,24 +546,28 @@ const onDrop = (info) => {
   
   // 只有放置成功才保存分类结构
   if (dropSuccess) {
-    // 保存拖动后的分类结构
-    saveClassStructure(data)
+    // 保存拖动后的分类结构,只更新变动的域
+    saveClassStructure(data, Array.from(affectedParentIds)).then(() => {
+      getClassList()
+    })
   }
 }
 
 // 保存分类结构
-const saveClassStructure = async (data) => {
+const saveClassStructure = async (data, affectedParentIds) => {
   // 按照域(parentid)分组构建排序数据
   const buildSortData = (nodes, parentid = 0, sortMap = {}) => {
     nodes.forEach((node, index) => {
       const key = parentid
-      if (!sortMap[key]) {
-        sortMap[key] = []
+      if (affectedParentIds.includes(key)) {
+        if (!sortMap[key]) {
+          sortMap[key] = []
+        }
+        sortMap[key].push({
+          ownerid: node.sat_courseware_classid,
+          sequence: index
+        })
       }
-      sortMap[key].push({
-        ownerid: node.sat_courseware_classid,
-        sequence: index
-      })
       
       if (node.children && node.children.length > 0) {
         buildSortData(node.children, node.sat_courseware_classid, sortMap)
@@ -433,7 +578,7 @@ const saveClassStructure = async (data) => {
   
   const sortMap = buildSortData(data)
   
-  // 对每个域执行排序更新
+  // 对每个变动的域执行排序更新
   const updatePromises = Object.keys(sortMap).map(async (parentid) => {
     const sequencesorts = sortMap[parentid]
     try {
@@ -454,7 +599,10 @@ const saveClassStructure = async (data) => {
   try {
     const results = await Promise.all(updatePromises)
     const allSuccess = results.every(res => res.msg === '成功')
+    if (allSuccess) {
+    }
   } catch (error) {
+    console.error('保存分类结构失败:', error)
   }
 }
 

+ 128 - 14
src/MAR/assetsStore/index.vue

@@ -486,20 +486,41 @@ const onDrop = (info) => {
   let dragObj
   let originalParentArr
   let originalIndex
+  let originalParentId = 0
   
   loop(data, dragKey, (item, index, arr) => {
     originalParentArr = arr
     originalIndex = index
     dragObj = item
+    // 查找原始父节点的 ID
+    const findParentId = (nodes, childId) => {
+      for (let i = 0; i < nodes.length; i++) {
+        if (nodes[i].children) {
+          for (let j = 0; j < nodes[i].children.length; j++) {
+            if (nodes[i].children[j].sat_sharematerial_classid === childId) {
+              return nodes[i].sat_sharematerial_classid || 0
+            }
+          }
+          const parentId = findParentId(nodes[i].children, childId)
+          if (parentId) {
+            return parentId
+          }
+        }
+      }
+      return 0
+    }
+    originalParentId = findParentId(data, dragKey)
   })
 
   // 层级检查和处理
   let isValidDrop = true
   let dropSuccess = false
+  let affectedParentIds = new Set()
   
   // 先从数据中移除拖动的节点
   if (originalParentArr && originalIndex !== undefined) {
     originalParentArr.splice(originalIndex, 1)
+    affectedParentIds.add(originalParentId)
   }
 
   if (!info.dropToGap) {
@@ -539,16 +560,50 @@ const onDrop = (info) => {
           if (parentArr && parentIndex !== undefined) {
             // 将一级分类插入到父级一级分类的后面
             parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(0) // 一级分类的父ID是0
             dropSuccess = true
           }
         } else {
-          isValidDrop = false
-          utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+          // 特殊处理:拖到平级的子级,放到该子级的下方(平级)
+          // 找到子级的父级(即平级分类)
+          let parentNode
+          let parentArr
+          let parentIndex
+          
+          // 查找父级
+          const findParent = (nodes) => {
+            for (let i = 0; i < nodes.length; i++) {
+              if (nodes[i].children) {
+                for (let j = 0; j < nodes[i].children.length; j++) {
+                  if (nodes[i].children[j].sat_sharematerial_classid === item.sat_sharematerial_classid) {
+                    parentNode = nodes[i]
+                    parentArr = nodes[i].children
+                    parentIndex = j
+                    return true
+                  }
+                }
+                if (findParent(nodes[i].children)) {
+                  return true
+                }
+              }
+            }
+            return false
+          }
+          
+          findParent(data)
+          
+          if (parentArr && parentIndex !== undefined) {
+            // 将拖动节点插入到子级的下方(平级)
+            parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(parentNode.sat_sharematerial_classid)
+            dropSuccess = true
+          }
         }
       } else {
         item.children = item.children || []
         // where to insert. New item was inserted to the start of the array in this example, but can be anywhere
         item.children.unshift(dragObj)
+        affectedParentIds.add(item.sat_sharematerial_classid)
         dropSuccess = true
       }
     })
@@ -556,10 +611,30 @@ const onDrop = (info) => {
     let ar = []
     let i
     let targetNode
+    let targetParentId = 0
+    
     loop(data, dropKey, (item, index, arr) => {
       ar = arr
       i = index
       targetNode = item
+      // 查找目标节点的父节点 ID
+      const findParentId = (nodes, childId) => {
+        for (let i = 0; i < nodes.length; i++) {
+          if (nodes[i].children) {
+            for (let j = 0; j < nodes[i].children.length; j++) {
+              if (nodes[i].children[j].sat_sharematerial_classid === childId) {
+                return nodes[i].sat_sharematerial_classid || 0
+              }
+            }
+            const parentId = findParentId(nodes[i].children, childId)
+            if (parentId) {
+              return parentId
+            }
+          }
+        }
+        return 0
+      }
+      targetParentId = findParentId(data, dropKey)
     })
     
     // 检查拖动节点的层级是否与目标节点相同
@@ -596,11 +671,44 @@ const onDrop = (info) => {
         if (parentArr && parentIndex !== undefined) {
           // 将一级分类插入到父级一级分类的后面
           parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(0) // 一级分类的父ID是0
           dropSuccess = true
         }
       } else {
-        isValidDrop = false
-        utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+        // 特殊处理:拖到不同层级的间隙,找到合适的位置
+        // 找到目标节点的父级
+        let parentNode
+        let parentArr
+        let parentIndex
+        
+        // 查找父级
+        const findParent = (nodes) => {
+          for (let i = 0; i < nodes.length; i++) {
+            if (nodes[i].children) {
+              for (let j = 0; j < nodes[i].children.length; j++) {
+                if (nodes[i].children[j].sat_sharematerial_classid === targetNode.sat_sharematerial_classid) {
+                  parentNode = nodes[i]
+                  parentArr = nodes[i].children
+                  parentIndex = j
+                  return true
+                }
+              }
+              if (findParent(nodes[i].children)) {
+                return true
+              }
+            }
+          }
+          return false
+        }
+        
+        findParent(data)
+        
+        if (parentArr && parentIndex !== undefined) {
+          // 将拖动节点插入到目标节点的下方(平级)
+          parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(parentNode.sat_sharematerial_classid)
+          dropSuccess = true
+        }
       }
     } else {
       if (dropPosition === -1) {
@@ -610,6 +718,7 @@ const onDrop = (info) => {
         // Drop on the bottom of the drop node
         ar.splice(i + 1, 0, dragObj)
       }
+      affectedParentIds.add(targetParentId)
       dropSuccess = true
     }
   }
@@ -624,24 +733,28 @@ const onDrop = (info) => {
   
   // 只有放置成功才保存分类结构
   if (dropSuccess) {
-    // 保存拖动后的分类结构
-    saveClassStructure(data)
+    // 保存拖动后的分类结构,只更新变动的域
+    saveClassStructure(data, Array.from(affectedParentIds)).then(() => {
+      getClassList()
+    })
   }
 }
 
 // 保存分类结构
-const saveClassStructure = async (data) => {
+const saveClassStructure = async (data, affectedParentIds) => {
   // 按照域(parentid)分组构建排序数据
   const buildSortData = (nodes, parentid = 0, sortMap = {}) => {
     nodes.forEach((node, index) => {
       const key = parentid
-      if (!sortMap[key]) {
-        sortMap[key] = []
+      if (affectedParentIds.includes(key)) {
+        if (!sortMap[key]) {
+          sortMap[key] = []
+        }
+        sortMap[key].push({
+          ownerid: node.sat_sharematerial_classid,
+          sequence: index
+        })
       }
-      sortMap[key].push({
-        ownerid: node.sat_sharematerial_classid,
-        sequence: index
-      })
       
       if (node.children && node.children.length > 0) {
         buildSortData(node.children, node.sat_sharematerial_classid, sortMap)
@@ -652,7 +765,7 @@ const saveClassStructure = async (data) => {
   
   const sortMap = buildSortData(data)
   
-  // 对每个域执行排序更新
+  // 对每个变动的域执行排序更新
   const updatePromises = Object.keys(sortMap).map(async (parentid) => {
     const sequencesorts = sortMap[parentid]
     try {
@@ -676,6 +789,7 @@ const saveClassStructure = async (data) => {
     if (allSuccess) {
     }
   } catch (error) {
+    console.error('保存分类结构失败:', error)
   }
 }
 

+ 132 - 15
src/MAR/productManage/index.vue

@@ -504,20 +504,41 @@ const onDrop = (info) => {
   let dragObj
   let originalParentArr
   let originalIndex
+  let originalParentId = 0
   
   loop(data, dragKey, (item, index, arr) => {
     originalParentArr = arr
     originalIndex = index
     dragObj = item
+    // 查找原始父节点的 ID
+    const findParentId = (nodes, childId) => {
+      for (let i = 0; i < nodes.length; i++) {
+        if (nodes[i].children) {
+          for (let j = 0; j < nodes[i].children.length; j++) {
+            if (nodes[i].children[j].sa_fadclassid === childId) {
+              return nodes[i].sa_fadclassid || 0
+            }
+          }
+          const parentId = findParentId(nodes[i].children, childId)
+          if (parentId) {
+            return parentId
+          }
+        }
+      }
+      return 0
+    }
+    originalParentId = findParentId(data, dragKey)
   })
 
   // 层级检查和处理
   let isValidDrop = true
   let dropSuccess = false
+  let affectedParentIds = new Set()
   
   // 先从数据中移除拖动的节点
   if (originalParentArr && originalIndex !== undefined) {
     originalParentArr.splice(originalIndex, 1)
+    affectedParentIds.add(originalParentId)
   }
 
   if (!info.dropToGap) {
@@ -557,16 +578,50 @@ const onDrop = (info) => {
           if (parentArr && parentIndex !== undefined) {
             // 将一级分类插入到父级一级分类的后面
             parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(0) // 一级分类的父ID是0
             dropSuccess = true
           }
         } else {
-          isValidDrop = false
-          utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+          // 特殊处理:拖到平级的子级,放到该子级的下方(平级)
+          // 找到子级的父级(即平级分类)
+          let parentNode
+          let parentArr
+          let parentIndex
+          
+          // 查找父级
+          const findParent = (nodes) => {
+            for (let i = 0; i < nodes.length; i++) {
+              if (nodes[i].children) {
+                for (let j = 0; j < nodes[i].children.length; j++) {
+                  if (nodes[i].children[j].sa_fadclassid === item.sa_fadclassid) {
+                    parentNode = nodes[i]
+                    parentArr = nodes[i].children
+                    parentIndex = j
+                    return true
+                  }
+                }
+                if (findParent(nodes[i].children)) {
+                  return true
+                }
+              }
+            }
+            return false
+          }
+          
+          findParent(data)
+          
+          if (parentArr && parentIndex !== undefined) {
+            // 将拖动节点插入到子级的下方(平级)
+            parentArr.splice(parentIndex + 1, 0, dragObj)
+            affectedParentIds.add(parentNode.sa_fadclassid)
+            dropSuccess = true
+          }
         }
       } else {
         item.children = item.children || []
         // where to insert. New item was inserted to the start of the array in this example, but can be anywhere
         item.children.unshift(dragObj)
+        affectedParentIds.add(item.sa_fadclassid)
         dropSuccess = true
       }
     })
@@ -574,10 +629,30 @@ const onDrop = (info) => {
     let ar = []
     let i
     let targetNode
+    let targetParentId = 0
+    
     loop(data, dropKey, (item, index, arr) => {
       ar = arr
       i = index
       targetNode = item
+      // 查找目标节点的父节点 ID
+      const findParentId = (nodes, childId) => {
+        for (let i = 0; i < nodes.length; i++) {
+          if (nodes[i].children) {
+            for (let j = 0; j < nodes[i].children.length; j++) {
+              if (nodes[i].children[j].sa_fadclassid === childId) {
+                return nodes[i].sa_fadclassid || 0
+              }
+            }
+            const parentId = findParentId(nodes[i].children, childId)
+            if (parentId) {
+              return parentId
+            }
+          }
+        }
+        return 0
+      }
+      targetParentId = findParentId(data, dropKey)
     })
     
     // 检查拖动节点的层级是否与目标节点相同
@@ -614,11 +689,44 @@ const onDrop = (info) => {
         if (parentArr && parentIndex !== undefined) {
           // 将一级分类插入到父级一级分类的后面
           parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(0) // 一级分类的父ID是0
           dropSuccess = true
         }
       } else {
-        isValidDrop = false
-        utils.message({code:0,data:"失败", msg: '分类层级不能变更' }, '分类层级不能变更', 'error')
+        // 特殊处理:拖到不同层级的间隙,找到合适的位置
+        // 找到目标节点的父级
+        let parentNode
+        let parentArr
+        let parentIndex
+        
+        // 查找父级
+        const findParent = (nodes) => {
+          for (let i = 0; i < nodes.length; i++) {
+            if (nodes[i].children) {
+              for (let j = 0; j < nodes[i].children.length; j++) {
+                if (nodes[i].children[j].sa_fadclassid === targetNode.sa_fadclassid) {
+                  parentNode = nodes[i]
+                  parentArr = nodes[i].children
+                  parentIndex = j
+                  return true
+                }
+              }
+              if (findParent(nodes[i].children)) {
+                return true
+              }
+            }
+          }
+          return false
+        }
+        
+        findParent(data)
+        
+        if (parentArr && parentIndex !== undefined) {
+          // 将拖动节点插入到目标节点的下方(平级)
+          parentArr.splice(parentIndex + 1, 0, dragObj)
+          affectedParentIds.add(parentNode.sa_fadclassid)
+          dropSuccess = true
+        }
       }
     } else {
       if (dropPosition === -1) {
@@ -628,6 +736,7 @@ const onDrop = (info) => {
         // Drop on the bottom of the drop node
         ar.splice(i + 1, 0, dragObj)
       }
+      affectedParentIds.add(targetParentId)
       dropSuccess = true
     }
   }
@@ -642,24 +751,28 @@ const onDrop = (info) => {
   
   // 只有放置成功才保存分类结构
   if (dropSuccess) {
-    // 保存拖动后的分类结构
-    saveClassStructure(data)
+    // 保存拖动后的分类结构,只更新变动的域
+    saveClassStructure(data, Array.from(affectedParentIds)).then(() => {
+      getClassList()
+    })
   }
 }
 
 // 保存分类结构
-const saveClassStructure = async (data) => {
+const saveClassStructure = async (data, affectedParentIds) => {
   // 按照域(parentid)分组构建排序数据
   const buildSortData = (nodes, parentid = 0, sortMap = {}) => {
     nodes.forEach((node, index) => {
       const key = parentid
-      if (!sortMap[key]) {
-        sortMap[key] = []
+      if (affectedParentIds.includes(key)) {
+        if (!sortMap[key]) {
+          sortMap[key] = []
+        }
+        sortMap[key].push({
+          ownerid: node.sa_fadclassid,
+          sequence: index
+        })
       }
-      sortMap[key].push({
-        ownerid: node.sa_fadclassid,
-        sequence: index
-      })
       
       if (node.children && node.children.length > 0) {
         buildSortData(node.children, node.sa_fadclassid, sortMap)
@@ -670,19 +783,20 @@ const saveClassStructure = async (data) => {
   
   const sortMap = buildSortData(data)
   
-  // 对每个域执行排序更新
+  // 对每个变动的域执行排序更新
   const updatePromises = Object.keys(sortMap).map(async (parentid) => {
     const sequencesorts = sortMap[parentid]
     try {
       const res = await Api.requested({
         "id": "20221201134901",
         "content": {
-          "ownertable": "sat_fadclass",
+          "ownertable": "sa_fadclass",
           "sequencesorts": sequencesorts
         }
       })
       return res
     } catch (error) {
+      console.error(`更新域 ${parentid} 的排序失败:`, error)
       throw error
     }
   })
@@ -690,7 +804,10 @@ const saveClassStructure = async (data) => {
   try {
     const results = await Promise.all(updatePromises)
     const allSuccess = results.every(res => res.msg === '成功')
+    if (allSuccess) {
+    }
   } catch (error) {
+    console.error('保存分类结构失败:', error)
   }
 }