1 |
- import{D as C,U as D,A as S,a as W}from"./api.B4oNo4Fd.js";import{W as g,B as E,A as y,s as U,C as d,D as O,F as $,G as j,H as u,I as M,J as s,K as b,M as r}from"./index.CUwaQBEt.js";import{aH as T,S as e,av as p}from"./vue.D1BjjNmv.js";import{a as A}from"./authFunction.Du6kfec4.js";const P=function({crudExpose:f,context:c}){T();const w=async a=>await W(a),_=async({form:a,row:l})=>(a.id=l.id,await D(a)),v=async({row:a})=>await C(a.id),x=async({form:a})=>await S(a),R=async a=>{try{return(await y.get(`https://backend.qicai321.com/api/system/wechat/user/profile/get?user_id=${a}&tenant_id=1`)).data}catch(l){return console.error("获取用户信息失败:",l),null}},k=async a=>{const l=await R(a);if(!l||l.code!==2e3){d("获取用户信息失败");return}console.log(l);const{user_info:o={},profile:t={},educations:n=[],family_members:m=[],trainings:B=[],work_experiences:h=[]}=l.data||{},i=document.createElement("div"),q=e(O,{title:"个人信息详情",width:"70%",modelValue:!0,"onUpdate:modelValue":z=>{z||(p(null,i),document.body.removeChild(i))},beforeClose:()=>{p(null,i),document.body.removeChild(i)}},{default:()=>e(j,{type:"border-card"},{default:()=>[e(u,{label:"基本信息"},{default:()=>e(M,{column:3,border:!0},{default:()=>[e(s,{label:"姓名"},{default:()=>(o==null?void 0:o.name)||"-"}),e(s,{label:"电话"},{default:()=>(o==null?void 0:o.phone)||"-"}),e(s,{label:"年龄"},{default:()=>(o==null?void 0:o.age)||"-"}),e(s,{label:"出生日期"},{default:()=>(o==null?void 0:o.birth_date)||"-"}),e(s,{label:"性别"},{default:()=>(o==null?void 0:o.gender_name)||"-"}),e(s,{label:"身份证号"},{default:()=>(o==null?void 0:o.id_card)||"-"}),e(s,{label:"政治面貌"},{default:()=>(t==null?void 0:t.political_status)||"-"}),e(s,{label:"民族"},{default:()=>(t==null?void 0:t.ethnicity)||"-"}),e(s,{label:"身高"},{default:()=>t!=null&&t.height?t.height+"cm":"-"}),e(s,{label:"体重"},{default:()=>t!=null&&t.weight?t.weight+"kg":"-"}),e(s,{label:"籍贯"},{default:()=>(t==null?void 0:t.native_place)||"-"}),e(s,{label:"户口所在地"},{default:()=>(t==null?void 0:t.household_location)||"-"}),e(s,{label:"现居地址"},{default:()=>(t==null?void 0:t.current_address)||"-"}),e(s,{label:"婚姻状况"},{default:()=>(t==null?void 0:t.marital_status_name)||"-"}),e(s,{label:"是否有子女"},{default:()=>t!=null&&t.has_children?"是":"否"}),e(s,{label:"期望薪资"},{default:()=>(t==null?void 0:t.expected_salary)||"-"}),e(s,{label:"紧急联系人"},{default:()=>(t==null?void 0:t.emergency_contact)||"-"}),e(s,{label:"紧急联系电话"},{default:()=>(t==null?void 0:t.emergency_phone)||"-"}),e(s,{label:"特长"},{default:()=>(t==null?void 0:t.specialties)||"-"}),e(s,{label:"人生格言"},{default:()=>(t==null?void 0:t.life_motto)||"-"}),e(s,{label:"招聘来源"},{default:()=>(t==null?void 0:t.recruitment_source_name)||"-"}),e(s,{label:"招聘来源详情"},{default:()=>(t==null?void 0:t.recruitment_source_detail)||"-"})]})}),e(u,{label:"教育经历"},{default:()=>n&&n.length>0?e(b,{data:n,border:!0,stripe:!0},{default:()=>[e(r,{prop:"education_type_name",label:"学历类型"}),e(r,{prop:"degree_name",label:"学位"}),e(r,{prop:"school_name",label:"学校名称"}),e(r,{prop:"major",label:"专业"}),e(r,{prop:"start_date",label:"开始日期"}),e(r,{prop:"end_date",label:"结束日期"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无教育经历数据"})}),e(u,{label:"家庭成员"},{default:()=>m&&m.length>0?e(b,{data:m,border:!0,stripe:!0},{default:()=>[e(r,{prop:"relation",label:"关系"}),e(r,{prop:"name",label:"姓名"}),e(r,{prop:"workplace",label:"工作单位"}),e(r,{prop:"position",label:"职位"}),e(r,{prop:"phone",label:"联系电话"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无家庭成员数据"})}),e(u,{label:"工作经历"},{default:()=>h&&h.length>0?e(b,{data:h,border:!0,stripe:!0},{default:()=>[e(r,{prop:"company_name",label:"公司名称"}),e(r,{prop:"department",label:"部门"}),e(r,{prop:"position",label:"职位"}),e(r,{prop:"start_date",label:"开始日期"}),e(r,{prop:"end_date",label:"结束日期"}),e(r,{prop:"monthly_salary",label:"月薪"}),e(r,{prop:"company_size",label:"公司规模"}),e(r,{prop:"supervisor_name",label:"主管姓名"}),e(r,{prop:"supervisor_phone",label:"主管电话"}),e(r,{prop:"resignation_reason",label:"离职原因"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无工作经历数据"})})]}),footer:()=>e($,{onClick:()=>{p(null,i),document.body.removeChild(i)}},{default:()=>"关闭"})});document.body.appendChild(i),p(q,i)};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,show:!1},columns:{show:!1}}},request:{pageRequest:w,addRequest:x,editRequest:_,delRequest:v},actionbar:{buttons:{add:{show:!1},batchUpdateStatus:{text:"批量修改状态",type:"primary",show:!0,order:1,size:"small",click:()=>{const a=c.selectedRows||[];if(!a||a.length===0){d("请先选择要操作的申请");return}c.openBatchStatusDialog(a)}},SMSnotification:{text:"批量短信通知",type:"primary",show:!0,order:2,size:"small",click:()=>{console.log(c.selectedRows);const a=c.selectedRows||[];if(!a||a.length===0){d("请先选择要操作的申请");return}const l=a.reduce((t,n)=>(t[n.status]||(t[n.status]=[]),t[n.status].push(n),t),{});if(Object.keys(l).length>1){d("请选择相同状态的申请进行批量短信通知");return}c.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")}},notification:{text:"发送短信",iconRight:"Message",type:"text",show:E(({row:a})=>a.status===0),order:3,click:({row:a})=>{const l=[a];c.openSmsNotification(l)}},profile:{text:"查看个人信息",iconRight:"User",type:"text",show:!1,order:1,click:({row:a})=>{k(a.applicant)}},reanalyze:{text:"重新分析",iconRight:"Refresh",type:"text",show:!1,order:2,click:async({row:a})=>{try{const l=await y.post("https://backend.qicai321.com/api/system/job/trigger_comprehensive_analysis",{application_id:a.id,force_trigger:!0});l.data.code===200?(U("已触发重新分析"),f.doRefresh()):d(l.data.message||"触发重新分析失败")}catch(l){console.error("触发重新分析失败:",l),d("触发重新分析失败")}}},edit:{iconRight:"Edit",type:"text",show:!1},remove:{iconRight:"Delete",type:"text",show:A("area:Delete")}}},pagination:{show:!0},table:{selection:!0,onSelectionChange:a=>{c.selectedRows=a}},search:{show:!0,layout:"auto",autoSearch:!1,buttons:{search:{size:"small"},reset:{size:"small"}},resetBtn:{show:!0,click:()=>{const a=document.querySelector(".el-tree");if(a){const l=a.querySelector(".is-current");l&&l.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:g({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:"dict-select",search:{show:!0,type:"dict-select",component:{placeholder:"请选择录用建议",clearable:!0},size:"small",col:{span:3}},dict:g({data:[{value:"谨慎录用",label:"谨慎录用"},{value:"推荐录用",label:"推荐录用"},{value:"有条件录用",label:"有条件录用"},{value:"不推荐录用",label:"不推荐录用"}]}),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};
|