zhangh 3 年 前
コミット
c1910232b2

+ 12 - 12
src/App.vue

@@ -30,20 +30,20 @@ export default {
 
 .boxswai {
   box-sizing: border-box;
-  padding: 0px 14px 10px 14px !important;
+  padding: 0px 14px 10px 14px;
   width: 100%;
   height: 96%;
   color: #303133;
-}
-.boxnei {
-  box-sizing: border-box;
-  width: 100%;
-  height: 100%;
-  background-color: #fff;
-  padding: 14px !important;
-  border: 1px solid #ebeef5;
-  border-radius: 4px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  overflow: auto;
+  .boxnei {
+    box-sizing: border-box;
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    padding: 14px;
+    border: 1px solid #ebeef5;
+    border-radius: 4px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
+    overflow: auto;
+  }
 }
 </style>

+ 14 - 6
src/views/exctab/ElementIdentification/index.vue

@@ -10,7 +10,7 @@
           style="height:99%;"
         >
           <div
-            style="text-align: center;fontSize:18px; font-weight: 900;"
+            style="fontSize:18px; font-weight: 900;"
             class="marbottom5"
           >元素识别</div>
           <div style="height:98%;overflow: auto;width:auto;">
@@ -37,7 +37,7 @@
           >
             <el-col
               :span="16"
-              style="overflow:auto;height:100%;"
+              style="overflow:auto;height:100%;border:1px solid black; border-radius: 4px;box-sizing: border-box;padding: 10px 10px;"
             >
               <div
                 class="parent"
@@ -125,7 +125,7 @@
               </el-table>
               <el-button
                 type="success"
-                class="martop20"
+                class="martop20 dingwei"
                 @click="establish()"
                 :disabled="from.id==''"
               >关联WBS并创建元素</el-button>
@@ -233,7 +233,7 @@
                   placeholder="请选择表类型"
                 >
                   <el-option
-                    v-for="(item,index) in dataType"
+                    v-for="(item,index) in  exceltypeData"
                     :key="index"
                     :label="item.dictValue"
                     :value="item.dictKey"
@@ -247,7 +247,7 @@
                 placeholder="请选择所属方"
               >
                 <el-option
-                  v-for="(item,index) in exceltypeData"
+                  v-for="(item,index) in dataType"
                   :key="index"
                   :label="item.dictValue"
                   :value="item.dictKey"
@@ -590,5 +590,13 @@ export default {
 }
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
+.boxswai {
+  padding: 0px 14px 10px 14px !important;
+}
+.dingwei {
+  position: fixed;
+  bottom: 40px;
+  right: 40px;
+}
 </style>

+ 64 - 93
src/views/exctab/excelmodel/excelmodel.vue

@@ -1,75 +1,69 @@
 <template>
-  <div>
-    <div class="box flexBetween">
-      <!-- 左侧树结构 -->
-      <div
-        :style="{'width':threessW+'px'}"
-        ref="rulesss"
-      >
-        <div
-          class="box flexStar"
-          style="width:100%;backgroundColor:#fff;border-radius:3px;padding:10px 0px 0px 8px;box-sizing: border-box;border: 1px solid #EBEEF5;overflow:hidden;"
+  <div
+    style="height:100%;"
+    class="flexStar"
+  >
+    <div
+      class="boxswai"
+      style="width:26%;padding-left:0px;"
+    >
+      <div class="boxnei">
+        <!-- 树结构 -->
+        <el-tree
+          style="width:100%;"
+          ref="trees"
+          :loading="loading"
+          :load="treeLoad"
+          lazy
+          :data="data"
+          :props="defaultProps"
+          @node-click="nodeClick"
+          node-key="id"
+          :expand-on-click-node="false"
         >
-          <!-- 树结构 -->
-          <el-tree
-            ref="trees"
-            :style="{width:'100%',height:heightss-20+'px','box-sizing': 'border-box',overflow:'hidden'}"
-            :loading="loading"
-            :load="treeLoad"
-            lazy
-            :data="data"
-            :props="defaultProps"
-            @node-click="nodeClick"
-            node-key="id"
-            :expand-on-click-node="false"
+          <span
+            class="custom-tree-node"
+            slot-scope="{ data ,node }"
+            @mouseover.stop="mouseOver(data)"
+            @mouseleave.stop="mouseLeave(data)"
+            style="box-sizing: border-box;padding-right:70px!important;;"
           >
-            <span
-              class="custom-tree-node"
-              slot-scope="{ data ,node }"
-              @mouseover.self="mouseOver(data)"
-              @mouseleave.self="mouseLeave(data)"
-              style="box-sizing: border-box;width:100%;"
-            >
-              <div>
-                <span style="text-overflow: ellipsis;width:70%;"> {{ data.name }} </span>
-                <!-- <span> {{ node}} </span> -->
-                <!-- 添加 -->
-                <span v-show="data.moreShow">
-                  <i
-                    class="el-icon-circle-plus-outline marleft10"
-                    @click.stop="addExcel(data)"
-                    v-if="data.fileType!=3"
-                  ></i>
-                  <!-- 编辑 -->
-                  <i
-                    class="el-icon-edit marleft10"
-                    @click.stop="editExcel(data)"
-                    v-if="data.fileType!=1"
-                  ></i>
-                  <!-- 删除 -->
-                  <i
-                    class="el-icon-delete marleft10"
-                    @click.stop="deleteExcelM(data,node)"
-                    v-if="!data.hasChildren&&data.fileType!=1"
-                  ></i>
-                </span>
-              </div>
-            </span>
-          </el-tree>
-          <div
-            style="border-left:8px solid rgba(255,255,255,0);z-index:999;cursor: e-resize;"
-            @mousedown="mousedown1()"
-          ></div>
-        </div>
+            <div style="width:100%;">
+              <span style="text-overflow: ellipsis;"> {{ data.name }} </span>
+              <!-- <span> {{ node}} </span> -->
+              <!-- 添加 -->
+              <span v-show="data.moreShow">
+                <i
+                  class="el-icon-circle-plus-outline marleft10"
+                  @click.stop="addExcel(data)"
+                  v-if="data.fileType!=3"
+                ></i>
+                <!-- 编辑 -->
+                <i
+                  class="el-icon-edit marleft10"
+                  @click.stop="editExcel(data)"
+                  v-if="data.fileType!=1"
+                ></i>
+                <!-- 删除 -->
+                <i
+                  class="el-icon-delete marleft10"
+                  @click.stop="deleteExcelM(data,node)"
+                  v-if="!data.hasChildren&&data.fileType!=1"
+                ></i>
+              </span>
+            </div>
+          </span>
+        </el-tree>
       </div>
-      <!-- 右侧 -->
-      <div
-        class="rightBox box"
-        style="height: 100%;"
-      >
+    </div>
+    <div
+      class="boxswai"
+      style="width:74%;padding-left:0px;padding-right:0px;"
+    >
+      <div class="boxnei">
         <div
-          style="width:calc(100% - 10px);backgroundColor:#fff;border-radius:3px;padding:10px 10px 0px 8px;box-sizing: border-box;border: 1px solid #EBEEF5;"
           class="marleft10"
+          style="height:100%;"
         >
           <!-- 上传、删除、下载操作栏 -->
           <div
@@ -110,7 +104,6 @@
             >下载EXCEL</el-link>
           </div>
           <div
-            :style="{width:'100%',height:heightss-13 +'px'}"
             class="rightHeader"
             v-show="from.checkd&&!from.fileUrl"
           >
@@ -130,13 +123,14 @@
             </el-upload>
           </div>
           <el-empty
-            :style="{width:'100%',height:heightss-13 +'px'}"
+            style="height:80%;"
             v-show="!from.checkd"
             description="该目录为根目录没有EXCEL文件"
           ></el-empty>
           <div
+            class="martop20"
             v-if="from.fileUrl"
-            :style="{ 'margin-top': '20px', 'height':heightss-60+'px','box-sizing': 'border-box','padding-bottom': '15px',}"
+            style="height:94%;"
           >
             <iframe
               :src="excelSrc"
@@ -147,7 +141,6 @@
         </div>
       </div>
     </div>
-
     <!-- 弹出框 -->
     <el-dialog
       :title="dialogTapType"
@@ -749,26 +742,12 @@ export default {
       });
     },
     //#endregion
