var _=(p,d,a)=>new Promise((c,n)=>{var o=s=>{try{i(a.next(s))}catch(e){n(e)}},f=s=>{try{i(a.throw(s))}catch(e){n(e)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(o,f);i((a=a.apply(p,d)).next())});import{d as g,s as b,j as E,v as w,o as S,c as m,a as r,F as x,E as F,l as h,m as L,B,x as D,y as G,z as T,C as y,T as v}from"./index.js?v=5b4be379";const C=["onSubmit"],k=r("div",{class:"label-name"},[r("span",null,"\u9009\u62E9\u8F6F\u4EF6\u6E90 ")],-1),I={class:"label-value"},V={class:"label-flex"},N=["value"],M={class:"label-btns"},j=["disabled"],q={key:0,class:"label-msg"},O=g({__name:"index",setup(p){return _(this,null,function*(){let d,a;const c=b(!1),n=b(""),o=E({softsourceListIfo:[],softSource:{},currSoftSource:{}}),f=()=>_(this,null,function*(){var s,e,u;try{const t=yield y.Guide.SoftSourceList.GET();if((s=t==null?void 0:t.data)!=null&&s.result){const l=(e=t==null?void 0:t.data)==null?void 0:e.result;o.softsourceListIfo=l.softSourceList||[]}}catch(t){console.log(t)}try{const t=yield y.Guide.GetSoftSource.GET();if((u=t==null?void 0:t.data)!=null&&u.result){const l=t.data.result;o.softSource=l.softSource,o.currSoftSource=l.softSource}}catch(t){console.log(t)}});[d,a]=w(()=>f()),yield d,a();const i=()=>_(this,null,function*(){const s=v.Loading("\u6B63\u5728\u5207\u6362\u4E2D...");c.value=!0;try{const e=yield y.Guide.SoftSource.POST({softSourceIdentity:o.softSource.identity});if(e!=null&&e.data){const{result:u,error:t,success:l}=e.data;t&&v.Warning(t),(e.data.success||0)==0&&(v.Success("\u5207\u6362\u6210\u529F"),yield f())}}catch(e){v.Error(`${e}`)}finally{c.value=!1,s.Close()}});return(s,e)=>(S(),m("form",{class:"form-container",onSubmit:B(i,["prevent"])},[k,r("div",I,[(S(!0),m(x,null,F(o.softsourceListIfo,u=>(S(),m("label",V,[D(r("input",{type:"radio",value:u.identity,"onUpdate:modelValue":e[0]||(e[0]=t=>o.softSource.identity=t)},null,8,N),[[G,o.softSource.identity,void 0,{trim:!0}]]),T(" "+h(u.name),1)]))),256))]),r("div",M,[r("button",{class:"sumbit",disabled:c.value},"\u4FDD\u5B58",8,j)]),n.value?(S(),m("div",q,[r("span",null,h(n.value),1)])):L("",!0)],40,C))})}});export{O as default};