crud.Czryo2_F.js 6.4 KB

1
  1. import{D,U as R,A as E,a as W}from"./api.CeCHjIT5.js";import{W as k,F as p,G as C,H as U,I as S,J as O,K as s,M as $,O as a,P as c,Q as l}from"./index.DeYmuSuw.js";import{aH as T,S as e,av as d}from"./vue.YrNK8sx4.js";import{a as j}from"./authFunction.D0pjFmVf.js";const I=function({crudExpose:P,context:u}){T();const m=async t=>await W(t),b=async({form:t,row:r})=>(t.id=r.id,await R(t)),h=async({row:t})=>await D(t.id),f=async({form:t})=>await E(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:B,work_experiences:v}=r.data,n=document.createElement("div"),x=e(C,{title:"个人信息详情",width:"70%",modelValue:!0,"onUpdate:modelValue":q=>{q||(d(null,n),document.body.removeChild(n))},beforeClose:()=>{d(null,n),document.body.removeChild(n)}},{default:()=>e(O,{type:"border-card"},{default:()=>[e(s,{label:"基本信息"},{default:()=>e($,{column:3,border:!0},{default:()=>[e(a,{label:"姓名"},{default:()=>i.name}),e(a,{label:"电话"},{default:()=>i.phone}),e(a,{label:"年龄"},{default:()=>i.age}),e(a,{label:"出生日期"},{default:()=>i.birth_date}),e(a,{label:"性别"},{default:()=>i.gender_name}),e(a,{label:"身份证号"},{default:()=>i.id_card}),e(a,{label:"政治面貌"},{default:()=>o.political_status}),e(a,{label:"民族"},{default:()=>o.ethnicity}),e(a,{label:"身高"},{default:()=>o.height+"cm"}),e(a,{label:"体重"},{default:()=>o.weight+"kg"}),e(a,{label:"籍贯"},{default:()=>o.native_place}),e(a,{label:"户口所在地"},{default:()=>o.household_location}),e(a,{label:"现居地址"},{default:()=>o.current_address}),e(a,{label:"婚姻状况"},{default:()=>o.marital_status_name}),e(a,{label:"是否有子女"},{default:()=>o.has_children?"是":"否"}),e(a,{label:"期望薪资"},{default:()=>o.expected_salary}),e(a,{label:"紧急联系人"},{default:()=>o.emergency_contact}),e(a,{label:"紧急联系电话"},{default:()=>o.emergency_phone}),e(a,{label:"特长"},{default:()=>o.specialties}),e(a,{label:"人生格言"},{default:()=>o.life_motto}),e(a,{label:"招聘来源"},{default:()=>o.recruitment_source_name}),e(a,{label:"招聘来源详情"},{default:()=>o.recruitment_source_detail})]})}),e(s,{label:"教育经历"},{default:()=>e(c,{data:y,border:!0,stripe:!0},{default:()=>[e(l,{prop:"education_type_name",label:"学历类型"}),e(l,{prop:"degree_name",label:"学位"}),e(l,{prop:"school_name",label:"学校名称"}),e(l,{prop:"major",label:"专业"}),e(l,{prop:"start_date",label:"开始日期"}),e(l,{prop:"end_date",label:"结束日期"})]})}),e(s,{label:"家庭成员"},{default:()=>e(c,{data:g,border:!0,stripe:!0},{default:()=>[e(l,{prop:"relation",label:"关系"}),e(l,{prop:"name",label:"姓名"}),e(l,{prop:"workplace",label:"工作单位"}),e(l,{prop:"position",label:"职位"}),e(l,{prop:"phone",label:"联系电话"})]})}),e(s,{label:"工作经历"},{default:()=>e(c,{data:v,border:!0,stripe:!0},{default:()=>[e(l,{prop:"company_name",label:"公司名称"}),e(l,{prop:"department",label:"部门"}),e(l,{prop:"position",label:"职位"}),e(l,{prop:"start_date",label:"开始日期"}),e(l,{prop:"end_date",label:"结束日期"}),e(l,{prop:"monthly_salary",label:"月薪"}),e(l,{prop:"company_size",label:"公司规模"}),e(l,{prop:"supervisor_name",label:"主管姓名"}),e(l,{prop:"supervisor_phone",label:"主管电话"}),e(l,{prop:"resignation_reason",label:"离职原因"})]})})]}),footer:()=>e(S,{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},batchUpdateStatus:{text:"批量修改状态",type:"primary",show:!0,order:1,click:()=>{const t=u.selectedRows||[];if(!t||t.length===0){p("请先选择要操作的申请");return}u.openBatchStatusDialog(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:k({data:[{value:0,label:"待面试"},{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};