index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  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="/static/images/eye.svg" 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. goBack() {
  149. uni.navigateBack()
  150. },
  151. goToDataCenter() {
  152. uni.navigateTo({
  153. url: '/pages/recruitmentData/dataCenter'
  154. })
  155. },
  156. toggleWeekData() {
  157. // 切换周数据视图
  158. console.log('切换周数据')
  159. },
  160. showDetail(item) {
  161. // 显示详情
  162. console.log('显示详情:', item)
  163. }
  164. }
  165. }
  166. </script>
  167. <style lang="scss" scoped>
  168. .page {
  169. display: flex;
  170. flex-direction: column;
  171. height: 100vh;
  172. }
  173. .detail-bg {
  174. height: 327px;
  175. width: 100%;
  176. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  177. position: absolute;
  178. }
  179. .content {
  180. flex: 1;
  181. overflow: auto;
  182. display: flex;
  183. flex-direction: column;
  184. z-index: 0;
  185. }
  186. /* 自定义导航栏 */
  187. .custom-navbar {
  188. position: fixed;
  189. top: 80rpx;
  190. left: 0;
  191. right: 0;
  192. z-index: 1000;
  193. }
  194. .navbar-content {
  195. display: flex;
  196. align-items: center;
  197. justify-content: space-between;
  198. height: 44px;
  199. padding: 0 20rpx;
  200. }
  201. .navbar-left {
  202. width: 44px;
  203. height: 44px;
  204. display: flex;
  205. align-items: center;
  206. justify-content: center;
  207. }
  208. .navbar-title {
  209. color: rgba(255, 255, 255, 1);
  210. font-family: DM Sans;
  211. font-size: 30rpx;
  212. font-weight: 700;
  213. line-height: 52rpx;
  214. letter-spacing: 0.5%;
  215. text-align: center;
  216. }
  217. .navbar-right {
  218. width: 44px;
  219. }
  220. /* 头部区域 */
  221. .header-section {
  222. padding: 40rpx 32rpx 0rpx 32rpx;
  223. }
  224. .header-content {
  225. display: flex;
  226. align-items: center;
  227. justify-content: space-between;
  228. }
  229. .main-title {
  230. color: rgba(255, 255, 255, 1);
  231. font-family: DM Sans;
  232. font-size: 48rpx;
  233. font-weight: 700;
  234. line-height: 60rpx;
  235. letter-spacing: 0px;
  236. text-align: left;
  237. }
  238. .week-data-btn {
  239. background: rgba(255, 255, 255, 1);
  240. border-radius: 20px;
  241. padding: 12rpx 28rpx;
  242. display: flex;
  243. align-items: center;
  244. gap: 8rpx;
  245. }
  246. .week-icon {
  247. width: 32rpx;
  248. height: 32rpx;
  249. }
  250. .btn-text {
  251. color: rgba(1, 107, 246, 1);
  252. font-family: DM Sans;
  253. font-size: 24rpx;
  254. font-weight: 400;
  255. line-height: 32rpx;
  256. letter-spacing: 0%;
  257. text-align: left;
  258. }
  259. .calendar-icon {
  260. color: white;
  261. font-size: 12px;
  262. }
  263. /* 内容区域 */
  264. .content-section {
  265. padding: 32rpx;
  266. }
  267. /* 今日数据卡片 */
  268. .today-data-card {
  269. padding: 32rpx 20rpx;
  270. box-sizing: border-box;
  271. border: 0.5px solid rgba(227, 231, 236, 1);
  272. border-radius: 6px;
  273. background: rgba(255, 255, 255, 1);
  274. margin-bottom: 20rpx;
  275. }
  276. .card-header {
  277. display: flex;
  278. align-items: center;
  279. justify-content: space-between;
  280. margin-bottom: 16px;
  281. }
  282. .card-title {
  283. color: rgba(23, 23, 37, 1);
  284. font-family: DM Sans;
  285. font-size: 28rpx;
  286. font-weight: 400;
  287. line-height: 44rpx;
  288. letter-spacing: 0.5%;
  289. text-align: left;
  290. }
  291. .switch-icon {
  292. width: 18rpx;
  293. height: 18rpx;
  294. margin-left: 12rpx;
  295. }
  296. .filter-btn {
  297. padding: 8rpx;
  298. box-sizing: border-box;
  299. border: 0.5px solid rgba(1, 107, 246, 1);
  300. border-radius: 8rpx;
  301. background: rgba(252, 233, 220, 1);
  302. display: flex;
  303. align-items: center;
  304. justify-content: center;
  305. gap: 8rpx;
  306. }
  307. .filter-text {
  308. color: rgba(1, 107, 246, 1);
  309. font-family: DM Sans;
  310. font-size: 16rpx;
  311. font-weight: 400;
  312. line-height: 20rpx;
  313. }
  314. /* 数据网格 */
  315. .data-grid {
  316. display: grid;
  317. grid-template-columns: 1fr 1fr;
  318. gap: 12px;
  319. }
  320. .data-item {
  321. padding: 24rpx;
  322. box-sizing: border-box;
  323. border: 0.5px solid rgba(227, 231, 236, 1);
  324. border-radius: 6px;
  325. background: rgba(255, 255, 255, 1);
  326. }
  327. .data-title {
  328. color: rgba(102, 102, 102, 1);
  329. font-family: DM Sans;
  330. font-size: 24rpx;
  331. font-weight: 400;
  332. line-height: 32rpx;
  333. letter-spacing: 0%;
  334. text-align: left;
  335. }
  336. .data-number {
  337. color: rgba(51, 51, 51, 1);
  338. font-family: DM Sans;
  339. font-size: 40rpx;
  340. font-weight: 400;
  341. line-height: 52rpx;
  342. letter-spacing: 0%;
  343. text-align: left;
  344. }
  345. .data-compare-text {
  346. gap: 8rpx;
  347. display: flex;
  348. align-items: center;
  349. justify-content: space-between;
  350. }
  351. .data-compare {
  352. display: flex;
  353. align-items: center;
  354. justify-content: space-between;
  355. }
  356. .compare-text {
  357. color: rgba(153, 153, 153, 1);
  358. font-family: DM Sans;
  359. font-size: 20rpx;
  360. font-weight: 400;
  361. line-height: 26rpx;
  362. letter-spacing: 0%;
  363. text-align: left;
  364. }
  365. .compare-change {
  366. color: var(--016BF6, rgba(1, 107, 246, 1));
  367. font-family: DM Sans;
  368. font-size: 20rpx;
  369. font-weight: 400;
  370. line-height: 26rpx;
  371. letter-spacing: 0%;
  372. text-align: left;
  373. }
  374. /* 权益使用量卡片 */
  375. .benefits-card {
  376. padding: 32rpx 20rpx;
  377. box-sizing: border-box;
  378. border: 0.5px solid rgba(227, 231, 236, 1);
  379. border-radius: 6px;
  380. background: rgba(255, 255, 255, 1);
  381. }
  382. .benefits-list {
  383. margin-top: 32rpx;
  384. }
  385. .benefit-item {
  386. background: rgba(255, 255, 255, 1);
  387. border: 0.5px solid rgba(227, 231, 236, 1);
  388. border-radius: 6px;
  389. padding: 24rpx;
  390. margin-bottom: 16rpx;
  391. }
  392. .benefit-item:last-child {
  393. margin-bottom: 0;
  394. }
  395. .benefit-header {
  396. display: flex;
  397. align-items: center;
  398. gap: 16rpx;
  399. margin-bottom: 16rpx;
  400. }
  401. .benefit-icon-container {
  402. display: flex;
  403. align-items: center;
  404. gap: 16rpx;
  405. }
  406. .benefit-action {
  407. color: rgba(102, 102, 102, 1);
  408. font-family: DM Sans;
  409. font-size: 24rpx;
  410. font-weight: 400;
  411. line-height: 32rpx;
  412. letter-spacing: 0%;
  413. text-align: left;
  414. }
  415. .benefit-icon {
  416. width: 32rpx;
  417. height: 32rpx;
  418. }
  419. .benefit-content {
  420. display: flex;
  421. align-items: center;
  422. justify-content: space-between;
  423. gap: 16rpx;
  424. }
  425. .benefit-type-container {
  426. display: flex;
  427. align-items: center;
  428. gap: 8rpx;
  429. }
  430. .benefit-type {
  431. color: rgba(153, 153, 153, 1);
  432. font-family: DM Sans;
  433. font-size: 20rpx;
  434. font-weight: 400;
  435. line-height: 26rpx;
  436. letter-spacing: 0%;
  437. text-align: left;
  438. }
  439. .urgent-tag {
  440. background: rgba(236, 225, 253, 1);
  441. padding: 8rpx;
  442. border: 1px solid rgba(106, 84, 214, 1);
  443. border-radius: 8rpx;
  444. color: rgba(106, 84, 214, 1);
  445. font-family: DM Sans;
  446. font-size: 16rpx;
  447. font-weight: 400;
  448. line-height: 20rpx;
  449. letter-spacing: 0%;
  450. text-align: left;
  451. }
  452. .progress-container {
  453. display: flex;
  454. align-items: center;
  455. gap: 16rpx;
  456. flex: 1;
  457. }
  458. .progress-text {
  459. color: rgba(153, 153, 153, 1);
  460. font-family: DM Sans;
  461. font-size: 20rpx;
  462. font-weight: 400;
  463. line-height: 26rpx;
  464. min-width: 60rpx;
  465. text-align: right;
  466. }
  467. </style>