filter.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <template>
  2. <view class="filter-page">
  3. <!-- 导航栏 -->
  4. <view class="filter-header">
  5. <view class="header-content">
  6. <view class="header-left" @click="goBack">
  7. <u-icon name="arrow-left" color="rgba(51, 51, 51, 1)" size="32"></u-icon>
  8. </view>
  9. <view class="header-title">筛选</view>
  10. <view class="header-right"></view>
  11. </view>
  12. </view>
  13. <!-- 筛选内容 -->
  14. <view class="filter-content">
  15. <!-- 学历要求 -->
  16. <view class="filter-section">
  17. <view class="section-title">学历要求 (不限)</view>
  18. <view class="range-slider">
  19. <view class="range-labels">
  20. <text class="range-label">初中及以下</text>
  21. <text class="range-label">博士</text>
  22. </view>
  23. <view class="slider-container">
  24. <view class="slider-track">
  25. <view class="slider-fill"></view>
  26. <view class="slider-thumb slider-thumb-left"></view>
  27. <view class="slider-thumb slider-thumb-right"></view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 工作经验 -->
  33. <view class="filter-section">
  34. <view class="section-title">工作经验 (不限)</view>
  35. <view class="range-slider">
  36. <view class="range-labels">
  37. <text class="range-label">在校/应届生</text>
  38. <text class="range-label">10年+</text>
  39. </view>
  40. <view class="slider-container">
  41. <view class="slider-track">
  42. <view class="slider-fill"></view>
  43. <view class="slider-thumb slider-thumb-left"></view>
  44. <view class="slider-thumb slider-thumb-right"></view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- 期望薪资 -->
  50. <view class="filter-section">
  51. <view class="section-title">期望薪资 (15K-150K)</view>
  52. <view class="range-slider">
  53. <view class="range-labels">
  54. <text class="range-label">15K</text>
  55. <text class="range-label">150K</text>
  56. </view>
  57. <view class="slider-container">
  58. <view class="slider-track">
  59. <view class="slider-fill"></view>
  60. <view class="slider-thumb slider-thumb-left"></view>
  61. <view class="slider-thumb slider-thumb-right"></view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <!-- 求职状态 -->
  67. <view class="filter-section">
  68. <view class="section-title">求职状态 (不限)</view>
  69. <view class="status-buttons">
  70. <view class="status-button active">不限</view>
  71. <view class="status-button">离职&随时到岗</view>
  72. <view class="status-button">在职&暂不考虑</view>
  73. <view class="status-button">在职&考虑机会</view>
  74. <view class="status-button">在职&月内到岗</view>
  75. </view>
  76. </view>
  77. <!-- 年龄要求 -->
  78. <view class="filter-section">
  79. <view class="section-title">年龄要求 (不限)</view>
  80. <view class="range-slider">
  81. <view class="range-labels">
  82. <text class="range-label">16岁</text>
  83. <text class="range-label">46岁+</text>
  84. </view>
  85. <view class="slider-container">
  86. <view class="slider-track">
  87. <view class="slider-fill"></view>
  88. <view class="slider-thumb slider-thumb-left"></view>
  89. <view class="slider-thumb slider-thumb-right"></view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <!-- 免责声明 -->
  96. <view class="disclaimer">
  97. <text class="disclaimer-text">筛选功能仅供您分析招聘数据,请勿有招聘歧视行为,如因名族、种族、性别等行为不合理差别对待候选人</text>
  98. </view>
  99. <!-- 底部按钮 -->
  100. <view class="bottom-buttons">
  101. <view class="clear-button" @click="clearFilters">清除</view>
  102. <view class="confirm-button" @click="confirmFilters">确定</view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. export default {
  108. data() {
  109. return {
  110. // 筛选数据
  111. educationRange: [0, 100],
  112. experienceRange: [0, 100],
  113. salaryRange: [15, 150],
  114. ageRange: [16, 46],
  115. jobStatus: '不限'
  116. }
  117. },
  118. methods: {
  119. // 返回上一页
  120. goBack() {
  121. uni.navigateBack()
  122. },
  123. // 清除筛选
  124. clearFilters() {
  125. this.educationRange = [0, 100]
  126. this.experienceRange = [0, 100]
  127. this.salaryRange = [15, 150]
  128. this.ageRange = [16, 46]
  129. this.jobStatus = '不限'
  130. uni.showToast({
  131. title: '已清除筛选条件',
  132. icon: 'success'
  133. })
  134. },
  135. // 确认筛选
  136. confirmFilters() {
  137. console.log('筛选条件:', {
  138. education: this.educationRange,
  139. experience: this.experienceRange,
  140. salary: this.salaryRange,
  141. age: this.ageRange,
  142. jobStatus: this.jobStatus
  143. })
  144. uni.showToast({
  145. title: '筛选条件已应用',
  146. icon: 'success'
  147. })
  148. setTimeout(() => {
  149. uni.navigateBack()
  150. }, 1500)
  151. }
  152. }
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .filter-page {
  157. min-height: 100vh;
  158. // background-color: #f5f5f5;
  159. }
  160. // 导航栏
  161. .filter-header {
  162. // background-color: #333333;
  163. padding-top: 80rpx;
  164. .header-content {
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. padding: 20rpx 30rpx;
  169. .header-left {
  170. width: 60rpx;
  171. }
  172. .header-title {
  173. color: rgba(51, 51, 51, 1);
  174. font-size: 36rpx;
  175. font-weight: 600;
  176. text-align: center;
  177. }
  178. .header-right {
  179. width: 60rpx;
  180. }
  181. }
  182. }
  183. // 筛选内容
  184. .filter-content {
  185. padding: 40rpx 30rpx;
  186. background-color: #ffffff;
  187. margin-bottom: 20rpx;
  188. }
  189. .filter-section {
  190. margin-bottom: 60rpx;
  191. &:last-child {
  192. margin-bottom: 0;
  193. }
  194. }
  195. .section-title {
  196. color: #333333;
  197. font-size: 32rpx;
  198. font-weight: 600;
  199. margin-bottom: 30rpx;
  200. }
  201. // 范围滑块
  202. .range-slider {
  203. .range-labels {
  204. display: flex;
  205. justify-content: space-between;
  206. margin-bottom: 20rpx;
  207. .range-label {
  208. color: #666666;
  209. font-size: 24rpx;
  210. }
  211. }
  212. .slider-container {
  213. padding: 20rpx 0;
  214. }
  215. .slider-track {
  216. position: relative;
  217. height: 8rpx;
  218. background-color: #e5e5e5;
  219. border-radius: 4rpx;
  220. .slider-fill {
  221. position: absolute;
  222. top: 0;
  223. left: 0;
  224. right: 0;
  225. height: 100%;
  226. background-color: #007AFF;
  227. border-radius: 4rpx;
  228. }
  229. .slider-thumb {
  230. position: absolute;
  231. top: 50%;
  232. transform: translateY(-50%);
  233. width: 32rpx;
  234. height: 32rpx;
  235. background-color: #ffffff;
  236. border: 4rpx solid #007AFF;
  237. border-radius: 50%;
  238. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
  239. &.slider-thumb-left {
  240. left: 0;
  241. }
  242. &.slider-thumb-right {
  243. right: 0;
  244. }
  245. }
  246. }
  247. }
  248. // 状态按钮
  249. .status-buttons {
  250. display: flex;
  251. flex-wrap: wrap;
  252. justify-content: space-between;
  253. .status-button {
  254. width: 48%;
  255. padding: 16rpx 32rpx;
  256. background-color: rgba(245, 248, 254, 1);
  257. border-radius: 16rpx;
  258. color: rgba(153, 153, 153, 1);
  259. font-family: DM Sans;
  260. font-size: 28rpx;
  261. font-weight: 400;
  262. line-height: 44rpx;
  263. letter-spacing: 0px;
  264. text-align: center;
  265. box-sizing: border-box;
  266. margin-bottom: 20rpx;
  267. &.active {
  268. background-color: rgba(1, 107, 246, 1);
  269. color: #ffffff;
  270. }
  271. }
  272. }
  273. // 免责声明
  274. .disclaimer {
  275. padding: 30rpx;
  276. .disclaimer-text {
  277. color: #999999;
  278. font-size: 24rpx;
  279. line-height: 1.5;
  280. text-align: center;
  281. }
  282. }
  283. // 底部按钮
  284. .bottom-buttons {
  285. position: fixed;
  286. bottom: 0;
  287. left: 0;
  288. right: 0;
  289. display: flex;
  290. background-color: #ffffff;
  291. border-top: 1rpx solid #e5e5e5;
  292. padding: 20rpx 30rpx;
  293. gap: 20rpx;
  294. .clear-button {
  295. flex: 1;
  296. padding: 24rpx;
  297. background-color: #f5f5f5;
  298. color: #666666;
  299. font-size: 32rpx;
  300. font-weight: 500;
  301. text-align: center;
  302. border-radius: 50rpx;
  303. }
  304. .confirm-button {
  305. flex: 1;
  306. padding: 24rpx;
  307. background: linear-gradient(90deg, #007AFF, #00BFFF);
  308. color: #ffffff;
  309. font-size: 32rpx;
  310. font-weight: 500;
  311. text-align: center;
  312. border-radius: 50rpx;
  313. }
  314. }
  315. </style>