|  |  | @ -1,62 +1,36 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | /// <reference path="../../includes.ts"/>
 |  |  |  | /// <reference path="../../includes.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /// <reference path="systemPlugin.ts"/>
 |  |  |  | /// <reference path="systemPlugin.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /// <reference path="systemHelpers.ts"/>
 |  |  |  | /// <reference path="systemHelpers.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | /// <reference path="../../configs/ts/customAlert.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | /// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | /// <reference path="systemHelpers.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | /// <reference path="../../configs/ts/configsUtils.ts"/>
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | module System{ |  |  |  | module System{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 	export var SystemListController = controller('SystemListController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog) => { |  |  |  | 	export var SystemListController = controller('SystemListController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog, SystemModel) => { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		shareInit($scope); |  |  |  | 		shareInit($scope); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     $scope.modelServices = SystemModel; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     //$scope.modelServices.updateExcelInfo();
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     $scope.model = SystemModel.systemInfoList;    | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		// 表头显示的信息
 |  |  |  | 		// 表头显示的信息
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		$scope.columns= [ |  |  |  | 		$scope.columns= [ | 
			
		
	
		
		
			
				
					
					|  |  |  |           { field: 'id', title: '操作', show: true},			 |  |  |  |           { field: 'id', title: '操作', show: true},			 | 
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "object", title: "采集对象", filter: { object: "select" }, filterData: booleanChoose(), show: true }, |  |  |  |       		{ field: "updateExcelInfo", title: "采集对象", filter: { updateExcelInfo: "select" }, filterData: booleanChoose(), show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "city", title: "市", filter: { city: 'text' }, show: true }, |  |  |  |       		{ field: "cityName", title: "市", filter: { cityName: 'text' }, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "county", title: "区/县", filter: { county: 'text' }, show: true }, |  |  |  |       		{ field: "districtName", title: "区/县", filter: { districtName: 'text' }, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "regionalismCode", title: "行政区划代码", filter: {regionalismCode: 'text'}, show: true }, |  |  |  |       		{ field: "areaCode", title: "行政区划代码", filter: {areaCode: 'text'}, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "level", title: "级次", filter: { level: "select" }, filterData: levelType(), show: true }, |  |  |  |       		{ field: "areaLevel", title: "级次", filter: { areaLevel: "select" }, filterData: levelType(), show: true },      		 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "systemCode", title: "系统编码", filter: { systemCode: "text" }, show: true }, |  |  |  |       		{ field: "sysName", title: "信息系统名称", filter: { sysName: "text" }, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "systemName", title: "信息系统名称", filter: { systemName: "text" }, show: true }, |  |  |  |       		{ field: "departmentManager", title: "联系人", filter: { departmentManager: "text" }, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "contactsPerson", title: "联系人", filter: { contactsPerson: "text" }, show: true }, |  |  |  |       		{ field: "managerContacts", title: "联系方式", filter: { managerContacts: "text" }, show: true }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "contactsMethod", title: "联系方式", filter: { contactsMethod: "text" }, show: true }, |  |  |  |       		{ field: "dataBaseType", title: "数据库类型", filter: { dataBaseType: "select" }, filterData: databaseType(), show: true}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "databaseType", title: "数据库类型", filter: { databaseType: "select" }, filterData: databaseType(), show: true}, |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "userSql", title: "oracle用户名表空间", filter: { userSql: "select" }, filterData: booleanChoose(), show: true}, |  |  |  |       		{ field: "userSql", title: "oracle用户名表空间", filter: { userSql: "select" }, filterData: booleanChoose(), show: true}, | 
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "checkSql", title: "支付信息标准表脚本", filter: { checkSql: "select" }, filterData: booleanChoose(), show: true}, |  |  |  |       		{ field: "checkSql", title: "支付信息标准表脚本", filter: { checkSql: "select" }, filterData: booleanChoose(), show: true}, | 
			
		
	
		
		
			
				
					
					|  |  |  |       		{ field: "execSql", title: "可执行标准表脚本", filter: { execSql: "select" }, filterData: booleanChoose(), show: true}, |  |  |  |       		{ field: "execSql", title: "可执行标准表脚本", filter: { execSql: "select" }, filterData: booleanChoose(), show: true}, | 
			
		
	
		
		
			
				
					
					|  |  |  |     	]; |  |  |  |     	]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     	$scope.model = [{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		id: 1, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		object: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		city: '南京市', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		county: '玄武区', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		regionalismCode: '321001', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		level: '市级', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		systemCode: '5', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		systemName: '非税系统', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  contactsPerson: '唐僧', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  contactsMethod: '15575170786', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  databaseType: 'oracle', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  userSql: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  checkSql: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			  execSql: '是' |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     	}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     	{    |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		id: 2, 		 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		object: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		city: '南京市', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		county: '浦口区', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		regionalismCode: '321011', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		level: '市级', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		systemCode: '5', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     		systemName: '预算执行', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			contactsPerson: '唐僧', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			contactsMethod: '15675170786', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			databaseType: 'oracle', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			userSql: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			checkSql: '是', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			execSql: '是'    	 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     	}] |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   	// 点击查看按钮事件处理函数
 |  |  |  |   	// 点击查看按钮事件处理函数
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   	$scope.viewClick = (selected) => { |  |  |  |   	$scope.viewClick = (selected) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   		ngDialog.open({ |  |  |  |   		ngDialog.open({ | 
			
		
	
	
		
		
			
				
					|  |  | @ -77,135 +51,106 @@ module System{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		 |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  |     // 文件上传
 |  |  |  |     // 文件上传
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		$scope.upLoadExcelFile = (files) =>{ |  |  |  | 		$scope.upLoadExcelFile = (files) =>{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         var fileNameList = []; //获取文件名列表
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         angular.forEach(files, (file) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           fileNameList.push(file.name); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         Configs.create_mask();  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         Kubernetes.create_locadEffect("正在上传文件..."); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         var target = document.getElementById('loading'); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         var r = new Resumable({ |  |  |  |         var r = new Resumable({ | 
			
		
	
		
		
			
				
					
					|  |  |  |             target:'/java/console/api/fileOperation/file/upload', |  |  |  |             target:'/java/console/api/fileOperation/file/upload', | 
			
		
	
		
		
			
				
					
					|  |  |  |             chunkSize:1*1024*1024, |  |  |  |             chunkSize:1*1024*1024, | 
			
		
	
		
		
			
				
					
					|  |  |  |             simultaneousUploads:4, |  |  |  |             simultaneousUploads:4, | 
			
		
	
		
		
			
				
					
					|  |  |  |             testChunks: true, |  |  |  |             testChunks: false, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             throttleProgressCallbacks:1, |  |  |  |             throttleProgressCallbacks:1, | 
			
		
	
		
		
			
				
					
					|  |  |  |             method: "octet"           |  |  |  |             method: "octet"           | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             /*headers: {              | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }*/ | 
			
		
	
		
		
			
				
					
					|  |  |  |         }); |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(!r.support){ |  |  |  |         if(!r.support){ | 
			
		
	
		
		
			
				
					
					|  |  |  |             throw "当前浏览器不支持Resumable.js文件上传";           |  |  |  |             throw "当前浏览器不支持Resumable.js文件上传";           | 
			
		
	
		
		
			
				
					
					|  |  |  |         }else{            |  |  |  |         }else{            | 
			
		
	
		
		
			
				
					
					|  |  |  |             console.log(files); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             angular.forEach(files, (file) => { |  |  |  |             angular.forEach(files, (file) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |                r.addFile(file); |  |  |  |                r.addFile(file); | 
			
		
	
		
		
			
				
					
					|  |  |  |             }) |  |  |  |             }) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             r.on('fileAdded', function(file){                |  |  |  |             r.on('fileAdded', function(file){                | 
			
		
	
		
		
			
				
					
					|  |  |  |                 console.log(file); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 r.upload(); |  |  |  |                 r.upload(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             }); |  |  |  |             }); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             r.on('complete', function(){    |  |  |  |             r.on('complete', function(){    | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Hide pause/resume when the upload has completed
 |  |  |  |                 $('#loadmsg').html("所以文件上传完毕,正在读取文件中的数据,此过程时间可能会较长,请稍等...");                | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 console.log("文件上传完毕"); |  |  |  |                 $.ajax({ | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   type: "POST", | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   url: UrlHelpers.join("/java/console/api/fileOperation/importExcel"), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   timeout: 8000 * fileNameList.length, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   dataType: 'json', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   data: JSON.stringify(fileNameList), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   contentType: "application/json; charset=utf-8", | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   complete: (XMLHttpRequest, textStatus) =>{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     $("#load").remove(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     Kubernetes.removeMask(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if(XMLHttpRequest.status == 200){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       Configs.customAlert("提示", "操作成功: 本次excel文件录入成功!", '',null, 0, "success"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     }else{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       Configs.customAlert("提示", "操作失败: 本次excel文件录入失败", '',null, 0, "error"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   success : (data) =>{  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     $scope.model = SystemModel.systemInfoList = data.data;                     | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     $scope.tableParams.settings({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       dataset: $scope.model | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     });     | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   error: (MLHttpRequest, textStatus, errorThrown) =>{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     //Configs.customAlert("提示", "操作失败: 本次excel文件录入失败, " + textStatus, '',null, 0, "error");
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 });             | 
			
		
	
		
		
			
				
					
					|  |  |  |             }); |  |  |  |             }); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             r.on('fileProgress', function(file){                |  |  |  |             r.on('fileProgress', function(file){                | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Handle progress for both the file and the overall upload
 |  |  |  |                 $('#loadmsg').html("上传文件:" + file.fileName + " " + Math.floor(r.progress()*100) + '%'); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 //$('.resumable-file-'+file.uniqueIdentifier+' .resumable-file-progress').html(Math.floor(file.progress()*100) + '%');
 |  |  |  |                 //Kubernetes.create_locadEffect("上传文件:" + file.name + " " + Math.floor(r.progress()*100) + '%'); //创建数据加载效果层
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 //$('.progress-bar').css({width:Math.floor(r.progress()*100) + '%'});
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 console.log(Math.floor(r.progress()*100) + '%'); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             }); |  |  |  |             }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //解决不同重复选择相同文件
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             var element = document.getElementById("file-uploads"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             element.outerHTML =  element.outerHTML; | 
			
		
	
		
		
			
				
					
					|  |  |  |         }        |  |  |  |         }        | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     //excel下载
 |  |  |  |     //excel下载
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     $scope.downLoadExcelFile = () =>{         |  |  |  |     $scope.downLoadExcelFile = () =>{         | 
			
		
	
		
		
			
				
					
					|  |  |  |         $http.get('/java/console/api/fileOperation/file/download', { responseType: 'arraybuffer' }) |  |  |  |         Configs.downloadFile($scope, $http, '/java/console/api/fileOperation/file/download'); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           .success( function(data, status, headers) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               var octetStreamMime = 'application/octet-stream'; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               var success = false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // Get the headers
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               headers = headers(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // Get the filename from the x-filename header or default to "服务列表"
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               var filename = headers['x-filename'] || '服务列表.xls'; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // Determine the content type from the header or default to "application/octet-stream"
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               var contentType = headers['content-type'] || octetStreamMime; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               try{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Try using msSaveBlob if supported
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 console.log("Trying saveBlob method ..."); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 var blob = new Blob([data], { type: contentType }); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   if(navigator.msSaveBlob) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       navigator.msSaveBlob(blob, filename); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       // Try using other saveBlob implementations, if available
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       var saveBlob = navigator["webkitSaveBlob"] || navigator["mozSaveBlob"] || navigator["saveBlob"]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       if(saveBlob === undefined) throw "Not supported"; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       saveBlob(blob, filename); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     console.log("saveBlob succeeded"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     success = true; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               } catch(ex){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   console.log("saveBlob method failed with the following exception:"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   console.log(ex); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               if(!success){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Get the blob url creator
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 var urlCreator = window.URL || window["webkitURL"] || window["mozURL"] || window["msURL"]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               if(urlCreator){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // Try to use a download link
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 var link = document.createElement('a'); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if('download' in link){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   // Try to simulate a click
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   try{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // Prepare a blob URL
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     console.log("Trying download link method with simulated click ..."); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     var blob = new Blob([data], { type: contentType }); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     var url = urlCreator.createObjectURL(blob); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     link.setAttribute('href', url); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     link.setAttribute("download", filename); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // Simulate clicking the download link
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     var event = document.createEvent('MouseEvents'); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     link.dispatchEvent(event); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     console.log("Download link method with simulated click succeeded"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     success = true; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   }catch(ex) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       console.log("Download link method with simulated click failed with the following exception:"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       console.log(ex); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if(!success){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   // Fallback to window.location method
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   try{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // Prepare a blob URL
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // Use application/octet-stream when using window.location to force download
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     console.log("Trying download link method with window.location ..."); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     var blob = new Blob([data], { type: octetStreamMime }); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     var url = urlCreator.createObjectURL(blob); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     window.location = url; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     console.log("Download link method with window.location succeeded"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     success = true; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   }catch(ex){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       console.log("Download link method with window.location failed with the following exception:"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                       console.log(ex); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |               } |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |     $scope.downloadFilePackage = () =>{ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if(!success){ |  |  |  |         Configs.create_mask();  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               // Fallback to window.open method
 |  |  |  |         Kubernetes.create_locadEffect("正在下载文件,请稍等..."); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               console.log("No methods worked for saving the arraybuffer, using last resort window.open"); |  |  |  |         var target = document.getElementById('loading'); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               window.open('_blank', ''); |  |  |  |         var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |         Configs.downloadFile($scope, $http, '/java/console/api/filePackage/download', () =>{ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           }).error(function(data, status) { |  |  |  |           $("#load").remove(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             console.log("Request failed with status: " + status); |  |  |  |           Kubernetes.removeMask(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             // Optionally write the error out to scope
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             $scope.errorDetails = "Request failed with status: " + status; |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         }); |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     $scope.sqlUpload = (files) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       console.log(files); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		//boolean选择条件:是/否
 |  |  |  | 		//boolean选择条件:是/否
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		function booleanChoose(){ |  |  |  | 		function booleanChoose(){ | 
			
		
	
		
		
			
				
					
					|  |  |  | 			return [{id: '是', title: '是'}, {id: '否', title: '否'}]; |  |  |  | 			return [{id: '是', title: '是'}, {id: '否', title: '否'}]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		// 数据库类型选择条件:oracle/sqlServer
 |  |  |  | 		// 数据库类型选择条件:oracle/sqlServer
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		function databaseType(){ |  |  |  | 		function databaseType(){ | 
			
		
	
		
		
			
				
					
					|  |  |  | 			return [{id: 'oracle', title: 'Oracle'}, {id: 'sqlServer', title: 'sqlServer'}]; |  |  |  | 			return [{id: 'oracle', title: 'ORACLE'}, {id: 'sqlServer', title: 'sqlServer'}]; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		//level选择条件
 |  |  |  | 		//level选择条件
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |