Browse Source

fix: 删除分部,特定操作下树结构显示不正确。

zhangweicheng 4 years ago
parent
commit
57cd8bd497
3 changed files with 19 additions and 15 deletions
  1. 4 1
      public/web/id_tree.js
  2. 1 0
      web/building_saas/main/js/models/cache_tree.js
  3. 14 14
      web/users/html/index.html

+ 4 - 1
public/web/id_tree.js

@@ -738,11 +738,14 @@ var idTree = {
             } else {
                 this.roots.splice(node.siblingIndex(), 1);
             }
+         
+            if(node.preSibling) node.preSibling.setNextSibling(node.nextSibling);//后兄弟设置为前兄弟的后兄弟 
+           
             if(node.children.length>0){
                 if(node.preSibling){//子项变成前兄弟的子项
                     for(let c of node.children){
                         node.preSibling.addChild(c);
-                    }
+                    } 
                 }else if(node.nextSibling){//没有前兄弟,有后兄弟
                     let oldChild = node.parent.children;
                     node.parent.children = [];

+ 1 - 0
web/building_saas/main/js/models/cache_tree.js

@@ -524,6 +524,7 @@ var cacheTree = {
                 } else {
                     this.roots.splice(node.siblingIndex(), 1);
                 }
+                if(node.preSibling) node.preSibling.setNextSibling(node.nextSibling);//后兄弟设置为前兄弟的后兄弟 
                 if(node.children.length>0){
                     if(node.preSibling){//子项变成前兄弟的子项
                         for(let c of node.children){

+ 14 - 14
web/users/html/index.html

@@ -80,7 +80,7 @@
                      </div>
                      <!-- Heading -->
                      <h2>
-                     真云版免安装
+                        跨平台免安装
                      </h2>
                   </div>
                   <!--End Box -->
@@ -123,7 +123,7 @@
                         <div class="media-body pl-4">
                            <!-- Heading -->
                            <h3 class="mb-5">
-                           真云版、免安装
+                             跨平台、免安装
                            </h3>
                            <!-- Text -->
                            <p class="mb-5 lead">
@@ -217,6 +217,18 @@
                   <!-- Box -->
                   <div class="box bg-box text-center">
                      <div class="icon text-primary">
+                        <i class="fas fa-archway"></i>
+                     </div>
+                     <h3>
+                     市政
+                     </h3>
+                  </div>
+                  <!--End Box -->
+               </div>
+               <div class="col-12 col-md-4 col-lg-3 mt-30">
+                  <!-- Box -->
+                  <div class="box bg-box text-center">
+                     <div class="icon text-primary">
                         <i class="fas fa-building"></i>
                      </div>
                      <h3>
@@ -297,18 +309,6 @@
                   </div>
                   <!--End Box -->
                </div>
-               <div class="col-12 col-md-4 col-lg-3 mt-30">
-                  <!-- Box -->
-                  <div class="box bg-box text-center">
-                     <div class="icon text-primary">
-                        <i class="fas fa-tools"></i>
-                     </div>
-                     <h3>
-                     房屋修缮
-                     </h3>
-                  </div>
-                  <!--End Box -->
-               </div>
             </div>
          </div>
       </section>