2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
import{a3 as U,d as q,K as S,n as H,m as M,r as E,c as o,a as e,u as a,t as c,e as m,w as h,A as g,F as V,G as $,S as R,y as z,B as j,a4 as G,E as O,W as T,a0 as J,p as P,g as Q,h as n,R as D,i as X,a5 as Y,a6 as Z,U as v,a2 as ee,_ as te}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as se}from"./icon-addon-339e16d0.js";import{_ as oe}from"./member_head-a897263d.js";import{_ as ae}from"./empty-77b60adb.js";import{g as ne}from"./sys-8ead7f22.js";import{g as ie}from"./addon-8fbd8692.js";function ce(p){return U.get("home/site",{params:p})}const y=p=>(P("data-v-e81b7b93"),p=p(),Q(),p),re={class:"flex justify-between items-center py-[24px] pl-[62px] pr-[64px] home-head"},pe={class:"flex items-center"},le=["src"],de={key:1,class:"w-[32x] h-[32px] rounded-full",src:se,alt:""},_e={class:"ml-[10px] text-[16px] font-bold"},xe={class:"flex items-center"},me={class:"mr-[12px] text-[14px]"},ue={class:"w-[1200px] m-auto mt-[62px]"},fe={class:"flex justify-between items-center"},he=y(()=>e("span",{class:"text-[24px] font-bold"},"站点列表",-1)),ge={class:"flex justify-between items-center mt-[18px]"},ve={class:"flex items-center flex-wrap text-[14px] w-[800px]"},ye=["onClick"],be={class:"flex flex-wrap mt-[30px]"},ke=["onClick"],we={class:"flex items-center px-[24px] pt-[22px] pb-[16px] bg-[#F0F2F4] home-item-head"},Ce=["src"],Fe={key:1,class:"w-[48px] h-[48px] mr-[15px] rounded-[50%] overflow-hidden",src:oe},Ie={class:"flex flex-col flex-1 justify-center"},Se={class:"flex items-center flex-wrap"},Ee={class:"text-[16px] text-[#000] max-w-[145px] font-bold truncate mr-[10px]"},Ve={key:0,class:"flex items-center justify-center min-w-[42px] h-[18px] bg-[#FF5500] rounded-tl-md rounded-br-md items-tab"},$e={class:"text-[12px] text-[#fff]"},je={class:"text-[12px] mt-[3px] text-[#555]"},De={class:"px-[24px] py-[20px] text-[#6D7278]"},Be={class:"text-[14px]"},Ke={class:"text-[14px] mt-[2px]"},Le={key:0,class:"m-auto"},Ne=y(()=>e("img",{src:ae},null,-1)),We=y(()=>e("p",{class:"text-center text-gray-400"},"暂无站点",-1)),Ae=[Ne,We],Ue=q({__name:"index",setup(p){const b=S(),r=H({params:{keywords:"",page:1,limit:12,app:"",sort:!1},loading:!1,tableData:[]}),{params:d,loading:k,tableData:w}=M(r),u=()=>{r.loading=!0,ce(r.params).then(s=>{r.tableData=s.data.data,r.loading=!1}).catch(()=>{r.loading=!1})};u();const C=s=>{r.params.app=s,u()},_=E({icon:"",site_name:""});(()=>{ne().then(s=>{_.value=s.data})})();const F=()=>{r.params.page=1,u()},B=s=>{v.set({key:"siteId",data:s.site_id}),v.set({key:"siteInfo",data:s}),v.set({key:"comparisonSiteIdStorage",data:s.site_id}),S().$patch(i=>{i.siteInfo=s}),location.href=`${location.origin}/site/`},K=()=>{b.logout()},I=E([]);ie().then(({data:s})=>{const i=[];Object.keys(s).forEach(f=>{const x=s[f];x.type=="app"&&i.push(x)}),I.value=i}).catch();const L=()=>{G("加班加点研发中...")};return(s,i)=>{const f=O,x=ee,N=T,W=J;return n(),o("div",null,[e("div",re,[e("div",pe,[_.value.icon?(n(),o("img",{key:0,class:"w-[32x] h-[32px] rounded-full",src:a(D)(_.value.icon),alt:""},null,8,le)):(n(),o("img",de)),e("span",_e,c(_.value.site_name),1)]),e("div",xe,[e("span",me,c(a(b).userInfo.username),1),e("span",{onClick:i[0]||(i[0]=t=>K()),class:"text-[14px] cursor-pointer text-[var(--el-color-primary)]"},"退出")])]),e("div",ue,[e("div",fe,[he,m(f,{type:"primary",class:"w-[90px] !h-[34px]",onClick:L},{default:h(()=>[X("创建站点")]),_:1})]),e("div",ge,[e("div",ve,[e("span",{class:g(["mr-[12px] cursor-pointer",{"text-[var(--el-color-primary)]":a(d).app==""}]),onClick:i[1]||(i[1]=t=>C(""))},"所有应用",2),(n(!0),o(V,null,$(I.value,(t,l)=>(n(),o("span",{class:g(["mr-[12px] cursor-pointer",{"text-[var(--el-color-primary)]":a(d).app==t.key}]),onClick:A=>C(t.key),key:l},c(t.title),11,ye))),128))]),m(N,{modelValue:a(d).keywords,"onUpdate:modelValue":i[2]||(i[2]=t=>a(d).keywords=t),class:"!w-[300px] !h-[34px]",placeholder:"输入要搜索的站点名称",onKeyup:R(F,["enter","native"])},{suffix:h(()=>[m(x,{onClick:Y(F,["stop"]),class:"cursor-pointer"},{default:h(()=>[m(a(Z))]),_:1},8,["onClick"])]),_:1},8,["modelValue","onKeyup"])]),z((n(),o("div",be,[(n(!0),o(V,null,$(a(w),(t,l)=>(n(),o("div",{key:l,onClick:A=>B(t),class:g(["home-item w-[285px] box-border mb-[20px] cursor-pointer",{"mr-[20px]":l==0||(l+1)%4!=0}])},[e("div",we,[t.logo?(n(),o("img",{key:0,class:"w-[48px] h-[48px] mr-[15px] rounded-[50%] overflow-hidden",src:a(D)(t.logo)},null,8,Ce)):(n(),o("img",Fe)),e("div",Ie,[e("div",Se,[e("span",Ee,c(t.site_name),1),t.app_name?(n(),o("div",Ve,[e("span",$e,c(t.app_name),1)])):j("",!0)]),e("span",je,c(t.create_time?t.create_time.split(" ")[0]:"--")+" 到 "+c(t.expire_time?t.expire_time.split(" ")[0]:"--"),1)])]),e("div",De,[e("p",Be,"站点编号:"+c(t.site_id),1),e("p",Ke,"站点套餐:"+c(t.group_name||"--"),1)])],10,ke))),128)),!a(w).length&&!a(k)?(n(),o("div",Le,Ae)):j("",!0)])),[[W,a(k)]])])])}}});const Xe=te(Ue,[["__scopeId","data-v-e81b7b93"]]);export{Xe as default};
|