import{P as k}from"./page.3b4d44cb.js";import{a as E,e as B,b as L}from"./tableArea.5d4d6780.js";import{a4 as T,b7 as D,b as f,ar as S,E as b,_ as $,c as r,e as g,k as w,i as l,g as c,h as o,f as I,j as P,m as y,t as R,F as C,R as N,S as U}from"./index.0308b213.js";const j={components:{Page:k},setup(){const e=T(),t=D(),m=()=>{setTimeout(()=>{t.go(-1)},1e3)},u=f({btnLoading:!1,checkList:[]}),i=e.query.id,s=f({title:"",parentid:0,displayorder:"",status:1});i&&E({id:i}).then(a=>{console.log("\u83B7\u53D6\u7F16\u8F91\u524D\u7684\u6570\u636E\uFF1A",a);const d=a.data;s.parentid=d.parentid,s.title=d.title,s.displayorder=d.displayorder,s.status=d.status});const p=()=>{console.log("\u63D0\u4EA4",s),u.btnLoading=!0,i?B(Object.assign({id:i},s)).then(a=>{m(),b({message:"\u7F16\u8F91\u6210\u529F",type:"success"})}).finally(()=>{u.btnLoading=!1}):L(s).then(a=>{console.log("\u6570\u636E",a),m(),b({message:"\u63D0\u4EA4\u6210\u529F",type:"success"})}).finally(()=>{u.btnLoading=!1})};return{...S(u),params:s,submit:p}}};const V=e=>(N("data-v-c904c591"),e=e(),U(),e),x={class:"container"},q=V(()=>c("div",{class:"title-box"},[c("h2",{class:"title"},"\u7F16\u8F91\u533A\u57DF")],-1)),M=V(()=>c("p",{class:"tips-text"},"\u63D0\u793A\uFF1A\u533A\u57DF\u4E0D\u663E\u793A\uFF0C\u5176\u5B50\u533A\u57DF\u4E5F\u4E0D\u663E\u793A",-1)),O=y("\u63D0\u4EA4");function z(e,t,m,u,i,s){const p=r("el-input"),a=r("el-form-item"),d=r("el-radio"),A=r("el-radio-group"),F=r("el-button"),v=r("el-form"),h=r("Page");return g(),w(h,{showBorder:!1},{main:l(()=>[c("div",x,[q,o(v,{"label-width":"150px",class:"form-container"},{default:l(()=>[o(a,{label:"\u533A\u57DF\u540D\u79F0"},{default:l(()=>[o(p,{modelValue:e.params.title,"onUpdate:modelValue":t[0]||(t[0]=n=>e.params.title=n)},null,8,["modelValue"])]),_:1}),o(a,{label:"\u533A\u57DF\u6392\u5E8F"},{default:l(()=>[o(p,{modelValue:e.params.displayorder,"onUpdate:modelValue":t[1]||(t[1]=n=>e.params.displayorder=n),type:"number"},null,8,["modelValue"])]),_:1}),o(a,{label:"\u533A\u57DF\u72B6\u6001"},{default:l(()=>[o(A,{modelValue:e.params.status,"onUpdate:modelValue":t[2]||(t[2]=n=>e.params.status=n)},{default:l(()=>[(g(),I(C,null,P(["\u662F","\u5426"],(n,_)=>o(d,{label:_==0?1:0,key:_},{default:l(()=>[y(R(n),1)]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])]),_:1}),o(a,{class:"tips-box"},{default:l(()=>[M]),_:1}),o(F,{type:"primary",loading:e.btnLoading,onClick:t[3]||(t[3]=n=>e.submit())},{default:l(()=>[O]),_:1},8,["loading"])]),_:1})])]),_:1})}const K=$(j,[["render",z],["__scopeId","data-v-c904c591"]]);export{K as default};
