mianshiDetail.vue 17 KB

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