2 lines
4.0 KiB
JavaScript
2 lines
4.0 KiB
JavaScript
import{d as j,cN as O,O as P,f as q,r as y,n as z,h as d,c as D,a as r,u as t,t as i,N as a,e as l,w as s,i as m,I as u,R as L,B as w,E as X,X as Y,V as A,aw as G,$ as H,Y as J}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{_ as K}from"./site_logo-f276251b.js";import{j as M}from"./site-ac963391.js";import{_ as Q}from"./edit-site.vue_vue_type_script_setup_true_lang-1328d131.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./member_head-a897263d.js";import"./user-1e1ca1a9.js";import"./addon-8fbd8692.js";const U={class:"main-container"},W={class:"detail-head !mb-[10px]"},Z=r("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),tt={class:"ml-[1px]"},et=r("span",{class:"adorn"},"|",-1),st={class:"right"},at={class:"input-width"},ot={key:1,class:"w-20 h-20",src:K,alt:""},it={class:"input-width"},lt={class:"input-width"},rt={class:"input-width"},nt={class:"input-width"},ct={class:"fixed-footer-wrap"},dt={class:"fixed-footer"},jt=j({__name:"info",setup(mt){const S=O(),f=P(),x=q(),T=f.meta.title,v=parseInt(f.query.id),k=y(!0),E={site_id:0,site_name:"",expire_time:0,group_id:0,keywords:"",business_hours:"",logo:"",desc:"",latitude:"",longitude:"",province_id:"",city_id:"",district_id:"",address:"",full_address:"",phone:"",group_name:"",status:0,create_time:0},e=z({...E}),N=async(_=0)=>{Object.assign(e,E);const o=await(await M(_)).data;Object.keys(e).forEach(n=>{o[n]!=null&&(e[n]=o[n])}),k.value=!1};v?N(v):k.value=!1;const $=()=>{N(v)},b=y(),g=y(null),B=_=>{g.value.setFormData(e),g.value.showDialog=!0},I=async _=>{C()},C=()=>{S.removeTab(f.path),x.push({path:"/admin/site/list"})};return(_,o)=>{const n=X,c=Y,F=A,h=G,R=H,V=J;return d(),D("div",U,[r("div",W,[r("div",{class:"left",onClick:o[0]||(o[0]=p=>t(x).push({path:"/admin/site/list"}))},[Z,r("span",tt,i(t(a)("returnToPreviousPage")),1)]),et,r("span",st,i(t(T)),1),l(n,{class:"ml-auto w-[100px] mr-[10px]",type:"primary",onClick:o[1]||(o[1]=p=>B(b.value))},{default:s(()=>[m(i(t(a)("edit")),1)]),_:1})]),l(V,{model:e,"label-width":"90px",ref_key:"formRef",ref:b,class:"page-form"},{default:s(()=>[l(R,{class:"box-card !border-none relative",shadow:"never"},{default:s(()=>[l(c,{label:t(a)("siteName")},{default:s(()=>[r("div",at,i(e.site_name),1)]),_:1},8,["label"]),l(c,{label:t(a)("siteLogo")},{default:s(()=>[e.logo?(d(),u(F,{key:0,class:"w-20 h-20",src:t(L)(e.logo),fit:"contain"},null,8,["src"])):(d(),D("img",ot))]),_:1},8,["label"]),l(c,{label:t(a)("groupName")},{default:s(()=>[r("div",it,i(e.group_name||""),1)]),_:1},8,["label"]),l(c,{label:t(a)("keywords")},{default:s(()=>[r("div",lt,i(e.keywords||""),1)]),_:1},8,["label"]),l(c,{label:t(a)("status")},{default:s(({})=>[e.status==1?(d(),u(h,{key:0,class:"ml-2",type:"success"},{default:s(()=>[m(i(t(a)("statusNormal")),1)]),_:1})):w("",!0),e.status==0?(d(),u(h,{key:1,class:"ml-2",type:"error"},{default:s(()=>[m(i(t(a)("statusDeactivate")),1)]),_:1})):w("",!0),e.status==2?(d(),u(h,{key:2,class:"ml-2",type:"error"},{default:s(()=>[m(i(t(a)("statusExpire")),1)]),_:1})):w("",!0)]),_:1},8,["label"]),l(c,{label:t(a)("createTime")},{default:s(()=>[r("div",rt,i(e.create_time||""),1)]),_:1},8,["label"]),l(c,{label:t(a)("expireTime")},{default:s(()=>[r("div",nt,i(e.expire_time||""),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"]),l(Q,{ref_key:"editSiteDialog",ref:g,onComplete:o[2]||(o[2]=p=>$())},null,512),r("div",ct,[r("div",dt,[l(n,{type:"primary",onClick:o[3]||(o[3]=p=>I(b.value))},{default:s(()=>[m(i(t(a)("confirm")),1)]),_:1}),l(n,{onClick:o[4]||(o[4]=p=>C())},{default:s(()=>[m(i(t(a)("cancel")),1)]),_:1})])])])}}});export{jt as default};
|