zhangh il y a 3 ans
Parent
commit
bcc362d29f

+ 11 - 5
src/components/WbsTree/ManualSorting.vue

@@ -1,16 +1,22 @@
 <template>
-  <div class="ManualSorting">
+  <div
+    class="ManualSorting"
+    style="border: 1px solid #E8E8E8;border-radius: 3px;"
+  >
     <div
       v-for="(item,key) in sort"
       :key="key"
       class="flexBetween flexItemsC"
-      style="width:100%;font-size:16px;height:30px;"
+      style="width:100%;font-size:16px;height:30px;padding:3px 0px;border-top: 1px solid  #E8E8E8;"
     >
       <div>
-        <span>{{key+1}}</span>
-        <span class="marleft20">{{item.deptName}}</span>
+
+        <span
+          class="marleft10"
+          style="color:black;"
+        >{{item.deptName}}</span>
       </div>
-      <div class="flexItemsC">
+      <div class="flexItemsC marright20">
         <i
           @click="shangshen(key)"
           class="el-icon-top"

+ 0 - 1
src/page/index/tags.vue

@@ -103,7 +103,6 @@ export default {
   },
   methods: {
     generateTitle (item) {
-      console.log(this.$router.$avueRouter);
       return this.$router.$avueRouter.generateTitle(
         item.label,
         (item.meta || {}).i18n

+ 16 - 11
src/views/exctab/ElementIdentification/index.vue

@@ -2,7 +2,10 @@
   <basic-container>
     <el-row :gutter="20">
       <el-col :span="5">
-        <div style="text-align: center;">元素识别</div>
+        <div
+          style="text-align: center;fontSize:18px; font-weight: 900;"
+          class="marbottom5"
+        >元素识别</div>
         <el-tree
           :data="treeData"
           :props="treeProps"
@@ -11,11 +14,9 @@
           lazy
         ></el-tree>
       </el-col>
-      <el-col
-        :span="19"
-        v-if="excelSrc"
-      >
-        <div>{{from.extension}}</div>
+      <el-col :span="19">
+        <div v-if="from.extension==''">表名称</div>
+        <div v-else>{{from.extension}}</div>
         <el-row
           class="martop20"
           :gutter="20"
@@ -32,6 +33,7 @@
               <el-button
                 type="info"
                 size="mini"
+                :disabled="from.id==''"
                 @click="automaticRecognition"
               >自动识别</el-button>
               <div
@@ -105,6 +107,7 @@
               type="success"
               class="martop20"
               @click="establish()"
+              :disabled="from.id==''"
             >关联WBS并创建元素</el-button>
           </el-col>
         </el-row>
@@ -325,11 +328,13 @@ export default {
       this.getColByTabId()
     },
     pushTableData () {//
-      this.tableData.push({
-        eName: '',
-        eType: '',
-        eAllowDeviation: ''
-      })
+      if (this.from.id) {
+        this.tableData.push({
+          eName: '',
+          eType: '',
+          eAllowDeviation: ''
+        })
+      }
     },
     deleteTableData (key) {//删除
       this.tableData.splice(key, 1)

+ 149 - 146
src/views/exctab/excelmodel/excelmodel.vue

@@ -1,135 +1,140 @@
 <template>
   <div>
-    <div class="box flexBetween" >
+    <div class="box flexBetween">
       <!-- 左侧树结构 -->
-      <div :style="{'width':threessW+'px'}">
+      <div
+        :style="{'width':threessW+'px'}"
+        ref="rulesss"
+      >
         <div
           class="box flexStar"
-          style="width:100%;"
+          style="width:100%;backgroundColor:#fff;border-radius:3px;padding:10px 0px 0px 8px;box-sizing: border-box;border: 1px solid #EBEEF5;overflow:hidden;"
         >
-          <el-scrollbar style="width:100%;">
-            <basic-container style="width:100%;">
-              <!-- 树结构 -->
-              <avue-tree
-                :style="{width:'100%',height:heightss +'px'}"
-                :permission="getPermission"
-                :loading="loading"
-                :option="option"
-                :data="data"
-                @node-click="nodeClick"
-              >
-                <span
-                  class="el-tree-node__label"
-                  slot-scope="{ data }"
-                >
-                  <div>
-                    <span style="text-overflow: ellipsis;width:70%;"> {{ data.name }} </span>
-                    <!-- <span> {{ node}} </span> -->
-                    <!-- 添加 -->
-                    <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)"
-                      v-if="!data.hasChildren&&data.fileType!=1"
-                    ></i>
-                  </div>
-                </span>
-              </avue-tree>
-            </basic-container>
-          </el-scrollbar>
+          <!-- 树结构 -->
+          <avue-tree
+            :style="{width:'100%',height:heightss-20+'px','box-sizing': 'border-box',overflow:'hidden'}"
+            :permission="getPermission"
+            :loading="loading"
+            :option="option"
+            :data="data"
+            @node-click="nodeClick"
+          >
+            <span
+              class="el-tree-node__label"
+              slot-scope="{ data }"
+            >
+              <div>
+                <span style="text-overflow: ellipsis;width:70%;"> {{ data.name }} </span>
+                <!-- <span> {{ node}} </span> -->
+                <!-- 添加 -->
+                <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)"
+                  v-if="!data.hasChildren&&data.fileType!=1"
+                ></i>
+              </div>
+            </span>
+          </avue-tree>
           <div
-            style="border-left:5px solid rgba(255,255,255,0);position:relative;left: -6px;z-index:999"
+            style="border-left:8px solid rgba(255,255,255,0);z-index:999"
             @mousedown="mousedown1()"
           ></div>
         </div>
       </div>
       <!-- 右侧 -->
-      <div class="rightBox box" style="height: 100%;" ref="rulesss">
-        <el-scrollbar style="height: 100%;" >
-          <basic-container style="height: 100%;" >
-            <!-- 上传、删除、下载操作栏 -->
-            <div
-              class="rightHeader"
-              v-show="from.checkd&&from.fileUrl"
-            >
-              <div class="excelname">
-                <div>{{from.extension}}</div>
-                <i
-                  class="el-icon-success marleft10"
-                  style="color: rgb(0, 168, 112);"
-                ></i>
-              </div>
-              <el-upload
-                class="marleft10"
-                :auto-upload="false"
-                :show-file-list="false"
-                action="#"
-                :limit="1"
-                :file-list='fileList'
-                accept=".xls,.xlsx"
-                :on-change="uploadChange"
-              >
-                <el-button
-                  type="primary"
-                  size="mini"
-                >重新上传</el-button>
-              </el-upload>
-              <el-link
-                class="marleft10 colorblue"
-                @click="delectExcelMS"
-              >删除</el-link>
-              <el-link
-                underline
-                class="marleft10 colorblue"
-                style="text-decoration:underline;"
-                @click="downloadExcel()"
-              >下载EXCEL</el-link>
+      <div
+        class="rightBox box"
+        style="height: 100%;"
+      >
+        <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"
+        >
+          <!-- 上传、删除、下载操作栏 -->
+          <div
+            class="rightHeader"
+            v-show="from.checkd&&from.fileUrl"
+          >
+            <div class="excelname">
+              <div>{{from.extension}}</div>
+              <i
+                class="el-icon-success marleft10"
+                style="color: rgb(0, 168, 112);"
+              ></i>
             </div>
-            <div
-              class="rightHeader"
-              v-show="from.checkd&&!from.fileUrl"
+            <el-upload
+              class="marleft10"
+              :auto-upload="false"
+              :show-file-list="false"
+              action="#"
+              :limit="1"
+              :file-list='fileList'
+              accept=".xls,.xlsx"
+              :on-change="uploadChange"
             >
-              <el-upload
-                :auto-upload="false"
-                :show-file-list="false"
-                action="#"
-                :limit="1"
-                :file-list='fileList'
-                accept=".xls,.xlsx"
-                :on-change="uploadChange"
-              >
-                <el-button
-                  type="primary"
-                  size="mini"
-                >上传 excel</el-button>
-              </el-upload>
-            </div>
-            <el-empty
-              v-show="!from.checkd"
-              description="该目录为根目录没有EXCEL文件"
-            ></el-empty>
-            <div v-if="from.fileUrl"
-              :style="{ 'margin-top': '20px', 'height':heightss+'px'}"
+              <el-button
+                type="primary"
+                size="mini"
+              >重新上传</el-button>
+            </el-upload>
+            <el-link
+              class="marleft10 colorblue"
+              @click="delectExcelMS"
+            >删除</el-link>
+            <el-link
+              underline
+              class="marleft10 colorblue"
+              style="text-decoration:underline;"
+              @click="downloadExcel()"
+            >下载EXCEL</el-link>
+          </div>
+          <div
+            class="rightHeader"
+            v-show="from.checkd&&!from.fileUrl"
+          >
+            <el-upload
+              :auto-upload="false"
+              :show-file-list="false"
+              action="#"
+              :limit="1"
+              :file-list='fileList'
+              accept=".xls,.xlsx"
+              :on-change="uploadChange"
             >
-              <iframe
-                :src="excelSrc"
-                width="100%"
-                height="100%"
-              ></iframe>
-            </div>
-          </basic-container>
-        </el-scrollbar>
+              <el-button
+                type="primary"
+                size="mini"
+              >上传 excel</el-button>
+            </el-upload>
+          </div>
+          <el-empty
+            :style="{width:'100%',height:heightss-13 +'px'}"
+            v-show="!from.checkd"
+            description="该目录为根目录没有EXCEL文件"
+          ></el-empty>
+          <div
+            v-if="from.fileUrl"
+            :style="{ 'margin-top': '20px', 'height':heightss-60+'px','box-sizing': 'border-box','padding-bottom': '15px',}"
+          >
+            <iframe
+              :src="excelSrc"
+              width="100%"
+              height="100%"
+            ></iframe>
+          </div>
+        </div>
       </div>
     </div>
 
@@ -282,41 +287,38 @@ export default {
   data () {
     return {
       //#region 鼠标
+      leftTRee: '',//左侧树ID
       threessW: 400,
-      tharrss: true,
-      mouse1: {
-        x: '',
-        y: '',
-      },//开始
-      mouse2: {
-        x: '',
-        y: '',
-      },//结束
       //#endregion
-      heightss:'',//
+      heightss: '',//
       loading: false,//懒加载
       option: {
         filter: false,
         lazy: true,
-        menu:false,
+        menu: false,
         treeLoad: (async (node, resolve) => {
           console.log(node);
           console.log(resolve);
-          if (node.data.hasChildren) {
-            const { data: res } = await tabLazytree({ parentId: node.data.id, modeId: this.$route.params.id })
-            console.log(res);
-            if (res.code === 200) {
-              if (Array.isArray(res.data)) {
-                res.data.forEach((val) => {
-                  if (!val.hasChildren) {
-                    val.leaf = true
-                  }
-                })
+          if (node.level !== 0) {
+            if (node.data.hasChildren) {
+              const { data: res } = await tabLazytree({ parentId: node.data.id, modeId: this.$route.params.id })
+              console.log(res);
+              if (res.code === 200) {
+                //处理树节点是否有子节点的格式
+                if (Array.isArray(res.data)) {
+                  res.data.forEach((val) => {
+                    if (!val.hasChildren) {
+                      val.leaf = true
+                    }
+                  })
+                }
+                return resolve(res.data)
               }
-              return resolve(res.data)
+            } else {
+              return resolve([])
             }
           } else {
-            return resolve([])
+            return resolve(await this.tabLazytree(0, this.$route.params.id))
           }
         }),
       },
@@ -401,7 +403,7 @@ export default {
             }
           })
         }
-        this.data = res.data
+        return res.data
       }
     },
     async detailExcel (id) {//获取列表信息
@@ -480,7 +482,7 @@ export default {
       const { data: res } = await Excelmodify(wbsExclTabParmVO)
       console.log(res);
       if (res.code === 200) {
-        await this.tabLazytree(0, this.$route.params.id)//获取清表树
+        this.tabLazytree(wbsExclTabParmVO.parentId, this.$route.params.id)//获取清表树
         this.dialogTap = false
       }
     },
@@ -546,7 +548,6 @@ export default {
 
     //#region  外层左侧事件
     nodeClick (data) {//外层树结构
-      console.log(data);
       if (data.hasChildren == false || data.fileType == 3) {
         this.from.checkd = true
       } else {
@@ -735,7 +736,10 @@ export default {
     //#region 树结构拉事件
     mousedown1 () {//鼠标按下事件
       document.onmousemove = (va) => {
-        this.threessW = va.clientX - 240
+        console.log(1000 > va.clientX - 240 && va.clientX - 240 > 200);
+        if (1000 > va.clientX - 240 && va.clientX - 240 > 200) {
+          this.threessW = va.clientX - 240
+        }
       }
       document.onmouseup = () => {
         document.onmousemove = null;
@@ -746,10 +750,9 @@ export default {
   },
   created () {
     this.excelType()//清表类型
-    this.tabLazytree(0, this.$route.params.id)//获取清表树
   },
   mounted () {
-    this.heightss=this.$refs.rulesss.clientHeight-100
+    this.heightss = this.$refs.rulesss.clientHeight
   }
 }
 </script>

+ 31 - 10
src/views/manager/archivetree.vue

@@ -271,10 +271,12 @@
         <el-tree
           :props="dialogProps"
           show-checkbox
+          :check-strictly='true'
           :data="dialogData"
           node-key="id"
           accordion
           ref="trees"
+          @check-change="handleCheckChange"
           class="filter-tree"
         >
         </el-tree>
@@ -630,6 +632,16 @@ export default {
       })
     },
     baocun (da) {
+      if (da.majorDataType.length > 0) {
+        let das = ''
+        da.majorDataType.forEach((val, key) => {
+          das += val
+          if (da.majorDataType.length - 1 != key) {
+            das += ','
+          }
+        })
+        da.majorDataType = das
+      }
       if (this.form.id) {
         this.archiveTreeUpdate(da)
       } else {
@@ -679,9 +691,7 @@ export default {
       })
       this.pushfileTap = true
       await this.saixuan(this.dialogData)
-      console.log(this.checkXuan);
       this.$refs.trees.setCheckedKeys(this.checkXuan);
-
     },
     // 赛选
     saixuan (da) {//赛选
@@ -734,14 +744,25 @@ export default {
     },
     saveFile () {//保存按钮
       let arr = this.$refs.trees.getCheckedKeys()
-      let ids = ''
-      arr.forEach((val, key) => {
-        ids += val
-        if (key != arr.length - 1) {
-          ids += ','
-        }
-      })
-      this.submitDisplayConfigTree(ids)
+      console.log(arr);
+      // this.$refs.trees.setCheckedKeys(this.checkXuan);
+      // let ids = ''
+      // arr.forEach((val, key) => {
+      //   ids += val
+      //   if (key != arr.length - 1) {
+      //     ids += ','
+      //   }
+      // })
+      // this.submitDisplayConfigTree(ids)
+    },
+    handleCheckChange (data, checked, indeterminate) {
+      console.log(data, checked, indeterminate);
+      if (checked) {
+
+      }
+    },
+    checkXuanzhong () {
+
     },
     //#endregion
   },

+ 5 - 2
src/views/manager/projectinfo/detail.vue

@@ -327,7 +327,10 @@
                 class="marleft10"
                 @click="addUserToProject"
               >添加</el-button>
-              <el-button type="primary" @click="rputerPush()">创建新用户</el-button>
+              <el-button
+                type="primary"
+                @click="rputerPush()"
+              >创建新用户</el-button>
               <el-button
                 type="danger"
                 @click="handleDeletes"
@@ -379,7 +382,7 @@ import { getDictionary } from "@/api/system/dict";
 import { mapGetters } from "vuex";
 
 import treeTree from "@/components/tree-tree/main"
-import {findUserList} from "../../../api/manager/contractinfo";
+import { findUserList } from "../../../api/manager/contractinfo";
 export default {
   components: {
     treeTree