(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["simulation"],{"0d53":function(e,t,a){},"129f":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},3693:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("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"}},[a("div",{staticClass:"crm_search"},[a("el-form",{ref:"form",attrs:{"label-position":"",model:e.search,"label-width":""}},[a("el-row",[a("el-col",{attrs:{span:24,md:24,lg:24}},[a("el-form-item",[a("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"}}),a("el-button",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1),a("el-form-item"),a("el-form-item")],1)],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Name")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.firstName?a("span",[e._v(e._s(t.row.firstName+" "))]):e._e(),t.row.middle?a("span",[e._v(e._s(t.row.middle+" "))]):e._e(),t.row.lastName?a("span",[e._v(e._s(t.row.lastName))]):e._e(),t.row.firstName||t.row.lastName||t.row.middle?e._e():a("span",[e._v(e._s("--"))])]}}])}),a("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?a("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,2146209473)}):e._e(),a("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)+" ")]}}])}),a("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.ip||"--")+" ")]}}])}),a("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||"--")+" ")]}}])})],1),e.pagerInfo.rowTotal?a("div",{staticClass:"crm_pagination"},[a("div",{staticClass:"crm_page_total"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),a("span",[e._v(e._s(e.pagerInfo.rowTotal))]),a("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),a("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("4160"),a("ac1f"),a("841c"),a("159b"),a("5530")),i=(a("96cf"),a("1da1")),o=a("5217"),l=a("f121"),c=a.n(l),u=c.a.Code,p={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 JSON.parse(this.Session.Get("display",!0))}},methods:{handleCommand:function(e){"delete"==e.type&&this.toDelete(e.id)},toDelete:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var a;return regeneratorRuntime.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"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],n.push(t),e.next=4,o["a"].customDemoListDelete({ids:n});case 4:r=e.sent,r.code==u.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"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.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"])(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"].customDemoListDelete({ids:t.multipleSelection});case 2:a=e.sent,a.code==u.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"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,e.display["R-Simulation-Search"].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,o["a"].customDemoList(Object(s["a"])(Object(s["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:a=t.sent,a.code==u.StatusOK?(e.mock_tableData=a.data,null!=a.page?(e.pagerInfo.rowTotal=a.page.rowTotal,e.pagerInfo.pageTotal=a.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess")),e.pictLoading=!1):(e.$pigeon.MessageError(a.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),i=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();o<10&&(o="0"+o),l<10&&(l="0"+l),e=i+"-"+o+"-01";var c=s.getMonth(),u=++c,p=new Date(s.getFullYear(),u,1),d=864e5,g=new Date(p-d),h=g.getDate();h<10&&(h="0"+h),t=i+"-"+o+"-"+h,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()}},d=p,g=(a("b9e0"),a("8624"),a("2877")),h=Object(g["a"])(d,n,r,!1,null,"be36f10c",null);t["default"]=h.exports},"3f0e":function(e,t,a){},"841c":function(e,t,a){"use strict";var n=a("d784"),r=a("825a"),s=a("1d80"),i=a("129f"),o=a("14c3");n("search",1,(function(e,t,a){return[function(t){var a=s(this),n=void 0==t?void 0:t[e];return void 0!==n?n.call(t,a):new RegExp(t)[e](String(a))},function(e){var n=a(t,e,this);if(n.done)return n.value;var s=r(e),l=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var u=o(s,l);return i(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},8624:function(e,t,a){"use strict";var n=a("3f0e"),r=a.n(n);r.a},b9e0:function(e,t,a){"use strict";var n=a("0d53"),r=a.n(n);r.a}}]);