Procházet zdrojové kódy

归档树管理页面和BUG提交

zhangh před 2 roky
rodič
revize
e51eeb9cb1

+ 8 - 0
src/api/exctab/excelmodel.js

@@ -136,4 +136,12 @@ export const submitExcelRelationWbsTreeAndElement = (data) => {
         method: 'post',
         data
     })
+}
+
+export const getLazytree = (params) => {
+    return request({
+        url: '/api/blade-manager/wbsTree/lazy-tree',
+        method: 'get',
+        params
+    })
 }

+ 80 - 46
src/api/manager/archivetree.js

@@ -1,50 +1,84 @@
 import request from '@/router/axios';
 
-export const getList = (current, size, params) => {
-  return request({
-    url: '/api/blade-manager/archiveTree/list',
-    method: 'get',
-    params: {
-      ...params,
-      current,
-      size,
-    }
-  })
-}
-
-export const getDetail = (id) => {
-  return request({
-    url: '/api/blade-manager/archiveTree/detail',
-    method: 'get',
-    params: {
-      id
-    }
-  })
-}
-
-export const remove = (ids) => {
-  return request({
-    url: '/api/blade-manager/archiveTree/remove',
-    method: 'post',
-    params: {
-      ids,
-    }
-  })
-}
-
-export const add = (row) => {
-  return request({
-    url: '/api/blade-manager/archiveTree/submit',
-    method: 'post',
-    data: row
-  })
-}
-
-export const update = (row) => {
-  return request({
-    url: '/api/blade-manager/archiveTree/submit',
-    method: 'post',
-    data: row
-  })
+//初始化根节点
+export const archiveTreeInit = (data) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/init',
+        method: 'post',
+        data
+    })
 }
 
+
+//树节点懒加载
+export const lazyTree = (params) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/lazy-tree',
+        method: 'get',
+        params
+    })
+}
+
+//词典接口
+export const dictionary = (params) => {
+    return request({
+        url: '/api/blade-system/dict-biz/dictionary',
+        method: 'get',
+        params
+    })
+}
+
+//删除
+export const remove = (params) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/remove',
+        method: 'post',
+        params
+    })
+}
+
+//新增
+export const archiveTreeSave = (data) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/save',
+        method: 'post',
+        data
+    })
+}
+
+//编辑
+export const archiveTreeUpdate = (data) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/update',
+        method: 'post',
+        data
+    })
+}
+
+//编辑
+export const archiveTreeDetail = (params) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/detail',
+        method: 'get',
+        params
+    })
+}
+
+//全加载树形结构-显示树
+export const archiveTreetree = (params) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/tree',
+        method: 'get',
+        params
+    })
+}
+
+
+//保存树
+export const submitDisplayConfigTree = (params) => {
+    return request({
+        url: '/api/blade-manager/archiveTree/submitDisplayConfigTree',
+        method: 'post',
+        params
+    })
+}

+ 138 - 59
src/views/exctab/ElementIdentification/index.vue

@@ -112,7 +112,7 @@
       <el-row :gutter="20">
         <el-col :span="12">
           <el-select
-            style="width:400px;"
+            style="width:100%;"
             v-model="GLExcelFrom.name"
             placeholder="请选择"
             @change="changetherr()"
@@ -120,32 +120,32 @@
             <el-option
               v-for="(item,key) in GLExcelData"
               :key="key"
-              :label="item.name"
+              :label="item.wbsName"
               :value="item.id"
             >
             </el-option>
           </el-select>
-          <el-scrollbar style="margin-top:20px;height:50vh;">
-            <el-input
-              style="width:400px;"
-              v-model.trim="GLExcelFrom.search"
-              placeholder="请输入需要选择的内容"
-            ></el-input>
+          <el-scrollbar style="height:50vh;">
             <el-tree
-              :filter-node-method="filterNode222"
+              v-if="GLExcelFromtag"
               @node-click="handleNodeClickExcel"
               ref="tree"
               class="filter-tree"
               style="margin-top:10px;"
               :props="GLExcelProps"
               :data="exceldata"
+              :load="loadNodeTan"
+              lazy
               node-key="id"
               accordion
             >
             </el-tree>
           </el-scrollbar>
         </el-col>
-        <el-col :span="12">
+        <el-col
+          :span="12"
+          v-if="addElementForm.wbsId"
+        >
           <el-button
             type="primary"
             style="float:right;"
@@ -174,11 +174,13 @@
                 <el-button
                   type="primary"
                   size="mini"
+                  @click="relationMD(scope.$index,'关联')"
                   v-show="!scope.row.checknd"
                 >关联</el-button>
                 <el-button
                   type="primary"
                   size="mini"
+                  @click="relationMD(scope.$index,'取消关联')"
                   v-show="scope.row.checknd"
                 >取消关联</el-button>
               </template>
@@ -188,12 +190,12 @@
           <div v-if="addElement">
             <div class="flexBetween martop40">
               <el-input
-                v-model="addElementForm.name"
+                v-model="addElementForm.deptName"
                 placeholder="请输入表名"
               ></el-input>
               <el-select
                 class="marleft10"
-                v-model="addElementForm.region"
+                v-model="addElementForm.tableType"
                 placeholder="请选择表类型"
               >
                 <el-option
@@ -207,7 +209,7 @@
             <el-select
               style="width:100%;"
               class="martop20 "
-              v-model="addElementForm.region"
+              v-model="addElementForm.tableOwner"
               placeholder="请选择所属方"
             >
               <el-option
@@ -236,11 +238,10 @@
   </basic-container>
 </template>
 <script>
