add.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <!-- 表单 -->
  4. <view class="list flex justify-center">
  5. <view class="list-box">
  6. <view class="list-box-job flex justify-between align-center">
  7. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/jobList')">
  8. <view class="list-box-job-l-label" @click="gotoJob('/package/jobIntention/jobList')">
  9. 期望岗位
  10. </view>
  11. <view class="" @click="gotoJob('/package/jobIntention/jobList')" style="width: 100%;">
  12. <u-input @click="gotoJob('/package/jobIntention/jobList')" disabled
  13. v-model="ruleClassifyName" :clearable="false" input-align="left" type="text"
  14. placeholder="请选择" />
  15. </view>
  16. </view>
  17. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/jobList')">
  18. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  19. </view>
  20. </view>
  21. <view class="list-box-line"></view>
  22. <view class="list-box-job flex justify-between align-center"
  23. @click="gotoJob('/package/jobIntention/city')">
  24. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/city')">
  25. <view class="list-box-job-l-label" @click="gotoJob('/package/jobIntention/city')">
  26. 期望地点
  27. </view>
  28. <view class="" style="width: 100%;">
  29. <u-input disabled v-model="city" @click="gotoJob('/package/jobIntention/city')"
  30. :clearable="false" input-align="left" type="text" placeholder="如:北京" />
  31. </view>
  32. </view>
  33. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/city')">
  34. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  35. </view>
  36. </view>
  37. <view class="list-box-line"></view>
  38. <view class="list-box-job flex justify-between align-center"
  39. @click="gotoJob('/package/jobIntention/industry')">
  40. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/industry')">
  41. <view class="list-box-job-l-label" @click="gotoJob('/package/jobIntention/industry')">
  42. 期望行业
  43. </view>
  44. <view class="" @click="gotoJob('/package/jobIntention/industry')" style="width: 100%;">
  45. <u-input @click="gotoJob('/package/jobIntention/industry')" disabled v-model="industry"
  46. :clearable="false" input-align="left" type="text" placeholder="如:互联网/电子商务" />
  47. </view>
  48. </view>
  49. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/industry')">
  50. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  51. </view>
  52. </view>
  53. <view class="list-box-line"></view>
  54. <view class="list-box-job flex justify-between align-center" @click="getMonyList()">
  55. <view class="list-box-job-l" @click="getMonyList()">
  56. <view class="list-box-job-l-label" @click="getMonyList()">
  57. 期望薪资
  58. </view>
  59. <view class="" style="width: 100%;">
  60. <u-input disabled v-model="resumesCompensation" @click="getMonyList()" :clearable="false"
  61. input-align="left" type="text" placeholder="如:1W-2W" />
  62. </view>
  63. </view>
  64. <view class="list-box-job-r" @click="getMonyList()">
  65. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  66. </view>
  67. </view>
  68. <view class="list-box-line"></view>
  69. <view class="list-box-job flex justify-between align-center" @click="getPostType()">
  70. <view class="list-box-job-l" @click="getPostType()">
  71. <view class="list-box-job-l-label" @click="getPostType()">
  72. 工作性质
  73. </view>
  74. <view class="" style="width: 100%;">
  75. <u-input disabled v-model="workType" @click="getPostType()" :clearable="false"
  76. input-align="left" type="text" placeholder="如:全职" />
  77. </view>
  78. </view>
  79. <view class="list-box-job-r" @click="getPostType()">
  80. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- 确认 -->
  86. <view class="subbtn flex justify-center" @click="addjob()">
  87. <view class="subbtn-box flex justify-center align-center">
  88. 保存
  89. </view>
  90. </view>
  91. <!-- 薪资 -->
  92. <u-select v-model="monyShow" :list="monyList" @confirm="moneyConfirm"></u-select>
  93. <!-- 工作性质 -->
  94. <u-select v-model="workShow" :list="workTypes" @confirm="workConfirm"></u-select>
  95. </view>
  96. </template>
  97. <script>
  98. export default {
  99. data() {
  100. return {
  101. monyShow: false,
  102. monyList: [], //薪资列表
  103. resumesCompensation: '', //薪资
  104. workShow: false,
  105. workType: '', //工作性质
  106. workTypes: [],
  107. city: '', //城市
  108. ruleClassifyId: '', //岗位id
  109. ruleClassifyName: '', //岗位名称
  110. industry: '',
  111. classifyOneId: '', //岗位一级
  112. classifyTwoId: '', //岗位二级id
  113. isDefault: 0,
  114. };
  115. },
  116. onShow() {
  117. let that = this
  118. //选择的岗位
  119. uni.$on('jobs', (info) => {
  120. that.ruleClassifyId = info.ruleClassifyId
  121. that.ruleClassifyName = info.ruleClassifyName
  122. // that.classifyOneId = info.ruleClassifyId1
  123. // that.classifyTwoId = info.ruleClassifyId2
  124. })
  125. //选择的城市
  126. uni.$on('city', (info) => {
  127. that.city = info.city
  128. })
  129. //选择的行业
  130. uni.$on('industry', (info) => {
  131. that.industry = info.industry
  132. })
  133. },
  134. methods: {
  135. /**
  136. * 提交求职期望
  137. */
  138. addjob() {
  139. if (!this.ruleClassifyId) {
  140. uni.showToast({
  141. title: '请选择期望岗位',
  142. icon: 'none'
  143. })
  144. return
  145. }
  146. if (!this.city) {
  147. uni.showToast({
  148. title: '请选择期望城市',
  149. icon: 'none'
  150. })
  151. return
  152. }
  153. if (!this.industry) {
  154. uni.showToast({
  155. title: '请选择期望行业',
  156. icon: 'none'
  157. })
  158. return
  159. }
  160. if (!this.resumesCompensation) {
  161. uni.showToast({
  162. title: '请选择期望薪资',
  163. icon: 'none'
  164. })
  165. return
  166. }
  167. if (!this.workType) {
  168. uni.showToast({
  169. title: '请选择工作性质',
  170. icon: 'none'
  171. })
  172. return
  173. }
  174. let data = {
  175. ruleClassifyId: this.ruleClassifyId, //岗位id
  176. ruleClassifyName: this.ruleClassifyName, //岗位名称
  177. citys: this.city, //工作城市
  178. salaryRange: this.resumesCompensation, //薪资范围
  179. industry: this.industry, //行业
  180. postType: this.workType, //工作性质
  181. isDefault: this.isDefault
  182. // classifyOneId:this.classifyOneId,
  183. // classifyTwoId:this.classifyTwoId
  184. }
  185. this.$Request.postT('/app/intention/saveUpdate', data).then(res => {
  186. if (res.code == 0) {
  187. uni.showToast({
  188. title: '添加成功'
  189. })
  190. setTimeout(() => {
  191. uni.navigateBack()
  192. }, 1000)
  193. } else {
  194. uni.showToast({
  195. title: res.msg,
  196. icon: 'none'
  197. })
  198. }
  199. })
  200. },
  201. workConfirm(e) {
  202. this.workType = e[0].value
  203. },
  204. moneyConfirm(e) {
  205. this.resumesCompensation = e[0].value
  206. },
  207. /**
  208. * 工作性质
  209. */
  210. getPostType() {
  211. this.$Request.get('/app/dict/list', {
  212. type: '工作性质'
  213. }).then(res => {
  214. if (res.code == 0) {
  215. let arr = res.data
  216. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  217. this.workTypes = arr
  218. this.workShow = true
  219. }
  220. })
  221. },
  222. /**
  223. * 薪资列表
  224. */
  225. getMonyList() {
  226. this.$Request.get('/app/dict/list', {
  227. type: '薪资'
  228. }).then(res => {
  229. if (res.code == 0) {
  230. let arr = res.data
  231. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  232. this.monyList = arr
  233. this.monyShow = true
  234. }
  235. })
  236. },
  237. gotoJob(url) {
  238. uni.navigateTo({
  239. url: url
  240. })
  241. },
  242. }
  243. }
  244. </script>
  245. <style lang="scss">
  246. page {
  247. background-color: #F2F2F7;
  248. }
  249. .list {
  250. width: 100%;
  251. // height: 795rpx;
  252. margin-top: 30rpx;
  253. .list-box {
  254. width: 686rpx;
  255. height: 100;
  256. background-color: #ffffff;
  257. border-radius: 24rpx;
  258. .list-box-job {
  259. width: 606rpx;
  260. height: 164rpx;
  261. margin: 0 auto;
  262. .list-box-job-l {
  263. width: 80%;
  264. }
  265. .list-box-job-r {
  266. width: 30rpx;
  267. }
  268. }
  269. .list-box-line {
  270. width: 650rpx;
  271. height: 1rpx;
  272. border: 1rpx solid #F2F2F2;
  273. }
  274. }
  275. }
  276. .subbtn {
  277. width: 100%;
  278. height: 88rpx;
  279. margin-top: 90rpx;
  280. .subbtn-box {
  281. width: 686rpx;
  282. height: 100%;
  283. background-color: #00B88F;
  284. border-radius: 44rpx;
  285. color: #FFFFFF;
  286. font-size: 32rpx;
  287. font-weight: bold;
  288. }
  289. }
  290. </style>