var M=Object.defineProperty;var D=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var B=(r,e,a)=>e in r?M(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,$=(r,e)=>{for(var a in e||(e={}))P.call(e,a)&&B(r,a,e[a]);if(D)for(var a of D(e))S.call(e,a)&&B(r,a,e[a]);return r};var g=(r,e,a)=>new Promise((m,t)=>{var N=n=>{try{_(a.next(n))}catch(b){t(b)}},c=n=>{try{_(a.throw(n))}catch(b){t(b)}},_=n=>n.done?m(n.value):Promise.resolve(n.value).then(N,c);_((a=a.apply(r,e)).next())});import{_ as E}from"./index.vue_vue_type_style_index_0_lang-2d65f8f4.js";import{a as R,d as T,j as z,k as G}from"./index-dfcd01ad.js";import{d as H,A as J,r as q,a as K,j as y,o as l,c as k,f as i,h as u,i as p,e as I,w as d,F as w,v as C,b as A}from"./index-90c78f99.js";import{_ as O}from"./application-indicator-info.vue_vue_type_style_index_0_lang-c17490a4.js";import{_ as j}from"./description-items.vue_vue_type_script_setup_true_name_descriptionItems_lang-e9f0ca3a.js";import{d as Q}from"./index-1ef73356.js";import"./close-d81f4a2b.js";import"./index.vue_vue_type_style_index_0_lang-f807b015.js";import"./index.vue_vue_type_style_index_0_lang-3eaf88fd.js";import"./uploadAction-50b8a6f7.js";import"./useCurrentInstance-cd4729ef.js";const W={class:"application-library-detail page-content w-full mr-16"},X={class:"p-16"},Y={class:"p-16"},pe=H({__name:"index",setup(r){const e=J(),a=q(),m=q(0),t=q(e.query.projectId||a.value&&a.value.length?0:1),N=()=>g(this,null,function*(){if(e.query.appId){const s=yield R(e.query.appId);a.value=s.data,a.value&&a.value.length&&(t.value=e.query.tab?Number(e.query.tab):0)}else if(e.query.projectId){const s=yield Q(Number(e.query.projectId));a.value=s.data,t.value=e.query.tab?Number(e.query.tab):0}}),c=q(),_=()=>g(this,null,function*(){if(e.query.appId){b();const s=yield T(Number(e.query.appId));c.value=$({},s.data)}else if(e.query.projectId){const s=yield z(Number(e.query.projectId));c.value=s.data}}),n=q([{indexName:"应用",children:[{indexName:"基础信息",warnState:3,children:[{indexName:"是否最佳应用",indexValue:"是",warnState:0}]}]}]),b=()=>g(this,null,function*(){const s=yield G(e.query.appId);n.value=s.data});return K(()=>{console.log(e.query.tab),t.value=e.query.tab?Number(e.query.tab):a.value&&a.value.length||e.query.projectId?0:1,console.log(t.value),_(),N()}),(s,v)=>{const U=y("page-title"),V=y("el-tab-pane"),F=y("el-tabs"),x=y("el-collapse-item"),h=y("el-collapse"),L=y("el-card");return l(),k("div",W,[i(e).name==="applicationLibraryDetail"?(l(),u(E,{key:0,style:{margin:"0"}})):p("",!0),I(U),I(L,{class:"my-card tab-card",shadow:"never"},{header:d(()=>[I(F,{modelValue:t.value,"onUpdate:modelValue":v[0]||(v[0]=o=>t.value=o)},{default:d(()=>[a.value&&a.value.length||i(e).query.projectId?(l(),u(V,{key:0,label:"项目信息",name:0})):p("",!0),i(e).query.appId||c.value&&c.value.length?(l(),u(V,{key:1,label:"应用信息",name:1})):p("",!0),i(e).query.appId?(l(),u(V,{key:2,label:"应用指标信息",name:2})):p("",!0)]),_:1},8,["modelValue"])]),default:d(()=>[t.value===0||t.value===1?(l(),k(w,{key:0},[i(e).query.appId&&t.value===0?(l(),u(h,{key:0,modelValue:m.value,"onUpdate:modelValue":v[1]||(v[1]=o=>m.value=o),class:"custom-collapse bg"},{default:d(()=>[(l(!0),k(w,null,C(a.value,(o,f)=>(l(),u(x,{key:f,title:`${o.projectName}`,class:"index-item mb-8",name:f},{default:d(()=>[A("div",X,[I(j,{item:o,"active-tab":t.value},null,8,["item","active-tab"])])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])):p("",!0),i(e).query.appId&&t.value===1&&c.value?(l(),u(j,{key:1,item:c.value,"active-tab":t.value},null,8,["item","active-tab"])):p("",!0),i(e).query.projectId&&t.value===0&&a.value?(l(),u(j,{key:2,item:a.value,"active-tab":t.value},null,8,["item","active-tab"])):p("",!0),i(e).query.projectId&&t.value===1?(l(),u(h,{key:3,modelValue:m.value,"onUpdate:modelValue":v[2]||(v[2]=o=>m.value=o),class:"custom-collapse bg"},{default:d(()=>[(l(!0),k(w,null,C(c.value,(o,f)=>(l(),u(x,{key:f,title:`${o.applicationName}`,class:"index-item mb-8",name:f},{default:d(()=>[A("div",Y,[I(j,{item:o,"active-tab":t.value},null,8,["item","active-tab"])])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])):p("",!0)],64)):(l(),u(O,{key:1,data:n.value},null,8,["data"]))]),_:1})])}}});export{pe as default};
