import{D as a,o as e,b as l,z as t,H as A,_ as s,p as o,q as n,s as u,G as c,L as i,v as d,x as p,a as g,w as r,l as v,k as f,y as Q,j as m,U as B,X as y,B as C}from"./index-BoIbtAZO.js";import{_ as I}from"./uni-icons.SM4XIXQc.js";import{_ as h}from"./dict-Label.Dsm7GAlr.js";const j={__name:"dict-tree-Label",props:["value","dictType"],setup(s){const{complete:o,industryLabel:n}=a();return(a,o)=>(e(),l("span",null,t(A(n)(s.dictType,s.value)),1))}},E=s({__name:"post",setup(a){const{$api:s,navTo:E,getLenPx:b,parseQueryParams:w}=o("globalFunction"),Y=n({});u({});const x=n([]),D=n();function F(a){const e=atob(a.jobId);e!==D.value&&(D.value=e,L(e))}function L(a){s.createRequest(`/app/job/${a}`).then((a=>{const{latitude:e,longitude:l,companyName:t}=a.data;Y.value=a.data,e&&l&&(x.value=[{latitude:e,longitude:l,iconPath:"data:image/png;base64,[encoded data, 4740 characters]",label:{content:t,textAlign:"center",padding:3,fontSize:12,bgColor:"#FFFFFF",anchorX:k(t),borderRadius:5},width:34}])}))}function k(a,e=12){const l=document.createElement("canvas").getContext("2d");return l.font="12px Arial",-l.measureText(a).width/2-20}function O(){const a=Y.value.jobId;if(Y.value.isApply){const a=Y.value.jobUrl;return window.open(a)}s.createRequest(`/app/job/apply/${a}`,{},"GET").then((e=>{L(a),s.msg("申请成功");const l=Y.value.jobUrl;return window.open(l)}))}function q(){const a=Y.value.jobId;Y.value.isCollection?s.createRequest(`/app/job/collection/${a}`,{},"DELETE").then((e=>{L(a),s.msg("取消收藏成功")})):s.createRequest(`/app/job/collection/${a}`,{},"POST").then((e=>{L(a),s.msg("收藏成功")}))}return c((a=>{a.jobId&&F(a)})),i((()=>{const a=w();a.jobId&&F(a)})),(a,s)=>{const o=v,n=B,u=d(p("dict-tree-Label"),j),c=y,i=C,b=d(p("uni-icons"),I);return e(),g(o,{class:"container"},{default:r((()=>[f(o,{class:"job-header"},{default:r((()=>[f(o,{class:"job-title"},{default:r((()=>[Q(t(Y.value.jobTitle),1)])),_:1}),f(o,{class:"job-info"},{default:r((()=>[f(n,{class:"salary"},{default:r((()=>[Q(t(Y.value.minSalary)+"-"+t(Y.value.maxSalary)+"/月",1)])),_:1}),f(n,{class:"views"},{default:r((()=>[Q(t(Y.value.view)+"浏览",1)])),_:1})])),_:1}),f(o,{class:"location-info"},{default:r((()=>[f(o,{class:"location",style:{display:"inline-block"}},{default:r((()=>[Q(" 📍 青岛 "),f(h,{dictType:"area",value:Y.value.jobLocationAreaCode},null,8,["value"])])),_:1}),f(n,{class:"date"},{default:r((()=>[Q(t(Y.value.postingDate||"发布日期"),1)])),_:1}),f(o,{class:"source"},{default:r((()=>[Q("来源 智联招聘")])),_:1})])),_:1})])),_:1}),f(o,{class:"job-details"},{default:r((()=>[f(n,{class:"details-title"},{default:r((()=>[Q("职位详情")])),_:1}),f(o,{class:"tags"},{default:r((()=>[f(o,{class:"tag"},{default:r((()=>[f(h,{dictType:"education",value:Y.value.education},null,8,["value"])])),_:1}),f(o,{class:"tag"},{default:r((()=>[f(h,{dictType:"experience",value:Y.value.experience},null,8,["value"])])),_:1})])),_:1}),f(o,{class:"description",style:{whiteSpace:"pre-wrap"}},{default:r((()=>[Q(t(Y.value.description),1)])),_:1})])),_:1}),f(o,{class:"company-info",onClick:s[0]||(s[0]=a=>A(E)(`/packageA/pages/UnitDetails/UnitDetails?companyId=${Y.value.company.companyId}`))},{default:r((()=>[f(o,{class:"company-name"},{default:r((()=>{var a;return[Q(t(null==(a=Y.value.company)?void 0:a.name),1)]})),_:1}),f(o,{class:"company-details"},{default:r((()=>{var a,t,A,s;return[(null==(a=Y.value.company)?void 0:a.industry)?(e(),g(u,{key:0,dictType:"industry",value:null==(t=Y.value.company)?void 0:t.industry},null,8,["value"])):m("",!0),(null==(A=Y.value.company)?void 0:A.industry)?(e(),l("span",{key:1}," ")):m("",!0),f(h,{dictType:"scale",value:null==(s=Y.value.company)?void 0:s.scale},null,8,["value"]),Q(" 单位详情 ")]})),_:1}),Y.value.latitude&&Y.value.longitude?(e(),g(o,{key:0,class:"company-map"},{default:r((()=>[f(c,{style:{width:"100%",height:"100%"},latitude:Y.value.latitude,longitude:Y.value.longitude,markers:x.value},null,8,["latitude","longitude","markers"])])),_:1})):m("",!0)])),_:1}),f(o,{class:"footer"},{default:r((()=>[f(i,{class:"apply-btn",onClick:O},{default:r((()=>[Q("立即申请")])),_:1}),f(o,{class:"falls-card-matchingrate",onClick:q},{default:r((()=>[Y.value.isCollection?(e(),g(b,{key:1,type:"star-filled",color:"#FFCB47",size:"40"})):(e(),g(b,{key:0,type:"star",size:"40"}))])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-57ea6143"]]);export{E as default};
