---添加一键归档、审核功能。

This commit is contained in:
wu ming 2016-11-09 16:01:17 +08:00
parent 6c60260ef3
commit 7cb12f0d76
5 changed files with 208 additions and 22 deletions

File diff suppressed because one or more lines are too long

View File

@ -169,7 +169,7 @@
<li><span class="fb">默认脚本:</span>{{ngDialogData.item[ngDialogData.type + 'StandardModified']}}</li>
<li class="sj_link">{{ngDialogData.item[ngDialogData.type + 'PathStandard']}}</li>
</ul>
<div class="fl sj_width440">
<div class="fl sj_width440">
<button class="sj_btn_green fl" ng-click="upLoadSqlFile()">上传</button>
</div>
</div>
@ -194,7 +194,7 @@
<script type="text/ng-template" id="sqlAdd.html">
<div class="sj_new_box02">
<h2 class="sj_popup_h2 mb10">{{title}}_{{ngDialogData.item.areaCode}}_{{ngDialogData.item.sysCode}}.sql</h2>
<div class="clear mb10">
<div class="clear mb10">
<button class="sj_btn_green fl" ng-click="sqlFileUpload()">上传</button>
</div>
<div class="sj_box_w440 mb10">
@ -249,7 +249,7 @@
<li><span class="fb">默认脚本:</span>{{ngDialogData.item[ngDialogData.type + 'LastModified']}}</li>
<li class="sj_link">{{ngDialogData.item[ngDialogData.type + 'PathLast']}}</li>
</ul>
</div>
</div>
<div class="sj_box_w440 mb10">
<p ng-bind="content"></p>
</div>
@ -284,7 +284,7 @@
<td class="sj_popup_lefttxt">信息系统版本</td>
<td class="sj_popup_midtxt">{{data1.sysVersion}}</td>
<td class="sj_popup_midtxt">{{data2.sysVersion}}</td>
<td class="sj_popup_righttxt" >
<td class="sj_popup_righttxt">
<input type="checkbox" id='sysVersion' ng-show="null != data2.sysVersion && data2.sysVersion != ''" ng-click="click($event, 'sysVersion')">
</td>
</tr>
@ -298,11 +298,11 @@
</tr>
<tr>
<td class="sj_popup_lefttxt">功能描述</td>
<td class="sj_popup_midtxt">{{data1.functionDetails}}</td>
<td class="sj_popup_midtxt">{{data1.functionDetails}}</td>
<td class="sj_popup_midtxt">{{data2.functionDetails}}
</td>
<td class="sj_popup_righttxt">
<input type="checkbox" ng-show="null != data2.functionDetails && data2.functionDetails != ''" ng-click="click($event, 'functionDetails')">
<input type="checkbox" ng-show="null != data2.functionDetails && data2.functionDetails != ''" ng-click="click($event, 'functionDetails')">
</td>
</tr>
<tr>
@ -365,6 +365,26 @@
</div>
</div>
</script>
<script type="text/ng-template" id="statusHelp.html">
<table border="1" cellspacing="0" cellpadding="2">
<tr>
<td>第一行第一栏</td>
<td >第一行的第二</td>
<td>第一行第三栏</td>
</tr>
<tr>
<td>第二行及第三行 的 第一栏</td>
<td>第二行第二栏</td>
<td>第二行第三栏</td>
</tr>
<tr>
<td>第三行第一栏</td>
<td>第三行第二栏</td>
<td>第三行第三栏</td>
</tr>
</table>
</script>
<div ng-controller="Kubernetes.TopLevel">
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>

View File

