---添加一键归档、审核功能。
This commit is contained in:
parent
6c60260ef3
commit
7cb12f0d76
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
@ -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>
|
||||
|
|
|
@ -22,11 +22,26 @@
|
|||
<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%" />
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</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>
|
||||
|
|
|
@ -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;
|
||||
|
@ -102,6 +120,14 @@ module System{
|
|||
$scope.$watch(function() {
|
||||
return $scope.checkboxes.items;
|
||||
}, 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){
|
||||
//处理响应失败
|
||||
});
|
||||
|
||||
}
|
||||
}])
|
||||
}
|
Loading…
Reference in New Issue