var q=Object.defineProperty,z=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var C=(t,o,e)=>o in t?q(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,k=(t,o)=>{for(var e in o||(o={}))O.call(o,e)&&C(t,e,o[e]);if(x)for(var e of x(o))R.call(o,e)&&C(t,e,o[e]);return t},D=(t,o)=>z(t,N(o));var v=(t,o,e)=>new Promise((m,s)=>{var _=l=>{try{i(e.next(l))}catch(n){s(n)}},f=l=>{try{i(e.throw(l))}catch(n){s(n)}},i=l=>l.done?m(l.value):Promise.resolve(l.value).then(_,f);i((e=e.apply(t,o)).next())});import{s as $}from"./driverFile.0747fabc.js";import{_ as F,d as S,r as b,x as E,y as J,z as L,f as u,g as T,n as w,w as r,e as c,c as U,q as A,v as G,F as H,h as V,i as K}from"./index.2f2d2ba5.js";const M=V(" \u5173\u95ED "),P=V(" \u4FDD\u5B58 "),Q=S({name:"setTypeDialog"}),W=Object.assign(Q,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(t,{emit:o}){const e=t,{proxy:m}=K(),s=b({jobTypes:[]}),_=b(),f=b({jobTypes:[{required:!0,message:"\u8BF7\u9009\u62E9\u63A5\u5355\u7C7B\u578B",trigger:"change"}]}),{jobTypeOptions:i}=E(J.dictStore),l=()=>{_.value.validate(n=>v(this,null,function*(){var a,d;if(n){const y=D(k({},s.value),{userDriverId:(a=e.data)==null?void 0:a.driverId,jobTypes:s.value.jobTypes.length&&s.value.jobTypes||((d=e.data)==null?void 0:d.jobTypes)});yield $(y),m.$message.success("\u8BBE\u7F6E\u6210\u529F\uFF01"),o("close",!0)}}))};return L(()=>e.visible,n=>v(this,null,function*(){n||(s.value={jobTypes:[]})})),(n,a)=>{const d=u("el-option"),y=u("el-select"),h=u("el-form-item"),B=u("el-form"),g=u("el-button"),I=u("el-dialog");return T(),w(I,{"model-value":t.visible,title:"\u7C7B\u578B\u8BBE\u7F6E","destroy-on-close":"",onClose:a[2]||(a[2]=p=>o("close"))},{footer:r(()=>[c(g,{type:"info",size:"small",onClick:a[1]||(a[1]=p=>o("close"))},{default:r(()=>[M]),_:1}),c(g,{type:"primary",size:"small",onClick:l},{default:r(()=>[P]),_:1})]),default:r(()=>[c(B,{ref_key:"formRef",ref:_,model:s.value,rules:f.value,"label-suffix":":"},{default:r(()=>[c(h,{label:"\u63A5\u5355\u7C7B\u578B",prop:"jobTypes"},{default:r(()=>[c(y,{modelValue:s.value.jobTypes,"onUpdate:modelValue":a[0]||(a[0]=p=>s.value.jobTypes=p),placeholder:"\u8BF7\u9009\u62E9",style:{width:"100%"},multiple:!0},{default:r(()=>[(T(!0),U(H,null,A(G(i),(p,j)=>(T(),w(d,{key:j,label:p,value:Number(j)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["model-value"])}}}),ee=F(W,[["__scopeId","data-v-92218fa8"]]);export{ee as default};
