mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-01 02:48:09 +00:00
2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{d as F,v as U,r as f,bJ as k,l as h,k as t,h as w,c as N,J as P,m as D,w as r,e as o,a as i,t as p,u as a,i as M,D as C,G as I,L as B,H as R,E as T,M as S,_ as q}from"./index-9f163f98.js";/* empty css *//* empty css *//* empty css *//* empty css */import A from"./index-b01212c8.js";import"./el-form-item-4ed993c7.js";/* empty css */import{a0 as J,a1 as L,a2 as W}from"./sys-135535fa.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-eb3f7737.js";/* empty css *//* empty css */import"./attachment-d1610ab5.js";import"./index.vue_vue_type_script_setup_true_lang-761ba1b4.js";/* 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 *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-e32ef5b5.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-b29ac1a4.js";import"./sortable.esm-be94e56d.js";const j={class:"main-container"},G={class:"text-[16px] text-[#1D1F3A] font-bold mb-4"},H={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},O={class:"text-[12px] text-[#a9a9a9]"},$={class:"text-[12px] text-[#a9a9a9]"},z={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},K={class:"panel-title !text-[14px] bg-[#F4F5F7] p-3 border-[#E6E6E6] border-solid border-b-[1px]"},Q={class:"fixed-footer-wrap"},X={class:"fixed-footer"},Y=F({__name:"system",setup(Z){const g=U().meta.title,m=f(!0);f(k());const l=h({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:"",front_end_icon:"",icon:"",wechat_code:"",enterprise_wechat:"",tel:""});(async()=>{const u=await(await J()).data;Object.keys(l).forEach(n=>{u[n]!=null&&(l[n]=u[n])});const e=await(await L()).data;l.wechat_code=e.wechat_code,l.enterprise_wechat=e.enterprise_wechat,l.tel=e.tel,m.value=!1})();const b=f(),x=h({site_name:[{required:!0,message:t("siteNamePlaceholder"),trigger:"blur"}],front_end_name:[{required:!0,message:t("frontEndNamePlaceholder"),trigger:"blur"}]}),V=async u=>{m.value||!u||await u.validate(async e=>{e&&(m.value=!0,W(l).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(u,e)=>{const n=C,s=I,c=A,_=B,v=R,E=T,y=S;return w(),N("div",j,[P((w(),D(v,{class:"page-form loading-box",model:l,"label-width":"150px",ref_key:"formRef",ref:b,rules:x},{default:r(()=>[o(_,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[i("h3",G,p(a(g)),1),i("h3",H,p(a(t)("websiteInfo")),1),o(s,{label:a(t)("siteName"),prop:"site_name"},{default:r(()=>[o(n,{modelValue:l.site_name,"onUpdate:modelValue":e[0]||(e[0]=d=>l.site_name=d),modelModifiers:{trim:!0},placeholder:a(t)("siteNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("logo")},{default:r(()=>[i("div",null,[o(c,{modelValue:l.logo,"onUpdate:modelValue":e[1]||(e[1]=d=>l.logo=d)},null,8,["modelValue"]),i("p",O,p(a(t)("logoPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(t)("icon")},{default:r(()=>[i("div",null,[o(c,{modelValue:l.icon,"onUpdate:modelValue":e[2]||(e[2]=d=>l.icon=d)},null,8,["modelValue"]),i("p",$,p(a(t)("iconPlaceholder")),1)])]),_:1},8,["label"]),o(s,{label:a(t)("keywords")},{default:r(()=>[o(n,{modelValue:l.keywords,"onUpdate:modelValue":e[3]||(e[3]=d=>l.keywords=d),modelModifiers:{trim:!0},placeholder:a(t)("keywordsPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("desc")},{default:r(()=>[o(n,{modelValue:l.desc,"onUpdate:modelValue":e[4]||(e[4]=d=>l.desc=d),modelModifiers:{trim:!0},type:"textarea",rows:4,clearable:"",placeholder:a(t)("descPlaceholder"),class:"input-width",maxlength:"100","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:r(()=>[i("h3",z,p(a(t)("frontEndInfo")),1),o(s,{label:a(t)("frontEndName")},{default:r(()=>[o(n,{modelValue:l.front_end_name,"onUpdate:modelValue":e[5]||(e[5]=d=>l.front_end_name=d),modelModifiers:{trim:!0},placeholder:a(t)("frontEndNamePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("phone")},{default:r(()=>[o(n,{modelValue:l.phone,"onUpdate:modelValue":e[6]||(e[6]=d=>l.phone=d),modelModifiers:{trim:!0},placeholder:a(t)("phonePlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("logo")},{default:r(()=>[o(c,{modelValue:l.front_end_logo,"onUpdate:modelValue":e[7]||(e[7]=d=>l.front_end_logo=d)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("icon")},{default:r(()=>[o(c,{modelValue:l.front_end_icon,"onUpdate:modelValue":e[8]||(e[8]=d=>l.front_end_icon=d)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(_,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:r(()=>[i("h3",K,p(a(t)("serviceInformation")),1),o(s,{label:a(t)("contactsTel")},{default:r(()=>[o(n,{modelValue:l.tel,"onUpdate:modelValue":e[9]||(e[9]=d=>l.tel=d),modelModifiers:{trim:!0},placeholder:a(t)("contactsTelPlaceholder"),class:"input-width",clearable:"",maxlength:"20","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(s,{label:a(t)("wechatCode")},{default:r(()=>[o(c,{modelValue:l.wechat_code,"onUpdate:modelValue":e[10]||(e[10]=d=>l.wechat_code=d)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("customerServiceCode")},{default:r(()=>[o(c,{modelValue:l.enterprise_wechat,"onUpdate:modelValue":e[11]||(e[11]=d=>l.enterprise_wechat=d)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[y,m.value]]),i("div",Q,[i("div",X,[o(E,{type:"primary",loading:m.value,onClick:e[12]||(e[12]=d=>V(b.value))},{default:r(()=>[M(p(a(t)("save")),1)]),_:1},8,["loading"])])])])}}});const Be=q(Y,[["__scopeId","data-v-ee1d2eb8"]]);export{Be as default};
|