|
|
|
@ -81,6 +81,7 @@ module Configs{
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
export var SqlViewController = controller('SqlViewController', ['$scope', '$http', ($scope, $http) =>{
|
|
|
|
|
$scope.title = shareInit($scope.ngDialogData);
|
|
|
|
|
$scope.content = "";
|
|
|
|
|
getSqlContent();
|
|
|
|
|
function getSqlContent(){
|
|
|
|
@ -111,6 +112,14 @@ module Configs{
|
|
|
|
|
fr.onloadend = (e) =>{
|
|
|
|
|
$scope.new_content = e.target["result"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fr.onloadstart = () =>{
|
|
|
|
|
$scope.$apply(() =>{
|
|
|
|
|
$scope.content = "正在读取数据请稍等...";
|
|
|
|
|
});
|
|
|
|
|
$scope.content = "正在读取数据请稍等...";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fr.readAsText(file[0],"UTF-8");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -131,16 +140,6 @@ module Configs{
|
|
|
|
|
type: $scope.ngDialogData.type
|
|
|
|
|
});
|
|
|
|
|
$scope.closeThisDialog();
|
|
|
|
|
|
|
|
|
|
/*$http({
|
|
|
|
|
url: "/java/console/api/filePackage/handleSqlFile",
|
|
|
|
|
method: "POST",
|
|
|
|
|
params: {type: $scope.ngDialogData.type},
|
|
|
|
|
data: JSON.stringify($scope.ngDialogData.item)
|
|
|
|
|
}).scuess((data,header,config,status) => {
|
|
|
|
|
}).error((data,header,config,status) => {
|
|
|
|
|
});*/
|
|
|
|
|
//$scope.closeThisDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -151,7 +150,8 @@ module Configs{
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
export var SqlAddController = controller('SqlAddController', ['$scope', '$http', ($scope, $http) => {
|
|
|
|
|
$scope.content = null;
|
|
|
|
|
$scope.content = "";
|
|
|
|
|
$scope.title = shareInit($scope.ngDialogData);
|
|
|
|
|
$scope.sqlFileUpload = () =>{
|
|
|
|
|
Configs.FileInputPlugin((file) =>{
|
|
|
|
|
$scope.enable = true;
|
|
|
|
@ -162,6 +162,14 @@ module Configs{
|
|
|
|
|
fr.onloadend = (e) =>{
|
|
|
|
|
$scope.content = e.target["result"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fr.onloadstart = () =>{
|
|
|
|
|
$scope.$apply(() =>{
|
|
|
|
|
$scope.content = "正在读取数据请稍等...";
|
|
|
|
|
});
|
|
|
|
|
$scope.content = "正在读取数据请稍等...";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fr.readAsText(file[0],"UTF-8");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -183,16 +191,18 @@ module Configs{
|
|
|
|
|
});
|
|
|
|
|
$scope.closeThisDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.cancel = () => {
|
|
|
|
|
$scope.enable = false;
|
|
|
|
|
$scope.closeThisDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
export var sqlVerificationController = controller('sqlVerificationController', ['$scope', '$http', ($scope, $http) => {
|
|
|
|
|
getSqlContent();
|
|
|
|
|
$scope.title = shareInit($scope.ngDialogData);
|
|
|
|
|
$scope.replace = () => {
|
|
|
|
|
$scope.$emit("replace", {
|
|
|
|
|
url: "/java/console/api/filePackage/handleSqlFile",
|
|
|
|
@ -222,7 +232,7 @@ module Configs{
|
|
|
|
|
|
|
|
|
|
export var sqlMoveController = controller("sqlMoveController", ['$scope', '$http', ($scope, $http) => {
|
|
|
|
|
getSqlContent();
|
|
|
|
|
|
|
|
|
|
$scope.title = shareInit($scope.ngDialogData);
|
|
|
|
|
$scope.move = () => {
|
|
|
|
|
$scope.$emit("replace", {
|
|
|
|
|
url: "/java/console/api/filePackage/handleSqlFile",
|
|
|
|
@ -251,16 +261,16 @@ module Configs{
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
export var sysVerUpdateController = controller('sysVerUpdateController', ['$scope', '$http', ($scope, $http) => {
|
|
|
|
|
var checkboxItmes = [];
|
|
|
|
|
$scope.checkboxItmes = [];
|
|
|
|
|
$scope.click = ($event, name) => {
|
|
|
|
|
if($event.target.checked){
|
|
|
|
|
if(checkboxItmes.indexOf(name) == -1)
|
|
|
|
|
checkboxItmes.push(name)
|
|
|
|
|
if($scope.checkboxItmes.indexOf(name) == -1)
|
|
|
|
|
$scope.checkboxItmes.push(name)
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
for(var i= 0; i < checkboxItmes.length; i++){
|
|
|
|
|
if(checkboxItmes[i] === name){
|
|
|
|
|
checkboxItmes.splice(i,1);
|
|
|
|
|
for(var i= 0; i < $scope.checkboxItmes.length; i++){
|
|
|
|
|
if($scope.checkboxItmes[i] === name){
|
|
|
|
|
$scope.checkboxItmes.splice(i,1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -270,23 +280,11 @@ module Configs{
|
|
|
|
|
getData();
|
|
|
|
|
|
|
|
|
|
$scope.replace = () => {
|
|
|
|
|
console.log(checkboxItmes);
|
|
|
|
|
$scope.requestBody = $scope.data1;
|
|
|
|
|
angular.forEach(checkboxItmes, (item) => {
|
|
|
|
|
angular.forEach($scope.checkboxItmes, (item) => {
|
|
|
|
|
$scope.requestBody[item] = $scope.data2[item];
|
|
|
|
|
});
|
|
|
|
|
$http({
|
|
|
|
|
url: "/java/console/api/checkout/update",
|
|
|
|
|
method:'POST',
|
|
|
|
|
data: JSON.stringify($scope.requestBody)
|
|
|
|
|
}).success(function(data,header,config,status){
|
|
|
|
|
if(header == 200)
|
|
|
|
|
Configs.customAlert("提示", "操作成功!", '',null, 0, "success");
|
|
|
|
|
else
|
|
|
|
|
Configs.customAlert("提示", "操作失败!", '',null, 0, "error");
|
|
|
|
|
}).error(function(data,header,config,status){
|
|
|
|
|
Configs.customAlert("提示", "操作失败:发生请求失败,不能删除!", '',null, 0, "error");
|
|
|
|
|
});
|
|
|
|
|
$scope.$emit("updateRow", $scope.requestBody);
|
|
|
|
|
$scope.closeThisDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -309,4 +307,23 @@ module Configs{
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
function shareInit(ngDialogData) {
|
|
|
|
|
var title = "";
|
|
|
|
|
if(ngDialogData.type != 'undefined'){
|
|
|
|
|
switch (ngDialogData.type) {
|
|
|
|
|
case "userTableStatus" :
|
|
|
|
|
title = "UserTablespace";
|
|
|
|
|
break;
|
|
|
|
|
case "ckPayStatus":
|
|
|
|
|
title = "Chechout_Pay"
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "ckIndicateStatus":
|
|
|
|
|
title = "Chechout_Indicate"
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return title;
|
|
|
|
|
}
|
|
|
|
|
}
|