2 lines
4.1 KiB
JavaScript
2 lines
4.1 KiB
JavaScript
import{l as e,c as a,a as l,b as t,d as n,e as o}from"./cache.64e28add.js";import{G as d,r as c,d as i,T as r,o as s,c as u,e as h,w as p,K as f,k as m,f as g,n as y,l as v,v as w}from"./index.e5c8b0d6.js";const _={class:"app-container"},b=v("span",null,"缓存列表",-1),k=v("span",null,"键名列表",-1),x=v("span",null,"缓存内容",-1),V=d({name:"CacheList"}),C=Object.assign(V,{setup(d){const{proxy:v}=w(),V=c([]),C=c([]),N=c({}),R=c(!0),S=c(!1),$=c(""),K=c(window.innerHeight-200);function O(){R.value=!0,e().then((e=>{V.value=e.data,R.value=!1}))}function j(e){const a=void 0!==e?e.cacheName:$.value;""!==a&&(S.value=!0,l(a).then((e=>{C.value=e.data,S.value=!1,$.value=a})))}function U(e){return e.cacheName.replace(":","")}function D(e){return e.replace($.value,"")}function G(e){n($.value,e).then((e=>{N.value=e.data}))}return O(),(e,l)=>{const n=i("el-button"),d=i("el-table-column"),c=i("el-table"),w=i("el-card"),H=i("el-col"),L=i("el-input"),T=i("el-form-item"),q=i("el-row"),z=i("el-form"),A=r("loading");return s(),u("div",_,[h(q,{gutter:10},{default:p((()=>[h(H,{span:8},{default:p((()=>[h(w,{style:{height:"calc(100vh - 125px)"}},{header:p((()=>[b,h(n,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:l[0]||(l[0]=e=>(O(),void v.$modal.msgSuccess("刷新缓存列表成功")))})])),default:p((()=>[f((s(),m(c,{data:g(V),height:g(K),"highlight-current-row":"",onRowClick:j,style:{width:"100%"}},{default:p((()=>[h(d,{label:"序号",width:"60",type:"index"}),h(d,{label:"缓存名称",align:"center",prop:"cacheName","show-overflow-tooltip":!0,formatter:U}),h(d,{label:"备注",align:"center",prop:"remark","show-overflow-tooltip":!0}),h(d,{label:"操作",width:"60",align:"center","class-name":"small-padding fixed-width"},{default:p((e=>[h(n,{link:"",type:"primary",icon:"Delete",onClick:l=>{return t=e.row,void a(t.cacheName).then((e=>{v.$modal.msgSuccess("清理缓存名称["+$.value+"]成功"),j()}));var t}},null,8,["onClick"])])),_:1})])),_:1},8,["data","height"])),[[A,g(R)]])])),_:1})])),_:1}),h(H,{span:8},{default:p((()=>[h(w,{style:{height:"calc(100vh - 125px)"}},{header:p((()=>[k,h(n,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:l[1]||(l[1]=e=>(j(),void v.$modal.msgSuccess("刷新键名列表成功")))})])),default:p((()=>[f((s(),m(c,{data:g(C),height:g(K),"highlight-current-row":"",onRowClick:G,style:{width:"100%"}},{default:p((()=>[h(d,{label:"序号",width:"60",type:"index"}),h(d,{label:"缓存键名",align:"center","show-overflow-tooltip":!0,formatter:D}),h(d,{label:"操作",width:"60",align:"center","class-name":"small-padding fixed-width"},{default:p((e=>[h(n,{link:"",type:"primary",icon:"Delete",onClick:a=>{return l=e.row,void t(l).then((e=>{v.$modal.msgSuccess("清理缓存键名["+l+"]成功"),j()}));var l}},null,8,["onClick"])])),_:1})])),_:1},8,["data","height"])),[[A,g(S)]])])),_:1})])),_:1}),h(H,{span:8},{default:p((()=>[h(w,{bordered:!1,style:{height:"calc(100vh - 125px)"}},{header:p((()=>[x,h(n,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:l[2]||(l[2]=e=>{o().then((e=>{v.$modal.msgSuccess("清理全部缓存成功")}))})},{default:p((()=>[y("清理全部")])),_:1})])),default:p((()=>[h(z,{model:g(N)},{default:p((()=>[h(q,{gutter:32},{default:p((()=>[h(H,{offset:1,span:22},{default:p((()=>[h(T,{label:"缓存名称:",prop:"cacheName"},{default:p((()=>[h(L,{modelValue:g(N).cacheName,"onUpdate:modelValue":l[3]||(l[3]=e=>g(N).cacheName=e),readOnly:!0},null,8,["modelValue"])])),_:1})])),_:1}),h(H,{offset:1,span:22},{default:p((()=>[h(T,{label:"缓存键名:",prop:"cacheKey"},{default:p((()=>[h(L,{modelValue:g(N).cacheKey,"onUpdate:modelValue":l[4]||(l[4]=e=>g(N).cacheKey=e),readOnly:!0},null,8,["modelValue"])])),_:1})])),_:1}),h(H,{offset:1,span:22},{default:p((()=>[h(T,{label:"缓存内容:",prop:"cacheValue"},{default:p((()=>[h(L,{modelValue:g(N).cacheValue,"onUpdate:modelValue":l[5]||(l[5]=e=>g(N).cacheValue=e),type:"textarea",rows:8,readOnly:!0},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})])),_:1})])),_:1})])}}});export{C as default};
|