interviewManage.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <view class="page">
  3. <!-- Custom Navbar -->
  4. <view class="custom-navbar">
  5. <view class="navbar-content">
  6. <view class="navbar-left" @click="goBack">
  7. <u-icon name="arrow-leftward" color="rgba(51, 51, 51, 1)" size="36"></u-icon>
  8. </view>
  9. <view class="navbar-title">面试管理</view>
  10. <view class="navbar-right"></view>
  11. </view>
  12. </view>
  13. <!-- Tab Navigation -->
  14. <view class="tab-section">
  15. <u-tabs
  16. :list="tabs"
  17. :current="activeTab"
  18. @change="switchTab"
  19. :is-scroll="false"
  20. :height="88"
  21. :font-size="24"
  22. active-color="rgba(1, 107, 246, 1)"
  23. inactive-color="rgba(102, 102, 102, 1)"
  24. :bar-width="80"
  25. :bar-height="4"
  26. :gutter="40"
  27. bg-color="#ffffff"
  28. :bar-style="{
  29. borderRadius: '2rpx'
  30. }"
  31. ></u-tabs>
  32. </view>
  33. <!-- Content Section -->
  34. <view class="content-section">
  35. <!-- 待反馈 -->
  36. <view v-if="activeTab === 0">
  37. <view v-if="pendingFeedback.length > 0" class="interview-list">
  38. <!-- 待反馈面试列表 -->
  39. <view class="interview-item" v-for="interview in pendingFeedback" :key="interview.id" @click="goToInterviewDetail(interview)">
  40. <view class="interview-info">
  41. <view class="candidate-name">{{ interview.candidateName }}</view>
  42. <view class="interview-time">{{ interview.interviewTime }}</view>
  43. <view class="position">{{ interview.position }}</view>
  44. </view>
  45. <view class="interview-status">
  46. <text class="status-text pending">待反馈</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="empty-state" v-else>
  51. <view class="empty-illustration">
  52. <image src="../../static/images/index/Hrempty.svg" class="empty-image" mode="aspectFit" />
  53. </view>
  54. </view>
  55. </view>
  56. <!-- 已反馈 -->
  57. <view v-if="activeTab === 1">
  58. <view v-if="feedbackReceived.length > 0" class="interview-list">
  59. <!-- 已反馈面试列表 -->
  60. <view class="interview-item" v-for="interview in feedbackReceived" :key="interview.id" @click="goToInterviewDetail(interview)">
  61. <view class="interview-avatar">
  62. <image :src="interview.avatar" class="avatar-image" mode="aspectFill"></image>
  63. </view>
  64. <view class="interview-content">
  65. <view class="interview-title">与{{ interview.candidateName }}的面试</view>
  66. <view class="position-info">面试职位: {{ interview.position }} | {{ interview.salary }}</view>
  67. <view class="interview-time">面试时间: {{ interview.interviewTime }}</view>
  68. </view>
  69. <view class="interview-result">
  70. <text class="result-text" :class="interview.status === 'passed' ? 'passed' : 'failed'">
  71. {{ interview.status === 'passed' ? '已通过' : '未通过' }}
  72. </text>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="empty-state" v-else>
  77. <view class="empty-illustration">
  78. <image src="../../static/images/index/Hrempty.svg" class="empty-image" mode="aspectFit" />
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 全部面试 -->
  83. <view v-if="activeTab === 2">
  84. <view v-if="allInterviews.length > 0" class="interview-list">
  85. <!-- 全部面试列表 -->
  86. <view class="interview-item" v-for="interview in allInterviews" :key="interview.id" @click="goToInterviewDetail(interview)">
  87. <view class="interview-avatar">
  88. <image :src="interview.avatar" class="avatar-image" mode="aspectFill"></image>
  89. </view>
  90. <view class="interview-content">
  91. <view class="interview-title">与{{ interview.candidateName }}的面试</view>
  92. <view class="position-info">面试职位: {{ interview.position }} | {{ interview.salary }}</view>
  93. <view class="interview-time">面试时间: {{ interview.interviewTime }}</view>
  94. </view>
  95. <view class="interview-result">
  96. <text class="result-text" :class="interview.status === 'passed' ? 'passed' : 'failed'">
  97. {{ interview.status === 'passed' ? '已通过' : '未通过' }}
  98. </text>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="empty-state" v-else>
  103. <view class="empty-illustration">
  104. <image src="../../static/images/index/Hrempty.svg" class="empty-image" mode="aspectFit" />
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <script>
  112. export default {
  113. data() {
  114. return {
  115. statusBarHeight: 0,
  116. activeTab: 0,
  117. tabs: [
  118. { name: '待反馈 (0)' },
  119. { name: '已反馈 (2)' },
  120. { name: '全部面试' }
  121. ],
  122. // 待反馈面试数据
  123. pendingFeedback: [],
  124. // 已反馈面试数据
  125. feedbackReceived: [
  126. {
  127. id: 1,
  128. candidateName: '廖春',
  129. interviewTime: '2025-08-05 20:40',
  130. position: '亚马逊总监',
  131. salary: '24-36K · 16薪',
  132. status: 'passed',
  133. avatar: '/static/images/default-avatar.png'
  134. },
  135. {
  136. id: 2,
  137. candidateName: '廖春',
  138. interviewTime: '2025-08-05 20:40',
  139. position: '亚马逊总监',
  140. salary: '24-36K · 16薪',
  141. status: 'failed',
  142. avatar: '/static/images/default-avatar.png'
  143. }
  144. ],
  145. // 全部面试数据
  146. allInterviews: [
  147. {
  148. id: 1,
  149. candidateName: '廖春',
  150. interviewTime: '2025-08-05 20:40',
  151. position: '亚马逊总监',
  152. salary: '24-36K · 16薪',
  153. status: 'passed',
  154. avatar: '/static/images/default-avatar.png'
  155. },
  156. {
  157. id: 2,
  158. candidateName: '廖春',
  159. interviewTime: '2025-08-05 20:40',
  160. position: '亚马逊总监',
  161. salary: '24-36K · 16薪',
  162. status: 'failed',
  163. avatar: '/static/images/default-avatar.png'
  164. }
  165. ]
  166. }
  167. },
  168. onLoad() {
  169. const systemInfo = uni.getSystemInfoSync()
  170. this.statusBarHeight = systemInfo.statusBarHeight || 0
  171. },
  172. methods: {
  173. goBack() {
  174. uni.navigateBack()
  175. },
  176. switchTab(index) {
  177. this.activeTab = index
  178. },
  179. goToInterviewDetail(interview) {
  180. console.log('查看面试详情:', interview)
  181. // uni.navigateTo({
  182. // url: `/pages/interview/detail?id=${interview.id}`
  183. // })
  184. }
  185. }
  186. }
  187. </script>
  188. <style lang="scss" scoped>
  189. .page {
  190. height: 100vh;
  191. overflow: hidden;
  192. }
  193. /* Custom Navbar */
  194. .custom-navbar {
  195. position: fixed;
  196. top: 0;
  197. left: 0;
  198. right: 0;
  199. z-index: 1000;
  200. background-color: #ffffff;
  201. padding-top: 80rpx;
  202. .navbar-content {
  203. display: flex;
  204. align-items: center;
  205. justify-content: space-between;
  206. height: 88rpx;
  207. padding: 0 32rpx;
  208. .navbar-left, .navbar-right {
  209. width: 60rpx;
  210. height: 60rpx;
  211. display: flex;
  212. align-items: center;
  213. justify-content: center;
  214. }
  215. .navbar-title {
  216. flex: 1;
  217. text-align: center;
  218. font-size: 36rpx;
  219. font-weight: 600;
  220. color: rgba(51, 51, 51, 1);
  221. }
  222. }
  223. }
  224. /* Tab Section */
  225. .tab-section {
  226. position: fixed;
  227. top: 168rpx;
  228. left: 0;
  229. right: 0;
  230. z-index: 999;
  231. background-color: #ffffff;
  232. padding: 0 32rpx 20rpx 32rpx;
  233. }
  234. /* Content Section */
  235. .content-section {
  236. margin-top: 268rpx;
  237. height: calc(100vh - 268rpx);
  238. overflow-y: auto;
  239. padding: 32rpx;
  240. }
  241. /* Empty State */
  242. .empty-state {
  243. display: flex;
  244. align-items: center;
  245. justify-content: center;
  246. padding: 40rpx;
  247. .empty-illustration {
  248. margin-bottom: 40rpx;
  249. .empty-image {
  250. width: 700rpx;
  251. height: 800rpx;
  252. }
  253. }
  254. .empty-text {
  255. color: rgba(120, 130, 138, 1);
  256. font-family: DM Sans;
  257. font-size: 28rpx;
  258. font-weight: 400;
  259. line-height: 36rpx;
  260. text-align: center;
  261. flex: 1;
  262. }
  263. }
  264. /* Interview List */
  265. .interview-list {
  266. .interview-item {
  267. background-color: #ffffff;
  268. padding: 32rpx;
  269. border-bottom: 1rpx solid rgba(240, 240, 240, 1);
  270. display: flex;
  271. align-items: flex-start;
  272. &:last-child {
  273. border-bottom: none;
  274. }
  275. .interview-avatar {
  276. margin-right: 24rpx;
  277. .avatar-image {
  278. width: 96rpx;
  279. height: 96rpx;
  280. border-radius: 50%;
  281. background-color: rgba(240, 240, 240, 1);
  282. }
  283. }
  284. .interview-content {
  285. flex: 1;
  286. .interview-title {
  287. color: rgba(21, 22, 26, 1);
  288. font-family: DM Sans;
  289. font-size: 32rpx;
  290. font-weight: 400;
  291. line-height: 48rpx;
  292. letter-spacing: 0%;
  293. text-align: left;
  294. margin-bottom: 8rpx;
  295. }
  296. .position-info {
  297. color: rgba(117, 119, 124, 1);
  298. font-family: DM Sans;
  299. font-size: 24rpx;
  300. font-weight: 400;
  301. line-height: 36rpx;
  302. letter-spacing: 0%;
  303. text-align: left;
  304. margin-bottom: 8rpx;
  305. }
  306. .interview-time {
  307. color: rgba(117, 119, 124, 1);
  308. font-family: DM Sans;
  309. font-size: 24rpx;
  310. font-weight: 400;
  311. line-height: 36rpx;
  312. letter-spacing: 0%;
  313. text-align: left;
  314. }
  315. }
  316. .interview-result {
  317. align-self: flex-start;
  318. margin-top: 8rpx;
  319. .result-text {
  320. font-family: DM Sans;
  321. font-size: 24rpx;
  322. font-weight: 400;
  323. line-height: 40rpx;
  324. letter-spacing: 0%;
  325. text-align: right;
  326. color: rgba(153, 153, 153, 1);
  327. &.passed {
  328. color: rgba(40, 167, 69, 1);
  329. }
  330. &.failed {
  331. color: rgba(220, 53, 69, 1);
  332. }
  333. }
  334. }
  335. }
  336. }
  337. </style>