import y from"./BaseForm-deca58fe-1782468512657v=1.0.0.js";import{u as _,g as v}from"./roleConfApi-7f23e6c4-1782468512657v=1.0.0.js";import{u as C}from"./useFormEdit-57ddb914-1782468512657v=1.0.0.js";import{a as F}from"./index-c87bcfde-1782468512657v=1.0.0.js";import{E as r}from"./eleVendor-12a75a9a-1782468512657v=1.0.0.js";import{x as c,r as u,k as b,al as w,y as B,H as L,I as k,Q as x,u as m,l as f}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";import"./keepAlive-a871c896-1782468512657v=1.0.0.js";const E=c({name:"roleConfEdit"}),S=c({...E,setup(R){const{closeCurrent:l}=C();u(null);const o=u({roleName:"",startTime:"",rightList:[]}),a=u(!1),d=()=>{l()},g=async s=>{a.value=!0;try{let e=_,n="\u66F4\u65B0\u6210\u529F",t=await e(s);t.code==200?r({type:"success",message:`${n}!`}):r.warning(t.msg||t.message),a.value=!1,l()}catch{a.value=!1}},i=F(),p=async s=>{let e=await v({identity_code:s});if(e.code!=200){r.warning(e.msg);return}o.value.rightList=e.data};return b(()=>{i.query.identity_code&&p(i.query.identity_code)}),(s,e)=>{const n=w("HZPageLayout");return B(),L(n,{isBack:!0,title:"\u7F16\u8F91\u89D2\u8272"},{default:k(()=>[x(y,{value:m(o),"onUpdate:value":e[0]||(e[0]=t=>f(o)?o.value=t:null),loading:m(a),"onUpdate:loading":e[1]||(e[1]=t=>f(a)?a.value=t:null),onCancel:d,onSubmit:g},null,8,["value","loading"])]),_:1})}}});export{S as default};
