joiningEnterprise.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <div class="pt-5">
  3. <v-card class="default-width pa-5">
  4. <!-- 标题 -->
  5. <div class="resume-header">
  6. <div class="resume-title">{{ $t('enterprise.joiningEnterprise') }}</div>
  7. </div>
  8. <!-- 表单 -->
  9. <div class="CtFormClass" style="width: 600px;">
  10. <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;"></CtForm>
  11. </div>
  12. <div class="text-center">
  13. <!-- 完成 -->
  14. <v-btn
  15. :loading="loginLoading"
  16. color="primary" class="white--text mt-8" min-width="350"
  17. @click="handleCommit"
  18. >
  19. {{ $t('common.complete') }}
  20. </v-btn>
  21. </div>
  22. <!-- 底部 -->
  23. <div class="text-center mt-5">
  24. <v-btn color="primary" variant="text" @click="router.push({ path: '/recruit/enterprise/register' })">{{ $t('enterprise.registeringNewEnterprise') }}</v-btn>
  25. </div>
  26. </v-card>
  27. </div>
  28. </template>
  29. <script setup>
  30. import CtForm from '@/components/CtForm'
  31. import { enterpriseSearchByName } from '@/api/recruit/personal/resume'
  32. import { useRouter } from 'vue-router'
  33. import Snackbar from '@/plugins/snackbar'
  34. import { useI18n } from '@/hooks/web/useI18n'
  35. import { ref } from 'vue'
  36. defineOptions({name: 'enterprise-enterpriseRegister-joiningEnterprise'})
  37. const router = useRouter()
  38. const loginLoading = ref(false)
  39. const { t } = useI18n()
  40. // 企业名称下拉列表
  41. const getSchoolListData = async (name) => {
  42. const item = formItems.value.options.find(e => e.key === 'enterpriseId')
  43. if (!item) return
  44. const data = await enterpriseSearchByName({ name })
  45. item.items = data
  46. }
  47. const formItems = ref({
  48. options: [
  49. {
  50. type: 'autocomplete',
  51. key: 'enterpriseId',
  52. value: null,
  53. default: null,
  54. label: '企业名称 *',
  55. outlined: true,
  56. clearable: true,
  57. itemText: 'value',
  58. itemValue: 'key',
  59. rules: [v => !!v || '请选择企业名称'],
  60. search: getSchoolListData,
  61. items: []
  62. },
  63. {
  64. type: 'text',
  65. key: 'email',
  66. value: '',
  67. label: '职务 *',
  68. rules: [v => !!v || '请输入职务']
  69. },
  70. {
  71. type: 'text',
  72. key: 'name',
  73. value: '',
  74. label: '姓名 *',
  75. counter: 15,
  76. rules: [v => !!v || '请输入姓名']
  77. },
  78. ]
  79. })
  80. // 提交
  81. const handleCommit = () => {
  82. Snackbar.success(t('common.submittedSuccessfully'))
  83. setTimeout(() => {
  84. router.push({ path: '/recruit/enterprise' })
  85. }, 3000);
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .CtFormClass {
  90. margin: 0 auto;
  91. }
  92. .note {
  93. color: var(--color-666);
  94. font-size: 14px;
  95. line-height: 32px;
  96. }
  97. .file-input-box {
  98. position: relative;
  99. height: 80px;
  100. width: 100px;
  101. border: 1px solid rgb(188, 188, 188);
  102. border-radius: 5px;
  103. cursor: pointer;
  104. .icon {
  105. position: absolute;
  106. top: 45%;
  107. left: 50%;
  108. transform: translate(-50%, -50%);
  109. color: var(--color-999);
  110. }
  111. }
  112. </style>