var B=Object.defineProperty;var f=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var y=(e,t,s)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t)=>{for(var s in t||(t={}))_.call(t,s)&&y(e,s,t[s]);if(f)for(var s of f(t))M.call(t,s)&&y(e,s,t[s]);return e};var m=(e,t,s)=>new Promise((r,d)=>{var p=i=>{try{l(s.next(i))}catch(n){d(n)}},u=i=>{try{l(s.throw(i))}catch(n){d(n)}},l=i=>i.done?r(i.value):Promise.resolve(i.value).then(p,u);l((s=s.apply(e,t)).next())});import{d as b,f as v,u as a,e as w,a2 as I,ad as U,af as F,k,ag as T}from"./vue-vendor-CxLCUzY4.js";import{B as E}from"./index-zKZnG1QC.js";import"./index-BN26Feep.js";import{h as c,a8 as O}from"./index-Cy4uayzW.js";import{M as S}from"./antd-vue-vendor-CahNzUUa.js";import{u as j,B as L}from"./useForm-DfoT2G6J.js";const K=[{title:"职务名称",dataIndex:"name",align:"left"}],Q=[{field:"name",label:"职务名称",component:"Input",colProps:{span:8}}],R=[{label:"主键",field:"id",component:"Input",show:!1},{field:"name",label:"职务名称",component:"Input",required:!0}];const W="/sys/position/exportXls",Y="/sys/position/importExcel",Z=e=>c.get({url:"/sys/position/list",params:e}),q=(e,t)=>{let s=t?"/sys/position/edit":"/sys/position/add";return c.post({url:s,params:e})},X=e=>c.get({url:"/sys/position/queryById",params:e}),A=(e,t)=>c.delete({url:"/sys/position/delete",data:e},{joinParamsToUrl:!0}).then(()=>{t()}),ee=(e,t)=>{S.confirm({title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>c.delete({url:"/sys/position/deleteBatch",data:e},{joinParamsToUrl:!0}).then(()=>{t()})})};const C=b({__name:"PositionModal",emits:["success","register"],setup(e,{emit:t}){const s=t,r=v(!0),[d,{resetFields:p,setFieldsValue:u,validate:l}]=j({schemas:R,showActionButtonGroup:!1}),[i,{setModalProps:n,closeModal:h}]=O(o=>m(this,null,function*(){yield p(),n({confirmLoading:!1}),r.value=!!(o!=null&&o.isUpdate),a(r)&&(o.record=yield X({id:o.record.id}),yield u(g({},o.record)))})),P=w(()=>a(r)?"编辑职务":"新增职务");function x(){return m(this,null,function*(){try{const o=yield l();n({confirmLoading:!0}),yield q(o,r.value),h(),s("success")}finally{n({confirmLoading:!1})}})}return(o,V)=>(I(),U(a(E),T(o.$attrs,{onRegister:a(i),title:P.value,onOk:x,width:700}),{default:F(()=>[k(a(L),{onRegister:a(d)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"}));export{te as P,C as _,Y as a,W as b,K as c,A as d,ee as e,Z as g,Q as s};
