my_study.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="real-name">
  3. <u-form :model="form" ref="uForm" label-width='155'>
  4. <u-form-item label="入学时间">
  5. <picker mode="date" :value="form.admission_time" @change="bindDateChange">
  6. <view class="uni-input">{{form.admission_time}}</view>
  7. </picker>
  8. <!-- <u-input v-model="form.admission_time" placeholder="请输入联系电话" /> -->
  9. </u-form-item>
  10. <u-form-item label="专业">
  11. <u-input v-model="form.major" placeholder="请填写专业" />
  12. </u-form-item>
  13. <u-form-item label="硕士生导师">
  14. <u-input v-model="form.master_teacher_name" placeholder="请填写硕士生导师" />
  15. </u-form-item>
  16. <u-form-item label="硕士生单位">
  17. <u-input v-model="form.master_units" placeholder="请填写硕士生单位" />
  18. </u-form-item>
  19. <u-form-item label="博士生导师">
  20. <u-input v-model="form.doctor_teacher_name" placeholder="请填写博士生导师" />
  21. </u-form-item>
  22. <u-form-item label="博士生单位">
  23. <u-input v-model="form.doctor_units" placeholder="请填写博士生单位" />
  24. </u-form-item>
  25. </u-form>
  26. <button class="buttom" @click="save()">保存</button>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. form: {
  34. },
  35. politicsStatus: [{
  36. value: 0,
  37. label: "未知"
  38. },
  39. {
  40. value: 3,
  41. label: "积极分子"
  42. },
  43. {
  44. value: 4,
  45. label: "中共预备党员"
  46. },
  47. {
  48. value: 5,
  49. label: "中共党员"
  50. },
  51. {
  52. value: 6,
  53. label: "发展对象"
  54. }
  55. ]
  56. }
  57. },
  58. onShow() {
  59. this.form = this.$store.state.vuex_user
  60. },
  61. methods: {
  62. bindDateChange(e){
  63. console.log(e.target.value)
  64. this.form.admission_time= e.target.value
  65. },
  66. save() {
  67. this.$u.post('/page/update-people-info', this.form).then(res => {
  68. console.log(res, 'pppp')
  69. uni.showToast({
  70. title: res.message,
  71. icon: 'none'
  72. })
  73. this.$u.vuex('vuex_user',this.form);
  74. setTimeout(function() {
  75. uni.navigateBack()
  76. }, 1000)
  77. })
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .real-name {
  84. padding: 0 16px;
  85. padding-bottom: 40px;
  86. .buttom {
  87. width: 229px;
  88. height: 56px;
  89. line-height: 56px;
  90. background: #79573D;
  91. text-align: center;
  92. border-radius: 28px;
  93. margin: 0 auto;
  94. margin-top: 50px;
  95. font-size: 18px;
  96. font-family: PingFang SC;
  97. font-weight: bold;
  98. color: #fff;
  99. opacity: 1;
  100. }
  101. }
  102. </style>