123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- angular.module('push')
- .controller('technicalBrokerTaskListCtrl', function ($scope, TechnicalBrokerPublishTrainService, UtilService, UserService, $stateParams, $timeout) {
- $scope.act ='train';
- $scope.act = $stateParams.act;
- $scope.keyfilter = {key: ""};//搜索关键词
- // 待参加的培训类别
- $scope.mold = 3;
- var activity = ['train', 'task'];
- $scope.changeAct = function (num) {
- $scope.act = activity[num];
- };
- $scope.signupModel = {
- userid: 0,// 用户id
- tid: 0,// 培训id
- type: 1100// 培训类别
- };
- // 培训列表
- $scope.traininfolist=[
- {
- id: 0,
- title: "",
- content: "",
- trainbegintime: "",
- signupenddate: "",
- areaid: 0,
- areaname: "",
- detailaddress: "",// 详细地址
- isactive: 1,// 培训状态:是否有效,0无效,1有效
- sponsors: "",// 传到后台的主办方/协办方json stype:类别:1.主办方 2.协办方
- sponsorlist: [],// 取得详情里的主办方
- imagelist: [],// app端图片插件进行传递的变量
- logo:"//img4.mukewang.com/szimg/5abe148300014c3305400300.jpg",
- firstpic:"//img4.mukewang.com/szimg/5abe148300014c3305400300.jpg",
- trainstatus:1,
- trainstatusname:"",// 培训状态名称
- trainLeaveDays:5,// 报名剩余天数
- traincount:5,// 培训总数
- signupcount:255,// 已报名总数
- isedit:0,// 是否有编辑权限:0无 1有
- traintype: 0,// 培训种类
- traintypename: "",// 培训种类名称
- creator: 0,
- creatorname: "",
- creatorphoto: ""// 用户logo
- }
- ];
- // 任务列表
- $scope.taskinfolist=[
- {
- userid: 0,
- usercomefrom: "000000000",
- id: 0,
- taskstyle: 0,
- taskstylename: "",
- title: "",
- content: "",
- isactive: 1,// 培训状态:是否有效,0无效,1有效
- begintime: "",
- endtime: "",
- creator: 0,
- creatorname: "",
- creatorphoto: ""// 用户logo
- }
- ];
- // 获取培训列表
- var getTrainInfoList = function () {
- $scope.showLoadingToast();
- TechnicalBrokerPublishTrainService.getTrainInfoList($scope.mold).then(function (response) {
- console.log(response);
- $scope.traincount = response.traincount;
- $scope.traininfolist = response.traininfolist;
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- })
- };
- getTrainInfoList();
- // 获取任务列表
- var getTaskInfoList = function () {
- $scope.showLoadingToast();
- TechnicalBrokerPublishTrainService.getTaskInfoList().then(function (response) {
- console.log(response);
- $scope.taskcount = response.taskcount;
- $scope.taskinfolist = response.taskinfolist;
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- })
- };
- getTaskInfoList();
- // 点击报名
- $scope.traincheckin = function (infoid) {
- $scope.signupModel.userid = UserService.id;
- $scope.signupModel.tid = infoid;
- $scope.signupModel.type = 1100;
- console.log($scope.signupModel);
- TechnicalBrokerPublishTrainService.traincheckin($scope.signupModel).then(function (response) {
- // console.log(response);
- if (response.result > 0) {
- UtilService.showMess("报名成功");
- $timeout(function () {
- // 报名后刷新列表
- getTrainInfoList();
- }, 1500);
- } else {
- UtilService.showMess("网络不给力,请重试");
- }
- $scope.hideLoadingToast();
- }, function () {
- UtilService.showMess("网络不给力,请重试");
- $scope.hideLoadingToast();
- })
- };
- //虚拟搜索框
- $scope.isShowSearchButton = true;
- $scope.showSearchButtonLeft = function () {
- $scope.isShowSearchButton = false;
- $(".showSearchInput").focus();
- };
- //清空搜索内容
- $scope.clearSearch = function () {
- $scope.isShowSearchButton = true;
- $scope.keyfilter.key = "";
- };
- // 编辑培训
- $scope.editTechnicalTask = function (trainid) {
- $scope.go('technicalBrokerEditTrain', {trainid: trainid});
- };
- //进入培训详情页
- $scope.goTrainContent=function (trainid) {
- $scope.go('technicalBrokerTaskListContent', {trainid: trainid});
- };
- //进入任务详情页
- $scope.goTaskContent=function () {
- $scope.go('technicalBrokerTaskDetail');
- };
- //进入发布培训页
- $scope.goPublisherTrain=function () {
- $scope.go('technicalBrokerPublishTrain');
- };
- //进入发布培训页
- $scope.goPublisherTask=function () {
- $scope.go('technicalBrokerPublishTask');
- };
- //进入编辑任务页
- $scope.goEditTask=function (trainid) {
- $scope.go('technicalBrokerEditTask', {trainid: trainid});
- };
- $scope.taskLists=[
- { logo:"//img4.mukewang.com/szimg/5abe148300014c3305400300.jpg",
- title:"任务A",
- type:"认证",
- activitystatus:1,
- activityLeaveDays:5,
- taskStartTime:"2017-05-18",
- taskEndTime:"2017-08-18",
- taskPublisher:"武进科技在线",
- isEnterTask:false,
- context:"这是目前看到的最好的swoole课程,singwa老师的课每出必入,必跟,质量没得说!慕课出的几门实战都给了我不小的启发。人也超nice! 持续支持关注!",
- roleActivitySetupList:[
- { setupid:"3",
- funcname:"报名"
- }
- ],
- styles:[
- { styleType:"走企业"},
- { styleType:"录入需求"},
- { styleType:"录入成果转化"}
- ]
- },
- {logo:"//img.mukewang.com/574669dc0001993606000338-240-135.jpg",
- title:"任务B",
- type:"入门培训",
- activitystatus:2,
- activityLeaveDays:5,
- taskStartTime:"2017-05-18",
- taskEndTime:"2017-08-18",
- taskPublisher:"武进科技在线",
- isEnterTask:true,
- context:"一直想学习Swoole,看到出这门实战课没犹豫的直接买了,讲得很细,从编译,安装,异步,协程以及这中间穿插的各种小坑都给提到了,觉得很不错,更希望singwa老师出更多精品课程!!总之加油吧",
- roleActivitySetupList:[
- { setupid:"3",
- funcname:"报名"
- }
- ],
- styles:[
- { styleType:"走企业"},
- { styleType:"录入需求"},
- { styleType:"录入成果转化"}
- ]
- },
- {logo:"//img.mukewang.com/570761d200014d8b06000338-240-135.jpg",
- title:"任务C",
- type:"实战",
- activitystatus:3,
- activityLeaveDays:5,
- taskStartTime:"2017-05-18",
- taskEndTime:"2017-08-18",
- taskPublisher:"武进科技在线",
- isEnterTask:true,
- context:"丝袜老师我一直很崇拜,向来干货满满注重思想,所以新课程一出我就买了,swoole未来会很火,是PHPer必须掌握的技能,丝袜老师讲的很细致,也教了你如何去看swoole文档,公司下个项目本来要用wokerman,出于对丝袜老师教学质量的信",
- roleActivitySetupList:[
- { setupid:"3",
- funcname:"报名"
- }
- ],
- styles:[
- { styleType:"走企业"},
- { styleType:"录入需求"},
- { styleType:"录入成果转化"}
- ]
- },
- {logo:"//img.mukewang.com/564a92e8000171b006000338-240-135.jpg",
- title:"任务D",
- type:"项目申报",
- activitystatus:4,
- activityLeaveDays:5,
- taskStartTime:"2017-05-18",
- taskEndTime:"2017-08-18",
- hostunit:"武进科技在线",
- otherunit:"普适科技",
- isEnterTask:true,
- context:"用workerman开发过项目,其实很多东西和swoole差不多, swoole在技术选型的时候也看过文档,后来选了workerman自带分布式部署,性能其实也很够了,看到老师出了swoole也来支持一下,看了下前面的都偏基础,我主要看第6和10章,如果能学到自己没接触到或者一直不理解的,哪怕是一个知识点我觉得钱就没白花,希望以后会出偏大中型一点的实战项目,最后感谢老师,感谢自己,投资自己就是投资未来",
- roleActivitySetupList:[
- { setupid:"3",
- funcname:"报名"
- }
- ],
- styles:[
- { styleType:"走企业"},
- { styleType:"录入需求"},
- { styleType:"录入成果转化"}
- ]
- }
- ];
- //查看已报名的人员
- $scope.goReceivePer=function (trainid) {
- $scope.go("technicalBrokerRegisteredPerList", {trainid: trainid});
- };
- //查看接取任务人员列表
- $scope.goReceiveTaskPer=function () {
- $scope.go("technicalBrokerReceiveTaskPerList");
- }
- });
|