@ -8,8 +8,8 @@
<select class="form-control" ng-change="citySelect(x)" ng-model="x" ng-init="x='all'">
<option value="all">全部</option>
<option ng-repeat="city in cities">{{city}}</option>
</select>
</div>
</select>
</div>
<div class="row clear fl">
<select class="form-control" ng-change="countrySelect(y)" ng-model="y" ng-init="y='all'">
<option value="all">全部</option>
@ -17,16 +17,31 @@
</select>
</div>
<div class="row clear fl">
<select class="form-control" ng-change="statusSelect(z)" ng-model="z" ng-init="z='all'">
<option value="all">全部</option>
<select class="form-control" ng-change="statusSelect(z)" ng-model="z" ng-init="z='all'">
<option value="all">全部</option>
<option ng-repeat="value in status">{{value.label}}</option>
</select>
</div>
<div class="row clear fl">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="quickCheck()">
<i class="glyphicon glyphicon-save"></i> 一键审核
</button>
</div>
<div class="row clear fl">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="quitFile()">
<i class="glyphicon glyphicon-save"></i> 一键归档
</button>
</div>
<div class="row clear fl">
<!--<button class="btn btn-danger pull-right sj_btn_grey " ng-click="help()">-->
<i style="cursor:pointer" class="glyphicon glyphicon-question-sign " ng-click="help()" title="查看状态详情"></i>
<!--</button> -->
</div>
<div class="col-md-12">
<div ng-show="model.length <= 0" class="alert alert-warning sj_alert-warning">
<div ng-show="tableParams.dataset.length<=0" class="alert alert-warning sj_alert-warning">
<span class="help-block">
当前没有可以查看的数据,请点击Excel导入按钮导入Excel数据</span></div>
<table ng-show="model.length > 0" ng-table="tableParams" class="table table-condensed table-bordered table-striped">
当前没有查到符合过滤条件的数据,请重新选择过滤条件</span></div>
<table ng-table="tableParams" class="table table-condensed table-bordered table-striped">
<colgroup>
<col width="2%" />
<col width="10%" />
@ -72,7 +87,7 @@
<span ng-show="row.ckIndicateStatus == 4 "></span>
</td>
</tr>
</table>
</table>
</div>
</div>
</div>

View File

@ -26,7 +26,7 @@
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="deleteRows()">
<i class="glyphicon glyphicon-save"></i> 删除
</button>
</div>
</div>
<div class="col-md-12">
<table ng-show="tableData.length > 0" ng-table="tableParams" class="table table-condensed table-bordered table-striped">
<colgroup>
@ -51,11 +51,11 @@
<td title="'版本号'">{{row.dataVersion}}</td>
<td title="'联系人'">{{row.departmentManager}}</td>
<td title="'联系方式'">{{row.managerContacts}}</td>
<td title="'数据库类型'">{{row.dataBaseType}}</td>
<td title="'数据库类型'">{{row.dataBaseType}}</td>
</tr>
</table>
<div ng-hide="tableData.length > 0" class="col-sm-12 alert alert-warning sj_alert-warning">
<span class="help-block" >
<span class="help-block">
当前没有选择需要校验的数据,请选择需要校验的数据!
</span>
</div>

View File

@ -89,6 +89,24 @@ module System{
}
}
$scope.quickCheck = () => {
updateSqlStatus("/java/console/api/filePackage/totalVerifySqlFile");
}
$scope.quitFile = () => {
updateSqlStatus("/java/console/api/filePackage/totalOnholeSqlFile");
}
$scope.help = () => {
ngDialog.open({
template: 'statusHelp.html',
width: 900,
height: 600,
closeByDocument: false,
className: 'ngdialog-theme-default'
});
}
// watch for check all checkbox
$scope.$watch(function() {
return $scope.checkboxes.checked;
@ -101,7 +119,15 @@ module System{
// watch for data checkboxes
$scope.$watch(function() {
return $scope.checkboxes.items;
}, function(values) {
}, function(values) {
$scope.checkable = false;
for(var index in values){
if(values[index] == true){
$scope.checkable = true;
break;
}
}
var checked = 0, unchecked = 0,
total = $scope.model.length;
angular.forEach($scope.model, function(item) {
@ -231,5 +257,60 @@ module System{
dataset: $scope.filterResult
});
}
function updateSqlStatus(url: string) {
var items = [];
if($scope.model && $scope.model.length > 0){
angular.forEach($scope.model, (item) => {
if($scope.checkboxes.items[item.id])
items.push(item);
});
}
if(items.length <= 0)
return;
$http({
url: url,
method: 'POST',
data: JSON.stringify(items)
}).success(function(data,header,config,status){
var result = data.data, filter;
if($scope.z != 'all'){
result = [];
angular.forEach(data.data, (item) =>{
if($scope.status[item.sysStatus].label == $scope.z)
result.push(item);
});
}
filter = result;
if($scope.x != 'all'){
filter = [];
var tmp = [];
angular.forEach(result, (item) => {
if($scope.x == item.cityName)
tmp.push(item);
});
filter = tmp;
if($scope.y != 'all'){
filter = [];
angular.forEach(tmp, (item) => {
if($scope.y == item.districtName)
filter.push(item);
});
}
}
$scope.tableParams.settings({
dataset: filter
});
//响应成功
}).error(function(data,header,config,status){
//处理响应失败
});
}
}])
}