Răsfoiți Sursa

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

huangtf 2 ani în urmă
părinte
comite
ac88a9135e

Fișier diff suprimat deoarece este prea mare
+ 5 - 0
public/app/hybrid/html/js/vue.min.js


+ 180 - 0
public/app/hybrid/html/uploadFile.html

@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html lang="zh-cn">
+
+	<head>
+		<meta charset="UTF-8">
+		<title class="title">[文件管理器]</title>
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<style type="text/css">
+			.content {background: transparent;}
+			.btn {position: relative;top: 0;left: 0;bottom: 0;right: 0;}
+			.btn .file {position: fixed;z-index: 93;left: 0;right: 0;top: 0;bottom: 0;width: 100%;opacity: 0;}
+		</style>
+	</head>
+
+	<body>
+		
+		<div id="content" class="content">
+			<div class="btn">
+				<input @change="onChange" :accept="accept" ref="file" class="file" type="file" />
+			</div>
+		</div>
+		
+		<script type="text/javascript" src="js/vue.min.js"></script>
+		<script type="text/javascript">
+			let _this;
+			var vm = new Vue({
+				el: '#content',
+				data: {
+					accept: '',
+				},
+				mounted() {
+					console.log('加载webview');
+					_this = this;
+					this.files = new Map();
+					document.addEventListener('plusready', (e)=>{
+					let {debug,instantly,prohibited} = plus.webview.currentWebview();
+					this.debug = debug;
+					this.instantly = instantly;
+					this.prohibited = prohibited;
+					this.accept = prohibited.accept;
+					location.href = 'callback?retype=updateOption';
+					}, false);
+				},
+				methods: {
+					toast(msg) {
+						plus.nativeUI.toast(msg);
+					},
+					clear(name) {
+						if (!name) {
+							this.files.clear();
+							return;
+						}
+						this.files.delete(name);
+					},
+					setData(option='{}') {
+						this.debug&&console.log('更新参数:'+option);
+						try{
+							_this.option = JSON.parse(option);
+						}catch(e){
+							console.error('参数设置错误')
+						}
+					},
+					async upload(name=''){
+						if (name && this.files.has(name)) {
+							await this.createUpload(this.files.get(name));
+						}
+						else {
+							for (let item of this.files.values()) {
+								if (item.type === 'waiting' || item.type === 'fail') {
+									await this.createUpload(item);
+								}
+							}
+						}
+					},
+					onChange(e) {
+						let fileDom = this.$refs.file;
+						let file = fileDom.files[0];
+						let name = file.name;
+						fileDom.value = '';
+						this.debug&&console.log('文件名称',name,'大小',file.size);
+						
+						if (file) {
+							// 限制文件格式
+							let suffix = name.substring(name.lastIndexOf(".")+1).toLowerCase();
+							let formats = this.prohibited.formats.toLowerCase();
+							if (formats&&!formats.includes(suffix)) {
+								this.toast(`不支持上传${suffix.toUpperCase()}格式文件`);
+								return;
+							}
+							console.log('this.size',this.prohibited.size);
+							// 限制文件大小
+							if (file.size > 1024 * 1024 * Math.abs(this.prohibited.size)) {
+								this.toast(`附件大小请勿超过${this.prohibited.size}M`)
+								return;
+							}
+							let path = URL.createObjectURL(file);
+							this.files.set(file.name,{file,path,name: file.name,size: file.size,progress: 0,type: 'waiting'});
+							this.callChange();
+							this.instantly&&this.upload();
+						}
+						
+					},
+					/**
+					 * @returns {Map} 已选择的文件Map集
+					 */
+					callChange() {
+						location.href = 'callback?retype=change&files=' + escape(JSON.stringify([...this.files]));
+					},
+					/**
+					 * @returns {object} 正在处理的当前对象
+					 */
+					changeFilesItem(item,end='') {
+						this.files.set(item.name,item);
+						location.href = 'callback?retype=progress&end='+ end +'&item=' + escape(JSON.stringify(item));
+					},
+					createUpload(item) {
+						this.debug&&console.log('准备上传,option=:'+JSON.stringify(this.option));
+						item.type = 'loading';
+						delete item.responseText;
+						return new Promise((resolve,reject)=>{
+							let {url,name,method='POST',header={},formData={}} = this.option;
+							let form = new FormData();
+							for (let keys in formData) {
+								form.append(keys, formData[keys])
+							}
+							form.append(name, item.file);
+							let xmlRequest = new XMLHttpRequest();
+							xmlRequest.open(method, url, true);
+							for (let keys in header) {
+								xmlRequest.setRequestHeader(keys, header[keys])
+							}
+							xmlRequest.upload.addEventListener(
+								'progress',
+								event => {
+									if (event.lengthComputable) {
+										let progress = Math.ceil((event.loaded * 100) / event.total)
+										if (progress <= 100) {
+											item.progress = progress;
+											this.changeFilesItem(item);
+										}
+									}
+								},
+								false
+							);
+							
+							xmlRequest.ontimeout = () => {
+								console.error('请求超时')
+								item.type = 'fail';
+								this.changeFilesItem(item,true);
+								return resolve(false);
+							}
+							
+							xmlRequest.onreadystatechange = ev => {
+								if (xmlRequest.readyState == 4) {
+									if (xmlRequest.status == 200) {
+										this.debug && console.log('上传完成:' + xmlRequest.responseText)
+										item['responseText'] = xmlRequest.responseText;
+										item.type = 'success';
+										this.changeFilesItem(item,true);
+										return resolve(true);
+									} else if (xmlRequest.status == 0) {
+										console.error('status = 0 :请检查请求头Content-Type与服务端是否匹配,服务端已正确开启跨域,并且nginx未拦截阻止请求')
+									}
+									console.error('--ERROR--:status = ' + xmlRequest.status) 
+									item.type = 'fail';
+									this.changeFilesItem(item,true);
+									return resolve(false);
+								}
+							}
+							xmlRequest.send(form)
+						});
+						
+					}
+				}
+			});
+			
+		</script>
+	</body>
+
+</html>

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

