angular.module('push') .factory('resourceLibraryTempData', function () { var resourcelibrarylist = []; var categoryindex = 0; var categorylist = [];//行业列表 var achievementlist = [];//1:成果库 var requirementlist = [];//2:需求库 var enterpriselist = [];//6:企业库 var personnellist = [];//8:人才库 var privatelist = [];//私人库 var checked = { SortType: 0, classificationType: 1001, starType: 0, MaturityType: 0, RightType: 0, ModelType: 0, BudgetType: 0, ScaleType: 0, EnterpriseType: 0, DegreeType: 0, sexType: 0, TitleType: 0, UniversityType: 0 }; return { //初始化资源库列表 initContent: function (libtype, channelList) { var tempcontentlist = []; angular.forEach(channelList, function () { tempcontentlist.push({isload: false, currentPage: 1, reslist: []}); }); // console.log(tempcontentlist); achievementlist = angular.copy(tempcontentlist); requirementlist = angular.copy(tempcontentlist); enterpriselist = angular.copy(tempcontentlist); personnellist = angular.copy(tempcontentlist); }, getResourceLibraryList: function () { return resourcelibrarylist; }, setResourceLibraryList: function (templist) { resourcelibrarylist = templist; }, getCategoryIndex: function () { return categoryindex; }, setCategoryIndex: function (index) { categoryindex = index; }, getCategoryList: function () { return categorylist; }, setCategoryList: function (templist1) { categorylist = templist1; }, getAchievementList: function () { return achievementlist; }, setAchievementList: function (templist2) { achievementlist = templist2; }, getRequirementList: function () { return requirementlist; }, setRequirementList: function (templist3) { requirementlist = templist3; }, getEenterpriseList: function () { return enterpriselist; }, setEenterpriseList: function (templist4) { enterpriselist = templist4; }, getPersonnelList: function () { return personnellist; }, setPersonnelList: function (templist5) { personnellist = templist5; }, getPrivateList: function () { return privatelist; }, setPrivateList: function (templist6) { privatelist = templist6; }, getChecked: function () { return checked; }, setChecked: function (tempobj) { checked = tempobj; }, resetChecked: function () { checked = { SortType: 0, classificationType: 1001, starType: 0, MaturityType: 0, RightType: 0, ModelType: 0, BudgetType: 0, ScaleType: 0, EnterpriseType: 0, DegreeType: 0, sexType: 0, TitleType: 0, UniversityType: 0 }; }, test:function () { // console.log(requirementlist); // console.log(achievementlist); // console.log(enterpriselist); // console.log(personnellist); } } });