2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
import{_ as I,O as Q,r as d,d as c,V as T,o as v,c as q,e,w as a,Q as D,k as O,f as n,m as z,l as w,s as G}from"./index.75ecb6e9.js";import{l as J,c as M,a as P,b as W,d as X,e as Y}from"./cache.0bf76451.js";const Z={class:"app-container"},ee=w("span",null,"\u7F13\u5B58\u5217\u8868",-1),ae=w("span",null,"\u952E\u540D\u5217\u8868",-1),te=w("span",null,"\u7F13\u5B58\u5185\u5BB9",-1),le=Q({name:"CacheList"}),ne=Object.assign(le,{setup(oe){const{proxy:h}=G(),b=d([]),k=d([]),s=d({}),f=d(!0),_=d(!1),m=d(""),N=d(window.innerHeight-200);function V(){f.value=!0,J().then(l=>{b.value=l.data,f.value=!1})}function R(){V(),h.$modal.msgSuccess("\u5237\u65B0\u7F13\u5B58\u5217\u8868\u6210\u529F")}function S(l){M(l.cacheName).then(t=>{h.$modal.msgSuccess("\u6E05\u7406\u7F13\u5B58\u540D\u79F0["+m.value+"]\u6210\u529F"),p()})}function p(l){const t=l!==void 0?l.cacheName:m.value;t!==""&&(_.value=!0,P(t).then(r=>{k.value=r.data,_.value=!1,m.value=t}))}function B(){p(),h.$modal.msgSuccess("\u5237\u65B0\u952E\u540D\u5217\u8868\u6210\u529F")}function U(l){W(l).then(t=>{h.$modal.msgSuccess("\u6E05\u7406\u7F13\u5B58\u952E\u540D["+l+"]\u6210\u529F"),p()})}function A(l){return l.cacheName.replace(":","")}function F(l){return l.replace(m.value,"")}function H(l){X(m.value,l).then(t=>{s.value=t.data})}function L(){Y().then(l=>{h.$modal.msgSuccess("\u6E05\u7406\u5168\u90E8\u7F13\u5B58\u6210\u529F")})}return V(),(l,t)=>{const r=c("el-button"),i=c("el-table-column"),x=c("el-table"),g=c("el-card"),u=c("el-col"),y=c("el-input"),C=c("el-form-item"),$=c("el-row"),j=c("el-form"),K=T("loading");return v(),q("div",Z,[e($,{gutter:10},{default:a(()=>[e(u,{span:8},{default:a(()=>[e(g,{style:{height:"calc(100vh - 125px)"}},{header:a(()=>[ee,e(r,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:t[0]||(t[0]=o=>R())})]),default:a(()=>[D((v(),O(x,{data:n(b),height:n(N),"highlight-current-row":"",onRowClick:p,style:{width:"100%"}},{default:a(()=>[e(i,{label:"\u5E8F\u53F7",width:"60",type:"index"}),e(i,{label:"\u7F13\u5B58\u540D\u79F0",align:"center",prop:"cacheName","show-overflow-tooltip":!0,formatter:A}),e(i,{label:"\u5907\u6CE8",align:"center",prop:"remark","show-overflow-tooltip":!0}),e(i,{label:"\u64CD\u4F5C",width:"60",align:"center","class-name":"small-padding fixed-width"},{default:a(o=>[e(r,{link:"",type:"primary",icon:"Delete",onClick:E=>S(o.row)},null,8,["onClick"])]),_:1})]),_:1},8,["data","height"])),[[K,n(f)]])]),_:1})]),_:1}),e(u,{span:8},{default:a(()=>[e(g,{style:{height:"calc(100vh - 125px)"}},{header:a(()=>[ae,e(r,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:t[1]||(t[1]=o=>B())})]),default:a(()=>[D((v(),O(x,{data:n(k),height:n(N),"highlight-current-row":"",onRowClick:H,style:{width:"100%"}},{default:a(()=>[e(i,{label:"\u5E8F\u53F7",width:"60",type:"index"}),e(i,{label:"\u7F13\u5B58\u952E\u540D",align:"center","show-overflow-tooltip":!0,formatter:F}),e(i,{label:"\u64CD\u4F5C",width:"60",align:"center","class-name":"small-padding fixed-width"},{default:a(o=>[e(r,{link:"",type:"primary",icon:"Delete",onClick:E=>U(o.row)},null,8,["onClick"])]),_:1})]),_:1},8,["data","height"])),[[K,n(_)]])]),_:1})]),_:1}),e(u,{span:8},{default:a(()=>[e(g,{bordered:!1,style:{height:"calc(100vh - 125px)"}},{header:a(()=>[te,e(r,{style:{float:"right",padding:"3px 0"},link:"",type:"primary",icon:"Refresh",onClick:t[2]||(t[2]=o=>L())},{default:a(()=>[z("\u6E05\u7406\u5168\u90E8")]),_:1})]),default:a(()=>[e(j,{model:n(s)},{default:a(()=>[e($,{gutter:32},{default:a(()=>[e(u,{offset:1,span:22},{default:a(()=>[e(C,{label:"\u7F13\u5B58\u540D\u79F0:",prop:"cacheName"},{default:a(()=>[e(y,{modelValue:n(s).cacheName,"onUpdate:modelValue":t[3]||(t[3]=o=>n(s).cacheName=o),readOnly:!0},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{offset:1,span:22},{default:a(()=>[e(C,{label:"\u7F13\u5B58\u952E\u540D:",prop:"cacheKey"},{default:a(()=>[e(y,{modelValue:n(s).cacheKey,"onUpdate:modelValue":t[4]||(t[4]=o=>n(s).cacheKey=o),readOnly:!0},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{offset:1,span:22},{default:a(()=>[e(C,{label:"\u7F13\u5B58\u5185\u5BB9:",prop:"cacheValue"},{default:a(()=>[e(y,{modelValue:n(s).cacheValue,"onUpdate:modelValue":t[5]||(t[5]=o=>n(s).cacheValue=o),type:"textarea",rows:8,readOnly:!0},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})])}}}),re=I(ne,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/monitor/cache/list.vue"]]);export{re as default};
|