teach.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. <template>
  2. <view class="index-page">
  3. <!-- 顶部 -->
  4. <view class="index-navbar">
  5. <view style="position: relative;height: 392rpx;">
  6. <image class="index-bg" src="@/static/images/bg.png" mode=""></image>
  7. <u-navbar bgColor='rgba(0,0,0,0)' placeholder @leftClick="return1">
  8. </u-navbar>
  9. <view class="header-down " :style="{marginTop:height+'rpx'}"
  10. style="padding: 28rpx 0 0 32rpx;box-sizing: border-box;">
  11. <view class="mingpianfont">
  12. 教育经历
  13. </view>
  14. <view class="explain">
  15. <text>填写教育经历,让简历更加完整</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- 个人信息 -->
  21. <view class="personal">
  22. <view class="body-input u-flex-col u-row-center ">
  23. <text class="input-title">学校名称</text>
  24. <u--input customStyle="padding:0 !important" type="text" placeholder="请填写您的学校名称" border
  25. placeholderClass='input-style' v-model="education_experience.name"></u--input>
  26. </view>
  27. <view class="body-input u-flex-col u-row-center">
  28. <text class="input-title">学历</text>
  29. <view class="" @click="xueli = true">
  30. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  31. placeholder="请选择您的学历" border placeholderClass='input-style' suffixIcon="arrow-right"
  32. suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
  33. v-model="education_name"></u--input>
  34. </view>
  35. </view>
  36. <view class="body-input u-flex-col u-row-center">
  37. <text class="input-title">专业名称</text>
  38. <u--input disabledColor="#fff" customStyle="padding:0 !important" type="text" placeholder="请填写专业名称"
  39. border placeholderClass='input-style' v-model="education_experience.major"></u--input>
  40. </view>
  41. <view class="body-input u-flex-col u-row-center">
  42. <text class="input-title">时间</text>
  43. <view class="u-flex u-row-between">
  44. <view class="" @click="entryShow = true">
  45. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  46. placeholder="上学时间" border placeholderClass='input-style'
  47. v-model="education_experience.start_time"></u--input>
  48. </view>
  49. <view class="">-</view>
  50. <view class="" @click="dimissionShow = true">
  51. <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
  52. placeholder="毕业时间" inputAlign="center" border placeholderClass='input-style'
  53. v-model="education_experience.end_time"></u--input>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="" style="height: 422rpx;"></view>
  58. <view class="button" @click="next">
  59. 下一步
  60. </view>
  61. </view>
  62. <!-- 选择器 -->
  63. <!-- 选择器 -->
  64. <u-datetime-picker title="上学时间" :minDate="minDate1" @confirm="entryConfirm" :show="entryShow" mode="year-month"
  65. @cancel='close()'></u-datetime-picker>
  66. <u-datetime-picker title="毕业时间" :minDate="minDate" @confirm="dimissionConfirm" :show="dimissionShow" mode="year-month"
  67. @cancel='close()'></u-datetime-picker>
  68. <u-picker keyName="name" :show="xueli" @confirm="confirm" :columns="list" @close="close()"></u-picker>
  69. </view>
  70. </template>
  71. <script>
  72. import {
  73. get_education
  74. } from "@/units/inquire.js"
  75. export default {
  76. data() {
  77. return {
  78. minDate: "",
  79. minDate1: "",
  80. list: [
  81. []
  82. ],
  83. dimissionShow: false,
  84. entryShow: false,
  85. xueli: false,
  86. education_name: "", //学历
  87. education_experience: {
  88. name: "", //学校名称
  89. is_recruit: "", //是否统招
  90. education_id: "", //学历id
  91. major: "", //专业名称
  92. start_time: "", //开始时间
  93. end_time: "", //结束时间
  94. }
  95. }
  96. },
  97. onLoad() {
  98. this.minDate = Number(new Date('2000-01-01'));
  99. this.minDate1 = Number(new Date('2000-01-01'));
  100. this.get_education()
  101. if(uni.getStorageSync("education_experience1")){
  102. this.education_experience = uni.getStorageSync("education_experience1")
  103. }
  104. },
  105. methods: {
  106. close() {
  107. this.xueli = false
  108. this.dimissionShow = false
  109. this.entryShow = false
  110. },
  111. confirm(e) {
  112. this.education_experience.education_id = e.value[0].id
  113. this.education_name = e.value[0].name
  114. this.xueli = false
  115. },
  116. get_education() {
  117. get_education().then(res => {
  118. this.list[0] = res.data
  119. console.log(this.list);
  120. })
  121. },
  122. async entryConfirm(e) {
  123. const timeFormat = uni.$u.timeFormat;
  124. console.log(e.value);
  125. let timeValue = await timeFormat(e.value, 'yyyy-mm');
  126. this.education_experience.start_time = timeValue;
  127. this.entryShow = false
  128. },
  129. async dimissionConfirm(e) {
  130. const timeFormat = uni.$u.timeFormat;
  131. let timeValue = await timeFormat(e.value, 'yyyy-mm');
  132. this.education_experience.end_time = timeValue;
  133. this.dimissionShow = false
  134. },
  135. return1() {
  136. uni.navigateBack()
  137. },
  138. next() {
  139. if (!this.education_experience.name) {
  140. this.$u.toast("请填写学校名称")
  141. return
  142. }
  143. if (!this.education_name) {
  144. this.$u.toast("请选择学历")
  145. return
  146. }
  147. if (!this.education_experience.major) {
  148. this.$u.toast("请填写专业名称")
  149. return
  150. }
  151. if (!this.education_experience.start_time) {
  152. this.$u.toast("请选择上学时间")
  153. return
  154. }
  155. if (!this.education_experience.end_time) {
  156. this.$u.toast("请选择毕业时间")
  157. return
  158. }
  159. let pre = "education_experience"
  160. let nObj = Object.keys(this.education_experience).reduce((a, c) => (a[`${pre}.${c}`] = this
  161. .education_experience[c], a), {});
  162. uni.setStorageSync("education_experience", nObj)
  163. uni.setStorageSync("education_experience1", this.education_experience)
  164. uni.navigateTo({
  165. url: '../pagesA/expectation'
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="scss">
  172. page {
  173. background-color: #F3F3F3;
  174. }
  175. .index-page {
  176. overflow: hidden;
  177. height: 100vh;
  178. background: #fff;
  179. .mingpianfont {
  180. height: 50rpx;
  181. font-size: 36rpx;
  182. font-family: PingFangSC-Medium, PingFang SC;
  183. font-weight: 500;
  184. color: #FFFFFF;
  185. line-height: 50rpx;
  186. }
  187. .explain {
  188. margin-top: 24rpx;
  189. width: 528rpx;
  190. height: 36rpx;
  191. font-size: 26rpx;
  192. font-family: PingFangSC-Regular, PingFang SC;
  193. font-weight: 400;
  194. color: #FFFFFF;
  195. line-height: 36rpx;
  196. }
  197. //个人信息
  198. .personal {
  199. width: 750rpx;
  200. background: #FFFFFF;
  201. border-radius: 28rpx 28rpx 0rpx 0rpx;
  202. margin-top: -40rpx;
  203. position: relative;
  204. z-index: 99;
  205. padding: 40rpx 32rpx 0;
  206. box-sizing: border-box;
  207. height: 100%;
  208. .body-input {
  209. height: 170rpx;
  210. border-bottom: 2rpx solid #F4F4F4;
  211. .input-title {
  212. font-size: 26rpx;
  213. font-family: PingFangSC-Regular, PingFang SC;
  214. font-weight: 400;
  215. color: #888888;
  216. margin-bottom: 20rpx;
  217. margin-top: 30rpx;
  218. box-sizing: border-box;
  219. }
  220. .input-style {
  221. font-size: 32rpx;
  222. font-family: PingFangSC-Regular, PingFang SC;
  223. font-weight: 400;
  224. color: #CACACA;
  225. }
  226. }
  227. .button {
  228. width: 686rpx;
  229. height: 88rpx !important;
  230. background: #0C66C2;
  231. border-radius: 12rpx;
  232. font-size: 32rpx;
  233. font-family: PingFangSC-Medium, PingFang SC;
  234. font-weight: 500;
  235. color: #FFFFFF;
  236. line-height: 88rpx;
  237. margin: 10rpx 0 0rpx 0;
  238. display: flex;
  239. justify-content: center;
  240. // position: fixed;
  241. // bottom: 60rpx;
  242. }
  243. }
  244. .index-item {
  245. // width: 702rpx;
  246. // background: #FFFFFF;
  247. // border-radius: 20rpx;
  248. // margin: 20rpx auto;
  249. // padding: 0 20rpx 24rpx 10rpx;
  250. .item-down {
  251. text:first-child {
  252. font-size: 22rpx;
  253. font-family: SFPro-Regular, SFPro;
  254. font-weight: 400;
  255. color: #666666;
  256. }
  257. text:last-child {
  258. font-size: 22rpx;
  259. font-family: PingFangSC-Regular, PingFang SC;
  260. font-weight: 400;
  261. color: #666666;
  262. }
  263. }
  264. .item-gongsi {
  265. margin-bottom: 16rpx;
  266. .text2 {
  267. font-size: 24rpx;
  268. font-family: SFPro-Regular, SFPro;
  269. font-weight: 400;
  270. color: #666666;
  271. }
  272. .logo {
  273. width: 42rpx;
  274. height: 42rpx;
  275. border-radius: 10rpx;
  276. margin-right: 16rpx;
  277. }
  278. .text1 {
  279. max-width: 192rpx;
  280. font-size: 24rpx;
  281. font-family: PingFangSC-Regular, PingFang SC;
  282. font-weight: 400;
  283. color: #444444;
  284. margin-right: 12rpx;
  285. }
  286. }
  287. .item-label {
  288. margin-bottom: 20rpx;
  289. text {
  290. margin-right: 16rpx;
  291. line-height: 46rpx;
  292. background: #F7F7F7;
  293. border-radius: 4rpx;
  294. padding: 0 14rpx;
  295. font-size: 24rpx;
  296. font-family: PingFangSC-Regular, PingFang SC;
  297. font-weight: 400;
  298. color: #5F5F5F;
  299. }
  300. }
  301. .item-top {
  302. height: 88rpx;
  303. .text1 {
  304. font-size: 32rpx;
  305. font-family: PingFangSC-Medium, PingFang SC;
  306. font-weight: 500;
  307. color: #222222;
  308. margin-right: 16rpx;
  309. }
  310. .text2 {
  311. width: 50rpx;
  312. line-height: 32rpx;
  313. background: rgba(255, 83, 53, 0.1);
  314. border-radius: 4rpx;
  315. text-align: center;
  316. font-size: 20rpx;
  317. font-family: PingFangSC-Regular, PingFang SC;
  318. font-weight: 400;
  319. color: #FF5335;
  320. margin-right: 12rpx;
  321. }
  322. .text3 {
  323. width: 90rpx;
  324. line-height: 32rpx;
  325. background: #FFF2E8;
  326. border-radius: 4rpx;
  327. text-align: center;
  328. font-size: 20rpx;
  329. font-family: PingFangSC-Regular, PingFang SC;
  330. font-weight: 400;
  331. color: #FF8620;
  332. margin-right: 12rpx;
  333. }
  334. .text4 {
  335. line-height: 32rpx;
  336. background: #E6EFF8;
  337. border-radius: 4rpx;
  338. padding: 0 4rpx;
  339. text-align: center;
  340. font-size: 20rpx;
  341. font-family: SFPro-Regular, SFPro;
  342. font-weight: 400;
  343. color: #0C66C2;
  344. }
  345. .text5 {
  346. font-size: 32rpx;
  347. font-family: JDZhengHT-Regular, JDZhengHT;
  348. font-weight: 400;
  349. color: #0C66C2;
  350. }
  351. }
  352. }
  353. .index-navbar {
  354. position: sticky;
  355. top: 0;
  356. left: 0;
  357. width: 750rpx;
  358. z-index: 10;
  359. .header-down {
  360. height: 92rpx;
  361. padding: 20rpx 24rpx;
  362. box-sizing: border-box;
  363. .font {
  364. font-size: 40rpx;
  365. font-family: PingFangSC-Medium, PingFang SC;
  366. font-weight: 500;
  367. color: #222222;
  368. }
  369. .right-item {
  370. padding: 0 16rpx;
  371. height: 52rpx;
  372. background: #F3F3F3;
  373. border-radius: 4rpx;
  374. margin-left: 20rpx;
  375. .text {
  376. margin-right: 4rpx;
  377. font-size: 26rpx;
  378. font-family: PingFangSC-Regular, PingFang SC;
  379. font-weight: 400;
  380. color: #666666;
  381. }
  382. }
  383. .down-left {
  384. .text {
  385. margin-right: 4rpx;
  386. font-size: 26rpx;
  387. font-family: PingFangSC-Medium, PingFang SC;
  388. font-weight: 500;
  389. color: #222222;
  390. }
  391. }
  392. }
  393. .index-bg {
  394. position: absolute;
  395. top: 0;
  396. left: 0;
  397. z-index: -1;
  398. width: 750rpx;
  399. height: 392rpx;
  400. }
  401. }
  402. .index-header {
  403. flex: 1;
  404. padding: 0 32rpx;
  405. height: 50rpx;
  406. .index-search {
  407. width: 200rpx;
  408. height: 64rpx;
  409. background: #FFFFFF;
  410. border-radius: 20rpx;
  411. padding: 0 28rpx;
  412. .text1 {
  413. font-size: 24rpx;
  414. font-family: PingFangSC-Regular, PingFang SC;
  415. font-weight: 400;
  416. color: #999999;
  417. margin-left: 16rpx;
  418. }
  419. }
  420. .index-tabs {
  421. text:first-child {
  422. font-size: 36rpx;
  423. font-family: PingFangSC-Medium, PingFang SC;
  424. font-weight: 500;
  425. color: #222222;
  426. }
  427. text:last-child {
  428. width: 76rpx;
  429. height: 12rpx;
  430. background: linear-gradient(270deg, #208EFF 0%, rgba(28, 159, 227, 0) 100%);
  431. margin-top: -20rpx;
  432. border-radius: 100rpx;
  433. }
  434. }
  435. }
  436. }
  437. ::v-deep .u-navbar__content__left {
  438. padding: 0 !important;
  439. }
  440. ::v-deep .u-subsection {
  441. width: 312rpx !important;
  442. }
  443. </style>