2 lines
7.9 KiB
JavaScript
2 lines
7.9 KiB
JavaScript
var R=(r,l,_)=>new Promise((c,d)=>{var m=i=>{try{p(_.next(i))}catch(a){d(a)}},f=i=>{try{p(_.throw(i))}catch(a){d(a)}},p=i=>i.done?c(i.value):Promise.resolve(i.value).then(m,f);p((_=_.apply(r,l)).next())});import{d as S,j as L,G as V,H as B,I as N,P as g,J as F,r as n,o as s,D as u,w as e,b as t,e as x,t as b,E as C,u as o,c as O,q as G,F as z,L as q,R as J,M as Q,N as X,h as I,O as Y,n as w,Q as j,U as T,V as Z,W as ee,l as te,X as A,Y as H,Z as D,$ as oe,a0 as ne,B as ae,a1 as se,m as le,a2 as ce,a3 as re,a4 as _e,K as de}from"./index-4ec2ce15.js";import{i as M}from"./icon-42fa39e7.js";import{c as ie}from"./project.api-0931840b.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang-4f4dbba3.js";import{g as pe}from"./plugin-ae137233.js";import"./index-64867e41.js";const me=S({__name:"index",props:{show:Boolean},emits:["close"],setup(r,{emit:l}){const _=r,{FishIcon:c,CloseIcon:d}=M.ionicons5,{StoreIcon:m,ObjectStorageIcon:f}=M.carbon,p=L(!1),i=V([{title:B("project.new_project"),key:N.CHART_HOME_NAME,icon:c,disabled:!1},{title:B("project.my_templete"),key:g.BASE_HOME_TEMPLATE_NAME,icon:f,disabled:!0},{title:B("project.template_market"),key:g.BASE_HOME_TEMPLATE_MARKET_NAME,icon:m,disabled:!0}]);F(()=>_.show,v=>{p.value=v});const a=()=>{l("close",!1)},y=v=>R(this,null,function*(){switch(v){case N.CHART_HOME_NAME:try{const h=yield ie({projectName:q(),remarks:null,indexImage:null});if(h&&h.code===J.SUCCESS){window.$message.success(window.$t("project.create_success"));const{id:k}=h.data,$=Q(N.CHART_HOME_NAME,"href");X($,[k],void 0,!0),a()}}catch(h){window.$message.error(window.$t("project.create_failure"))}break}});return(v,h)=>{const k=n("n-text"),$=n("n-icon"),K=n("n-button"),P=n("n-space"),W=n("n-card"),U=n("n-modal");return s(),u(U,{show:p.value,"onUpdate:show":h[0]||(h[0]=E=>p.value=E),class:"go-create-modal",onAfterLeave:a},{default:e(()=>[t(P,{size:"large"},{default:e(()=>[t(W,{class:"card-box",hoverable:""},{header:e(()=>[t(k,{class:"card-box-tite"},{default:e(()=>[x(b(v.$t("project.create_tip")),1)]),_:1})]),"header-extra":e(()=>[t(k,{onClick:a},{default:e(()=>[t($,{size:"20"},{default:e(()=>[(s(),u(C(o(d))))]),_:1})]),_:1})]),action:e(()=>[]),default:e(()=>[t(P,{class:"card-box-content",justify:"center"},{default:e(()=>[(s(!0),O(z,null,G(i.value,E=>(s(),u(K,{size:"large",disabled:E.disabled,key:E.key,onClick:Be=>y(E.key)},{icon:e(()=>[t($,{size:"18"},{default:e(()=>[(s(),u(C(E.icon)))]),_:2},1024)]),default:e(()=>[(s(),u(C(E.title)))]),_:2},1032,["disabled","onClick"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])}}});const fe=I(me,[["__scopeId","data-v-7ac7d745"]]),ve=S({__name:"index",props:{collapsed:Boolean},setup(r){const{DuplicateIcon:l,DuplicateOutlineIcon:_}=M.ionicons5,c=Y(),d=L(!1),m=()=>{d.value=!0},f=()=>{d.value=!1};return(p,i)=>{const a=n("n-icon"),y=n("n-button"),v=n("n-tooltip");return s(),O(z,null,[w("div",{onClick:m},[r.collapsed?(s(),u(v,{key:0,placement:"right",trigger:"hover"},{trigger:e(()=>[t(y,{ghost:"",type:"primary",size:"small"},{icon:e(()=>[t(a,null,{default:e(()=>[j(t(o(_),null,null,512),[[T,o(c).getDarkTheme]]),j(t(o(l),null,null,512),[[T,!o(c).getDarkTheme]])]),_:1})]),_:1})]),default:e(()=>[w("span",null,b(p.$t("project.create_btn")),1)]),_:1})):(s(),u(y,{key:1,ghost:"",type:"primary"},{icon:e(()=>[t(a,null,{default:e(()=>[j(t(o(_),null,null,512),[[T,o(c).getDarkTheme]]),j(t(o(l),null,null,512),[[T,!o(c).getDarkTheme]])]),_:1})]),default:e(()=>[w("span",null,b(p.$t("project.create_btn")),1)]),_:1}))]),t(o(fe),{show:d.value,onClose:f},null,8,["show"])],64)}}}),ye={class:"go-aside-footer"},he=S({__name:"index",props:{collapsed:Boolean},setup(r){const{DocumentTextIcon:l,CodeSlashIcon:_}=M.ionicons5,c=()=>{Z()},d=()=>{ee()};return(m,f)=>{const p=n("n-divider"),i=n("n-icon"),a=n("n-button"),y=n("n-text"),v=n("n-tooltip"),h=n("n-space");return s(),O("div",ye,[t(p,{class:"go-mt-0"}),t(h,{justify:"space-around"},{default:e(()=>[r.collapsed?(s(),u(v,{key:0,placement:"right",trigger:"hover"},{trigger:e(()=>[t(a,{secondary:"",onClick:c},{icon:e(()=>[t(i,{size:"18"},{default:e(()=>[t(o(l))]),_:1})]),_:1})]),default:e(()=>[t(y,null,{default:e(()=>[x(b(m.$t("global.doc")),1)]),_:1})]),_:1})):(s(),u(a,{key:1,secondary:"",onClick:c},{icon:e(()=>[t(i,{size:"18"},{default:e(()=>[t(o(l))]),_:1})]),default:e(()=>[t(y,null,{default:e(()=>[x(b(m.$t("global.doc")),1)]),_:1})]),_:1})),r.collapsed?(s(),u(v,{key:2,placement:"right",trigger:"hover"},{trigger:e(()=>[t(a,{secondary:"",onClick:c},{icon:e(()=>[t(i,{size:"18"},{default:e(()=>[t(o(_))]),_:1})]),_:1})]),default:e(()=>[t(y,null,{default:e(()=>[x(b(m.$t("global.code_addr")),1)]),_:1})]),_:1})):(s(),u(a,{key:3,secondary:"",onClick:d},{icon:e(()=>[t(i,{size:"18"},{default:e(()=>[t(o(_))]),_:1})]),default:e(()=>[j(t(y,null,{default:e(()=>[x(b(m.$t("global.code_addr")),1)]),_:1},512),[[T,!r.collapsed]])]),_:1}))]),_:1})])}}});const ge=I(he,[["__scopeId","data-v-b5a02cb8"]]),{GridIcon:We,TvOutlineIcon:Ee}=M.ionicons5,{StoreIcon:be,ObjectStorageIcon:ke,DevicesIcon:we}=M.carbon,Me=()=>["all-project"],Ae=()=>{const r=window.$t;return te([{key:"divider-1",type:"divider"},{label:()=>A("span",null,{default:()=>r("project.project")}),key:"all-project",icon:H(we),children:[{type:"group",label:()=>A("span",null,{default:()=>r("project.my")}),key:"my-project",children:[{label:()=>A(D,{to:{name:g.BASE_HOME_ITEMS_NAME}},{default:()=>r("project.all_project")}),key:g.BASE_HOME_ITEMS_NAME,icon:H(Ee)},{label:()=>A(D,{to:{name:g.BASE_HOME_TEMPLATE_NAME}},{default:()=>r("project.my_templete")}),key:g.BASE_HOME_TEMPLATE_NAME,icon:H(ke)}]}]},{key:"divider-2",type:"divider"},{label:()=>A(D,{to:{name:g.BASE_HOME_TEMPLATE_MARKET_NAME}},{default:()=>r("project.template_market")}),key:g.BASE_HOME_TEMPLATE_MARKET_NAME,icon:H(be)}])},xe={class:"go-project-sider-flex"},je={class:"sider-bottom"},Te=S({__name:"index",setup(r){const l=L(!1),{getAsideCollapsedWidth:_}=oe(ne()),c=ae(),d=se(()=>c.name),m=Ae(),f=Me(),p=()=>{document.body.clientWidth<=950?l.value=!0:l.value=!1};return le(()=>{window.addEventListener("resize",p)}),ce(()=>{window.removeEventListener("resize",p)}),(i,a)=>{const y=n("n-space"),v=n("n-menu"),h=n("n-layout-sider");return s(),u(h,{class:"go-project-sider",bordered:"","collapse-mode":"width","show-trigger":"bar",collapsed:l.value,"native-scrollbar":!1,"collapsed-width":o(_),width:o(re),onCollapse:a[0]||(a[0]=k=>l.value=!0),onExpand:a[1]||(a[1]=k=>l.value=!1)},{default:e(()=>[w("div",xe,[w("aside",null,[t(y,{vertical:"",class:"go-project-sider-top"},{default:e(()=>[t(o(ve),{collapsed:l.value},null,8,["collapsed"])]),_:1}),t(v,{value:d.value,options:o(m),"collapsed-width":o(_),"collapsed-icon-size":22,"default-expanded-keys":o(f)},null,8,["value","options","collapsed-width","default-expanded-keys"])]),w("div",je,[t(o(ge),{collapsed:l.value},null,8,["collapsed"])])])]),_:1},8,["collapsed","collapsed-width","width"])}}});const Ce=I(Te,[["__scopeId","data-v-58606bc9"]]),Se={};function Ie(r,l){const _=n("router-view");return s(),u(_,null,{default:e(({Component:c,route:d})=>[t(_e,{name:"fade",mode:"out-in",appear:""},{default:e(()=>[d.meta.noKeepAlive?(s(),u(C(c),{key:d.fullPath})):(s(),u(de,{key:1},[(s(),u(C(c),{key:d.fullPath}))],1024))]),_:2},1024)]),_:1})}const $e=I(Se,[["render",Ie]]),He={class:"go-project"},Oe=S({__name:"index",setup(r){return pe({message:"不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!",isMaskClosable:!0,closeNegativeText:!0,transformOrigin:"center",onPositiveCallback:()=>{}}),(l,_)=>{const c=n("n-space"),d=n("router-view"),m=n("n-layout-content"),f=n("n-layout");return s(),O("div",He,[t(f,{"has-sider":"",position:"absolute"},{default:e(()=>[t(c,{vertical:""},{default:e(()=>[t(o(Ce))]),_:1}),t(f,null,{default:e(()=>[t(o(ue)),t(f,{id:"go-project-content-top",class:"content-top",position:"absolute","native-scrollbar":!1},{default:e(()=>[t(m,null,{default:e(()=>[t(o($e),null,{default:e(()=>[t(d)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])}}});const Ue=I(Oe,[["__scopeId","data-v-59301cbb"]]);export{Ue as default};
|