dataCenter.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <template>
  2. <view class="page">
  3. <!-- Custom Navbar -->
  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. <nav-bar title="招聘数据中心"></nav-bar>
  14. <!-- Filter Section -->
  15. <view class="filter-section">
  16. <view class="filter-buttons">
  17. <!-- <view class="filter-btn" @click="selectDateRange">
  18. <text class="filter-text">2025.07.30-08.06</text>
  19. <u-icon name="arrow-down" color="#016BF6" size="16"></u-icon>
  20. </view> -->
  21. <!-- <view class="filter-btn" @click="selectPosition">
  22. <text class="filter-text">亚马逊运营总监</text>
  23. <u-icon name="arrow-down" color="#016BF6" size="16"></u-icon>
  24. </view> -->
  25. <picker @change="changeDate" :value="weekIndex" :range="weekList" :range-key="'name'">
  26. <view class="filter-btn" >
  27. <text class="filter-text">{{weekList.length?weekList[weekIndex].name:'/'}}</text>
  28. <u-icon name="arrow-down" color="#016BF6" size="16"></u-icon>
  29. </view>
  30. </picker>
  31. <picker @change="changeZw" :value="zwIndex" :range="zwList" :range-key="'name'">
  32. <view class="filter-btn">
  33. <text class="filter-text">{{zwList.length?zwList[zwIndex].name:'/'}}</text>
  34. <u-icon name="arrow-down" color="#016BF6" size="16"></u-icon>
  35. </view>
  36. </picker>
  37. </view>
  38. </view>
  39. <!-- Content Section -->
  40. <view class="content-section">
  41. <!-- Recruitment Progress Card -->
  42. <view class="card-header">
  43. <text class="hearder-title">招聘进展</text>
  44. </view>
  45. <!-- New Card -->
  46. <view class="data-card">
  47. <view class="card-header">
  48. <view class="card-title">
  49. <view class="card-icon-wrapper">
  50. <image src="/static/images/eye.svg" class="card-icon" mode="aspectFit"></image>
  51. </view>
  52. <text>查看</text>
  53. </view>
  54. </view>
  55. <view class="card-content">
  56. <view class="data-row">
  57. <view class="data-item">
  58. <text class="data-label">我看过</text>
  59. <view class="data-value-wrapper">
  60. <text class="data-value">{{dataStatics.iSaw}}</text>
  61. <text class="data-unit">人</text>
  62. </view>
  63. </view>
  64. <view class="data-item">
  65. <text class="data-label">看过我</text>
  66. <view class="data-value-wrapper">
  67. <text class="data-value">{{dataStatics.sawMe}}</text>
  68. <text class="data-unit">人</text>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="data-card">
  75. <view class="card-header">
  76. <view class="card-title">
  77. <view class="card-icon-wrapper">
  78. <image src="/static/images/goutong.svg" class="card-icon" mode="aspectFit"></image>
  79. </view>
  80. <text>沟通</text>
  81. </view>
  82. </view>
  83. <view class="card-content">
  84. <view class="data-row">
  85. <view class="data-item">
  86. <text class="data-label">我沟通</text>
  87. <view class="data-value-wrapper">
  88. <text class="data-value">{{ dataStatics.iCommunicated }}</text>
  89. <text class="data-unit">人</text>
  90. </view>
  91. </view>
  92. <view class="data-item">
  93. <text class="data-label">求职者</text>
  94. <view class="data-value-wrapper">
  95. <text class="data-value">{{ dataStatics.candidateCommunicated }}</text>
  96. <text class="data-unit">人</text>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="data-card">
  103. <view class="card-header">
  104. <view class="card-title">
  105. <view class="card-icon-wrapper">
  106. <image src="/static/images/lianxi.svg" class="card-icon" mode="aspectFit"></image>
  107. </view>
  108. <text>获取简历联系方式</text>
  109. </view>
  110. </view>
  111. <view class="card-content">
  112. <view class="data-row">
  113. <view class="data-item">
  114. <text class="data-label">合计</text>
  115. <view class="data-value-wrapper">
  116. <text class="data-value">{{dataStatics.receivedResumes+dataStatics.exchangedContact}}</text>
  117. <text class="data-unit">人</text>
  118. </view>
  119. </view>
  120. <view class="data-item">
  121. <text class="data-label">获取简历</text>
  122. <view class="data-value-wrapper">
  123. <text class="data-value">{{dataStatics.receivedResumes}}</text>
  124. <text class="data-unit">人</text>
  125. </view>
  126. </view>
  127. <view class="data-item">
  128. <text class="data-label">交换电话/微信</text>
  129. <view class="data-value-wrapper">
  130. <text class="data-value">{{dataStatics.exchangedContact}}</text>
  131. <text class="data-unit">人</text>
  132. </view>
  133. </view>
  134. <!-- <view class="data-item">
  135. <text class="data-label">交换微信</text>
  136. <view class="data-value-wrapper">
  137. <text class="data-value">2120</text>
  138. <text class="data-unit">人</text>
  139. </view>
  140. </view> -->
  141. </view>
  142. </view>
  143. </view>
  144. <view class="data-card">
  145. <view class="card-header">
  146. <view class="card-title">
  147. <view class="card-icon-wrapper">
  148. <image src="/static/images/huoqu.svg" class="card-icon" mode="aspectFit"></image>
  149. </view>
  150. <text>获取简历联系方式</text>
  151. </view>
  152. </view>
  153. <view class="card-content">
  154. <view class="data-row">
  155. <view class="data-item">
  156. <text class="data-label">邀约面试</text>
  157. <view class="data-value-wrapper">
  158. <text class="data-value">{{dataStatics.acceptedInterview}}</text>
  159. <text class="data-unit">人</text>
  160. </view>
  161. </view>
  162. <view class="data-item">
  163. <text class="data-label">接受面试</text>
  164. <view class="data-value-wrapper">
  165. <text class="data-value">{{dataStatics.acceptedInterview}}</text>
  166. <text class="data-unit">人</text>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </template>
  175. <script>
  176. import navBar from "@/components/nav-bar/index.vue";
  177. import { getPrevious8Weeks } from './dateFormate'
  178. export default {
  179. components: {
  180. navBar
  181. },
  182. data() {
  183. return {
  184. statusBarHeight: 0,
  185. zwList:[],
  186. zwIndex:0,
  187. weekList:[],
  188. weekIndex:0,
  189. dataStatics:{}
  190. }
  191. },
  192. onLoad() {
  193. const systemInfo = uni.getSystemInfoSync()
  194. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  195. this.getZwList()
  196. this.weekList=[]
  197. getPrevious8Weeks(new Date()).forEach(it=>{
  198. // this.weekList.push([
  199. // it[0],it[1],it.join('~')
  200. // ]),
  201. this.weekList.push({
  202. start:it[0],
  203. end:it[1],
  204. name:it.join('~')
  205. })
  206. })
  207. },
  208. methods: {
  209. changeDate(e){
  210. this.weekIndex=e.detail.value;
  211. this.getDataStatics()
  212. },
  213. getZwList(){
  214. this.$Request.getT("/app/postPush/getMyPostPush").then(res=>{
  215. res.data.records.forEach(item=>{
  216. this.zwList.push({
  217. name:item.ruleClassifyName,
  218. id:item.postPushId
  219. })
  220. })
  221. this.getDataStatics()
  222. })
  223. },
  224. changeZw(e){
  225. this.zwIndex=e.detail.value;
  226. this.getDataStatics()
  227. },
  228. getDataStatics(){
  229. let data = {
  230. postPushId:this.zwList[this.zwIndex].id,
  231. todayStart:this.formatDateRange(new Date(),new Date())[0],
  232. todayEnd:this.formatDateRange(new Date(),new Date())[1],
  233. }
  234. this.$Request.getT("/app/user/userYesterdayData",data).then(res=>{
  235. this.dataStatics=res.data;
  236. })
  237. },
  238. formatDateRange(startDate, endDate) {
  239. // 格式化日期为 YYYY-MM-DD 格式
  240. const formatDate = (date) => {
  241. const year = date.getFullYear();
  242. const month = String(date.getMonth() + 1).padStart(2, '0');
  243. const day = String(date.getDate()).padStart(2, '0');
  244. return `${year}-${month}-${day}`;
  245. };
  246. // 创建开始日期的 00:00:00
  247. const startDateTime = `${formatDate(startDate)} 00:00:00`;
  248. // 创建结束日期的 23:59:59
  249. const endDateTime = `${formatDate(endDate)} 23:59:59`;
  250. return [startDateTime, endDateTime];
  251. },
  252. goBack() {
  253. uni.navigateBack()
  254. },
  255. goToCommunicationRecords() {
  256. uni.navigateTo({
  257. url: '/pages/recruitmentData/communicationRecords'
  258. })
  259. },
  260. selectDateRange() {
  261. console.log('选择日期范围')
  262. },
  263. selectPosition() {
  264. console.log('选择职位')
  265. }
  266. }
  267. }
  268. </script>
  269. <style lang="scss" scoped>
  270. .page {
  271. background: linear-gradient(180.00deg, rgba(255, 102, 0, 1),rgba(255, 102, 0, 0) 100%);
  272. background-size: 100% 35%;
  273. background-position: center top;
  274. background-repeat: no-repeat;
  275. min-height: 100vh;
  276. }
  277. /* Custom Navbar */
  278. .custom-navbar {
  279. position: fixed;
  280. top: 80rpx;
  281. left: 0;
  282. right: 0;
  283. z-index: 1000;
  284. }
  285. .navbar-content {
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. height: 44px;
  290. }
  291. .navbar-left {
  292. width: 44px;
  293. height: 44px;
  294. display: flex;
  295. align-items: center;
  296. justify-content: center;
  297. }
  298. .navbar-title {
  299. color: rgba(255, 255, 255, 1);
  300. font-family: DM Sans;
  301. font-size: 30rpx;
  302. font-weight: 700;
  303. line-height: 52rpx;
  304. letter-spacing: 0.5%;
  305. text-align: center;
  306. }
  307. .navbar-right {
  308. width: 44px;
  309. }
  310. /* Filter Section */
  311. .filter-section {
  312. padding: 0rpx 32rpx 32rpx 32rpx;
  313. }
  314. .filter-buttons {
  315. display: flex;
  316. gap: 20rpx;
  317. }
  318. .filter-btn {
  319. flex: 1;
  320. padding: 16rpx 20rpx;
  321. background: rgba(255, 255, 255, 1);
  322. border-radius: 12rpx;
  323. display: flex;
  324. align-items: center;
  325. justify-content: center;
  326. gap: 12rpx;
  327. }
  328. .filter-text {
  329. color: rgba(1, 107, 246, 1);
  330. font-family: DM Sans;
  331. font-size: 24rpx;
  332. font-weight: 400;
  333. line-height: 32rpx;
  334. letter-spacing: -0.5px;
  335. text-align: center;
  336. }
  337. /* Content Section */
  338. .content-section {
  339. margin: 0 32rpx 32rpx 32rpx;
  340. box-sizing: border-box;
  341. background: rgba(255, 255, 255, 1);
  342. border-radius: 12rpx;
  343. border: 0.5px solid rgba(227, 231, 236, 1);
  344. padding: 32rpx 20rpx;
  345. }
  346. .data-card {
  347. background: rgba(255, 255, 255, 1);
  348. border-radius: 12rpx;
  349. padding: 24rpx;
  350. border: 0.5px solid rgba(227, 231, 236, 1);
  351. margin-top: 24rpx;
  352. }
  353. .hearder-title {
  354. color: rgba(23, 23, 37, 1);
  355. font-family: DM Sans;
  356. font-size: 28rpx;
  357. font-weight: 400;
  358. line-height: 44rpx;
  359. letter-spacing: 0.5%;
  360. text-align: left;
  361. }
  362. .card-title {
  363. display: flex;
  364. align-items: center;
  365. gap: 12rpx;
  366. }
  367. .card-icon-wrapper {
  368. width: 32rpx;
  369. height: 32rpx;
  370. display: flex;
  371. align-items: center;
  372. justify-content: center;
  373. }
  374. .card-icon {
  375. width: 32rpx;
  376. height: 32rpx;
  377. }
  378. .card-title text {
  379. color: rgba(102, 102, 102, 1);
  380. font-family: DM Sans;
  381. font-size: 24rpx;
  382. font-weight: 400;
  383. line-height: 32rpx;
  384. letter-spacing: 0%;
  385. text-align: left;
  386. }
  387. .card-content {
  388. margin-top: 12rpx;
  389. }
  390. .data-row {
  391. display: flex;
  392. gap: 24rpx;
  393. }
  394. .data-item {
  395. // flex: 1;
  396. // display: flex;
  397. // flex-direction: column;
  398. // align-items: flex-start;
  399. }
  400. .data-label {
  401. color: rgba(102, 102, 102, 1);
  402. font-family: DM Sans;
  403. font-size: 24rpx;
  404. font-weight: 400;
  405. line-height: 32rpx;
  406. letter-spacing: 0%;
  407. text-align: left;
  408. margin-bottom: 12rpx;
  409. }
  410. .data-value-wrapper {
  411. display: flex;
  412. align-items: baseline;
  413. gap: 4rpx;
  414. }
  415. .data-value {
  416. color: rgba(51, 51, 51, 1);
  417. font-family: DM Sans;
  418. font-size: 40rpx;
  419. font-weight: 400;
  420. line-height: 52rpx;
  421. letter-spacing: 0%;
  422. text-align: left;
  423. }
  424. .data-unit {
  425. color: rgba(153, 153, 153, 1);
  426. font-family: DM Sans;
  427. font-size: 24rpx;
  428. font-weight: 400;
  429. line-height: 32rpx;
  430. }
  431. </style>