apply.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <template>
  2. <view class="personal">
  3. <view class="">
  4. <text class="title">添加求职意向</text>
  5. <view class="titleb">不同的求职期望,推荐啊的职位也会不同。</view>
  6. </view>
  7. <view class="body-input u-flex-col u-row-center" @click="birthdayBtn">
  8. <text class="input-title">求职时间</text>
  9. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  10. placeholder="请选择您的求职时间" border placeholderClass='input-style' suffixIcon="arrow-right"
  11. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="job_intention.changehangye"></u--input>
  12. </view>
  13. <view class="body-input u-flex-col u-row-center" @click="cityShow = true">
  14. <text class="input-title">期望城市</text>
  15. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  16. placeholder="请选择您的期望城市" border placeholderClass='input-style' suffixIcon="arrow-right"
  17. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="job_intention.city1"></u--input>
  18. </view>
  19. <view class="body-input u-flex-col u-row-center" @click="birthdayBtn">
  20. <text class="input-title">期望薪资</text>
  21. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  22. placeholder="请选择您的期望薪资" border placeholderClass='input-style' suffixIcon="arrow-right"
  23. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="from.birthday"></u--input>
  24. </view>
  25. <view class="body-input u-flex-col u-row-center" @click="changehangye">
  26. <text class="input-title">当前行业</text>
  27. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  28. placeholder="请选择您的当前行业" border placeholderClass='input-style' suffixIcon="arrow-right"
  29. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="job_intention.category_three"></u--input>
  30. </view>
  31. <view class="body-input u-flex-col u-row-center" @click="changehangye1">
  32. <text class="input-title">期望行业</text>
  33. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  34. placeholder="请选择您的期望行业" border placeholderClass='input-style' suffixIcon="arrow-right"
  35. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="job_intention.category_industry_name"></u--input>
  36. </view>
  37. <view class="body-input u-flex-col u-row-center" @click="changeright1">
  38. <text class="input-title">当前职位</text>
  39. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  40. placeholder="请选择您的当前职位" border placeholderClass='input-style' suffixIcon="arrow-right"
  41. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="category_industry_name1"></u--input>
  42. </view>
  43. <view class="body-input u-flex-col u-row-center" @click="changeright">
  44. <text class="input-title">期望职位</text>
  45. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  46. placeholder="请选择您的期望职位" border placeholderClass='input-style' suffixIcon="arrow-right"
  47. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="category_industry_name"></u--input>
  48. </view>
  49. <view class="u-flex u-row-between" style="margin-top: 30rpx;">
  50. <view class="">
  51. 付费求职
  52. <image @click="propshow=true" style="width: 32rpx;height: 32rpx;" src="/static/images/xiangguan.png"
  53. mode=""></image>
  54. </view>
  55. <u-switch v-model="button" @change="change"></u-switch>
  56. </view>
  57. <view class="button" @click="next">
  58. 保存
  59. </view>
  60. <u-datetime-picker ref="picker" title="求职时间" :minDate="minDate" @confirm="birthdayConfirm" :show="birthdayShow"
  61. mode="date" @cancel='birthdayShow = false'></u-datetime-picker>
  62. <u-picker ref="uPicker" keyName="name" title="期望城市" :defaultIndex="indexs" :show="cityShow" :columns="cityList"
  63. @confirm="cityconfirm" @cancel="cityShow = false" @change="changeHandler"></u-picker>
  64. <u-popup :show="propshow" mode="center" @close="close" @open="open">
  65. <view style="width:570rpx ;padding: 32rpx;border-radius: 20rpx;">
  66. <text>感谢您使用平安健康保险App,我们非常重视您的信息和隐私</text>
  67. <view class="u-flex" style="justify-content: center;">
  68. <view class="btn" @click="propshow=false">
  69. 我知道了
  70. </view>
  71. </view>
  72. </view>
  73. </u-popup>
  74. </view>
  75. </template>
  76. <script setup>
  77. import {
  78. getAllArea
  79. } from "@/units/inquire.js"
  80. export default {
  81. data() {
  82. return {
  83. button:false,
  84. propshow: false,
  85. province: [], //省数据
  86. city: [], //市数据
  87. area: [], //区数据
  88. provinceid: "", //省数据
  89. cityid: "", //市数据
  90. areaid: "", //区数据
  91. indexs: [], //默认地区下标
  92. //选择器状态
  93. birthdayShow: false, //出生年月
  94. workShow: false, //工作时间
  95. cityShow: false, //户口所在地
  96. jobShow: false, //工作显示
  97. cityList: [], //数据地址
  98. cityids: [], //数据地址
  99. joblist: [],
  100. id: "",
  101. job_intention:{
  102. changehangye:"",
  103. job_date:"", //date 求职时间(求职意向
  104. province_id:"", //string 期望省份ID(求职意向
  105. city_id:"", //string 期望城市ID(求职意向
  106. province:"", //string 期望省份名称(求职意向
  107. city:"", //string 期望城市名称(求职意向
  108. salary_type:"", //string 薪资类型: year=年薪;month=月薪(求职意向
  109. salary:"", //string 薪水(求职意向
  110. salary_month:"", //string 一年多少薪(求职意向
  111. category_field_id:"", //string 领域ID(求职意向
  112. category_field_name :"", //string 领域名称(求职意向
  113. category_industry_first:"", //string 行业一级ID(求职意向
  114. category_industry_id:"", //string 行业ID(求职意向
  115. category_industry_first_name:"", //string 行业一级名称(求职意向
  116. category_one:"", //string 行业一级ID(求职意向
  117. category_two:"", //string 行业ID(求职意向
  118. category_three:"", //string 行业一级名称(求职意向
  119. category_industry_name:"", //string 行业名称(求职意向
  120. category_industry_name1:"", //string 行业名称(求职意向
  121. category_job_first:"", //string 职业分类一级ID(求职意向
  122. category_job_second :"", //string 职业分类二级ID(求职意向
  123. category_job_id :"", //string 职位分类ID(求职意向
  124. category_job_first_name :"", //string 职业分类一级名称(求职意向
  125. category_job_second_name:"", //string 职业分类二级名称(求职意向
  126. category_job_name:"", //string 职位分类名称(求职意向
  127. is_pay:0,
  128. city1:"",
  129. }
  130. }
  131. },
  132. onLoad(opsition) {
  133. this.AllArea()
  134. this.id = opsition.id
  135. },
  136. methods: {
  137. change(e) {
  138. console.log(e);
  139. if(e){
  140. this.job_intention.is_pay = 1
  141. }else{
  142. this.job_intention.is_pay = 0
  143. }
  144. },
  145. //所有地区
  146. AllArea() {
  147. getAllArea().then((res) => {
  148. console.log(res);
  149. this.province = res.data.map(t => {
  150. return {
  151. name: t.name,
  152. id: t.id
  153. }
  154. })
  155. console.log("aaa", this.province);
  156. this.city = res.data.map(t => t.children.map(v => {
  157. return {
  158. name: v.name,
  159. id: v.id
  160. }
  161. }))
  162. this.area = res.data.map(t => t.children.map(v => v.children.map(i => {
  163. return {
  164. name: i.name,
  165. id: i.id
  166. }
  167. })))
  168. //默认显示数据
  169. // this.cityList = [
  170. // this.province.map(res => res.name),
  171. // this.city[0].map(res => res.name),
  172. // this.area[0][0].map(res => res.name)
  173. // ]
  174. let a = []
  175. let b = []
  176. let c = []
  177. this.province.map(res => {
  178. a.push({
  179. name: res.name,
  180. id: res.id,
  181. })
  182. })
  183. this.city[0].map(res => {
  184. b.push({
  185. name: res.name,
  186. id: res.id,
  187. })
  188. })
  189. this.area[0][0].map(res => {
  190. c.push({
  191. name: res.name,
  192. id: res.id,
  193. })
  194. })
  195. this.cityList = [a, b, c]
  196. // if (this.province && this.city && this.area) {
  197. // //省索引
  198. // let pIdx = this.province.findIndex(v => v.name == this.province);
  199. // //根据省索引设置默认市数据
  200. // this.columns[1] = this.city[pIdx].map(res => res.name)
  201. // //市索引
  202. // let cIdx = this.city[pIdx].findIndex(v => v.name == this.city);
  203. // //根据市索引设置默认区数据
  204. // this.columns[2] = this.area[pIdx][cIdx].map(res => res.name)
  205. // //区索引
  206. // let aIdx = this.area[pIdx][cIdx].findIndex(v => v.name == this.area);
  207. // this.indexs = [pIdx, cIdx, aIdx];
  208. // // console.log(pIdx, cIdx, aIdx);
  209. // console.log(this.indexs);
  210. // }
  211. // if (this.addressData.province && this.addressData.city && this.addressData.area) {
  212. // //省索引
  213. // let pIdx = this.province.findIndex(v => v.name == this.addressData.province);
  214. // //根据省索引设置默认市数据
  215. // this.columns[1] = this.city[pIdx].map(res => res.name)
  216. // //市索引
  217. // let cIdx = this.city[pIdx].findIndex(v => v.name == this.addressData.city);
  218. // //根据市索引设置默认区数据
  219. // this.columns[2] = this.area[pIdx][cIdx].map(res => res.name)
  220. // //区索引
  221. // let aIdx = this.area[pIdx][cIdx].findIndex(v => v.name == this.addressData.area);
  222. // this.indexs = [pIdx, cIdx, aIdx];
  223. // // console.log(pIdx, cIdx, aIdx);
  224. // console.log(this.indexs);
  225. // }
  226. })
  227. },
  228. changeHandler(e) {
  229. const {
  230. columnIndex, //当前改变值的列下标
  231. value,
  232. values, // values为当前变化列的数组内容
  233. indexs, //当前地区值下标
  234. picker = this.$refs.uPicker
  235. } = e
  236. //columnIndex代表第几列,意思是下标为0的列发生变化
  237. if (columnIndex === 0) {
  238. picker.setColumnValues(1, this.city[indexs[0]].map(v => {
  239. return {
  240. name: v.name,
  241. id: v.id
  242. }
  243. }))
  244. picker.setColumnValues(2, this.area[indexs[0]][0].map(v => {
  245. return {
  246. name: v.name,
  247. id: v.id
  248. }
  249. }))
  250. }
  251. if (columnIndex === 1) {
  252. picker.setColumnValues(2, this.area[indexs[0]][indexs[1]].map(v => {
  253. return {
  254. name: v.name,
  255. id: v.id
  256. }
  257. }))
  258. }
  259. },
  260. //点击显示时间选择器
  261. birthdayBtn() {
  262. this.birthdayShow = true
  263. //new Date(this.endDate).getTime()为你需要在选择器上显示的时间戳
  264. this.$refs.picker.innerValue = new Date(946656000000).getTime()
  265. },
  266. //出生日期选择器
  267. async birthdayConfirm(e) {
  268. const timeFormat = uni.$u.timeFormat;
  269. let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
  270. this.job_intention.changehangye = timeValue;
  271. this.birthdayShow = false
  272. },
  273. //户口地址
  274. cityconfirm(e) {
  275. let a = e.value[0].name + e.value[1].name + e.value[2].name
  276. let ids = String(e.value[0].id) + String(e.value[1].id) + String(e.value[2].id)
  277. this.job_intention.province_id = e.value[1].id
  278. this.job_intention.city_id = e.value[0].id
  279. // this.city1 = e.value.join("")
  280. this.job_intention.city1 = a
  281. this.cityShow = false
  282. },
  283. changehangye() {
  284. uni.navigateTo({
  285. url: "/pagesA/change-hangye1",
  286. events: {
  287. changehangye: (res) => {
  288. this.job_intention.category_one = res[0].id, //行业一级ID
  289. this.job_intention.category_two = res[1].id, //行业二级ID
  290. this.job_intention.category_three = res[1].name //行业名称
  291. }
  292. }
  293. })
  294. },
  295. changehangye1() {
  296. uni.navigateTo({
  297. url: "/pagesA/change-hangye",
  298. events: {
  299. changehangye: (res) => {
  300. res.forEach((item)=>{
  301. this.job_intention.category_industry_name += item.name+" "
  302. })
  303. // this.job_intention.category_industry_first = res[0].id, //行业一级ID
  304. // this.job_intention.category_industry_id = res[1].id, //行业二级ID
  305. }
  306. }
  307. })
  308. },
  309. changeright(){
  310. uni.navigateTo({
  311. url:"/pagesA/change-zhiwei",
  312. events:{
  313. changefenlei:(res)=>{
  314. console.log(res);
  315. this.job_intention.category_job_first = res[0].id //string 职业分类一级ID(求职意向
  316. this.job_intention.category_job_second = res[1].id //string 职业分类二级ID(求职意向
  317. this.job_intention.category_job_id = res[2].id //string 职位分类ID(求职意向
  318. this.job_intention.category_job_first_name = res[0].name //string 职业分类一级名称(求职意向
  319. this.job_intention.category_job_second_name = res[1].name //string 职业分类二级名称(求职意向
  320. this.job_intention.category_job_name = res[2].name
  321. }
  322. }
  323. })
  324. },
  325. changeright1(){
  326. uni.navigateTo({
  327. url:"/pagesA/change-zhiwei",
  328. events:{
  329. changefenlei:(res)=>{
  330. console.log(res);
  331. }
  332. }
  333. })
  334. }
  335. }
  336. }
  337. </script>
  338. <style lang="scss">
  339. .btn {
  340. background: #0C66C2;
  341. border-radius: 16rpx;
  342. font-size: 32rpx;
  343. font-family: PingFangSC-Regular, PingFang SC;
  344. font-weight: 400;
  345. color: #FFFFFF;
  346. width: 310rpx;
  347. height: 84rpx;
  348. line-height: 84rpx;
  349. text-align: center;
  350. margin-top: 24rpx;
  351. }
  352. //个人信息
  353. .personal {
  354. width: 750rpx;
  355. background: #FFFFFF;
  356. border-radius: 28rpx 28rpx 0rpx 0rpx;
  357. margin-top: -40rpx;
  358. position: relative;
  359. z-index: 99;
  360. padding: 40rpx 32rpx 0;
  361. margin-bottom: 60rpx;
  362. box-sizing: border-box;
  363. .title {
  364. font-size: 48rpx;
  365. font-family: PingFangSC-Medium, PingFang SC;
  366. font-weight: 500;
  367. color: #222222;
  368. }
  369. .titleb {
  370. font-size: 26rpx;
  371. font-family: PingFangSC-Regular, PingFang SC;
  372. font-weight: 400;
  373. color: #777777;
  374. margin-top: 20rpx;
  375. }
  376. .body-input {
  377. height: 150rpx;
  378. border-bottom: 2rpx solid #F4F4F4;
  379. .input-title {
  380. font-size: 26rpx;
  381. font-family: PingFangSC-Regular, PingFang SC;
  382. font-weight: 400;
  383. color: #888888;
  384. margin-top: 30rpx;
  385. box-sizing: border-box;
  386. }
  387. .input-style {
  388. font-size: 32rpx;
  389. font-family: PingFangSC-Regular, PingFang SC;
  390. font-weight: 400;
  391. color: #CACACA;
  392. }
  393. }
  394. .button {
  395. width: 686rpx;
  396. height: 88rpx !important;
  397. background: #0C66C2;
  398. border-radius: 12rpx;
  399. font-size: 32rpx;
  400. font-family: PingFangSC-Medium, PingFang SC;
  401. font-weight: 500;
  402. color: #FFFFFF;
  403. line-height: 88rpx;
  404. margin: 54rpx 0 0rpx 0;
  405. display: flex;
  406. justify-content: center;
  407. }
  408. }
  409. </style>