edit.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <view>
  3. <navBar title="修改" color="#000" />
  4. <!-- 表单 -->
  5. <view class="list flex justify-center">
  6. <view class="list-box">
  7. <view class="list-box-job flex justify-between align-center">
  8. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/jobList')">
  9. <view
  10. class="list-box-job-l-label"
  11. @click="gotoJob('/package/jobIntention/jobList')"
  12. >
  13. 期望岗位
  14. </view>
  15. <view
  16. class=""
  17. @click="gotoJob('/package/jobIntention/jobList')"
  18. style="width: 100%"
  19. >
  20. <u-input
  21. @click="gotoJob('/package/jobIntention/jobList')"
  22. disabled
  23. v-model="ruleClassifyName"
  24. :clearable="false"
  25. input-align="left"
  26. type="text"
  27. placeholder="请选择"
  28. />
  29. </view>
  30. </view>
  31. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/jobList')">
  32. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  33. </view>
  34. </view>
  35. <view class="list-box-line"></view>
  36. <view
  37. class="list-box-job flex justify-between align-center"
  38. @click="gotoJob('/package/jobIntention/city')"
  39. >
  40. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/city')">
  41. <view
  42. class="list-box-job-l-label"
  43. @click="gotoJob('/package/jobIntention/city')"
  44. >
  45. 期望地点
  46. </view>
  47. <view class="" style="width: 100%">
  48. <u-input
  49. disabled
  50. v-model="city"
  51. @click="gotoJob('/package/jobIntention/city')"
  52. :clearable="false"
  53. input-align="left"
  54. type="text"
  55. placeholder="如:北京"
  56. />
  57. </view>
  58. </view>
  59. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/city')">
  60. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  61. </view>
  62. </view>
  63. <view class="list-box-line"></view>
  64. <view
  65. class="list-box-job flex justify-between align-center"
  66. @click="gotoJob('/package/jobIntention/industry')"
  67. >
  68. <view class="list-box-job-l" @click="gotoJob('/package/jobIntention/industry')">
  69. <view
  70. class="list-box-job-l-label"
  71. @click="gotoJob('/package/jobIntention/industry')"
  72. >
  73. 期望行业
  74. </view>
  75. <view
  76. class=""
  77. @click="gotoJob('/package/jobIntention/industry')"
  78. style="width: 100%"
  79. >
  80. <u-input
  81. @click="gotoJob('/package/jobIntention/industry')"
  82. disabled
  83. v-model="industry"
  84. :clearable="false"
  85. input-align="left"
  86. type="text"
  87. placeholder="如:互联网/电子商务"
  88. />
  89. </view>
  90. </view>
  91. <view class="list-box-job-r" @click="gotoJob('/package/jobIntention/industry')">
  92. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  93. </view>
  94. </view>
  95. <view class="list-box-line"></view>
  96. <view
  97. class="list-box-job flex justify-between align-center"
  98. @click="getMonyList()"
  99. >
  100. <view class="list-box-job-l" @click="getMonyList()">
  101. <view class="list-box-job-l-label" @click="getMonyList()"> 期望薪资 </view>
  102. <view class="" style="width: 100%">
  103. <u-input
  104. disabled
  105. v-model="resumesCompensation"
  106. @click="getMonyList()"
  107. :clearable="false"
  108. input-align="left"
  109. type="text"
  110. placeholder="如:1W-2W"
  111. />
  112. </view>
  113. </view>
  114. <view class="list-box-job-r" @click="getMonyList()">
  115. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  116. </view>
  117. </view>
  118. <view class="list-box-line"></view>
  119. <view
  120. class="list-box-job flex justify-between align-center"
  121. @click="getPostType()"
  122. >
  123. <view class="list-box-job-l" @click="getPostType()">
  124. <view class="list-box-job-l-label" @click="getPostType()"> 工作性质 </view>
  125. <view class="" style="width: 100%">
  126. <u-input
  127. disabled
  128. v-model="workType"
  129. @click="getPostType()"
  130. :clearable="false"
  131. input-align="left"
  132. type="text"
  133. placeholder="如:全职"
  134. />
  135. </view>
  136. </view>
  137. <view class="list-box-job-r" @click="getPostType()">
  138. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <!-- 确认 -->
  144. <view class="subbtn flex justify-center" @click="addjob()">
  145. <view class="subbtn-box flex justify-center align-center"> 修改 </view>
  146. </view>
  147. <!-- 薪资 -->
  148. <u-select v-model="monyShow" :list="monyList" @confirm="moneyConfirm"></u-select>
  149. <!-- 工作性质 -->
  150. <u-select v-model="workShow" :list="workTypes" @confirm="workConfirm"></u-select>
  151. </view>
  152. </template>
  153. <script>
  154. import navBar from "@/components/nav-bar/index.vue";
  155. export default {
  156. data() {
  157. return {
  158. monyShow: false,
  159. monyList: [], //薪资列表
  160. resumesCompensation: "", //薪资
  161. workShow: false,
  162. workType: "", //工作性质
  163. workTypes: [],
  164. city: "", //城市
  165. ruleClassifyId: "", //岗位id
  166. ruleClassifyName: "", //岗位名称
  167. industry: "",
  168. intentionId: "", //求职意向id
  169. isDefault: 0, //是否第一意向
  170. // classifyOneId:'',//岗位一级
  171. // classifyTwoId:'',//岗位二级id
  172. };
  173. },
  174. components: {
  175. navBar,
  176. },
  177. onShow() {
  178. let that = this;
  179. //选择的岗位
  180. uni.$on("jobs", (info) => {
  181. that.ruleClassifyId = info.ruleClassifyId;
  182. that.ruleClassifyName = info.ruleClassifyName;
  183. // that.classifyOneId = info.ruleClassifyId1
  184. // that.classifyTwoId = info.ruleClassifyId2
  185. });
  186. //选择的城市
  187. uni.$on("city", (info) => {
  188. that.city = info.city;
  189. });
  190. //选择的行业
  191. uni.$on("industry", (info) => {
  192. that.industry = info.industry;
  193. });
  194. },
  195. onLoad(option) {
  196. this.intentionId = option.intentionId;
  197. this.getInfo();
  198. },
  199. methods: {
  200. /**
  201. * 获取求职意向详情
  202. */
  203. getInfo() {
  204. let data = {
  205. intentionId: this.intentionId,
  206. };
  207. this.$Request.getT("/app/intention/getIntentionInfo", data).then((res) => {
  208. if (res.code == 0) {
  209. this.ruleClassifyId = res.data.ruleClassifyId; //岗位id
  210. this.ruleClassifyName = res.data.ruleClassifyName; //岗位名称
  211. this.city = res.data.citys; //工作城市
  212. this.resumesCompensation = res.data.salaryRange; //薪资范围
  213. this.industry = res.data.industry; //行业
  214. this.workType = res.data.postType; //工作性质
  215. this.isDefault = res.data.isDefault; //是第一意向
  216. // this.classifyOneId = res.data.classifyOneId
  217. // this.classifyTwoId = res.data.classifyTwoId
  218. }
  219. });
  220. },
  221. /**
  222. * 提交求职期望
  223. */
  224. addjob() {
  225. if (!this.ruleClassifyId) {
  226. uni.showToast({
  227. title: "请选择期望岗位",
  228. icon: "none",
  229. });
  230. return;
  231. }
  232. if (!this.city) {
  233. uni.showToast({
  234. title: "请选择期望城市",
  235. icon: "none",
  236. });
  237. return;
  238. }
  239. if (!this.industry) {
  240. uni.showToast({
  241. title: "请选择期望行业",
  242. icon: "none",
  243. });
  244. return;
  245. }
  246. if (!this.resumesCompensation) {
  247. uni.showToast({
  248. title: "请选择期望薪资",
  249. icon: "none",
  250. });
  251. return;
  252. }
  253. if (!this.workType) {
  254. uni.showToast({
  255. title: "请选择工作性质",
  256. icon: "none",
  257. });
  258. return;
  259. }
  260. let data = {
  261. intentionId: this.intentionId,
  262. ruleClassifyId: this.ruleClassifyId, //岗位id
  263. ruleClassifyName: this.ruleClassifyName, //岗位名称
  264. citys: this.city, //工作城市
  265. salaryRange: this.resumesCompensation, //薪资范围
  266. industry: this.industry, //行业
  267. postType: this.workType, //工作性质
  268. isDefault: this.isDefault,
  269. // classifyOneId:this.classifyOneId,
  270. // classifyTwoId:this.classifyTwoId
  271. };
  272. this.$Request.postT("/app/intention/saveUpdate", data).then((res) => {
  273. if (res.code == 0) {
  274. uni.showToast({
  275. title: "修改成功",
  276. });
  277. setTimeout(() => {
  278. uni.navigateBack();
  279. }, 1000);
  280. } else {
  281. uni.showToast({
  282. title: res.msg,
  283. icon: "none",
  284. });
  285. }
  286. });
  287. },
  288. workConfirm(e) {
  289. this.workType = e[0].value;
  290. },
  291. moneyConfirm(e) {
  292. this.resumesCompensation = e[0].value;
  293. },
  294. /**
  295. * 工作性质
  296. */
  297. getPostType() {
  298. this.$Request
  299. .get("/app/dict/list", {
  300. type: "工作性质",
  301. })
  302. .then((res) => {
  303. if (res.code == 0) {
  304. let arr = res.data;
  305. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, "label"));
  306. this.workTypes = arr;
  307. this.workShow = true;
  308. }
  309. });
  310. },
  311. /**
  312. * 薪资列表
  313. */
  314. getMonyList() {
  315. this.$Request
  316. .get("/app/dict/list", {
  317. type: "薪资",
  318. })
  319. .then((res) => {
  320. if (res.code == 0) {
  321. let arr = res.data;
  322. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, "label"));
  323. this.monyList = arr;
  324. this.monyShow = true;
  325. }
  326. });
  327. },
  328. gotoJob(url) {
  329. uni.navigateTo({
  330. url: url,
  331. });
  332. },
  333. },
  334. };
  335. </script>
  336. <style lang="scss">
  337. page {
  338. background-color: #f2f2f7;
  339. }
  340. .list {
  341. width: 100%;
  342. // height: 795rpx;
  343. margin-top: 30rpx;
  344. .list-box {
  345. width: 686rpx;
  346. height: 100;
  347. background-color: #ffffff;
  348. border-radius: 24rpx;
  349. .list-box-job {
  350. width: 606rpx;
  351. height: 164rpx;
  352. margin: 0 auto;
  353. .list-box-job-l {
  354. width: 80%;
  355. }
  356. .list-box-job-r {
  357. width: 30rpx;
  358. }
  359. }
  360. .list-box-line {
  361. width: 650rpx;
  362. height: 1rpx;
  363. border: 1rpx solid #f2f2f2;
  364. }
  365. }
  366. }
  367. .subbtn {
  368. width: 100%;
  369. height: 88rpx;
  370. margin-top: 90rpx;
  371. .subbtn-box {
  372. width: 686rpx;
  373. height: 100%;
  374. background-color: #016bf6;
  375. border-radius: 44rpx;
  376. color: #ffffff;
  377. font-size: 32rpx;
  378. font-weight: bold;
  379. }
  380. }
  381. </style>