(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22b5789f"],{"19ee":function(e,t,a){"use strict";a("559d")},"559d":function(e,t,a){},"9eee":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("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)}}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"文件名称"}},[t("a-input",{attrs:{placeholder:"请输入文件名称"},model:{value:e.queryParam.fileName,callback:function(t){e.$set(e.queryParam,"fileName",t)},expression:"queryParam.fileName"}})],1)],1),t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"文件地址"}},[t("a-input",{attrs:{placeholder:"请输入文件地址"},model:{value:e.queryParam.url,callback:function(t){e.$set(e.queryParam,"url",t)},expression:"queryParam.url"}})],1)],1),t("a-col",{attrs:{md:6,sm:8}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)])],1)],1)],1),t("div",{staticClass:"table-operator"},[t("a-upload",{attrs:{name:"file",multiple:!1,action:e.uploadAction,headers:e.tokenHeader,showUploadList:!1,beforeUpload:e.beforeUpload},on:{change:e.handleChange}},[t("a-button",[t("a-icon",{attrs:{type:"upload"}}),e._v("\n OSS文件上传\n ")],1)],1),t("a-upload",{attrs:{name:"file",multiple:!1,action:e.minioUploadAction,headers:e.tokenHeader,showUploadList:!1,beforeUpload:e.beforeUpload},on:{change:e.handleChange}},[t("a-button",[t("a-icon",{attrs:{type:"upload"}}),e._v("\n MINIO文件上传\n ")],1)],1)],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("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(a,n){return t("span",{},[t("a",{on:{click:function(t){return e.handlePreview(n)}}},[e._v("预览")]),t("a-divider",{attrs:{type:"vertical"}}),t("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:"/oss/file/upload",list:"/oss/file/list",delete:"/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("19ee"),a("2877")),c=Object(s["a"])(r,n,i,!1,null,"76b88ccc",null);t["default"]=c.exports}}]);