crud.EgdZ6EqY.js 8.4 KB

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