step2.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <template>
  2. <view>
  3. <u-navbar :background="background" :border-bottom="false"></u-navbar>
  4. <view class="jpLogin">
  5. <view class="jpLogin-title">
  6. <h2>完善个人信息<span>2</span>/4</h2>
  7. <p>完善资料,才能给您精准匹配对象哦~</p>
  8. </view>
  9. <view class="jpLogin-main">
  10. <u-form :model="form" ref="uForm">
  11. <view class="jpLogin-input">
  12. <u-form-item required="true"><u-input v-model="form.address" type="select" placeholder="我的出生地" @click="birthdayAddressChange" />
  13. </u-form-item>
  14. </view>
  15. <view class="jpLogin-input">
  16. <u-form-item required="true"><u-input v-model="form.registered_residence" type="select" placeholder="我的的户口所在地" @click="registeredResidenceAddressChange" /></u-form-item>
  17. </view>
  18. <view class="jpLogin-input">
  19. <u-form-item required="true"><u-input v-model="form.work_address" type="select" placeholder="我的工作所在地" @click="workAddressChange" /></u-form-item>
  20. </view>
  21. <view class="jpLogin-input" style="margin-top: 38px;">
  22. <u-form-item required="true"><u-input v-model="form.education" type="select" placeholder="我的学历" @click="show_education = true"/></u-form-item>
  23. <u-select v-model="show_education" mode="single-column" :list="education_ranges_by_names" @confirm="educationConfirm"></u-select>
  24. </view>
  25. <view class="jpLogin-input">
  26. <u-form-item required="true"><u-input v-model="form.profession" type="select" placeholder="我的行业" @click="show_profession = true"/></u-form-item>
  27. <u-select v-model="show_profession" mode="single-column" :list="profession_ranges_by_names" @confirm="professionConfirm"></u-select>
  28. </view>
  29. <view class="jpLogin-input">
  30. <u-form-item required="true"><u-input v-model="form.work_corporation" placeholder="我的工作单位"/></u-form-item>
  31. <u-icon custom-prefix="custom-icon" name="information-line" class="jpLogin-warn"></u-icon>
  32. </view>
  33. <view class="jpLogin-input">
  34. <u-form-item required="true"><u-input v-model="form.work_post" placeholder="我的岗位"/></u-form-item>
  35. </view>
  36. <view class="jpLogin-input" style="margin-top: 38px;">
  37. <u-form-item><u-input v-model="form.salary_range" type="select" placeholder="我的月薪范围" @click="show_salary = true"/></u-form-item>
  38. <u-select v-model="show_salary" mode="single-column" :list="salary_ranges_by_names" @confirm="salaryConfirm"></u-select>
  39. </view>
  40. <view class="jpLogin-input">
  41. <u-form-item><u-input v-model="form.house_status" type="select" placeholder="我的住房情况" @click="show_house = true"/></u-form-item>
  42. <u-select v-model="show_house" mode="single-column" :list="house_statuses_by_names" @confirm="houseConfirm"></u-select>
  43. </view>
  44. <view class="jpLogin-input">
  45. <u-form-item required="true"><u-input v-model="form.marriage_status" type="select" placeholder="我的婚姻状况" @click="show_marriage = true"/></u-form-item>
  46. <u-select v-model="show_marriage" mode="single-column" :list="marriage_statuses_by_names" @confirm="marriageConfirm"></u-select>
  47. </view>
  48. <view class="jpLogin-input">
  49. <u-form-item required="true"><u-input v-model="form.children_status" type="select" placeholder="我的子女状况" @click="show_children = true"/></u-form-item>
  50. <u-select v-model="show_children" mode="single-column" :list="children_statuses_by_names" @confirm="childrenConfirm"></u-select>
  51. </view>
  52. <view class="form-tit" style="margin-top: 36px;">
  53. 自我评价
  54. </view>
  55. <view class="jpLogin-textarea">
  56. <u-form-item>
  57. <u-input v-model="form.self_assess" type="textarea" placeholder="" />
  58. </u-form-item>
  59. </view>
  60. <view class="form-tit" style="margin-top: 36px;">
  61. 选中我的兴趣爱好(可多选)
  62. </view>
  63. <view class="jpLogin-interest">
  64. <view class="interest-item active">摄影</view>
  65. <view class="interest-item">烹饪</view>
  66. <view class="interest-item">健身</view>
  67. <view class="interest-item active">看电影</view>
  68. <view class="interest-item">旅行</view>
  69. <view class="interest-item">打游戏</view>
  70. <view class="interest-item">修身养性</view>
  71. <view class="interest-item">摄影</view>
  72. <view class="interest-item">烹饪</view>
  73. <view class="interest-item">健身</view>
  74. <view class="interest-item">看电影</view>
  75. <view class="interest-item">旅行</view>
  76. <view class="interest-item">打游戏</view>
  77. <view class="interest-item">修身养性</view>
  78. </view>
  79. </u-form>
  80. </view>
  81. <view style="margin-top: 60px;">
  82. <u-button type="error" shape="circle" :custom-style="customStyle" @click="next">下一步</u-button>
  83. <view class="step-btn" @click="previous">返回上一步</view>
  84. </view>
  85. </view>
  86. <mpvue-city-picker themeColor="#007AFF" ref="mpvuebirtydayCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onBirthdayCityConfirm"></mpvue-city-picker>
  87. <mpvue-city-picker themeColor="#007AFF" ref="mpvueRegisteredResidenceCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onResidenceRegisteredCityConfirm"></mpvue-city-picker>
  88. <mpvue-city-picker themeColor="#007AFF" ref="mpvueWorkCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onWorkCityConfirm"></mpvue-city-picker>
  89. </view>
  90. </template>
  91. <script>
  92. import mpvueCityPicker from "../../components/mpvue-citypicker/mpvueCityPicker.vue";
  93. let _self;
  94. export default {
  95. components:{
  96. mpvueCityPicker
  97. },
  98. data() {
  99. return {
  100. personal_info:{},
  101. form: {
  102. address:'',
  103. registered_residence:'',
  104. work_address:'',
  105. work_corporation:'',
  106. work_post:'',
  107. education:'',
  108. profession:'',
  109. salary_range:'',
  110. house_status:'',
  111. marriage_status:'',
  112. children_status:'',
  113. self_assess:'',
  114. },
  115. salary_ranges:['2000元以下','2000-5000元','5000-10000元','10000-20000元','20000-50000元','50000元以上'],
  116. education_ranges:['高中中专及以下','大专','本科','双学士','硕士','博士'],
  117. profession_ragnes:['在校学生','人力资源/行政/后勤','高级管理','生产/加工/制造','质控/安检','工程机械','技工','财会/审计/统计','金融/证券/投资/保险','房地产/装修/物业','仓储/物流','计算机/互联网/IT','普通劳动力/家政服务','普通服务行业','航空服务业','教育/培训','咨询/顾问','学术/科研','法律','设计/创意','文学/传媒/影视','餐饮/旅游','电子/半导体/仪表仪器','化工','能源/地质勘察','医疗/护理','保健/美容','生物/制药/医疗器械','体育工作者','翻译','公务员/国家干部','私营业主','农/林/牧/渔业','通信技术','自由职业者','其他'],
  118. marriage_statuses:['未婚','离异','丧偶'],
  119. house_statuses:['已购住房','与人合租','独自租房','与父母同住','住亲朋家','住单位房','需要时购房'],
  120. corportation_types:['世界500强','上市公司','国有企业','私营企业','自有公司'],
  121. children_statuses:['没有孩子','有孩子跟着自己','有孩子跟着对方','有孩子但已独立'],
  122. value:'0',
  123. customStyle: {
  124. background: '#FF5E5E'
  125. },
  126. salary_ranges_by_names:[],
  127. education_ranges_by_names:[],
  128. profession_ranges_by_names:[],
  129. marriage_statuses_by_names:[],
  130. house_statuses_by_names:[],
  131. corportation_types_by_names:[],
  132. children_statuses_by_names:[],
  133. show_salary:false,
  134. show_profession:false,
  135. show_education:false,
  136. show_house:false,
  137. show_marriage:false,
  138. show_children:false,
  139. background:{
  140. background: 'none'
  141. }
  142. }
  143. },
  144. onLoad(){
  145. _self = this;
  146. for(let i = 0;i< _self.salary_ranges.length;i++)
  147. {
  148. let salary_range = {value:i, label: _self.salary_ranges[i]};
  149. _self.salary_ranges_by_names.push(salary_range);
  150. }
  151. for(let i = 0;i< _self.education_ranges.length;i++)
  152. {
  153. let education_range = {value:i, label: _self.education_ranges[i]};
  154. _self.education_ranges_by_names.push(education_range);
  155. }
  156. for(let i = 0;i< _self.profession_ragnes.length;i++)
  157. {
  158. let profession_range = {value:i, label: _self.profession_ragnes[i]};
  159. _self.profession_ranges_by_names.push(profession_range);
  160. }
  161. for(let i = 0;i< _self.marriage_statuses.length;i++)
  162. {
  163. let marriage_range = {value:i, label: _self.marriage_statuses[i]};
  164. _self.marriage_statuses_by_names.push(marriage_range);
  165. }
  166. for(let i = 0;i< _self.house_statuses.length;i++)
  167. {
  168. let house_range = {value:i, label: _self.house_statuses[i]};
  169. _self.house_statuses_by_names.push(house_range);
  170. }
  171. for(let i = 0;i< _self.corportation_types.length;i++)
  172. {
  173. let corportation_range = {value:i, label: _self.corportation_types[i]};
  174. _self.corportation_types_by_names.push(corportation_range);
  175. }
  176. for(let i = 0;i< _self.children_statuses.length;i++)
  177. {
  178. let children_range = {value:i, label: _self.children_statuses[i]};
  179. _self.children_statuses_by_names.push(children_range);
  180. }
  181. _self.get_options();
  182. },
  183. onReady(){
  184. _self.get_options();
  185. },
  186. methods:{
  187. get_options(){
  188. console.log('get options')
  189. // #ifdef APP-NVUE
  190. const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
  191. // #endif
  192. // #ifndef APP-NVUE
  193. const eventChannel = this.getOpenerEventChannel();
  194. // #endif
  195. eventChannel.on('acceptDataFromOpenerPage', function(data) {
  196. _self.personal_info = data;
  197. console.log('options'+JSON.stringify(data))
  198. });
  199. },
  200. childrenConfirm(e){
  201. console.log('e'+JSON.stringify(e))
  202. this.form.children_status = '';
  203. e.map((val, index) => {
  204. // this.result += this.result == '' ? val.label : '-' + val.label;
  205. let result = val.label
  206. this.form.children_status += result;
  207. })
  208. },
  209. marriageConfirm(e){
  210. console.log('e'+JSON.stringify(e))
  211. this.form.marriage_status = '';
  212. e.map((val, index) => {
  213. // this.result += this.result == '' ? val.label : '-' + val.label;
  214. let result = val.label
  215. this.form.marriage_status += result;
  216. })
  217. },
  218. houseConfirm(e){
  219. console.log('e'+JSON.stringify(e))
  220. this.form.house_status = '';
  221. e.map((val, index) => {
  222. // this.result += this.result == '' ? val.label : '-' + val.label;
  223. let result = val.label
  224. this.form.house_status += result;
  225. })
  226. },
  227. educationConfirm(e){
  228. console.log('e'+JSON.stringify(e))
  229. this.form.education = '';
  230. e.map((val, index) => {
  231. // this.result += this.result == '' ? val.label : '-' + val.label;
  232. let result = val.label
  233. this.form.education += result;
  234. })
  235. },
  236. professionConfirm(e){
  237. console.log('e'+JSON.stringify(e))
  238. this.form.profession = '';
  239. e.map((val, index) => {
  240. // this.result += this.result == '' ? val.label : '-' + val.label;
  241. let result = val.label
  242. this.form.profession += result;
  243. })
  244. },
  245. salaryConfirm(e){
  246. console.log('e'+JSON.stringify(e))
  247. this.form.salary_range = '';
  248. e.map((val, index) => {
  249. // this.result += this.result == '' ? val.label : '-' + val.label;
  250. let result = val.label
  251. this.form.salary_range += result;
  252. })
  253. },
  254. previous(){
  255. uni.navigateBack({
  256. deta:1
  257. })
  258. },
  259. next(){
  260. _self.personal_info.step2= _self.form;
  261. uni.navigateTo({
  262. url:'./step3',
  263. success:function(res){
  264. res.eventChannel.emit('acceptDataFromOpenerPage', _self.personal_info);
  265. console.log('send options'+JSON.stringify(_self.personal_info));
  266. }
  267. })
  268. },
  269. onBirthdayCityConfirm(e) {
  270. _self.form.address = e.label;
  271. console.log('地址选择'+_self.address)
  272. },
  273. onResidenceRegisteredCityConfirm(e) {
  274. _self.form.registered_residence = e.label;
  275. console.log('地址选择'+_self.registered_residence)
  276. },
  277. onWorkCityConfirm(e) {
  278. _self.form.work_address = e.label;
  279. console.log('地址选择'+_self.work_address)
  280. },
  281. birthdayAddressChange(){
  282. this.$refs.mpvuebirtydayCityPicker.show()
  283. },
  284. registeredResidenceAddressChange(){
  285. this.$refs.mpvueRegisteredResidenceCityPicker.show()
  286. },
  287. workAddressChange(){
  288. this.$refs.mpvueWorkCityPicker.show()
  289. }
  290. }
  291. }
  292. </script>
  293. <style lang="scss" scoped>
  294. .jpLogin-interest{
  295. display: flex;
  296. flex-wrap: wrap;
  297. .interest-item{
  298. padding: 4px 10px;
  299. background-color: #E5E7EA;
  300. border-radius: 4px;
  301. margin-right: 10px;
  302. margin-bottom: 10px;
  303. }
  304. .active{
  305. background-color: #FFC1BC;
  306. }
  307. }
  308. .form-tit{
  309. color: #999;
  310. margin-bottom: 8px;
  311. }
  312. .jpLogin-textarea{
  313. background: #fff;
  314. border-radius: 12px;
  315. border: 1px #EEDCDC solid;
  316. padding:0 15px;
  317. }
  318. .jpLogin {
  319. background: url(/static/img/loginBg.png) top center no-repeat;
  320. background-size: 100%;
  321. min-height: 100vh;
  322. padding: 50px;
  323. margin-top: -44px;
  324. }
  325. .step-btn{
  326. text-align: center;
  327. margin-top: 20px;
  328. color: #444953 ;
  329. }
  330. .jpLogin-title {
  331. h2 {
  332. font-size: 24px;
  333. font-weight: normal;
  334. }
  335. span{
  336. color: #FF5E5E;
  337. margin-left: 5px;
  338. }
  339. p {
  340. color: #777;
  341. font-size: 14px;
  342. margin-top: 3px;
  343. }
  344. }
  345. .jpLogin-main {
  346. margin-top: 40px;
  347. }
  348. .jpLogin-input {
  349. height: 48px;
  350. background-color: #fff;
  351. border: 1px solid #EEDCDC;
  352. border-radius: 50px;
  353. display: flex;
  354. width: 100%;
  355. padding: 0 20px;
  356. margin-bottom: 20px;
  357. position: relative;
  358. .u-form-item{
  359. flex: 1;
  360. }
  361. .jpLogin-icon{
  362. font-size: 20px;
  363. color:#FFC1C1;
  364. margin-right: 20px;
  365. position: relative;
  366. &:after{
  367. content: '';
  368. width: 1px;
  369. height: 16px;
  370. background-color:#E6D6D6;
  371. position: absolute;
  372. right: -10px;
  373. top: 15px;
  374. }
  375. }
  376. .jpLogin-warn{
  377. position: absolute;
  378. right: 20px;
  379. top: 14px;
  380. font-size: 20px;
  381. color: #FFC1C1;
  382. }
  383. }
  384. .jpLogin-link {
  385. display: flex;
  386. justify-content: space-between;
  387. align-items: center;
  388. font-size: 14px;
  389. .jpLogin-link-l {
  390. display: flex;
  391. align-items: center;
  392. p {
  393. color: #4f4646;
  394. }
  395. }
  396. span {
  397. color: #1677FF;
  398. }
  399. }
  400. .jpLogin-radio{
  401. margin-top: 16px;
  402. text-align: center;
  403. p{
  404. font-size: 14px;
  405. color: #a0a4b8;
  406. }
  407. span{
  408. color:#ff5e5e;
  409. font-size: 14px;
  410. }
  411. }
  412. </style>