mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-21 02:28:10 +00:00
2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
import{d as C,r as f,R as g,e as h,f as B,g as m,B as p,u as a,Q as I,v,x as i,y as o,H as D,A as R}from"./base-04829be5.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as F}from"./index-c1ab0e3c.js";/* empty css */import{t as l}from"./index-043d021e.js";import{V,E as S,W as T}from"./sys-f9859bed.js";import{c as W,a as j}from"./storage-1a3ddb14.js";import{u as q}from"./vue-router-fee568b2.js";import{E as A}from"./index-db9b8d96.js";import{a as L,E as H}from"./index-6bd50bb5.js";import{E as O}from"./index-88566e4e.js";import{E as Q}from"./index-eb678249.js";import{v as $}from"./directive-013f0a4e.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-f0796d29.js";/* empty css */import"./attachment-9a932beb.js";import"./index-30df2c14.js";import"./index-7e933ae4.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-92283b18.js";import"./typescript-defaf979.js";import"./index-a2524300.js";import"./index-bdd39755.js";import"./index-94a82d50.js";import"./index-de053f2e.js";import"./focus-trap-be36cfe9.js";import"./index-bf8db610.js";import"./index-e9e16697.js";import"./error-78e43d3e.js";import"./index-1d455165.js";import"./index-b1557f8a.js";import"./index-9a9de0a3.js";import"./scroll-e5463626.js";import"./vnode-85ccdc7f.js";import"./event-9519ab40.js";import"./index-4edf2cad.js";import"./index.vue_vue_type_script_setup_true_lang-df8a984f.js";/* empty css */import"./index-d60f63e2.js";import"./aria-adfa05c5.js";import"./validator-6838b9a3.js";import"./index-760fce0d.js";import"./index-cbf0aee7.js";import"./index-c4af56cf.js";import"./index-ed22fe56.js";import"./debounce-f064e94e.js";import"./position-b298e95e.js";import"./index-91afef8c.js";import"./index-c3b3b83a.js";import"./index-d7f4b4bb.js";import"./isEqual-ba353d68.js";import"./_Uint8Array-99b916e9.js";import"./flatten-94587e2b.js";import"./index-1808e3f9.js";import"./index-02bf3820.js";import"./index-bf9de702.js";import"./strings-4ec3ae35.js";import"./index-b519934c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./common-111e3797.js";import"./common-2cf17469.js";import"./index-faea7bd5.js";import"./index-236cb599.js";import"./castArray-11aea762.js";import"./_initCloneObject-e5a1aa13.js";const z={class:"main-container"},G={class:"flex ml-[18px] justify-between items-center mt-[20px] mb-[5px]"},J={class:"text-[20px]"},K={class:"panel-title !text-sm"},M={class:"text-[12px] text-[#a9a9a9]"},X={class:"text-[12px] text-[#a9a9a9]"},Y={class:"panel-title !text-sm"},Z={class:"panel-title !text-sm"},ee={class:"fixed-footer-wrap"},te={class:"fixed-footer"},Dt=C({__name:"system",setup(oe){const x=q().meta.title,d=f(!0),b=f(),e=g({site_name:"",logo:"",desc:"",latitude:"",keywords:"",longitude:"",province_id:"",city_id:"",district_id:"",address:"",full_address:"",business_hours:"",phone:"",front_end_name:"",front_end_logo:"",icon:"",wechat_code:"",enterprise_wechat:"",tel:""});(async(u=0)=>{const t=await(await V()).data;Object.keys(e).forEach(s=>{t[s]!=null&&(e[s]=t[s])});const n=await(await S()).data;e.wechat_code=n.wechat_code,e.enterprise_wechat=n.enterprise_wechat,e.tel=n.tel,b.value=W(),d.value=!1})();const w=f(),y=g({site_name:[{required:!0,message:l("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:l("frontEndNamePlaceholder"),trigger:"blur"}]}),E=async u=>{d.value||!u||await u.validate(async t=>{t&&(d.value=!0,T(e).then(()=>{d.value=!1,k()}).catch(()=>{d.value=!1}))})},k=async()=>{const u=await(await V()).data;j.set({key:"siteInfo",data:u})};return(u,t)=>{const n=A,s=L,c=F,_=O,N=H,U=Q,P=$;return h(),B("div",z,[m("div",G,[m("span",J,p(a(x)),1)]),I((h(),v(N,{model:e,"label-width":"150px",ref_key:"formRef",ref:w,rules:y,class:"page-form"},{default:i(()=>[o(_,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[m("h3",K,p(a(l)("websiteInfo")),1),o(s,{label:a(l)("siteName"),prop:"site_name"},{default:i(()=>[o(n,{modelValue:e.site_name,"onUpdate:modelValue":t[0]||(t[0]=r=>e.site_name=r),placeholder:a(l)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(l)("logo")},{default:i(()=>[m("div",null,[o(c,{modelValue:e.logo,"onUpdate:modelValue":t[1]||(t[1]=r=>e.logo=r)},null,8,["modelValue"]),m("p",M,p(a(l)("logoPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(l)("icon")},{default:i(()=>[m("div",null,[o(c,{modelValue:e.icon,"onUpdate:modelValue":t[2]||(t[2]=r=>e.icon=r)},null,8,["modelValue"]),m("p",X,p(a(l)("iconPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(l)("keywords")},{default:i(()=>[o(n,{modelValue:e.keywords,"onUpdate:modelValue":t[3]||(t[3]=r=>e.keywords=r),placeholder:a(l)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(l)("desc")},{default:i(()=>[o(n,{modelValue:e.desc,"onUpdate:modelValue":t[4]||(t[4]=r=>e.desc=r),type:"textarea",rows:"4",clearable:"",placeholder:a(l)("descPlaceholder"),class:"input-width",maxlength:"100"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[m("h3",Y,p(a(l)("frontEndInfo")),1),o(s,{label:a(l)("frontEndName")},{default:i(()=>[o(n,{modelValue:e.front_end_name,"onUpdate:modelValue":t[5]||(t[5]=r=>e.front_end_name=r),placeholder:a(l)("frontEndNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(l)("frontEndLogo")},{default:i(()=>[o(c,{modelValue:e.front_end_logo,"onUpdate:modelValue":t[6]||(t[6]=r=>e.front_end_logo=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),b.value=="admin"?(h(),v(_,{key:0,class:"box-card !border-none",shadow:"never"},{default:i(()=>[m("h3",Z,p(a(l)("serviceInformation")),1),o(s,{label:a(l)("contactsTel")},{default:i(()=>[o(n,{modelValue:e.tel,"onUpdate:modelValue":t[7]||(t[7]=r=>e.tel=r),placeholder:a(l)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(l)("wechatCode")},{default:i(()=>[o(c,{modelValue:e.wechat_code,"onUpdate:modelValue":t[8]||(t[8]=r=>e.wechat_code=r)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(l)("customerServiceCode")},{default:i(()=>[o(c,{modelValue:e.enterprise_wechat,"onUpdate:modelValue":t[9]||(t[9]=r=>e.enterprise_wechat=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})):D("",!0)]),_:1},8,["model","rules"])),[[P,d.value]]),m("div",ee,[m("div",te,[o(U,{type:"primary",loading:d.value,onClick:t[10]||(t[10]=r=>E(w.value))},{default:i(()=>[R(p(a(l)("save")),1)]),_:1},8,["loading"])])])])}}});export{Dt as default};
|