(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5572b60c"],{"25f4":function(t,s,e){"use strict";e.r(s);var i,o=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("setting"),e("toolbar")],1)},n=[],a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("setting-panel",[e("ul",{staticClass:"view-setting"},[e("li",[e("div",[e("button",{staticClass:"ui-button block submit",on:{click:t.onDownload}},[t._v(t._s(t.$t("modules.custom.download")))])])]),e("li",[e("div",[e("button",{staticClass:"ui-button block submit",on:{click:t.onShowUploadBox}},[t._v(t._s(t.$t("modules.custom.upload")))])])]),e("li",[e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.title1")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.tips11")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.tips12")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.tips13")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.title2")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.tips21")))]),e("div",{staticClass:"remark"},[t._v(t._s(t.$t("modules.custom.tips22")))])])]),e("popup",{directives:[{name:"show",rawName:"v-show",value:t.showUploadBox,expression:"showUploadBox"}]},[e("div",{staticClass:"ui-message upload-box"},[e("div",{staticClass:"ui-message-header"},[e("span",[t._v(t._s(t.$t("common.upload")))]),e("span",{on:{click:function(s){t.showUploadBox=!1}}},[e("i",{staticClass:"iconfont icon_close"})])]),e("div",{staticClass:"ui-message-main"},[e("div",{staticClass:"ui-message-content"},[e("div",t._l(t.list,(function(s,i){return e("div",{key:s.id,staticClass:"file-item"},[e("div",{staticClass:"info"},[e("span",[e("i",{directives:[{name:"show",rawName:"v-show",value:s.showDelete,expression:"item.showDelete"}],staticClass:"iconfont icon_close",on:{click:function(s){return t.onFileDelete(i)}}}),t._v("\n                                    "+t._s(s.name)+"\n                                ")]),e("label",[t._v(t._s(s.state))])]),e("div",{staticClass:"progress progress-striped active"},[e("div",{staticClass:"progress-bar",style:{width:s.percent+"%"},attrs:{role:"progressbar"}})])])})),0)])]),e("div",{staticClass:"tips"},[t._v(t._s(t.tips))]),e("div",{staticClass:"ui-message-footer"},[e("div",{staticClass:"ui-button submit",attrs:{id:"custom-btn-addfile"}},[t._v(t._s(t.$t("common.uploads.add")))]),e("button",{staticClass:"ui-button submit",on:{click:t.onUpload}},[t._v(t._s(t.$t("common.uploads.start")))])])])])],1)},l=[],c=(e("7f7f"),e("fa5b")),u=e("b775"),r={name:"custom-setting",components:{Popup:c["a"]},data:function(){return{tips:"",list:[],showUploadBox:!1}},mounted:function(){var t=this;this.$nextTick((function(){return t.initUploader()}))},methods:{onShowUploadBox:function(){this.showUploadBox=!0},onDownload:function(){var t=this;this.$api.downloadTexData((function(t){location.href=t.msg}),(function(){return t.$tips({content:"模型下载失败"})}))},onUpload:function(){if(self.tips="",0==i.getFiles())return this.tips=this.$t("common.uploads.file_require");i.upload()},onFileDelete:function(t){var s=this.list[t];s&&(i.removeFile(s.id,!0),this.list.splice(t))},initUploader:function(){if(!i){var t=this;i=WebUploader.create({server:"api/scene/edit/uploadObjAndImg",duplicate:!0,pick:{id:"#custom-btn-addfile",label:""},accept:{extensions:"zip",mimeTypes:"application/zip"},multiple:!1,fileNumLimit:1,resize:!1}),i.on("uploadBeforeSend",(function(s,e,i){e.sceneNum=t.$config.projectNum,i.token=Object(u["a"])()})),i.on("fileQueued",(function(s){t.tips="",t.list.push({id:s.id,name:s.name,state:t.$t("common.uploads.wait"),percent:0,showDelete:!0})})),i.on("uploadProgress",(function(s,e){var i=t.list.filter((function(t){return t.id==s.id}));i.length&&(i[0].state=t.$t("common.uploads.uploading"),i[0].percent=100*e,i[0].showDelete=!1)})),i.on("uploadSuccess",(function(s,e){var o=t.list.filter((function(t){return t.id==s.id}));o.length&&(o[0].state=0!=e.code?t.$t("common.uploads.error"):t.$t("common.uploads.uploaded"),0!=e.code&&(t.tips=e.msg)),i.removeFile(s)})),i.on("uploadError",(function(s){var e=t.list.filter((function(t){return t.id==s.id}));e.length&&(e[0].state=t.$t("common.uploads.error"))})),i.on("uploadComplete",(function(s){var e=t.list.filter((function(t){return t.id==s.id}));e.length&&(e[0].percent=0)})),i.on("uploadFinished",(function(){i.reset()}))}}}},d=r,p=(e("e830"),e("2877")),m=Object(p["a"])(d,a,l,!1,null,"76c93530",null),v=m.exports,f=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div")},h=[],_={},b=Object(p["a"])(_,f,h,!1,null,null,null),w=b.exports,g={name:"upload-download",components:{Setting:v,Toolbar:w}},C=g,$=Object(p["a"])(C,o,n,!1,null,null,null);s["default"]=$.exports},dd2d:function(t,s,e){},e830:function(t,s,e){"use strict";var i=e("dd2d"),o=e.n(i);o.a}}]);
//# sourceMappingURL=chunk-5572b60c.a15d8839.js.map