招聘网页
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.vue 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <a-row :gutter="[10,10]" type="flex" justify="space-between" v-if="detail">
  3. <a-col span="14">
  4. <a-row :gutter="[10,10]">
  5. <a-col span="24">
  6. <a-row :gutter="[10,20]" type="flex">
  7. <a-col>
  8. <div style="font-size: 20px; font-weight: 600;">{{detail.base.name}}</div>
  9. </a-col>
  10. <a-col>
  11. <div style="font-size: 16px;color: #4FBE70;">{{detail.base.pay_range_text}}</div>
  12. </a-col>
  13. </a-row>
  14. </a-col>
  15. <a-col span="24">
  16. <a-space>
  17. <a-tag>{{detail.require.experience_text ? detail.require.experience_text : '不限'}}</a-tag>
  18. <a-tag>{{detail.require.certification_text ? detail.require.certification_text : '不限'}}</a-tag>
  19. <a-tag>{{detail.require.school_degree_text ? detail.require.school_degree_text : '不限'}}</a-tag>
  20. <a-tag>{{detail.require.profelevel_text ? detail.require.profelevel_text : '不限'}}</a-tag>
  21. </a-space>
  22. </a-col>
  23. </a-row>
  24. </a-col>
  25. <a-col span="10" v-if="role != 'company'">
  26. <a-flex justify="flex-end">
  27. <a-sapce v-if="token">
  28. <a-button v-if="detail.favorited == 0" detail.favorited @click="confirmCollect(detail.id)">
  29. <StarOutlined />
  30. 收藏
  31. </a-button>
  32. <a-button v-if="detail.favorited != 0" type="primary" @click="cancelCollect(detail.favorited)">
  33. <StarOutlined />
  34. 取消收藏
  35. </a-button>
  36. <a-button v-if="detail.applyed == 0" @click="applyJob(detail.id)">
  37. 投简历
  38. </a-button>
  39. </a-sapce>
  40. <a-space v-else>
  41. <a-button type="primary" @click="toLogin">
  42. 立即登录
  43. </a-button>
  44. </a-space>
  45. </a-flex>
  46. </a-col>
  47. </a-row>
  48. <a-spin :spinning="spinning">
  49. <div style="margin-top: 30px;width: 100%;" v-if="detail">
  50. <a-descriptions :column="2" title="职位描述">
  51. <a-descriptions-item label="职位性质">{{detail.company.nature_text}}</a-descriptions-item>
  52. <a-descriptions-item label="招聘人数">{{detail.base.invite_count}}人</a-descriptions-item>
  53. <a-descriptions-item
  54. label="工作地区">{{detail.locations ? detail.locations[0].name : '未知地址'}}</a-descriptions-item>
  55. <a-descriptions-item label="月新范围">{{detail.base.pay_range_text}}</a-descriptions-item>
  56. <a-descriptions-item label="食宿条件">{{detail.base.shisu_text}}</a-descriptions-item>
  57. <a-descriptions-item label="节假日">{{detail.base.holidays_text}}</a-descriptions-item>
  58. <a-descriptions-item label="有效期">{{detail.base.disabled_date}}</a-descriptions-item>
  59. <a-descriptions-item label="有效期至"></a-descriptions-item>
  60. <a-descriptions-item label="联系人">{{detail.contact.contact}}</a-descriptions-item>
  61. <a-descriptions-item
  62. label="职业类别">{{detail.base.types ? detail.base.types[0].name : '未知'}}</a-descriptions-item>
  63. <a-descriptions-item label="联系电话">
  64. <span v-if="detail.contact.mobile_public == 1">{{detail.contact.mobile}}</span>
  65. <span v-else>未公开</span>
  66. </a-descriptions-item>
  67. <a-descriptions-item label="联系固话">
  68. <span v-if="detail.contact.phone_public == 1">{{detail.contact.phone}}</span>
  69. <span v-else>未公开</span>
  70. </a-descriptions-item>
  71. <a-descriptions-item :span="2" label="职业描述">
  72. <div style="white-space: pre-wrap;">
  73. <div class="ql-editor" v-html="detail.base.describe_text"></div>
  74. </div>
  75. </a-descriptions-item>
  76. </a-descriptions>
  77. </div>
  78. <div style="margin-top: 30px;width: 100%;" v-if="detail">
  79. <a-descriptions :column="1" title="地图">
  80. <a-descriptions-item :span="24" label="企业地址">
  81. {{detail.contact.interview_address}}
  82. </a-descriptions-item>
  83. <a-descriptions-item :span="24">
  84. <div style="width: 100%;">
  85. <map-marker v-if="detail.contact.latitude && detail.contact.longitude"
  86. :lat="detail.contact.latitude" :lng="detail.contact.longitude"></map-marker>
  87. </div>
  88. </a-descriptions-item>
  89. </a-descriptions>
  90. </div>
  91. </a-spin>
  92. <a-login></a-login>
  93. </template>
  94. <script setup lang="ts">
  95. import { ref, computed, onMounted, defineProps, watch, createVNode, nextTick } from 'vue';
  96. import { GetJobDetail, GetJobAuthDetail, PostJobseekAddfavorite, PostJobseekDelfavorite, PostJobseekAddapplication } from '@/apis/models';
  97. import MapMarker from '@/components/map/marker.vue'
  98. import { useCommon } from '@/hooks/useCommon';
  99. import { warnToast, successToast } from '@/utils/toastHelper';
  100. let { store, commomParams, dayjs, richOption, ExclamationCircleOutlined, Modal, showOtherModal1 } = useCommon();
  101. let props = defineProps(['id']);
  102. let job_id = ref<Number>(sessionStorage.getItem('job_id') ? sessionStorage.getItem('job_id') : '')
  103. let detail = ref<Object>(null);
  104. let spinning = ref<Boolean>(false)
  105. let token = ref(sessionStorage.getItem('token') ? sessionStorage.getItem('token') : '')
  106. let role = ref(sessionStorage.getItem('role') ? sessionStorage.getItem('role') : '')
  107. onMounted(() => {
  108. getDetail()
  109. })
  110. const getDetail = () => {
  111. spinning.value = true
  112. if (sessionStorage.getItem('token')) {
  113. GetJobAuthDetail({ id: job_id.value }).then(res => {
  114. detail.value = res.data;
  115. spinning.value = false
  116. }).catch(err => {
  117. spinning.value = false
  118. })
  119. } else {
  120. GetJobDetail({ id: job_id.value }).then(res => {
  121. detail.value = res.data;
  122. spinning.value = false
  123. }).catch(err => {
  124. spinning.value = false
  125. })
  126. }
  127. }
  128. const toLogin = () => {
  129. showOtherModal1()
  130. }
  131. const confirmCollect = (job_id : Number) => {
  132. Modal.confirm({
  133. title: `是否要收藏该职位`,
  134. centered: true,
  135. icon: createVNode(ExclamationCircleOutlined),
  136. onOk() {
  137. PostJobseekAddfavorite({ job_id: job_id }).then(res => {
  138. successToast('已收藏')
  139. getDetail();
  140. })
  141. },
  142. onCancel() {
  143. },
  144. });
  145. }
  146. const cancelCollect = (id : Number) => {
  147. Modal.confirm({
  148. title: `是否要取消收藏该职位`,
  149. centered: true,
  150. icon: createVNode(ExclamationCircleOutlined),
  151. onOk() {
  152. PostJobseekDelfavorite({ id: id }).then(res => {
  153. successToast('已取消收藏')
  154. getDetail();
  155. })
  156. },
  157. onCancel() {
  158. },
  159. });
  160. }
  161. const applyJob = (job_id : Number) => {
  162. Modal.confirm({
  163. title: `是否要投递该职位`,
  164. centered: true,
  165. icon: createVNode(ExclamationCircleOutlined),
  166. onOk() {
  167. PostJobseekAddapplication({ job_id: job_id }).then(res => {
  168. successToast('已投递')
  169. getDetail();
  170. })
  171. },
  172. onCancel() {
  173. },
  174. });
  175. }
  176. watch(() => props.id, (newVal) => {
  177. job_id.value = newVal
  178. if (job_id.value) {
  179. spinning.value = true
  180. detail.value = null
  181. getDetail()
  182. }
  183. },{immediate: true})
  184. </script>
  185. <style scoped lang="less">
  186. :deep(.ant-btn) {
  187. border-radius: 0 !important;
  188. }
  189. .map-container {
  190. width: 100%;
  191. height: 600px;
  192. }
  193. </style>