Sfoglia il codice sorgente

指标目录移动规则修改:目录移动需保证其层级不变

jwyu 1 anno fa
parent
commit
ef9e415626
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      src/views/dataEDB/components/EDBClassify.vue

+ 7 - 1
src/views/dataEDB/components/EDBClassify.vue

@@ -281,15 +281,21 @@ const classifyMoveState=reactive({
     selectValue:'',
     options:[],
     classifyId:0,//要移动的分类id
+    tabIndex:0,
 })
 function handleSelectMoveClassifyChange({value,selectedOptions,tabIndex}){
-    // classifyMoveState.tabIndex=tabIndex
+    classifyMoveState.tabIndex=tabIndex
 }
 function handleConfirmMove(){
     if(!classifyMoveState.selectValue){
         showToast('请选择要移动至的目录')
         return
     }
+    // 目录移动需保证其层级不变(二级目录只能移动到其他的一级目录下)
+    if(classifyMoveState.tabIndex+1<showParentClassifyData.value.length){
+        showToast('不可移动至该目录下')
+        return
+    }
     
     // 只会将目录移动到某个目录里面所有下面有很多都是0
     apiDataEDB.edbCatalogMove({