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