-
-    //#region 树结构拉事件
-    mousedown1 () {//鼠标按下事件
-      document.onmousemove = (va) => {
-        if (1000 > va.clientX - 240 && va.clientX - 240 > 200) {
-          this.threessW = va.clientX - 240
-        }
-      }
-      document.onmouseup = () => {
-        document.onmousemove = null;
-        document.onmouseup = null;
-      }
-    },
-    //#endregion
   },
   created () {
     this.excelType()//清表类型
   },
   mounted () {
-    this.heightss = this.$refs.rulesss.clientHeight
+    // this.heightss = this.$refs.rulesss.clientHeight
   }
 }
 </script>
@@ -784,18 +763,10 @@ export default {
   color: rgb(0, 82, 217);
 }
 
-.box {
-  height: 800px;
-}
-
 .el-scrollbar {
   height: 100%;
 }
 
-.box .el-scrollbar__wrap {
-  overflow: scroll;
-}
-
 .rightHeader {
   display: flex;
   justify-content: flex-start;

+ 15 - 6
src/views/manager/archivetree.vue

@@ -15,6 +15,7 @@
           <h2>归档目录树</h2>
           <el-input
             placeholder="输入关键字进行过滤"
+            clearable
             v-model="filterText"
           >
           </el-input>
@@ -61,10 +62,11 @@
           </el-tree>
           <el-tree
             v-show="filterText"
-            ref="trees1"
+            :default-expanded-keys='defaultExpanded'
             :props="props"
             :data="data"
             node-key="id"
+            ref="trees2"
             :filter-node-method="filterNode"
           >
             <span
@@ -365,6 +367,7 @@ export default {
   data () {
     return {
       //#region 左侧树
+      defaultExpanded: [],//默认选中的节点
       filterText: '',//筛选条件
       treeNode: {},
       nodeNames: '',
@@ -549,6 +552,9 @@ export default {
       this.form.postType = data.postType
       this.form.id = ''
       this.form.parentId = data.id
+      if (this.filterText) {
+        this.defaultExpanded = [data.id]
+      }
       this.treeTap = true
     },
     async edittree (data) {//编辑树
@@ -728,7 +734,7 @@ export default {
         }
       })
     },
-    baocun (da) {
+    async baocun (da) {
       if (da.majorDataType) {
         if (da.majorDataType.length > 0) {
           let das = ''
@@ -742,9 +748,12 @@ export default {
         }
       }
       if (this.form.id) {
-        this.archiveTreeUpdate(da)
+        await this.archiveTreeUpdate(da)
       } else {
-        this.archiveTreeSave(da)
+        await this.archiveTreeSave(da)
+      }
+      if (this.filterText) {
+        this.archiveTreetree4()
       }
     },
     async archiveTreeSave (da) {//新增
@@ -870,7 +879,7 @@ export default {
   },
   watch: {
     filterText (val) {
-      this.$refs.trees1.filter(val);
+      this.$refs.trees2.filter(val);
     }
   },
   created () {
@@ -880,7 +889,7 @@ export default {
       disPlayTree: 1,
       nodeType: 2,
     })
-    this.archiveTreetree4()
+    this.archiveTreetree4()//全加载左侧树
   },
   mounted () {
     this.heights = this.$refs.container.$el.offsetHeight

+ 0 - 2
src/views/manager/projectinfo/treeTemplate/template/editDefault.vue

@@ -62,6 +62,4 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.editDefault {
-}
 </style>