|
|
@@ -513,6 +513,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : '/invitation',
|
|
|
templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
controller : 'InvitationCtrl'
|
|
|
+ }).state('baseInfo.invitationforEn', {
|
|
|
+ url : '/invitationforEn',
|
|
|
+ templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
+ controller : 'InvitationByEnCtrl'
|
|
|
}).state('qc', {
|
|
|
url : "/qc",
|
|
|
views : {
|
|
|
@@ -1060,12 +1064,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 邀请记录
|
|
|
+ * 邀请记录(个人)
|
|
|
*/
|
|
|
app.controller('InvitationCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.status = "invitation";
|
|
|
-
|
|
|
+ var getService = function() {
|
|
|
+ return InvitationRecord.records;
|
|
|
+ };
|
|
|
+
|
|
|
$scope.tableParams = new ngTableParams({ // ng-Table参数
|
|
|
page : 1,
|
|
|
count : 10,
|
|
|
@@ -1079,7 +1086,50 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
var pageParams = params.url();
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
$scope.tip = $scope.keyword;
|
|
|
- InvitationRecord.records.call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
+ getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
+ $scope.loading = false;
|
|
|
+ if(page) {
|
|
|
+ params.total(page.totalElement);
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ }
|
|
|
+ }, function(response){
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $scope.onSearch = function(keyword){
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ $scope.tip = keyword;
|
|
|
+ }
|
|
|
+ }]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邀请记录(个人)
|
|
|
+ */
|
|
|
+ app.controller('InvitationByEnCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
+ BaseService.scrollBackToTop();
|
|
|
+ $scope.status = "invitationTeam";
|
|
|
+ var getService = function() {
|
|
|
+ return InvitationRecord.getRecordsByEn;
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.tableParams = new ngTableParams({ // ng-Table参数
|
|
|
+ page : 1,
|
|
|
+ count : 10,
|
|
|
+ sorting: {
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ counts: [],
|
|
|
+ getData : function($defer, params) { // 获取数据的方法
|
|
|
+ $scope.loading = true;
|
|
|
+ var pageParams = params.url();
|
|
|
+ pageParams.keyword = $scope.keyword;
|
|
|
+ $scope.tip = $scope.keyword;
|
|
|
+ getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElement);
|
|
|
@@ -1943,6 +1993,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 未采纳
|
|
|
case 'refused':
|
|
|
fn = 'getRefused';break;
|
|
|
+ // 个人
|
|
|
+ case 'personal':
|
|
|
+ fn = 'getPersonal';break;
|
|
|
+ // 集体
|
|
|
+ case 'teams':
|
|
|
+ fn = 'getTeams';break;
|
|
|
}
|
|
|
return fn;
|
|
|
};
|