jobPosting.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="publish-job">
  3. <!-- 导航栏 -->
  4. <nav-bar title="发布职位" color="#000"></nav-bar>
  5. <view class="content">
  6. <!-- 顶部提示 -->
  7. <view class="top-tip">
  8. <text class="tip-title">发布社招</text>
  9. <text class="tip-desc">“深圳市汉睿国际猎头服务有限公司”的人员规模</text>
  10. <text class="tip-step">填写基本信息 · Confirm</text>
  11. </view>
  12. <!-- 招聘类型 -->
  13. <view class="section">
  14. <view class="section-title">招聘类型</view>
  15. <view class="recruit-type">
  16. <view
  17. class="type-item"
  18. :class="{ active: recruitType === 'social' }"
  19. @click="recruitType = 'social'"
  20. >
  21. <text>社招全职</text>
  22. </view>
  23. <view
  24. class="type-item"
  25. :class="{ active: recruitType === 'campus' }"
  26. @click="recruitType = 'campus'"
  27. >
  28. <text>应届生校园招聘</text>
  29. </view>
  30. <view
  31. class="type-item"
  32. :class="{ active: recruitType === 'intern' }"
  33. @click="recruitType = 'intern'"
  34. >
  35. <text>实习生招聘</text>
  36. </view>
  37. <view
  38. class="type-item"
  39. :class="{ active: recruitType === 'parttime' }"
  40. @click="recruitType = 'parttime'"
  41. >
  42. <text>兼职招聘</text>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 招聘职位 -->
  47. <view class="section">
  48. <view class="section-title">招聘职位</view>
  49. <view class="job-select" @click="showJobPicker = true">
  50. <text class="placeholder" v-if="!selectedJob">请选择要招聘的职位</text>
  51. <text class="selected-job" v-else>{{ selectedJob }}</text>
  52. <u-icon name="arrow-right" color="#999" size="14"></u-icon>
  53. </view>
  54. <u-picker
  55. :show="showJobPicker"
  56. :columns="jobColumns"
  57. keyName="label"
  58. @confirm="confirmJob"
  59. @cancel="showJobPicker = false"
  60. ></u-picker>
  61. </view>
  62. <!-- 岗位描述 -->
  63. <view class="section">
  64. <view class="section-title">岗位描述</view>
  65. <view class="job-desc">
  66. <u-textarea
  67. v-model="jobDescription"
  68. placeholder="介绍工作内容、职位要求"
  69. height="200"
  70. maxlength="1000"
  71. ></u-textarea>
  72. </view>
  73. <view class="desc-tip">介绍工作内容、职位要求</view>
  74. </view>
  75. <!-- 注意事项 -->
  76. <view class="notice">
  77. <text class="notice-text">注:职位名称、职位类型等发布后不可修改</text>
  78. </view>
  79. </view>
  80. <!-- 底部按钮 -->
  81. <view class="footer">
  82. <u-button
  83. type="primary"
  84. text="下一步"
  85. @click="nextStep"
  86. :customStyle="{
  87. height: '88rpx',
  88. borderRadius: '44rpx',
  89. fontSize: '32rpx',
  90. margin: '0 32rpx'
  91. }"
  92. ></u-button>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. import navBar from "@/components/nav-bar/index.vue";
  98. export default {
  99. components: {
  100. navBar
  101. },
  102. data() {
  103. return {
  104. recruitType: 'social', // 默认社招全职
  105. showJobPicker: false,
  106. selectedJob: '',
  107. jobDescription: '',
  108. jobColumns: [
  109. [
  110. { label: '前端开发工程师', value: 'frontend' },
  111. { label: '后端开发工程师', value: 'backend' },
  112. { label: 'UI设计师', value: 'ui' },
  113. { label: '产品经理', value: 'pm' },
  114. { label: '测试工程师', value: 'test' },
  115. { label: '运维工程师', value: 'devops' }
  116. ]
  117. ]
  118. };
  119. },
  120. methods: {
  121. confirmJob(e) {
  122. this.selectedJob = e.value[0].label;
  123. this.showJobPicker = false;
  124. },
  125. nextStep() {
  126. if (!this.selectedJob) {
  127. uni.showToast({
  128. title: '请选择招聘职位',
  129. icon: 'none'
  130. });
  131. return;
  132. }
  133. if (!this.jobDescription) {
  134. uni.showToast({
  135. title: '请输入岗位描述',
  136. icon: 'none'
  137. });
  138. return;
  139. }
  140. // 跳转到下一步
  141. uni.navigateTo({
  142. url: '/pages/job/publish-next'
  143. });
  144. }
  145. }
  146. };
  147. </script>
  148. <style lang="scss" scoped>
  149. .publish-job {
  150. background-color: #f5f5f5;
  151. min-height: 100vh;
  152. display: flex;
  153. flex-direction: column;
  154. }
  155. .content {
  156. flex: 1;
  157. padding: 32rpx;
  158. }
  159. .top-tip {
  160. background: #fff;
  161. border-radius: 16rpx;
  162. padding: 32rpx;
  163. margin-bottom: 32rpx;
  164. display: flex;
  165. flex-direction: column;
  166. }
  167. .tip-title {
  168. font-size: 36rpx;
  169. font-weight: 600;
  170. color: #333;
  171. margin-bottom: 16rpx;
  172. }
  173. .tip-desc {
  174. font-size: 28rpx;
  175. color: #666;
  176. margin-bottom: 8rpx;
  177. }
  178. .tip-step {
  179. font-size: 24rpx;
  180. color: #999;
  181. }
  182. .section {
  183. background: #fff;
  184. border-radius: 16rpx;
  185. padding: 32rpx;
  186. margin-bottom: 32rpx;
  187. }
  188. .section-title {
  189. font-size: 32rpx;
  190. font-weight: 500;
  191. color: #333;
  192. margin-bottom: 24rpx;
  193. }
  194. .recruit-type {
  195. display: grid;
  196. grid-template-columns: 1fr 1fr;
  197. gap: 24rpx;
  198. }
  199. .type-item {
  200. height: 80rpx;
  201. border: 2rpx solid #e0e0e0;
  202. border-radius: 12rpx;
  203. display: flex;
  204. align-items: center;
  205. justify-content: center;
  206. font-size: 28rpx;
  207. color: #666;
  208. &.active {
  209. border-color: #2979ff;
  210. background: #f0f7ff;
  211. color: #2979ff;
  212. }
  213. }
  214. .job-select {
  215. height: 80rpx;
  216. border: 2rpx solid #e0e0e0;
  217. border-radius: 12rpx;
  218. padding: 0 24rpx;
  219. display: flex;
  220. align-items: center;
  221. justify-content: space-between;
  222. }
  223. .placeholder {
  224. color: #999;
  225. font-size: 28rpx;
  226. }
  227. .selected-job {
  228. color: #333;
  229. font-size: 28rpx;
  230. }
  231. .job-desc {
  232. margin-bottom: 16rpx;
  233. }
  234. .desc-tip {
  235. font-size: 24rpx;
  236. color: #999;
  237. }
  238. .notice {
  239. padding: 0 32rpx;
  240. }
  241. .notice-text {
  242. font-size: 24rpx;
  243. color: #ff6b35;
  244. }
  245. .footer {
  246. padding: 32rpx 0;
  247. background: #fff;
  248. border-top: 1rpx solid #f0f0f0;
  249. }
  250. </style>