index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <view class="page">
  3. <!-- 背景层 -->
  4. <view class="detail-bg"></view>
  5. <!-- 导航栏 -->
  6. <nav-bar title="招聘数据"></nav-bar>
  7. <!-- 可滚动内容区域 -->
  8. <view class="content">
  9. <!-- 头部区域 -->
  10. <view class="header-section">
  11. <view class="header-content">
  12. <view class="main-title">我的招聘数据</view>
  13. <view class="week-data-btn" @click="toggleWeekData">
  14. <image src="/static/images/zhoushuju.svg" class="week-icon" mode="aspectFit"></image>
  15. <text class="btn-text">周数据</text>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 内容区域 -->
  20. <view class="content-section">
  21. <!-- 今日数据卡片 -->
  22. <view class="today-data-card">
  23. <view class="card-header">
  24. <view class="card-title">
  25. <text>今日数据</text>
  26. <image src="/static/images/qiehuan.svg" class="switch-icon" mode="aspectFit" @click="goToDataCenter"></image>
  27. </view>
  28. <view class="filter-btn" @click="goToDataCenter">
  29. <text class="filter-text">亚马逊运营总监</text>
  30. <u-icon name="arrow-down" color="#016BF6" size="16"></u-icon>
  31. </view>
  32. </view>
  33. <view class="data-grid">
  34. <view
  35. class="data-item"
  36. v-for="(item, index) in todayData"
  37. :key="index"
  38. @click="showDetail(item)"
  39. >
  40. <view class="data-title">{{ item.title }}</view>
  41. <view class="data-compare">
  42. <view class="data-number">{{ item.number }}</view>
  43. <view class="data-compare-text">
  44. <text class="compare-text">较昨日</text>
  45. <text class="compare-change">{{ item.change }}</text>
  46. <u-icon name="arrow-right" color="#999" size="24"></u-icon>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 今日权益使用量卡片 -->
  53. <view class="benefits-card">
  54. <view class="card-title">今日权益使用量</view>
  55. <view class="benefits-list">
  56. <view
  57. class="benefit-item"
  58. v-for="(benefit, index) in benefitsData"
  59. :key="index"
  60. >
  61. <!-- 图标、查看和急聘标签区域 -->
  62. <view class="benefit-header">
  63. <view class="benefit-icon-container">
  64. <image :src="getBenefitIcon(benefit.action)" class="benefit-icon" mode="aspectFit"></image>
  65. <text class="benefit-action">{{ benefit.action }}</text>
  66. <text v-if="benefit.isUrgent" class="urgent-tag">急聘</text>
  67. </view>
  68. </view>
  69. <!-- 招聘职位和进度条区域 -->
  70. <view class="benefit-content">
  71. <view class="benefit-type-container">
  72. <text class="benefit-type">{{ benefit.type }}</text>
  73. </view>
  74. <view class="progress-container">
  75. <u-line-progress
  76. :percent="(benefit.used / benefit.total * 100)"
  77. :show-percent="false"
  78. :height="12"
  79. active-color="#016BF6"
  80. inactive-color="#E3E7EC"
  81. ></u-line-progress>
  82. <text class="progress-text">{{ benefit.used }}/{{ benefit.total }}</text>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import navBar from "@/components/nav-bar/index.vue";
  94. export default {
  95. components: {
  96. navBar
  97. },
  98. data() {
  99. return {
  100. statusBarHeight: 0,
  101. todayData: [
  102. { title: '我看过', number: 1120, change: -9 },
  103. { title: '看过我', number: 1120, change: -9 },
  104. { title: '我沟通', number: 1120, change: -9 },
  105. { title: '求职者沟通', number: 1120, change: -9 },
  106. { title: '收获简历', number: 1120, change: -9 },
  107. { title: '交换电话微信', number: 1120, change: -9 },
  108. { title: '接受面试', number: 1120, change: -9 }
  109. ],
  110. benefitsData: [
  111. {
  112. action: '查看',
  113. type: '招聘职位',
  114. used: 4,
  115. total: 10,
  116. isUrgent: false
  117. },
  118. {
  119. action: '沟通',
  120. type: '招聘职位',
  121. used: 4,
  122. total: 10,
  123. isUrgent: false
  124. },
  125. {
  126. action: '查看',
  127. type: '急聘职位',
  128. used: 4,
  129. total: 10,
  130. isUrgent: true
  131. },
  132. {
  133. action: '沟通',
  134. type: '急聘职位',
  135. used: 4,
  136. total: 10,
  137. isUrgent: true
  138. }
  139. ]
  140. }
  141. },
  142. onLoad() {
  143. // 获取状态栏高度
  144. const systemInfo = uni.getSystemInfoSync()
  145. this.statusBarHeight = systemInfo.statusBarHeight || 0
  146. },
  147. methods: {
  148. getBenefitIcon(action) {
  149. switch(action) {
  150. case '查看':
  151. return '/static/images/eye.svg'
  152. case '沟通':
  153. return '/static/images/goutong.svg'
  154. default:
  155. return '/static/images/eye.svg'
  156. }
  157. },
  158. goBack() {
  159. uni.navigateBack()
  160. },
  161. goToDataCenter() {
  162. uni.navigateTo({
  163. url: '/pages/recruitmentData/dataCenter'
  164. })
  165. },
  166. toggleWeekData() {
  167. // 切换周数据视图
  168. console.log('切换周数据')
  169. },
  170. showDetail(item) {
  171. // 显示详情
  172. console.log('显示详情:', item)
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. .page {
  179. display: flex;
  180. flex-direction: column;
  181. height: 100vh;
  182. }
  183. .detail-bg {
  184. height: 327px;
  185. width: 100%;
  186. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  187. position: absolute;
  188. }
  189. .content {
  190. flex: 1;
  191. overflow: auto;
  192. display: flex;
  193. flex-direction: column;
  194. z-index: 0;
  195. }
  196. /* 自定义导航栏 */
  197. .custom-navbar {
  198. position: fixed;
  199. top: 80rpx;
  200. left: 0;
  201. right: 0;
  202. z-index: 1000;
  203. }
  204. .navbar-content {
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. height: 44px;
  209. padding: 0 20rpx;
  210. }
  211. .navbar-left {
  212. width: 44px;
  213. height: 44px;
  214. display: flex;
  215. align-items: center;
  216. justify-content: center;
  217. }
  218. .navbar-title {
  219. color: rgba(255, 255, 255, 1);
  220. font-family: DM Sans;
  221. font-size: 30rpx;
  222. font-weight: 700;
  223. line-height: 52rpx;
  224. letter-spacing: 0.5%;
  225. text-align: center;
  226. }
  227. .navbar-right {
  228. width: 44px;
  229. }
  230. /* 头部区域 */
  231. .header-section {
  232. padding: 40rpx 32rpx 0rpx 32rpx;
  233. }
  234. .header-content {
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. }
  239. .main-title {
  240. color: rgba(255, 255, 255, 1);
  241. font-family: DM Sans;
  242. font-size: 48rpx;
  243. font-weight: 700;
  244. line-height: 60rpx;
  245. letter-spacing: 0px;
  246. text-align: left;
  247. }
  248. .week-data-btn {
  249. background: rgba(255, 255, 255, 1);
  250. border-radius: 20px;
  251. padding: 12rpx 28rpx;
  252. display: flex;
  253. align-items: center;
  254. gap: 8rpx;
  255. }
  256. .week-icon {
  257. width: 32rpx;
  258. height: 32rpx;
  259. }
  260. .btn-text {
  261. color: rgba(1, 107, 246, 1);
  262. font-family: DM Sans;
  263. font-size: 24rpx;
  264. font-weight: 400;
  265. line-height: 32rpx;
  266. letter-spacing: 0%;
  267. text-align: left;
  268. }
  269. .calendar-icon {
  270. color: white;
  271. font-size: 12px;
  272. }
  273. /* 内容区域 */
  274. .content-section {
  275. padding: 32rpx;
  276. }
  277. /* 今日数据卡片 */
  278. .today-data-card {
  279. padding: 32rpx 20rpx;
  280. box-sizing: border-box;
  281. border: 0.5px solid rgba(227, 231, 236, 1);
  282. border-radius: 6px;
  283. background: rgba(255, 255, 255, 1);
  284. margin-bottom: 20rpx;
  285. }
  286. .card-header {
  287. display: flex;
  288. align-items: center;
  289. justify-content: space-between;
  290. margin-bottom: 16px;
  291. }
  292. .card-title {
  293. color: rgba(23, 23, 37, 1);
  294. font-family: DM Sans;
  295. font-size: 28rpx;
  296. font-weight: 400;
  297. line-height: 44rpx;
  298. letter-spacing: 0.5%;
  299. text-align: left;
  300. }
  301. .switch-icon {
  302. width: 18rpx;
  303. height: 18rpx;
  304. margin-left: 12rpx;
  305. }
  306. .filter-btn {
  307. padding: 8rpx;
  308. box-sizing: border-box;
  309. border: 0.5px solid rgba(1, 107, 246, 1);
  310. border-radius: 8rpx;
  311. background: rgba(252, 233, 220, 1);
  312. display: flex;
  313. align-items: center;
  314. justify-content: center;
  315. gap: 8rpx;
  316. }
  317. .filter-text {
  318. color: rgba(1, 107, 246, 1);
  319. font-family: DM Sans;
  320. font-size: 16rpx;
  321. font-weight: 400;
  322. line-height: 20rpx;
  323. }
  324. /* 数据网格 */
  325. .data-grid {
  326. display: grid;
  327. grid-template-columns: 1fr 1fr;
  328. gap: 12px;
  329. }
  330. .data-item {
  331. padding: 24rpx;
  332. box-sizing: border-box;
  333. border: 0.5px solid rgba(227, 231, 236, 1);
  334. border-radius: 6px;
  335. background: rgba(255, 255, 255, 1);
  336. }
  337. .data-title {
  338. color: rgba(102, 102, 102, 1);
  339. font-family: DM Sans;
  340. font-size: 24rpx;
  341. font-weight: 400;
  342. line-height: 32rpx;
  343. letter-spacing: 0%;
  344. text-align: left;
  345. }
  346. .data-number {
  347. color: rgba(51, 51, 51, 1);
  348. font-family: DM Sans;
  349. font-size: 40rpx;
  350. font-weight: 400;
  351. line-height: 52rpx;
  352. letter-spacing: 0%;
  353. text-align: left;
  354. }
  355. .data-compare-text {
  356. gap: 8rpx;
  357. display: flex;
  358. align-items: center;
  359. justify-content: space-between;
  360. }
  361. .data-compare {
  362. display: flex;
  363. align-items: center;
  364. justify-content: space-between;
  365. }
  366. .compare-text {
  367. color: rgba(153, 153, 153, 1);
  368. font-family: DM Sans;
  369. font-size: 20rpx;
  370. font-weight: 400;
  371. line-height: 26rpx;
  372. letter-spacing: 0%;
  373. text-align: left;
  374. }
  375. .compare-change {
  376. color: var(--016BF6, rgba(1, 107, 246, 1));
  377. font-family: DM Sans;
  378. font-size: 20rpx;
  379. font-weight: 400;
  380. line-height: 26rpx;
  381. letter-spacing: 0%;
  382. text-align: left;
  383. }
  384. /* 权益使用量卡片 */
  385. .benefits-card {
  386. padding: 32rpx 20rpx;
  387. box-sizing: border-box;
  388. border: 0.5px solid rgba(227, 231, 236, 1);
  389. border-radius: 6px;
  390. background: rgba(255, 255, 255, 1);
  391. }
  392. .benefits-list {
  393. margin-top: 32rpx;
  394. }
  395. .benefit-item {
  396. background: rgba(255, 255, 255, 1);
  397. border: 0.5px solid rgba(227, 231, 236, 1);
  398. border-radius: 6px;
  399. padding: 24rpx;
  400. margin-bottom: 16rpx;
  401. }
  402. .benefit-item:last-child {
  403. margin-bottom: 0;
  404. }
  405. .benefit-header {
  406. display: flex;
  407. align-items: center;
  408. gap: 16rpx;
  409. margin-bottom: 16rpx;
  410. }
  411. .benefit-icon-container {
  412. display: flex;
  413. align-items: center;
  414. gap: 16rpx;
  415. }
  416. .benefit-action {
  417. color: rgba(102, 102, 102, 1);
  418. font-family: DM Sans;
  419. font-size: 24rpx;
  420. font-weight: 400;
  421. line-height: 32rpx;
  422. letter-spacing: 0%;
  423. text-align: left;
  424. }
  425. .benefit-icon {
  426. width: 32rpx;
  427. height: 32rpx;
  428. }
  429. .benefit-content {
  430. display: flex;
  431. align-items: center;
  432. justify-content: space-between;
  433. gap: 16rpx;
  434. }
  435. .benefit-type-container {
  436. display: flex;
  437. align-items: center;
  438. gap: 8rpx;
  439. }
  440. .benefit-type {
  441. color: rgba(153, 153, 153, 1);
  442. font-family: DM Sans;
  443. font-size: 20rpx;
  444. font-weight: 400;
  445. line-height: 26rpx;
  446. letter-spacing: 0%;
  447. text-align: left;
  448. }
  449. .urgent-tag {
  450. background: rgba(236, 225, 253, 1);
  451. padding: 8rpx;
  452. border: 1px solid rgba(106, 84, 214, 1);
  453. border-radius: 8rpx;
  454. color: rgba(106, 84, 214, 1);
  455. font-family: DM Sans;
  456. font-size: 16rpx;
  457. font-weight: 400;
  458. line-height: 20rpx;
  459. letter-spacing: 0%;
  460. text-align: left;
  461. }
  462. .progress-container {
  463. display: flex;
  464. align-items: center;
  465. gap: 16rpx;
  466. flex: 1;
  467. }
  468. .progress-text {
  469. color: rgba(153, 153, 153, 1);
  470. font-family: DM Sans;
  471. font-size: 20rpx;
  472. font-weight: 400;
  473. line-height: 26rpx;
  474. min-width: 60rpx;
  475. text-align: right;
  476. }
  477. </style>