jobIntention.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div class="resume-box">
  3. <div class="resume-header mb-3">
  4. <div class="resume-title">{{ $t('resume.jobIntention') }}</div>
  5. <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-plus-box" @click="isEdit = true">{{ $t('common.add') }}</v-btn>
  6. </div>
  7. <div></div>
  8. <div v-if="isEdit">
  9. <CtForm :items="items" style="width: 100%;">
  10. <template #positionId="{ item }">
  11. <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs">
  12. <template v-slot:activator="{ props }">
  13. <textUI
  14. :modelValue="item.value"
  15. :item="item"
  16. @blur="item.blur"
  17. v-bind="props"
  18. style="position: relative;"
  19. ></textUI>
  20. </template>
  21. <jobTypeCard class="jobTypeCardBox" :isCustomer="true" @handleJobClick="handleJobClickItem"></jobTypeCard>
  22. </v-menu>
  23. </template>
  24. <template #industryIdList="{ item }">
  25. <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="false">
  26. <template v-slot:activator="{ props }">
  27. <textUI
  28. v-model="item.value"
  29. :item="item"
  30. @blur="item.blur"
  31. v-bind="props"
  32. style="position: relative;"
  33. ></textUI>
  34. </template>
  35. <industryTypeCard @inputChange="handleIndustry"></industryTypeCard>
  36. </v-menu>
  37. </template>
  38. </CtForm>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup name="jobIntention">
  43. import { ref } from 'vue'
  44. import CtForm from '@/components/CtForm'
  45. import textUI from '@/components/FormUI/TextInput'
  46. import jobTypeCard from '@/components/jobTypeCard'
  47. import industryTypeCard from '@/components/industryTypeCard'
  48. const isEdit = ref(true)
  49. const items = ref({
  50. options: [
  51. {
  52. slotName: 'positionId',
  53. key: 'positionId',
  54. value: '',
  55. col: 6,
  56. label: '期望岗位 *',
  57. flexStyle: 'mr-3',
  58. hideDetails: true,
  59. outlined: true,
  60. rules: [v => !!v || '请选择期望岗位']
  61. },
  62. {
  63. slotName: 'industryIdList',
  64. key: 'industryIdList',
  65. value: '不限',
  66. outlined: true,
  67. label: '期望行业 *',
  68. col: 6,
  69. rules: [v => !!v || '请选择期望行业']
  70. },
  71. {
  72. type: 'number',
  73. key: 'payFrom',
  74. value: null,
  75. placeholder: '期望薪资(最低要求) *',
  76. col: 6,
  77. flexStyle: 'mr-3',
  78. outlined: true,
  79. rules: [v => !!v || '请输入薪资最低要求']
  80. },
  81. {
  82. type: 'number',
  83. key: 'payTo',
  84. value: null,
  85. placeholder: '期望薪资(最高要求) *',
  86. col: 6,
  87. outlined: true,
  88. rules: [v => !!v || '请输入薪资最高要求']
  89. },
  90. {
  91. type: 'autocomplete',
  92. key: 'workAreaId',
  93. value: null,
  94. placeholder: '请选择工作城市 *',
  95. outlined: true,
  96. itemText: 'label',
  97. col: 6,
  98. itemValue: 'value',
  99. flexStyle: 'mr-3',
  100. rules: [v => !!v || '请选择工作城市'],
  101. items: []
  102. },
  103. {
  104. type: 'autocomplete',
  105. key: 'jobType',
  106. value: null,
  107. placeholder: '请选择求职类型 *',
  108. outlined: true,
  109. itemText: 'label',
  110. col: 6,
  111. itemValue: 'value',
  112. rules: [v => !!v || '请选择求职类型'],
  113. items: [
  114. { label: '全职', value: 0 },
  115. { label: '兼职', value: 1 },
  116. { label: '临时', value: 2 },
  117. { label: '实习', value: 3 }
  118. ]
  119. }
  120. ]
  121. })
  122. // 期望职位
  123. const handleJobClickItem = (val) => {
  124. items.value.options.find(e => e.key === 'positionId').value = val.nameCn
  125. }
  126. const handleIndustry = (list) => {
  127. console.log(list, 'industry')
  128. }
  129. </script>
  130. <style scoped lang="scss">
  131. .jobTypeCardBox {
  132. position: absolute;
  133. top: 0;
  134. left: 0;
  135. }
  136. </style>