-import { tabLazytree, detailExcel, excelType, submitExcelRelationWbsTreeAndElement } from "@/api/exctab/excelmodel";
+import { tabLazytree, detailExcel, excelType, submitExcelRelationWbsTreeAndElement, getWbsTypeList, getLazytree } from "@/api/exctab/excelmodel";
 import { dictionarydataType } from "@/api/exctab/editelement";
 import { getColByTabId } from "@/api/manager/AdjustForm";
 import { selectByNodeTable } from "@/api/manager/wbstree";
-import { getList, tabLazytreeAll, } from '@/api/exctab/excelmodel'
 export default {
   data () {
     return {
@@ -268,17 +269,23 @@ export default {
       },
       GLExcelData: [],//
       GLExcelProps: {
-        label: 'name',
+        label: 'title',
         children: 'children',
-        disabled: 'hasChildren',
-        // isLeaf: !'hasChildren',
+        isLeaf: 'isExistForm',
       },
       exceldata: [],//清表模板树数据
       addTableData: [],//新增元素信息表
       exceltypeData: [],//清表类型
       addElement: false,
+      GLExcelFromtag: false,
       addElementForm: {
-
+        id: "",
+        initTableName: "",
+        deptName: '',
+        tableType: '',
+        tableOwner: '',
+        wbsId: '',
+        parentId: '',
       }
       //#endregion
     }
@@ -324,57 +331,82 @@ export default {
 
     //#region 关联公共WBS模板弹框
     establish () {//关联WBS并创建元素
-      this.getList()
+      this.getWbsTypeList()
       this.AssociatedPublicTap = true
     },
     AssociatedPublicClose () {//关联公共WBS模板关闭事件
-
+      this.addElementForm = {
+        id: "",
+        initTableName: "",
+        deptName: '',
+        tableType: '',
+        tableOwner: '',
+        wbsId: '',
+        parentId: '',
+      }
+      this.GLExcelFrom = {
+        name: '',
+        search: ''
+      }
+      this.exceldata = []
+      this.addElement = false
+      this.AssociatedPublicTap = false
+    },
+    async loadNodeTan (node, resolve) {//懒加载
+      console.log(node);
+      if (node.level === 0) {
+        return resolve(await this.getLazytree(0));
+      } else {
+        return resolve(await this.getLazytree(node.data.id));
+      }
     },
     changetherr () {//下拉框change事件
+      this.GLExcelFromtag = false
       if (this.GLExcelFrom.name != "") {
         this.GLExcelFrom.search = ''
-        this.tabLazytreeAll()
+        this.exceldata = []
+        this.$nextTick(() => {
+          this.GLExcelFromtag = true
+        })
       }
     },
-    filterNode222 (value, data) {//搜索显示隐藏事件
-      if (!value) return true;
-      return data.name.indexOf(value) !== -1;
-    },
     addElementMD () {//新增元素信息表按钮
       this.excelType()
       this.addElement = true
     },
-    async getList () {//获取清表模板信息
-      const { data: res } = await getList({
-        current: 1,
-        size: 100000,
-        parentId: 0,
-        wbstype: 1,//公有
-      })
+    async getWbsTypeList () {//获取清表模板信息
+      const { data: res } = await getWbsTypeList({ wbsType: 1 })
       console.log(res);
       if (res.code === 200 && res.msg === '操作成功') {
-        this.GLExcelData = res.data.records
+        this.GLExcelData = res.data
       }
     },
-    async tabLazytreeAll () {//清表树信息
-      const { data: res } = await tabLazytreeAll({
-        modeId: this.GLExcelFrom.name,
-        name: this.GLExcelFrom.search,
-
+    async getLazytree (parentId) {//清表树信息
+      const { data: res } = await getLazytree({
+        parentId: parentId,
+        wbsId: this.GLExcelFrom.name,
+        wbsType: '1'
       })
       console.log(res);
       if (res.code === 200 && res.msg === '操作成功') {
-        this.exceldata = res.data
+        res.data.forEach(val => {
+          val.isExistForm = !!val.isExistForm
+        })
+        return res.data
+      } else {
+        return []
       }
     },
     handleNodeClickExcel (data) {//点击节点事件
       console.log(data);
-      if (!data.hasChildren) {
+      if (data.hasChildren) {
+        this.addElementForm.wbsId = data.id
+        this.addElementForm.parentId = data.parentId
         this.selectByNodeTable(data.id)
       }
     },
     async selectByNodeTable (id) {//获取清表信息
-      const { data: res } = await selectByNodeTable({ id })
+      const { data: res } = await selectByNodeTable(id)
       console.log(res);
       if (res.code == 200) {
         if (res.data.length > 0) {
@@ -396,19 +428,73 @@ export default {
         this.exceltypeData = res.data
       }
     },
+    relationMD (index, type) {//关联取消关联
+      console.log(this.addTableData[index]);
+      if (this.addTableData.length > 0) {
+        if (type == '关联') {
+          this.addTableData.forEach((val, k) => {
+            if (index == k) {
+              val.checknd = !val.checknd
+            } else {
+              val.checknd = false
+            }
+          })
+          this.addElementForm.id = this.addTableData[index].id
+          this.addElementForm.initTableName = this.addTableData[index].initTableName
+        } else {
+          this.addTableData.forEach((val, k) => {
+            val.checknd = false
+          })
+          this.addElementForm.id = ''
+          this.addElementForm.initTableName = ''
+        }
+      }
+    },
     saveElementMD () {//保存按钮
-
+      if (this.addElementForm.wbsId) {
+        if (this.addTableData.length > 0) {
+          let tag = false
+          this.addTableData.forEach(val => {
+            if ((val.checknd == true && val.isLinkTable != 2) || (val.checknd == false && val.isLinkTable == 2)) {
+              tag = true
+            }
+          })
+          if (tag) {
+            this.submitExcelRelationWbsTreeAndElement({
+              id: this.addElementForm.id,
+              initTableName: this.addElementForm.initTableName,
+              elementList: this.tableData
+            })
+          } else {
+            if (this.addElementForm.deptName && this.addElementForm.tableType && this.addElementForm.tableOwner) {
+              this.submitExcelRelationWbsTreeAndElement({
+                deptName: this.addElementForm.deptName,
+                tableType: this.addElementForm.tableType,
+                tableOwner: this.addElementForm.tableOwner,
+                wbsId: this.addElementForm.wbsId,
+                parentId: this.addElementForm.parentId,
+                elementList: this.tableData
+              })
+            }
+          }
+        }
+      } else {
+        this.$message({
+          type: 'error',
+          message: '请先选择WBS树节点表单'
+        })
+      }
     },
-    async submitExcelRelationWbsTreeAndElement () {
-      const { data: res } = await submitExcelRelationWbsTreeAndElement({
-        deptName: "测试表单22222223",
-        wbsId: 1,
-        parentId: "1541657303195742209",
-        tableType: 2,
-        tableOwner: 2,
-        elementList: []
-      })
+    async submitExcelRelationWbsTreeAndElement (da) {//保存接口
+      const { data: res } = await submitExcelRelationWbsTreeAndElement(da)
       console.log(res);
+      if (res.code == 200) {
+        this.$message({
+          type: 'success',
+          message: '设置成功'
+        })
+        this.AssociatedPublicTap = false
+      }
     },
     //#endregion
 
@@ -446,13 +532,6 @@ export default {
     },
     //#endregion
   },
-  watch: {
-    'GLExcelFrom.search' (val) {
-      if (this.exceldata) {
-        this.$refs.tree.filter(val);
-      }
-    }
-  },
   created () {
   }
 }

+ 17 - 6
src/views/exctab/excelmodel/excelmodel.vue

@@ -426,8 +426,8 @@ export default {
         this.wbsdata = res.data
       }
     },
-    async selectByNodeTable (id, wbsType,projectid) {//wbs树获取表
-      const { data: res } = await selectByNodeTable({ id, wbsType ,projectid})
+    async selectByNodeTable (id, wbsType, projectid) {//wbs树获取表
+      const { data: res } = await selectByNodeTable({ id, wbsType, projectid })
       console.log(res);
       if (res.code === 200) {
         console.log(Array.isArray(res.data));
@@ -493,13 +493,24 @@ export default {
     //#endregion
 
     //#region 右侧
-    uploadChange (file, fileList) {//选中表后触发
+    async uploadChange (file, fileList) {//选中表后触发
       console.log(file, fileList);
       this.fileList = [file.raw]
       let formData = new FormData()
       formData.append('file', ...this.fileList)
       formData.append('nodeId', this.from.id)
-      this.uploadExcel(formData)
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      try {
+        await this.uploadExcel(formData)
+        loading.close();
+      } catch (error) {
+        loading.close();
+      }
     },
     delectExcelMS () {//删除excel表点击事件、
       let _that = this
@@ -615,7 +626,7 @@ export default {
       this.wbsform.wbsType = data.type
       this.wbsform.wbsName = data.deptName
       if (this.tableList == '') {
-        this.selectByNodeTable(data.id, data.type,this.excelForm.wbsId)
+        this.selectByNodeTable(data.id, data.type, this.excelForm.wbsId)
       } else {
         let tag = true
         this.tableList.forEach((val) => {
@@ -625,7 +636,7 @@ export default {
           }
         })
         if (tag) {
-          this.selectByNodeTable(data.id, data.type,this.excelForm.wbsId)
+          this.selectByNodeTable(data.id, data.type, this.excelForm.wbsId)
         }
       }
 

+ 744 - 315
src/views/manager/archivetree.vue

@@ -1,335 +1,764 @@
 <template>
   <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               :page.sync="page"
-               :permission="permissionList"
-               :before-open="beforeOpen"
-               v-model="form"
-               ref="crud"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
-               @row-del="rowDel"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.archivetree_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-    </avue-crud>
+    <el-row :gutter="20">
+      <el-col
+        span="9"
+        class='marleft20'
+      >
+        <h2>归档目录树</h2>
+        <el-tree
+          v-if="leftTree"
+          :props="props"
+          :load="loadNode"
+          :data="data"
+          lazy
+        >
+          <span
+            class=" flexStar"
+            slot-scope="{ node, data }"
+          >
+            <span>{{ data.title }}</span>
+            <span class="marleft10">
+              <i
+                @click.stop='addtree(data)'
+                class="el-icon-circle-plus-outline"
+                style="fontSize:18px;"
+                v-if="data.isStorageNode!=1"
+              ></i>
+              <i
+                @click.stop='edittree(data)'
+                class="el-icon-edit-outline marleft5"
+                style="fontSize:18px;"
+                v-if="node.level!=1"
+              ></i>
+              <i
+                @click.stop='deletetree(data)'
+                class="el-icon-delete marleft5"
+                style="fontSize:18px;"
+                v-if="node.level!=1"
+              ></i>
+            </span>
+          </span>
+        </el-tree>
+      </el-col>
+      <el-col
+        span="7"
+        style="padding-top:30px;"
+      >
+        <h3>上传文件入口显示配置</h3>
+        <div class="peizhi">
+          <div class="flexEnd">
+            <i
+              @click="rightPushTree"
+              class="el-icon-plus"
+              style="backgroundColor:#2A97DF;color:#fff;fontSize:20px;cursor: pointer;"
+            ></i>
+          </div>
+          <el-tree
+            :props="Rightprops"
+            :data="rightData"
+            node-key="id"
+            accordion
+            ref="tree"
+            class="filter-tree"
+          >
+          </el-tree>
+        </div>
+      </el-col>
+    </el-row>
+    <!-- 新增编辑 -->
+    <el-dialog
+      :title="form.id?'编辑':'新增'"
+      :visible.sync="treeTap"
+      width="700px"
+      :modal-append-to-body="false"
+      @close="treeClose"
+    >
+      <div>
+        <el-form
+          ref="form"
+          :model="form"
+          label-width="120px"
+          :rules="rules"
+        >
+          <el-form-item
+            label="节点名称"
+            prop="nodeName"
+          >
+            <el-input
+              v-model="form.nodeName"
+              style="width:400px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="岗位类型"
+            prop="postType"
+          >
+            <el-select
+              v-model="form.postType"
+              placeholder="请选择岗位"
+              style="width:400px;"
+            >
+              <el-option
+                v-for="item in JobTypeList"
+                :key="item.id"
+                :label="item.title"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="节点类型"
+            prop="nodeType"
+          >
+            <el-select
+              :disabled='form.id!=""'
+              v-model="form.nodeType"
+              placeholder="请选择节点"
+              style="width:400px;"
+            >
+              <el-option
+                v-for="item in nodeTypeList"
+                :key="item"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <template v-if="form.nodeType==2">
+            <el-form-item
+              label="是否存储节点"
+              prop="isStorageNode"
+            >
+              <el-select
+                :disabled='form.id!=""'
+                v-model="form.isStorageNode"
+                style="width:400px;"
+              >
+                <el-option
+                  v-for="item in storageNodeList"
+                  :key="item"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <template v-if="form.isStorageNode==1">
+              <el-form-item
+                label="是否竣工图"
+                prop="isBuiltDrawing"
+              >
+                <el-select
+                  v-model="form.isBuiltDrawing"
+                  style="width:400px;"
+                >
+                  <el-option
+                    v-for="item in builtDrawingList"
+                    :key="item"
+                    :label="item.label"
+                    :value="item.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                label="是否接口节点"
+                prop="isInterfaceNode"
+              >
+                <el-select
+                  v-model="form.isInterfaceNode"
+                  style="width:400px;"
+                >
+                  <el-option
+                    v-for="item in interfaceNodeList"
+                    :key="item"
+                    :label="item.label"
+                    :value="item.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <template v-if="form.isInterfaceNode==1">
+                <el-form-item label="选择接口类型">
+                  <el-select
+                    v-model="form.interfaceType"
+                    style="width:400px;"
+                  >
+                    <el-option
+                      v-for="item in interfaceTypeList"
+                      :key="item"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </template>
+            </template>
+          </template>
+          <!-- 数字化文件上传 -->
+          <template v-if="form.nodeType==1">
+            <el-form-item
+              label="关联类型"
+              prop="associationType"
+            >
+              <el-select
+                v-model="form.associationType"
+                style="width:400px;"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in associationTypeList"
+                  :key="item"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <template v-if="form.associationType==1">
+              <el-form-item
+                label="业内资料类型"
+                prop="majorDataType"
+              >
+                <el-checkbox-group v-model="form.majorDataType">
+                  <el-checkbox
+                    v-for="item in majorDataTypeList"
+                    :key="item.dictKey"
+                    :label="item.dictKey"
+                    name="type"
+                  >{{item.dictValue}}</el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+              <el-form-item
+                label="显示层级"
+                prop="displayHierarchy"
+              >
+                <el-select
+                  v-model="form.displayHierarchy"
+                  style="width:400px;"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in displayHierarchyList"
+                    :key="item.dictKey"
+                    :label="item.dictValue"
+                    :value="item.dictKey"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </template>
+          </template>
+        </el-form>
+      </div>
+      <span
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button @click="treeTap=false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="saveTree"
+        >保 存</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 右侧树 -->
+    <el-dialog
+      title="上传文件入口显示配置"
+      :visible.sync="pushfileTap"
+      :modal-append-to-body='false'
+      width="800px"
+      @close="pushFileClose"
+    >
+      <div>
+        <el-tree
+          :props="dialogProps"
+          show-checkbox
+          :data="dialogData"
+          node-key="id"
+          accordion
+          ref="trees"
+          class="filter-tree"
+        >
+        </el-tree>
+      </div>
+      <span
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button @click="pushfileTap = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="saveFile"
+        >确 定</el-button>
+      </span>
+    </el-dialog>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove} from "@/api/manager/archivetree";
-  import {mapGetters} from "vuex";
+import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree } from "@/api/manager/archivetree";
+import { getToken } from '@/util/auth';
+import { roletree } from "@/api/system/role.js";
+export default {
+  data () {
+    return {
+      //#region 左侧树
+      leftTree: true,
+      token: '',
+      props: {
+        label: 'title',
+        children: 'children',
+        isLeaf: 'hasChildren'
+      },
+      data: [],//树节点枚举值
+      //#endregion
 
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
+      //#region 新增编辑节点弹框
+      treeTap: false,
+      form: {
+        id: '',//新增还是编辑
+        parentId: '',  //上级节点id
+        nodeName: "",  //节点名称
+        nodeType: '',  // 节点类型  2 = 数字化上传文件
+        postType: '',  //岗位类型
+        isStorageNode: '',  //是否为存储节点
+        isBuiltDrawing: '',  //竣工图
+        isInterfaceNode: '',  //是否接口节点
+        interfaceType: '',  //选择接口类型
+        associationType: '',  //关联类型
+        majorDataType: [],  //内业资料类型
+        displayHierarchy: ''  //显示层级
+      },
+      rules: {
+        nodeName: [{ required: true, message: '请输入节点名称', trigger: 'blur' }],
+        postType: [{ required: true, message: '请选择岗位类型', trigger: 'change' }],
+        nodeType: [{ required: true, message: '请选择节点类型', trigger: 'change' }],
+        isStorageNode: [{ required: true, message: '请选择存储节点', trigger: 'change' }],
+        isBuiltDrawing: [{ required: true, message: '请选择竣工图', trigger: 'change' }],
+        isInterfaceNode: [{ required: true, message: '请选择接口节点', trigger: 'change' }],
+        interfaceType: [{ required: true, message: '请选择接口类型', trigger: 'change' }],
+        associationType: [{ required: true, message: '请选择关联类型', trigger: 'change' }],
+        majorDataType: [{ required: true, message: '请选择业内资料类型', trigger: 'change' }],
+        displayHierarchy: [{ required: true, message: '请选择显示层级', trigger: 'change' }],
+      },
+      JobTypeList: [],//岗位类型枚举
+      nodeTypeList: [
+        {
+          label: '关联电子原生文件',
+          value: 1
+        }, {
+          label: '数字化上传文件',
+          value: 2
         },
-        selectionList: [],
-        option: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "父主键",
-              prop: "parentId",
-              rules: [{
-                required: true,
-                message: "请输入父主键",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "祖级列表",
-              prop: "ancestors",
-              rules: [{
-                required: true,
-                message: "请输入祖级列表",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "节点名",
-              prop: "nodeName",
-              rules: [{
-                required: true,
-                message: "请输入节点名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "节点全称",
-              prop: "fullName",
-              rules: [{
-                required: true,
-                message: "请输入节点全称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "节点类型",
-              prop: "nodeType",
-              rules: [{
-                required: true,
-                message: "请输入节点类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "岗位类型",
-              prop: "postType",
-              rules: [{
-                required: true,
-                message: "请输入岗位类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "关联类型",
-              prop: "associationType",
-              rules: [{
-                required: true,
-                message: "请输入关联类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "内业资料类型",
-              prop: "majorDataType",
-              rules: [{
-                required: true,
-                message: "请输入内业资料类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "显示层级",
-              prop: "displayHierarchy",
-              rules: [{
-                required: true,
-                message: "请输入显示层级",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "是否为存储节点 '0'否 '1'是",
-              prop: "isStorageNode",
-              rules: [{
-                required: true,
-                message: "请输入是否为存储节点 '0'否 '1'是",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "是否为竣工图 '0'否 '1'是",
-              prop: "isBuiltDrawing",
-              rules: [{
-                required: true,
-                message: "请输入是否为竣工图 '0'否 '1'是",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "是否为接口节点 '0'否 '1'是",
-              prop: "isInterfaceNode",
-              rules: [{
-                required: true,
-                message: "请输入是否为接口节点 '0'否 '1'是",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "接口类型",
-              prop: "interfaceType",
-              rules: [{
-                required: true,
-                message: "请输入接口类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "排序",
-              prop: "sort",
-              rules: [{
-                required: true,
-                message: "请输入排序",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              rules: [{
-                required: true,
-                message: "请输入备注",
-                trigger: "blur"
-              }]
-            },
-          ]
+      ],//节点类型枚举
+      storageNodeList: [{
+        label: '是',
+        value: 1
+      }, {
+        label: '否',
+        value: 2
+      },],//存储节点枚举
+      builtDrawingList: [{
+        label: '是',
+        value: 1
+      }, {
+        label: '否',
+        value: 2
+      },],//竣工图枚举
+      interfaceNodeList: [{
+        label: '是',
+        value: 1
+      }, {
+        label: '否',
+        value: 2
+      },],//接口节点枚举
+      interfaceTypeList: [
+        {
+          label: '试验接口',
+          value: 1
+        }, {
+          label: '计量接口',
+          value: 2
         },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.archivetree_add, false),
-          viewBtn: this.vaildData(this.permission.archivetree_view, false),
-          delBtn: this.vaildData(this.permission.archivetree_delete, false),
-          editBtn: this.vaildData(this.permission.archivetree_edit, false)
-        };
+      ],//选择接口类型枚举
+      associationTypeList: [{
+        label: '质检资料',
+        value: 1
       },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
+      {
+        label: '试验资料',
+        value: 2
+      },
+      {
+        label: '影像资料',
+        value: 3
+      },
+      {
+        label: '台账资料',
+        value: 4
+      }],//
+      majorDataTypeList: [],//
+      displayHierarchyList: [],//
+      //#endregion
+
+      //#region 右侧树节点
+      pushfileTap: false,//开关
+      Rightprops: {
+        label: 'title'
+      },
+      rightData: [],
+      //#endregion
+
+      //#region 右侧树弹框
+      dialogProps: {
+        label: 'title'
+      },
+      dialogData: [],
+      checkXuan: [],
+      //#endregion
+    }
+  },
+  methods: {
+    //#region 左侧树方法
+    async loadNode (node, resolve) {
+      console.log(node);
+      if (node.level === 0) {
+        resolve([{
+          title: '系统级归档模板',
+          hasChildren: false,
+          id: 0,
+          isStorageNode: 0,
+        }])
+      } else {
+        resolve(await this.lazyTree(node.data.id))
       }
     },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
+    async archiveTreeInit () {//添加根节点
+      const { data: res } = await archiveTreeInit()
+      console.log(res);
+    },
+    async lazyTree (parentId) {//树节点懒加载
+      const { data: res } = await lazyTree({
+        parentId,
+        token: this.token
+      })
+      console.log(res);
+      if (res.code == 200 && res.msg == '操作成功') {
+        res.data.forEach(val => {
+          val.hasChildren = !val.hasChildren
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+        return res.data
+      }
+    },
+    addtree (data) {//添加树
+      if (this.JobTypeList.length == 0) {
+        this.roletree()
+      }
+      if (this.majorDataTypeList.length == 0) {
+        this.major_data_type()//内业资料类型
+      }
+      if (this.displayHierarchyList.length == 0) {
+        this.display_hierarchy()//显示层级
+      }
+      this.form.id = ''
+      this.form.parentId = data.id
+      this.treeTap = true
+    },
+    async edittree (data) {//编辑树
+      console.log(data);
+      if (this.JobTypeList.length == 0) {
+        this.roletree()
+      }
+      if (this.majorDataTypeList.length == 0) {
+        this.major_data_type()//内业资料类型
+      }
+      if (this.displayHierarchyList.length == 0) {
+        this.display_hierarchy()//显示层级
+      }
+      await this.archiveTreeDetail(data.id)
+      this.form.id = data.id
+      this.form.parentId = ''
+      this.treeTap = true
+    },
+    deletetree (data) {//删除树
+      this.$confirm('是否删除此数据', '提示', {
+        distinguishCancelAndClose: true,
+        confirmButtonText: '确认',
+        cancelButtonText: '取消'
+      })
+        .then(() => {
+          this.remove(data.id)
+        })
+        .catch(() => {
+
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+    },
+    async remove (id) {//删除接口
+      const { data: res } = await remove({ id })
+      console.log(res);
+      if (res.code == 200) {
+        this.$message({
+          type: 'success',
+          message: '删除成功'
         })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+        this.data = []
+        this.leftTree = false
+        this.$nextTick(() => {
+          this.leftTree = true
         })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
+      }
+    },
+    async archiveTreeDetail (id) {//详情接口
+      const { data: res } = await archiveTreeDetail({ id })
+      console.log(res);
+      if (res.code == 200) {
+        this.form.nodeName = res.data.fullName  //节点名称
+        this.form.nodeType = res.data.nodeType   // 节点类型  2 = 数字化上传文件
+        this.form.postType = res.data.postType   //岗位类型
+        this.form.isStorageNode = res.data.isStorageNode   //是否为存储节点
+        this.form.isBuiltDrawing = res.data.isBuiltDrawing   //竣工图
+        this.form.isInterfaceNode = res.data.isInterfaceNode   //是否接口节点
+        this.form.interfaceType = res.data.interfaceType   //选择接口类型
+        this.form.associationType = res.data.associationType   //关联类型
+        this.form.majorDataType = res.data.majorDataType   //内业资料类型
+        this.form.displayHierarchy = res.data.displayHierarchy   //显示层级
+      }
+    },
+    //#endregion
+
+    //#region 新增编辑节点弹框
+    treeClose () {//弹框关闭事件
+      this.form = {
+        parentId: '',  //上级节点id
+        nodeName: "",  //节点名称
+        nodeType: '',  // 节点类型  2 = 数字化上传文件
+        postType: '',  //岗位类型
+        isStorageNode: '',  //是否为存储节点
+        isBuiltDrawing: '',  //竣工图
+        isInterfaceNode: '',  //是否接口节点
+        interfaceType: '',  //选择接口类型
+        associationType: '',  //关联类型
+        majorDataType: [],  //内业资料类型
+        displayHierarchy: ''  //显示层级
+      }
+      this.$refs.form.resetFields();
+      this.form.id = ''
+      this.treeTap = false
+    },
+    async roletree () {//岗位类型枚举
+      const { data: res } = await roletree()
+      console.log(res);
+      if (res.code == 200) {
+        this.JobTypeList = res.data
+      }
+    },
+    async major_data_type () {//内业资料类型
+      const { data: res } = await dictionary({ code: 'major_data_type' })
+      console.log(res);
+      if (res.code == 200) {
+        this.majorDataTypeList = res.data
+      }
+    },
+    async display_hierarchy () {//显示层级
+      const { data: res } = await dictionary({ code: 'display_hierarchy' })
+      console.log(res);
+      if (res.code == 200) {
+        this.displayHierarchyList = res.data
+      }
+    },
+    saveTree () {//保存按钮
+      this.$refs.form.validate(val => {
+        if (val) {
+          if (this.form.nodeType == 2) {
+            if (this.form.isStorageNode == 1) {
+              if (this.form.isInterfaceNode == 1) {
+                this.baocun({
+                  id: this.form.id,
+                  parentId: this.form.parentId, //上级节点id
+                  nodeName: this.form.nodeName,  //节点名称
+                  nodeType: this.form.nodeType,  // 节点类型  
+                  postType: this.form.postType,  //岗位类型
+                  isStorageNode: this.form.isStorageNode,  //是否为存储节点
+                  isBuiltDrawing: this.form.isBuiltDrawing,  //竣工图
+                  isInterfaceNode: this.form.isInterfaceNode,  //是否接口节点
+                  interfaceType: this.form.interfaceType,  //选择接口类型
+                })
+              } else {
+                this.baocun({
+                  id: this.form.id,
+                  parentId: this.form.parentId, //上级节点id
+                  nodeName: this.form.nodeName,  //节点名称
+                  nodeType: this.form.nodeType,  // 节点类型  
+                  postType: this.form.postType,  //岗位类型
+                  isStorageNode: this.form.isStorageNode,  //是否为存储节点
+                  isBuiltDrawing: this.form.isBuiltDrawing,  //竣工图
+                  isInterfaceNode: this.form.isInterfaceNode,  //是否接口节点
+                })
+              }
+            } else {
+              this.baocun({
+                id: this.form.id,
+                parentId: this.form.parentId, //上级节点id
+                nodeName: this.form.nodeName,  //节点名称
+                nodeType: this.form.nodeType,  // 节点类型  
+                postType: this.form.postType,  //岗位类型
+                isStorageNode: this.form.isStorageNode,  //是否为存储节点
+              })
+            }
+          } else if (this.form.nodeType == 1) {
+            if (this.form.associationType == 1) {
+              this.baocun({
+                id: this.form.id,
+                parentId: this.form.parentId, //上级节点id
+                nodeName: this.form.nodeName,  //节点名称
+                nodeType: this.form.nodeType,  // 节点类型 
+                associationType: this.form.associationType,  //关联类型
+                majorDataType: this.form.majorDataType, //内业资料类型
+                displayHierarchy: this.form.displayHierarchy,  //显示层级
+              })
+            } else {
+              this.baocun({
+                id: this.form.id,
+                parentId: this.form.parentId, //上级节点id
+                nodeName: this.form.nodeName,  //节点名称
+                nodeType: this.form.nodeType,  // 节点类型  
+                associationType: this.form.associationType,  //关联类型
+              })
+            }
+          }
         }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
+      })
+    },
+    baocun (da) {
+      if (this.form.id) {
+        this.archiveTreeUpdate(da)
+      } else {
+        this.archiveTreeSave(da)
       }
-    }
-  };
+    },
+    async archiveTreeSave (da) {//新增
+      const { data: res } = await archiveTreeSave(da)
+      console.log(res);
+      if (res.code == 200) {
+        this.$message({
+          type: 'success',
+          message: '新增成功'
+        })
+        this.treeTap = false
+        this.data = []
+        this.leftTree = false
+        this.$nextTick(() => {
+          this.leftTree = true
+        })
+      }
+    },
+    async archiveTreeUpdate (da) {//编辑
+      const { data: res } = await archiveTreeUpdate(da)
+      console.log(res);
+      if (res.code == 200) {
+        this.$message({
+          type: 'success',
+          message: '编辑成功'
+        })
+        this.treeTap = false
+        this.data = []
+        this.leftTree = false
+        this.$nextTick(() => {
+          this.leftTree = true
+        })
+      }
+    },
+    //#endregion
+
+    //#region 右侧树节点
+    async rightPushTree () {//右侧节点树
+      this.checkXuan = []
+      await this.archiveTreetree2({
+        token: this.token,
+        nodeType: 2,
+      })
+      this.pushfileTap = true
+      await this.saixuan(this.dialogData)
+      console.log(this.checkXuan);
+      this.$refs.trees.setCheckedKeys(this.checkXuan);
+
+    },
+    // 赛选
+    saixuan (da) {//赛选
+      if (da.length > 0) {
+        da.forEach(val => {
+          if (val.isDisplayTree == 1) {
+            this.checkXuan.push(val.id)
+          }
+          if (val.hasChildren) {
+            this.saixuan(val.children)
+          }
+        })
+      }
+    },
+    pushFileClose () {//弹框关闭事件
+      this.checkXuan = []
+    },
+    async archiveTreetree (da) {//右侧树全加载接口
+      const { data: res } = await archiveTreetree(da)
+      console.log(res);
+      if (res.code == 200 && res.msg == "操作成功") {
+        this.rightData = res.data
+      }
+    },
+    //#endregion
+
+    //#region 右侧树弹框
+    async submitDisplayConfigTree (ids) {//保存接口
+      const { data: res } = await submitDisplayConfigTree({ ids })
+      console.log(res);
+      if (res.code == 200) {
+        this.$message({
+          type: 'success',
+          message: '设置成功'
+        })
+        this.archiveTreetree({
+          token: this.token,
+          disPlayTree: 1,
+          nodeType: 2,
+        })
+        this.pushfileTap = false
+      }
+    },
+    async archiveTreetree2 (da) {//右侧树全加载接口
+      const { data: res } = await archiveTreetree(da)
+      console.log(res);
+      if (res.code == 200 && res.msg == "操作成功") {
+        this.dialogData = res.data
+      }
+    },
+    saveFile () {//保存按钮
+      let arr = this.$refs.trees.getCheckedKeys()
+      let ids = ''
+      arr.forEach((val, key) => {
+        ids += val
+        if (key != arr.length - 1) {
+          ids += ','
+        }
+      })
+      this.submitDisplayConfigTree(ids)
+    },
+    //#endregion
+  },
+  created () {
+    this.token = 'bearer ' + getToken()
+    this.archiveTreetree({
+      token: this.token,
+      disPlayTree: 1,
+      nodeType: 2,
+    })
+  },
+}
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+.peizhi {
+  border: 1px solid #e5e5e5;
+  border-radius: 5px;
+  padding: 15px 10px;
+  min-height: 600px;
+}
+</style>

+ 3 - 3
src/views/manager/projectinfo/tree.vue

@@ -295,6 +295,7 @@
                 <el-link
                   class="mg-l-10"
                   type="primary"
+                  :disabled='scope.row.isLinkTable!=2'
                   @click="adjustExcel(scope.row.pkeyId,scope.row.excelId)"
                 >调整表单</el-link>
                 <el-link
@@ -432,7 +433,7 @@
       width="500px"
       modal-append-to-body
       append-to-body
-      :before-close="GLExcelMD"
+      @close="GLExcelMD"
     >
       <div>
         <el-select
@@ -2104,7 +2105,6 @@ export default {
         current: 1,
         size: 100000,
         parentId: 0,
-        wbstype: 2,//私有
       })
       this.GLExcelFrom.name = scope.row.modeId
       setTimeout(() => {
@@ -2134,7 +2134,7 @@ export default {
       }
     },
     async saveLinkTab () {//保存按钮
-      if (this.$refs.tree.getCheckedNodes.length > 0) {
+      if (this.$refs.tree.getCheckedNodes().length > 0) {
         const { data: res } = await saveLinkTab({
           exceTabId: this.$refs.tree.getCheckedNodes()[this.$refs.tree.getCheckedNodes().length - 1].id,
           tabId: this.GLExcelFrom.id,

+ 25 - 20
src/views/manager/wbsinfo/edit.vue

@@ -90,7 +90,7 @@
                         >调整排序</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="ImportElement(data)"
-                          v-if="node.level != 1"
+                          v-if="node.level != 1&&data.isExistForm==1"
                           icon="el-icon-folder-opened"
                         >导入元素</el-dropdown-item>
                       </el-dropdown-menu>
@@ -167,11 +167,11 @@
                         <el-dropdown-item
                           @click.native="paixuMD(data)"
                           v-if="node.level != 1"
-                          icon="el-icon-upload"
+                          icon="el-icon-sort"
                         >调整排序</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="ImportElement(data)"
-                          v-if="node.level != 1"
+                          v-if="node.level != 1&&data.isExistForm==1"
                           icon="el-icon-folder-opened"
                         >导入元素</el-dropdown-item>
                       </el-dropdown-menu>
@@ -444,6 +444,7 @@
         <el-button @click="ImportElementHandleClose()">取 消</el-button>
         <el-button
           type="primary"
+          :disabled="loding"
           @click="pushImportElement"
         >确 定</el-button>
       </span>
@@ -1187,7 +1188,7 @@
       :visible.sync="importTemplateVisible"
       width="800px"
       append-to-body
-      :close-on-click-modal="false"
+      @close="daoruClose"
     >
       <div v-loading="importLoading">
         <div>
@@ -1416,6 +1417,7 @@ import { mapGetters } from "vuex";
 export default {
   data () {
     return {
+      loding: false,
       formDatass: [],
       editElementFormTag: false,
       ImportElementdata: {
@@ -1438,6 +1440,7 @@ export default {
         children: 'children',
         label: 'title',
         isLeaf: function (data) {
+          console.log(data.isExistForm == 1);
           return !data.hasChildren || (data.isExistForm == 1);
         }
       },
@@ -2007,9 +2010,10 @@ export default {
     importTemplate (data) {
       this.importTemplateVisible = true;
       this.curTreeData = data;
-
     },
-
+    daoruClose () {
+      this.upFile = null
+    },
     importTemplateHandle () {
       if (!this.upFile) {
         this.$message({
@@ -2344,6 +2348,7 @@ export default {
 
     //#region 导入元素
     ImportElement (data) {//导入元素按钮
+      console.log(data);
       this.ImportElementdata.ancestors = data.ancestors
       this.ImportElementdata.id = data.id
       this.ImportElementTag = true
@@ -2352,12 +2357,6 @@ export default {
     async pushImportElement () {//确定按钮
       if (this.ImportElementFile.length > 0) {
         let formData = new FormData()
-        // formData.append('wbsTree', JSON.stringify({
-        //   wbsId: this.$route.params.id,
-        //   ancestors: this.ImportElementdata.ancestors,
-        //   id: this.ImportElementdata.id,
-        //   tenantId: this.userInfo.tenant_id,
-        // }))
         formData.append('wbsId', this.$route.params.id)
         formData.append('ancestors', this.ImportElementdata.ancestors)
         formData.append('id', this.ImportElementdata.id)
@@ -2370,6 +2369,7 @@ export default {
     },
     ImportElementHandleClose () {//关闭弹框事件
       this.ImportElementTag = false
+      this.loding = false
       this.ImportElementFile = []
     },
     ElementChange (file, fileList) {//文件上传时的钩子
@@ -2382,15 +2382,20 @@ export default {
       this.ImportElementFile = fileList
     },
     async importwbsTreeFormBatch (da) {
-      const { data: res } = await importwbsTreeFormBatch(da)
-      //console.log();
-      if (res.code == 200) {
-        this.$message({
-          type: "success",
-          message: "导入成功!"
-        })
+      this.loding = true
+      try {
+        const { data: res } = await importwbsTreeFormBatch(da)
+        console.log(res);
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: "导入成功!"
+          })
+        }
+        this.loding = false
+      } catch (error) {
+        this.loding = false
       }
-
     },
     async exportBatchTemplate () {
       const res = await exportBatchTemplate()

+ 4 - 4
src/views/system/user.vue

@@ -42,13 +42,13 @@
             slot-scope="{row,index}"
             slot="menu"
           >
-            <el-link
+            <!-- <el-link
               :underline="false"
               type="primary"
               icon="el-icon-edit"
               size="small"
               @click="$refs.crud.rowView(row,index)"
-            >查看</el-link>
+            >查看</el-link> -->
             <el-link
               class="marleft10"
               :underline="false"
@@ -422,7 +422,7 @@ export default {
       loading: true,
       platformLoading: false,
       page: {
-        pageSize: 10,
+        pageSize: 20,
         currentPage: 1,
         total: 0
       },
@@ -1048,7 +1048,7 @@ export default {
       }
     },
     async getProjectList () {//项目类型
-      const { data: res } = await getProjectList(1,999)
+      const { data: res } = await getProjectList(1, 999)
       console.log(res);
       if (res.code === 200) {
         this.projectData = res.data.records

+ 2 - 2
vue.config.js

@@ -28,9 +28,9 @@ module.exports = {
                 //本地服务接口地址
                 // target: 'http://localhost',
                 // target: 'http://192.168.4.6',
-                // target: 'http://47.110.251.215:8090',
+                target: 'http://47.110.251.215:8090',
                 // target: 'http://192.168.4.12',
-                target: 'http://192.168.4.44',
+                // target: 'http://192.168.4.44',
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',
                 ws: true,