index.vue 11 KB

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