From 0af4ecb9b2047b8ba6d00e891050cf2d68b829a6 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期六, 27 五月 2023 20:41:18 +0800
Subject: [PATCH] 代码提交

---
 src/views/datamanage/catalogueManage.vue |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/src/views/datamanage/catalogueManage.vue b/src/views/datamanage/catalogueManage.vue
index d04bca9..02bd753 100644
--- a/src/views/datamanage/catalogueManage.vue
+++ b/src/views/datamanage/catalogueManage.vue
@@ -184,7 +184,6 @@
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
-                  
               >
               </el-option>
             </el-select>
@@ -230,7 +229,6 @@
               disabled
               type="textarea"
               style=" max-width: 420px"
-            
               autosize
             />
           </el-form-item>
@@ -335,7 +333,7 @@
             type="textarea"
             resize="none"
             style="height: 100%; overflow: auto"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')"
+            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')"
           />
         </el-form-item>
         <el-form-item
@@ -352,7 +350,7 @@
             v-model="ruleForm.checks"
             multiple
             style="width:100%;"
-                :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')"
+            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')"
           >
             <el-option
               v-for="item in options"
@@ -702,6 +700,7 @@
       queryDirTree().then((res) => {
         // console.log(res);
         if (res.code == 200) {
+
           this.oriData = res.result;
           this.newData = res.result;
           this.dirList = this.treeData(res.result);
@@ -754,19 +753,22 @@
           if (currentId != 0) {
             const tempChildrenNodex1 = pchildNodes[currentId - 1];
             const tempChildrenNodex2 = pchildNodes[currentId];
-            tempChildrenNodex2.orderNum =
-              pchildNodes[currentId - 1].data.orderNum;
-            tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
+            // tempChildrenNodex2.orderNum =
+            //   pchildNodes[currentId - 1].data.orderNum;
+            // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
             var arr = [];
             this.oriData.filter((res) => {
               if (res.id == tempChildrenNodex2.data.id) {
-                res.orderNum = tempChildrenNodex2.orderNum;
+                // res.orderNum = tempChildrenNodex2.orderNum;
                 arr.push(res);
               } else if (res.id == tempChildrenNodex1.data.id) {
-                res.orderNum = tempChildrenNodex1.orderNum;
+                // res.orderNum = tempChildrenNodex1.orderNum;
                 arr.push(res);
               }
             });
+            const orderNum = arr[1].orderNum
+            arr[1].orderNum = arr[0].orderNum
+            arr[0].orderNum = orderNum
             this.newData = arr;
             this.sendChange();
           } else {
@@ -780,19 +782,22 @@
           if (currentId < pchildNodes.length - 1) {
             const tempChildrenNodex1 = pchildNodes[currentId + 1];
             const tempChildrenNodex2 = pchildNodes[currentId];
-            tempChildrenNodex2.orderNum =
-              pchildNodes[currentId + 1].data.orderNum;
-            tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
+            // tempChildrenNodex2.orderNum =
+            //   pchildNodes[currentId + 1].data.orderNum;
+            // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum;
             var arr = [];
             this.oriData.filter((res) => {
               if (res.id == tempChildrenNodex2.data.id) {
-                res.orderNum = tempChildrenNodex2.orderNum;
+                // res.orderNum = tempChildrenNodex2.orderNum;
                 arr.push(res);
               } else if (res.id == tempChildrenNodex1.data.id) {
-                res.orderNum = tempChildrenNodex1.orderNum;
+                // res.orderNum = tempChildrenNodex1.orderNum;
                 arr.push(res);
               }
             });
+            const orderNum = arr[1].orderNum
+            arr[1].orderNum = arr[0].orderNum
+            arr[0].orderNum = orderNum
             this.newData = arr;
             this.sendChange();
           } else {
@@ -870,7 +875,13 @@
           if (valid) {
             this.fullscreenLoading = true;
             var val = this.ruleForm;
-            val.checks = this.ruleForm.checks.toString()
+            if (this.ruleForm.checks) {
+              val.checks = this.ruleForm.checks.toString()
+            } else {
+              val.checks = ''
+            }
+
+
             insertDir(val)
               .then((res) => {
                 setTimeout(() => {
@@ -1041,11 +1052,11 @@
             this.getDirTree();
             return;
           } else {
-            this.$message.error("淇敼澶辫触锛岃閲嶈瘯锛�");
+            this.$message.error("绉诲姩澶辫触锛岃閲嶈瘯锛�");
           }
         })
         .catch(() => {
-          this.$message.error("淇敼澶辫触锛岃閲嶈瘯锛�");
+          this.$message.error("绉诲姩澶辫触锛岃閲嶈瘯锛�");
         });
     },
 

--
Gitblit v1.9.3