Files
yakpanel-core/YakPanel/static/vite/js/index-DnORLxcM.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2026-04-07 02:04:22 +05:30
import{n as E,m as C,i as X,p as ue,c as ce,v as q,h as me,x as _e}from"./index-BTglIPU2.js?v=1773287522785";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import{_ as K}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import{O as he,P as ge,Q as ye,R as we,S as xe,T as be,U as Se,V as ve,d as Pe,k as ke,W as $e,X as We}from"./index-oaByoBTF.js?v=1773287522785";import{u as I}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{i as Re,u as N}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as H}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{_ as J}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{k as T,R as U,r as M,e as V,$ as z,Z as L,a0 as a,S as e,a9 as c,_ as v,aa as $,X as B,an as Z,j as O,l as G,v as Y,al as F,c as ee,N as D,au as Ce}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as oe,b as le,ar as Te,B as Q,a0 as ie,aX as Ue}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{_ as ze}from"./index.vue_vue_type_script_setup_true_lang-DDg6Zp8N.js?v=1773287522785";import{u as Le}from"./file-B5PwfK2h.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";const Ae={class:"p-20px"},Be={class:"w-280px"},Ne=T({__name:"index",props:{data:{}},setup(g,{expose:_}){const{t:o}=U(),f=g,{getList:r}=f.data,i=M(null),s=V({name:""}),x={name:{required:!0,message:o("Security.Conf.Index_28"),trigger:["blur","input"]}};return _({onConfirm:async({hide:n})=>{var b;await((b=i.value)==null?void 0:b.validate()),await he({...s}),r==null||r(),n()}}),(n,b)=>{const P=le,p=oe,w=se,h=J;return z(),L("div",Ae,[a(w,{ref_key:"formRef",ref:i,model:e(s),rules:x},{default:c(()=>[a(p,{label:n.$t("Site.TableRow.index_2"),path:"name"},{default:c(()=>[v("div",Be,[a(P,{type:"text",value:e(s).name,"onUpdate:value":b[0]||(b[0]=l=>e(s).name=l),placeholder:n.$t("WP.Sets.index_11")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"]),a(h,{class:"mt-4px"},{default:c(()=>[v("li",null,$(n.$t("WP.Sets.index_12")),1)]),_:1})])}}}),Ie={class:"p-20px"},Me=T({__name:"index",props:{data:{}},setup(g,{expose:_}){const{t:o}=U(),f=g,{id:r}=f.data,{keys:i,table:s,columns:x}=I([{type:"selection",width:40},{key:"name",title:o("Site.TableRow.index_2")}]),{loading:y,setLoading:n}=H();return(async()=>{try{n(!0);const{message:p}=await ge();E(p)&&(s.data=p)}finally{i.value=[],n(!1)}})(),_({onConfirm:async()=>{if(!i.value.length)return C.error(o("WP.Sets.index_18")),!1;const p=i.value.join(",");await ye({set_id:r,site_ids:p})}}),(p,w)=>{const h=K,l=J;return z(),L("div",Ie,[a(h,{"checked-row-keys":e(i),"onUpdate:checkedRowKeys":w[0]||(w[0]=t=>B(i)?i.value=t:null),"row-key":"id",loading:e(y),data:e(s).data,"max-height":220,columns:e(x)},null,8,["checked-row-keys","loading","data","columns"]),a(l,{class:"mt-16px"},{default:c(()=>[v("li",null,$(p.$t("WP.Sets.index_17")),1),v("li",null,$(p.$t("WP.Sets.index_19")),1)]),_:1})])}}}),Oe={class:"flex-1 flex flex-col gap-10px"},te="/tmp",De=T({__name:"upload-btn",props:{path:{},pathModifiers:{},name:{default:""},nameModifiers:{}},emits:["update:path","update:name"],setup(g){const _=Z(g,"path"),o=Z(g,"name"),f=M([]),{t:r}=U(),i=async({file:s})=>{const{close:x}=C.loading(r("Component.Api.index_4"));try{const y=new FormData;y.append("f_path",te),y.append("f_name",s.name),y.append("f_start","0"),s.file&&(y.append("blob",s.file),y.append("f_size",s.file.size.toString()));const{message:n}=await Le(y);X(n)&&C.succe