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