(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e50ff42"],{"1ae5":function(e,t,a){},"5cf8":function(e,t,a){"use strict";a("1ae5")},"9eee":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("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:6,sm:8}},[a("a-form-item",{attrs:{label:"文件名称"}},[a("a-input",{attrs:{placeholder:"请输入文件名称"},model:{value:e.queryParam.fileName,callback:function(t){e.$set(e.queryParam,"fileName",t)},expression:"queryParam.fileName"}})],1)],1),a("a-col",{attrs:{md:6,sm:8}},[a("a-form-item",{attrs:{label:"文件地址"}},[a("a-input",{attrs:{placeholder:"请输入文件地址"},model:{value:e.queryParam.url,callback:function(t){e.$set(e.queryParam,"url",t)},expression:"queryParam.url"}})],1)],1),a("a-col",{attrs:{md:6,sm:8}},[a("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)])],1)],1)],1),a("div",{staticClass:"table-operator"},[a("a-upload",{attrs:{name:"file",multiple:!1,action:e.uploadAction,headers:e.tokenHeader,showUploadList:!1,beforeUpload:e.beforeUpload},on:{change:e.handleChange}},[a("a-button",[a("a-icon",{attrs:{type:"upload"}}),e._v("\n        OSS文件上传\n      ")],1)],1),a("a-upload",{attrs:{name:"file",multiple:!1,action:e.minioUploadAction,headers:e.tokenHeader,showUploadList:!1,beforeUpload:e.beforeUpload},on:{change:e.handleChange}},[a("a-button",[a("a-icon",{attrs:{type:"upload"}}),e._v("\n        MINIO文件上传\n      ")],1)],1)],1),a("div",[a("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[a("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),a("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n      "),a("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),a("a-table",{ref:"table",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"action",fn:function(t,n){return a("span",{},[a("a",{on:{click:function(t){return e.handlePreview(n)}}},[e._v("预览")]),a("a-divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(t){return e.ossDelete(n.id)}}},[e._v("删除")])],1)}}])})],1)])},i=[],o=a("b65a"),l={name:"OSSFileList",mixins:[o["a"]],data:function(){return{description:"文件列表",columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"文件名称",align:"center",dataIndex:"fileName"},{title:"文件地址",align:"center",dataIndex:"url"},{title:"操作",dataIndex:"action",align:"center",scopedSlots:{customRender:"action"}}],url:{upload:"/sys/oss/file/upload",list:"/sys/oss/file/list",delete:"/sys/oss/file/delete",minioUpload:"/sys/upload/uploadMinio"}}},computed:{uploadAction:function(){return window._CONFIG["domianURL"]+this.url.upload},minioUploadAction:function(){return window._CONFIG["domianURL"]+this.url.minioUpload}},methods:{beforeUpload:function(e){var t=e.type;if("image"===t){if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1}else if("file"===t&&t.indexOf("image")>=0)return this.$message.warning("请上传文件"),!1;return!0},handleChange:function(e){"done"===e.file.status?e.file.response.success?(this.loadData(),this.$message.success("".concat(e.file.name," 上传成功!"))):this.$message.error("".concat(e.file.response.message)):"error"===e.file.status&&this.$message.error("".concat(e.file.response.message))},ossDelete:function(e){var t=this;t.$confirm({title:"确认删除",content:"是否删除选中文件?",onOk:function(){t.handleDelete(e)}})},handlePreview:function(e){if(e&&e.url){var t=window._CONFIG["onlinePreviewDomainURL"]+"?url="+encodeURIComponent(e.url);window.open(t,"_blank")}}}},r=l,s=(a("5cf8"),a("2877")),c=Object(s["a"])(r,n,i,!1,null,"2486fdc0",null);t["default"]=c.exports}}]);