Popup.d1b71fbc.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Popup"],{1594:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c"),a("9911");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:"web_info","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",{staticStyle:{"margin-right":"10px"}},[t("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.lang,callback:function(t){e.$set(e.search,"lang",t)},expression:"search.lang"}},[t("el-option",{attrs:{label:e.$t("Web_info.All"),value:null},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.cn"),value:"cn"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.zhHant"),value:"zhHant"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.en"),value:"en"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.vn"),value:"vn"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.th"),value:"th"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.ar"),value:"ar"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.de"),value:"de"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.es"),value:"es"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.id"),value:"id"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.ms"),value:"ms"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.ko"),value:"ko"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.pt"),value:"pt"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.fa"),value:"fa"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Web_info.tr"),value:"tr"},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}})],1)],1),t("el-form-item",{staticStyle:{"margin-right":"10px"}},[t("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.valid,callback:function(t){e.$set(e.search,"valid",t)},expression:"search.valid"}},[t("el-option",{attrs:{label:e.$t("Label.Show"),value:""},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Btn.No"),value:0},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Btn.Yes"),value:1},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}})],1)],1),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")},on:{input:e.getSearchDate},model:{value:e.search.date,callback:function(t){e.$set(e.search,"date",t)},expression:"search.date"}}),t("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1)],1)],1),t("el-form-item",[t("div",{staticClass:"search_action_btn"},[t("span",{staticClass:"crm-cursor",on:{click:e.toNew}},[t("i",{staticClass:"el-icon-plus"}),e.display["R-Popup-Add"].show?t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Add",expression:"'Btn.Add'"}]}):e._e()]),e.display["R-Popup-Delete"].show?t("span",{staticClass:"crm-cursor delete",class:{active:this.multipleSelection.length},on:{click:e.toDeleteBatch}},[t("i",{staticClass:"el-icon-minus"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):e._e()])])],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),t("el-table-column",{attrs:{prop:"",label:e.$i18n.t("Label.Instructions")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.remarks||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("system_info.Label.Lang")},scopedSlots:e._u([{key:"default",fn:function(a){return["cn"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.cn",expression:"'Web_info.cn'"}]}):e._e(),"zhHant"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.zhHant",expression:"'Web_info.zhHant'"}]}):e._e(),"en"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.en",expression:"'Web_info.en'"}]}):e._e(),"vn"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.vn",expression:"'Web_info.vn'"}]}):e._e(),"th"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.th",expression:"'Web_info.th'"}]}):e._e(),"ar"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.ar",expression:"'Web_info.ar'"}]}):e._e(),"de"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.de",expression:"'Web_info.de'"}]}):e._e(),"es"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.es",expression:"'Web_info.es'"}]}):e._e(),"id"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.id",expression:"'Web_info.id'"}]}):e._e(),"ms"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.ms",expression:"'Web_info.ms'"}]}):e._e(),"ko"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.ko",expression:"'Web_info.ko'"}]}):e._e(),"pt"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.pt",expression:"'Web_info.pt'"}]}):e._e(),"fa"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.fa",expression:"'Web_info.fa'"}]}):e._e(),"tr"==a.row.lang?t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.tr",expression:"'Web_info.tr'"}]}):e._e()]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Show")},scopedSlots:e._u([{key:"default",fn:function(a){return[1==a.row.valid?t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Yes",expression:"'Btn.Yes'"}]}):e._e(),0==a.row.valid?t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.No",expression:"'Btn.No'"}]}):e._e()]}}])}),t("el-table-column",{attrs:{prop:"",label:e.$i18n.t("Label.SubIndex")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.subIndex||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",label:e.$i18n.t("Label.AdvertUrl")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.link||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",label:e.$i18n.t("Label.Cover")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{lazy:!1,src:e.imgUrl+a.row.coverImage,"preview-src-list":[e.imgUrl+a.row.coverImage]}},[t("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[t("i",{staticClass:"el-icon-picture-outline"})])])]}}])}),t("el-table-column",{attrs:{prop:"startTime",align:"left",label:e.$i18n.t("Placeholder.Start")}}),t("el-table-column",{attrs:{prop:"endTime",align:"left",label:e.$i18n.t("Placeholder.End")}}),t("el-table-column",{attrs:{prop:"",align:"center",label:e.$i18n.t("Label.Action")},scopedSlots:e._u([{key:"default",fn:function(a){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"},[e.display["R-Popup-Update"].show?t("el-dropdown-item",{attrs:{command:{type:"editor",id:a.row.id}}},[t("i",{staticClass:"iconfont iconbianji3"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Editor",expression:"'Btn.Editor'"}]})]):e._e(),e.display["R-Popup-Delete"].show?t("el-dropdown-item",{attrs:{command:{type:"delete",id:a.row.id}}},[t("i",{staticClass:"iconfont iconshanchu"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):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=[],i=a("c7eb"),l=a("5530"),o=a("1da1"),s=(a("14d9"),a("e9f5"),a("7d54"),a("b64b"),a("d3b7"),a("159b"),a("c554")),c=a("f121"),p=a.n(c),u=p.a.Code,d={name:"Info",data:function(){return{imgUrl:p.a.Host05,pictLoading:!1,mock_tableData:[],search:{valid:"",lang:null,date:[],startDate:"",endDate:""},multipleSelection:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{display:function(){return JSON.parse(this.Session.Get("display",!0))}},methods:{handleCommand:function(e){"delete"==e.type?this.toDelete(e.id):"editor"==e.type&&this.toUpdate(e.id)},accountOpen:function(e){this.$router.push({path:"/web/popupadd/single",query:{id:e.id,type:"popup"}})},searchFunc:function(){var e=this;return Object(o["a"])(Object(i["a"])().mark((function t(){var a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,e.display["R-Popup-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,s["a"].getPopupList(Object(l["a"])(Object(l["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(),i=new Date(r+60*n*1e3+60*a*60*1e3),l=i.getFullYear(),o=i.getMonth()+1,s=i.getDate();o<10&&(o="0"+o),s<10&&(s="0"+s),e=l+"-"+o+"-01";var c=i.getMonth(),p=++c,u=new Date(i.getFullYear(),p,1),d=864e5,h=new Date(u-d),f=h.getDate();f<10&&(f="0"+f),t=l+"-"+o+"-"+f,this.search.date=[e,t]},toNew:function(){this.$router.push({path:"/web/popup/add",query:{type:"add"}}).catch((function(e){return e}))},toCheck:function(e){this.$router.push({path:"/web/popup/add",query:{id:e,type:"check"}}).catch((function(e){return e}))},toUpdate:function(e){this.$router.push({path:"/web/popup/add",query:{id:e,type:"update"}}).catch((function(e){return e}))},toDelete:function(){var e=Object(o["a"])(Object(i["a"])().mark((function e(t){var a;return Object(i["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(o["a"])(Object(i["a"])().mark((function e(){var n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],n.push(t),e.next=4,s["a"].webPopupDelete({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(o["a"])(Object(i["a"])().mark((function e(){var t;return Object(i["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(o["a"])(Object(i["a"])().mark((function e(){var a;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["a"].webPopupDelete({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)}))},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.searchFunc()}},h=d,f=(a("96b7"),a("2877")),m=Object(f["a"])(h,n,r,!1,null,"7f347262",null);t["default"]=m.exports},"96b7":function(e,t,a){"use strict";a("d8df")},d8df:function(e,t,a){}}]);