project.vue 13 KB

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