parent
58ce6e6482
commit
464b415904
@ -0,0 +1,7 @@
|
||||
/// <reference path="../../includes.d.ts" />
|
||||
/// <reference path="systemPlugin.d.ts" />
|
||||
/// <reference path="systemHelpers.d.ts" />
|
||||
/// <reference path="systemServices.d.ts" />
|
||||
declare module System {
|
||||
var SystemSQLManagement: ng.IModule;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,88 @@
|
||||
<div ng-controller="System.SystemSQLManagement">
|
||||
<div hawtio-tabs></div>
|
||||
<div class="container-fluid sj_fluid">
|
||||
<div class="row clear fl">
|
||||
<label>行政区划代码</label>
|
||||
</div>
|
||||
<div class="row clear fl">
|
||||
<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>
|
||||
<div class="row clear fl">
|
||||
<select class="form-control" ng-change="countrySelect(y)" ng-model="y" ng-init="y='all'">
|
||||
<option value="all">全部</option>
|
||||
<option ng-repeat="country in countries">{{country.name}}</option>
|
||||
</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>
|
||||
<option ng-repeat="value in status">{{value.label}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row clear fl">
|
||||
<span class="pull-right"> </span>
|
||||
<button class="btn pull-right sj_btn_grey " ng-click="replaceSql()">
|
||||
<i class="glyphicon glyphicon-save"></i> 文件包导出
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div ng-show="model.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">
|
||||
<colgroup>
|
||||
<col width="2%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="15%" />
|
||||
</colgroup>
|
||||
<tr ng-repeat="row in $data">
|
||||
<td header="'headerCheckbox.html'">
|
||||
<input type="checkbox" ng-model="checkboxes.items[row.id]" />
|
||||
</td>
|
||||
<td title="'状态'">
|
||||
<span ng-show="row.sysStatus == 0">有缺失</span>
|
||||
<span ng-show="row.sysStatus == 1">正常</span>
|
||||
<span ng-show="row.sysStatus == 2">待归档</span>
|
||||
<span ng-show="row.sysStatus == 3">待审核</span>
|
||||
</td>
|
||||
<td title="'行政区划代码'">{{row.areaCode}}</td>
|
||||
<td title="'市'">{{row.cityName}}</td>
|
||||
<td title="'区/县'">{{row.districtName}}</td>
|
||||
<td title="'信息系统名称'">{{row.sysName}}</td>
|
||||
<td title="'数据库类型'">{{row.dataBaseType}}</td>
|
||||
<td title="'oracle用户表空间脚本'">
|
||||
<button ng-show="row.userTableStatus <= 3" class="btn sj_btn" ng-click="viewSql(row, 'userTableStatus')">
|
||||
<span ng-show="row.userTableStatus == 0 ">上传</span>
|
||||
<span ng-show="row.userTableStatus == 1 ">查看</span>
|
||||
<span ng-show="row.userTableStatus == 2 ">归档</span>
|
||||
<span ng-show="row.userTableStatus == 3 ">审核</span>
|
||||
</button>
|
||||
<span ng-show="row.userTableStatus == 4 ">—</span>
|
||||
</td>
|
||||
<td title="'支付信息标准表脚本'">
|
||||
<button class="btn sj_btn" ng-click="viewSql(row, 'ckPayStatus')">
|
||||
<span ng-show="row.ckPayStatus == 0 ">上传</span>
|
||||
<span ng-show="row.ckPayStatus == 1 ">查看</span>
|
||||
<span ng-show="row.ckPayStatus == 2 ">归档</span>
|
||||
<span ng-show="row.ckPayStatus == 3 ">审核</span>
|
||||
</button>
|
||||
</td>
|
||||
<td title="'可执行标准表脚本'">
|
||||
<button class="btn sj_btn" ng-click="viewSql(row, 'ckIndicateStatus')">
|
||||
<span ng-show="row.ckIndicateStatus == 0 ">上传</span>
|
||||
<span ng-show="row.ckIndicateStatus == 1 ">查看</span>
|
||||
<span ng-show="row.ckIndicateStatus == 2 ">归档</span>
|
||||
<span ng-show="row.ckIndicateStatus == 3 ">审核</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,106 @@
|
||||
/// <reference path="../../includes.ts"/>
|
||||
/// <reference path="systemPlugin.ts"/>
|
||||
/// <reference path="systemHelpers.ts"/>
|
||||
/// <reference path="systemServices.ts"/>
|
||||
|
||||
module System{
|
||||
export var SystemSQLManagement = controller('SystemSQLManagement', ['$scope', '$location', '$http', '$element', '$templateCache', 'NgTableParams', 'ngDialog', 'SystemModel', ($scope, $location, $http, $element, $templateCache, NgTableParams, ngDialog, SystemModel) => {
|
||||
shareInit($scope);
|
||||
$scope.cities = classifyCity(SystemModel.regionalismInfo);
|
||||
|
||||
$scope.status = [{id: 0, label: "全部"}, {id: 1, label: "待审"}, {id: 2, label: "缺失"}, {id:3, label:"正常"}];
|
||||
|
||||
$scope.filterResult = $scope.model = SystemModel.sqlInfo;
|
||||
|
||||
$scope.checkboxes = {
|
||||
checked: false,
|
||||
items: {}
|
||||
};
|
||||
|
||||
$scope.tableParams = new NgTableParams({count: 25}, {
|
||||
counts: [25, 50, 100],
|
||||
dataset: $scope.filterResult
|
||||
});
|
||||
|
||||
$scope.citySelect = (x) =>{
|
||||
if(x != 'all'){
|
||||
$scope.countries = classifyCountry(SystemModel.regionalismInfo, x);
|
||||
$scope.filterResult = [];
|
||||
angular.forEach($scope.model, (item) => {
|
||||
if(x == item.cityName)
|
||||
$scope.filterResult.push(item);
|
||||
});
|
||||
$scope.tableParams.settings({
|
||||
dataset: $scope.filterResult
|
||||
});
|
||||
}else{
|
||||
$scope.countries=[];
|
||||
$scope.filterResult = $scope.model;
|
||||
$scope.tableParams.settings({
|
||||
dataset: $scope.filterResult
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.countrySelect = (y) => {
|
||||
if(y != 'all'){
|
||||
var result = [];
|
||||
angular.forEach($scope.filterResult, (item) => {
|
||||
if(item.districtName == y)
|
||||
result.push(item);
|
||||
});
|
||||
$scope.tableParams.settings({
|
||||
dataset: result
|
||||
});
|
||||
}else{
|
||||
$scope.tableParams.settings({
|
||||
dataset: $scope.filterResult
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.statusSelect = (z) => {
|
||||
var result = [];
|
||||
console.log(z);
|
||||
}
|
||||
|
||||
// watch for check all checkbox
|
||||
$scope.$watch(function() {
|
||||
return $scope.checkboxes.checked;
|
||||
}, function(value) {
|
||||
angular.forEach($scope.model, function(item) {
|
||||
$scope.checkboxes.items[item.id] = value;
|
||||
});
|
||||
});
|
||||
|
||||
// watch for data checkboxes
|
||||
$scope.$watch(function() {
|
||||
return $scope.checkboxes.items;
|
||||
}, function(values) {
|
||||
var checked = 0, unchecked = 0,
|
||||
total = $scope.model.length;
|
||||
angular.forEach($scope.model, function(item) {
|
||||
checked += ($scope.checkboxes.items[item.id]) || 0;
|
||||
unchecked += Number((!$scope.checkboxes.items[item.id])) || 0;
|
||||
});
|
||||
if ((unchecked == 0) || (checked == 0)) {
|
||||
$scope.checkboxes.checked = (checked == total);
|
||||
}
|
||||
// grayed checkbox
|
||||
angular.element($element[0].getElementsByClassName("select-all")).prop("indeterminate", (checked != 0 && unchecked != 0));
|
||||
}, true);
|
||||
|
||||
$scope.viewSql = (selected, type) => {
|
||||
ngDialog.open({
|
||||
template: 'sqlView.html',
|
||||
controller:'Configs.SqlViewController',
|
||||
width: 1005,
|
||||
height: 700,
|
||||
scope: $scope,
|
||||
closeByDocument : false,
|
||||
data: {type: type, item: selected },
|
||||
className: 'ngdialog-theme-default'
|
||||
});
|
||||
}
|
||||
}])
|
||||
}
|
Loading…
Reference in new issue