招聘网页
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <a-tabs v-model:activeKey="activeKey">
  3. <a-tab-pane key="1" tab="职位信息">
  4. <position-info :job_detail="jobDetail" @saveSuccess="saveSuccessInfo"></position-info>
  5. </a-tab-pane>
  6. <a-tab-pane key="2" tab="职位要求" force-render>
  7. <position-demand :job_detail="jobDetail" @saveSuccess="saveSuccessDemand"></position-demand>
  8. </a-tab-pane>
  9. <a-tab-pane key="3" tab="联系方式">
  10. <position-contact :job_detail="jobDetail" @saveSuccess="saveSuccessContact"></position-contact>
  11. </a-tab-pane>
  12. </a-tabs>
  13. </template>
  14. <script setup lang="ts">
  15. import { ref, onMounted, watch, defineProps, defineEmits } from 'vue';
  16. import PositionInfo from '@/components/invite/position/info.vue'
  17. import PositionDemand from '@/components/invite/position/demand.vue'
  18. import PositionContact from '@/components/invite/position/contact.vue'
  19. import { GetCompanyJobInfo } from '@/apis/models';
  20. const props = defineProps(['job_id']);
  21. const emit = defineEmits();
  22. const jobDetail = ref<object>(null);
  23. watch(() => [props.job_id], (newVal : string[], oldVal) => {
  24. if(newVal[0]) {
  25. GetCompanyJobInfo({id: newVal[0]}).then(res => {
  26. jobDetail.value = res.data
  27. })
  28. }
  29. }, { immediate: true })
  30. const activeKey = ref<String>('1');
  31. const saveSuccessInfo = (data) => {
  32. activeKey.value = data.key;
  33. }
  34. const saveSuccessDemand = (data) => {
  35. activeKey.value = data.key;
  36. }
  37. const saveSuccessContact = () => {
  38. emit('currentMenuKey', {key : 2})
  39. }
  40. </script>
  41. <style scoped lang="less">
  42. </style>