mianshiDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. <template>
  2. <view class="ms-detail">
  3. <view class="detail-bg"></view>
  4. <nav-bar title="面试详情"></nav-bar>
  5. <view class="detail-index">
  6. <view class="detail-title">
  7. <block v-if="info.status==2">
  8. <block v-if="currentStep === 1&&info.restHour>3">
  9. {{info.statusText}} {{info.interviewDate}}
  10. </block>
  11. <block v-else-if="currentStep === 1&&info.restHour<=3&&info.restHour>0">
  12. {{info.restHour*60}}分钟后面试
  13. </block>
  14. <block v-else-if="currentStep === 1&&info.restHour==0">
  15. 面试已开始,待签到
  16. </block>
  17. <block v-else-if="currentStep === 2">
  18. 面试已签到
  19. </block>
  20. <block v-else-if="currentStep === 3">
  21. 面试中
  22. </block>
  23. <block v-else-if="currentStep === 4">
  24. 面试已完成
  25. </block>
  26. </block>
  27. <block v-else-if="info.status==3">
  28. 面试已取消
  29. </block>
  30. </view>
  31. <view class="detail-item">
  32. <view class="user-title">
  33. <view class="user-img">
  34. <image :src="info.company&&info.company.companyLogo||'../../static/images/geren.png'" mode="aspectFill" />
  35. </view>
  36. <view class="user-name-box">
  37. <view class="user-name-com">{{info.company&&info.company.companyName||'匿名公司'}}</view>
  38. <view class="user-info-img">
  39. <image :src="info.hr&&info.hr.hrImg||'../../static/images/geren.png'" mode="aspectFill" />
  40. <view class="user-name">{{info.hrUserEntity&&info.hrUserEntity.userName||'匿名'}}·{{info.hr&&info.hr.hrPosition||'匿名职务'}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="msg-box">
  45. <view class="msg-item">
  46. <view class="msg-label">时间</view>
  47. <view class="msg-value">{{info.interviewDateTime}}</view>
  48. </view>
  49. <view class="msg-item">
  50. <view class="msg-label">职位</view>
  51. <view class="msg-value">{{info.postPush&&info.postPush.ruleClassifyName}} {{info.postPush&&info.postPush.salaryRange}}</view>
  52. </view>
  53. <view class="msg-item">
  54. <view class="msg-label">联系人</view>
  55. <view class="msg-value">{{info.hrName}} {{info.hrPhone}}</view>
  56. </view>
  57. <view class="msg-item">
  58. <view class="msg-label">备注</view>
  59. <view class="msg-value">{{info.remarks}}</view>
  60. </view>
  61. <view class="msg-item" @tap.stop="gotoMap()">
  62. <view class="msg-label">地址</view>
  63. <view class="msg-value">{{info.address}} {{info.detailedAddress}}</view>
  64. <u-icon name="arrow-right"></u-icon>
  65. </view>
  66. </view>
  67. <view class="map-box">
  68. <map v-if="info.lng" name="map" class="map" :longitude="parseFloat(info.lng)" :latitude="parseFloat(info.lat)" :markers="covers"></map>
  69. </view>
  70. </view>
  71. <view class="detail-item" v-if="info&&info.status==2">
  72. <view class="process-top">
  73. <view class="process-title">面试进度</view>
  74. <view hidden class="process-status">爽约说明</view>
  75. </view>
  76. <view class="process-index">
  77. <view class="interview-process">
  78. <!-- 流程步骤 -->
  79. <view class="process-steps">
  80. <!-- 步骤1: 面试时间到 -->
  81. <view
  82. class="step-item"
  83. :class="{ active: currentStep >= 1, completed: currentStep > 1 }"
  84. >
  85. <view class="step-icon">
  86. <view class="step-number">1</view>
  87. <view class="step-check" v-if="currentStep > 1">
  88. <u-icon name="checkmark" color="#fff" size="16"></u-icon>
  89. </view>
  90. </view>
  91. <view class="step-content">
  92. <view class="step-title">{{info.expired?'面试时间到':'接受面试'}}</view>
  93. <view class="step-desc">{{info.expired?'面试已开始,此时不能取消面试':'离面试开始3小时内,不可以取消面试'}}</view>
  94. </view>
  95. <view class="step-line"></view>
  96. </view>
  97. <!-- 步骤2: 面试签到 -->
  98. <view
  99. class="step-item"
  100. :class="{ active: currentStep >= 2, completed: currentStep > 2 }"
  101. >
  102. <view class="step-icon">
  103. <view class="step-number">2</view>
  104. <view class="step-check" v-if="currentStep > 2">
  105. <u-icon name="checkmark" color="#fff" size="16"></u-icon>
  106. </view>
  107. </view>
  108. <view class="step-content">
  109. <view class="step-title">面试签到</view>
  110. <view class="step-desc">到场后请及时签到,可体验面试全流程服务</view>
  111. <u-tag :text="currentStep<2?(info.expired?'签到超时':'请签到'):'已签到'" type="primary" :mode="currentStep<2&&!info.expired?'plain':'light'" size="mini"/>
  112. </view>
  113. <view class="step-line"></view>
  114. </view>
  115. <!-- 步骤3: 进行面试 -->
  116. <view
  117. class="step-item"
  118. :class="{ active: currentStep >= 3, completed: currentStep > 3 }"
  119. >
  120. <view class="step-icon">
  121. <view class="step-number">3</view>
  122. <view class="step-check" v-if="currentStep > 3">
  123. <u-icon name="checkmark" color="#fff" size="16"></u-icon>
  124. </view>
  125. </view>
  126. <view class="step-content">
  127. <view class="step-title">进行面试</view>
  128. <view class="step-desc">面试过程中,如有问题,可向客服投诉</view>
  129. </view>
  130. <view class="step-line"></view>
  131. </view>
  132. <!-- 步骤4: 面试结果 -->
  133. <view
  134. class="step-item"
  135. :class="{ active: currentStep >= 4, completed: currentStep > 4 }"
  136. >
  137. <view class="step-icon">
  138. <view class="step-number">4</view>
  139. <view class="step-check" v-if="currentStep > 4">
  140. <u-icon name="checkmark" color="#fff" size="16"></u-icon>
  141. </view>
  142. </view>
  143. <view class="step-content">
  144. <view class="step-title">面试结果</view>
  145. <view class="step-desc">面试完后30天内可向招聘方获取面试结果</view>
  146. <u-tag v-if="currentStep>=4&&info.interviewResultType==null" text="等待面试结果" type="primary" mode="plain" size="mini"/>
  147. <u-tag v-if="currentStep>=4&&info.interviewResultType!=null" :text="info.interviewResultType==0?'面试通过':(info.interviewResultType==2?'面试未通过':'结果待定')" :type="info.interviewResultType==0?'primary':'error'" mode="light" size="mini"/>
  148. <u-tag v-if="currentStep==3" text="获取面试结果" type="info" mode="light" size="mini"/>
  149. </view>
  150. <view class="step-line"></view>
  151. </view>
  152. <!-- 步骤5: 获取面试结果 -->
  153. <!-- <view
  154. class="step-item"
  155. :class="{ active: currentStep >= 5, completed: currentStep > 5 }"
  156. >
  157. <view class="step-icon">
  158. <view class="step-number">5</view>
  159. <view class="step-check" v-if="currentStep > 5">
  160. <u-icon name="checkmark" color="#fff" size="16"></u-icon>
  161. </view>
  162. </view>
  163. <view class="step-content">
  164. <view class="step-title">获取面试结果</view>
  165. <view class="step-desc"></view>
  166. </view>
  167. </view> -->
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. <!-- 操作按钮 -->
  173. <view class="process-actions" v-if="info&&info.status==2">
  174. <button class="action-btn" v-if="currentStep === 1&&info.restHour>3" @click="updateRecord(1,3)">
  175. 取消面试
  176. </button>
  177. <button class="action-btn" v-if="currentStep === 1&&info.restHour<=3" @click="updateRecord(2,2)">
  178. 签到
  179. </button>
  180. <button
  181. class="action-btn"
  182. v-if="currentStep === 2"
  183. @click="updateRecord(3,2)"
  184. >
  185. 开始面试
  186. </button>
  187. <button
  188. class="action-btn"
  189. v-if="currentStep === 4"
  190. @click="handleGetResult"
  191. >
  192. 获取结果
  193. </button>
  194. <!-- <button
  195. class="action-btn complaint-btn"
  196. v-if="currentStep === 3"
  197. @click="handleComplaint"
  198. >
  199. 投诉
  200. </button> -->
  201. </view>
  202. </view>
  203. </view>
  204. </template>
  205. <script>
  206. import navBar from "@/components/nav-bar/index.vue";
  207. export default {
  208. data() {
  209. return {
  210. currentStep: 1,
  211. recordId:'',
  212. companyId:"",
  213. info:{},
  214. covers: []
  215. };
  216. },
  217. components: {
  218. navBar,
  219. },
  220. onLoad(options){
  221. this.recordId=options&&options.recordId?options.recordId:''
  222. this.companyId=options&&options.companyId?options.companyId:''
  223. this.getData()
  224. },
  225. methods: {
  226. getData(){
  227. var that=this
  228. this.$Request.getT("/app/interviewRecord/getInterviewInfo", {companyId:this.companyId,recordId:this.recordId}).then((res) => {
  229. if (res.code == 0) {
  230. let statusArr=['','待接受','已同意','已拒绝','已过期']
  231. res.data.statusText=statusArr[res.data.status]
  232. var detailTime=res.data.detailTime?that.$queue.convert12to24(res.data.detailTime):''
  233. res.data.interviewDateTime=res.data.interviewDateTime.substring(0,10)+' '+detailTime
  234. var expired=that.$queue.isDateExpired(res.data.interviewDateTime)
  235. res.data.expired=expired[0]
  236. res.data.restHour=expired[1]
  237. res.data.interviewDate=res.data.interviewDateTime.slice(0, 10)
  238. that.info=res.data
  239. console.log(that.info)
  240. that.currentStep=!res.data.interviewProcesses||res.data.interviewProcesses==0?res.data.interviewProcesses+1:res.data.interviewProcesses
  241. that.covers.push({
  242. id:1,
  243. latitude: res.data.lat,
  244. longitude: res.data.lng,
  245. iconPath:'../../static/images/mapMarker.png',
  246. alpha:0.5,
  247. width:20,
  248. height:20,
  249. callout: {
  250. // content: res.data.detailedAddress,
  251. content: res.data.address,
  252. color: '#000', //文字颜色
  253. fontSize: 10, //文本大小
  254. padding: 5, //附近留白
  255. borderRadius: 24, //边框圆角
  256. bgColor: '#FFFFFF', //背景颜色
  257. display: 'ALWAYS', //常显
  258. }
  259. })
  260. } else {
  261. uni.showToast({
  262. title: res.msg,
  263. icon: "none",
  264. });
  265. }
  266. });
  267. },
  268. handleSignIn() {
  269. this.$emit("sign-in");
  270. uni.showToast({
  271. title: "签到成功",
  272. icon: "success",
  273. });
  274. },
  275. handleStartInterview() {
  276. this.$emit("start-interview");
  277. },
  278. handleGetResult() {
  279. if(this.info.interviewResultType==null)
  280. return this.$queue.showToast('还未出结果,请耐心等待')
  281. uni.showModal({
  282. title: "面试"+(this.info.interviewResultType==0?'已通过':(this.info.interviewResultType==2?'未通过':'结果待定')),
  283. content: this.info.interviewResultMsg||'祝您生活愉快',
  284. editable: false,
  285. showCancel:false
  286. });
  287. this.$emit("get-result");
  288. },
  289. handleComplaint() {
  290. this.$emit("complaint");
  291. uni.showModal({
  292. title: "客服投诉",
  293. content: "请描述您遇到的问题",
  294. editable: true,
  295. placeholderText: "请输入问题描述...",
  296. success: (res) => {
  297. if (res.confirm && res.content) {
  298. uni.showToast({
  299. title: "投诉已提交",
  300. icon: "success",
  301. });
  302. }
  303. },
  304. });
  305. },
  306. updateRecord(interviewProcesses,status=2){
  307. var that=this
  308. that.$Request.postJson("/app/interviewRecord/saveInterview", {
  309. recordId:that.recordId,
  310. status:status,
  311. interviewProcesses:interviewProcesses
  312. }).then(res => {
  313. if (res.code === 0) {
  314. that.info.interviewProcesses=interviewProcesses
  315. that.info.status=status
  316. that.currentStep=interviewProcesses
  317. } else {
  318. uni.showToast({
  319. title: res.msg,
  320. icon: "none"
  321. })
  322. }
  323. })
  324. },
  325. //拉起地图导航
  326. gotoMap() {
  327. let that = this
  328. uni.openLocation({
  329. latitude: that.info.lat,
  330. longitude: that.info.lng,
  331. address: that.info.address+that.info.detailedAddress,
  332. complete(ret) {
  333. }
  334. })
  335. },
  336. },
  337. };
  338. </script>
  339. <style scoped lang="scss">
  340. .ms-detail {
  341. display: flex;
  342. flex-direction: column;
  343. height: 100vh;
  344. .detail-bg {
  345. height: 744rpx;
  346. width: 100%;
  347. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  348. position: absolute;
  349. left: 0;
  350. top: 0;
  351. }
  352. .detail-index {
  353. position: relative;
  354. z-index: 2;
  355. padding: 40rpx;
  356. box-sizing: border-box;
  357. flex: 1;
  358. overflow: auto;
  359. .detail-item {
  360. padding: 36rpx;
  361. box-sizing: border-box;
  362. border: 1rpx solid rgba(227, 231, 236, 1);
  363. border-radius: 6px;
  364. background: rgba(255, 255, 255, 1);
  365. margin-top: 20rpx;
  366. .process-top {
  367. display: flex;
  368. justify-content: space-between;
  369. align-items: center;
  370. .process-title {
  371. color: rgba(29, 33, 41, 1);
  372. font-family: DM Sans;
  373. font-size: 24rpx;
  374. font-weight: 500;
  375. line-height: 32rpx;
  376. }
  377. .process-status {
  378. color: #016bf6;
  379. font-family: DM Sans;
  380. font-size: 20rpx;
  381. font-weight: 700;
  382. line-height: 26rpx;
  383. }
  384. }
  385. .user-title {
  386. display: flex;
  387. align-items: center;
  388. .user-img {
  389. overflow: hidden;
  390. width: 80rpx;
  391. height: 80rpx;
  392. border-radius: 50%;
  393. margin-right: 24rpx;
  394. border: 8rpx solid #f6f6f6;
  395. image {
  396. width: 100%;
  397. height: 100%;
  398. }
  399. }
  400. .user-name-box {
  401. .user-name-com {
  402. color: #171725;
  403. font-family: DM Sans;
  404. font-size: 28rpx;
  405. font-weight: 400;
  406. line-height: 44rpx;
  407. text-align: left;
  408. }
  409. .user-info-img {
  410. display: flex;
  411. align-items: center;
  412. margin-top: 8rpx;
  413. image {
  414. width: 40rpx;
  415. height: 40rpx;
  416. border-radius: 50%;
  417. margin-right: 8rpx;
  418. }
  419. .user-name {
  420. color: #9ca4ab;
  421. font-family: DM Sans;
  422. font-size: 16rpx;
  423. font-weight: 400;
  424. line-height: 40rpx;
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. .msg-box {
  432. .msg-item {
  433. display: flex;
  434. align-items: center;
  435. color: rgba(153, 153, 153, 1);
  436. font-family: DM Sans;
  437. font-size: 24rpx;
  438. font-weight: 400;
  439. line-height: 32rpx;
  440. margin-top: 12rpx;
  441. .msg-label {
  442. min-width: 120rpx;
  443. margin-right: 24rpx;
  444. }
  445. }
  446. }
  447. .detail-title {
  448. color: #fff;
  449. font-size: 50rpx;
  450. font-weight: 500;
  451. font-family: DM Sans;
  452. }
  453. }
  454. .map-box {
  455. margin-top: 24rpx;
  456. border-radius: 12rpx;
  457. overflow: hidden;
  458. .map {
  459. width: 100%;
  460. height: 154rpx;
  461. }
  462. }
  463. .interview-process {
  464. margin-top: 24rpx;
  465. }
  466. .process-header {
  467. margin-bottom: 40rpx;
  468. }
  469. .process-title {
  470. font-size: 36rpx;
  471. font-weight: bold;
  472. color: #333;
  473. }
  474. .process-steps {
  475. position: relative;
  476. }
  477. .step-item {
  478. display: flex;
  479. align-items: flex-start;
  480. margin-bottom: 50rpx;
  481. position: relative;
  482. &:last-child {
  483. margin-bottom: 0;
  484. .step-line {
  485. display: none;
  486. }
  487. }
  488. }
  489. .step-icon {
  490. width: 32rpx;
  491. height: 32rpx;
  492. border-radius: 50%;
  493. background: #f5f5f5;
  494. display: flex;
  495. align-items: center;
  496. justify-content: center;
  497. margin-right: 24rpx;
  498. position: relative;
  499. z-index: 2;
  500. flex-shrink: 0;
  501. }
  502. .step-number {
  503. font-size: 20rpx;
  504. font-weight: bold;
  505. color: #999;
  506. }
  507. .step-check {
  508. display: flex;
  509. justify-content: center;
  510. align-items: center;
  511. }
  512. .step-content {
  513. flex: 1;
  514. }
  515. .step-title {
  516. color: rgba(29, 33, 41, 1);
  517. font-family: DM Sans;
  518. font-size: 24rpx;
  519. font-weight: 600;
  520. line-height: 32rpx;
  521. margin-bottom: 8rpx;
  522. }
  523. .step-desc {
  524. color: rgba(153, 153, 153, 1);
  525. font-family: DM Sans;
  526. font-size: 20rpx;
  527. font-weight: 400;
  528. line-height: 26rpx;
  529. margin-bottom: 10rpx;
  530. }
  531. .step-line {
  532. position: absolute;
  533. left: 16rpx;
  534. top: 42rpx;
  535. bottom: -30rpx;
  536. width: 2rpx;
  537. background: #f0f0f0;
  538. z-index: 1;
  539. }
  540. /* 激活状态 */
  541. .step-item.active {
  542. .step-icon {
  543. background: #016bf6;
  544. }
  545. .step-number {
  546. color: #fff;
  547. }
  548. .step-title {
  549. color: #016bf6;
  550. font-weight: bold;
  551. }
  552. .step-line {
  553. background: #016bf6;
  554. }
  555. }
  556. /* 完成状态 */
  557. .step-item.completed {
  558. .step-icon {
  559. background: #016bf6;
  560. }
  561. .step-number {
  562. display: none;
  563. }
  564. .step-check {
  565. display: block;
  566. }
  567. }
  568. /* 操作按钮 */
  569. .process-actions {
  570. margin-top: 50rpx;
  571. display: flex;
  572. gap: 20rpx;
  573. flex-wrap: wrap;
  574. }
  575. .action-btn {
  576. flex: 1;
  577. background: #016bf6;
  578. color: #fff;
  579. border: none;
  580. border-radius: 100rpx;
  581. padding: 6rpx 24rpx;
  582. font-size: 28rpx;
  583. color: rgba(255, 255, 255, 1);
  584. font-family: DM Sans;
  585. font-size: 24rpx;
  586. font-weight: 400;
  587. text-align: center;
  588. &::after {
  589. border: none;
  590. }
  591. &:active {
  592. background: #009974;
  593. }
  594. }
  595. .complaint-btn {
  596. background: #ff4444;
  597. &:active {
  598. background: #dd3333;
  599. }
  600. }
  601. </style>