(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a7fab97"],{"3c5b":function(e,t,a){},be4f: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",{staticClass:"brand_content"},[a("div",{staticClass:"brand_header"},[a("span",{on:{click:e.goBack}},[a("Icon",{attrs:{type:"md-arrow-back",size:"18",color:"#1890FF"}})],1),a("span",[e._v("Excel批量上传商标")])]),a("div",{staticClass:"brand_content_upload"},[e._m(0),a("div",[a("Upload",{attrs:{data:e.d,action:e.action,accept:".csv","on-success":e.handleSuccess,"before-upload":e.handleBeforeUpload}},[a("Button",{attrs:{icon:"ios-cloud-upload-outline"}},[e._v("上传Csv文件")]),e._v(" "+e._s(e.note)+" ")],1),a("Button",{attrs:{type:"primary"},on:{click:e.check}},[e._v("发布")])],1)]),a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,modelName:"upload",metaName:"upload_info",packageName:"trademark",tblheight:e.adjustHeight-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("Modal",{attrs:{title:"提示"},on:{"on-ok":e.ok,"on-cancel":e.cancel},model:{value:e.modal1,callback:function(t){e.modal1=t},expression:"modal1"}},[a("p",[e._v("是否发布所有商标？")])])],1)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[e._v(" 第一次上传请下载 "),a("a",{attrs:{href:"https://gsb-zc.oss-cn-beijing.aliyuncs.com/%E5%95%86%E6%A0%87%E6%A8%A1%E7%89%88.csv",download:"商标上传模版.csv"}},[e._v("商标上传模板")]),e._v(" ，并严格按模板提供内容填入商标信息。 ")])}],c=(a("7f7f"),a("a481"),a("c1df")),s=a.n(c),r=a("60b7"),i=a("06d3"),l=a("7e1e"),d=(a("c276"),{components:{BizTable:i["a"]},data:function(){return{note:"点击上传Csv文件",fileurl:"",modal1:!1,action:"",d:{}}},methods:{goBack:function(){this.$router.go(-1)},handleSuccess:function(e,t,a){console.log(e);var n=this.loadXML(e),o=n.documentElement.getElementsByTagName("Location")[0].textContent;this.fileurl=o,this.note="文件已上传"},loadXML:function(e){var t=null;if(!window.DOMParser&&window.ActiveXObject)for(var a=["MSXML.2.DOMDocument.6.0","MSXML.2.DOMDocument.3.0","Microsoft.XMLDOM"],n=0;n<a.length;n++)try{t=new ActiveXObject(a[n]),t.async=!1,t.loadXML(e);break}catch(c){}else{if(!(window.DOMParser&&document.implementation&&document.implementation.createDocument))return null;try{var o=new DOMParser;t=o.parseFromString(e,"text/xml")}catch(c){console.log(c)}}return t},handleBeforeUpload:function(e){var t=new Date;return this.d.key="zc_"+Math.round(500*Math.random())+t.getMonth()+t.getTime()+t.getFullYear()+t.getDate()+t.getHours()+t.getMinutes()+t.getSeconds()+t.getMilliseconds()+e.name.replace(" ",""),!0},check:function(){if(!this.fileurl)return this.$Message.warning("先上传文件");this.modal1=!0},ok:function(){this.publish()},cancel:function(){},publish:function(){var e=this;Object(l["f"])("/web/trademark/trademarkCtl/excelpublish",{file_url:this.fileurl}).then((function(t){-200!=t.data.status?(e.note="点击上传Csv文件",e.$Message.success("发布成功"),e.$refs.bt.fetchData()):(e.$Message.error("发布失败"),console.log("details err:",t))})).catch((function(t){e.$Message.error("发布失败"),console.log("details err:",t)}))},onexec:function(e,t){var a=this;"info"===e&&Object(l["f"])("/web/trademark/trademarkCtl/getidlist",{upload_id:t.id}).then((function(e){if(-200!=e.data.status){var t=e.data.data.map((function(e){return e.trademark_id}));a.$router.push({name:"originmanage_order",query:{ids:t}})}else console.log("details err:",e)})).catch((function(e){console.log("details err:",e)}))},formatCol:function(e,t,a){var n=e[t];return"created_at"===t?n=s()(n).format("YYYY-MM-DD"):"status"===t&&(n=0==n?"处理中":"处理完成"),n}},mounted:function(){var e=this,t="/web/common/uploadCtl/getOssConfig";Object(r["a"])(t,null).then((function(t){if(200==t.status){var a=t.data;e.d["key"]="key",e.d["Bucket"]=a.Bucket,e.d["OSSAccessKeyId"]=a.OSSAccessKeyId,e.d["Signature"]=a.Signature,e.d["policy"]=a.policy,e.d["success_action_status"]=a.success_action_status,e.action=a.url}else console.log("cofig fetch failuer")}))},watch:{}}),u=d,f=(a("c09f"),a("2877")),m=Object(f["a"])(u,n,o,!1,null,"61d8a464",null);t["default"]=m.exports},c09f:function(e,t,a){"use strict";var n=a("3c5b"),o=a.n(n);o.a}}]);