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