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