1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0c531809","chunk-6a1475d0","chunk-2d0a3858"],{"0310":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible,title:e.$t("oss.upload"),"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.visible=t}}},[a("el-upload",{staticClass:"text-center",attrs:{action:e.url,"file-list":e.fileList,drag:"",multiple:"","before-upload":e.beforeUploadHandle,"on-success":e.successHandle}},[a("i",{staticClass:"el-icon-upload"}),a("div",{staticClass:"el-upload__text",domProps:{innerHTML:e._s(e.$t("upload.text"))}}),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(e._s(e.$t("upload.tip",{format:"jpg、png、gif"})))])])],1)},o=[],s=(a("99af"),a("a78e")),n=a.n(s),r={data:function(){return{visible:!1,url:"",num:0,fileList:[]}},methods:{init:function(){this.visible=!0,this.url="".concat(window.SITE_CONFIG["apiURL"],"/sys/oss/upload?token=").concat(n.a.get("token")),this.num=0,this.fileList=[]},beforeUploadHandle:function(e){if("image/jpg"!==e.type&&"image/jpeg"!==e.type&&"image/png"!==e.type&&"image/gif"!==e.type)return this.$message.error(this.$t("upload.tip",{format:"jpg、png、gif"})),!1;this.num++},successHandle:function(e,t,a){var i=this;if(0!==e.code)return this.$message.error(e.msg);this.fileList=a,this.num--,0===this.num&&this.$message({message:this.$t("prompt.success"),type:"success",duration:500,onClose:function(){i.visible=!1,i.$emit("successSubmit")}})}}},l=r,u=a("2877"),c=Object(u["a"])(l,i,o,!1,null,null,null);t["default"]=c.exports},"2e45":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("div",{staticClass:"mod-oss__oss"},[a("el-form",{attrs:{inline:!0,model:e.dataForm}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.configHandle()}}},[e._v(e._s(e.$t("oss.config")))])],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.uploadHandle()}}},[e._v(e._s(e.$t("oss.upload")))])],1),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteHandle()}}},[e._v(e._s(e.$t("deleteBatch")))])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList,border:""},on:{"selection-change":e.dataListSelectionChangeHandle,"sort-change":e.dataListSortChangeHandle}},[a("el-table-column",{attrs:{type:"selection","header-align":"center",align:"center",width:"50"}}),a("el-table-column",{attrs:{prop:"url",label:e.$t("oss.url"),"header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"createDate",label:e.$t("oss.createDate"),sortable:"custom","header-align":"center",align:"center",width:"180"}}),a("el-table-column",{attrs:{label:e.$t("handle"),fixed:"right","header-align":"center",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.deleteHandle(t.row.id)}}},[e._v(e._s(e.$t("delete")))])]}}])})],1),a("el-pagination",{attrs:{"current-page":e.page,"page-sizes":[10,20,50,100],"page-size":e.limit,total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.pageSizeChangeHandle,"current-change":e.pageCurrentChangeHandle}}),e.configVisible?a("config",{ref:"config"}):e._e(),e.uploadVisible?a("upload",{ref:"upload",on:{successSubmit:e.getDataList}}):e._e()],1)])},o=[],s=a("e1a5"),n=a("e80f"),r=a("0310"),l={mixins:[s["a"]],data:function(){return{mixinViewModuleOptions:{getDataListURL:"/sys/oss/page",getDataListIsPage:!0,deleteURL:"/sys/oss",deleteIsBatch:!0},dataForm:{},configVisible:!1,uploadVisible:!1}},components:{Config:n["default"],Upload:r["default"]},methods:{configHandle:function(){var e=this;this.configVisible=!0,this.$nextTick((function(){e.$refs.
|