import{C as r,j as h,S as _,s as B}from"./index.DbBdG0ey.js";import{a as S,r as c,_ as N,aj as n,J as j,o as J,K as o,S as t,b as M,P as f}from"./vue.D1BjjNmv.js";const T={class:"dialog-footer"},z=S({__name:"BatchStatusDialog",emits:["success"],setup(U,{expose:v,emit:b}){const u=c(!1),d=c(!1),m=c([]),s=N({status:0}),g=b,V=a=>{m.value=a,u.value=!0,s.status=0},x=async()=>{if(!s.status){r("请选择状态");return}d.value=!0;try{const a=await h.post("https://backend.qicai321.com/api/system/talent_pool/batch-update-status/",{ids:m.value.map(e=>e.id),status:s.status,tenant_id:_.get("tenant_id")},{headers:{authorization:"JWT "+_.get("token")}});a.data.code===2e3?(B("状态修改成功"),u.value=!1,g("success")):r(a.data.message||"操作失败")}catch(a){console.error("批量修改状态失败:",a),r("操作失败")}finally{d.value=!1}};return v({open:V}),(a,e)=>{const l=n("el-option"),k=n("el-select"),w=n("el-form-item"),y=n("el-form"),p=n("el-button"),C=n("el-dialog");return J(),j(C,{modelValue:u.value,"onUpdate:modelValue":e[2]||(e[2]=i=>u.value=i),title:"批量修改状态",width:"500px","close-on-click-modal":!1,"close-on-press-escape":!1},{footer:o(()=>[M("span",T,[t(p,{onClick:e[1]||(e[1]=i=>u.value=!1)},{default:o(()=>e[3]||(e[3]=[f("取消")])),_:1}),t(p,{type:"primary",onClick:x,loading:d.value},{default:o(()=>e[4]||(e[4]=[f(" 确认 ")])),_:1},8,["loading"])])]),default:o(()=>[t(y,{model:s,"label-width":"100px"},{default:o(()=>[t(w,{label:"选择状态"},{default:o(()=>[t(k,{modelValue:s.status,"onUpdate:modelValue":e[0]||(e[0]=i=>s.status=i),placeholder:"请选择状态",style:{width:"100%"}},{default:o(()=>[t(l,{label:"曾就职",value:6}),t(l,{label:"转入在外人才库",value:7}),t(l,{label:"待面试",value:0}),t(l,{label:"已面试",value:1}),t(l,{label:"已录用",value:2}),t(l,{label:"已拒绝",value:3})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});export{z as _};
