/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                        *//* empty css                 *//* empty css                       *//* empty css                 */import{u as e}from"./useCreate-d1a919fb.js";import{u as a}from"./useShow-5d0f85e9.js";import{d as l,x as o,W as s,f as t,o as r,l as m,w as u,a as i,c as d,F as p,y as n,b,t as c,e as f,a2 as _,a3 as j,ab as V,ac as y,aa as g,S as v,Y as x,$ as U}from"./index-2b50ecca.js";const S={class:"flex justify-end"},k=l({__name:"create",props:{primary:String|Number,api:String},emits:["close"],setup(l,{emit:k}){const w=l,{formData:h,form:C,loading:F,submitForm:Y,close:$}=e(w.api,w.primary);h.value.status=1,h.value.sort=1,w.primary&&a(w.api,w.primary,h),o((()=>{$((()=>k("close")))}));const q=[{label:"正常",value:1},{label:"禁用",value:2}];return(e,a)=>{const l=_,o=j,k=V,w=y,$=g,B=v,D=x,N=U;return s((r(),m(D,{model:t(h),"label-width":"120px",ref_key:"form",ref:C,class:"pr-4"},{default:u((()=>[i(o,{label:"岗位名称",prop:"job_name",rules:[{required:!0,message:"岗位名称必须填写"}]},{default:u((()=>[i(l,{modelValue:t(h).job_name,"onUpdate:modelValue":a[0]||(a[0]=e=>t(h).job_name=e),name:"job_name",clearable:""},null,8,["modelValue"])])),_:1}),i(o,{label:"岗位编码",prop:"coding"},{default:u((()=>[i(l,{modelValue:t(h).coding,"onUpdate:modelValue":a[1]||(a[1]=e=>t(h).coding=e),name:"coding",clearable:""},null,8,["modelValue"])])),_:1}),i(o,{label:"状态",prop:"status"},{default:u((()=>[i(w,{modelValue:t(h).status,"onUpdate:modelValue":a[2]||(a[2]=e=>t(h).status=e)},{default:u((()=>[(r(),d(p,null,n(q,(e=>i(k,{key:e.value,label:e.value,name:"status"},{default:u((()=>[b(c(e.label),1)])),_:2},1032,["label"]))),64))])),_:1},8,["modelValue"])])),_:1}),i(o,{label:"排序",prop:"sort"},{default:u((()=>[i($,{modelValue:t(h).sort,"onUpdate:modelValue":a[3]||(a[3]=e=>t(h).sort=e),name:"sort",min:1},null,8,["modelValue"])])),_:1}),i(o,{label:"岗位描述",prop:"description"},{default:u((()=>[i(l,{modelValue:t(h).description,"onUpdate:modelValue":a[4]||(a[4]=e=>t(h).description=e),name:"description",clearable:"",type:"textarea"},null,8,["modelValue"])])),_:1}),f("div",S,[i(B,{type:"primary",onClick:a[5]||(a[5]=e=>t(Y)(t(C)))},{default:u((()=>[b(c(e.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[N,t(F)]])}}});export{k as _};
