0696ed9.js 16 KB

12
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[75,64,65,66],{530:function(e,t,n){e.exports={}},531:function(e,t,n){e.exports={}},534:function(e,t,n){"use strict";n.r(t);n(521),n(524),n(11),n(17),n(32);var o=n(538),r=n(539),l=n(540),c={name:"Tinymce",props:{id:{type:String,default:function(){return"vue-tinymce-"+ +new Date+(1e3*Math.random()).toFixed(0)}},value:{type:String,default:""},toolbar:{type:Array,required:!1,default:function(){return[]}},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"auto"}},data:function(){return{hasChange:!1,hasInit:!1,tinymceId:this.id,fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}},computed:{language:function(){return this.languageTypeList[this.$store.getters.language]},containerWidth:function(){var e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?"".concat(e,"px"):e}},watch:{value:function(e){var t=this;!this.hasChange&&this.hasInit&&this.$nextTick((function(){return window.tinymce.get(t.tinymceId).setContent(e||"")}))},language:function(){var e=this;this.destroyTinymce(),this.$nextTick((function(){return e.initTinymce()}))}},mounted:function(){this.init()},activated:function(){window.tinymce&&this.initTinymce()},deactivated:function(){this.destroyTinymce()},destroyed:function(){this.destroyTinymce()},methods:{init:function(){var e=this;Object(l.default)("//cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js",(function(t){t?e.$message.error(t.message):e.initTinymce()}))},initTinymce:function(){var e=this,t=this;window.tinymce.init({language:this.language,selector:"#".concat(this.tinymceId),height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:r.default,menubar:this.menubar,plugins:o.default,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",imagetools_cors_hosts:["www.tinymce.com","codepen.io"],default_link_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:function(n){t.value&&n.setContent(t.value),t.hasInit=!0,n.on("NodeChange Change KeyUp SetContent",(function(){e.hasChange=!0,e.$emit("input",n.getContent())}))},setup:function(e){e.on("FullscreenStateChanged",(function(e){t.fullscreen=e.state}))},convert_urls:!1})},destroyTinymce:function(){var e=window.tinymce.get(this.tinymceId);this.fullscreen&&e.execCommand("mceFullScreen"),e&&e.destroy()},setContent:function(e){window.tinymce.get(this.tinymceId).setContent(e)},getContent:function(){window.tinymce.get(this.tinymceId).getContent()},imageSuccessCBK:function(e){var t=this;e.forEach((function(e){return window.tinymce.get(t.tinymceId).insertContent('<img class="wscnph" src="'.concat(e.url,'" >'))}))}}},d=(n(544),n(22)),component=Object(d.a)(c,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"tinymce-container",class:{fullscreen:e.fullscreen},style:{width:e.containerWidth}},[t("textarea",{staticClass:"tinymce-textarea",attrs:{id:e.tinymceId}})])}),[],!1,null,"64623c0e",null);t.default=component.exports},538:function(e,t,n){"use strict";n.r(t);t.default=["advlist autolink autosave code colorpicker colorpicker contextmenu directionality fullscreen hr insertdatetime link lists nonbreaking noneditable paste preview print save spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount"]},539:function(e,t,n){"use strict";n.r(t);t.default=["searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample","hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen"]},540:function(e,t,n){"use strict";n.r(t);n(41),n(78),n(81),n(82),n(65),n(39),n(11),n(17),n(34),n(33),n(42);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,a){if(e){if("string"==typeof e)return r(e,a);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,a):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,l=function(){};return{s:l,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw c}}}}function r(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=Array(a);t<a;t++)n[t]=e[t];return n}var l=[];t.default=function(e,t){var n=document.getElementById(e),r=t||function(){};if(!n){var script=document.createElement("script");script.src=e,script.id=e,document.body.appendChild(script),l.push(r);var c="onload"in script?function(script){script.onload=function(){this.onerror=this.onload=null;var e,t=o(l);try{for(t.s();!(e=t.n()).done;){(0,e.value)(null,script)}}catch(e){t.e(e)}finally{t.f()}l=null},script.onerror=function(){this.onerror=this.onload=null,r(new Error("Failed to load "+e),script)}}:function(script){script.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState){this.onreadystatechange=null;var e,t=o(l);try{for(t.s();!(e=t.n()).done;){(0,e.value)(null,script)}}catch(e){t.e(e)}finally{t.f()}l=null}}};c(script)}n&&r&&(window.tinymce?r(null,n):l.push(r))}},544:function(e,t,n){"use strict";n(530)},545:function(e,t,n){"use strict";n(531)},548:function(e,t,n){"use strict";n.r(t);var o=n(24),r=n(12);n(61),n(41),n(40),n(39),n(521),n(62),n(63),n(46),n(11),n(523),n(32);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={head:function(){return{link:[{rel:"stylesheet",href:"//yun.baoxiaohe.com/openflatform/css/v1.0/sdk.css"}]}},props:{bxhType:String,design:Number,height:{type:String,default:"99vh"},link:String,templateArr:{type:Array,default:function(){return[]}}},data:function(){return{iframe:null}},watch:{},mounted:function(){var e=this;this.$nextTick((function(){e.createBxh()})),window.addEventListener("message",this.receiveData)},beforeDestroy:function(){window.removeEventListener("message",this.receiveData)},methods:{createBxh:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,o,r,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("3D"!=e.bxhType){t.next=8;break}return t.next=3,e.$axios.get("/bxh/company/token");case 3:n=t.sent,o=e.design||e.link,e.init(o,n.result,e.bxhType),t.next=20;break;case 8:if("design"!=e.bxhType){t.next=15;break}return t.next=11,e.$axios.get("/bxh/token");case 11:r=t.sent,e.init(e.design,r.result,e.bxhType),t.next=20;break;case 15:if("render"!=e.bxhType){t.next=20;break}return t.next=18,e.$axios.get("/bxh/token");case 18:l=t.sent,e.init(e.design,l.result,e.bxhType);case 20:case"end":return t.stop()}}),t)})))()},init:function(e,t,n){this.iframe=new window.BXHIframe({elCls:"iframe-dom",prefixCls:"detail-iframe-sdk",locale:"en-US",params:{id:e,token3D:t,token:t,project_id:e,isShowRotate:!1,isShowFold:!1,locale:"en-US"},name:n})},receiveData:function(e){if(e)try{if("string"==typeof e.data){var t=JSON.parse(e.data),n=t.event,o=t.name,r=t.params,l=t.preDesignParams;"needLogin"===n?this.iframe.preDesign(c(c({},l),{},{token:""})):"viewDetails"===n||"viewDetails"===n?this.iframe.render({name:o,params:r}):"startDesign"===n?this.iframe.render({params:{id:r.id,token:""},name:"design"}):"logoutSuccess"===n?console.log("logoutSuccess"):"reloadParams"===n?console.log("reloadParams"):"saveSuccess"===n?console.log("saveSuccess"):"saveFail"===n?console.log("saveFail"):"loadSuccess"===n?console.log("loadSuccess"):"toPreview3d"===n?console.log("手机端编辑器进入3d页面回调"):"toEditor"===n&&console.log("手机端从3d页面进入编辑器回调")}}catch(e){console.log(e)}}}},f=(n(545),n(22)),component=Object(f.a)(d,(function(){var e=this._self._c;return e("div",{staticClass:"iframe-main"},[e("div",{staticClass:"iframe-dom",style:{height:this.height}})])}),[],!1,null,"500dc45e",null);t.default=component.exports},553:function(e,t,n){e.exports={}},589:function(e,t,n){"use strict";n(553)},593:function(e,t,n){"use strict";var o=n(1);t.a=new o.default},594:function(e,t,n){e.exports={}},614:function(e,t,n){"use strict";n.r(t);n(521);var o=n(588),r=n.n(o),l={props:{title:{type:String,default:"Send Email"},sendbtnCext:{type:String,default:"SUBMIT REQUEST"},isSendPdf:{type:Boolean,default:!1},labelShow:{type:Boolean,default:!0},emailForm:{},rules:{},labelWidth:Number,visible:{type:Boolean,default:!1}},methods:{copyUrl:function(e){var t=this,n=new r.a(".".concat(e));n.on("success",(function(e){t.$message.success("link copied to clipboard"),n.destroy()})),n.on("error",(function(e){t.$message.error("The browser does not support automatic replication"),n.destroy()}))},handleClose:function(){this.$emit("update:visible",!1)}}},c=(n(589),n(22)),component=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{"lock-scroll":!1,title:e.title,visible:e.visible,width:"700px","before-close":e.handleClose,"close-on-click-modal":!1,top:"0"},on:{"update:visible":function(t){e.visible=t}}},[t("el-form",{ref:"ruleForm",attrs:{model:e.emailForm,rules:e.rules}},e._l(e.emailForm,(function(n,o){return t("el-form-item",{key:o,attrs:{label:e.labelShow?o:"","label-width":e.labelWidth+"px",prop:o}},[t("el-input",{attrs:{readonly:""},model:{value:e.emailForm[o],callback:function(t){e.$set(e.emailForm,o,t)},expression:"emailForm[key]"}}),t("el-button",{class:o,attrs:{"data-clipboard-text":e.emailForm[o],type:"primary"},on:{click:function(t){return t.preventDefault(),e.copyUrl(o)}}},[e._v("copy link")])],1)})),1)],1)}),[],!1,null,"1381fc6c",null);t.default=component.exports},633:function(e,t,n){"use strict";n(594)},687:function(e,t,n){e.exports={}},716:function(e,t,n){"use strict";n.r(t);n(521);var o=n(593),r={components:{Tinymce:n(534).default},props:{title:{type:String,default:"Send Email"},labelWidth:{type:Number,default:95},formConfig:{type:Array,required:!0},formData:{type:Object,required:!0},sendbtnCext:{type:String,default:"SUBMIT REQUEST"},top:{type:String,default:"5vh"},isSendPdf:{type:Boolean,default:!1},rules:{},visible:{type:Boolean,default:!1}},methods:{handleClose:function(){this.$emit("update:visible",!1)},handleSend:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(!t)return!1;e.isSendPdf?o.a.$emit("sendPdf"):e.$emit("handleSend")}))}}},l=(n(633),n(22)),component=Object(l.a)(r,(function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.title,visible:e.visible,width:"700px","before-close":e.handleClose,top:e.top,"show-close":!1},on:{"update:visible":function(t){e.visible=t}}},[t("el-form",{ref:"ruleForm",attrs:{model:e.formData,rules:e.rules}},e._l(e.formConfig,(function(n){return t("el-form-item",{key:n.label,attrs:{label:n.label,prop:n.prop,"label-width":e.labelWidth+"px"}},["input"===n.type?t("el-input",{style:{width:n.width},attrs:{disabled:n.disabled,readonly:n.readonly,placeholder:n.placeholder?n.placeholder:"",clearable:"",type:n.inputType},on:{change:function(t){n.change&&n.change(e.formData[n.prop])}},model:{value:e.formData[n.prop],callback:function(t){e.$set(e.formData,n.prop,t)},expression:"formData[item.prop]"}}):e._e(),e._v(" "),"selectObj"===n.type?t("el-select",{style:{width:"100%"},attrs:{disabled:n.disabled,clearable:"",filterable:"",multiple:n.multiple},on:{change:function(t){n.change&&n.change(e.formData[n.prop])}},model:{value:e.formData[n.prop],callback:function(t){e.$set(e.formData,n.prop,t)},expression:"formData[item.prop]"}},e._l(n.selectList,(function(e,n){return t("el-option",{key:parseInt(n),attrs:{label:e,value:e}})})),1):e._e(),e._v(" "),"tinymce"===n.type?t("tinymce",{staticStyle:{display:"inline-block"},attrs:{height:n.height,width:n.width},model:{value:e.formData[n.prop],callback:function(t){e.$set(e.formData,n.prop,t)},expression:"formData[item.prop]"}}):e._e()],1)})),1),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleSend}},[e._v(e._s(e.sendbtnCext))]),e._v(" "),t("el-button",{attrs:{type:"primary",plain:""},on:{click:e.handleClose}},[e._v("CANCEL")])],1)],1)}),[],!1,null,"7d26e39b",null);t.default=component.exports;installComponents(component,{Tinymce:n(534).default})},804:function(e,t,n){e.exports=n.p+"img/export.040816b.png"},805:function(e,t,n){e.exports=n.p+"img/email.11d7073.png"},806:function(e,t,n){"use strict";n(687)},861:function(e,t,n){"use strict";n.r(t);n(523);var o={layout:"blank_layout",data:function(){return{exportDialogVisible:!1,emailDialogVisible:!1,exportForm:{Link:"",Artwork:""},emailForm:{from:"",to:"",cc:"info@promocollection.com.au",subject:"",job_name:"",link:"",pdf:"",notes:""},formConfig:[{label:"From",prop:"from",type:"selectObj",selectList:{1:"",2:"on-reply@promocollection.com.au"}},{label:"To",prop:"to",type:"input"},{label:"CC",prop:"cc",type:"selectObj",selectList:{1:"info@promocollection.com.au",2:"astro@promocollection.com.au",3:"grace@promocollection.com.au"}},{label:"Subject",prop:"subject",type:"input"},{label:"Job Name",prop:"job_name",type:"input"},{label:"Link",prop:"link",type:"input",readonly:!0},{label:"Artwork",prop:"pdf",type:"input",readonly:!0},{label:"Notes",prop:"notes",type:"tinymce",width:"100%",height:200}],rules:{from:[{required:!0,message:"Please select",trigger:"change"}],to:[{required:!0,message:"The recipient is unknown. Specify another recipient",pattern:/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,trigger:"blur"}],subject:[{required:!0,message:"Send this message without a subject?",trigger:"blur"}],job_name:[{required:!0,message:"Please fill in your job name!",trigger:"blur"}],link:[{required:!0,message:"Please enter",trigger:"blur"}],pdf:[{required:!0,message:"Please enter",trigger:"blur"}],notes:[{required:!0,message:"Please enter",trigger:"blur"}]},pdf_id:null}},mounted:function(){this.emailForm.link=this.exportForm.Link=window.location.origin+"/3D/"+this.$route.params.id,this.emailForm.pdf=this.exportForm.Artwork=window.location.origin+"/pdf/"+this.$route.params.id,this.emailForm.from=this.$cookies.get("email"),this.formConfig[0].selectList[1]=this.$cookies.get("email")},methods:{openExportFrom:function(){this.exportDialogVisible=!0},openEmailFrom:function(){this.emailDialogVisible=!0},sendMail:function(){var e=this;this.$axios.post("/bxh/email",this.emailForm).then((function(t){e.emailDialogVisible=!1,e.$confirm("send successfully",{confirmButtonText:"OK",showCancelButton:!1,type:"success",center:!0,showClose:!1}).then((function(){}))})).catch((function(){}))}}},r=(n(806),n(22)),component=Object(r.a)(o,(function(){var e=this,t=e._self._c;return t("div",[t("bxh",{attrs:{bxhType:"design",design:+e.$route.params.id}}),e._v(" "),t("ul",{staticClass:"handle_list"},[t("li",{on:{click:e.openExportFrom}},[t("img",{attrs:{src:n(804)}}),e._v("Export\n ")]),e._v(" "),t("li",{on:{click:e.openEmailFrom}},[t("img",{attrs:{src:n(805)}}),e._v("E-mail\n ")])]),e._v(" "),t("export-dialog",{attrs:{emailForm:e.exportForm,visible:e.exportDialogVisible,labelWidth:70,title:"Export"},on:{"update:visible":function(t){e.exportDialogVisible=t}}}),e._v(" "),t("design-form-dialog",{attrs:{formData:e.emailForm,formConfig:e.formConfig,visible:e.emailDialogVisible,rules:e.rules,labelWidth:95,title:"Email To info@promocollection.com.au"},on:{"update:visible":function(t){e.emailDialogVisible=t},handleSend:e.sendMail}})],1)}),[],!1,null,"1ab4e098",null);t.default=component.exports;installComponents(component,{Bxh:n(548).default,ExportDialog:n(614).default,DesignFormDialog:n(716).default})}}]);
  2. //# sourceMappingURL=0696ed9.js.map