mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 09:50:16 +00:00
2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{d as C,r as _,R as g,e as f,f as B,g as i,B as u,u as l,Q as D,v as w,x as s,y as a,H as I,A as R}from"./base-06478700.js";/* empty css *//* empty css */import{a as F,E as T}from"./el-form-item-314d006d.js";/* empty css */import{_ as S}from"./index-d312949b.js";/* empty css */import{t as o}from"./index-e5b4f072.js";import{ak as x,al as j}from"./index-0d58768e.js";import{h as q,a as A}from"./common-92a35870.js";import{u as W}from"./vue-router-d09a2c28.js";import{E as H}from"./index-b68e8463.js";import{E as L}from"./index-e10fccde.js";import{E as O}from"./index-c2f001d3.js";import{v as Q}from"./directive-cb2d3366.js";import"./index-2fcd1254.js";import"./event-10eba222.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-53d85138.js";import"./el-overlay-42a687c6.js";import"./index-9fe5de95.js";import"./focus-trap-3e826cdc.js";import"./index-f27d6ce0.js";import"./index-818c0ce2.js";import"./attachment-27789be1.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-b52d0f2a.js";import"./index-a0c6fc63.js";import"./index-2a269c7c.js";import"./index-01f6e375.js";import"./validator-6e9db238.js";import"./index-e4abfaa5.js";import"./index-41a974fa.js";import"./index-c17093ae.js";import"./index-543fb162.js";import"./index-b6a184ba.js";import"./debounce-1db848fd.js";import"./position-c3bcd0be.js";import"./index-b56195b5.js";import"./index-40e21e72.js";import"./isEqual-42d4b10f.js";import"./index-137757c0.js";import"./index-35e821cc.js";import"./index-34d55b7e.js";import"./strings-fe930bc4.js";import"./index-5a0d60aa.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-adb89d14.js";import"./el-main-9a0960e7.js";import"./index-6b67c4ac.js";import"./index-9ee9102c.js";const $={class:"main-container"},z={class:"flex ml-[18px] justify-between items-center mt-[20px] mb-[5px]"},G={class:"text-[20px]"},J={class:"panel-title !text-sm"},K={class:"text-[12px] text-[#a9a9a9]"},M={class:"text-[12px] text-[#a9a9a9]"},X={class:"panel-title !text-sm"},Y={class:"fixed-footer-wrap"},Z={class:"fixed-footer"},dt=C({__name:"system",setup(ee){const V=W().meta.title,d=_(!0),h=_(),t=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(p=0)=>{const e=await(await x()).data;Object.keys(t).forEach(m=>{e[m]!=null&&(t[m]=e[m])}),h.value=q(),d.value=!1})();const b=_(),y=g({site_name:[{required:!0,message:o("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:o("frontEndNamePlaceholder"),trigger:"blur"}]}),k=async p=>{d.value||!p||await p.validate(async e=>{e&&(d.value=!0,j(t).then(()=>{d.value=!1,E()}).catch(()=>{d.value=!1}))})},E=async()=>{const p=await(await x()).data;A.set({key:"siteInfo",data:p})};return(p,e)=>{const m=H,n=F,c=S,v=L,N=T,P=O,U=Q;return f(),B("div",$,[i("div",z,[i("span",G,u(l(V)),1)]),D((f(),w(N,{model:t,"label-width":"150px",ref_key:"formRef",ref:b,rules:y,class:"page-form"},{default:s(()=>[a(v,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[i("h3",J,u(l(o)("websiteInfo")),1),a(n,{label:l(o)("siteName"),prop:"site_name"},{default:s(()=>[a(m,{modelValue:t.site_name,"onUpdate:modelValue":e[0]||(e[0]=r=>t.site_name=r),placeholder:l(o)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:l(o)("logo")},{default:s(()=>[i("div",null,[a(c,{modelValue:t.logo,"onUpdate:modelValue":e[1]||(e[1]=r=>t.logo=r)},null,8,["modelValue"]),i("p",K,u(l(o)("logoPlaceholder")),1)])]),_:1},8,["label"]),a(n,{label:l(o)("icon")},{default:s(()=>[i("div",null,[a(c,{modelValue:t.icon,"onUpdate:modelValue":e[2]||(e[2]=r=>t.icon=r)},null,8,["modelValue"]),i("p",M,u(l(o)("iconPlaceholder")),1)])]),_:1},8,["label"]),a(n,{label:l(o)("keywords")},{default:s(()=>[a(m,{modelValue:t.keywords,"onUpdate:modelValue":e[3]||(e[3]=r=>t.keywords=r),placeholder:l(o)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:l(o)("desc")},{default:s(()=>[a(m,{modelValue:t.desc,"onUpdate:modelValue":e[4]||(e[4]=r=>t.desc=r),type:"textarea",rows:"4",clearable:"",placeholder:l(o)("descPlaceholder"),class:"input-width",maxlength:"100"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),h.value=="admin"?(f(),w(v,{key:0,class:"box-card !border-none",shadow:"never"},{default:s(()=>[i("h3",X,u(l(o)("serviceInformation")),1),a(n,{label:l(o)("contactsTel")},{default:s(()=>[a(m,{modelValue:t.tel,"onUpdate:modelValue":e[5]||(e[5]=r=>t.tel=r),placeholder:l(o)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:l(o)("wechatCode")},{default:s(()=>[a(c,{modelValue:t.wechat_code,"onUpdate:modelValue":e[6]||(e[6]=r=>t.wechat_code=r)},null,8,["modelValue"])]),_:1},8,["label"]),a(n,{label:l(o)("customerServiceCode")},{default:s(()=>[a(c,{modelValue:t.enterprise_wechat,"onUpdate:modelValue":e[7]||(e[7]=r=>t.enterprise_wechat=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})):I("",!0)]),_:1},8,["model","rules"])),[[U,d.value]]),i("div",Y,[i("div",Z,[a(P,{type:"primary",loading:d.value,onClick:e[8]||(e[8]=r=>k(b.value))},{default:s(()=>[R(u(l(o)("save")),1)]),_:1},8,["loading"])])])])}}});export{dt as default};
|