import{D as q,U as R,A as C,a as E}from"./api.Y3wVTFYo.js";import{W,C as p,D as k,F as U,G as O,H as T,I as s,J as S,K as l,M as c,O as a}from"./index.DdHkfHvx.js";import{aH as $,S as e,av as d}from"./vue.YrNK8sx4.js";import{a as j}from"./authFunction.v7HwsDyc.js";const I=function({crudExpose:B,context:u}){$();const m=async t=>await E(t),b=async({form:t,row:r})=>(t.id=r.id,await R(t)),h=async({row:t})=>await q(t.id),f=async({form:t})=>await C(t),_=async t=>{try{return(await U.get(`https://backend.qicai321.com/api/system/wechat/user/profile/get?user_id=${t}&tenant_id=1`)).data}catch(r){return console.error("获取用户信息失败:",r),null}},w=async t=>{const r=await _(t);if(!r||r.code!==2e3){p("获取用户信息失败");return}const{user_info:i,profile:o,educations:y,family_members:g,trainings:H,work_experiences:v}=r.data,n=document.createElement("div"),x=e(k,{title:"个人信息详情",width:"70%",modelValue:!0,"onUpdate:modelValue":D=>{D||(d(null,n),document.body.removeChild(n))},beforeClose:()=>{d(null,n),document.body.removeChild(n)}},{default:()=>e(T,{type:"border-card"},{default:()=>[e(s,{label:"基本信息"},{default:()=>e(S,{column:3,border:!0},{default:()=>[e(l,{label:"姓名"},{default:()=>i.name}),e(l,{label:"电话"},{default:()=>i.phone}),e(l,{label:"年龄"},{default:()=>i.age}),e(l,{label:"出生日期"},{default:()=>i.birth_date}),e(l,{label:"性别"},{default:()=>i.gender_name}),e(l,{label:"身份证号"},{default:()=>i.id_card}),e(l,{label:"政治面貌"},{default:()=>o.political_status}),e(l,{label:"民族"},{default:()=>o.ethnicity}),e(l,{label:"身高"},{default:()=>o.height+"cm"}),e(l,{label:"体重"},{default:()=>o.weight+"kg"}),e(l,{label:"籍贯"},{default:()=>o.native_place}),e(l,{label:"户口所在地"},{default:()=>o.household_location}),e(l,{label:"现居地址"},{default:()=>o.current_address}),e(l,{label:"婚姻状况"},{default:()=>o.marital_status_name}),e(l,{label:"是否有子女"},{default:()=>o.has_children?"是":"否"}),e(l,{label:"期望薪资"},{default:()=>o.expected_salary}),e(l,{label:"紧急联系人"},{default:()=>o.emergency_contact}),e(l,{label:"紧急联系电话"},{default:()=>o.emergency_phone}),e(l,{label:"特长"},{default:()=>o.specialties}),e(l,{label:"人生格言"},{default:()=>o.life_motto}),e(l,{label:"招聘来源"},{default:()=>o.recruitment_source_name}),e(l,{label:"招聘来源详情"},{default:()=>o.recruitment_source_detail})]})}),e(s,{label:"教育经历"},{default:()=>e(c,{data:y,border:!0,stripe:!0},{default:()=>[e(a,{prop:"education_type_name",label:"学历类型"}),e(a,{prop:"degree_name",label:"学位"}),e(a,{prop:"school_name",label:"学校名称"}),e(a,{prop:"major",label:"专业"}),e(a,{prop:"start_date",label:"开始日期"}),e(a,{prop:"end_date",label:"结束日期"})]})}),e(s,{label:"家庭成员"},{default:()=>e(c,{data:g,border:!0,stripe:!0},{default:()=>[e(a,{prop:"relation",label:"关系"}),e(a,{prop:"name",label:"姓名"}),e(a,{prop:"workplace",label:"工作单位"}),e(a,{prop:"position",label:"职位"}),e(a,{prop:"phone",label:"联系电话"})]})}),e(s,{label:"工作经历"},{default:()=>e(c,{data:v,border:!0,stripe:!0},{default:()=>[e(a,{prop:"company_name",label:"公司名称"}),e(a,{prop:"department",label:"部门"}),e(a,{prop:"position",label:"职位"}),e(a,{prop:"start_date",label:"开始日期"}),e(a,{prop:"end_date",label:"结束日期"}),e(a,{prop:"monthly_salary",label:"月薪"}),e(a,{prop:"company_size",label:"公司规模"}),e(a,{prop:"supervisor_name",label:"主管姓名"}),e(a,{prop:"supervisor_phone",label:"主管电话"}),e(a,{prop:"resignation_reason",label:"离职原因"})]})})]}),footer:()=>e(O,{onClick:()=>{d(null,n),document.body.removeChild(n)}},{default:()=>"关闭"})});document.body.appendChild(n),d(x,n)};return{crudOptions:{request:{pageRequest:m,addRequest:f,editRequest:b,delRequest:h},actionbar:{buttons:{add:{show:!1},batchBindTags:{text:"批量绑定标签",type:"primary",show:!0,order:2,click:()=>{const t=u.selectedRows||[];if(console.log("选中的行:",t),!t||t.length===0){p("请先选择要操作的申请");return}u.openBatchTagsDialog(t)}}}},rowHandle:{fixed:"right",width:280,buttons:{view:{iconRight:"view",show:!0,type:"text",click:({row:t})=>{console.log(t);const i=`${window.location.origin}/#/report?id=${t.id}&tenant_id=1&application_id=${t.applicant}`;window.open(i,"_blank")}},profile:{text:"查看个人信息",iconRight:"User",type:"text",show:!0,order:1,click:({row:t})=>{w(t.applicant)}},edit:{iconRight:"Edit",type:"text",show:!1},remove:{iconRight:"Delete",type:"text",show:j("area:Delete")}}},pagination:{show:!0},table:{selection:!0,onSelectionChange:t=>{u.selectedRows=t}},search:{show:!0,layout:"auto",resetBtn:{show:!0,click:()=>{const t=document.querySelector(".el-tree");if(t){const r=t.querySelector(".is-current");r&&r.classList.remove("is-current")}}}},columns:{_selection:{title:"选择",form:{show:!1},column:{type:"selection",align:"center",width:50,fixed:"left",columnSetDisabled:!0}},_index:{title:"序号",form:{show:!1},column:{type:"index",align:"center",width:"70px",columnSetDisabled:!0}},report_id:{title:"报告编号",search:{show:!0,component:{placeholder:"请输入报告编号"}},type:"input",column:{minWidth:150},form:{rules:[{required:!0,message:"报告编号必填项"}]}},applicant_name:{title:"申请人姓名",search:{show:!0,component:{placeholder:"请输入申请人姓名"}},type:"input",column:{minWidth:120},form:{rules:[{required:!0,message:"申请人姓名必填项"}]}},applicant_phone:{title:"申请人电话",search:{show:!0,component:{placeholder:"请输入申请人电话"}},type:"input",column:{minWidth:130},form:{rules:[{required:!0,message:"申请人电话必填项"}]}},position_title:{title:"申请职位",search:{show:!0,component:{placeholder:"请输入申请职位"}},type:"input",column:{minWidth:120},form:{rules:[{required:!0,message:"申请职位必填项"}]}},status:{title:"申请状态",search:{show:!0,placeholder:"请选择申请状态"},type:"dict-select",column:{minWidth:100},dict:W({data:[{value:1,label:"待面试"},{value:2,label:"已面试"},{value:3,label:"已录用"},{value:4,label:"已拒绝"}]})},comprehensive_score:{title:"综合评分",type:"number",column:{minWidth:100}},hire_recommendation:{title:"录用建议",type:"textarea",column:{minWidth:150,showOverflowTooltip:!0}},create_datetime:{title:"创建时间",type:"datetime",column:{minWidth:160},form:{show:!1}},update_datetime:{title:"更新时间",type:"datetime",column:{minWidth:160},form:{show:!1}}}}}};export{I as createCrudOptions};