CardFile.2b1b8e79.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CardFile"],{"0587":function(e,t,a){"use strict";a("0b81")},"0ac2":function(e,t,a){"use strict";a.r(t);a("b0c0"),a("ac1f"),a("841c"),a("498a");var i=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:"card_file","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-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Label.Lang")},on:{change:e.toSearch},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.cn"),value:"cn"}}),t("el-option",{attrs:{label:e.$t("Web_info.zhHant"),value:"zhHant"}}),t("el-option",{attrs:{label:e.$t("Web_info.en"),value:"en"}}),t("el-option",{attrs:{label:e.$t("Web_info.vn"),value:"vi"}}),t("el-option",{attrs:{label:e.$t("Web_info.th"),value:"th"}}),t("el-option",{attrs:{label:e.$t("Web_info.ar"),value:"ar"}}),t("el-option",{attrs:{label:e.$t("Web_info.de"),value:"de"}}),t("el-option",{attrs:{label:e.$t("Web_info.es"),value:"es"}}),t("el-option",{attrs:{label:e.$t("Web_info.id"),value:"id"}}),t("el-option",{attrs:{label:e.$t("Web_info.ms"),value:"ms"}}),t("el-option",{attrs:{label:e.$t("Web_info.ko"),value:"ko"}}),t("el-option",{attrs:{label:e.$t("Web_info.pt"),value:"pt"}}),t("el-option",{attrs:{label:e.$t("Web_info.fa"),value:"fa"}}),t("el-option",{attrs:{label:e.$t("Web_info.tr"),value:"tr"}})],1)],1),t("el-form-item",[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-CardFile-Add"].show?t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Add",expression:"'Btn.Add'"}]}):e._e()]),e.display["R-CardFile-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:"",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(),"vi"==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.Tag")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.tagMap[a.row.tag]))])]}}])}),t("el-table-column",{attrs:{prop:"addTime",align:"left",label:e.$i18n.t("Label.Date")}}),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-CardFile-Update"].show?t("el-dropdown-item",{attrs:{command:{type:"editor",row:a.row}}},[t("i",{staticClass:"iconfont iconbianji3"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Editor",expression:"'Btn.Editor'"}]})]):e._e(),e.display["R-CardFile-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(),e.dialogCheck?t("el-dialog",{attrs:{rules:e.rules,title:e.isAdd?e.$t("R-CardFile-Add"):e.$t("R-CardFile-Update"),visible:e.dialogCheck,width:"900px"},on:{"update:visible":function(t){e.dialogCheck=t}}},[t("el-form",{ref:"form",staticClass:"business-edit-form",attrs:{model:e.form,rules:e.rules,"label-position":"right","label-width":"150px"}},[t("el-form-item",{attrs:{label:e.$t("Label.Lang")+":",prop:"lang"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{disabled:!e.isAdd,placeholder:e.$t("Placeholder.Choose")},model:{value:e.form.lang,callback:function(t){e.$set(e.form,"lang",t)},expression:"form.lang"}},[t("el-option",{attrs:{label:e.$t("Web_info.cn"),value:"cn"}}),t("el-option",{attrs:{label:e.$t("Web_info.zhHant"),value:"zhHant"}}),t("el-option",{attrs:{label:e.$t("Web_info.en"),value:"en"}}),t("el-option",{attrs:{label:e.$t("Web_info.vn"),value:"vi"}}),t("el-option",{attrs:{label:e.$t("Web_info.th"),value:"th"}}),t("el-option",{attrs:{label:e.$t("Web_info.ar"),value:"ar"}}),t("el-option",{attrs:{label:e.$t("Web_info.de"),value:"de"}}),t("el-option",{attrs:{label:e.$t("Web_info.es"),value:"es"}}),t("el-option",{attrs:{label:e.$t("Web_info.id"),value:"id"}}),t("el-option",{attrs:{label:e.$t("Web_info.ms"),value:"ms"}}),t("el-option",{attrs:{label:e.$t("Web_info.ko"),value:"ko"}}),t("el-option",{attrs:{label:e.$t("Web_info.pt"),value:"pt"}}),t("el-option",{attrs:{label:e.$t("Web_info.fa"),value:"fa"}}),t("el-option",{attrs:{label:e.$t("Web_info.tr"),value:"tr"}})],1)],1),t("el-form-item",{attrs:{label:e.$t("Label.Title")+":",prop:"tag"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{disabled:!e.isAdd,placeholder:e.$t("Placeholder.Choose")},model:{value:e.form.tag,callback:function(t){e.$set(e.form,"tag",t)},expression:"form.tag"}},e._l(e.tags_options,(function(e){return t("el-option",{key:e.name,attrs:{label:e.name,value:e.tag}})})),1)],1),t("el-form-item",{attrs:{prop:"type",label:e.$t("news_add_field.Label.Video")+":"}},[t("el-select",{staticStyle:{width:"100%","margin-bottom":"15px"},attrs:{placeholder:e.$t("Placeholder.Choose")},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[t("el-option",{attrs:{label:e.$t("news_add_field.Label.Upload"),value:"1"}}),t("el-option",{attrs:{label:e.$t("news_add_field.Label.Url"),value:"2"}})],1)],1),t("el-form-item",{attrs:{prop:"fileUrl",label:""}},[1==e.form.type?t("el-upload",{staticClass:"avatar-uploader",attrs:{action:e.imgUrl+"/wasabi/card/upload/video",headers:e.AccessToken,accept:"video/*",drag:"","show-file-list":!1,"on-success":e.handleAvatarSuccess1,"before-upload":e.beforeAvatarUpload}},[e.form.fileUrl&&!e.imageUrl1?t("video",{staticClass:"avatar",staticStyle:{height:"100%",width:"100%"},attrs:{src:e.imgUrl+e.form.fileUrl}}):e._e(),e.imageUrl1?t("video",{staticClass:"avatar",staticStyle:{height:"100%",width:"100%"},attrs:{src:e.imageUrl1}}):t("div",[t("i",{staticClass:"el-icon-upload avatar-uploader-icon",staticStyle:{"font-size":"28px",opacity:"0.4"}}),t("div",{staticClass:"imgSize"},[e._v(e._s(e.uploadDes))])])]):e._e(),2==e.form.type?t("el-input",{staticClass:"m-input",attrs:{clearable:"",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.fileUrl,callback:function(t){e.$set(e.form,"fileUrl","string"===typeof t?t.trim():t)},expression:"form.fileUrl"}}):e._e()],1),1==e.form.type?t("div",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Des.item3",expression:"'news_add_field.Des.item3'"}],staticClass:"imgDes"}):e._e(),2==e.form.type?t("div",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Des.item4",expression:"'news_add_field.Des.item4'"}],staticClass:"imgDes"}):e._e()],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogCheck=!1}}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Ucard.Business.p32",expression:"'Ucard.Business.p32'"}]})]),t("el-button",{directives:[{name:"t",rawName:"v-t",value:"card.Btn.Confirm",expression:"'card.Btn.Confirm'"}],attrs:{type:"primary"},on:{click:e.cardFileAdd}})],1)],1):e._e()],1)},n=[],s=a("c7eb"),r=a("5530"),l=a("1da1"),o=(a("14d9"),a("e9f5"),a("7d54"),a("b64b"),a("d3b7"),a("3ca3"),a("159b"),a("ddb0"),a("2b3d"),a("bf19"),a("9861"),a("88a7"),a("271a"),a("5494"),a("c6e4")),c=a("f121"),d=a.n(c),p=d.a.Code,u={name:"CardFile",data:function(){return{pictLoading:!1,dialogCheck:!1,isAdd:!0,form:{type:"2"},mock_tableData:[],search:{valid:"",tag:"",lang:null,date:[],startDate:"",endDate:""},url:d.a.Host85,imgUrl:d.a.Host85,imageUrl1:"",uploadDes:this.$i18n.t("Ucard.PaymentTransfer.text20"),multipleSelection:[],tags_options:[{tag:"1",name:this.$i18n.t("R-CardFil-tag")}],tagMap:{1:this.$i18n.t("R-CardFil-tag")},rules:{tag:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],lang:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],type:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],fileUrl:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}]},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{display:function(){return JSON.parse(this.Session.Get("display",!0))},AccessToken:function(){return{"Access-Token":this.Session.Get("access_token")}}},methods:{handleCommand:function(e){"delete"==e.type?(this.multipleSelection=[e.id],this.toDeleteBatch(e.id)):"editor"==e.type&&this.toUpdate(e.row)},accountOpen:function(e){this.$router.push({path:"/web/video/add",query:{id:e,type:"check"}}).catch((function(e){return e}))},handleAvatarSuccess1:function(e,t){200==e.code?(this.imageUrl1=URL.createObjectURL(t.raw),this.form.fileUrl=t.response.data,this.uploadDes=this.$i18n.t("Msg.Success")):this.$pigeon.MessageError(this.$i18n.t("Msg.Fail"))},cardFileAdd:function(){var e=this;return Object(l["a"])(Object(s["a"])().mark((function t(){var a,i;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.$refs.form){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.$refs.form.validate();case 4:if(a=t.sent,a){t.next=7;break}return t.abrupt("return");case 7:if(!e.isAdd){t.next=13;break}return t.next=10,o["a"].cardFileAdd(Object(r["a"])({},e.form));case 10:i=t.sent,t.next=16;break;case 13:return t.next=15,o["a"].cardFileUpdate(Object(r["a"])({},e.form));case 15:i=t.sent;case 16:200==i.code?(e.form={type:"1"},e.dialogCheck=!1,e.toSearch()):e.$pigeon.MessageError(i.msg);case 17:case"end":return t.stop()}}),t)})))()},beforeAvatarUpload:function(e){var t=-1!=["mp4","avi","3gp","wmv","asf","navi","mov","mpeg","rm","rmvb","flv","f4v","MP4","AVI","3GP","WMV","ASF","NAVI","MOV","MPEG","RM","RMVB","FLV","F4V"].indexOf(e.name.split(".")[1]),a=e.size/1024/1024<100;return t||this.$pigeon.MessageError(this.$i18n.t("Msg.mp4")),a||this.$pigeon.MessageError(this.$i18n.t("Msg.10IMG")),t&&a&&(this.form.fileUrl="",this.uploadDes=this.$i18n.t("news_add_field.Label.Uploading")),t&&a},searchFunc:function(){var e=this;return Object(l["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,e.display["R-CardFile-List"].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"].cardFileList(Object(r["a"])(Object(r["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:a=t.sent,a.code==p.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=3,i=(new Date).getTimezoneOffset(),n=(new Date).getTime(),s=new Date(n+60*i*1e3+60*a*60*1e3),r=s.getFullYear(),l=s.getMonth()+1,o=s.getDate();l<10&&(l="0"+l),o<10&&(o="0"+o),e=r+"-"+l+"-01";var c=s.getMonth(),d=++c,p=new Date(s.getFullYear(),d,1),u=864e5,f=new Date(p-u),m=f.getDate();m<10&&(m="0"+m),t=r+"-"+l+"-"+m,this.search.date=[e,t]},toNew:function(){this.form={type:"2"},this.imageUrl1="",this.isAdd=!0,this.dialogCheck=!0},toCheck:function(e){this.form=e,this.dialogCheck=!0},toUpdate:function(e){this.form=e,this.imageUrl1="",this.isAdd=!1,this.dialogCheck=!0},toDelete:function(){var e=Object(l["a"])(Object(s["a"])().mark((function e(t){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:console.log(t),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(l["a"])(Object(s["a"])().mark((function e(){var i,n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=[],i.push(t),e.next=4,o["a"].webVideoDelete({ids:i});case 4:n=e.sent,n.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.DeleteSuccess")),a.searchFunc()):a.$pigeon.MessageError(n.msg);case 6:case"end":return e.stop()}}),e)}))),(function(){}));case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),toDeleteBatch:function(){var e=Object(l["a"])(Object(s["a"])().mark((function e(){var t;return Object(s["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(l["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].cardFileDelete({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)}))},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.searchFunc()},watch:{"form.type":function(){}}},f=u,m=(a("0587"),a("2877")),h=Object(m["a"])(f,i,n,!1,null,"5a28b0b7",null);t["default"]=h.exports},"0b81":function(e,t,a){}}]);