mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-30 05:14:50 +02:00
2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{d as e,_ as s,u as t}from"./public.js?v=1749179669910";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1749179669910";import{cs as i,N as n,c as o,m as r}from"./page_layout.js?v=1749179669910";import{aq as l,b0 as d}from"./site.js?v=1749179669910";import{_ as u}from"./index.vue_vue_type_script_setup_true_lang15.js?v=1749179669910";import{d as m,O as p,j as _,r as c,R as v,S as P,P as f,a1 as g,U as x,V as h,a2 as j}from"./vue.js?v=1749179669910";import{cp as S,cj as H}from"./naive.js?v=1749179669910";import"./common.js?v=1749179669910";import"./__commonjsHelpers__.js?v=1749179669910";const b={class:"p-20px"},w={class:"w-200px"},y=m({__name:"batch",props:{data:{}},setup(m,{expose:y}){const{t:E}=p(),$=m,{rows:q}=$.data,R=i(),M=_({version:null}),O={version:{trigger:"change",validator:()=>null!==M.version||new Error(E("Site.PHP.add_site_27"))}},U=c([]),{loading:k,setLoading:C}=e();(async()=>{try{C(!0);const{message:e}=await l();n(e)&&e.length>0?(U.value=e.map((e=>({label:e.name,value:e.version}))),M.version=e[0].version):(M.version=null,U.value=[])}finally{C(!1)}})();return y({onConfirm:async({hide:e})=>{const{message:s}=await d((()=>{const{version:e}=M;if(null===e)throw r.error(E("Site.PHP.index_67")),new Error(E("Site.PHP.index_67"));return{version:e,sites_id:q.map((e=>e.id)).join(",")}})());R.setRefresh(!0),o(s)&&(e=>{const{success:s,error:a}=e,i=[];s.forEach((e=>{const s=q.find((s=>s.name===e));s&&i.push({name:s.name,batchStatus:"success",reqMsg:E("Site.PHP.index_64")})})),Object.entries(a).forEach((([e,s])=>{const t=q.find((s=>s.name===e));t&&i.push({name:t.name,batchStatus:"error",reqMsg:s})})),t({title:E("Site.PHP.index_65"),width:440,footer:!0,component:u,data:{title:E("Site.PHP.index_66"),data:i,status:"done",columns:[{key:"name",title:E("Site.TableRow.index_1"),ellipsis:{tooltip:{width:"trigger"}}}]}})})(s),e()}}),(e,t)=>{const i=S,n=H,o=a,r=s;return v(),P("div",b,[f(o,{model:h(M),rules:O},{default:g((()=>[f(n,{label:e.$t("Site.PHP.add_site_21"),path:"version"},{default:g((()=>[x("div",w,[f(i,{value:h(M).version,"onUpdate:value":t[0]||(t[0]=e=>h(M).version=e),loading:h(k),options:h(U)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1},8,["model"]),f(r,{class:"mt-8px"},{default:g((()=>[x("li",null,j(e.$t("Site.PHP.index_61")),1),x("li",null,j(e.$t("Site.PHP.index_62")),1),x("li",null,j(e.$t("Site.PHP.index_63")),1)])),_:1})])}}});export{y as default};
|