@@ -133,7 +133,8 @@ export const syncNodeTable = (primaryKeyId) => {
 //同步项目基础信息到合同段接口sync-node-info
 export const syncNodeinfo = (pKeyId) => {
   return request({
-    url: '/api/blade-manager/projectInfo/sync-node-info',
+    // url: '/api/blade-manager/projectInfo/sync-node-info',
+    url: '/api/blade-manager/wbsPrivate/sync-node-info',
     method: 'post',
     params: {
       pKeyId

+ 50 - 48
src/views/exctab/ElementIdentification/index333.vue

@@ -127,14 +127,14 @@
                           </div>
                        </el-tab-pane>
                       <el-tab-pane label="关联已有元素表" name="关联已有元素表">
-                        
+
                             <div class=" flexItemsC " style="justify-content: space-between;">
-                                <el-select 
-                                v-model="excelopmodel" 
-                                placeholder="请选择元素表" 
-                                filterable  size="mini" 
-                                remote   
-                                reserve-keyword  
+                                <el-select
+                                v-model="excelopmodel"
+                                placeholder="请选择元素表"
+                                filterable  size="mini"
+                                remote
+                                reserve-keyword
                                 :remote-method="remoteMethod"
                                  :loading="excelopmodelloading"
                                 >
@@ -154,7 +154,7 @@
                                 >新增元素
                               </el-button >
                             </div>
-                            
+
                       </el-tab-pane>
                       <el-tab-pane label="修改元素信息" name="修改元素信息">
                           <div class=" flexItemsC " style="justify-content: right;">
@@ -174,7 +174,7 @@
                                 >确认修改
                           </el-button >
                           </div>
-                        
+
                       </el-tab-pane>
                       <el-tab-pane label="编辑HTML表单" name="编辑HTML表单">
                         <el-tabs v-model="htmlactiveName" @tab-click="htmlhandleClick">
@@ -238,7 +238,7 @@
                </el-tabs>
 
                 <div class="region" >
-                 
+
                   <el-table
                     class="martop20"
                     :data="tableData"
@@ -738,7 +738,7 @@
       </el-dialog>
       <!-- 添加到元素库 -->
       <el-dialog
-        
+
         title="保存元素表"
         class="excelBox"
         :visible.sync="eleDialog"
@@ -780,8 +780,8 @@
           </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="eleDialog = false">取 消</el-button>
-          <el-button type="primary" @click="submitEleDialog" 
-            v-preventClick v-loading="elloading" 
+          <el-button type="primary" @click="submitEleDialog"
+            v-preventClick v-loading="elloading"
             >确 定</el-button>
         </span>
       </el-dialog>
@@ -795,7 +795,7 @@
             :closable="false"
             >
           </el-alert>
-        <el-table :data="gridData" :border="true" :header-cell-style="{ 
+        <el-table :data="gridData" :border="true" :header-cell-style="{
           background:'#e4e7ed',color:'#000000'}">
           <el-table-column property="name" label="项目名称" ></el-table-column>
           <el-table-column
@@ -985,7 +985,7 @@ export default {
           name: '王小虎',
           address: '上海市普陀区金沙江路 1518 弄'
         }],
-  
+
     };
   },
   components: {
@@ -1009,7 +1009,7 @@ export default {
     //   },
     //   deep: true
     // },
- 
+
   },
   methods: {
     //数组去重
@@ -1063,10 +1063,10 @@ export default {
           this.$refs.treeall.filter(this.filterText);
         }
     } ,
-  
-   
+
+
     clearInput() {
-      
+
       (this.selectedId = ""),
         (this.GLExcelFromtag1 = false),
         (this.GLExcelFromtag = true);
@@ -1075,11 +1075,11 @@ export default {
               }
             if(this.$refs.treeall1){
                 this.nodeIds1 = this.$refs.treeall1.getCheckedKeys();
-            }   
+            }
             this.selectNodeIds=this.uniqueArr(this.nodeIds,this.nodeIds1 )
            console.log(this.selectNodeIds,'this.selectNodeIds111111');
             // this.$refs.tree.setCheckedKeys(this.selectNodeIds)
-             
+
              this.$nextTick(()=>{
                this.$refs.tree.setCheckedKeys(this.selectNodeIds)
              })
@@ -1094,7 +1094,7 @@ export default {
             if(this.$refs.treeall1){
                 this.nodeIds1 = this.$refs.treeall1.getCheckedKeys();
             }
-            
+
           this.selectNodeIds=this.uniqueArr(this.nodeIds,this.nodeIds1 )
           this.$refs.treeall1.setCheckedKeys(this.selectNodeIds)
           console.log(this.selectNodeIds,'this.selectNodeIds');
@@ -1273,7 +1273,7 @@ export default {
       //获取excel模板
       const { data: res } = await getExcelHtmlCol({ id });
       console.log(res);
-       
+
       if (res.code == 200) {
         let _that = this
            localStorage.setItem('excelHtml', res.data)
@@ -1283,7 +1283,7 @@ export default {
               formData: {},
             };
           },
-       
+
           template: res.data,
           methods: {
             getInformation (name, tr, td) {//鼠标右键事件
@@ -1298,12 +1298,13 @@ export default {
             getRegularExpression(){},
             formRemoteMethod(){},
             checkboxGroupChange(){},
-            formRemoteChange(){}
+            formRemoteChange(){},
+            dateKeydown(){},
         },
-        
-       
-          
-          
+
+
+
+
         });
         var component = new MyComponent().$mount();
         let na = document.getElementById("parent");
@@ -1339,7 +1340,8 @@ export default {
           getRegularExpression(){},
           formRemoteMethod(){},
           checkboxGroupChange(){},
-          formRemoteChange(){}
+          formRemoteChange(){},
+          dateKeydown(){},
         }
       })
       var component = new MyComponent().$mount()
@@ -1427,8 +1429,8 @@ export default {
               message: "请填写和选择新增的表名,表类型,表所属方",
             });
           }
