import{aa as e,l as a,a4 as t,$ as s,ac as o,A as l,a7 as i,z as r,x as n,a2 as d}from"./utils-lib.js?v=20260328163632";import{B as c}from"./index91.js?v=20260328163632";import{j as u,D as m}from"./wsl.js?v=20260328163632";import{u as p}from"./index92.js?v=20260328163632";import{u as f,d as y,a as h}from"./index50.js?v=20260328163632";import{r as k,k as _,w as v,o as w,J as g,V as j,_ as b,a3 as x,Y as R,O as A,N}from"./base-lib.js?v=20260328163632";const{sid:O}=f(),B=k(!1),C=k([]),S=e=>e.Name,q=k({columns:[e(),{title:a("数据卷"),width:300,key:"Name"},{title:a("挂载点"),width:300,key:"Mountpoint"},{title:a("设备"),key:"Scope"},{title:a("创建时间"),key:"CreatedAt",render:e=>y(e.CreatedAt)},t([{title:a("删除"),onClick:async e=>{await r({title:a("删除数据卷【{0}】",[e.Name]),content:a("您真的要删除数据卷【{0}】吗？",[e.Name]),type:"calc"}),n({loading:a("正在删除数据卷，请稍后..."),request:u({volume_id:e.Name,sid:O.value}),message:!0,success:L})}}])],data:[]}),[z,D]=s(q),{BtOperation:E}=p({options:[{active:!0,label:a("创建数据卷"),onClick:()=>{l({title:a("创建数据卷"),area:500,showFooter:!0,component:()=>i((()=>import("./index232.js?v=20260328163632")),[],import.meta.url)})}}]}),{BtBatch:K}=o({tableRef:D,checkedRowKeys:C,options:[{label:a("删除数据卷"),value:"delete",event:h}]}),L=()=>{n({loading:B,request:m({sid:O.value}),success:e=>{q.value.data=Array.isArray(e.data)?e.data:[]}})},M=()=>{P(),L()},P=()=>{q.value.data=[]},T=_({__name:"index",setup(e,{expose:a}){const{isRefreshList:t}=f();return v((()=>t.value),(e=>{e&&(L(),t.value=!1)})),w(M),g(P),a({init:M}),(e,a)=>(j(),b(R(d),null,{"header-left":x((()=>[A(R(E),{class:"gap-10px"})])),"header-right":x((()=>[A(R(c),{onRefresh:R(L)},null,8,["onRefresh"])])),content:x((()=>[A(R(z),{"checked-row-keys":R(C),"onUpdate:checkedRowKeys":a[0]||(a[0]=e=>N(C)?C.value=e:null),"row-key":R(S),loading:R(B)},null,8,["checked-row-keys","row-key","loading"])])),"footer-left":x((()=>[A(R(K))])),"footer-right":x((()=>a[1]||(a[1]=[]))),_:1}))}}),V=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"}));export{L as g,V as i};
