angular.module('push') .controller('technicalBrokerSelfReceiveTaskCtrl', function ($scope, TechnicalBrokerPublishTrainService, UserService, UtilService) { $scope.type = 2;// 我接收的任务类别 $scope.personModel = { userid: 0,// 用户id tid: 0// 任务id }; if($scope.app){ $scope.setStatusBar(1); } $scope.act ='task'; $scope.keyfilter = {key: ""};//搜索关键词 var activity = ['task', 'mytask']; $scope.changeAct = function (num) { $scope.act = activity[num]; }; // 获取我接收的任务列表 var getTaskInfoList = function (type) { $scope.showLoadingToast(); TechnicalBrokerPublishTrainService.getTaskInfoList(type).then(function (response) { // console.log(response); $scope.taskcount = response.taskcount; $scope.taskinfolist = response.taskinfolist; // console.log($scope.taskinfolist); $scope.hideLoadingToast(); }, function () { $scope.hideLoadingToast(); }) }; getTaskInfoList(2); // 获取我发布的任务列表 var getMyTaskInfoList = function (type) { $scope.showLoadingToast(); TechnicalBrokerPublishTrainService.getTaskInfoList(type).then(function (response) { // console.log(response); $scope.mytaskcount = response.taskcount; $scope.mytaskinfolist = response.taskinfolist; // console.log($scope.mytaskinfolist); $scope.hideLoadingToast(); }, function () { $scope.hideLoadingToast(); }) }; getMyTaskInfoList(1); //任务详情页 $scope.goTaskContent = function (taskid) { $scope.go("technicalBrokerTaskDetail", {taskid: taskid}); }; //虚拟搜索框 $scope.isShowSearchButton = true; $scope.keyfilter = {key: ""};//搜索关键词 $scope.showSearchButtonLeft = function () { $scope.isShowSearchButton = false; $(".showSearchInput").focus(); }; //清空搜索内容 $scope.clearSearch = function () { $scope.isShowSearchButton = true; $scope.keyfilter.key = ""; }; //进入编辑任务页 $scope.goEditTask=function () { $scope.go('technicalBrokerEditTask'); }; //进入发布任务页 $scope.goPublisherTask=function () { $scope.go('technicalBrokerPublishTask'); }; //去接取任务 $scope.goReceiveTask=function () { $scope.go('technicalBrokerNotReceiveTask'); }; //去完成任务 $scope.toDoTask=function (taskid, companyid) { $scope.go('technicalBrokerAddCompanyInfo', {taskid: taskid, companyid: companyid}); } });