-        
-       
+
+
         // this.allTreeData=[]//清空搜索树数据
 
 
@@ -1617,10 +1619,10 @@ export default {
             if(this.$refs.treeall1){
                this.nodeIds1 = this.$refs.treeall1.getCheckedKeys();
             }
-            
+
             this.selectNodeIds=this.uniqueArr(this.nodeIds,this.nodeIds1 )
             console.log(this.selectNodeIds,'去重的数组');
-           
+
             if (this.selectNodeIds.length < 1) {
               this.$message({
                 type: "warning",
@@ -1666,7 +1668,7 @@ export default {
        this.elloading=false
       if (res.code == 200) {
       // this.refreshNodeBy()//刷新树形控件数据
-        
+
         this.$message({
           type: "success",
           message: "设置成功",
@@ -1674,7 +1676,7 @@ export default {
         this.AssociatedPublicTap = false;
         this.AssociatedPublicClose();
          this.eleDialog=false;
-       
+
       }
     },
     //#endregion
@@ -1713,8 +1715,8 @@ export default {
                 })
               }
             }
-             
-           
+
+
     },
     //#region 接口
     async tabLazytree(modeId, parentId) {
@@ -1971,10 +1973,10 @@ export default {
     parentClick(e) {
       console.log('父节点检测',e);
       let target = e.target;
-    
 
-   
-      
+
+
+
       let bgs = document.querySelectorAll("#parent .oldlace-bg");
       //console.log(bgs)
       for (let i = 0; i < bgs.length; i++) {
@@ -2001,7 +2003,7 @@ export default {
               break;
             }
           }
-          
+
           //this.$refs.tablescroll.$el.scrollTop = 120+this.titleIndex*65;
           //console.log(this.$refs.tablescroll.$el.scrollTop)
           this.$nextTick(() => {
@@ -2083,9 +2085,9 @@ export default {
       }
     },
      editableTabhandleClick(tab, event){
-      
+
         if(tab.name==='编辑HTML表单'){
-        this.getElementInfoByTabId() 
+        this.getElementInfoByTabId()
       }else if(tab.name==='关联已有元素表'){
         this.tabTypeLazyTreeAll()
       }
@@ -2096,16 +2098,16 @@ export default {
       console.log('同步到项目');
       this.syncprojectVisible=true
     }
-  
+
   },
   created() {
     this.getOwnerTypelist();
     this.excelType();
-    
-   
+
+
   },
   mounted(){
-  
+
   }
 };
 </script>

+ 7 - 5
src/views/exctab/excelmodel/excelmodel.vue

@@ -181,7 +181,7 @@
           >
             <template v-if="from.fileUrl">
               <div class="excelname">
-                <div>{{from.extension}}</div>
+                <div>{{from.name}}</div>
                 <i
                   class="el-icon-success marleft10"
                   style="color: rgb(0, 168, 112);"
@@ -233,8 +233,8 @@
             </template>
 
             <div style="margin-left:50px;" class="flex">
-              <div class="excelname mg-r-10" v-if="from.import">
-                <div>{{from.import.name}}</div>
+              <div class="excelname mg-r-10" v-if="from.extension">
+                <div>{{from.extension}}</div>
                 <i
                   class="el-icon-success marleft10"
                   style="color: rgb(0, 168, 112);"
@@ -252,7 +252,7 @@
                 <el-button
                   type="primary"
                   size="mini"
-                >{{from.import?'重新上传导入模板':'上传导入模板'}}</el-button>
+                >{{from.extension?'重新上传导入模板':'上传导入模板'}}</el-button>
               </el-upload>
             </div>
           </div>
@@ -614,7 +614,7 @@ export default {
           this.exceloption.user= { id:this.userInfo.id,name:this.userInfo.user_name}
          // this.exceloption.editUrl = "http://172.31.222.127:8090/blade-manager/exceltab/callbackSave";
           this.exceloption.editUrl = "http://47.110.251.215:8090/blade-manager/exceltab/callbackSave";
-          this.exceloption.key = this.from.id;
+          this.exceloption.key =this.from.id+"_"+ Math.random() + "";
       },
         //刷新左边树形数据
       refreshTree(){
@@ -722,6 +722,7 @@ export default {
       if (res.code === 200) {
         this.from.id = res.data.id
         this.from.extension = res.data.extension  //文件名称
+        this.from.name=res.data.name
         this.from.fileUrl = res.data.fileUrl      //文件路径
         let routeUrl = res.data.fileUrl
         let pSrc = routeUrl + '?r=' + new Date()
@@ -1192,6 +1193,7 @@ export default {
 
       uploadcoverfileExcel(formData).then(() => {
         this.from.import=file.raw;
+        this.from.extension=file.raw.name
         this.$message({
           message: '上传文件成功',
           type: 'success'

+ 9 - 3
src/views/formula/component/funComponent/ifelse.vue

@@ -41,9 +41,9 @@
 
     <div class="flex jc-al-c mg-t-20" v-if="result == 1">
       <span class="textblod mg-r-10">真值</span>
-      <vue-tags-input v-model="tag4" :tags="tags4" @focus="curFocusIndex = 4" @blur="inputBlur(4)" placeholder="输入/参数" @before-adding-tag="beforeAddingTag"/>
+      <vue-tags-input v-model="tag4" :tags="tags4" @focus="curFocusIndex = 4" @blur="inputBlur(4)" placeholder="输入/参数" @before-adding-tag="beforeAddingTag" @keyup.native="btKeyUp"/>
       <span class="textblod mg-r-10 mg-l-20">假值</span>
-      <vue-tags-input v-model="tag5" :tags="tags5" @focus="curFocusIndex = 5" @blur="inputBlur(5)" placeholder="输入/参数" @before-adding-tag="beforeAddingTag"/>
+      <vue-tags-input v-model="tag5" :tags="tags5" @focus="curFocusIndex = 5" @blur="inputBlur(5)" placeholder="输入/参数" @before-adding-tag="beforeAddingTag" @keyup.native="btKeyUp"/>
     </div>
     <div class="mg-t-20" v-if="result == 2">
       <div class="flex">
@@ -203,7 +203,13 @@ export default {
     beforeAddingTag(){
 
     },
-
+    btKeyUp(e) {
+     //把中文标点符号转换成英文的
+     e.target.value = e.target.value.replace(/“/g,'"');
+     e.target.value = e.target.value.replace(/”/g,'"');
+     e.target.value = e.target.value.replace(/’/g,"'");
+     e.target.value = e.target.value.replace(/‘/g,"'");
+    },
     inputHook(){
       console.log(111)
     },

+ 136 - 75
src/views/manager/projectinfo/detail.vue

@@ -204,7 +204,7 @@
               <el-select
                 v-model="wbsId"
                 @change='wbsChange'
-                :disabled="selected"
+                :disabled="iswbsselected"
                 placeholder="请选择WBS"
                 style="width:500px;"
               >
@@ -588,6 +588,7 @@ export default {
       treeList: [],
       logTreeList: [],
       wbsId: '',
+      iswbsselected:false,
       logWbsId: '',
       selected: false,
       leftTreeData: [],
@@ -601,6 +602,13 @@ export default {
       isFirst:false,
       rightTreeData:[],//存储右边的试验树数据
       rightTreeData1:[],//存储右边的质检树数据
+    
+      rightObj:[
+        
+      ],
+      rightObj1:[
+       
+      ],
       nowref:{}
      
     }
@@ -672,10 +680,6 @@ export default {
       }
     },
     beforeLeave (activeName, oldActiveName) {
-      console.log("---------------- beforeLeave ----------------------")
-
-      console.log(activeName, "---------------- beforeLeave-activeName")
-      console.log(oldActiveName, "---------------- beforeLeave-oldActiveName")
       return new Promise((resolve, reject) => {
         if (oldActiveName == '1' && !this.projectForm.id) {
           this.$message({
@@ -1032,6 +1036,7 @@ export default {
     },
     wbsChange (value, flag) {
       console.log(value, 'WBS节点更换测试 value')
+      this.iswbsselected=false
       if(this.templateType==1){
         this.selectData.referenceWbsTemplateId=value
 
@@ -1150,14 +1155,54 @@ export default {
         })
       })
     },
+//格式化wbsid
+  formatWbsId(orid){
+       let refId = orid;
+      let WbsId=''
+      if ((this.templateType == 1 && this.projectForm.referenceWbsTemplateType === 'private')
+          || (this.templateType == 2 && this.projectForm.referenceWbsTemplateTypeTrial === 'private')
+           && refId != null && refId.toString().length > 0) {
+             
+        console.log(1111111111111);
+          console.log(refId,'refId');
+        // 私有库右边树形数据是通过 pkeyId 查询的
+        let ids = refId.toString().split(",");
+      console.log(ids,'ids');
+        if (ids.length > 1) {
+          refId = ids[0]
+          console.log(refId,'refId');
+            console.log(this.treeList,'treeList');
+          let list = this.treeList[1].options;
+          refId = list.filter(e => e.projectId == ids[1])[0].pkeyId;
+           WbsId=refId
+        }
+      }else{
+          console.log(3333333);
+        WbsId=refId
+      }
+
+    return WbsId
+   
 
+  },
     treeChang () {
-      console.log(this.$refs.treetotree.rightTreeData,'this.$refs.treetotree');
-      console.log(this.templateType,'this.templateType');
+     let recordid= this.formatWbsId(this.wbsId)
+     console.log(recordid,'recordid');
       if (this.templateType===2) {
-        this.rightTreeData=this.$refs.treetotree.rightTreeData
+        this.rightTreeData=this.$refs.treetotree.rightTreeData;
+        // this.rightObj.push({
+        //   wbsid:this.wbsId,objdata: this.rightTreeData
+        // })
+        this.rightObj.wbsId=recordid
+        this.rightObj.objdata=this.rightTreeData
       }else{
           this.rightTreeData1=this.$refs.treetotree.rightTreeData
+          //  this.rightObj1.push({
+          //   wbsid:this.wbsId,objdata: this.rightTreeData
+          // })
+          this.rightObj1.wbsId=recordid
+          this.rightObj1.objdata=this.rightTreeData1
+        
       }
     
       this.typeChang[2] = true;
@@ -1191,6 +1236,10 @@ export default {
         this.treeList = arr;
 
         this.wbsId = this.templateType == 1 ? this.selectData.referenceWbsTemplateId : this.selectData.referenceWbsTemplateIdTrial
+        console.log(this.wbsId===-1);
+        if(this.wbsId===-1){
+          this.wbsId=''
+        }
         this.wbsChange(this.wbsId, true)
 
         // if(this.treeList[0].options.length > 0){
@@ -1306,6 +1355,10 @@ export default {
           }
 
           this.$refs.treetotree.setRightTree(projectTree.data.data);
+          console.log(projectTree.data.data,'projectTree.data.data');
+          if (projectTree.data.data.length>0) {
+            this.iswbsselected=true
+          }
           this.rightloading = false;
         }else{
           this.wbsId = '';
@@ -1382,75 +1435,83 @@ export default {
 
       let refId =  this.templateType === 1 ? this.selectData.referenceWbsTemplateId : this.selectData.referenceWbsTemplateIdTrial;
       console.log(refId,'refId');
-      let WbsId=''
-      if (this.projectForm.referenceWbsTemplateType === 'private' && refId != null && refId.toString().length > 0) {
-        // 私有库右边树形数据是通过 pkeyId 查询的
-        let ids = refId.toString().split(",");
-        if (ids.length > 1) {
-          refId = ids[0]
-          let list = this.treeList[1].options;
-          refId = list.filter(e => e.projectId == ids[1])[0].pkeyId;
-          console.log(refId,'refId');
-         
-        }
-      }
-      //引用被删会出现 wbsType -1
-      if (refId && refId > 0 && Number(this.projectForm.wbsType) > 0) {
-        let priv = {};
-        if (this.projectForm.referenceWbsTemplateType == 'private') {
-          //私有
-          let list = this.treeList[1].options;
-          for (let i = 0; i < list.length; i++) {
-            if (list[i].pkeyId == refId) {
-              refId = list[i].wbsId + ',' + list[i].projectId;
-              priv.wbsId = list[i].wbsId;
-              priv.projectId = list[i].projectId;
-              priv.value= list[i].value
-              priv.pkeyId= list[i].pkeyId
-           
-              break;
-            }
-          }
-        } else {
-          //公有
-          WbsId = refId;
-        }
-
-
-      if(this.nowref.value===refId){
-        WbsId=this.nowref.id
+      if(!refId){
+        console.log('不存在refId');
+         this.$refs.treetotree.setRightTree([]);
       }else{
-        if (this.projectForm.referenceWbsTemplateType == 'private' && refId != null && refId.toString().length > 0) {
-            WbsId = priv.pkeyId||this.selectData.referenceWbsTemplateIdTrial 
-        }
-        else {//公有
-          WbsId=this.templateType === 1 ?this.selectData.referenceWbsTemplateId: this.selectData.referenceWbsTemplateIdTrial 
-        }
-     }
-     
-  
-       console.log(WbsId,'WbsId'); 
-   
-    // findProjectTree(this.projectForm.id,  this.templateType === 1 ? WbsId : this.selectData.referenceWbsTemplateIdTrial).then((res) => {
-     findProjectTree(this.projectForm.id, WbsId).then((res) => {
-      if (this.rightTreeData.length>0&&this.templateType===2) {
-         this.$refs.treetotree.setRightTree(this.rightTreeData);
-      }else if(this.rightTreeData1.length>0&&this.templateType===1){
-          this.$refs.treetotree.setRightTree(this.rightTreeData1);
-      }
-      else{
-        if (Array.isArray(res.data.data)) {
-          this.$refs.treetotree.setRightTree(res.data.data);
-        } else {
-          this.$refs.treetotree.setRightTree([]);
-        }
-      }
-        
-       
-      })
-    
-       
+              let WbsId=''
+              if (this.projectForm.referenceWbsTemplateType === 'private' && refId != null && refId.toString().length > 0) {
+                // 私有库右边树形数据是通过 pkeyId 查询的
+                let ids = refId.toString().split(",");
+                if (ids.length > 1) {
+                  refId = ids[0]
+                  let list = this.treeList[1].options;
+                  refId = list.filter(e => e.projectId == ids[1])[0].pkeyId;
+                  console.log(refId,'refId');
+                
+                }
+              }
+              //引用被删会出现 wbsType -1
+              if (refId && refId > 0) {
+                let priv = {};
+                if (this.projectForm.referenceWbsTemplateType == 'private') {
+                  //私有
+                  let list = this.treeList[1].options;
+                  for (let i = 0; i < list.length; i++) {
+                    if (list[i].pkeyId == refId) {
+                      refId = list[i].wbsId + ',' + list[i].projectId;
+                      priv.wbsId = list[i].wbsId;
+                      priv.projectId = list[i].projectId;
+                      priv.value= list[i].value
+                      priv.pkeyId= list[i].pkeyId
+                  
+                      break;
+                    }
+                  }
+                } else {
+                  //公有
+                  WbsId = refId;
+                }
+
+
+              if(this.nowref.value===refId){
+                WbsId=this.nowref.id
+              }else{
+                if (this.projectForm.referenceWbsTemplateType == 'private' && refId != null && refId.toString().length > 0) {
+                    WbsId = priv.pkeyId||this.selectData.referenceWbsTemplateIdTrial 
+                }
+                else {//公有
+                  WbsId=this.templateType === 1 ?this.selectData.referenceWbsTemplateId: this.selectData.referenceWbsTemplateIdTrial 
+                }
+            }
+            
+          
+              console.log(WbsId,'WbsId'); 
+            // findProjectTree(this.projectForm.id,  this.templateType === 1 ? WbsId : this.selectData.referenceWbsTemplateIdTrial).then((res) => {
+            findProjectTree(this.projectForm.id, WbsId).then((res) => {
+              if (this.rightTreeData.length>0&&this.templateType===2&&this.rightObj.wbsId==WbsId) {
+                this.$refs.treetotree.setRightTree(this.rightTreeData);
+              }else if(this.rightTreeData1.length>0&&this.templateType===1&&this.rightObj1.wbsId==WbsId){
+                  this.$refs.treetotree.setRightTree(this.rightTreeData1);
+              }
+              else{
+                if (Array.isArray(res.data.data)) {
+                  if(res.data.data.length>0){
+                    this.iswbsselected=true
+                  }
+                  this.$refs.treetotree.setRightTree(res.data.data);
+                } else {
+                  this.$refs.treetotree.setRightTree([]);
+                }
+              }
+                
+              
+              })
+            
+              
+              }
       }
+
       this.rightloading = false;
     },
 

+ 3 - 1
src/views/manager/projectinfo/editElement/editElement.vue

@@ -224,7 +224,7 @@
 
       <!-- 公式 -->
       <el-dialog title="元素公式" :visible.sync="formulaCompVisible" fullscreen append-to-body class="full-dialog">
-        <FormulaEdit :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid" :projectid="pid" @hideDialog="formulaCompVisible = false" v-if="formulaCompVisible"  
+        <FormulaEdit :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid" :projectid="pid" @hideDialog="formulaCompVisible = false" v-if="formulaCompVisible"
         :globaltype="globaltype" :fromcurNode="editElementQuery"></FormulaEdit>
       </el-dialog>
       <el-dialog title="" :visible.sync="formulaCompVisible1" fullscreen append-to-body class="full-dialog">
@@ -523,6 +523,7 @@ export default {
             _that.getInformation2(a, b, c)
           },
           getRegularExpression(){},
+          dateKeydown(){},
           formUploadSuccess(){},
           formUploadExceed(){},
           formUploadLoading(){},
@@ -558,6 +559,7 @@ export default {
             _that.getInformation2(a, b, c)
           },
           getRegularExpression(){},
+          dateKeydown(){},
           formUploadSuccess(){},
           formUploadExceed(){},
           formUploadLoading(){},

+ 5 - 3
src/views/manager/projectinfo/treeTemplate/dynamicExcel.vue

@@ -128,7 +128,8 @@ export default {
           formRemoteMethod(){},
           getRegularExpression(){},
           checkboxGroupChange(){},
-          formRemoteChange(){}
+          formRemoteChange(){},
+          dateKeydown(){},
         }
       })
       var component = new MyComponent().$mount()
@@ -158,7 +159,8 @@ export default {
           getRegularExpression(){},
           formRemoteMethod(){},
           checkboxGroupChange(){},
-          formRemoteChange(){}
+          formRemoteChange(){},
+          dateKeydown(){},
         }
       })
       var component = new MyComponent().$mount()
@@ -210,7 +212,7 @@ export default {
           //橙色背景
           target.classList.add("oldlace-bg");
         }
-      }   
+      }
     },
 
     getParentTD(ele){

+ 35 - 17
src/views/wel/index.vue

@@ -23,7 +23,7 @@
         <div class="triangle-bottomleft" :class="{'b-b-b-w':activeIndex == 2}"></div>
       </div>
       <el-scrollbar class="flex1">
-        <div class="pd-10" v-show="activeIndex == 1" style="min-height:200px">
+        <div class="pd-10" v-show="activeIndex == 1" style="min-height:250px">
           <div v-if="collapseData1.length == 0" class="flex flex-center">
             <div>
               <img src="/img/welIndex/empty.png" alt="">
@@ -59,11 +59,11 @@
               </el-dropdown>
             </div>
           </div>
-          <div v-if="collapseData1.length == 1" class="text-align-c" style="color:#CCD0DE;">
+          <div v-if="collapseData1.length == 1" class="text-align-c" style="color:#CCD0DE;line-height:200px">
             没有更多数据了~
           </div>
         </div>
-        <div class="pd-10" v-show="activeIndex == 2" style="height:200px">
+        <div class="pd-10" v-show="activeIndex == 2" style="height:250px">
           <div v-if="collapseData2.length == 0" class="flex flex-center">
             <div>
               <img src="/img/welIndex/empty.png" alt="">
@@ -449,6 +449,7 @@ export default {
       await this.queryProjectPfx();
       const line = new Area('container', {
         data: this.LineData,
+        
         xField: 'project',
         yField: 'value',
         seriesField: 'category',
@@ -460,15 +461,35 @@ export default {
             symbol:'circle'
           }
         },
+
         autoFit:true,
-        scrollbar: {
-          type: 'vertical'
-        },
+     
+ 
         xAxis:{
-          label:{
-            autoRotate:true,
+        
+           label: {
+            offset: 55, // 设置坐标轴文本 label 距离坐标轴线的距离
+
+            textStyle: {
+              textAlign: 'bottom', // 文本对齐方向,可取值为: start middle end
+              fill: '#404040', // 文本的颜色
+              fontSize: '12', // 文本大小
+              fontWeight: 'bold', // 文本粗细
+              rotate: 20,
+              textBaseline: 'bottom' // 文本基准线,可取 top middle bottom,默认为middle
+              
+              
+            }, // 文本样式,支持回调
+            autoRotate: true, // 是否需要自动旋转,默认为 true
             autoHide:false,
-          }
+          //  autoHide: { type: 'equidistance', cfg: { minGap: 1} },
+            autoFit:false,
+            rotate: 1,
+            autoEllipsis: true,
+           
+          },
+        
+
         }
       });
       line.render();
@@ -481,10 +502,6 @@ export default {
         xField: 'project',
         yField: 'value',
         seriesField: 'category',
-        /** 设置颜色 */
-        //color: ['#1ca9e6', '#f88c24'],
-        /** 设置间距 */
-        // marginRatio: 0.1,
         label: {
           // 可手动配置 label 数据标签位置
           position: 'middle', // 'top', 'middle', 'bottom'
@@ -497,6 +514,7 @@ export default {
             // 数据标签文颜色自动调整
             { type: 'adjust-color' },
           ],
+      
         },
         legend: {
           position: 'top-left',
@@ -510,11 +528,8 @@ export default {
           type: 'bottom'
         },
          xAxis:{
-          // label:{
-          //   autoRotate:true,
-          //   autoHide:false,
-          // }
            label: {
+             interval:2,
             offset: 30, // 设置坐标轴文本 label 距离坐标轴线的距离
             textStyle: {
               textAlign: 'center', // 文本对齐方向,可取值为: start middle end
@@ -523,9 +538,12 @@ export default {
               fontWeight: 'bold', // 文本粗细
               rotate: 30,
               textBaseline: 'top' // 文本基准线,可取 top middle bottom,默认为middle
+              
             }, // 文本样式,支持回调
             autoRotate: true, // 是否需要自动旋转,默认为 true
+            autoHide:false,
             rotate: 0.3,
+            autoEllipsis: true
           }
 
         }

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff