import{a5 as L,u as M,a as z,I as F,b as i,o as l,c as r,d as t,e as a,i as h,g as H,a6 as P,F as v,h as w,N as x,Z as m,s as C,f as _,t as B,z as R,H as f,k as T,E as U}from"./index.699f1124.js";import{i as Z}from"./index.a72b5840.js";const q={key:0,class:"app-container"},A=f("\u8FD4\u56DE"),G={key:0},J={key:1},K=_("p",{class:"text-danger"},"\u5BA1\u6838\u62D2\u7EDD",-1),O=["onClick"],Q={key:2},W=f("\u7533\u8BF7"),X={key:0},Y=f("\u8FDB\u5165"),ae={__name:"index",setup(ee){const n=T();L();const b=M(),c=z([]),j={1:"\u4F01\u4E1A",2:"\u4E13\u5BB6",3:"\u7814\u7A76\u673A\u6784",4:"\u5B9E\u9A8C\u5BA4",5:"\u79D1\u6280\u7ECF\u7EAA\u4EBA"};F(()=>{Z().then(e=>{e.data.forEach(o=>{c.value.push({id:o.roleId,title:j[o.roleId],status:o.status})})})});function S(e){alert(`\u62D2\u7EDD\u539F\u56E0\uFF1A
`+e.remark)}function N(){return c.value.some(e=>e.status==0)}const $=()=>{n.push({path:"/"})};function D(e){if(N())return U.alert("\u60A8\u5DF2\u6709\u5165\u9A7B\u7533\u8BF7");e.status==="4"||e.status==="2"?e.id==1?n.push({path:"/identity/enterprise"}):e.id==2?n.push({path:"/identity/expert"}):e.id==3?n.push({path:"/identity/research"}):e.id==4?n.push({path:"/identity/laboratory"}):e.id==5&&n.push({path:"/identity/agent"}):e.status===1&&alert("\u60A8\u5DF2\u5165\u9A7B\uFF0C\u8BF7\u8FDB\u5165\u540E\u53F0")}const E=async e=>{let o="";e.id==1?o=n.resolve({path:"/admin"}):e.id==2?o=n.resolve({path:"/admin"}):e.id==3?o=n.resolve({path:"/admin"}):e.id==4?o=n.resolve({path:"/admin"}):e.id==5&&(o=n.resolve({path:"/five"})),b.switchRole(e.id),window.open(o.href,"_blank")};return(e,o)=>{const V=i("el-button"),d=i("el-col"),I=i("el-alert"),p=i("el-row"),y=i("el-image"),g=i("el-link"),u=i("el-card");return c.value.length?(l(),r("div",q,[t(p,null,{default:a(()=>[t(d,{span:2},{default:a(()=>[t(V,{size:"small",icon:H(P),round:"",onClick:$},{default:a(()=>[A]),_:1},8,["icon"])]),_:1}),t(d,{span:22},{default:a(()=>[t(I,{title:"\u6E29\u99A8\u63D0\u793A\uFF1A\u5982\u662F\u4F01\u4E1A\u8BF7\u5165\u9A7B\u4F01\u4E1A\u540E\u53F0\uFF0C\u4E13\u5BB6\u8BF7\u5165\u9A7B\u4E13\u5BB6\u540E\u53F0\uFF0C\u5E76\u5B8C\u5584\u8D44\u6599",type:"warning",style:{marginBottom:"10px"}})]),_:1})]),_:1}),t(u,{shadow:"always"},{default:a(()=>[t(p,{gutter:20,justify:"center"},{default:a(()=>[(l(!0),r(v,null,w(c.value.slice(0,5),s=>x((l(),C(d,{span:4,key:s.id,onClick:k=>D(s)},{default:a(()=>[t(u,{style:{"text-align":"center",height:"100%"}},{default:a(()=>[t(y,{style:{height:"100px"},src:"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",fit:"cover"}),_("h3",null,B(`${s.title}\u5165\u9A7B`),1),s.status==0?(l(),r("p",G,"\u5BA1\u6838\u4E2D")):s.status==2?(l(),r("div",J,[K,_("p",{class:"text-navy",style:{cursor:"pointer"},onClick:R(k=>S(s),["stop"])}," \u67E5\u770B\u62D2\u7EDD\u539F\u56E0 ",8,O)])):s.status==4?(l(),r("div",Q,[t(g,{type:"primary"},{default:a(()=>[W]),_:1})])):h("",!0)]),_:2},1024)]),_:2},1032,["onClick"])),[[m,s.id<=2]])),128))]),_:1})]),_:1}),t(u,{class:"mt20",shadow:"always"},{default:a(()=>[t(p,{gutter:20,justify:"center"},{default:a(()=>[(l(!0),r(v,null,w(c.value.slice(0,5),s=>x((l(),C(d,{span:4,key:s.id},{default:a(()=>[t(u,{style:{"text-align":"center",height:"100%"}},{default:a(()=>[t(y,{style:{height:"100px"},src:"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",fit:"cover"}),_("h3",null,B(`${s.title}\u540E\u53F0`),1),s.status==1?(l(),r("p",X,[t(g,{type:"primary",onClick:k=>E(s)},{default:a(()=>[Y]),_:2},1032,["onClick"])])):h("",!0)]),_:2},1024)]),_:2},1024)),[[m,s.id<=2]])),128))]),_:1})]),_:1})])):h("",!0)}}};export{ae as default};
