educationExp.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <div class="resume-box">
  3. <div class="resume-header mb-3">
  4. <div class="resume-title">{{ $t('resume.educationExp') }}</div>
  5. <v-btn variant="text" color="primary" prepend-icon="mdi-plus-box" @click="handle">{{ $t('common.add') }}</v-btn>
  6. </div>
  7. <div></div>
  8. <div
  9. v-for="(item, index) in items" :key="'educationExp' + index"
  10. :class="[' mx-n2', {'mt-5': index }]"
  11. >
  12. <!-- 编辑-表单 -->
  13. <div v-if="item.isEdit" class="educExpItem-edit">
  14. <h4 class="color6 my-3 mx-2"> {{ status ? $t('common.edit') : $t('common.add') }}{{ $t('resume.educationExp') }}</h4>
  15. <CtForm :items="formItems" style="width: 100%;"></CtForm>
  16. </div>
  17. <!-- 展示 -->
  18. <div v-else class="educExpItem">
  19. <div class="level1 d-flex align-center justify-space-between" style="height: 40px;">
  20. <div>
  21. <span style="font-size: 18px; font-weight: bold;">{{ item.university }}</span>
  22. <span class="color6 font15 ml-5">{{ item.timeSlot }}</span>
  23. </div>
  24. <div>
  25. <v-btn variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">{{ $t('common.edit') }}</v-btn>
  26. <v-btn variant="text" color="primary" prepend-icon="mdi-trash-can-outline" @click="isEdit = true">{{ $t('common.delete') }}</v-btn>
  27. </div>
  28. </div>
  29. <div class="level2 my-2">
  30. <span class="color6 font15">{{ item.major }}</span>
  31. <span class="vline" v-if="item.eduType && item.eduType !== 0"></span>
  32. <span class="color6 font15">{{ item.eduType }}</span>
  33. </div>
  34. <div class="level3">
  35. <span class="color6 font15">主修科目:</span>
  36. <span class="color6 font15">{{ item.majors }}</span>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup name="educationExp">
  43. import CtForm from '@/components/CtForm'
  44. import { getYearMonth20YearsAgo, generateYearMonthDataArray } from './../utils/generateYearMonthData'
  45. import { ref } from 'vue'
  46. // const defaultYearMonthValue = (val) => { getYearMonth20YearsAgo(val) }
  47. // const defaultYearMonthValue = (num) => { ref(getYearMonth20YearsAgo(num)) }
  48. // const a = getYearMonth20YearsAgo(30)
  49. // console.log('1', a)
  50. // debugger
  51. const yearMonth = ref(generateYearMonthDataArray())
  52. const isEdit = ref(true)
  53. const formItems = ref({
  54. options: [
  55. {
  56. type: 'autocomplete',
  57. key: 'birth',
  58. value: null,
  59. default: null,
  60. label: '学校名称 *',
  61. col: 6,
  62. outlined: true,
  63. itemText: 'label',
  64. itemValue: 'value',
  65. rules: [v => !!v || '请选择学校名称'],
  66. items: [{ label: '广州大学', value: '01111'}]
  67. },
  68. {
  69. type: 'text',
  70. key: 'email',
  71. value: null,
  72. default: null,
  73. label: '所学专业 *',
  74. col: 6,
  75. outlined: true,
  76. rules: [v => !!v || '请输入所学专业']
  77. },
  78. {
  79. type: 'autocomplete',
  80. key: 'edu',
  81. value: '4',
  82. default: null,
  83. label: '最高学历 *',
  84. col: 6,
  85. outlined: true,
  86. itemText: 'label',
  87. itemValue: 'value',
  88. rules: [v => !!v || '请选择最高学历'],
  89. items: [
  90. {
  91. id: 1552,
  92. label: "初中及以下",
  93. value: "0"
  94. },
  95. {
  96. id: 1553,
  97. label: "中专/中技",
  98. value: "1"
  99. },
  100. {
  101. id: 1554,
  102. label: "高中",
  103. value: "2"
  104. },
  105. {
  106. id: 1555,
  107. label: "大专",
  108. value: "3"
  109. },
  110. {
  111. id: 1556,
  112. label: "本科",
  113. value: "4"
  114. },
  115. {
  116. id: 1557,
  117. label: "硕士",
  118. value: "5"
  119. },
  120. {
  121. id: 1558,
  122. label: "博士",
  123. value: "6"
  124. },
  125. {
  126. id: 1559,
  127. label: "其他",
  128. value: "99"
  129. }
  130. ]
  131. },
  132. { col: 6, },
  133. {
  134. type: 'autocomplete',
  135. key: 'eduStart',
  136. value: getYearMonth20YearsAgo(20),
  137. default: null,
  138. label: '起始时间 *',
  139. col: 6,
  140. outlined: true,
  141. itemText: 'label',
  142. itemValue: 'value',
  143. rules: [v => !!v || '请选择起始时间'],
  144. items: yearMonth
  145. },
  146. {
  147. type: 'autocomplete',
  148. key: 'eduEnd',
  149. value: getYearMonth20YearsAgo(20-4),
  150. default: null,
  151. label: '结束时间 *',
  152. col: 6,
  153. outlined: true,
  154. itemText: 'label',
  155. itemValue: 'value',
  156. rules: [v => !!v || '请选择结束时间'],
  157. items: yearMonth
  158. },
  159. {
  160. type: 'text',
  161. key: 'email',
  162. value: null,
  163. default: null,
  164. label: '所学专业 *',
  165. col: 12,
  166. outlined: true,
  167. rules: [v => !!v || '请输入所学专业']
  168. },
  169. ]
  170. })
  171. const items = ref([
  172. {
  173. isEdit: true,
  174. university: '同济大学',
  175. timeSlot: '2017/9-2021/7',
  176. major: '酒店管理',
  177. eduType: '硕士',
  178. majors: '现代酒店管理、酒店心理、旅游学概论、前厅客房服务与管理、餐饮服务与管理、酒店英语、现代酒店营销、酒店财务管理、会议服务与管理、康乐服务与管理、酒店实用英语。',
  179. },
  180. {
  181. university: '广州大学',
  182. timeSlot: '2017/9-2021/7',
  183. major: '软件工程',
  184. eduType: '本科',
  185. majors: '​程序设计基础、面向对象程序设计、软件工程导论、离散结构、数据结构与算法、工程经济学、团队激励与沟通、软件工程职业实践、计算机系统基础、操作系统、数据库概论、网络及其计算、人机交互的软件工程方法、软件工程综合实践、软件构造、软件设计与体系结构、软件质量保证与测试等。',
  186. },
  187. ])
  188. // const items = ref({
  189. // options: []
  190. // })
  191. // 期望职位
  192. // const handleJobClickItem = (val) => {
  193. // items.value.options.find(e => e.key === 'positionId').value = val.nameCn
  194. // }
  195. // const handleIndustry = (list) => {
  196. // console.log(list, 'industry')
  197. // }
  198. const status = ref(0)
  199. const handle = (item) => {
  200. status.value = item ? 1 : 0
  201. }
  202. </script>
  203. <style scoped lang="scss">
  204. .font15 { font-size: 15px;; }
  205. .color9 { color: #999; }
  206. .color6 { color: #666666; }
  207. .educExpItem {
  208. cursor: pointer;
  209. border-radius: 6px;
  210. padding: 2px 10px 8px;
  211. &:hover {
  212. background-color: #f8f8f8;
  213. }
  214. }
  215. .educExpItem-edit {
  216. border-radius: 6px;
  217. padding: 2px 10px 8px;
  218. background-color: #f8f8f8;
  219. }
  220. </style>