edit.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. intentionId: '', //求职意向id
  112. isDefault: 0, //是否第一意向
  113. // classifyOneId:'',//岗位一级
  114. // classifyTwoId:'',//岗位二级id
  115. };
  116. },
  117. onShow() {
  118. let that = this
  119. //选择的岗位
  120. uni.$on('jobs', (info) => {
  121. that.ruleClassifyId = info.ruleClassifyId
  122. that.ruleClassifyName = info.ruleClassifyName
  123. // that.classifyOneId = info.ruleClassifyId1
  124. // that.classifyTwoId = info.ruleClassifyId2
  125. })
  126. //选择的城市
  127. uni.$on('city', (info) => {
  128. that.city = info.city
  129. })
  130. //选择的行业
  131. uni.$on('industry', (info) => {
  132. that.industry = info.industry
  133. })
  134. },
  135. onLoad(option) {
  136. this.intentionId = option.intentionId
  137. this.getInfo()
  138. },
  139. methods: {
  140. /**
  141. * 获取求职意向详情
  142. */
  143. getInfo() {
  144. let data = {
  145. intentionId: this.intentionId
  146. }
  147. this.$Request.getT('/app/intention/getIntentionInfo', data).then(res => {
  148. if (res.code == 0) {
  149. this.ruleClassifyId = res.data.ruleClassifyId //岗位id
  150. this.ruleClassifyName = res.data.ruleClassifyName //岗位名称
  151. this.city = res.data.citys //工作城市
  152. this.resumesCompensation = res.data.salaryRange //薪资范围
  153. this.industry = res.data.industry //行业
  154. this.workType = res.data.postType //工作性质
  155. this.isDefault = res.data.isDefault //是第一意向
  156. // this.classifyOneId = res.data.classifyOneId
  157. // this.classifyTwoId = res.data.classifyTwoId
  158. }
  159. })
  160. },
  161. /**
  162. * 提交求职期望
  163. */
  164. addjob() {
  165. if (!this.ruleClassifyId) {
  166. uni.showToast({
  167. title: '请选择期望岗位',
  168. icon: 'none'
  169. })
  170. return
  171. }
  172. if (!this.city) {
  173. uni.showToast({
  174. title: '请选择期望城市',
  175. icon: 'none'
  176. })
  177. return
  178. }
  179. if (!this.industry) {
  180. uni.showToast({
  181. title: '请选择期望行业',
  182. icon: 'none'
  183. })
  184. return
  185. }
  186. if (!this.resumesCompensation) {
  187. uni.showToast({
  188. title: '请选择期望薪资',
  189. icon: 'none'
  190. })
  191. return
  192. }
  193. if (!this.workType) {
  194. uni.showToast({
  195. title: '请选择工作性质',
  196. icon: 'none'
  197. })
  198. return
  199. }
  200. let data = {
  201. intentionId: this.intentionId,
  202. ruleClassifyId: this.ruleClassifyId, //岗位id
  203. ruleClassifyName: this.ruleClassifyName, //岗位名称
  204. citys: this.city, //工作城市
  205. salaryRange: this.resumesCompensation, //薪资范围
  206. industry: this.industry, //行业
  207. postType: this.workType, //工作性质
  208. isDefault: this.isDefault
  209. // classifyOneId:this.classifyOneId,
  210. // classifyTwoId:this.classifyTwoId
  211. }
  212. this.$Request.postT('/app/intention/saveUpdate', data).then(res => {
  213. if (res.code == 0) {
  214. uni.showToast({
  215. title: '修改成功'
  216. })
  217. setTimeout(() => {
  218. uni.navigateBack()
  219. }, 1000)
  220. } else {
  221. uni.showToast({
  222. title: res.msg,
  223. icon: 'none'
  224. })
  225. }
  226. })
  227. },
  228. workConfirm(e) {
  229. this.workType = e[0].value
  230. },
  231. moneyConfirm(e) {
  232. this.resumesCompensation = e[0].value
  233. },
  234. /**
  235. * 工作性质
  236. */
  237. getPostType() {
  238. this.$Request.get('/app/dict/list', {
  239. type: '工作性质'
  240. }).then(res => {
  241. if (res.code == 0) {
  242. let arr = res.data
  243. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  244. this.workTypes = arr
  245. this.workShow = true
  246. }
  247. })
  248. },
  249. /**
  250. * 薪资列表
  251. */
  252. getMonyList() {
  253. this.$Request.get('/app/dict/list', {
  254. type: '薪资'
  255. }).then(res => {
  256. if (res.code == 0) {
  257. let arr = res.data
  258. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  259. this.monyList = arr
  260. this.monyShow = true
  261. }
  262. })
  263. },
  264. gotoJob(url) {
  265. uni.navigateTo({
  266. url: url
  267. })
  268. },
  269. }
  270. }
  271. </script>
  272. <style lang="scss">
  273. page {
  274. background-color: #F2F2F7;
  275. }
  276. .list {
  277. width: 100%;
  278. // height: 795rpx;
  279. margin-top: 30rpx;
  280. .list-box {
  281. width: 686rpx;
  282. height: 100;
  283. background-color: #ffffff;
  284. border-radius: 24rpx;
  285. .list-box-job {
  286. width: 606rpx;
  287. height: 164rpx;
  288. margin: 0 auto;
  289. .list-box-job-l {
  290. width: 80%;
  291. }
  292. .list-box-job-r {
  293. width: 30rpx;
  294. }
  295. }
  296. .list-box-line {
  297. width: 650rpx;
  298. height: 1rpx;
  299. border: 1rpx solid #F2F2F2;
  300. }
  301. }
  302. }
  303. .subbtn {
  304. width: 100%;
  305. height: 88rpx;
  306. margin-top: 90rpx;
  307. .subbtn-box {
  308. width: 686rpx;
  309. height: 100%;
  310. background-color: #00B88F;
  311. border-radius: 44rpx;
  312. color: #FFFFFF;
  313. font-size: 32rpx;
  314. font-weight: bold;
  315. }
  316. }
  317. </style>