mianshiDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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 === 3"
  190. @click="updateRecord(4, 2)"
  191. >
  192. 面试已完成
  193. </button>
  194. <button
  195. class="action-btn"
  196. v-if="currentStep === 4"
  197. @click="handleGetResult"
  198. >
  199. 获取结果
  200. </button>
  201. <!-- <button
  202. class="action-btn complaint-btn"
  203. v-if="currentStep === 3"
  204. @click="handleComplaint"
  205. >
  206. 投诉
  207. </button> -->
  208. </view>
  209. </view>
  210. </view>
  211. </template>
  212. <script>
  213. import navBar from "@/components/nav-bar/index.vue";
  214. export default {
  215. data() {
  216. return {
  217. currentStep: 1,
  218. recordId:'',
  219. companyId:"",
  220. info:{},
  221. covers: []
  222. };
  223. },
  224. components: {
  225. navBar,
  226. },
  227. onLoad(options){
  228. this.recordId=options&&options.recordId?options.recordId:''
  229. this.companyId=options&&options.companyId?options.companyId:''
  230. this.getData()
  231. },
  232. methods: {
  233. getData(){
  234. var that=this
  235. this.$Request.getT("/app/interviewRecord/getInterviewInfo", {companyId:this.companyId,recordId:this.recordId}).then((res) => {
  236. if (res.code == 0) {
  237. let statusArr=['','待接受','已同意','已拒绝','已过期']
  238. res.data.statusText=statusArr[res.data.status]
  239. var detailTime=res.data.detailTime?that.$queue.convert12to24(res.data.detailTime):''
  240. res.data.interviewDateTime=res.data.interviewDateTime.substring(0,10)+' '+detailTime
  241. var expired=that.$queue.isDateExpired(res.data.interviewDateTime)
  242. res.data.expired=expired[0]
  243. res.data.restHour=expired[1]
  244. res.data.interviewDate=res.data.interviewDateTime.slice(0, 10)
  245. that.info=res.data
  246. console.log(that.info)
  247. that.currentStep=!res.data.interviewProcesses||res.data.interviewProcesses==0?res.data.interviewProcesses+1:res.data.interviewProcesses
  248. that.covers.push({
  249. id:1,
  250. latitude: res.data.lat,
  251. longitude: res.data.lng,
  252. iconPath:'../../static/images/mapMarker.png',
  253. alpha:0.5,
  254. width:20,
  255. height:20,
  256. callout: {
  257. // content: res.data.detailedAddress,
  258. content: res.data.address,
  259. color: '#000', //文字颜色
  260. fontSize: 10, //文本大小
  261. padding: 5, //附近留白
  262. borderRadius: 24, //边框圆角
  263. bgColor: '#FFFFFF', //背景颜色
  264. display: 'ALWAYS', //常显
  265. }
  266. })
  267. } else {
  268. uni.showToast({
  269. title: res.msg,
  270. icon: "none",
  271. });
  272. }
  273. });
  274. },
  275. handleSignIn() {
  276. this.$emit("sign-in");
  277. uni.showToast({
  278. title: "签到成功",
  279. icon: "success",
  280. });
  281. },
  282. handleStartInterview() {
  283. this.$emit("start-interview");
  284. },
  285. handleGetResult() {
  286. if(this.info.interviewResultType==null)
  287. return this.$queue.showToast('还未出结果,请耐心等待')
  288. uni.showModal({
  289. title: "面试"+(this.info.interviewResultType==0?'已通过':(this.info.interviewResultType==2?'未通过':'结果待定')),
  290. content: this.info.interviewResultMsg||'祝您生活愉快',
  291. editable: false,
  292. showCancel:false
  293. });
  294. this.$emit("get-result");
  295. },
  296. handleComplaint() {
  297. this.$emit("complaint");
  298. uni.showModal({
  299. title: "客服投诉",
  300. content: "请描述您遇到的问题",
  301. editable: true,
  302. placeholderText: "请输入问题描述...",
  303. success: (res) => {
  304. if (res.confirm && res.content) {
  305. uni.showToast({
  306. title: "投诉已提交",
  307. icon: "success",
  308. });
  309. }
  310. },
  311. });
  312. },
  313. updateRecord(interviewProcesses,status=2){
  314. var that=this
  315. that.$Request.postJson("/app/interviewRecord/saveInterview", {
  316. recordId:that.recordId,
  317. status:status,
  318. interviewProcesses:interviewProcesses
  319. }).then(res => {
  320. if (res.code === 0) {
  321. that.info.interviewProcesses=interviewProcesses
  322. that.info.status=status
  323. that.currentStep=interviewProcesses
  324. } else {
  325. uni.showToast({
  326. title: res.msg,
  327. icon: "none"
  328. })
  329. }
  330. })
  331. },
  332. //拉起地图导航
  333. gotoMap() {
  334. let that = this
  335. uni.openLocation({
  336. latitude: that.info.lat,
  337. longitude: that.info.lng,
  338. address: that.info.address+that.info.detailedAddress,
  339. complete(ret) {
  340. }
  341. })
  342. },
  343. },
  344. };
  345. </script>
  346. <style scoped lang="scss">
  347. .ms-detail {
  348. display: flex;
  349. flex-direction: column;
  350. height: 100vh;
  351. .detail-bg {
  352. height: 744rpx;
  353. width: 100%;
  354. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  355. position: absolute;
  356. left: 0;
  357. top: 0;
  358. }
  359. .detail-index {
  360. position: relative;
  361. z-index: 2;
  362. padding: 40rpx;
  363. box-sizing: border-box;
  364. flex: 1;
  365. overflow: auto;
  366. .detail-item {
  367. padding: 36rpx;
  368. box-sizing: border-box;
  369. border: 1rpx solid rgba(227, 231, 236, 1);
  370. border-radius: 6px;
  371. background: rgba(255, 255, 255, 1);
  372. margin-top: 20rpx;
  373. .process-top {
  374. display: flex;
  375. justify-content: space-between;
  376. align-items: center;
  377. .process-title {
  378. color: rgba(29, 33, 41, 1);
  379. font-family: DM Sans;
  380. font-size: 24rpx;
  381. font-weight: 500;
  382. line-height: 32rpx;
  383. }
  384. .process-status {
  385. color: #016bf6;
  386. font-family: DM Sans;
  387. font-size: 20rpx;
  388. font-weight: 700;
  389. line-height: 26rpx;
  390. }
  391. }
  392. .user-title {
  393. display: flex;
  394. align-items: center;
  395. .user-img {
  396. overflow: hidden;
  397. width: 80rpx;
  398. height: 80rpx;
  399. border-radius: 50%;
  400. margin-right: 24rpx;
  401. border: 8rpx solid #f6f6f6;
  402. image {
  403. width: 100%;
  404. height: 100%;
  405. }
  406. }
  407. .user-name-box {
  408. .user-name-com {
  409. color: #171725;
  410. font-family: DM Sans;
  411. font-size: 28rpx;
  412. font-weight: 400;
  413. line-height: 44rpx;
  414. text-align: left;
  415. }
  416. .user-info-img {
  417. display: flex;
  418. align-items: center;
  419. margin-top: 8rpx;
  420. image {
  421. width: 40rpx;
  422. height: 40rpx;
  423. border-radius: 50%;
  424. margin-right: 8rpx;
  425. }
  426. .user-name {
  427. color: #9ca4ab;
  428. font-family: DM Sans;
  429. font-size: 16rpx;
  430. font-weight: 400;
  431. line-height: 40rpx;
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. .msg-box {
  439. .msg-item {
  440. display: flex;
  441. align-items: center;
  442. color: rgba(153, 153, 153, 1);
  443. font-family: DM Sans;
  444. font-size: 24rpx;
  445. font-weight: 400;
  446. line-height: 32rpx;
  447. margin-top: 12rpx;
  448. .msg-label {
  449. min-width: 120rpx;
  450. margin-right: 24rpx;
  451. }
  452. }
  453. }
  454. .detail-title {
  455. color: #fff;
  456. font-size: 50rpx;
  457. font-weight: 500;
  458. font-family: DM Sans;
  459. }
  460. }
  461. .map-box {
  462. margin-top: 24rpx;
  463. border-radius: 12rpx;
  464. overflow: hidden;
  465. .map {
  466. width: 100%;
  467. height: 154rpx;
  468. }
  469. }
  470. .interview-process {
  471. margin-top: 24rpx;
  472. }
  473. .process-header {
  474. margin-bottom: 40rpx;
  475. }
  476. .process-title {
  477. font-size: 36rpx;
  478. font-weight: bold;
  479. color: #333;
  480. }
  481. .process-steps {
  482. position: relative;
  483. }
  484. .step-item {
  485. display: flex;
  486. align-items: flex-start;
  487. margin-bottom: 50rpx;
  488. position: relative;
  489. &:last-child {
  490. margin-bottom: 0;
  491. .step-line {
  492. display: none;
  493. }
  494. }
  495. }
  496. .step-icon {
  497. width: 32rpx;
  498. height: 32rpx;
  499. border-radius: 50%;
  500. background: #f5f5f5;
  501. display: flex;
  502. align-items: center;
  503. justify-content: center;
  504. margin-right: 24rpx;
  505. position: relative;
  506. z-index: 2;
  507. flex-shrink: 0;
  508. }
  509. .step-number {
  510. font-size: 20rpx;
  511. font-weight: bold;
  512. color: #999;
  513. }
  514. .step-check {
  515. display: flex;
  516. justify-content: center;
  517. align-items: center;
  518. }
  519. .step-content {
  520. flex: 1;
  521. }
  522. .step-title {
  523. color: rgba(29, 33, 41, 1);
  524. font-family: DM Sans;
  525. font-size: 24rpx;
  526. font-weight: 600;
  527. line-height: 32rpx;
  528. margin-bottom: 8rpx;
  529. }
  530. .step-desc {
  531. color: rgba(153, 153, 153, 1);
  532. font-family: DM Sans;
  533. font-size: 20rpx;
  534. font-weight: 400;
  535. line-height: 26rpx;
  536. margin-bottom: 10rpx;
  537. }
  538. .step-line {
  539. position: absolute;
  540. left: 16rpx;
  541. top: 42rpx;
  542. bottom: -30rpx;
  543. width: 2rpx;
  544. background: #f0f0f0;
  545. z-index: 1;
  546. }
  547. /* 激活状态 */
  548. .step-item.active {
  549. .step-icon {
  550. background: #016bf6;
  551. }
  552. .step-number {
  553. color: #fff;
  554. }
  555. .step-title {
  556. color: #016bf6;
  557. font-weight: bold;
  558. }
  559. .step-line {
  560. background: #016bf6;
  561. }
  562. }
  563. /* 完成状态 */
  564. .step-item.completed {
  565. .step-icon {
  566. background: #016bf6;
  567. }
  568. .step-number {
  569. display: none;
  570. }
  571. .step-check {
  572. display: block;
  573. }
  574. }
  575. /* 操作按钮 */
  576. .process-actions {
  577. margin-top: 50rpx;
  578. display: flex;
  579. gap: 20rpx;
  580. flex-wrap: wrap;
  581. }
  582. .action-btn {
  583. flex: 1;
  584. background: #016bf6;
  585. color: #fff;
  586. border: none;
  587. border-radius: 100rpx;
  588. padding: 6rpx 24rpx;
  589. font-size: 28rpx;
  590. color: rgba(255, 255, 255, 1);
  591. font-family: DM Sans;
  592. font-size: 24rpx;
  593. font-weight: 400;
  594. text-align: center;
  595. &::after {
  596. border: none;
  597. }
  598. &:active {
  599. background: #009974;
  600. }
  601. }
  602. .complaint-btn {
  603. background: #ff4444;
  604. &:active {
  605. background: #dd3333;
  606. }
  607. }
  608. </style>