Преглед на файлове

Merge branch 'master' of http://47.110.251.215:3000/web/saber into master

yangyj преди 2 години
родител
ревизия
2a687abea8

+ 11 - 1
src/api/exctab/excelmodel.js

@@ -224,7 +224,17 @@ export const uploadcoverfileExcel = (row) => {
         data: row
     })
 }
-
+// 批量上清表
+export const batchUploadExcelTab = (row) => {
+    return request({
+  // ty  application/json
+        url: '/api/blade-manager/exceltab/batchUploadExcelTab',
+        method: 'post',
+   
+        data: row,
+     
+    })
+}
 export const exctabcellSave = (row) => {
     return request({
       url: '/api/blade-manager/exctabcell/save',

+ 10 - 1
src/api/manager/wbsprivate.js

@@ -143,7 +143,16 @@ export const syncNodeinfo = (pKeyId) => {
     }
   })
 }
-
+//同步元素表单排序到合同段
+export const syncContractTabSort = (projectId) => {
+  return request({
+    url: 'api/blade-manager/wbsTreeContract/syncContractTabSort',
+    method: 'get',
+    params: {
+      projectId
+    }
+  })
+}
 
 
 //清表树

+ 8 - 0
src/api/manager/wbstree.js

@@ -360,4 +360,12 @@ export const syncCurrentFormInProject = (params) => {
         method: 'get',
         params
     })
+}
+//按类型搜索树接口
+export const getQueryValueByType = (params) => {
+    return request({
+        url: '/api/blade-manager/wbsTree/getQueryValueByType',
+        method: 'get',
+        params
+    })
 }

+ 16 - 6
src/components/tree-tree/main.vue

@@ -102,6 +102,7 @@ export default {
         //console.log(allTree,'allTree');
         this.getRightTree(allTree,keys);
         this.rightTreeData = allTree;
+        this.$emit('onAddTree',this.rightTreeData);
       }else{
         //只增加右侧树没有的节点,不会覆盖右侧树多余的节点
 
@@ -132,14 +133,23 @@ export default {
           }
         })
 
-        //console.log(addMap)
-        addMap.forEach((value,key)=>{
-          this.$refs.rightTree.append(key,value);
-        })
+           //把半选和选中的数组key合并
+        let keys = this.$refs.leftTree.getCheckedKeys().concat(this.$refs.leftTree.getHalfCheckedKeys());
+        const myArray = Array.from(addMap.keys());
+        let myright= JSON.parse(JSON.stringify(myArray));
+        this.getRightTree(myright,keys);
+        myright.forEach((data)=>{
+                  this.$refs.rightTree.append(data,data.parentId);
+          })
+
+
+        // addMap.forEach((value,key)=>{
+        //   this.$refs.rightTree.append(key,value);
+        // })
 
       }
 
-      this.$emit('onAddTree',this.rightTreeData);
+      
     },
     getRightTree(arr,keys){
       //对比所有的node和选中的key
@@ -168,7 +178,7 @@ export default {
         }
       }
     },
