|
|
@@ -23,6 +23,15 @@ define(['app/app'], function (app) {
|
|
|
keyword: ''
|
|
|
};
|
|
|
|
|
|
+ if ($scope.isAdmin) {
|
|
|
+ User.isDevOrProd(null, function (data) {
|
|
|
+ // $scope.isProd = data.data;
|
|
|
+ $scope.urlPrex = data.data == 'success' ? 'https://sso.ubtob.com' : 'http://192.168.253.6:32323';
|
|
|
+ applyToEnterpriseTableParams();
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '获取运行环境失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
//table设置
|
|
|
var applyToEnterpriseTableParams = function () {
|
|
|
$scope.applyToEnterpriseTableParams = new ngTableParams({
|
|
|
@@ -38,6 +47,7 @@ define(['app/app'], function (app) {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ console.log('12', param)
|
|
|
//param.page = param.page;
|
|
|
param.size = param.count;
|
|
|
param.speaceUU = $scope.userInfo.enterprise.uu;
|
|
|
@@ -57,12 +67,13 @@ define(['app/app'], function (app) {
|
|
|
status: param.status,
|
|
|
keyword: param.keyword
|
|
|
}
|
|
|
- }).success(function (page) {
|
|
|
- params.total(page.content.totalElements);
|
|
|
- $scope.page = page.content;
|
|
|
- $scope.totalPages = page.content.totalPages;
|
|
|
- $scope.content = page.content.content;
|
|
|
- $scope.totalElements = page.content.totalElements;
|
|
|
+ }).success(function (data) {
|
|
|
+ params.total(data.content.totalElements);
|
|
|
+ $defer.resolve(data.content.content);
|
|
|
+ $scope.page = data.content
|
|
|
+ $scope.totalPages = data.content.totalPages;
|
|
|
+ $scope.content = data.content.content;
|
|
|
+ $scope.totalElements = data.content.totalElements;
|
|
|
}).error(function (response) {
|
|
|
toaster.pop('error', '获取未处理审批数据失败');
|
|
|
});
|
|
|
@@ -82,16 +93,6 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
- if ($scope.isAdmin) {
|
|
|
- User.isDevOrProd(null, function (data) {
|
|
|
- // $scope.isProd = data.data;
|
|
|
- $scope.urlPrex = data.data == 'success' ? 'https://sso.ubtob.com' : 'http://192.168.253.6:32323';
|
|
|
- applyToEnterpriseTableParams();
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', '获取运行环境失败');
|
|
|
- });
|
|
|
- }
|
|
|
// 申请
|
|
|
$scope.auditApply = function (status, id, UU) {
|
|
|
var param = {
|