Browse Source
			
			
			Merge pull request #446 from flowerField/master
			
				file.calcChain 数据问题等
			
			
				master
			
			
		 
		
			
				
					
						
						文顶顶
					
					5 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
20 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/controllers/sheetmanage.js
				
 
			
				- 
					
					
					 
					src/global/formula.js
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -733,6 +733,12 @@ const sheetmanage = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        _this.nulldata = datagridgrowth([], Store.defaultrowNum, Store.defaultcolumnNum); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let data = _this.buildGridData(file); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //初始化的时候 记录选区
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let select_save = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        file.jfgird_select_save = file.jfgird_select_save || []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        file.jfgird_select_save.forEach(item=>select_save.push({"row":item.row,"column":item.column})); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        file.luckysheet_select_save = select_save; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.sheetParamRestore(file, data); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let r2 = Store.luckysheet_select_save[0].row[1],  | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -4194,6 +4194,20 @@ const luckysheetformula = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        for (let i = 0; i < luckysheetfile.length; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            let file = luckysheetfile[i]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            let calcChain = file.calcChain; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            /* 备注:再次加载表格获取的数据可能是JSON字符串格式(需要进行发序列化处理) */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(calcChain){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                let tempCalcChain = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                calcChain.forEach((item,idx)=>{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if(typeof item === "string"){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        tempCalcChain.push(JSON.parse(item)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        tempCalcChain.push(item); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                calcChain = file.calcChain = tempCalcChain; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            let dynamicArray_compute = file.dynamicArray_compute; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (calcChain == null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                calcChain = []; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |