crud.Dq6ImgqO.js 9.2 KB

1
  1. import{D as C,U as D,A as S,a as W}from"./api.DH-yXsG1.js";import{W as y,B as E,j as b,C as d,s as U,D as $,F as j,G as O,H as u,I as M,J as o,K as g,M as n}from"./index.BU1XZqMW.js";import{aH as T,S as e,av as p}from"./vue.D1BjjNmv.js";import{a as A}from"./authFunction.Csx4b1xa.js";const P=function({crudExpose:w,context:c}){T();const f=async a=>await W(a),_=async({form:a,row:s})=>(a.id=s.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 b.get(`https://backend.qicai321.com/api/system/wechat/user/profile/get?user_id=${a}&tenant_id=1`)).data}catch(s){return console.error("获取用户信息失败:",s),null}},k=async a=>{const s=await R(a);if(!s||s.code!==2e3){d("获取用户信息失败");return}console.log(s);const{user_info:l={},profile:t={},educations:r=[],family_members:m=[],trainings:B=[],work_experiences:h=[]}=s.data||{},i=document.createElement("div"),q=e($,{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(O,{type:"border-card"},{default:()=>[e(u,{label:"基本信息"},{default:()=>e(M,{column:3,border:!0},{default:()=>[e(o,{label:"姓名"},{default:()=>(l==null?void 0:l.name)||"-"}),e(o,{label:"电话"},{default:()=>(l==null?void 0:l.phone)||"-"}),e(o,{label:"年龄"},{default:()=>(l==null?void 0:l.age)||"-"}),e(o,{label:"出生日期"},{default:()=>(l==null?void 0:l.birth_date)||"-"}),e(o,{label:"性别"},{default:()=>(l==null?void 0:l.gender_name)||"-"}),e(o,{label:"身份证号"},{default:()=>(l==null?void 0:l.id_card)||"-"}),e(o,{label:"政治面貌"},{default:()=>(t==null?void 0:t.political_status)||"-"}),e(o,{label:"民族"},{default:()=>(t==null?void 0:t.ethnicity)||"-"}),e(o,{label:"身高"},{default:()=>t!=null&&t.height?t.height+"cm":"-"}),e(o,{label:"体重"},{default:()=>t!=null&&t.weight?t.weight+"kg":"-"}),e(o,{label:"籍贯"},{default:()=>(t==null?void 0:t.native_place)||"-"}),e(o,{label:"户口所在地"},{default:()=>(t==null?void 0:t.household_location)||"-"}),e(o,{label:"现居地址"},{default:()=>(t==null?void 0:t.current_address)||"-"}),e(o,{label:"婚姻状况"},{default:()=>(t==null?void 0:t.marital_status_name)||"-"}),e(o,{label:"是否有子女"},{default:()=>t!=null&&t.has_children?"是":"否"}),e(o,{label:"期望薪资"},{default:()=>(t==null?void 0:t.expected_salary)||"-"}),e(o,{label:"紧急联系人"},{default:()=>(t==null?void 0:t.emergency_contact)||"-"}),e(o,{label:"紧急联系电话"},{default:()=>(t==null?void 0:t.emergency_phone)||"-"}),e(o,{label:"特长"},{default:()=>(t==null?void 0:t.specialties)||"-"}),e(o,{label:"人生格言"},{default:()=>(t==null?void 0:t.life_motto)||"-"}),e(o,{label:"招聘来源"},{default:()=>(t==null?void 0:t.recruitment_source_name)||"-"}),e(o,{label:"招聘来源详情"},{default:()=>(t==null?void 0:t.recruitment_source_detail)||"-"})]})}),e(u,{label:"教育经历"},{default:()=>r&&r.length>0?e(g,{data:r,border:!0,stripe:!0},{default:()=>[e(n,{prop:"education_type_name",label:"学历类型"}),e(n,{prop:"degree_name",label:"学位"}),e(n,{prop:"school_name",label:"学校名称"}),e(n,{prop:"major",label:"专业"}),e(n,{prop:"start_date",label:"开始日期"}),e(n,{prop:"end_date",label:"结束日期"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无教育经历数据"})}),e(u,{label:"家庭成员"},{default:()=>m&&m.length>0?e(g,{data:m,border:!0,stripe:!0},{default:()=>[e(n,{prop:"relation",label:"关系"}),e(n,{prop:"name",label:"姓名"}),e(n,{prop:"workplace",label:"工作单位"}),e(n,{prop:"position",label:"职位"}),e(n,{prop:"phone",label:"联系电话"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无家庭成员数据"})}),e(u,{label:"工作经历"},{default:()=>h&&h.length>0?e(g,{data:h,border:!0,stripe:!0},{default:()=>[e(n,{prop:"company_name",label:"公司名称"}),e(n,{prop:"department",label:"部门"}),e(n,{prop:"position",label:"职位"}),e(n,{prop:"start_date",label:"开始日期"}),e(n,{prop:"end_date",label:"结束日期"}),e(n,{prop:"monthly_salary",label:"月薪"}),e(n,{prop:"company_size",label:"公司规模"}),e(n,{prop:"supervisor_name",label:"主管姓名"}),e(n,{prop:"supervisor_phone",label:"主管电话"}),e(n,{prop:"resignation_reason",label:"离职原因"})]}):e("div",{style:"text-align: center; padding: 20px;"},{default:()=>"暂无工作经历数据"})})]}),footer:()=>e(j,{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:f,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 s=a.reduce((t,r)=>(t[r.status]||(t[r.status]=[]),t[r.status].push(r),t),{});if(Object.keys(s).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 l=`${window.location.origin}/#/JobApplication/report/report?id=${a.id}&tenant_id=1&application_id=${a.applicant}`;window.open(l,"_blank")}},notification:{text:"发送短信",iconRight:"Message",type:"text",show:E(({row:a})=>a.status===0),order:3,click:({row:a})=>{const s=[a];c.openSmsNotification(s)}},profile:{text:"查看个人信息",iconRight:"User",type:"text",show:!1,order:1,click:({row:a})=>{k(a.applicant)}},reanalyze:{text:"重新分析",iconRight:"Refresh",type:"text",show:!0,order:2,click:async({row:a})=>{try{const s=await b.post("https://backend.qicai321.com/api/system/interview_analysis/analyze_applicant_videos/",{application_id:a.id});if(s.data.code!==200){d(s.data.message||"视频分析失败");return}const l=await b.post("https://backend.qicai321.com/api/system/job/trigger_comprehensive_analysis",{application_id:a.id,force_trigger:!0});l.data.code===2e3?(U("已触发重新分析"),w.doRefresh()):d(l.data.message||"触发重新分析失败")}catch(s){console.error("重新分析失败:",s),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 s=a.querySelector(".is-current");s&&s.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:y({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:y({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};