(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-335c3fd6"],{"0e5c":function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var a=i("a34a"),r=i.n(a),n=i("8237"),s=i.n(n),o=i("91b6");function c(t,e,i,a,r,n,s){try{var o=t[n](s),c=o.value}catch(u){return void i(u)}o.done?e(c):Promise.resolve(c).then(a,r)}function u(t){return function(){var e=this,i=arguments;return new Promise((function(a,r){var n=t.apply(e,i);function s(t){c(n,a,r,s,o,"next",t)}function o(t){c(n,a,r,s,o,"throw",t)}s(void 0)}))}}var l=function(t){t.randoms;var e=t.file,i=t.pieceSize,a=void 0===i?2:i,n=t.pid,c=(t.progress,t.success),l=t.error,d=t.uploading;if(e){var h="",f=1024*a*1024,p=Math.ceil(e.size/f),m=function(){var t=new FileReader;t.readAsBinaryString(e),t.addEventListener("load",(function(t){var e=t.target.result;h=s()(e),v()}))},g=function(t,e,i){var a=e*i,r=Math.min(t.size,a+i),n=t.slice(a,r);return{start:a,end:r,chunk:n}},v=function(){var t=u(r.a.mark((function t(){var i,a,n;return r.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=0;case 1:if(!(i
>2]|=t[n]<>6,c[r++]=128|63&a):a<55296||a>=57344?(c[r++]=224|a>>12,c[r++]=128|a>>6&63,c[r++]=128|63&a):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++n)),c[r++]=240|a>>18,c[r++]=128|a>>12&63,c[r++]=128|a>>6&63,c[r++]=128|63&a);else for(r=this.start;n>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(o[r>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=64?(this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,i,a,r,n,s=this.blocks;this.first?(t=s[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,a=(-1732584194^2004318071&t)+s[1]-117830708,a=(a<<12|a>>>20)+t<<0,i=(-271733879^a&(-271733879^t))+s[2]-1126478375,i=(i<<17|i>>>15)+a<<0,e=(t^i&(a^t))+s[3]-1316259209,e=(e<<22|e>>>10)+i<<0):(t=this.h0,e=this.h1,i=this.h2,a=this.h3,t+=(a^e&(i^a))+s[0]-680876936,t=(t<<7|t>>>25)+e<<0,a+=(i^t&(e^i))+s[1]-389564586,a=(a<<12|a>>>20)+t<<0,i+=(e^a&(t^e))+s[2]+606105819,i=(i<<17|i>>>15)+a<<0,e+=(t^i&(a^t))+s[3]-1044525330,e=(e<<22|e>>>10)+i<<0),t+=(a^e&(i^a))+s[4]-176418897,t=(t<<7|t>>>25)+e<<0,a+=(i^t&(e^i))+s[5]+1200080426,a=(a<<12|a>>>20)+t<<0,i+=(e^a&(t^e))+s[6]-1473231341,i=(i<<17|i>>>15)+a<<0,e+=(t^i&(a^t))+s[7]-45705983,e=(e<<22|e>>>10)+i<<0,t+=(a^e&(i^a))+s[8]+1770035416,t=(t<<7|t>>>25)+e<<0,a+=(i^t&(e^i))+s[9]-1958414417,a=(a<<12|a>>>20)+t<<0,i+=(e^a&(t^e))+s[10]-42063,i=(i<<17|i>>>15)+a<<0,e+=(t^i&(a^t))+s[11]-1990404162,e=(e<<22|e>>>10)+i<<0,t+=(a^e&(i^a))+s[12]+1804603682,t=(t<<7|t>>>25)+e<<0,a+=(i^t&(e^i))+s[13]-40341101,a=(a<<12|a>>>20)+t<<0,i+=(e^a&(t^e))+s[14]-1502002290,i=(i<<17|i>>>15)+a<<0,e+=(t^i&(a^t))+s[15]+1236535329,e=(e<<22|e>>>10)+i<<0,t+=(i^a&(e^i))+s[1]-165796510,t=(t<<5|t>>>27)+e<<0,a+=(e^i&(t^e))+s[6]-1069501632,a=(a<<9|a>>>23)+t<<0,i+=(t^e&(a^t))+s[11]+643717713,i=(i<<14|i>>>18)+a<<0,e+=(a^t&(i^a))+s[0]-373897302,e=(e<<20|e>>>12)+i<<0,t+=(i^a&(e^i))+s[5]-701558691,t=(t<<5|t>>>27)+e<<0,a+=(e^i&(t^e))+s[10]+38016083,a=(a<<9|a>>>23)+t<<0,i+=(t^e&(a^t))+s[15]-660478335,i=(i<<14|i>>>18)+a<<0,e+=(a^t&(i^a))+s[4]-405537848,e=(e<<20|e>>>12)+i<<0,t+=(i^a&(e^i))+s[9]+568446438,t=(t<<5|t>>>27)+e<<0,a+=(e^i&(t^e))+s[14]-1019803690,a=(a<<9|a>>>23)+t<<0,i+=(t^e&(a^t))+s[3]-187363961,i=(i<<14|i>>>18)+a<<0,e+=(a^t&(i^a))+s[8]+1163531501,e=(e<<20|e>>>12)+i<<0,t+=(i^a&(e^i))+s[13]-1444681467,t=(t<<5|t>>>27)+e<<0,a+=(e^i&(t^e))+s[2]-51403784,a=(a<<9|a>>>23)+t<<0,i+=(t^e&(a^t))+s[7]+1735328473,i=(i<<14|i>>>18)+a<<0,e+=(a^t&(i^a))+s[12]-1926607734,e=(e<<20|e>>>12)+i<<0,r=e^i,t+=(r^a)+s[5]-378558,t=(t<<4|t>>>28)+e<<0,a+=(r^t)+s[8]-2022574463,a=(a<<11|a>>>21)+t<<0,n=a^t,i+=(n^e)+s[11]+1839030562,i=(i<<16|i>>>16)+a<<0,e+=(n^i)+s[14]-35309556,e=(e<<23|e>>>9)+i<<0,r=e^i,t+=(r^a)+s[1]-1530992060,t=(t<<4|t>>>28)+e<<0,a+=(r^t)+s[4]+1272893353,a=(a<<11|a>>>21)+t<<0,n=a^t,i+=(n^e)+s[7]-155497632,i=(i<<16|i>>>16)+a<<0,e+=(n^i)+s[10]-1094730640,e=(e<<23|e>>>9)+i<<0,r=e^i,t+=(r^a)+s[13]+681279174,t=(t<<4|t>>>28)+e<<0,a+=(r^t)+s[0]-358537222,a=(a<<11|a>>>21)+t<<0,n=a^t,i+=(n^e)+s[3]-722521979,i=(i<<16|i>>>16)+a<<0,e+=(n^i)+s[6]+76029189,e=(e<<23|e>>>9)+i<<0,r=e^i,t+=(r^a)+s[9]-640364487,t=(t<<4|t>>>28)+e<<0,a+=(r^t)+s[12]-421815835,a=(a<<11|a>>>21)+t<<0,n=a^t,i+=(n^e)+s[15]+530742520,i=(i<<16|i>>>16)+a<<0,e+=(n^i)+s[2]-995338651,e=(e<<23|e>>>9)+i<<0,t+=(i^(e|~a))+s[0]-198630844,t=(t<<6|t>>>26)+e<<0,a+=(e^(t|~i))+s[7]+1126891415,a=(a<<10|a>>>22)+t<<0,i+=(t^(a|~e))+s[14]-1416354905,i=(i<<15|i>>>17)+a<<0,e+=(a^(i|~t))+s[5]-57434055,e=(e<<21|e>>>11)+i<<0,t+=(i^(e|~a))+s[12]+1700485571,t=(t<<6|t>>>26)+e<<0,a+=(e^(t|~i))+s[3]-1894986606,a=(a<<10|a>>>22)+t<<0,i+=(t^(a|~e))+s[10]-1051523,i=(i<<15|i>>>17)+a<<0,e+=(a^(i|~t))+s[1]-2054922799,e=(e<<21|e>>>11)+i<<0,t+=(i^(e|~a))+s[8]+1873313359,t=(t<<6|t>>>26)+e<<0,a+=(e^(t|~i))+s[15]-30611744,a=(a<<10|a>>>22)+t<<0,i+=(t^(a|~e))+s[6]-1560198380,i=(i<<15|i>>>17)+a<<0,e+=(a^(i|~t))+s[13]+1309151649,e=(e<<21|e>>>11)+i<<0,t+=(i^(e|~a))+s[4]-145523070,t=(t<<6|t>>>26)+e<<0,a+=(e^(t|~i))+s[11]-1120210379,a=(a<<10|a>>>22)+t<<0,i+=(t^(a|~e))+s[2]+718787259,i=(i<<15|i>>>17)+a<<0,e+=(a^(i|~t))+s[9]-343485551,e=(e<<21|e>>>11)+i<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=i-1732584194<<0,this.h3=a+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+i<<0,this.h3=this.h3+a<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,a=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,a=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255,255&a,a>>8&255,a>>16&255,a>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,i,a="",r=this.array(),n=0;n<15;)t=r[n++],e=r[n++],i=r[n++],a+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|i>>>6)]+BASE64_ENCODE_CHAR[63&i];return t=r[n],a+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"==",a};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__("f28c"),__webpack_require__("c8ba"))},a23a:function(t,e,i){"use strict";var a=i("d7fc"),r=i.n(a);r.a},b0e7:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"Modal"},[i("Row",[i("Col",{attrs:{span:"24"}},[i("Tabs",{on:{"on-click":t.onhangeTab},model:{value:t.uploadName.file_type,callback:function(e){t.$set(t.uploadName,"file_type",e)},expression:"uploadName.file_type"}},t._l(t.headTab,(function(t,e){return i("TabPane",{key:e,attrs:{label:t.title,name:t.name}})})),1)],1)],1),i("Row",{staticClass:"colLeft"},[i("Col",{staticClass:"colLeft left",attrs:{xl:6,lg:6,md:6,sm:6,xs:24}},[i("div",{staticClass:"Nav"},[i("div",{staticClass:"input"},[i("Input",{staticStyle:{width:"90%"},attrs:{search:"","enter-button":"",placeholder:"请输入分类名称"},on:{"on-search":t.changePage},model:{value:t.uploadName.name,callback:function(e){t.$set(t.uploadName,"name",e)},expression:"uploadName.name"}})],1),i("div",{staticClass:"trees-coadd"},[i("div",{staticClass:"scollhide"},[i("div",{staticClass:"trees"},[i("Tree",{ref:"tree",staticClass:"treeBox",attrs:{data:t.treeData,render:t.renderContent,"load-data":t.loadData}}),t.searchClass&&t.treeData.length<=1?i("div",{staticClass:"searchNo"},[t._v("此分类暂无数据")]):t._e()],1)])])])]),i("Col",{staticClass:"colLeft right",attrs:{xl:18,lg:18,md:18,sm:18,xs:24}},[i("div",{staticClass:"conter"},[i("div",{staticClass:"bnt acea-row row-middle"},[i("Col",{attrs:{span:"24"}},[0!==t.isShow?i("Button",{staticClass:"mr10",staticStyle:{width:"100px"},attrs:{type:"primary",disabled:0===t.checkPicList.length},on:{click:t.checkPics}},[t._v(t._s(1==t.uploadName.file_type?"使用选中图片":"使用选中视频"))]):t._e(),1==t.uploadName.file_type?i("Button",{attrs:{type:"primary"},on:{click:t.openUpload}},[t._v("上传图片")]):i("Button",{staticClass:"mr10",on:{click:t.uploadVideo}},[t._v("上传视频")]),i("Button",{staticClass:"mr10",attrs:{type:"error",disabled:0===t.checkPicList.length},on:{click:function(e){return e.stopPropagation(),t.editPicList("图片")}}},[t._v(t._s(1==t.uploadName.file_type?"删除图片":"删除视频"))]),i("i-select",{staticClass:"treeSel",staticStyle:{width:"250px"},attrs:{value:t.pids,placeholder:1==t.uploadName.file_type?"图片移动至":"视频移动至"}},[t._l(t.list,(function(e,a){return i("i-option",{key:a,staticStyle:{display:"none"},attrs:{value:e.value}},[t._v("\n "+t._s(e.title)+"\n ")])})),i("Tree",{ref:"reference",staticClass:"treeBox",attrs:{data:t.treeData2,render:t.renderContentSel,"load-data":t.loadData}})],2)],1)],1),i("div",{staticClass:"pictrueList acea-row"},[i("Row",{staticClass:"conter",attrs:{gutter:24}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowPic,expression:"isShowPic"}],staticClass:"imagesNo"},[i("Icon",{attrs:{type:"ios-images",size:"60",color:"#dbdbdb"}}),i("span",{staticClass:"imagesNo_sp"},[t._v(t._s(1==t.uploadName.file_type?"图片库为空":"视频库为空"))])],1),i("div",{staticClass:"acea-row mb10"},t._l(t.pictrueList,(function(e,a){return i("div",{key:a,staticClass:"pictrueList_pic mr10 mb10",on:{mouseenter:function(i){return t.enterMouse(e)},mouseleave:function(i){return t.enterMouse(e)}}},[e.num>0?i("p",{staticClass:"number"},[i("Badge",{attrs:{count:e.num,type:"error",offset:[11,12]}},[i("a",{staticClass:"demo-badge",attrs:{href:"#"}})])],1):t._e(),i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.satt_dir,expression:"item.satt_dir"}],class:e.isSelect?"on":"",on:{click:function(i){return i.stopPropagation(),t.changImage(e,a,t.pictrueList)}}}),i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between"},on:{mouseenter:function(i){return t.enterLeave(e)},mouseleave:function(i){return t.enterLeave(e)}}},[e.isEdit?i("Input",{staticStyle:{width:"80%"},attrs:{size:"small",type:"text"},on:{"on-blur":function(i){return t.bindTxt(e)}},model:{value:e.real_name,callback:function(i){t.$set(e,"real_name",i)},expression:"item.real_name"}}):i("p",[t._v("\n "+t._s(e.editName)+"\n ")]),e.isShowEdit?i("span",{staticClass:"iconfont iconbianji1",on:{click:function(t){e.isEdit=!e.isEdit}}}):t._e()],1),i("div",{directives:[{name:"show",rawName:"v-show",value:e.realName&&e.real_name,expression:"item.realName && item.real_name"}],staticClass:"nameStyle"},[t._v("\n "+t._s(e.real_name)+"\n ")])])})),0)])],1),i("div",{staticClass:"footer acea-row row-right"},[i("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"",current:t.fileData.page,"page-size":t.fileData.limit},on:{"on-change":t.pageChange}})],1)])])],1),i("Modal",{attrs:{width:"1024px",scrollable:"","footer-hide":"",closable:"",title:"上传视频","mask-closable":!1,"z-index":9},model:{value:t.modalVideo,callback:function(e){t.modalVideo=e},expression:"modalVideo"}},[i("uploadVideo",{attrs:{pid:t.fileData.pid},on:{getVideo:t.getvideo}})],1),i("uploadImg",{attrs:{"category-list":t.treeData,"category-id":t.treeId},on:{uploadSuccess:t.uploadSuccess},model:{value:t.uploadVisible,callback:function(e){t.uploadVisible=e},expression:"uploadVisible"}})],1)},r=[],n=i("a34a"),s=i.n(n),o=i("b6bd");function c(t){return Object(o["a"])({url:"file/category",method:"get",params:t})}function u(t){return Object(o["a"])({url:"file/category/create",method:"get",params:t})}function l(t,e){return Object(o["a"])({url:"file/category/".concat(t,"/edit"),method:"get",params:e})}function d(t){return Object(o["a"])({url:"file/file",method:"get",params:t})}function h(t){return Object(o["a"])({url:"file/file/do_move",method:"put",data:t})}function f(t){return Object(o["a"])({url:"file/file/delete",method:"post",data:t})}function p(t,e){return Object(o["a"])({url:"file/file/update/"+t,method:"put",data:e})}var m=i("d708"),g=i("c276"),v=i("7774"),_=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Modal",{attrs:{value:t.visible,title:"上传图片",width:"960","class-name":"upload-img-modal"},on:{"on-cancel":t.cancelModal,"on-visible-change":t.visibleChange}},[t.spinShow?i("Spin",{attrs:{size:"large",fix:""}}):t._e(),i("Form",{attrs:{model:t.formData,"label-width":100}},[i("FormItem",{attrs:{label:"上传方式:"}},[i("RadioGroup",{on:{"on-change":t.typeChange},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},[i("Radio",{attrs:{label:0}},[t._v("本地上传")]),i("Radio",{attrs:{label:1}},[t._v("网络图片")]),i("Radio",{attrs:{label:2}},[t._v("扫码上传")])],1)],1),i("FormItem",{attrs:{label:"上传至分组:"}},[i("Cascader",{staticStyle:{width:"426px"},attrs:{data:t.cascaderData,"load-data":t.loadData,"change-on-select":""},on:{"on-change":t.regionChange},model:{value:t.formData.region,callback:function(e){t.$set(t.formData,"region",e)},expression:"formData.region"}})],1),t.formData.type?t._e():i("FormItem",{attrs:{label:"上传图片:"}},[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"picture-list"},[t._l(t.previewImgList,(function(e,a){return i("div",{key:e.url,staticClass:"item"},[i("img",{staticClass:"image",attrs:{src:e.url},on:{dragstart:function(e){return t.dragstart(a)},dragenter:function(e){return t.dragenter(a,e)}}}),i("Icon",{attrs:{type:"ios-close-circle",size:"16",color:"#999999"},on:{click:function(e){return t.handleRemove(a)}}})],1)})),i("Upload",{ref:"upload",staticClass:"item",attrs:{action:"",multiple:"",accept:"image/png,image/jpeg",format:["jpeg","png"],"show-upload-list":!1,"before-upload":t.beforeUpload}},[i("Icon",{attrs:{type:"ios-add",size:"62",color:"#CCCCCC"}})],1)],2),i("div",{staticClass:"tips"},[t._v("\n 建议上传图片最大宽度750px,不超过"+t._s(t.maxFileSize/1024/1024)+"MB;仅支持jpeg、png格式,可拖拽调整上传顺序\n ")])]),1===t.formData.type?i("FormItem",{attrs:{label:"网络图片:"}},[i("div",{staticClass:"input-wrapper"},[i("Input",{staticStyle:{width:"426px"},attrs:{placeholder:"请网络图片地址"},model:{value:t.imgLink,callback:function(e){t.imgLink=e},expression:"imgLink"}}),i("Button",{attrs:{type:"text"},on:{click:t.pullImage}},[t._v("提取照片")])],1),t.formData.imgList.length?i("div",{staticClass:"picture-list"},t._l(t.formData.imgList,(function(e,a){return i("div",{key:e.url,staticClass:"item"},[i("img",{staticClass:"image",attrs:{src:e.url},on:{dragstart:function(e){return t.dragstart(a)},dragenter:function(e){return t.dragenter(a,e)}}}),i("Icon",{attrs:{type:"ios-close-circle",size:"16",color:"#999999"},on:{click:function(e){return t.handleRemove(a)}}})],1)})),0):t._e(),t.formData.imgList.length>1?i("div",{staticClass:"tips"},[t._v("\n 鼠标拖拽图片可调整图层顺序\n ")]):t._e()]):t._e(),2===t.formData.type?i("FormItem",{attrs:{label:"二维码:"}},[i("div",{staticClass:"scan-code-upload"},[i("div",{staticClass:"qrcode-wrapper"},[i("div",{ref:"qrcode",staticClass:"qrcode"}),i("div",{staticClass:"tips large"},[t._v("扫描二维码,快速上传手机图片")]),i("div",{staticClass:"tips"},[t._v("建议使用手机浏览器")])]),i("div",{staticClass:"picture-wrapper"},[i("Button",{on:{click:t.scanQRCodeImageList}},[t._v("刷新图库")]),i("div",{staticClass:"tips"},[t._v("刷新图库按钮,可显示移动端上传成功的图片")]),i("div",{staticClass:"picture-list"},t._l(t.formData.imgList,(function(e,a){return i("div",{key:e.att_id,staticClass:"item"},[i("img",{staticClass:"image",attrs:{src:e.att_dir,alt:""}}),i("Icon",{attrs:{type:"ios-close-circle",size:"16",color:"#999999"},on:{click:function(i){return t.handleRemove(e.att_id)}}})],1)})),0)],1)])]):t._e()],1),i("div",{staticClass:"modal-footer",attrs:{slot:"footer"},slot:"footer"},[i("Button",{on:{click:t.cancelModal}},[t._v("取消")]),i("Button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确认")])],1)],1)},y=[],b=i("91b6"),k=i("d044"),C=i.n(k);function w(t){return new Promise((function(e,i){var a=new FileReader;a.readAsDataURL(t),a.onload=function(){var i=new Image;i.src=a.result,i.onload=function(){var a=i.width,r=i.height,n=document.createElement("canvas");n.width=a,n.height=r;var s=n.getContext("2d");s.fillStyle="#fff",s.fillRect(0,0,n.width,n.height),s.drawImage(i,0,0,a,r);var o=n.toDataURL("image/jpeg",.8),c=S(o,t.name);e(c)}}}))}function S(t,e){var i=t.split(","),a=i[0].match(/:(.*?);/)[1],r=atob(i[1]),n=r.length,s=new Uint8Array(n);while(n--)s[n]=r.charCodeAt(n);return new File([s],e,{type:a})}function L(t,e,i,a,r,n,s){try{var o=t[n](s),c=o.value}catch(u){return void i(u)}o.done?e(c):Promise.resolve(c).then(a,r)}function R(t){return function(){var e=this,i=arguments;return new Promise((function(a,r){var n=t.apply(e,i);function s(t){L(n,a,r,s,o,"next",t)}function o(t){L(n,a,r,s,o,"throw",t)}s(void 0)}))}}var A={model:{prop:"visible",event:"cancel"},props:{visible:{type:Boolean,default:!1},categoryList:{type:Array,default:function(){return[]}},categoryId:{type:Number,default:0}},data:function(){return{formData:{type:0,region:[],imgList:[]},imgLink:"",spinShow:!1,categoryData:[],maxFileSize:0}},computed:{cascaderData:function(){return this.mapCategoryList(this.categoryData)},previewImgList:function(){return this.formData.imgList.map((function(t){return{url:URL.createObjectURL(t)}}))},selectedCategoryId:function(){return this.formData.region[this.formData.region.length-1]||0}},watch:{categoryList:function(t){this.categoryData=t,this.findCategoryId(t)},categoryId:{handler:function(){this.findCategoryId(this.categoryList)},immediate:!0}},methods:{visibleChange:function(t){var e=this;t?(this.findCategoryId(this.categoryList),Object(b["a"])().then((function(t){e.formData.type=t.data.is_way,e.maxFileSize=t.data.upload_file_size_max}))):(this.formData.imgList=[],this.imgLink="",Object(b["f"])(this.formData.type))},findCategoryId:function(t){var e=this,i=[],a=this.categoryId||"",r=t.find((function(t){return t.id===a||!!t.children&&e.findCategoryId(t.children)}));r&&(r.pid&&i.push(r.pid),i.push(r.id),this.formData.region=i)},mapCategoryList:function(t){var e=this;return t.map((function(t){return t.value=t.id,t.label=t.title,t.children&&(t.children=e.mapCategoryList(t.children)),t}))},loadData:function(t,e){var i=this;t.loading=!0,c({pid:t.id,file_type:1}).then((function(a){t.children=a.data.list,t.loading=!1,i.$nextTick(e)}))},typeChange:function(t){this.formData.imgList=[],this.imgLink="",this.timer&&(clearTimeout(this.timer),this.timer=null),2===t?this.scanQRCodeText():this.qrcode&&(this.qrcode=null,Object(b["c"])())},regionChange:function(){2===this.formData.type&&this.scanQRCodeText()},cancelModal:function(){this.formData.imgList=[],this.imgLink="",this.timer&&(clearTimeout(this.timer),this.timer=null),Object(b["c"])(),this.$emit("cancel",!1)},dragstart:function(t){this.dragIndex=t},dragenter:function(t,e){if(e.preventDefault(),t!==this.dragIndex){var i=this.formData.imgList[this.dragIndex];this.formData.imgList.splice(this.dragIndex,1),this.formData.imgList.splice(t,0,i),this.dragIndex=t}},beforeUpload:function(){var t=R(s.a.mark((function t(e){return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.size>=this.maxFileSize)){t.next=4;break}return t.next=3,w(e);case 3:e=t.sent;case 4:return this.formData.imgList.push(e),t.abrupt("return",!1);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleRemove:function(t){var e=this;2===this.formData.type?f({ids:t}).then((function(){e.scanQRCodeImageList()})):this.formData.imgList.splice(t,1)},scanQRCodeImageList:function(){var t=this;this.timer&&(clearTimeout(this.timer),this.timer=null),Object(b["d"])(this.token).then((function(e){t.formData.imgList=e.data,t.timer=setTimeout(t.scanQRCodeImageList,2e3)}))},uploadFile:function(t){var e=this;return new Promise((function(i){var a=new FormData;a.append("file",t),a.append("pid",e.selectedCategoryId),Object(b["h"])(a).then(i)}))},scanQRCodeText:function(){var t=this;Object(b["e"])({pid:this.selectedCategoryId}).then((function(e){t.createQRCode(e.data.url)}))},createQRCode:function(t){this.qrcode?this.qrcode.makeCode(t):this.qrcode=new C.a(this.$refs.qrcode,{text:t,width:160,height:160,colorDark:"#000000",colorLight:"#ffffff",correctLevel:C.a.CorrectLevel.H}),this.token=t.split("token=")[1],this.scanQRCodeImageList()},uploadOnlineFile:function(){var t=this;this.spinShow=!0,Object(b["i"])({pid:this.selectedCategoryId,images:this.formData.imgList.map((function(t){return t.url}))}).then((function(){t.spinShow=!1,t.$Message.success("上传成功"),t.$emit("uploadSuccess")})).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},submitForm:function(){switch(this.formData.type){case 1:this.uploadOnlineFile();break;case 2:this.moveApi();break;default:this.batchUpload();break}},batchUpload:function(){var t=R(s.a.mark((function t(){var e;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.spinShow=!0,e=0;case 2:if(!(e4)return!1;var i=["image/png","image/jpg","image/jpeg","image/gif"],a=-1!==i.indexOf(t.type);if(!a)return this.$Message.warning({content:"文件 "+t.name+" 格式不正确, 请选择格式正确的图片",duration:5}),!1;console.log(t.size,"文件大小");var r=localStorage.getItem("file_size_max"),n=t.size1)return this.$Message.warning("最多只能选一张图片");this.$emit("getPic",this.checkPicList[0])}else{var t=this.$route.query.maxLength;if(void 0!=t&&this.checkPicList.length>Number(t))return this.$Message.warning("最多只能选"+t+"张图片");this.$emit("getPicD",this.checkPicList),console.log(this.checkPicList)}},editName:function(t){var e=t.real_name.split("."),i=void 0==e[1]?[]:e[1];e[0].length,i.length;t.editName=t.real_name},bindTxt:function(t){var e=this;""==t.real_name&&this.$Message.error("请填写内容"),p(t.att_id,{real_name:t.real_name}).then((function(i){e.editName(t),t.isEdit=!1,e.$Message.success(i.msg)})).catch((function(t){e.$Message.error(t.msg)}))},openUpload:function(){this.uploadVisible=!0},uploadSuccess:function(){this.uploadVisible=!1,this.fileData.page=1,this.getFileList()}}},P=B,$=(i("ec7c"),Object(O["a"])(P,a,r,!1,null,"9b2e9962",null));e["a"]=$.exports},b9c8:function(t,e,i){},c4c8:function(t,e,i){"use strict";i.d(e,"x",(function(){return r})),i.d(e,"u",(function(){return n})),i.d(e,"t",(function(){return s})),i.d(e,"B",(function(){return o})),i.d(e,"y",(function(){return c})),i.d(e,"H",(function(){return u})),i.d(e,"I",(function(){return l})),i.d(e,"l",(function(){return d})),i.d(e,"z",(function(){return h})),i.d(e,"w",(function(){return f})),i.d(e,"f",(function(){return p})),i.d(e,"h",(function(){return m})),i.d(e,"g",(function(){return g})),i.d(e,"q",(function(){return v})),i.d(e,"s",(function(){return _})),i.d(e,"r",(function(){return y})),i.d(e,"o",(function(){return b})),i.d(e,"e",(function(){return k})),i.d(e,"d",(function(){return C})),i.d(e,"p",(function(){return w})),i.d(e,"k",(function(){return S})),i.d(e,"C",(function(){return L})),i.d(e,"K",(function(){return R})),i.d(e,"i",(function(){return A})),i.d(e,"v",(function(){return E})),i.d(e,"j",(function(){return O})),i.d(e,"G",(function(){return D})),i.d(e,"E",(function(){return x})),i.d(e,"F",(function(){return I})),i.d(e,"c",(function(){return M})),i.d(e,"m",(function(){return H})),i.d(e,"n",(function(){return F})),i.d(e,"L",(function(){return j})),i.d(e,"a",(function(){return N})),i.d(e,"J",(function(){return B})),i.d(e,"A",(function(){return P})),i.d(e,"D",(function(){return $})),i.d(e,"b",(function(){return T}));var a=i("b6bd");function r(t){return Object(a["a"])({url:"product/product",method:"get",params:t})}function n(t){return Object(a["a"])({url:"product/product/".concat(t),method:"get"})}function s(t){return Object(a["a"])({url:"product/type_header",method:"get",params:t})}function o(){return Object(a["a"])({url:"product/product_label",method:"get"})}function c(t){return Object(a["a"])({url:"product/reply",method:"get",params:t})}function u(t,e){return Object(a["a"])({url:"product/reply/set_reply/".concat(e),method:"PUT",data:t})}function l(t,e){return Object(a["a"])({url:"product/product/set_show/".concat(t,"/").concat(e),method:"PUT"})}function d(t){return Object(a["a"])({url:"product/product/attrs/".concat(t),method:"get"})}function h(t,e){return Object(a["a"])({url:"product/product/saveStocks/".concat(e),method:"PUT",data:t})}function f(t){return Object(a["a"])({url:"/product/product/list",method:"get",params:t})}function p(t){return Object(a["a"])({url:"product/category/cascader_list/".concat(t),method:"get"})}function m(t){return Object(a["a"])({url:"product/product/".concat(t.id),method:"POST",data:t})}function g(t,e,i){return Object(a["a"])({url:"product/generate_attr/".concat(e,"/").concat(i),method:"POST",data:t})}function v(){return Object(a["a"])({url:"product/product/get_rule",method:"get"})}function _(){return Object(a["a"])({url:"product/product/get_template",method:"get"})}function y(t){return Object(a["a"])({url:"product/product/get_temp_keys",method:"get",params:t})}function b(){return Object(a["a"])({url:"product/cache",method:"get"})}function k(){return Object(a["a"])({url:"product/cache",method:"delete"})}function C(){return Object(a["a"])({url:"product/brand/cascader_list/2",method:"get"})}function w(){return Object(a["a"])({url:"product/category/create",method:"get"})}function S(t){return Object(a["a"])({url:"product/get_all_unit",method:"get"})}function L(t){return Object(a["a"])({url:"product/unit/create",method:"get"})}function R(){return Object(a["a"])({url:"file/upload_type",method:"get"})}function A(){return Object(a["a"])({url:"product/all_ensure",method:"get"})}function E(){return Object(a["a"])({url:"product/label/form",method:"get"})}function O(){return Object(a["a"])({url:"product/all_specs",method:"get"})}function D(t){return Object(a["a"])({url:"product/product/rule",method:"GET",params:t})}function x(t,e){return Object(a["a"])({url:"product/product/rule/".concat(e),method:"POST",data:t})}function I(t){return Object(a["a"])({url:"product/product/rule/".concat(t),method:"get"})}function M(){return Object(a["a"])({url:"product/brand/cascader_list",method:"get"})}function H(t){return Object(a["a"])({url:"product/brand",method:"POST",data:t})}function F(t,e){return Object(a["a"])({url:"product/brand/".concat(t),method:"put",data:e})}function j(t){return Object(a["a"])({url:"file/video_attachment",method:"post",data:t})}function N(){return Object(a["a"])({url:"system/form/all_system_form",method:"get"})}function B(t,e){return Object(a["a"])({url:"/system/form/info/".concat(t),method:"get",params:e})}function P(t){return Object(a["a"])({url:"product/product/product_show",method:"put",data:t})}function $(t){return Object(a["a"])({url:"product/product/product_unshow",method:"put",data:t})}function T(t){return Object(a["a"])({url:"product/batch_process",method:"post",data:t})}},d7fc:function(t,e,i){},e5fc:function(t,e,i){},ec7c:function(t,e,i){"use strict";var a=i("e5fc"),r=i.n(a);r.a},f2fb:function(t,e,i){"use strict";var a=i("b9c8"),r=i.n(a);r.a}}]);