Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-b9a3340a.0e98fcb4.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
4.7 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b9a3340a"],{1085:function(e,a,c){"use strict";c("819c")},"16c3":function(e,a,c){"use strict";c.r(a);var t=function(){var e=this,a=e._self._c;return a("div",{staticClass:"animated fadeInRight ecommerce"},[a("el-card",{},[a("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[a("div",[e._v(e._s(e.$t("cacheManage.queryConditions")))])]),a("div",{},[a("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.cacheManageInfo.conditions}},[a("el-form-item",[a("el-input",{attrs:{placeholder:e.$t("cacheManage.enterCacheCode"),clearable:""},model:{value:e.cacheManageInfo.conditions.cacheCode,callback:function(a){e.$set(e.cacheManageInfo.conditions,"cacheCode",a)},expression:"cacheManageInfo.conditions.cacheCode"}})],1),a("el-form-item",[a("el-input",{attrs:{placeholder:e.$t("cacheManage.enterCacheName"),clearable:""},model:{value:e.cacheManageInfo.conditions.name,callback:function(a){e.$set(e.cacheManageInfo.conditions,"name",a)},expression:"cacheManageInfo.conditions.name"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._queryCacheMethod}},[e._v(" "+e._s(e.$t("cacheManage.query"))+" ")]),a("el-button",{attrs:{size:"small"},on:{click:e._resetCacheMethod}},[e._v(" "+e._s(e.$t("cacheManage.reset"))+" ")])],1)],1)],1)]),a("el-card",{staticClass:"margin-top-sm"},[a("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[a("div",[e._v(e._s(e.$t("cacheManage.cacheInfo")))])]),a("div",{},[a("cache-manage-table",{attrs:{caches:e.cacheManageInfo.caches},on:{"flush-cache":e._flushCache}}),a("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:e.cacheManageInfo.total,"page-size":e.cacheManageInfo.conditions.row,"current-page":e.cacheManageInfo.conditions.page},on:{"current-change":e.handlePageChange,"size-change":e.handleSizeChange}})],1)])],1)},n=[],s=c("b775");function o(e){return new Promise((a,c)=>{Object(s["a"])({url:"/cache.listCache",method:"get",params:e}).then(e=>{const c=e.data;a(c)}).catch(e=>{c(e)})})}function i(e){return new Promise((a,c)=>{Object(s["a"])({url:"/cache.flushCache",method:"get",params:e}).then(e=>{const c=e.data;a(c)}).catch(e=>{c(e)})})}var h=function(){var e=this,a=e._self._c;return a("el-table",{staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.caches,border:""}},[a("el-table-column",{attrs:{prop:"id",label:e.$t("cacheManage.cacheId"),align:"center"}}),a("el-table-column",{attrs:{prop:"cacheCode",label:e.$t("cacheManage.cacheCode"),align:"center"}}),a("el-table-column",{attrs:{prop:"name",label:e.$t("cacheManage.name"),align:"center"}}),a("el-table-column",{attrs:{label:e.$t("cacheManage.operation"),align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:c}){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){return e.$emit("flush-cache",c)}}},[e._v(" "+e._s(e.$t("cacheManage.flushCache"))+" ")])]}}])})],1)},l=[],r={name:"CacheManageTable",props:{caches:{type:Array,default:()=>[]}}},d=r,g=(c("1085"),c("2877")),u=Object(g["a"])(d,h,l,!1,null,"946e1ac6",null),f=u.exports,m=c("7323"),M={name:"CacheManage",components:{CacheManageTable:f},data(){return{DEFAULT_PAGE:1,DEFAULT_ROWS:10,cacheManageInfo:{caches:[],total:0,records:1,conditions:{id:"",cacheCode:"",name:"",page:1,row:10,shopId:""}}}},created(){this.cacheManageInfo.conditions.shopId=Object(m["f"])(),this._listCaches(this.DEFAULT_PAGE,this.DEFAULT_ROWS)},methods:{async _listCaches(e,a){this.cacheManageInfo.conditions.page=e,this.cacheManageInfo.conditions.row=a;const c={...this.cacheManageInfo.conditions,id:this.cacheManageInfo.conditions.id.trim(),cacheCode:this.cacheManageInfo.conditions.cacheCode.trim(),name:this.cacheManageInfo.conditions.name.trim()};try{const e=await o(c);this.cacheManageInfo.total=e.total,this.cacheManageInfo.records=e.records,this.cacheManageInfo.caches=e.data}catch(t){console.error("请求失败:",t)}},_queryCacheMethod(){this._listCaches(this.DEFAULT_PAGE,this.DEFAULT_ROWS)},_resetCacheMethod(){this.cacheManageInfo.conditions.id="",this.cacheManageInfo.conditions.cacheCode="",this.cacheManageInfo.conditions.name="",this._listCaches(this.DEFAULT_PAGE,this.DEFAULT_ROWS)},async _flushCache(e){try{const a=await i({cache:e.url});0===a.code?this.$message.success(this.$t("cacheManage.flushSuccess")):this.$message.error(a.msg)}catch(a){console.error("请求失败:",a),this.$message.error(a)}},handlePageChange(e){this._listCaches(e,this.cacheManageInfo.conditions.row)},handleSizeChange(e){this._listCaches(1,e)}}},p=M,C=Object(g["a"])(p,t,n,!1,null,"47d81827",null);a["default"]=C.exports},"819c":function(e,a,c){}}]);
//# sourceMappingURL=chunk-b9a3340a.0e98fcb4.js.map