experience_rz.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <div class="info" id="workexp" >
  3. <div v-if="experience.length > 0" style="border-bottom: 1px solid #ebeef5;">
  4. <template v-for="(item, idx) in experience">
  5. <div style="display: flex;justify-content: space-between;justify-items: center;align-items: center">
  6. <div :key="item.id" class="show">
  7. <h4>
  8. <span>{{`${item.start_time} - ${item.end_time || '至今'} ${item.company} ${item.title}`}}</span>
  9. </h4>
  10. <p class="desc">{{item.description}}</p>
  11. </div>
  12. <div style="margin-left: 10px">
  13. <el-button v-if="item.status==0 || item.status==3" type="primary" @click="rz(item)" size="small">立即认证</el-button>
  14. <el-button v-if="item.status==1" type="warning" size="small">审核中</el-button>
  15. <el-button v-if="item.status==2" type="info" size="small">已认证</el-button>
  16. </div>
  17. </div>
  18. </template>
  19. </div>
  20. <div v-else class="empty">
  21. <p style="font-size: 20px">
  22. 还没有工作经历,<a @click="sign" style="font-size: 22px;cursor: pointer" type="text">添加工作经历</a>
  23. </p>
  24. </div>
  25. <el-drawer
  26. v-if="drawer.drawer"
  27. title="提交证明"
  28. :wrapperClosable="false"
  29. :size="drawer.size"
  30. :visible.sync="drawer.drawer"
  31. :direction="drawer.direction"
  32. :before-close="handleClose">
  33. <experience_rz_add :back="this" style="padding: 20px"></experience_rz_add>
  34. </el-drawer>
  35. </div>
  36. </template>
  37. <script>
  38. import { mapState } from "vuex";
  39. import experience_rz_add from "./experience_rz_add";
  40. export default {
  41. data() {
  42. return {
  43. experience: [],
  44. drawer:{
  45. drawer: false,
  46. direction: 'btt',
  47. size:"700px",
  48. row:{},
  49. },
  50. };
  51. },
  52. components: {
  53. experience_rz_add
  54. },
  55. computed: {
  56. ...mapState(["userinfo","deviceType"])
  57. },
  58. watch: {},
  59. async mounted() {
  60. this.getData();
  61. },
  62. methods: {
  63. async getData() {
  64. this.drawer.drawer=false;
  65. const res = await this.$axios.$post("/api/user_experience/get_my_list_rz");
  66. const data = res.data || [];
  67. const experience = data.map((it, index) => {
  68. return {
  69. ...it,
  70. date: [it.start_time, it.end_time]
  71. };
  72. });
  73. this.experience = experience;
  74. },
  75. rz(row)
  76. {
  77. this.drawer.row=row;
  78. if(window.innerWidth<800)
  79. {
  80. this.drawer.direction="btt";
  81. this.drawer.size="90%";
  82. }
  83. else
  84. {
  85. this.drawer.direction="rtl";
  86. this.drawer.size="700px";
  87. }
  88. this.drawer.drawer=true;
  89. },
  90. sign(){
  91. if (this.deviceType.ios || this.deviceType.android) {
  92. window.location.href = "proginn://my_resume";
  93. }
  94. else
  95. {
  96. window.location.href = "/sign/new";
  97. }
  98. }
  99. }
  100. };
  101. </script>
  102. <style lang="scss" scoped>
  103. .info {
  104. header .el-icon-plus {
  105. font-size: 18px;
  106. }
  107. .show {
  108. word-break: break-all;
  109. .desc{
  110. text-overflow: ellipsis;
  111. display: -webkit-box;
  112. -webkit-line-clamp: 2;
  113. -webkit-box-orient: vertical;
  114. overflow: hidden;
  115. margin-bottom: 15px;
  116. }
  117. &:last-of-type {
  118. border: 0;
  119. }
  120. h4 {
  121. position: relative;
  122. display: flex;
  123. justify-content: flex-start;
  124. align-items: center;
  125. height: 44px;
  126. font-size: 14px;
  127. font-family: PingFangSC-Medium;
  128. font-weight: 500;
  129. color: #308eff;
  130. line-height: 44px;
  131. span {
  132. margin-right: 20px;
  133. }
  134. button {
  135. position: absolute;
  136. right: 0;
  137. }
  138. }
  139. p {
  140. margin-top: 8px;
  141. font-size: 14px;
  142. font-family: PingFangSC-Regular;
  143. font-weight: 400;
  144. color: rgba(102, 102, 102, 1);
  145. line-height: 24px;
  146. }
  147. }
  148. .empty {
  149. margin: 112px auto 104px;
  150. font-size: 27px;
  151. font-family: PingFangSC-Regular;
  152. font-weight: 400;
  153. text-align: center;
  154. color: rgba(205, 205, 205, 1);
  155. line-height: 38px;
  156. }
  157. }
  158. @media screen and (min-width: 960px) {
  159. }
  160. </style>