|  | @@ -86,6 +86,22 @@ let calcProgramManage = {
 | 
	
		
			
				|  |  |              disableSpread(me.detailSpread);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    getStdCalcProgramFiles: function(){
 | 
	
		
			
				|  |  | +        function getStdCPFilesHtml(stdCPLibs) {
 | 
	
		
			
				|  |  | +            let result = '<option value="">请选择计算程序标准库</option>';
 | 
	
		
			
				|  |  | +            if (stdCPLibs.length <= 0) {
 | 
	
		
			
				|  |  | +                return result;
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            for (let lib of stdCPLibs){
 | 
	
		
			
				|  |  | +                result += '<option value='+ lib.id +'>'+ lib.name +'</option>';
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +            return result;
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        let stdCPHtml = getStdCPFilesHtml(projectInfoObj.projectInfo.engineeringInfo.program_lib);
 | 
	
		
			
				|  |  | +        $("#calcProgramFileSelect").html(stdCPHtml);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      onMainEnterCell: function(sender, args) {
 | 
	
		
			
				|  |  |          var me = calcProgramManage;
 | 
	
		
			
				|  |  |          var row = args.sheet.getActiveRowIndex();
 | 
	
	
		
			
				|  | @@ -474,6 +490,23 @@ $(document).ready(function(){
 | 
	
		
			
				|  |  |          sessionStorage.setItem('mainTab', '#tab_calc_program_manage');
 | 
	
		
			
				|  |  |          $(e.relatedTarget.hash).removeClass('active');
 | 
	
		
			
				|  |  |          calcProgramManage.buildSheet();
 | 
	
		
			
				|  |  | +        calcProgramManage.getStdCalcProgramFiles();
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    $("#calcProgramFileSelect").change(function() {
 | 
	
		
			
				|  |  | +        // 取标准库数据过来显示。
 | 
	
		
			
				|  |  | +        let libID = $(this).val();
 | 
	
		
			
				|  |  | +        if (libID == ''){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        CommonAjax.post('/calcProgram/getStdCalcProgram', {"ID":  parseFloat(libID)}, function (data) {
 | 
	
		
			
				|  |  | +            projectObj.project.calcProgram.datas.templates = data.templates;
 | 
	
		
			
				|  |  | +            projectObj.project.calcProgram.compileAllTemps();
 | 
	
		
			
				|  |  | +            calcProgramManage.buildSheet();
 | 
	
		
			
				|  |  | +            // $('#this').val(libID);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  });
 | 
	
		
			
				|  |  |  
 |