@vancone/console-component 0.1.1-beta.44 → 0.1.1-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -85,10 +85,10 @@ function qo() {
|
|
|
85
85
|
return ve.delete(`//${Yt}/api/passport/service/v1/login`);
|
|
86
86
|
}
|
|
87
87
|
function Ho() {
|
|
88
|
-
return ve.get("
|
|
88
|
+
return ve.get("//app-center.vancone.com/api/app-center/v1/app-group?pageSize=1000");
|
|
89
89
|
}
|
|
90
90
|
function Bo() {
|
|
91
|
-
return ve.get("
|
|
91
|
+
return ve.get("//app-center.vancone.com/api/app-center/v1/store/app?pageSize=1000");
|
|
92
92
|
}
|
|
93
93
|
const Yo = {
|
|
94
94
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router"),require("axios"),require("element-plus"),require("@element-plus/icons-vue"),require("vue-i18n"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","axios","element-plus","@element-plus/icons-vue","vue-i18n","lodash"],e):(E=typeof globalThis!="undefined"?globalThis:E||self,e(E["console-component"]={},E.Vue,E.vueRouter,E.axios,E.ElementPlus,E.iconsVue,E.VueI18n,E.lodash))})(this,function(E,e,q,He,ge,Z,_e,pe){"use strict";var mr=Object.defineProperty,ur=Object.defineProperties;var hr=Object.getOwnPropertyDescriptors;var qt=Object.getOwnPropertySymbols;var gr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var Ht=(E,e,q)=>e in E?mr(E,e,{enumerable:!0,configurable:!0,writable:!0,value:q}):E[e]=q,qe=(E,e)=>{for(var q in e||(e={}))gr.call(e,q)&&Ht(E,q,e[q]);if(qt)for(var q of qt(e))_r.call(e,q)&&Ht(E,q,e[q]);return E},Yt=(E,e)=>ur(E,hr(e));var he=(E,e,q)=>new Promise((He,ge)=>{var Z=J=>{try{pe(q.next(J))}catch(Oe){ge(Oe)}},_e=J=>{try{pe(q.throw(J))}catch(Oe){ge(Oe)}},pe=J=>J.done?He(J.value):Promise.resolve(J.value).then(Z,_e);pe((q=q.apply(E,e)).next())});const J=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Oe={},Wt={class:"building"};function Jt(t,o){return e.openBlock(),e.createElementBlock("div",Wt)}const at=J(Oe,[["render",Jt],["__scopeId","data-v-07bd45d2"]]),se=He.create({timeout:2*60*1e3,withCredentials:!0});se.interceptors.request.use(t=>t),se.interceptors.response.use(t=>{const{headers:o,method:n}=t.config,{code:r,message:a}=t.data,{"No-Success-Message":l}=o,i=n!=="get";return r===0?(i&&!l&&ge.ElMessage({message:a,type:"success"}),Promise.resolve(t)):(ge.ElMessage({type:"error",message:a}),Promise.reject(new Error(`${r}`)))},t=>{var r;const{config:o,response:n}=t;if(n){const{status:a}=n;if(a===401){const s=window.escape(window.location.href);let c=(r=n.data.data)!=null?r:"//passport.vancone.com";window.location.href=`${c}/?from=${s}`}const{message:l,error:i}=n.data;ge.ElMessage({type:"error",message:l||i})}return Promise.reject(new Error(t.message||"Response Error"))});const lt=()=>{const{origin:t}=window.location;return t.includes("beta")||t.includes("localhost")?"passport.beta.vancone.com":"passport.vancone.com"},st=lt();function Kt(){return se.get(`//${st}/api/passport/service/v1/account`)}function Qt(){return se.delete(`//${st}/api/passport/service/v1/login`)}function Xt(){return se.get("https://app-center.vancone.com/api/app-center/v1/app-group?pageSize=1000")}function Zt(){return se.get("https://app-center.vancone.com/api/app-center/v1/store/app?pageSize=1000")}const vt={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function eo(t,o){return e.openBlock(),e.createElementBlock("svg",vt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M480 544v352H128V544zm416 288v64H544v-64zM416 608H192v224h224zm480 83.072v64H544v-64zM896 544v64H544v-64zM480 128v352H128V128zm416 0v352H544V128zm-480 64H192v224h224zm416 0H608v224h224z"},null,-1)]))}const to={render:eo},oo={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function no(t,o){return e.openBlock(),e.createElementBlock("svg",oo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M487.01 113.079a56.076 56.076 0 0 1 73.216 21.918l1.901 3.536 100.401 203.215L886.93 374.32a56.076 56.076 0 0 1 33.939 92.647l-2.877 3.024-162.329 158.061L793.99 851.31a56.076 56.076 0 0 1-77.726 60.855l-3.609-1.707-200.801-105.472-200.802 105.448a56.076 56.076 0 0 1-81.871-55.345l.512-3.78 38.351-223.256-162.328-158.061a56.076 56.076 0 0 1 27.282-94.989l3.78-.682 224.377-32.573L461.58 138.533a56.08 56.08 0 0 1 25.43-25.454M409.722 408.6l-228.206 33.134 165.132 160.744-39.01 227.133 204.216-107.252 204.19 107.252-39.01-227.133 165.133-160.744L613.96 408.6 511.854 201.9 409.698 408.6z"},null,-1)]))}const ro={render:no},ao={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function lo(t,o){return e.openBlock(),e.createElementBlock("svg",ao,o[0]||(o[0]=[e.createElementVNode("path",{d:"M512 109.714c222.184 0 402.286 180.102 402.286 402.286S734.184 914.286 512 914.286l-2.901-.122c-104.546-8.314-189.416-43.52-253.075-105.13l-.024 80.87h-73.143V658.287h207.238v73.143H283.99c52.858 65.048 128.561 101.4 229.45 109.714l7.63-.122C698.662 836.218 841.144 690.737 841.144 512c0-181.784-147.359-329.143-329.143-329.143S182.857 330.216 182.857 512h-73.143c0-222.184 180.102-402.286 402.286-402.286m-48.762 182.857h73.143V475.43h182.857v73.142h-256z"},null,-1)]))}const so={render:lo},io={class:"app-catalog-wrapper"},co={class:"catalog-wrapper"},po={class:"service-list"},fo={class:"app-icon-container"},mo=["href"],uo=["innerHTML"],ho={key:1,class:"app-icon"},go=J(e.defineComponent({__name:"AppCatalog",props:{visible:{type:Boolean}},setup(t){const o=e.reactive([]);function n(){Xt().then(({data:r})=>{o.splice(0,o.length,...r.data.list),Zt().then(({data:a})=>{const l=a.data;o.forEach(i=>{i.apps=l.filter(s=>s.groupId===i.id)})})})}return n(),(r,a)=>{const l=e.resolveComponent("el-input"),i=e.resolveComponent("el-scrollbar"),s=e.resolveComponent("el-tab-pane"),c=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",io,[e.createVNode(c,{"tab-position":"left"},{default:e.withCtx(()=>[e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(to),{class:"left-icon"})]),default:e.withCtx(()=>[a[0]||(a[0]=e.createElementVNode("h1",{class:"catalog-title"},"Apps",-1)),e.createVNode(l,{class:"search-box","prefix-icon":e.unref(Z.Search),placeholder:"Search apps"},null,8,["prefix-icon"]),e.createVNode(i,{class:"right-area",style:{width:"100%",height:"400px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,f=>(e.openBlock(),e.createElementBlock("div",po,[e.createElementVNode("h1",null,e.toDisplayString(f.name),1),e.createElementVNode("div",fo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.apps,b=>{var w,x;return e.openBlock(),e.createElementBlock("a",{style:e.normalizeStyle([{"text-decoration":"none"},{pointerEvents:((w=b.homepageUrl)==null?void 0:w.length)>0?"auto":"none"}]),target:"_blank",href:b.homepageUrl},[b.iconSvg!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:b.iconSvg},null,8,uo)):(e.openBlock(),e.createElementBlock("div",ho," ")),e.createElementVNode("h2",{style:e.normalizeStyle({color:((x=b.homepageUrl)==null?void 0:x.length)>0?"#555":"#bbb"})},e.toDisplayString(b.name),5)],12,mo)}),256))])]))),256))])]),_:1})]),_:1}),e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(ro),{class:"left-icon"})]),default:e.withCtx(()=>[a[1]||(a[1]=e.createElementVNode("h1",{class:"catalog-title"},"Favorites",-1))]),_:1}),e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(so),{class:"left-icon"})]),default:e.withCtx(()=>[a[2]||(a[2]=e.createElementVNode("h1",{class:"catalog-title"},"Recently",-1))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-fcfb021b"]]),it={common:{header:{product:"Products",help:"Help",notification:"Notification",workbench:"Workbench",userCenter:"User Center",switchLanguage:"Languages",signOut:"Sign out"},table:{create:"Create",delete:"Delete",add:"Add",remove:"Remove",search:"Search",edit:"Edit",operation:"Operations",viewSelected:"View Selected",warning:"Warning",select:"Select"},basic:{cancel:"Cancel",confirm:"Confirm",createdTime:"Created Time",description:"Description",detail:"Details",more:"More",name:"Name",no:"No",save:"Save",summary:"Summary",type:"Type",updatedTime:"Updated Time",yes:"Yes"}}},ct={common:{header:{product:"产品",help:"帮助",notification:"通知",workbench:"工作台",userCenter:"用户中心",switchLanguage:"语言",signOut:"退出登录"},table:{create:"创建",delete:"删除",add:"添加",remove:"移除",search:"搜索",edit:"编辑",operation:"操作",viewSelected:"查看已选",warning:"风险提示",select:"选择"},basic:{cancel:"取消",confirm:"确认",createdTime:"创建时间",description:"描述",detail:"详情",more:"更多",name:"名称",no:"否",save:"保存",summary:"基本信息",type:"类型",updatedTime:"更新时间",yes:"是"}}},Pe=_e.createI18n({legacy:!1,locale:localStorage.getItem("locale")||navigator.language.slice(0,2),messages:{en:it,zh:ct}}),_o={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function bo(t,o){return e.openBlock(),e.createElementBlock("svg",_o,o[0]||(o[0]=[e.createElementVNode("path",{d:"M22.6 29.1h6.6v-6.6h-6.6m0-3.2h6.6v-6.6h-6.6m-9.9-3.3h6.6V2.9h-6.6m9.9 6.5h6.6V2.9h-6.6m-9.9 16.4h6.6v-6.6h-6.6m-9.8 6.6h6.6v-6.6H2.9m0 16.4h6.6v-6.6H2.9m9.8 6.6h6.6v-6.6h-6.6M2.9 9.4h6.6V2.9H2.9z"},null,-1)]))}const yo={render:bo},wo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function Co(t,o){return e.openBlock(),e.createElementBlock("svg",wo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M651.404 284.363c-14.446-23.404-34.322-43.717-58.832-56.969A164.4 164.4 0 0 0 512 206.328a157.8 157.8 0 0 0-63.864 12.893 163.8 163.8 0 0 0-52.22 35.105c-14.77 14.405-26.455 32.338-35.04 51.895a164 164 0 0 0-12.829 63.958c0 15.233 6.615 28.88 15.993 39.036 10.063 9.363 23.72 15.988 38.92 15.988a56.73 56.73 0 0 0 38.528-15.988c10.134-10.155 16.747-23.803 16.747-39.036a54.8 54.8 0 0 1 3.918-21.066c3.126-6.232 6.614-12.495 11.643-17.17a60.4 60.4 0 0 1 17.143-11.703c6.614-2.304 14.053-4.646 21.061-4.646a53.95 53.95 0 0 1 38.167 16.35c18.652 18.364 21.384 49.946 7.759 71.803-5.47 7.779-12.83 13.685-19.443 19.915-19.874 16.78-39.748 33.96-55.31 62.045-15.598 27.258-25.733 65.537-25.733 122.47a55.76 55.76 0 0 0 16.352 39.035c9.38 9.758 23.36 15.591 38.204 15.591 15.167 0 29.578-5.833 38.921-15.591a55.6 55.6 0 0 0 16.354-39.036c0-32.769 5.067-53.803 13.228-68.635 8.59-14.873 18.687-24.198 28.822-32.806 9.74-8.57 19.048-16.383 27.638-25.35 8.158-8.966 15.992-18.69 22.21-30.825 5.462-9.327 9.344-21.03 12.435-34.318 7.008-29.276 7.008-63.197-2.3-92.47-4.313-13.647-10.136-27.69-17.899-39.394zM512 706.508a53.51 53.51 0 0 0-38.204 15.988 54.725 54.725 0 0 0 0 78.035A53.51 53.51 0 0 0 512 816.519c15.167 0 29.578-6.232 38.921-15.988a54.72 54.72 0 0 0 0-78.035c-9.343-9.758-23.754-15.988-38.921-15.988m350.046-543.104c-88.409-88.95-211.463-144.363-347.744-145.12-137.826-.792-260.887 54.627-351.194 144.365-89.598 89.7-144.835 213-144.835 348.757a528.6 528.6 0 0 0 10.099 100.288c7.008 31.581 16.352 63.597 28.788 92.47 37.808 90.493 102.03 165.394 180.305 218.113a493.11 493.11 0 0 0 623.435-61.29c90.315-89.34 144.798-213.035 144.798-349.585 0-135.362-54.483-258.228-143.649-348.001zm-137.86 668.742a383.537 383.537 0 0 1-565.784-170.902c-10.135-22.614-17.106-46.814-22.57-71.768-4.636-25.388-7.758-51.132-7.758-78.07a381.15 381.15 0 0 1 112.92-271.516c69.29-69.463 165.86-112.387 272.562-112.387a385.85 385.85 0 0 1 352.768 234.1 398 398 0 0 1 29.58 149.803 393.7 393.7 0 0 1-29.58 149.834 387.25 387.25 0 0 1-142.137 170.906"},null,-1)]))}const ko={render:Co},Vo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function No(t,o){return e.openBlock(),e.createElementBlock("svg",Vo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M358.4 871.2H45.152C19.936 871.2 0 843.904 0 819.2s19.936-50.624 45.152-50.624h56.64l-1.088-283.168c0-204.608 164.032-374.56 337.056-412.576v-1.28C437.76 32.032 470.496 0 510.848 0s73.088 32.032 73.088 71.552v1.28C756.96 110.848 922.08 280.8 922.08 485.408v283.168h55.008c25.216 0 46.944 25.92 46.944 50.624s-21.696 52-46.944 52H665.632c-.416 84.48-69.024 152.8-153.6 152.8s-153.184-68.352-153.6-152.8zm102.4 0c.416 27.904 23.168 50.4 51.2 50.4s50.784-22.496 51.2-50.4zm357.216-103.328v-282.56c0-179.808-149.536-329.984-307.104-329.984S204.544 305.472 204.544 485.312v282.56z"},null,-1)]))}const Eo={render:No},xo={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function So(t,o){return e.openBlock(),e.createElementBlock("svg",xo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M23.8 22.1H8.2c-2.5 0-4.5-2.1-4.5-4.5V7.9c0-2.5 2.1-4.5 4.5-4.5h15.6c2.5 0 4.5 2.1 4.5 4.5v9.7c0 2.4-2.1 4.5-4.5 4.5M16 23.2v5M8.3 28.9h15.4",style:{fill:"none","stroke-width":"3","stroke-miterlimit":"10"}},null,-1)]))}const Bo={render:So};function fe(t,o,n){switch(o){case"POST":return se.post(t,n);case"PUT":return se.put(t,n);case"DELETE":return se.delete(t+"/"+n);default:return se.get(t,{params:n})}}const $o={class:"header"},Oo={class:"title"},Po={class:"right"},Io={class:"icon-wrapper"},To={class:"user-wrapper"},Do={style:{"font-size":"11px","font-weight":"bold"}},Mo={class:"user-popover-header"},Ao={style:{"font-size":"15px","font-weight":"bold"}},Uo=["onClick"],Ye=J(e.defineComponent({__name:"Header",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const{t:o}=_e.useI18n(),n=e.ref(),r=e.ref(),a=e.ref(),l=e.ref(),i=e.ref(!1),s=t,c=e.ref(),f=e.reactive({id:"",name:""}),b=e.ref(""),w=e.ref(Pe.global.locale),x=e.reactive([{id:"en",name:"English"},{id:"zh",name:"简体中文"}]);e.onMounted(()=>{var T,S,Y;b.value=decodeURIComponent($("passport_username").replace(/\+/g," ")),b.value===""&&Kt().then(({data:m})=>{var u;m.code==0&&(b.value=(u=m.data.name)!=null?u:m.data.displayId)}),(T=s.headerProjectConfig)!=null&&T.api?fe((S=s.headerProjectConfig)==null?void 0:S.api,"GET",{}).then(({data:m})=>{c.value=m.data}):(Y=s.headerProjectConfig)!=null&&Y.items&&(c.value=s.headerProjectConfig.items)});function $(T){for(var S=T+"=",Y=document.cookie.split(";"),m=0;m<Y.length;m++){for(var u=Y[m];u.charAt(0)==" ";)u=u.substring(1);if(u.indexOf(S)!=-1)return u.substring(S.length,u.length)}return""}function A(){Qt().then(()=>{const T=escape(window.location.href);window.location.href=`//${lt()}/?from=${T}#login`})}function I(T){Pe.global.locale.value=T,w.value=T,localStorage.setItem("locale",T)}function H(){window.open("https://passport.vancone.com/#/account/profile","_blank")}function U(){window.open(s.helpDocUrl,"_blank")}function ee(T){if(T==="allProjects")alert("show all projects");else for(let S of c.value)if(console.log("project.id",S.id,"command",T),S.id===T){Object.assign(f,S);break}}return(T,S)=>{const Y=e.resolveComponent("el-icon"),m=e.resolveComponent("el-dropdown-item"),u=e.resolveComponent("el-dropdown-menu"),_=e.resolveComponent("el-dropdown"),N=e.resolveComponent("el-popover"),p=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-avatar"),C=e.resolveComponent("el-menu-item"),V=e.resolveComponent("el-menu"),D=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",$o,[e.createElementVNode("div",Oo,[e.createElementVNode("div",{ref_key:"appCatalogButtonRef",ref:l,class:"icon-wrapper",style:{"margin-left":"8px"}},[e.createVNode(e.unref(yo))],512),e.createElementVNode("h1",null,e.toDisplayString(T.title),1),s.headerProjectConfig?(e.openBlock(),e.createBlock(_,{key:0,placement:"bottom-start",onCommand:ee},{dropdown:e.withCtx(()=>[e.createVNode(u,{style:{width:"300px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,O=>(e.openBlock(),e.createBlock(m,{command:O.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.name),1)]),_:2},1032,["command"]))),256)),e.createVNode(m,{divided:"",command:"allProjects"},{default:e.withCtx(()=>S[2]||(S[2]=[e.createTextVNode("全部项目")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(f.name)+" ",1),e.createVNode(Y,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowDown))]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{class:"app-popover","virtual-ref":l.value,trigger:"click","show-arrow":!1,"popper-style":"width: 500px; height: 500px; padding: 0; inset: 49px auto auto 0px"},{default:e.withCtx(()=>[e.createVNode(go,{visible:!0})]),_:1},8,["virtual-ref"]),e.createElementVNode("div",Po,[e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.workbench"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",Io,[e.createVNode(e.unref(Bo))])]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.help"),placement:"bottom"},{default:e.withCtx(()=>[s.helpDocUrl!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-wrapper",onClick:U},[e.createVNode(e.unref(ko))])):e.createCommentVNode("",!0)]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.notification"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"icon-wrapper",onClick:S[0]||(S[0]=O=>i.value=!0)},[e.createVNode(e.unref(Eo))])]),_:1},8,["content"]),e.createElementVNode("div",To,[e.createVNode(d,{size:30,src:"",ref_key:"avatarRef",ref:n},{default:e.withCtx(()=>[e.createElementVNode("span",Do,e.toDisplayString(b.value.substring(0,2)),1)]),_:1},512),e.createVNode(N,{teleported:!1,width:"280",effect:"dark",ref_key:"popoverRef",ref:r,"virtual-ref":n.value,trigger:"hover","virtual-triggering":""},{default:e.withCtx(()=>[e.createElementVNode("div",Mo,[e.createVNode(d,{size:48,src:""},{default:e.withCtx(()=>[e.createElementVNode("span",Ao,e.toDisplayString(b.value.substring(0,2)),1)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),e.createVNode(V,{class:"user-menu"},{default:e.withCtx(()=>[e.createVNode(C,{onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.userCenter")),1)]),_:1}),e.createVNode(C,{ref_key:"switchLanguageRef",ref:a,style:{display:"flext","justify-content":"space-between"}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("common.header.switchLanguage")),1),e.createVNode(Y,{style:{left:"15px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowRight))]),_:1})]),_:1},512),e.createVNode(N,{teleported:!1,width:"150",effect:"dark",ref:"popover2Ref",placement:"left-start","virtual-ref":a.value,trigger:"hover","virtual-triggering":"","popper-style":"height: 80px; left: -165px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,O=>(e.openBlock(),e.createElementBlock("div",{class:"select-list",onClick:P=>I(O.id)},[e.createElementVNode("span",null,e.toDisplayString(O.name),1),O.id===w.value?(e.openBlock(),e.createBlock(Y,{key:0,style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Check))]),_:1})):e.createCommentVNode("",!0)],8,Uo))),256))]),_:1},8,["virtual-ref"]),e.createVNode(C,{onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.signOut")),1)]),_:1})]),_:1})]),_:1},8,["virtual-ref"])])])]),e.createVNode(D,{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=O=>i.value=O),direction:"rtl",title:"Message Center"},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-b04b3245"]]),Fo={class:"menu-icon-wrapper",style:{"margin-left":"3px"}},Ro=["innerHTML"],Lo={class:"menu-icon-wrapper"},Go=["innerHTML"],jo=J(e.defineComponent({__name:"SideMenuItem",props:{menu:{}},setup(t){const o=t;return e.nextTick(()=>console.log("menu",o.menu)),(n,r)=>{const a=e.resolveComponent("SideMenuItem",!0),l=e.resolveComponent("el-sub-menu"),i=e.resolveComponent("el-menu-item");return n.menu.children&&n.menu.children.length>0?(e.openBlock(),e.createBlock(l,{key:0,index:n.menu.path},{title:e.withCtx(()=>{var s,c,f,b,w;return[e.createElementVNode("div",Fo,[(s=o.menu.meta)!=null&&s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((c=n.menu.meta)==null?void 0:c.icon),{key:0,class:"menu-icon"})):e.createCommentVNode("",!0),(f=o.menu.meta)!=null&&f.svgXml?(e.openBlock(),e.createElementBlock("div",{key:1,class:"svg-xml-icon",innerHTML:o.menu.meta.svgXml},null,8,Ro)):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(n.$t((w=(b=n.menu.meta)==null?void 0:b.title)!=null?w:"")),1)]}),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menu.children,s=>(e.openBlock(),e.createBlock(a,{key:s.path,route:s,menu:s},null,8,["route","menu"]))),128))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:o.menu.path,style:{height:"40px"}},{title:e.withCtx(()=>{var s,c;return[e.createElementVNode("span",null,e.toDisplayString(n.$t((c=(s=n.menu.meta)==null?void 0:s.title)!=null?c:"")),1)]}),default:e.withCtx(()=>{var s,c,f;return[e.createElementVNode("div",Lo,[(s=o.menu.meta)!=null&&s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((c=n.$props.menu.meta)==null?void 0:c.icon),{key:0,class:"menu-icon"})):e.createCommentVNode("",!0),((f=o.menu.meta)==null?void 0:f.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"svg-xml-icon",innerHTML:o.menu.meta.svgXml},null,8,Go)):e.createCommentVNode("",!0)])]}),_:1},8,["index"]))}}}),[["__scopeId","data-v-032308f8"]]),re=e.ref({}),dt={},We=e.ref([]);var pt=!1;function Ae(t,o,n){return Array.isArray(t)?(t.length=Math.max(t.length,o),t.splice(o,1,n),n):(t[o]=n,n)}function Je(t,o){if(Array.isArray(t)){t.splice(o,1);return}delete t[o]}function zo(){return ft().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ft(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:{}}const qo=typeof Proxy=="function",Ho="devtools-plugin:setup",Yo="plugin:settings:set";let xe,Ke;function Wo(){var t;return xe!==void 0||(typeof window!="undefined"&&window.performance?(xe=!0,Ke=window.performance):typeof globalThis!="undefined"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(xe=!0,Ke=globalThis.perf_hooks.performance):xe=!1),xe}function Jo(){return Wo()?Ke.now():Date.now()}class Ko{constructor(o,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=n;const r={};if(o.settings)for(const i in o.settings){const s=o.settings[i];r[i]=s.defaultValue}const a=`__vue-devtools-plugin-settings__${o.id}`;let l=Object.assign({},r);try{const i=localStorage.getItem(a),s=JSON.parse(i);Object.assign(l,s)}catch(i){}this.fallbacks={getSettings(){return l},setSettings(i){try{localStorage.setItem(a,JSON.stringify(i))}catch(s){}l=i},now(){return Jo()}},n&&n.on(Yo,(i,s)=>{i===this.plugin.id&&this.fallbacks.setSettings(s)}),this.proxiedOn=new Proxy({},{get:(i,s)=>this.target?this.target.on[s]:(...c)=>{this.onQueue.push({method:s,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,s)=>this.target?this.target[s]:s==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(s)?(...c)=>(this.targetQueue.push({method:s,args:c,resolve:()=>{}}),this.fallbacks[s](...c)):(...c)=>new Promise(f=>{this.targetQueue.push({method:s,args:c,resolve:f})})})}setRealTarget(o){return he(this,null,function*(){this.target=o;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(yield this.target[n.method](...n.args))})}}function mt(t,o){const n=t,r=ft(),a=zo(),l=qo&&n.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))a.emit(Ho,t,o);else{const i=l?new Ko(n,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:o,proxy:i}),i&&o(i.proxiedTarget)}}/*!
|
|
1
|
+
(function(E,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router"),require("axios"),require("element-plus"),require("@element-plus/icons-vue"),require("vue-i18n"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","axios","element-plus","@element-plus/icons-vue","vue-i18n","lodash"],e):(E=typeof globalThis!="undefined"?globalThis:E||self,e(E["console-component"]={},E.Vue,E.vueRouter,E.axios,E.ElementPlus,E.iconsVue,E.VueI18n,E.lodash))})(this,function(E,e,q,He,ge,Z,_e,pe){"use strict";var mr=Object.defineProperty,ur=Object.defineProperties;var hr=Object.getOwnPropertyDescriptors;var qt=Object.getOwnPropertySymbols;var gr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var Ht=(E,e,q)=>e in E?mr(E,e,{enumerable:!0,configurable:!0,writable:!0,value:q}):E[e]=q,qe=(E,e)=>{for(var q in e||(e={}))gr.call(e,q)&&Ht(E,q,e[q]);if(qt)for(var q of qt(e))_r.call(e,q)&&Ht(E,q,e[q]);return E},Yt=(E,e)=>ur(E,hr(e));var he=(E,e,q)=>new Promise((He,ge)=>{var Z=J=>{try{pe(q.next(J))}catch(Oe){ge(Oe)}},_e=J=>{try{pe(q.throw(J))}catch(Oe){ge(Oe)}},pe=J=>J.done?He(J.value):Promise.resolve(J.value).then(Z,_e);pe((q=q.apply(E,e)).next())});const J=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Oe={},Wt={class:"building"};function Jt(t,o){return e.openBlock(),e.createElementBlock("div",Wt)}const at=J(Oe,[["render",Jt],["__scopeId","data-v-07bd45d2"]]),se=He.create({timeout:2*60*1e3,withCredentials:!0});se.interceptors.request.use(t=>t),se.interceptors.response.use(t=>{const{headers:o,method:n}=t.config,{code:r,message:a}=t.data,{"No-Success-Message":l}=o,i=n!=="get";return r===0?(i&&!l&&ge.ElMessage({message:a,type:"success"}),Promise.resolve(t)):(ge.ElMessage({type:"error",message:a}),Promise.reject(new Error(`${r}`)))},t=>{var r;const{config:o,response:n}=t;if(n){const{status:a}=n;if(a===401){const s=window.escape(window.location.href);let c=(r=n.data.data)!=null?r:"//passport.vancone.com";window.location.href=`${c}/?from=${s}`}const{message:l,error:i}=n.data;ge.ElMessage({type:"error",message:l||i})}return Promise.reject(new Error(t.message||"Response Error"))});const lt=()=>{const{origin:t}=window.location;return t.includes("beta")||t.includes("localhost")?"passport.beta.vancone.com":"passport.vancone.com"},st=lt();function Kt(){return se.get(`//${st}/api/passport/service/v1/account`)}function Qt(){return se.delete(`//${st}/api/passport/service/v1/login`)}function Xt(){return se.get("//app-center.vancone.com/api/app-center/v1/app-group?pageSize=1000")}function Zt(){return se.get("//app-center.vancone.com/api/app-center/v1/store/app?pageSize=1000")}const vt={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function eo(t,o){return e.openBlock(),e.createElementBlock("svg",vt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M480 544v352H128V544zm416 288v64H544v-64zM416 608H192v224h224zm480 83.072v64H544v-64zM896 544v64H544v-64zM480 128v352H128V128zm416 0v352H544V128zm-480 64H192v224h224zm416 0H608v224h224z"},null,-1)]))}const to={render:eo},oo={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function no(t,o){return e.openBlock(),e.createElementBlock("svg",oo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M487.01 113.079a56.076 56.076 0 0 1 73.216 21.918l1.901 3.536 100.401 203.215L886.93 374.32a56.076 56.076 0 0 1 33.939 92.647l-2.877 3.024-162.329 158.061L793.99 851.31a56.076 56.076 0 0 1-77.726 60.855l-3.609-1.707-200.801-105.472-200.802 105.448a56.076 56.076 0 0 1-81.871-55.345l.512-3.78 38.351-223.256-162.328-158.061a56.076 56.076 0 0 1 27.282-94.989l3.78-.682 224.377-32.573L461.58 138.533a56.08 56.08 0 0 1 25.43-25.454M409.722 408.6l-228.206 33.134 165.132 160.744-39.01 227.133 204.216-107.252 204.19 107.252-39.01-227.133 165.133-160.744L613.96 408.6 511.854 201.9 409.698 408.6z"},null,-1)]))}const ro={render:no},ao={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function lo(t,o){return e.openBlock(),e.createElementBlock("svg",ao,o[0]||(o[0]=[e.createElementVNode("path",{d:"M512 109.714c222.184 0 402.286 180.102 402.286 402.286S734.184 914.286 512 914.286l-2.901-.122c-104.546-8.314-189.416-43.52-253.075-105.13l-.024 80.87h-73.143V658.287h207.238v73.143H283.99c52.858 65.048 128.561 101.4 229.45 109.714l7.63-.122C698.662 836.218 841.144 690.737 841.144 512c0-181.784-147.359-329.143-329.143-329.143S182.857 330.216 182.857 512h-73.143c0-222.184 180.102-402.286 402.286-402.286m-48.762 182.857h73.143V475.43h182.857v73.142h-256z"},null,-1)]))}const so={render:lo},io={class:"app-catalog-wrapper"},co={class:"catalog-wrapper"},po={class:"service-list"},fo={class:"app-icon-container"},mo=["href"],uo=["innerHTML"],ho={key:1,class:"app-icon"},go=J(e.defineComponent({__name:"AppCatalog",props:{visible:{type:Boolean}},setup(t){const o=e.reactive([]);function n(){Xt().then(({data:r})=>{o.splice(0,o.length,...r.data.list),Zt().then(({data:a})=>{const l=a.data;o.forEach(i=>{i.apps=l.filter(s=>s.groupId===i.id)})})})}return n(),(r,a)=>{const l=e.resolveComponent("el-input"),i=e.resolveComponent("el-scrollbar"),s=e.resolveComponent("el-tab-pane"),c=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",io,[e.createVNode(c,{"tab-position":"left"},{default:e.withCtx(()=>[e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(to),{class:"left-icon"})]),default:e.withCtx(()=>[a[0]||(a[0]=e.createElementVNode("h1",{class:"catalog-title"},"Apps",-1)),e.createVNode(l,{class:"search-box","prefix-icon":e.unref(Z.Search),placeholder:"Search apps"},null,8,["prefix-icon"]),e.createVNode(i,{class:"right-area",style:{width:"100%",height:"400px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,f=>(e.openBlock(),e.createElementBlock("div",po,[e.createElementVNode("h1",null,e.toDisplayString(f.name),1),e.createElementVNode("div",fo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.apps,b=>{var w,x;return e.openBlock(),e.createElementBlock("a",{style:e.normalizeStyle([{"text-decoration":"none"},{pointerEvents:((w=b.homepageUrl)==null?void 0:w.length)>0?"auto":"none"}]),target:"_blank",href:b.homepageUrl},[b.iconSvg!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:b.iconSvg},null,8,uo)):(e.openBlock(),e.createElementBlock("div",ho," ")),e.createElementVNode("h2",{style:e.normalizeStyle({color:((x=b.homepageUrl)==null?void 0:x.length)>0?"#555":"#bbb"})},e.toDisplayString(b.name),5)],12,mo)}),256))])]))),256))])]),_:1})]),_:1}),e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(ro),{class:"left-icon"})]),default:e.withCtx(()=>[a[1]||(a[1]=e.createElementVNode("h1",{class:"catalog-title"},"Favorites",-1))]),_:1}),e.createVNode(s,null,{label:e.withCtx(()=>[e.createVNode(e.unref(so),{class:"left-icon"})]),default:e.withCtx(()=>[a[2]||(a[2]=e.createElementVNode("h1",{class:"catalog-title"},"Recently",-1))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-fcfb021b"]]),it={common:{header:{product:"Products",help:"Help",notification:"Notification",workbench:"Workbench",userCenter:"User Center",switchLanguage:"Languages",signOut:"Sign out"},table:{create:"Create",delete:"Delete",add:"Add",remove:"Remove",search:"Search",edit:"Edit",operation:"Operations",viewSelected:"View Selected",warning:"Warning",select:"Select"},basic:{cancel:"Cancel",confirm:"Confirm",createdTime:"Created Time",description:"Description",detail:"Details",more:"More",name:"Name",no:"No",save:"Save",summary:"Summary",type:"Type",updatedTime:"Updated Time",yes:"Yes"}}},ct={common:{header:{product:"产品",help:"帮助",notification:"通知",workbench:"工作台",userCenter:"用户中心",switchLanguage:"语言",signOut:"退出登录"},table:{create:"创建",delete:"删除",add:"添加",remove:"移除",search:"搜索",edit:"编辑",operation:"操作",viewSelected:"查看已选",warning:"风险提示",select:"选择"},basic:{cancel:"取消",confirm:"确认",createdTime:"创建时间",description:"描述",detail:"详情",more:"更多",name:"名称",no:"否",save:"保存",summary:"基本信息",type:"类型",updatedTime:"更新时间",yes:"是"}}},Pe=_e.createI18n({legacy:!1,locale:localStorage.getItem("locale")||navigator.language.slice(0,2),messages:{en:it,zh:ct}}),_o={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function bo(t,o){return e.openBlock(),e.createElementBlock("svg",_o,o[0]||(o[0]=[e.createElementVNode("path",{d:"M22.6 29.1h6.6v-6.6h-6.6m0-3.2h6.6v-6.6h-6.6m-9.9-3.3h6.6V2.9h-6.6m9.9 6.5h6.6V2.9h-6.6m-9.9 16.4h6.6v-6.6h-6.6m-9.8 6.6h6.6v-6.6H2.9m0 16.4h6.6v-6.6H2.9m9.8 6.6h6.6v-6.6h-6.6M2.9 9.4h6.6V2.9H2.9z"},null,-1)]))}const yo={render:bo},wo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function Co(t,o){return e.openBlock(),e.createElementBlock("svg",wo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M651.404 284.363c-14.446-23.404-34.322-43.717-58.832-56.969A164.4 164.4 0 0 0 512 206.328a157.8 157.8 0 0 0-63.864 12.893 163.8 163.8 0 0 0-52.22 35.105c-14.77 14.405-26.455 32.338-35.04 51.895a164 164 0 0 0-12.829 63.958c0 15.233 6.615 28.88 15.993 39.036 10.063 9.363 23.72 15.988 38.92 15.988a56.73 56.73 0 0 0 38.528-15.988c10.134-10.155 16.747-23.803 16.747-39.036a54.8 54.8 0 0 1 3.918-21.066c3.126-6.232 6.614-12.495 11.643-17.17a60.4 60.4 0 0 1 17.143-11.703c6.614-2.304 14.053-4.646 21.061-4.646a53.95 53.95 0 0 1 38.167 16.35c18.652 18.364 21.384 49.946 7.759 71.803-5.47 7.779-12.83 13.685-19.443 19.915-19.874 16.78-39.748 33.96-55.31 62.045-15.598 27.258-25.733 65.537-25.733 122.47a55.76 55.76 0 0 0 16.352 39.035c9.38 9.758 23.36 15.591 38.204 15.591 15.167 0 29.578-5.833 38.921-15.591a55.6 55.6 0 0 0 16.354-39.036c0-32.769 5.067-53.803 13.228-68.635 8.59-14.873 18.687-24.198 28.822-32.806 9.74-8.57 19.048-16.383 27.638-25.35 8.158-8.966 15.992-18.69 22.21-30.825 5.462-9.327 9.344-21.03 12.435-34.318 7.008-29.276 7.008-63.197-2.3-92.47-4.313-13.647-10.136-27.69-17.899-39.394zM512 706.508a53.51 53.51 0 0 0-38.204 15.988 54.725 54.725 0 0 0 0 78.035A53.51 53.51 0 0 0 512 816.519c15.167 0 29.578-6.232 38.921-15.988a54.72 54.72 0 0 0 0-78.035c-9.343-9.758-23.754-15.988-38.921-15.988m350.046-543.104c-88.409-88.95-211.463-144.363-347.744-145.12-137.826-.792-260.887 54.627-351.194 144.365-89.598 89.7-144.835 213-144.835 348.757a528.6 528.6 0 0 0 10.099 100.288c7.008 31.581 16.352 63.597 28.788 92.47 37.808 90.493 102.03 165.394 180.305 218.113a493.11 493.11 0 0 0 623.435-61.29c90.315-89.34 144.798-213.035 144.798-349.585 0-135.362-54.483-258.228-143.649-348.001zm-137.86 668.742a383.537 383.537 0 0 1-565.784-170.902c-10.135-22.614-17.106-46.814-22.57-71.768-4.636-25.388-7.758-51.132-7.758-78.07a381.15 381.15 0 0 1 112.92-271.516c69.29-69.463 165.86-112.387 272.562-112.387a385.85 385.85 0 0 1 352.768 234.1 398 398 0 0 1 29.58 149.803 393.7 393.7 0 0 1-29.58 149.834 387.25 387.25 0 0 1-142.137 170.906"},null,-1)]))}const ko={render:Co},Vo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function No(t,o){return e.openBlock(),e.createElementBlock("svg",Vo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M358.4 871.2H45.152C19.936 871.2 0 843.904 0 819.2s19.936-50.624 45.152-50.624h56.64l-1.088-283.168c0-204.608 164.032-374.56 337.056-412.576v-1.28C437.76 32.032 470.496 0 510.848 0s73.088 32.032 73.088 71.552v1.28C756.96 110.848 922.08 280.8 922.08 485.408v283.168h55.008c25.216 0 46.944 25.92 46.944 50.624s-21.696 52-46.944 52H665.632c-.416 84.48-69.024 152.8-153.6 152.8s-153.184-68.352-153.6-152.8zm102.4 0c.416 27.904 23.168 50.4 51.2 50.4s50.784-22.496 51.2-50.4zm357.216-103.328v-282.56c0-179.808-149.536-329.984-307.104-329.984S204.544 305.472 204.544 485.312v282.56z"},null,-1)]))}const Eo={render:No},xo={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function So(t,o){return e.openBlock(),e.createElementBlock("svg",xo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M23.8 22.1H8.2c-2.5 0-4.5-2.1-4.5-4.5V7.9c0-2.5 2.1-4.5 4.5-4.5h15.6c2.5 0 4.5 2.1 4.5 4.5v9.7c0 2.4-2.1 4.5-4.5 4.5M16 23.2v5M8.3 28.9h15.4",style:{fill:"none","stroke-width":"3","stroke-miterlimit":"10"}},null,-1)]))}const Bo={render:So};function fe(t,o,n){switch(o){case"POST":return se.post(t,n);case"PUT":return se.put(t,n);case"DELETE":return se.delete(t+"/"+n);default:return se.get(t,{params:n})}}const $o={class:"header"},Oo={class:"title"},Po={class:"right"},Io={class:"icon-wrapper"},To={class:"user-wrapper"},Do={style:{"font-size":"11px","font-weight":"bold"}},Mo={class:"user-popover-header"},Ao={style:{"font-size":"15px","font-weight":"bold"}},Uo=["onClick"],Ye=J(e.defineComponent({__name:"Header",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const{t:o}=_e.useI18n(),n=e.ref(),r=e.ref(),a=e.ref(),l=e.ref(),i=e.ref(!1),s=t,c=e.ref(),f=e.reactive({id:"",name:""}),b=e.ref(""),w=e.ref(Pe.global.locale),x=e.reactive([{id:"en",name:"English"},{id:"zh",name:"简体中文"}]);e.onMounted(()=>{var T,S,Y;b.value=decodeURIComponent($("passport_username").replace(/\+/g," ")),b.value===""&&Kt().then(({data:m})=>{var u;m.code==0&&(b.value=(u=m.data.name)!=null?u:m.data.displayId)}),(T=s.headerProjectConfig)!=null&&T.api?fe((S=s.headerProjectConfig)==null?void 0:S.api,"GET",{}).then(({data:m})=>{c.value=m.data}):(Y=s.headerProjectConfig)!=null&&Y.items&&(c.value=s.headerProjectConfig.items)});function $(T){for(var S=T+"=",Y=document.cookie.split(";"),m=0;m<Y.length;m++){for(var u=Y[m];u.charAt(0)==" ";)u=u.substring(1);if(u.indexOf(S)!=-1)return u.substring(S.length,u.length)}return""}function A(){Qt().then(()=>{const T=escape(window.location.href);window.location.href=`//${lt()}/?from=${T}#login`})}function I(T){Pe.global.locale.value=T,w.value=T,localStorage.setItem("locale",T)}function H(){window.open("https://passport.vancone.com/#/account/profile","_blank")}function U(){window.open(s.helpDocUrl,"_blank")}function ee(T){if(T==="allProjects")alert("show all projects");else for(let S of c.value)if(console.log("project.id",S.id,"command",T),S.id===T){Object.assign(f,S);break}}return(T,S)=>{const Y=e.resolveComponent("el-icon"),m=e.resolveComponent("el-dropdown-item"),u=e.resolveComponent("el-dropdown-menu"),_=e.resolveComponent("el-dropdown"),N=e.resolveComponent("el-popover"),p=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-avatar"),C=e.resolveComponent("el-menu-item"),V=e.resolveComponent("el-menu"),D=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",$o,[e.createElementVNode("div",Oo,[e.createElementVNode("div",{ref_key:"appCatalogButtonRef",ref:l,class:"icon-wrapper",style:{"margin-left":"8px"}},[e.createVNode(e.unref(yo))],512),e.createElementVNode("h1",null,e.toDisplayString(T.title),1),s.headerProjectConfig?(e.openBlock(),e.createBlock(_,{key:0,placement:"bottom-start",onCommand:ee},{dropdown:e.withCtx(()=>[e.createVNode(u,{style:{width:"300px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,O=>(e.openBlock(),e.createBlock(m,{command:O.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.name),1)]),_:2},1032,["command"]))),256)),e.createVNode(m,{divided:"",command:"allProjects"},{default:e.withCtx(()=>S[2]||(S[2]=[e.createTextVNode("全部项目")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(f.name)+" ",1),e.createVNode(Y,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowDown))]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{class:"app-popover","virtual-ref":l.value,trigger:"click","show-arrow":!1,"popper-style":"width: 500px; height: 500px; padding: 0; inset: 49px auto auto 0px"},{default:e.withCtx(()=>[e.createVNode(go,{visible:!0})]),_:1},8,["virtual-ref"]),e.createElementVNode("div",Po,[e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.workbench"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",Io,[e.createVNode(e.unref(Bo))])]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.help"),placement:"bottom"},{default:e.withCtx(()=>[s.helpDocUrl!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-wrapper",onClick:U},[e.createVNode(e.unref(ko))])):e.createCommentVNode("",!0)]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.notification"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"icon-wrapper",onClick:S[0]||(S[0]=O=>i.value=!0)},[e.createVNode(e.unref(Eo))])]),_:1},8,["content"]),e.createElementVNode("div",To,[e.createVNode(d,{size:30,src:"",ref_key:"avatarRef",ref:n},{default:e.withCtx(()=>[e.createElementVNode("span",Do,e.toDisplayString(b.value.substring(0,2)),1)]),_:1},512),e.createVNode(N,{teleported:!1,width:"280",effect:"dark",ref_key:"popoverRef",ref:r,"virtual-ref":n.value,trigger:"hover","virtual-triggering":""},{default:e.withCtx(()=>[e.createElementVNode("div",Mo,[e.createVNode(d,{size:48,src:""},{default:e.withCtx(()=>[e.createElementVNode("span",Ao,e.toDisplayString(b.value.substring(0,2)),1)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),e.createVNode(V,{class:"user-menu"},{default:e.withCtx(()=>[e.createVNode(C,{onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.userCenter")),1)]),_:1}),e.createVNode(C,{ref_key:"switchLanguageRef",ref:a,style:{display:"flext","justify-content":"space-between"}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("common.header.switchLanguage")),1),e.createVNode(Y,{style:{left:"15px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowRight))]),_:1})]),_:1},512),e.createVNode(N,{teleported:!1,width:"150",effect:"dark",ref:"popover2Ref",placement:"left-start","virtual-ref":a.value,trigger:"hover","virtual-triggering":"","popper-style":"height: 80px; left: -165px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,O=>(e.openBlock(),e.createElementBlock("div",{class:"select-list",onClick:P=>I(O.id)},[e.createElementVNode("span",null,e.toDisplayString(O.name),1),O.id===w.value?(e.openBlock(),e.createBlock(Y,{key:0,style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Check))]),_:1})):e.createCommentVNode("",!0)],8,Uo))),256))]),_:1},8,["virtual-ref"]),e.createVNode(C,{onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.signOut")),1)]),_:1})]),_:1})]),_:1},8,["virtual-ref"])])])]),e.createVNode(D,{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=O=>i.value=O),direction:"rtl",title:"Message Center"},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-b04b3245"]]),Fo={class:"menu-icon-wrapper",style:{"margin-left":"3px"}},Ro=["innerHTML"],Lo={class:"menu-icon-wrapper"},Go=["innerHTML"],jo=J(e.defineComponent({__name:"SideMenuItem",props:{menu:{}},setup(t){const o=t;return e.nextTick(()=>console.log("menu",o.menu)),(n,r)=>{const a=e.resolveComponent("SideMenuItem",!0),l=e.resolveComponent("el-sub-menu"),i=e.resolveComponent("el-menu-item");return n.menu.children&&n.menu.children.length>0?(e.openBlock(),e.createBlock(l,{key:0,index:n.menu.path},{title:e.withCtx(()=>{var s,c,f,b,w;return[e.createElementVNode("div",Fo,[(s=o.menu.meta)!=null&&s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((c=n.menu.meta)==null?void 0:c.icon),{key:0,class:"menu-icon"})):e.createCommentVNode("",!0),(f=o.menu.meta)!=null&&f.svgXml?(e.openBlock(),e.createElementBlock("div",{key:1,class:"svg-xml-icon",innerHTML:o.menu.meta.svgXml},null,8,Ro)):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(n.$t((w=(b=n.menu.meta)==null?void 0:b.title)!=null?w:"")),1)]}),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menu.children,s=>(e.openBlock(),e.createBlock(a,{key:s.path,route:s,menu:s},null,8,["route","menu"]))),128))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:o.menu.path,style:{height:"40px"}},{title:e.withCtx(()=>{var s,c;return[e.createElementVNode("span",null,e.toDisplayString(n.$t((c=(s=n.menu.meta)==null?void 0:s.title)!=null?c:"")),1)]}),default:e.withCtx(()=>{var s,c,f;return[e.createElementVNode("div",Lo,[(s=o.menu.meta)!=null&&s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((c=n.$props.menu.meta)==null?void 0:c.icon),{key:0,class:"menu-icon"})):e.createCommentVNode("",!0),((f=o.menu.meta)==null?void 0:f.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"svg-xml-icon",innerHTML:o.menu.meta.svgXml},null,8,Go)):e.createCommentVNode("",!0)])]}),_:1},8,["index"]))}}}),[["__scopeId","data-v-032308f8"]]),re=e.ref({}),dt={},We=e.ref([]);var pt=!1;function Ae(t,o,n){return Array.isArray(t)?(t.length=Math.max(t.length,o),t.splice(o,1,n),n):(t[o]=n,n)}function Je(t,o){if(Array.isArray(t)){t.splice(o,1);return}delete t[o]}function zo(){return ft().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ft(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:{}}const qo=typeof Proxy=="function",Ho="devtools-plugin:setup",Yo="plugin:settings:set";let xe,Ke;function Wo(){var t;return xe!==void 0||(typeof window!="undefined"&&window.performance?(xe=!0,Ke=window.performance):typeof globalThis!="undefined"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(xe=!0,Ke=globalThis.perf_hooks.performance):xe=!1),xe}function Jo(){return Wo()?Ke.now():Date.now()}class Ko{constructor(o,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=n;const r={};if(o.settings)for(const i in o.settings){const s=o.settings[i];r[i]=s.defaultValue}const a=`__vue-devtools-plugin-settings__${o.id}`;let l=Object.assign({},r);try{const i=localStorage.getItem(a),s=JSON.parse(i);Object.assign(l,s)}catch(i){}this.fallbacks={getSettings(){return l},setSettings(i){try{localStorage.setItem(a,JSON.stringify(i))}catch(s){}l=i},now(){return Jo()}},n&&n.on(Yo,(i,s)=>{i===this.plugin.id&&this.fallbacks.setSettings(s)}),this.proxiedOn=new Proxy({},{get:(i,s)=>this.target?this.target.on[s]:(...c)=>{this.onQueue.push({method:s,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,s)=>this.target?this.target[s]:s==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(s)?(...c)=>(this.targetQueue.push({method:s,args:c,resolve:()=>{}}),this.fallbacks[s](...c)):(...c)=>new Promise(f=>{this.targetQueue.push({method:s,args:c,resolve:f})})})}setRealTarget(o){return he(this,null,function*(){this.target=o;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(yield this.target[n.method](...n.args))})}}function mt(t,o){const n=t,r=ft(),a=zo(),l=qo&&n.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))a.emit(Ho,t,o);else{const i=l?new Ko(n,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:o,proxy:i}),i&&o(i.proxiedTarget)}}/*!
|
|
2
2
|
* pinia v2.2.6
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|