resumesPost.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="flex align-center justify-between" @click="getPost">
  5. <view class=" text-bold">岗位 </view>
  6. <view class="text-right flex align-center padding-tb-sm">
  7. <view class="">{{resumesPost?resumesPost:'请选择岗位'}}</view>
  8. <view class="margin-left-sm">
  9. <image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="margin-tb-sm" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
  14. <view class="flex align-center justify-between" @click="getPostlist">
  15. <view class=" text-bold">专业</view>
  16. <view class="text-right flex align-center padding-tb-sm">
  17. <view>{{ rulePostName? rulePostName:'请选择专业'}}</view>
  18. <view class="margin-left-sm">
  19. <image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 求职岗位 -->
  25. <u-select v-model="postShow" :list="postlist" @confirm="postConfirm"></u-select>
  26. <!-- 求职岗位 -->
  27. <u-select v-model="show" :list="ErjiList" @confirm="postlistConfirm"></u-select>
  28. <view class="btn" @click="submit()">保存</view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. resumesPost: '',
  36. rulePostId: '',
  37. postShow: false, //一级岗位
  38. postlist: [],
  39. ruleClassifyId: '',
  40. show: false, //二级岗位
  41. ErjiList: [],
  42. rulePostName:''
  43. }
  44. },
  45. onLoad() {
  46. },
  47. onShow() {
  48. },
  49. methods: {
  50. postConfirm(e) {
  51. this.resumesPost = e[0].label
  52. this.ruleClassifyId = e[0].value
  53. },
  54. getPost() {
  55. this.getClassifyList()
  56. },
  57. //获取求职岗位
  58. getClassifyList() {
  59. let data = {
  60. status: 1
  61. }
  62. this.$Request.get('/app/rule/selectRuleClassifyList', data).then(res => {
  63. if (res.code == 0) {
  64. var arr = []
  65. res.data.forEach((d, index) => {
  66. var data = {}
  67. data.label = d.ruleClassifyName
  68. data.value = d.ruleClassifyId
  69. arr.push(data)
  70. })
  71. this.postlist = arr
  72. this.postShow = true
  73. }
  74. })
  75. },
  76. postlistConfirm(e) {
  77. this.rulePostName = e[0].label
  78. this.rulePostId = e[0].value
  79. },
  80. getPostlist() {
  81. this.getPostList()
  82. },
  83. //获取岗位
  84. getPostList() {
  85. if (!this.ruleClassifyId) {
  86. uni.showToast({
  87. title: '请先选择岗位',
  88. icon: 'none',
  89. duration: 1000
  90. })
  91. return
  92. }
  93. let data = {
  94. ruleClassifyId: this.ruleClassifyId
  95. }
  96. this.$Request.post('/app/rule/selectRulePostList', data).then(res => {
  97. if (res.code == 0) {
  98. var arr = []
  99. res.data.forEach((d, index) => {
  100. var data = {}
  101. data.label = d.rulePostName
  102. data.value = d.rulePostId
  103. arr.push(data)
  104. })
  105. this.ErjiList = arr
  106. this.show = true
  107. }
  108. })
  109. },
  110. submit() {
  111. if (!this.resumesPost) {
  112. uni.showToast({
  113. title: '请选择岗位',
  114. icon: 'none',
  115. duration: 1000
  116. })
  117. return
  118. }
  119. if (!this.rulePostName) {
  120. uni.showToast({
  121. title: '请选择专业',
  122. icon: 'none',
  123. duration: 1000
  124. })
  125. return
  126. }
  127. let data = {
  128. resumesPost: this.resumesPost,
  129. rulePostId: this.rulePostId,
  130. rulePostName:this.rulePostName,
  131. ruleClassifyId:this.ruleClassifyId
  132. }
  133. uni.setStorageSync("resumes", data)
  134. uni.navigateBack()
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="less">
  140. page {
  141. background: #F2F2F7;
  142. }
  143. .box {
  144. background: #FFFFFF;
  145. border-radius: 24upx;
  146. margin: 30upx;
  147. padding: 30upx;
  148. }
  149. .u-input__input {
  150. text-align: right !important;
  151. }
  152. .btn {
  153. background: #00B88F;
  154. border-radius: 10upx;
  155. text-align: center;
  156. // margin-top: 30upx;
  157. padding: 30upx 0upx;
  158. color: #FFFFFF;
  159. // font-weight: bold;
  160. // letter-spacing: 2rpx;
  161. margin: 30upx;
  162. }
  163. </style>