Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-40a3dc45.65f157d6.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
4.9 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40a3dc45"],{b938:function(e,t,l){"use strict";l.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("downloadTempFile.title")))]),t("div",[t("el-button",{attrs:{type:"text"},on:{click:function(t){return e._queryDownloadTempFileMethod()}}},[e._v(" "+e._s(e.$t("downloadTempFile.refresh"))+" ")])],1)]),t("div",{staticClass:"table-container"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.downloadTempFileInfo.files,border:"",stripe:""}},[t("el-table-column",{attrs:{prop:"name",label:e.$t("downloadTempFile.name"),align:"center"}}),t("el-table-column",{attrs:{prop:"fileTypeName",label:e.$t("downloadTempFile.fileType"),align:"center"}}),t("el-table-column",{attrs:{prop:"downloadUserName",label:e.$t("downloadTempFile.downloader"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("downloadTempFile.downloadTime"),align:"center"}}),t("el-table-column",{attrs:{prop:"stateName",label:e.$t("downloadTempFile.status"),align:"center"}}),t("el-table-column",{attrs:{prop:"remark",label:e.$t("downloadTempFile.remark"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("downloadTempFile.operation"),align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(l){return["3003"===l.row.state?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._downLoadFile(l.row)}}},[e._v(" "+e._s(e.$t("downloadTempFile.download"))+" ")]):e._e(),"3003"===l.row.state||"4004"===l.row.state?t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteFileModel(l.row)}}},[e._v(" "+e._s(e.$t("downloadTempFile.delete"))+" ")]):e._e()]}}])})],1),t("div",{staticClass:"pagination-container"},[t("el-pagination",{attrs:{background:"",layout:"total, prev, pager, next",total:e.downloadTempFileInfo.total,"page-size":e.pageSize},on:{"current-change":e.handleCurrentChange}})],1)],1)])],1)],1),t("delete-download-temp-file",{ref:"deleteDialog",on:{refresh:e._listFiles}})],1)},a=[],i=l("b775");function n(e){return new Promise((t,l)=>{Object(i["a"])({url:"/userDownloadFile.listUserDownloadFile",method:"get",params:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function s(e){return new Promise((t,l)=>{Object(i["a"])({url:"/userDownloadFile.deleteUserDownloadFile",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}var r=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("deleteDownloadTempFile.confirmTitle"),visible:e.dialogVisible,width:"30%",center:""},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("deleteDownloadTempFile.confirmText")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDialog}},[e._v(" "+e._s(e.$t("deleteDownloadTempFile.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmDelete}},[e._v(" "+e._s(e.$t("deleteDownloadTempFile.confirm"))+" ")])],1)])},d=[],c=l("7323"),p={name:"DeleteDownloadTempFile",data(){return{dialogVisible:!1,currentFile:null}},methods:{open(e){this.currentFile=e,this.dialogVisible=!0},closeDialog(){this.dialogVisible=!1},async confirmDelete(){try{const e={...this.currentFile,shopId:Object(c["f"])()};await s(e),this.$message.success(this.$t("deleteDownloadTempFile.deleteSuccess")),this.$emit("refresh"),this.closeDialog()}catch(e){console.error("删除文件失败:",e),this.$message.error(this.$t("deleteDownloadTempFile.deleteFailed"))}}}},m=p,u=l("2877"),w=Object(u["a"])(m,r,d,!1,null,null,null),h=w.exports,f={name:"DownloadTempFile",components:{DeleteDownloadTempFile:h},data(){return{downloadTempFileInfo:{files:[],total:0,conditions:{fileType:"",shopId:""}},pageSize:10,currentPage:1}},created(){this.downloadTempFileInfo.conditions.shopId=Object(c["f"])(),this.downloadTempFileInfo.conditions.fileType=this.$route.query.fileType,this._listFiles(1,this.pageSize)},methods:{handleCurrentChange(e){this.currentPage=e,this._listFiles(e,this.pageSize)},async _listFiles(e,t){try{const l={...this.downloadTempFileInfo.conditions,page:e,row:t},o=await n(l);this.downloadTempFileInfo.files=o.data,this.downloadTempFileInfo.total=o.total}catch(l){console.error("获取文件列表失败:",l)}},_downLoadFile(e){e.tempUrl?window.location.href=e.downloadUrl:this.$message.error(this.$t("downloadTempFile.downloadFailed"))},_openDeleteFileModel(e){this.$refs.deleteDialog.open(e)},_queryDownloadTempFileMethod(){this._listFiles(this.currentPage,this.pageSize)}}},F=f,b=(l("eee3"),Object(u["a"])(F,o,a,!1,null,"5d84e057",null));t["default"]=b.exports},c092:function(e,t,l){},eee3:function(e,t,l){"use strict";l("c092")}}]);
//# sourceMappingURL=chunk-40a3dc45.65f157d6.js.map