-
+   
     getRightTreeData(set,arr){
       arr.forEach((data)=>{
         set.add(data.id);

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

@@ -93,6 +93,7 @@
           <el-dropdown-item v-if="this.website.switchMode" @click.native="switchDept"
                             >{{$t('navbar.switchDept')}}
           </el-dropdown-item>
+      
           <el-dropdown-item @click.native="logout"
                             divided>{{$t('navbar.logOut')}}
           </el-dropdown-item>

Файловите разлики са ограничени, защото са твърде много
+ 254 - 495
src/views/exctab/excelmodel/excelmodel.vue


+ 17 - 0
src/views/exctab/exceltab.vue

@@ -110,6 +110,23 @@ export default {
               trigger: "blur"
             }]
           },
+          {
+              label: "模板类型",
+              type: "select",
+              search: false,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=table_template_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              dataType: "number",
+              prop: "tableTemplateType",
+              rules: [{
+                required: true,
+                message: "请选择模板类型",
+                trigger: "blur"
+              }]
+            },
 
           {
             label: "表数量",

+ 119 - 48
src/views/formula/edit.vue

@@ -159,7 +159,7 @@
         </el-row>
         <div class="text-align-c">
           <el-button size="small" @click="operationHandle" type="primary">保存</el-button>
-          <el-button size="small" @click="operationVisible = false">取消</el-button>
+          <el-button size="small" @click="canceloperationVisible ">取消</el-button>
         </div>
       </div>
     </div>
@@ -507,7 +507,7 @@ export default {
       formulaList:{},
       formulaMap:{},
       activeIndex: "1-1", //当前选择的公式
-
+      itemList:[],
       projectList: [], //项目备选列表
       projectId: "", //溯源的项目ID
       curProjiect: {}, //当前项目对象
@@ -743,59 +743,130 @@ export default {
       }
     },
 
+    // eleChang(value,item){
+    //   //console.log(value)
+    //   //console.log(item)
+    //   if(value){
+    //     //简单语法判断
+    //     if(this.selectEleFormula.length != 0 && this.deleEleIndex < 0){
+    //       let lastEle = this.selectEleFormula[this.selectEleFormula.length-1];
+    //       if(lastEle.type == 'Element'){
+    //         this.$message({
+    //           type: "warning",
+    //           message: "元素无法连续出现在元素后面"
+    //         });
+    //         item.checked = false;
+    //         return;
+    //       }
+    //       if(lastEle.type == 'Text'){
+    //         this.$message({
+    //           type: "warning",
+    //           message: "元素无法连续出现在输入值后面"
+    //         });
+    //         item.checked = false;
+    //         return;
+    //       }
+    //       if(lastEle.type == 'Brackets' && lastEle.name == ')'){
+    //         this.$message({
+    //           type: "warning",
+    //           message: "元素无法连续出现在右括号后面"
+    //         });
+    //         item.checked = false;
+    //         return;
+    //       }
+    //     }
+
+    //     this.eleAddFormulaHandle(item);
+    //   }else{
+    //     let index = -1;
+    //     for (let i = 0; i < this.selectEleFormula.length; i++) {
+    //       if(this.selectEleFormula[i].id == item.id){
+    //         index = i;
+    //         break;
+    //       }
+    //     }
+    //     if(index>-1){
+    //       this.selectEleFormula.splice(index,1);
+    //     }
+    //   }
+    // },
     eleChang(value,item){
-      //console.log(value)
-      //console.log(item)
       if(value){
         //简单语法判断
-        if(this.selectEleFormula.length != 0 && this.deleEleIndex < 0){
-          let lastEle = this.selectEleFormula[this.selectEleFormula.length-1];
-          if(lastEle.type == 'Element'){
-            this.$message({
-              type: "warning",
-              message: "元素无法连续出现在元素后面"
-            });
-            item.checked = false;
-            return;
-          }
-          if(lastEle.type == 'Text'){
-            this.$message({
-              type: "warning",
-              message: "元素无法连续出现在输入值后面"
-            });
-            item.checked = false;
-            return;
-          }
-          if(lastEle.type == 'Brackets' && lastEle.name == ')'){
-            this.$message({
-              type: "warning",
-              message: "元素无法连续出现在右括号后面"
-            });
-            item.checked = false;
-            return;
-          }
+        if(this.itemList.length != 0 && this.deleEleIndex < 0){
+                let lastEle = this.itemList[this.itemList.length-1];
+                if(lastEle.type == 'Text'){
+                  this.$message({
+                    type: "warning",
+                    message: "元素无法连续出现在输入值后面"
+                  });
+              item.checked = false;
+              return;
+             }
+            if(lastEle.type == 'Brackets' && lastEle.name == ')'){
+              this.$message({
+                type: "warning",
+                message: "元素无法连续出现在右括号后面"
+              });
+              item.checked = false;
+              return;
+            }
+        }
+        let lastEle = this.selectEleFormula[this.selectEleFormula.length-1];
+        if(this.selectEleFormula.length == 0 || lastEle.type == 'Operator' || lastEle.type == 'Brackets' || lastEle.name == '('){ /* 存在运算符 */
+          this.eleAddFormulaHandle(item);
+        } else {
+          this.itemList.push(item);
         }
 
-        this.eleAddFormulaHandle(item);
       }else{
-        let index = -1;
-        for (let i = 0; i < this.selectEleFormula.length; i++) {
-          if(this.selectEleFormula[i].id == item.id){
-            index = i;
-            break;
+           let index = -1;
+            for (let i = 0; i < this.itemList.length; i++) {
+            if(this.itemList[i].id == item.id){
+              index = i;
+              break;
+            }
+          }
+          if(index>-1){
+            this.itemList.splice(index,1);
           }
-        }
-        if(index>-1){
-          this.selectEleFormula.splice(index,1);
-        }
       }
     },
-
     //快捷添加运算符号
+    // addOperator(operator){
+    //   this.eleAddFormulaHandle(this.formulaMap[operator]);
+    // },
     addOperator(operator){
-      this.eleAddFormulaHandle(this.formulaMap[operator]);
-    },
+          if(  this.itemList.length>0){
+          this.itemList.forEach(e => {
+            let lastEle = this.selectEleFormula[this.selectEleFormula.length-1];
+            if(this.selectEleFormula.length != 0 && lastEle.type != 'Operator' && lastEle.type != 'Brackets' && lastEle.name != '('){ /* 不存在运算符 */
+              this.eleAddFormulaHandle(this.formulaMap[operator]);
+            }
+            this.eleAddFormulaHandle(e);
+          })
+          }else{
 
+              if(this.curSeleEleIndex===-1 || this.curSeleEleIndex === this.selectEleFormula.length - 1){ /* 没选择值或者选择最后一个的时候直接添加符号 */
+                this.eleAddFormulaHandle(this.formulaMap[operator]);
+              }else{ /* 选择中间的值,如果下一个是符号这替换,反之则在指定的位置添加 */
+                this.randomaddOperator(this.formulaMap[operator])
+              }
+          }
+        this.itemList=[];
+    },
+    canceloperationVisible(){
+      this.operationVisible=false;
+      this.allTreeShow=false;
+      this.filterText=''
+      this.treeId=''
+      this.itemList=[];
+      this.eleList.forEach((ele)=>{
+          this.$set(ele,'checked',false);
+          //ele.checked = false;
+      })
+      console.log('取消');
+    },
     //把元素加到公式里
     eleAddFormulaHandle(ele){
       if(ele.tableElementKey){
@@ -1325,7 +1396,7 @@ export default {
     async formulaStringToArray(){
       let detail = (await formulaDetail({elementId:this.eleid,scope:this.globaltype,nodeId:this.nodeid,projectId:this.curProjiect.id||this.pid})).data.data;
       console.log(detail,'detail');
-      if(detail.id){
+      if(detail&&detail.id){
         this.formulaid = detail.id;
         //let formula = formulaStringToArray('FC.sum(FC.repeat(E[测试测试_222]))+FC.ifelse(3<E[测试测试_333]&&E[测试测试_333]<10,E[测试测试_222]+E[测试测试_333],E[测试测试_333])',detail.map,this.formulaMap);
         let formula = formulaStringToArray(detail.formula,detail.map,this.formulaMap);
@@ -1342,7 +1413,7 @@ export default {
         }
       }
 
-      if(detail.scale > -1){
+      if(detail&&detail.scale > -1){
         this.isRetain = true;
         this.retainNum = detail.scale;
       }
@@ -1376,7 +1447,7 @@ export default {
             // 获取点击节点的第一张表
             console.log(this.eleTableList[0],'this.eleTableList[0]');
             // let tabId= this.eleTableList[0].initTableId; pkeyId
-            let tabId= this.eleTableList[0].pkeyId!==-1?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
+            let tabId= this.eleTableList[0].pkeyId!==-1&&this.eleTableList[0].pkeyId!==null?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
             console.log("wbsPrivateGetNodeTabAndParam")
             this.getTableEle(tabId);
             setTimeout(() => {
@@ -1402,7 +1473,7 @@ export default {
             this.eleTableList = res.data.data.tabData;
              this.eleListable=false;
             // let tabId= this.eleTableList[0].initTableId;
-               let tabId= this.eleTableList[0].pkeyId!==-1?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
+               let tabId= this.eleTableList[0].pkeyId!==-1&&this.eleTableList[0].pkeyId!==null?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
                console.log(this.eleTableList[0],'this.eleTableList[0]');
             console.log("getNodeTabAndParam",tabId);
             this.getTableEle(tabId);
@@ -1511,7 +1582,7 @@ export default {
             this.eleTableListComp = res.data.data.tabData;
 
             this.eleTableIdComp = this.eleTableListComp[0].initTableId;
-            let tabId= this.eleTableList[0].pkeyId!==-1?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
+            let tabId= this.eleTableList[0].pkeyId!==-1&&this.eleTableList[0].pkeyId!==null?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
             this.getTableEleComp(tabId);
           }else{
             this.eleTableListComp = [];

+ 3 - 3
src/views/manager/archivetree.vue

@@ -20,7 +20,7 @@
                       >
                     </el-input>  
                     <div  style="height:100%;overflow-y: auto;" class="scrollClass ">
-                      <el-scrollbar style="height:100%">
+                      <el-scrollbar style="height:90%">
                         <el-tree
                           style="box-sizing: border-box;"
                           v-show="!filterText"
@@ -185,7 +185,7 @@
           </el-tabs>
 
           <div class="scrollClass "  v-if="activetabName==='second'" style="height:100%">
-                 <el-scrollbar style="height:100%">
+                 <el-scrollbar style="height:80%">
                     <el-tree
                     :props="Rightprops"
                     :data="rightData"
@@ -231,7 +231,7 @@
             ></i>
           </div>
               <div class="scrollClass "  v-if="isentryTree&&activetabName==='first'" style="height:100%">
-                 <el-scrollbar style="height:100%">
+                 <el-scrollbar style="height:80%">
                     <el-tree
                     :props="Rightprops"
                     :data="rightData"

+ 1 - 1
src/views/manager/contractinfo/detail.vue

@@ -198,7 +198,7 @@
                     label="监理单位名称"
                     prop="supervisionUnitName"
                   >
-                    <el-input v-model="contractForm.contractorUnitName"></el-input>
+                    <el-input v-model="contractForm.supervisionUnitName"></el-input>
                   </el-form-item>
                   <el-form-item
                     v-if="contractForm.contractType==3"

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

@@ -22,7 +22,7 @@
                     >
                     </el-input>
                   <div  style="height:100%;overflow-y: auto;" class="scrollClass ">
-                    <el-scrollbar style="height:100%">
+                    <el-scrollbar style="height:90%">
                       <el-tree
                         style="box-sizing: border-box;"
                         v-show="!filterText"
@@ -187,7 +187,7 @@
           </el-tabs>
 
           <div class="scrollClass"  v-if="activetabName==='second'" style="height:100%;">
-                 <el-scrollbar style="height:100%">
+                 <el-scrollbar style="height:80%">
                     <el-tree
                     :props="Rightprops"
                     :data="rightData"
@@ -234,7 +234,7 @@
             ></i>
           </div>
               <div class="scrollClass"  v-if="isentryTree&&activetabName==='first'" style="height:100%">
-                 <el-scrollbar style="height:100%">
+                 <el-scrollbar style="height:80%">
                     <el-tree
                     :props="Rightprops"
                     :data="rightData"

+ 53 - 9
src/views/manager/projectinfo/editElement/editElement.vue

@@ -3,10 +3,10 @@
     style="height:100%;"
     ref="heights"
   >
-    <basic-container class="editElement" style="height:900px">
+    <basic-container class="editElement" >
       <div class="flex" style="position:fixed;left:30px;top:0;">
         <h2 class="mg-r-10">编辑元素</h2>
-        <el-link type="primary" @click="toBack">返回上一级</el-link>
+        <!-- <el-link type="primary" @click="toBack">返回上一级</el-link> -->
       </div>
       <div
         class="header"
@@ -31,6 +31,16 @@
           :span="7"
           style="position: fixed;right: 13px;"
         >
+        <div style="margin-bottom: 20px;float: right;padding-right: 25px">
+          <el-button @click="toBack">返回上一级</el-button>
+          <el-button type="warning" @click="adjustExcel">进入表单调整</el-button>
+          <el-button
+                v-show="AddNewElementField == '替换元素'"
+                type="primary"
+                :disabled="tag"
+                @click="saveReplace()"
+          >保存</el-button>
+        </div>
           <div v-show="AddNewElementField == '替换元素'">
             <!-- <div>
               <el-checkbox v-model="isMultiple" @change="multipleChange">多选模式</el-checkbox>
@@ -60,10 +70,10 @@
             </el-table>
 
             <el-select
-              style="width:300px;"
+              style="width:95%;"
               v-model="value"
               filterable
-              placeholder="请选择"
+              placeholder="输入元素名称搜索"
             >
               <el-option
                 v-for="item in options"
@@ -83,7 +93,7 @@
               v-model="names"
             >
             </el-input>
-            <div class="martop20">
+            <!-- <div class="martop20">
               <el-button
                 type="info"
                 @click="cancelReplace()"
@@ -93,15 +103,20 @@
                 :disabled="tag"
                 @click="saveReplace()"
               >保存</el-button>
+            </div> -->
+            <div class="martop20 replace_box" v-if="false">
+              <div>
+
+              </div>
             </div>
           </div>
-          <div
+          <!-- <div
             v-show="AddNewElementField ==''"
             style="width:160px;position: fixed;bottom: 50px; right:20px;"
           >
             <el-button type="info" @click="toBack">取消</el-button>
             <el-button type="primary">保存</el-button>
-          </div>
+          </div> -->
         </el-col>
       </el-row>
       <!-- 弹框 -->
@@ -353,6 +368,7 @@ export default {
   },
   created () {
     this.getElementInfoByTabId()
+    this.AddNewElementField = '替换元素'
   },
   methods: {
     takuangchangge (value) {//切换事件
@@ -369,6 +385,7 @@ export default {
         this.cascaderPanel = false
         clearTimeout(this.setTimeout)
       } else if (value[value.length - 1] == '删除文本信息') {
+        this.AddNewElementField = '删除文本信息'//打开新增元素弹框
         this.deleteelement()
         this.cascaderPanel = false
         clearTimeout(this.setTimeout)
@@ -621,7 +638,8 @@ export default {
        this.$refs.cascader.clearCheckedNodes()//调用方法无效
     },
     saveReplace () {//保存按钮
-      if (this.value) {
+    
+      if (this.value&& this.table.td&& this.table.tr) {
         this.tag = true
         this.submit({
           tabId: this.pkeyId,
@@ -633,7 +651,7 @@ export default {
       } else {
         this.$message({
           type: "error",
-          message: "请选择要替换的元素"
+          message: "请右键选择要替换的元素"
         })
       }
     },
@@ -762,6 +780,11 @@ export default {
       this.$emit('hideDialog')
 
     },
+    //调整表单
+    adjustExcel(){
+      this.$emit('hideDialog')
+      this.$emit('adjustExcel',this.pkeyId)
+    },
 
 
     eleDelete(index){
@@ -908,4 +931,25 @@ export default {
     height: calc(100vh - 60px);
   }
 }
+.replace_box{
+  border: 1px gray dashed;
+  width: 95%;
+  height: 500px;
+  position: relative;
+ 
+}
+.replace_box::after {
+				content: '未进行匹配的字段';
+				position: absolute;
+				right: 34%;
+				top: -15px;
+        background-color: white;
+				text-align: center;
+				font-size: 18px;
+				color: orange;
+        font-weight: 900;
+				
+		
+			}
+
 </style>

+ 121 - 37
src/views/manager/projectinfo/tree.vue

@@ -102,23 +102,32 @@
         <el-col :span="10" class="h-100p">
           <div class="h-100p flex flex-d-c">
             <p style="margin-top:2px">工程节点信息</p>
-            <div class="flex">
+            <div class="flex " style="align-items: center;justify-content: space-between;">
               <el-input
                 placeholder="输入关键字进行过滤"
                 v-model="filterText"
-                @input="filterChange"
                 clearable
+                style="width: 65%;margin-right: 15px;"
+                @clear="clearSearch"
               ></el-input>
-              <!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
+              <el-switch
+              v-model="searchType"
+              active-value="1"
+              inactive-value="2"
+              inline-prompt
+              active-text="按节点"
+              inactive-text="按表名"
+             
+             
+            />
+            <el-button type="primary" @click="searchTreeClick">搜索</el-button>
             </div>
             <div class="flex1 ov-hidden">
               <el-scrollbar class="h-100p">
                 <div v-loading="treeLoad">
                   <el-tree
-                  v-show="!filterText"
                   class="filter-tree"
                   lazy
-                  :data="treeData"
                   :load="loadNode"
                   @node-click="getNodeDetail"
                   :props="defaultProps"
@@ -127,6 +136,7 @@
                   node-key="id"
                   ref="tree"
                   :default-expanded-keys="defaultExpandedKeys"
+                  v-show="!isSearch"
                   >
                   <span
                   class="custom-tree-node "
@@ -171,16 +181,15 @@
                 </span>
               </el-tree>
               <el-tree
-                v-show="filterText"
-                class="filter-tree"
-                :data="treeData"
+                :load="searchtreeLoad"
+                :data="searchTreeData"
                 @node-click="getNodeDetail"
                 :props="defaultProps"
                 :expand-on-click-node="false"
                 highlight-current
                 node-key="id"
-                :filter-node-method="filterNode"
-                ref="treeall"
+                v-show="isSearch"
+                default-expand-all
               >
                   <span
                     class="custom-tree-node "
@@ -201,7 +210,7 @@
                               ></i>
                             </el-link>
                         
-                        <!-- 因右键自定义菜单事件需要获取当前点击的位置,所以此处绑定动态样式来控制菜单实时跟踪鼠标右键点击位置 -->
+                      
                               <ul
                                 v-show="menuvisible"
                                 :style="{ left: menuleft + 'px', top: menutop + 'px' }"
@@ -216,7 +225,7 @@
                           
                     </div>
                   </span>
-                  </el-tree>
+              </el-tree>
                 </div>
               </el-scrollbar>
             </div>
@@ -1446,6 +1455,7 @@
         :initTableId="editElementQuery.initTableId"
         :nodeid="editElementQuery.nodeid"
         @hideDialog="editElementVisible = false"
+        @adjustExcel="adjustExcel"
         v-if="editElementVisible"
       ></EditElement>
     </el-dialog>
@@ -1577,7 +1587,7 @@ import {
   updateStatus,
   getParamElements,
   specifiedParamElements,
-  delParamElements, selectPrivateFormElements,syncCurrentFormInProject
+  delParamElements, selectPrivateFormElements,syncCurrentFormInProject,getQueryValueByType
 } from "@/api/manager/wbstree";
 import {
   saveElement,
@@ -1600,6 +1610,7 @@ import {
   syncNodeTable,
   syncNodeinfo,
   tabTypeLazyTree,
+  syncContractTabSort
 } from "@/api/manager/wbsprivate";
 import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
 import { findProjectTreeTrial as getAlltreeTrial } from "@/api/manager/projectinfo";
@@ -1687,6 +1698,11 @@ export default {
       projectid: "",
       filterText: "",
       treeData: [],
+      searchType:'1',
+      isSearch:false,
+      searchTreeData:[],
+      searchtreeLoad:false,
+
       treeLoad: false,
       menuShow: false,
       defaultProps: {
@@ -1833,7 +1849,8 @@ export default {
       menusData:[
         // {icon: 'el-icon-s-promotion', label: '新增节点', key: "add"},
         {icon: 'el-icon-s-promotion', label: '编辑节点', key: "edit",content:'编辑节点'},
-        {icon: 'el-icon-upload', label: '同步元素表单', key: "sync1",content:'同步元素表单'},
+        {icon: 'el-icon-upload', label: '同步新增元素表单', key: "sync1",content:'同步新增元素表单'},
+        {icon: 'el-icon-upload', label: '同步元素表单排序到合同段', key: "sync3",content:'同步元素表单排序到合同段'},
         {icon: 'el-icon-s-promotion', label: '同步节点基础信息及表单URL', key: "sync2",content:'同步节点的基础信息、类型名称、表单url等信息'},
         {icon: 'el-icon-sort', label: '调整排序', key: "sort",content:'调整排序'},
         {icon: 'el-icon-s-promotion', label: '删除节点', key: "del",content:'删除节点'},
@@ -2328,7 +2345,9 @@ export default {
         //   }
           
         // });
-        getAlltree(this.projectid, this.id, this.curTreeData.primaryKeyId).then((res) => {
+        let pid=this.curTreeData.primaryKeyId?this.curTreeData.primaryKeyId:this.curTreeData.pKeyId
+        
+        getAlltree(this.projectid, this.id, pid).then((res) => {
           this.testTreeLoad = false;
           console.log(res.data.data,'data');
             this.testTreeData=res.data.data
@@ -2346,22 +2365,53 @@ export default {
       this.nodeDetail.mixRatioTestIds = this.toJoin(newarr);
      
     },
-    filterChange() {
-      if (this.treeData.length > 0) {
-        this.$refs.treeall.filter(this.filterText);
-        return;
+    // filterChange() {
+    //   if (this.treeData.length > 0) {
+    //     this.$refs.treeall.filter(this.filterText);
+    //     return;
+    //   }
+    //   this.treeLoad = true;
+    //   getAlltree(this.projectid, this.id).then((res) => {
+    //     this.treeLoad = false;
+    //     this.treeData = res.data.data;
+    //     console.log(res.data.data,'res.data.data');
+    //     this.$nextTick(() => {
+    //       this.$refs.treeall.filter(this.filterText);
+    //     });
+    //   });
+    // },
+    //搜索树
+
+     //搜索树
+    searchTreeClick(){
+      if(this.filterText.length>0){
+        this.isSearch=true
+        this.searchtreeLoad=true
+        getQueryValueByType({
+        queryValue:this.filterText,
+        type:this.searchType,
+        wbsId:this.id,
+        projectId: this.projectid
+        
+        }).then((res)=>{
+          let arr = [];
+          if (Array.isArray(res.data.data)) {
+            arr = res.data.data;
+            this.searchTreeData=arr
+          }else{
+            this.searchTreeData=[]
+          }
+        
+        })
+      }else{
+        this.isSearch=false
       }
-      this.treeLoad = true;
-      getAlltree(this.projectid, this.id).then((res) => {
-        this.treeLoad = false;
-        this.treeData = res.data.data;
-        console.log(res.data.data,'res.data.data');
-        this.$nextTick(() => {
-          this.$refs.treeall.filter(this.filterText);
-        });
-      });
+ 
+      this.searchtreeLoad=false
+    },
+    clearSearch(){
+      this.isSearch=false
     },
-
     importTemplate(data) {
       this.importTemplateVisible = true;
       this.curTreeData = data;
@@ -3322,7 +3372,7 @@ export default {
     },
 
     syncInfoHandle(item) {
-    if(this.curTreeData.primaryKeyId){
+    if(this.curTreeData.primaryKeyId||this.curTreeData.pKeyId){
       this.$confirm("是否同步节点参数?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -3334,7 +3384,8 @@ export default {
           ele.load=true
         }
       })
-        syncNodeParam(this.projectid,this.curTreeData.primaryKeyId)
+      let pid=this.curTreeData.primaryKeyId?this.curTreeData.primaryKeyId:this.curTreeData.pKeyId
+        syncNodeParam(this.projectid,pid)
           .then(() => {
             this.$message({
               type: "success",
@@ -3457,7 +3508,37 @@ export default {
           });
       });
     },
-
+    //同步元素表单排序到合同段
+    syncSortHandle (data) {
+      this.$confirm("同步元素表单排序到合同段", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let notify = this.$notify({
+          title: "提示",
+          message: "节点数据同步中...",
+          duration: 0,
+        });
+        syncContractTabSort(this.projectid)
+          .then(() => {
+            this.updateNodeTable();
+            this.$message({
+              type: "success",
+              message: "同步成功",
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "error",
+              message: "同步失败",
+            });
+          })
+          .finally(() => {
+            notify.close();
+          });
+      });
+    },
     typeTreeLoadNode(node, resolve) {
       let pid = 0;
       if (node.level != 0) {
@@ -3491,7 +3572,7 @@ export default {
       });
     },
     syncElectric(item){
-      if(this.curTreeData.primaryKeyId){
+      if(this.curTreeData.primaryKeyId||this.curTreeData.pKeyId){
           console.log('同步电签默认信息');
         this.$confirm("是否同步电签默认信息?", "提示", {
           confirmButtonText: "确定",
@@ -3504,8 +3585,8 @@ export default {
             ele.load=true
           }
         })
-
-          syncProjecteVisa(this.projectid,this.curTreeData.primaryKeyId)
+        let pid=this.curTreeData.primaryKeyId?this.curTreeData.primaryKeyId:this.curTreeData.pKeyId
+          syncProjecteVisa(this.projectid,pid)
             .then(() => {
               this.$message({
                 type: "success",
@@ -3551,8 +3632,8 @@ export default {
     tolinkEle(row){
       this.curLinkEleTable = row;
       this.linkCheckVisible = true;
-
-      selectFormElements(row.id,{type:3,nodeId:this.curTreeData.primaryKeyId}).then((res) => {
+      let pid=this.curTreeData.primaryKeyId?this.curTreeData.primaryKeyId:this.curTreeData.pKeyId
+      selectFormElements(row.id,{type:3,nodeId:pid}).then((res) => {
         res.data.data.forEach((ele)=>{
           ele.checked = false;
           ele.show = true;
@@ -3648,6 +3729,9 @@ export default {
         }else if(item.key==='sync2'){
         this.syncProjectHandle(data)
         }//
+        else if(item.key==='sync3'){
+          this.syncSortHandle(data)
+        }
         else if(item.key==='add'){
            this.addNodeHandle()
         }

+ 153 - 81
src/views/manager/projectinfo/treeTemplate/template/setInputTPT.vue

@@ -6,7 +6,7 @@
           元素坐标:
         </el-col>
         <el-col :span="18">
-            <avue-input v-model="htmlData.name" placeholder="请输入内容" :disabled='true' ></avue-input>
+          <avue-input v-model="htmlData.name" placeholder="请输入内容" :disabled='true'></avue-input>
         </el-col>
       </el-row>
       <el-row :span="24">
@@ -14,40 +14,126 @@
           文本格式:
         </el-col>
         <el-col :span="18">
-      <el-select
-        style="width:100%;"
-        v-model="from.type"
-        clearable
-        placeholder="请选择"
-      >
-        <el-option
-          v-for="item in kjtype"
-          :key="item.dictKey"
-          :label="item.dictValue"
-          :value="item.dictKey"
-        >
-        </el-option>
-      </el-select>
+          <el-select style="width:100%;" v-model="from.type" clearable placeholder="请选择">
+            <el-option v-for="item in kjtype" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
+            </el-option>
+          </el-select>
         </el-col>
       </el-row>
+      <!-- <el-row :span="24" v-if="from.type==='date'||from.type==='daterange'">
+        <el-col :span="3.8" style="line-height: 40px">
+          日期:
+        </el-col>
+        <el-col :span="8">
+          <el-checkbox-group v-model="checkDateList" style="margin-top: 10px;margin-left: 10px;" size="large">
+            <el-checkbox label="yyyy" >年</el-checkbox>
+            <el-checkbox label="MM" >月</el-checkbox>
+            <el-checkbox label="dd" >日</el-checkbox>
+          </el-checkbox-group>
+        </el-col>
+        <el-col :span="3.8" style="line-height: 40px">
+          分隔符:
+        </el-col>
+        <el-col :span="8" style="margin-left: 10px;">
+          <el-select
+              style="width:100%;"
+              v-model="from.type"
+              clearable
+              placeholder="请选择"
+            
+            >
+              <el-option
+                label="文本"
+                :value="文本"
+              >
+              </el-option>
+              <el-option
+                label="-"
+                value="-"
+              >
+              </el-option>
+              <el-option
+                label="/"
+                value="/"
+              >
+              </el-option>
+            </el-select>
+        </el-col>
+   
+      </el-row>
+      <el-row :span="24" v-if="from.type==='date'||from.type==='daterange'">
+        <el-col :span="3.8" style="line-height: 40px">
+          时间:
+        </el-col>
+        <el-col :span="8">
+          <el-checkbox-group v-model="checkDateList" style="margin-top: 10px;margin-left: 10px;" size="large">
+            <el-checkbox label="hh" >时</el-checkbox>
+            <el-checkbox label="mm" >分</el-checkbox>
+            <el-checkbox label="ss" >秒</el-checkbox>
+          </el-checkbox-group>
+        </el-col>
+        <el-col :span="3.8" style="line-height: 40px">
+          分隔符:
+        </el-col>
+        <el-col :span="8" style="margin-left: 10px;">
+          <el-select
+              style="width:100%;"
+              v-model="from.type"
+              clearable
+              placeholder="请选择"
+            
+            >
+              <el-option
+                label="文本"
+                :value="文本"
+              >
+              </el-option>
+              <el-option
+                label=":"
+                value=":"
+              >
+              </el-option>
+              <el-option
+                label="/"
+                value="/"
+              >
+              </el-option>
+            </el-select>
+        </el-col>
+   
+      </el-row>
+      <el-row :span="24" v-if="from.type==='daterange'">
+        <el-col :span="3.3" style="line-height: 40px">
+          中间分隔符:
+        </el-col>
+        <el-col :span="18" style="margin-left: 10px;">
+          <el-select
+              style="width:100%;"
+              v-model="from.type"
+              clearable
+              placeholder="请选择"
+            
+            >
+              <el-option
+                label="-"
+                value="-"
+              >
+              </el-option>
+              <el-option
+                label="~"
+                value="~"
+              >
+              </el-option>
+            </el-select>
+        </el-col>
+      </el-row> -->
+
     </div>
     <!-- 添加框 -->
-    <div
-      style="border: 1px dotted rgb(187, 187, 187);box-sizing: border-box;padding: 0px 15px;"
-      class="martop20 marbottom10"
-      v-show="from.type=='select'||from.type=='radio'||from.type=='checkbox'"
-    >
-      <table
-        class="table"
-        width='100%'
-        border='1px'
-        cellpadding='2px'
-        bordercolor="#E5E5E5"
-      >
-        <thead
-          cellpadding='2px'
-          height='40px'
-        >
+    <div style="border: 1px dotted rgb(187, 187, 187);box-sizing: border-box;padding: 0px 15px;"
+      class="martop20 marbottom10" v-show="from.type == 'select' || from.type == 'radio' || from.type == 'checkbox'">
+      <table class="table" width='100%' border='1px' cellpadding='2px' bordercolor="#E5E5E5">
+        <thead cellpadding='2px' height='40px'>
           <tr>
             <th width='15%'>序号</th>
             <th width='65%'>默认值</th>
@@ -55,42 +141,25 @@
           </tr>
         </thead>
         <tbody height='36px'>
-          <tr
-            v-for="(item,key) in setInputTable"
-            :key="key"
-          >
-            <td align="center">{{key+1}}</td>
+          <tr v-for="(item, key) in setInputTable" :key="key">
+            <td align="center">{{ key + 1 }}</td>
             <td>
-              <el-input
-                v-model="setInputTable[key].dictValue"
-                size="mini"
-                placeholder="请输入内容"
-              ></el-input>
+              <el-input v-model="setInputTable[key].dictValue" size="mini" placeholder="请输入内容"></el-input>
             </td>
             <td align="center">
-              <el-link
-                type="warning"
-                @click="deleteTable(key)"
-              >删除</el-link>
+              <el-link type="warning" @click="deleteTable(key)">删除</el-link>
             </td>
           </tr>
         </tbody>
       </table>
       <div class="martop20 flexEnd marbottom10"><i
-          style="padding-bottom: 10px;color:rgb(10, 134, 217);font-size:24px;cursor: pointer;"
-          class="el-icon-circle-plus"
-          @click="addTable()"
-        ></i></div>
+          style="padding-bottom: 10px;color:rgb(10, 134, 217);font-size:24px;cursor: pointer;" class="el-icon-circle-plus"
+          @click="addTable()"></i></div>
     </div>
     <el-row style="text-align: center">
-      <el-button type="primary"
-                 size="small"
-                 icon="el-icon-circle-plus-outline"
-                 @click="saveType()">保存设置</el-button> &nbsp;&nbsp;
-      <el-button type="primary"
-                 size="small"
-                 icon="el-icon-circle-plus-outline"
-                 @click="saveType()">继续保存</el-button>
+      <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="saveType()">保存设置</el-button>
+      &nbsp;&nbsp;
+      <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="saveType()">继续保存</el-button>
     </el-row>
   </div>
 </template>
@@ -99,32 +168,32 @@ import { dictionary, saveInput, getColByTabId } from "@/api/manager/AdjustForm";
 import { getExcelHtml } from '@/api/exctab/excelmodel'
 export default {
   props: ['pkeyId', 'htmlData'],
-  computed:{
-    myHtmlData:function(){
+  computed: {
+    myHtmlData: function () {
       return this.htmlData;
     }
   },
-  watch:{
-    myHtmlData:function(newV){
+  watch: {
+    myHtmlData: function (newV) {
       //console.log(newV)
-      if(newV.type){
-        if(newV.type == 'checkbox'){
-          this.from.type ='checkbox';
+      if (newV.type) {
+        if (newV.type == 'checkbox') {
+          this.from.type = 'checkbox';
           this.setInputTable = newV.checkLabelDatas;
-        }else if(newV.type == 'radio'){
-          this.from.type ='radio';
+        } else if (newV.type == 'radio') {
+          this.from.type = 'radio';
           this.setInputTable = newV.radioDatas;
-        }else if(newV.type == 'select'){
-          this.from.type ='select';
+        } else if (newV.type == 'select') {
+          this.from.type = 'select';
           this.setInputTable = newV.selectDatas;
         }
-      }else{
-        this.from.type ='';
+      } else {
+        this.from.type = '';
         this.setInputTable = [];
       }
     }
   },
-  data () {
+  data() {
     return {
       elementName: [],
       kjtype: [],//框架类型
@@ -134,17 +203,19 @@ export default {
       },
       setInputTable: [],//数据体
       disabled: false,
+      checkDateList: [],
+      testvalue1: new Date(2000, 0, 0, 0, 22),
     }
   },
   methods: {
-    addTable () {//添加table表
+    addTable() {//添加table表
       this.setInputTable.push({ dictValue: '' })
     },
-    deleteTable (key) {//删除数据
+    deleteTable(key) {//删除数据
       this.setInputTable.splice(key, 1)
     },
-    saveType () {//保存设置按钮
-      if(this.htmlData.tr === '' || this.htmlData.td === ''){
+    saveType() {//保存设置按钮
+      if (this.htmlData.tr === '' || this.htmlData.td === '') {
         this.$message({
           type: "warning",
           message: "请先选择元素"
@@ -197,14 +268,14 @@ export default {
         });
       }
     },
-    async dictionary () {//获取文本类型接口
+    async dictionary() {//获取文本类型接口
       const { data: res } = await dictionary()
       console.log(res);
       if (res.code === 200) {
         this.kjtype = res.data
       }
     },
-    async saveInput (da) {//保存设置文本接口
+    async saveInput(da) {//保存设置文本接口
       const { data: res } = await saveInput(da)
       console.log(res);
       if (res.code == 200) {
@@ -220,8 +291,8 @@ export default {
     //     this.elementName = res.data
     //   }
     // },
-    async getExcelHtml () {
-      const { data: res } = await getExcelHtml({ pkeyId:this.pkeyId})
+    async getExcelHtml() {
+      const { data: res } = await getExcelHtml({ pkeyId: this.pkeyId })
       console.log(res);
       if (res.code === 200) {
         this.htmlData.name = ''
@@ -234,7 +305,7 @@ export default {
       }
     },
   },
-  created () {
+  created() {
     this.dictionary()  //获取文本类型接口
     // this.getColByTabId()
   },
@@ -248,7 +319,8 @@ export default {
   color: #101010;
   font-size: 14px;
 }
-.setInputcss{
+
+.setInputcss {
   width: 90%;
   height: 100%;
 }

+ 88 - 40
src/views/manager/wbsinfo/edit.vue

@@ -19,20 +19,31 @@
       <el-col :span="10" class="h-100p">
         <div class="h-100p flex flex-d-c">
           <p>工程节点信息</p>
-          <div class="flex">
+          <div class="flex " style="align-items: center;justify-content: space-between;">
             <el-input
-              placeholder="输入关键字进行过滤"
+              placeholder="输入关键字进行搜索"
               v-model="filterText"
-              @input="filterChange"
               clearable
+              style="width: 70%;margin-right: 15px;"
+              @clear="clearSearch"
             ></el-input>
-            <!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
+            <el-switch
+              v-model="searchType"
+              active-value="1"
+              inactive-value="2"
+              inline-prompt
+              active-text="按节点"
+              inactive-text="按表名"
+             
+             
+            />
+            <el-button type="primary" @click="searchTreeClick">搜索</el-button>
           </div>
-          <div class="flex1 ov-hidden">
+          <div class="flex1 ov-hidden"  v-loading="treeLoad">
           <el-scrollbar class="h-100p">
-            <div v-loading="treeLoad">
+            <div>
               <el-tree
-                v-show="!filterText"
+                v-show="!isSearch"
                 class="filter-tree"
                 lazy
                 :load="loadNode"
@@ -43,6 +54,7 @@
                 node-key="id"
                 ref="tree"
                 :default-expanded-keys="defaultExpandedKeys"
+                :data="treeData"
               >
                 <span
                   class="custom-tree-node"
@@ -85,16 +97,15 @@
                 </span>
               </el-tree>
               <el-tree
-                v-show="filterText"
-                class="filter-tree"
-                :data="treeData"
+                v-show="isSearch"
+                :data="searchTreeData"
                 @node-click="getNodeDetail"
                 :props="defaultProps"
                 :expand-on-click-node="false"
                 highlight-current
                 node-key="id"
-                :filter-node-method="filterNode"
-                ref="treeall"
+                :load="searchtreeLoad"
+                default-expand-all
               >
                 <span
                   class="custom-tree-node"
@@ -105,9 +116,6 @@
                   <div class="pd-r-20">
                     {{ node.label }}
                     <div class="normal-black">
-                      <!-- <el-link :underline="false">
-                        <i class="el-icon-sort" @click="paixuMD(data)" v-if="node.level != 1" title="调整排序"></i>
-                      </el-link> -->
                            <div >
                               <el-link :underline="false">
                                 <i
@@ -118,7 +126,7 @@
                                 ></i>
                               </el-link>
                           
-                          <!-- 因右键自定义菜单事件需要获取当前点击的位置,所以此处绑定动态样式来控制菜单实时跟踪鼠标右键点击位置 -->
+                       
                                 <ul
                                   v-show="menuvisible"
                                   :style="{ left: menuleft + 'px', top: menutop + 'px' }"
@@ -1611,7 +1619,7 @@ import FormulaEditone from '@/views/formula/edit1.vue'
 import {
   getLazytree, getDetail, update, selectByNodeTable,getParamElements,delParamElements,specifiedParamElements, getAlltree,
   saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate, updateBatchNodeTableInfo,
-  importWbsTree, exportTemplate, remove as removeTreeNode,submitFullName,refrehPram
+  importWbsTree, exportTemplate, remove as removeTreeNode,submitFullName,refrehPram,getQueryValueByType
 } from "@/api/manager/wbstree";
 
 import {
@@ -1653,7 +1661,11 @@ export default {
       sort: [],
       id: '',
       filterText: '',
+      isSearch:false,
       treeData: [],
+      searchTreeData:[],
+      searchtreeLoad:false,
+      searchType:'1',//搜索类型
       treeLoad: false,
       menuShow: false,
       defaultProps: {
@@ -1909,6 +1921,37 @@ export default {
         return resolve(arr);
       })
     },
+    //搜索树
+    searchTreeClick(){
+      this.searchtreeLoad=true
+
+      if(this.filterText.length>0){
+        this.isSearch=true
+        getQueryValueByType({
+        queryValue:this.filterText,
+        type:this.searchType,
+        wbsId:this.id,
+        projectId:''
+        
+        }).then((res)=>{
+          let arr = [];
+          if (Array.isArray(res.data.data)) {
+            arr = res.data.data;
+            this.searchTreeData=arr
+          }else{
+            this.searchTreeData=[]
+          }
+        
+        })
+      }else{
+        this.isSearch=false
+      }
+ 
+      this.searchtreeLoad=false
+    },
+    clearSearch(){
+      this.isSearch=false
+    },
 
     getNodeDetail (data, node) {
       let parentName = '';
@@ -2384,20 +2427,20 @@ export default {
       this.nodeDetail.mixRatioTestIds = this.toJoin(newarr)
       
     },
-    filterChange () {
-      if (this.treeData.length > 0) {
-        this.$refs.treeall.filter(this.filterText);
-        return;
-      }
-      this.treeLoad = true;
-      getAlltree(this.userInfo.tenant_id, 1, this.id).then((res) => {
-        this.treeLoad = false;
-        this.treeData = res.data.data;
-        this.$nextTick(() => {
-          this.$refs.treeall.filter(this.filterText);
-        })
-      })
-    },
+    // filterChange () {
+    //   if (this.treeData.length > 0) {
+    //     this.$refs.treeall.filter(this.filterText);
+    //     return;
+    //   }
+    //   this.treeLoad = true;
+    //   getAlltree(this.userInfo.tenant_id, 1, this.id).then((res) => {
+    //     this.treeLoad = false;
+    //     this.treeData = res.data.data;
+    //     this.$nextTick(() => {
+    //       this.$refs.treeall.filter(this.filterText);
+    //     })
+    //   })
+    // },
 
     importTemplate (data) {
       this.importTemplateVisible = true;
@@ -3076,15 +3119,20 @@ export default {
               target={elementId:e.id,paramId:this.curParam.id};
              }
         })
-        specifiedParamElements(target).then(data=>{
-          this.linkCheckVisible = false;
-          getParamElements({nodeId:this.jiedianId,paramId:this.curParam.id,scopeType:1}).then((res) => {
-           if (res.data.data.length) {
-              this.linkEleTableList = res.data.data;
-              } else {
-               this.linkEleTableList = [];
-           }})
-        })
+        if(JSON.stringify(target) !== '{}'){
+          specifiedParamElements(target).then(data=>{
+            this.linkCheckVisible = false;
+            getParamElements({nodeId:this.jiedianId,paramId:this.curParam.id,scopeType:1}).then((res) => {
+            if (res.data.data.length) {
+                this.linkEleTableList = res.data.data;
+                } else {
+                this.linkEleTableList = [];
+            }})
+          })
+        }else{
+          this.$message.warning('请先选择关联元素')
+        }
+    
     },
 
     //筛选元素

+ 9 - 1
src/views/util/test.vue

@@ -2,7 +2,14 @@
   <div>
     1111111111
     <basic-container>
-       <onlyoffice-editor :src="src" :config="editorConfig" @ready="onReady" />
+    测试12
+    <el-date-picker
+      v-model="value1"
+      type="datetime"
+      value-format="yyyy-MM-dd HH:mm:ss"
+      format="yyyy-MM-dd HH:mm:ss"
+      placeholder="选择日期时间">
+    </el-date-picker>
     </basic-container>
   </div>
 </template>
@@ -11,6 +18,7 @@
 export default {
   data () {
     return {
+      value1: '',
       // src: 'http://IP/web-apps/apps/api/documents/api.js',
        src: 'http://47.98.223.222:8090/web-apps/apps/api/documents/api.js',
       editorConfig: {

Някои файлове не бяха показани, защото твърде много файлове са промени