ib-activities.c51a4a83.js 6.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ib-activities"],{"238c":function(t,e,a){},"4e55":function(t,e,a){},"6f0a":function(t,e,a){"use strict";a("238c")},"7f54":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"ib_activities"}},[e("div",{staticClass:"crm-title-box"},[e("div",{staticClass:"tit"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Home.page_customer.item6",expression:"'Home.page_customer.item6'"}]})])]),e("div",{staticClass:"main-content"},[e("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(a,i){return e("div",{key:i,staticClass:"active-box"},[a.hot?e("div",{staticClass:"btn-tag-star"},[e("i",{staticClass:"el-icon-star-on"})]):t._e(),e("div",{staticClass:"img crm-cursor",on:{click:function(e){return t.toSingle(a.id)}}},[e("img",{attrs:{src:t.imgUrl+a.coverImage,alt:""}})]),e("div",{staticClass:"content"},[e("div",{staticClass:"title"},[e("span",{staticClass:"name crm-cursor crm-one-font",on:{click:function(e){return t.toSingle(a.id)}}},[t._v(t._s(a.title))]),e("span",{staticClass:"time"},[t._v(t._s(a.deliveryTime.split(" ")[0]))])]),e("div",{staticClass:"des crm-one-font"},[t._v(t._s(a.subTitle))]),e("div",{staticClass:"bottom"},[t.overdue(a.startTime,a.endTime)?e("span",{staticClass:"btn red crm-cursor",on:{click:function(e){return t.applications(a)}}},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Apply",expression:"'Custom.Activity.Apply'"}]})]):e("span",{staticClass:"btn gray crm-cursor"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Apply",expression:"'Custom.Activity.Apply'"}]})]),e("span",{staticClass:"btn check crm-cursor",on:{click:function(e){return t.checkActivity(a)}}},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.List",expression:"'Custom.Activity.List'"}]})]),e("span",{staticClass:"btn check crm-cursor",on:{click:function(e){return t.toSingle(a.id)}}},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Activity.Single",expression:"'Custom.Activity.Single'"}]})])])])])})),0),t.pagerInfo.rowTotal?e("div",{staticClass:"crm_pagination"},[e("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()]),e("drawer",{attrs:{dialogInfoTradingAdd:t.dialogInfoTradingAdd,addType:t.openType,formInfo:t.formInfo,information:t.information},on:{confirmToReload:t.confirmToReload,closeAdd:t.closeAdd}}),t.dialogInfoTradingAdd?e("div",{staticClass:"crm_verified_info_mask",on:{click:t.closeDiaAdd}}):t._e()],1)},n=[],o=a("c7eb"),r=a("1da1"),s=(a("14d9"),a("e9f5"),a("7d54"),a("d3b7"),a("ac1f"),a("5319"),a("159b"),a("ccaf")),c=a("f121"),l=a.n(c),d=a("b4f6"),p=l.a.Code,u=l.a.Host80,g={name:"Activities",components:{Drawer:d["a"]},data:function(){return{flag:!1,pictLoading:!1,openType:"",dialogInfoTradingAdd:!1,imgUrl:u,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,o=(new Date).getTimezoneOffset(),r=(new Date).getTime(),s=new Date(r+60*o*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"])(Object(o["a"])().mark((function e(){var a;return Object(o["a"])().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,s["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==p.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"])(Object(o["a"])().mark((function a(){var i;return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.dialogTableVisible=!0,a.next=3,s["a"].ActivitySingle({id:t});case 3:i=a.sent,i.code==p.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"])(Object(o["a"])().mark((function e(){var a;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["a"].ActivityApplyList({page:{current:t.pagerInfo.current,row:t.pagerInfo.row}});case 2:a=e.sent,a.code==p.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()}},f=g,m=(a("6f0a"),a("fa3e"),a("2877")),v=Object(m["a"])(f,i,n,!1,null,"64461b27",null);e["default"]=v.exports},fa3e:function(t,e,a){"use strict";a("4e55")}}]);