simulation.42dfa521.js 8.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["simulation"],{"0e4f":function(e,t,a){"use strict";a("6447")},3693:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c");var n=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"customer_Simulation","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[t("div",{staticClass:"crm_search"},[t("el-form",{ref:"form",attrs:{"label-position":"",model:e.search,"label-width":""}},[t("el-row",[t("el-col",{attrs:{span:24,md:24,lg:24}},[t("el-form-item",[t("el-date-picker",{staticClass:"crm_date_pick crm-border-radius-no",attrs:{type:"daterange",align:"right","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"-",size:"small","start-placeholder":e.$t("Placeholder.Start"),"end-placeholder":e.$t("Placeholder.End")},model:{value:e.search.date,callback:function(t){e.$set(e.search,"date",t)},expression:"search.date"}}),t("el-button",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1),t("el-form-item"),t("el-form-item")],1)],1)],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Name")},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.firstName?t("span",[e._v(e._s(a.row.firstName+" "))]):e._e(),a.row.middle?t("span",[e._v(e._s(a.row.middle+" "))]):e._e(),a.row.lastName?t("span",[e._v(e._s(a.row.lastName))]):e._e(),a.row.firstName||a.row.lastName||a.row.middle?e._e():t("span",[e._v(e._s("--"))])]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Email")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.email||"--")+" ")]}}])}),1!=this.user.departmentId?t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Phone")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.phone||"--")+" ")]}}],null,!1,562609121)}):e._e(),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Nationality")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("en"==e.Session.Get("lang")?t.row.countryEnName:t.row.countryName)+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.RegisteredIP")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.addIp||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.RegistrationTime")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.addTime||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"center",label:e.$i18n.t("Label.Action")},scopedSlots:e._u([{key:"default",fn:function(a){var n;return[t("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[t("span",{staticClass:"el-dropdown-link crm-cursor"},[t("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[null!==(n=e.display["R-Notice-Send"])&&void 0!==n&&n.show?t("el-dropdown-item",{attrs:{command:{type:"notice",row:a.row}}},[t("i",{staticClass:"el-icon-s-promotion"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-Notice",expression:"'R-Notice'"}]})]):e._e()],1)],1)]}}])})],1),e.pagerInfo.rowTotal?t("div",{staticClass:"crm_pagination"},[t("div",{staticClass:"crm_page_total"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),t("span",[e._v(e._s(e.pagerInfo.rowTotal))]),t("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),t("el-pagination",{staticClass:"page",attrs:{background:"",layout:"sizes, prev, pager, next","page-sizes":[10,20,50,100],"page-size":e.pagerInfo.row,total:e.pagerInfo.rowTotal},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1):e._e()],1)},r=[],s=a("5530"),o=a("c7eb"),i=a("1da1"),c=(a("14d9"),a("e9f5"),a("7d54"),a("b64b"),a("d3b7"),a("159b"),a("5217")),l=a("f121"),u=a.n(l),p=u.a.Code,d={name:"Simulation",data:function(){return{pictLoading:!1,mock_tableData:[],search:{date:[],startDate:"",endDate:""},multipleSelection:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{user:function(){return JSON.parse(this.Session.Get("user",!0))},display:function(){return this.Session.GetDisplay()}},methods:{handleCommand:function(e){"delete"==e.type?this.toDelete(e.id):"notice"==e.type&&this.$router.push({path:"/web/notice",query:{cid:e.row.cId}}).catch((function(e){return e}))},toDelete:function(){var e=Object(i["a"])(Object(o["a"])().mark((function e(t){var a;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(i["a"])(Object(o["a"])().mark((function e(){var n,r;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],n.push(t),e.next=4,c["a"].customDemoListDelete({ids:n});case 4:r=e.sent,r.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.DeleteSuccess")),a.searchFunc()):a.$pigeon.MessageError(r.msg);case 6:case"end":return e.stop()}}),e)}))),(function(){}));case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),toDeleteBatch:function(){var e=Object(i["a"])(Object(o["a"])().mark((function e(){var t;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.multipleSelection.length){e.next=2;break}return e.abrupt("return");case 2:t=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(i["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,c["a"].customDemoListDelete({ids:t.multipleSelection});case 2:a=e.sent,a.code==p.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.DeleteSuccess")),t.searchFunc()):t.$pigeon.MessageError(a.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},searchFunc:function(){var e=this;return Object(i["a"])(Object(o["a"])().mark((function t(){var a,n;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,null!==(a=e.display["R-Simulation-Search"])&&void 0!==a&&a.show){t.next=5;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 5:return null==e.search.date||0==e.search.date.length?(e.search.startDate="",e.search.endDate=""):(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1]),t.next=8,c["a"].customDemoList(Object(s["a"])(Object(s["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:n=t.sent,n.code==p.StatusOK?(e.mock_tableData=n.data,null!=n.page?(e.pagerInfo.rowTotal=n.page.rowTotal,e.pagerInfo.pageTotal=n.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess")),e.pictLoading=!1):(e.$pigeon.MessageError(n.msg),e.pictLoading=!1);case 10:case"end":return t.stop()}}),t)})))()},getSearchDate:function(e){this.search.date=e},toSearch:function(){this.pagerInfo.current=1,this.searchFunc()},getDate:function(){var e,t,a=2,n=(new Date).getTimezoneOffset(),r=(new Date).getTime(),s=new Date(r+60*n*1e3+60*a*60*1e3),o=s.getFullYear(),i=s.getMonth()+1,c=s.getDate();i<10&&(i="0"+i),c<10&&(c="0"+c),e=o+"-"+i+"-01";var l=s.getMonth(),u=++l,p=new Date(s.getFullYear(),u,1),d=864e5,h=new Date(p-d),g=h.getDate();g<10&&(g="0"+g),t=o+"-"+i+"-"+g,this.search.date=[e,t]},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.getDate(),this.searchFunc()}},h=d,g=(a("abb8"),a("0e4f"),a("2877")),m=Object(g["a"])(h,n,r,!1,null,"06f0e210",null);t["default"]=m.exports},6447:function(e,t,a){},"99da":function(e,t,a){},abb8:function(e,t,a){"use strict";a("99da")}}]);