import{M as w,aC as I,aD as B,aA as j,K as D}from"./index.17037962789732.js";import"./index.170379627897315.js";import"./index.1703796278973303.js";import"./index.1703796278973309.js";import M from"./index.1703796278973177.js";import C from"./index.1703796278973180.js";import K from"./index.1703796278973179.js";import S from"./index.1703796278973178.js";import{s as N,g as V}from"./initHome.1703796278973.js";import{c as U}from"./system.1703796278973.js";import{d as z,k as i,a1 as A,o as E,x as G,z as e,b as t,a as s,u as m,M as H,t as J,G as L,H as T}from"./vue.1703796278973.js";import{_ as q}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import"./index.170379627897329.js";import"./index.170379627897330.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import"./index.170379627897314.js";import"./comm.1703796278973.js";import"./consts.1703796278973.js";import"./index.1703796278973302.js";import"./baseMenu.1703796278973.js";import"./index.170379627897337.js";import"./index.170379627897325.js";import"./index.170379627897332.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./404.1703796278973.js";const o=l=>(L("data-v-075efa34"),l=l(),T(),l),F={class:"page-container"},O=o(()=>e("div",{class:"container-text"},[e("div",{class:"container-title"},"系统初始化")],-1)),P={class:"container-box"},Q={class:"container-main"},W={class:"container-right"},X=o(()=>e("span",{class:"title"},"基本信息",-1)),Y=o(()=>e("span",{class:"sub-title"},"配置平台名称、登录背景图、主题色等基本信息",-1)),Z=o(()=>e("span",{class:"title"},"菜单初始化",-1)),$=o(()=>e("span",{class:"sub-title"},"初始化菜单数据",-1)),ee=o(()=>e("span",{class:"title"},"角色初始化",-1)),te=o(()=>e("span",{class:"sub-title"},"初始化内置角色与权限数据",-1)),se=o(()=>e("span",{class:"title"},"初始化数据",-1)),oe=o(()=>e("span",{class:"sub-title"},"初始化设备接入示例数据",-1)),ae=z({__name:"index",setup(l){const u=i(),f=i(),d=i(),v=i(),n=i(!1),_=i("1"),y=i(!1);U();const R=()=>{window.location.href="/"},g=async()=>{n.value=!0;const r=await u.value.submitBasic();if(!r){n.value=!1;return}const c=await v.value.updataMenu();if(!c){n.value=!1;return}const a=await f.value.submitRole();if(console.log(a),!a){n.value=!1;return}const p=await d.value.save();if(!p){n.value=!1;return}n.value=!1,r&&c&&a&&p&&(w.success("保存成功"),(await N()).status===200&&R())},b=async()=>{const r=await V();r.status===200&&r.result.length};return A(()=>{b()}),(r,c)=>{const a=I,p=B,h=j,k=D;return E(),G("div",F,[O,e("div",P,[e("div",Q,[e("div",W,[t(h,{spinning:m(y)},{default:s(()=>[t(p,{activeKey:m(_),"onUpdate:activeKey":c[0]||(c[0]=x=>H(_)?_.value=x:null),accordion:""},{default:s(()=>[t(a,{key:"1"},{header:s(()=>[X,Y]),default:s(()=>[t(M,{ref_key:"basicRef",ref:u},null,512)]),_:1}),t(a,{key:"2",forceRender:""},{header:s(()=>[Z,$]),default:s(()=>[t(K,{ref_key:"menuRef",ref:v},null,512)]),_:1}),t(a,{key:"3",forceRender:""},{header:s(()=>[ee,te]),default:s(()=>[t(C,{ref_key:"roleRef",ref:f},null,512)]),_:1}),t(a,{key:"4",forceRender:""},{header:s(()=>[se,oe]),default:s(()=>[t(S,{ref_key:"initDataRef",ref:d},null,512)]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["spinning"]),t(k,{type:"primary",class:"btn-style",onClick:g,loading:m(n)},{default:s(()=>[J("确定")]),_:1},8,["loading"])])])])])}}});const Te=q(ae,[["__scopeId","data-v-075efa34"]]);export{Te as default};
