ib-activities.66f26bea.js 6.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ib-activities"],{"41c4":function(t,e,a){},"5f53":function(t,e,a){},"7f54":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"ib_activities"}},[a("div",{staticClass:"crm-title-box"},[a("div",{staticClass:"tit"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Home.page_customer.item6",expression:"'Home.page_customer.item6'"}]})])]),a("div",{staticClass:"main-content"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],staticClass:"tab",attrs:{"element-loading-background":"rgba(43, 48, 67, 0.05)","element-loading-spinner":"el-icon-loading"}},t._l(t.tableData,(function(e,i){return a("div",{key:i,staticClass:"active-box"},[e.hot?a("div",{staticClass:"btn-tag-star"},[a("i",{staticClass:"el-icon-star-on"})]):t._e(),a("div",{staticClass:"img crm-cursor",on:{click:function(a){return t.toSingle(e.id)}}},[a("img",{attrs:{src:t.imgUrl+e.coverImage,alt:""}})]),a("div",{staticClass:"content"},[a("div",{staticClass:"title"},[a("span",{staticClass:"name crm-cursor crm-one-font",on:{click:function(a){return t.toSingle(e.id)}}},[t._v(t._s(e.title))]),a("span",{staticClass:"time"},[t._v(t._s(e.deliveryTime.split(" ")[0]))])]),a("div",{staticClass:"des crm-one-font"},[t._v(t._s(e.subTitle))]),a("div",{staticClass:"bottom"},[t.overdue(e.startTime,e.endTime)?a("span",{staticClass:"btn red crm-cursor",on:{click:function(a){return t.applications(e)}}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Apply",expression:"'Custom.Activity.Apply'"}]})]):a("span",{staticClass:"btn gray crm-cursor"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Apply",expression:"'Custom.Activity.Apply'"}]})]),a("span",{staticClass:"btn check crm-cursor",on:{click:function(a){return t.checkActivity(e)}}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.List",expression:"'Custom.Activity.List'"}]})]),a("span",{staticClass:"btn check crm-cursor",on:{click:function(a){return t.toSingle(e.id)}}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Single",expression:"'Custom.Activity.Single'"}]})])])])])})),0),t.pagerInfo.rowTotal?a("div",{staticClass:"crm_pagination"},[a("el-pagination",{staticClass:"page",attrs:{background:"",layout:"prev, pager, next","page-size":t.pagerInfo.row,total:t.pagerInfo.rowTotal},on:{"current-change":t.handleCurrentChange}})],1):t._e()]),a("drawer",{attrs:{dialogInfoTradingAdd:t.dialogInfoTradingAdd,addType:t.openType,formInfo:t.formInfo,information:t.information},on:{confirmToReload:t.confirmToReload,closeAdd:t.closeAdd}}),t.dialogInfoTradingAdd?a("div",{staticClass:"crm_verified_info_mask",on:{click:t.closeDiaAdd}}):t._e()],1)},n=[],r=(a("4160"),a("c975"),a("ac1f"),a("5319"),a("1276"),a("159b"),a("96cf"),a("1da1")),o=a("ccaf"),s=a("f121"),c=a.n(s),l=a("b4f6"),u=c.a.Code,d=c.a.Host80,p={name:"Activities",components:{Drawer:l["a"]},data:function(){return{flag:!1,pictLoading:!1,openType:"",dialogInfoTradingAdd:!1,imgUrl:d,show:!1,dialogTableVisible:!1,formInfo:{},information:{},hot:"",singleData:{},tableData:[],search:{date:[],startDate:"",endDate:"",type:1},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},methods:{overdue:function(t,e){var a=t.replace(/-/g,"/").split(" ")[0],i=e.replace(/-/g,"/").split(" ")[0],n=2,r=(new Date).getTimezoneOffset(),o=(new Date).getTime(),s=new Date(o+60*r*1e3+60*n*60*1e3).getTime(),c=new Date(a).getTime(),l=new Date(i).getTime();return c<s&&s<l},closeDiaAdd:function(){this.dialogInfoTradingAdd=!1},closeAdd:function(t){this.dialogInfoTradingAdd=t},confirmToReload:function(){this.dialogInfoTradingAdd=!1,this.searchFunc()},checkActivity:function(t){this.information.id=t.id,this.information.title=t.title,this.openType="activity_List",this.dialogInfoTradingAdd=!0},applications:function(t){this.information.id=t.id,this.information.title=t.title;var e=[];t.loginTypes.forEach((function(t){e.push(t.loginType)}));var a=[];t.groupTypes.forEach((function(t){a.push(t.groupType)})),this.information.loginTypes=e,this.information.groupTypes=a,this.information.myType12=2,this.openType="appl_activity",this.dialogInfoTradingAdd=!0},toSingle:function(t){this.$router.push({path:"/activities/content",query:{id:t,type:2}}).catch((function(t){return t}))},handleSearch:function(){this.pagerInfo.current=1,this.searchFunc()},searchFunc:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.flag){e.next=4;break}return e.abrupt("return");case 4:t.flag=!0;case 5:return t.pictLoading=!0,e.next=8,o["a"].ActivityExtensionIist({hot:t.hot,tag:2,lang:-1!=["cn","zhHant"].indexOf(t.Session.Get("lang"))?"cn":"en",page:{current:t.pagerInfo.current,row:t.pagerInfo.row}});case 8:a=e.sent,a.code==u.StatusOK?(t.tableData=a.data,t.pagerInfo.rowTotal=a.page.rowTotal,t.pagerInfo.pageTotal=a.page.pageTotal,t.flag=!1):(t.$pigeon.MessageError(a.msg),t.flag=!1),t.pictLoading=!1;case 11:case"end":return e.stop()}}),e)})))()},getSingle:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.dialogTableVisible=!0,a.next=3,o["a"].ActivitySingle({id:t});case 3:i=a.sent,i.code==u.StatusOK?e.singleData=i.data:e.$pigeon.MessageError(i.msg);case 5:case"end":return a.stop()}}),a)})))()},getApplyList:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].ActivityApplyList({page:{current:t.pagerInfo.current,row:t.pagerInfo.row}});case 2:a=e.sent,a.code==u.StatusOK?(t.pagerInfo.rowTotal=a.page.rowTotal,t.pagerInfo.pageTotal=a.page.pageTotal):t.$pigeon.MessageError(a.msg);case 4:case"end":return e.stop()}}),e)})))()},handleCurrentChange:function(t){this.pagerInfo.current=t,this.searchFunc()}},mounted:function(){this.searchFunc()}},g=p,f=(a("8349"),a("e379"),a("2877")),m=Object(f["a"])(g,i,n,!1,null,"d6313086",null);e["default"]=m.exports},8349:function(t,e,a){"use strict";var i=a("5f53"),n=a.n(i);n.a},e379:function(t,e,a){"use strict";var i=a("41c4"),n=a.n(i);n.a}}]);