details.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <div class="default-width banner px-6">
  3. <div class="banner-title" v-if="Object.keys(info).length">
  4. <div class="float-left d-flex align-center">
  5. <v-img width="60" height="60" src="https://img.bosszhipin.com/beijin/upload/com/workfeel/20230717/7bf6f160950405e9fc11e7a96d11653d52ec81818272dd47f295e2d75f5f151de5ea2c19108052a3.png"></v-img>
  6. <div class="ml-4">
  7. <div class="contact-name">
  8. {{ info.enterprise.name }}
  9. <v-icon color="primary" size="24">mdi-shield-check</v-icon>
  10. </div>
  11. <div class="contact-info">{{ info.business.type }} · 100-499人 · 科技推广与应用服务业</div>
  12. </div>
  13. </div>
  14. <div class="float-right d-flex">
  15. <div class="tools-box text-center">
  16. <div class="tools-box-number">{{ info.jobAdvertisedCount }}</div>
  17. <div class="tools-box-text">职位在招</div>
  18. </div>
  19. <v-icon class="ml-5 mr-2" size="25" :color="info.attention ? 'primary' : ''">{{ info.attention ? 'mdi-heart' : 'mdi-heart-outline' }}</v-icon>
  20. <v-icon size="25">mdi-alert-outline</v-icon>
  21. </div>
  22. </div>
  23. <v-divider></v-divider>
  24. <div class="mt-3">
  25. <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f3f3f3">
  26. <v-tab :value="1">公司简介</v-tab>
  27. <v-tab :value="2">在招职位({{ info.jobAdvertisedCount }})</v-tab>
  28. </v-tabs>
  29. <div class="d-flex" v-if="Object.keys(info).length">
  30. <div class="content-left">
  31. <EnterpriseIntroduction v-if="tab === 1" :info="info" />
  32. <recruitmentPositions v-else />
  33. </div>
  34. <div class="content-right">
  35. <div class="welfare">
  36. <h4>公司福利</h4>
  37. <div class="mt-3 welfare-tags">
  38. <v-chip size="small" label v-for="(k, i) in info.enterprise.welfareList" :key="i" class="mr-1 mb-2" color="primary">{{ k }}</v-chip>
  39. </div>
  40. </div>
  41. <div class="welfare my-3">
  42. <h4>工商信息</h4>
  43. <div :class="['mt-2', 'business-item']" v-for="(val, index) in businessList" :key="val.value">
  44. <div>{{ val.label }}</div>
  45. <div class="business-value ellipsis">{{ info.business[val.value] }}</div>
  46. <div :class="['my-3', {'border-bottom-dashed': index === businessList.length - 1 }]"></div>
  47. </div>
  48. <div class="business-source">
  49. 数据来源:企查查
  50. </div>
  51. </div>
  52. <div class="welfare">
  53. <h4>4位经理正在招聘</h4>
  54. <div class="d-flex mt-2" v-for="(val, i) in recruitmentSpecialist" :key="i">
  55. <v-avatar>
  56. <v-img :src="val.avatar"></v-img>
  57. </v-avatar>
  58. <div class="ml-2">
  59. <div class="position-name ellipsis">{{ val.name }} · {{ val.position }}</div>
  60. <div class="desc ellipsis">{{ val.desc }}</div>
  61. </div>
  62. </div>
  63. <div class="text-center mt-3">
  64. <v-btn class="buttons" color="primary" variant="outlined">{{ $t('position.allBtn') }}</v-btn>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script setup>
  73. defineOptions({ name: 'enterprise-details'})
  74. import { ref } from 'vue'
  75. import EnterpriseIntroduction from './components/introduction.vue'
  76. import recruitmentPositions from './components/positions.vue'
  77. import { getEnterpriseDetails } from '@/api/enterprise'
  78. const props = defineProps({
  79. id: {
  80. type: String,
  81. default: ''
  82. }
  83. })
  84. const tab = ref(1)
  85. // 企业详情
  86. const info = ref({})
  87. const getDetails = async () => {
  88. const id = Number(props.id)
  89. if (!id) return
  90. const data = await getEnterpriseDetails({ id })
  91. info.value = data
  92. console.log(info.value, 'value')
  93. }
  94. getDetails()
  95. // 工商信息
  96. const businessList = [
  97. { label: '企业类型:', value: 'type' },
  98. { label: '统一社会信用代码:', value: 'code' },
  99. { label: '成立日期:', value: 'establishmentTime' },
  100. { label: '注册资本:', value: 'registeredCapital' }
  101. ]
  102. // 企业招聘人员
  103. const recruitmentSpecialist = [
  104. { name: '陈北方', position: '人事经理', desc: '正在招聘“运营专员”等职位11111', avatar: 'https://cdn.vuetifyjs.com/images/john.jpg' },
  105. { name: '蔡艳生', position: '人事经理', desc: '正在招聘“产品助理”等职位', avatar: 'https://avatars0.githubusercontent.com/u/9064066?v=4&s=460' },
  106. { name: '徐有道', position: '招聘专员', desc: '正在招聘“运营专员”等职位', avatar: 'https://cdn.vuetifyjs.com/images/john.jpg' },
  107. { name: '方晓', position: '人事经理', desc: '正在招聘“运营专员”等职位', avatar: 'https://avatars0.githubusercontent.com/u/9064066?v=4&s=460' }
  108. ]
  109. </script>
  110. <style scoped lang="scss">
  111. .banner {
  112. background-color: #fff;
  113. padding: 0 0 20px;
  114. }
  115. .banner-title {
  116. display: flex;
  117. align-items: center;
  118. justify-content: space-between;
  119. height: 125px;
  120. }
  121. .content-left {
  122. width: 844px;
  123. padding: 20px;
  124. }
  125. .content-right {
  126. flex: 1;
  127. padding: 20px 20px 0 0;
  128. }
  129. .contact {
  130. height: 60px;
  131. line-height: 60px;
  132. }
  133. .contact-name {
  134. font-size: 20px;
  135. font-weight: 700;
  136. color: #444;
  137. line-height: 28px;
  138. }
  139. .contact-info {
  140. font-size: 15px;
  141. font-weight: 500;
  142. color: #222;
  143. line-height: 21px;
  144. margin-top: 8px;
  145. }
  146. .tools-box {
  147. height: 80px;
  148. width: 80px;
  149. background-color: #d5e6e8;
  150. border-radius: 5px;
  151. }
  152. .tools-box-number {
  153. font-size: 30px;
  154. font-weight: 700;
  155. color: var(--v-primary-base);
  156. }
  157. .tools-box-text {
  158. color: var(--v-primary-base);
  159. font-size: 14px;
  160. }
  161. .welfare {
  162. background-color: #f3f3f3;
  163. border-radius: 8px;
  164. padding: 12px;
  165. }
  166. .welfare-tags {
  167. width: 100%;
  168. height: 100px;
  169. overflow: hidden;
  170. }
  171. .business-item {
  172. font-size: 14px;
  173. color: #777;
  174. font-weight: 600;
  175. }
  176. .business-value {
  177. width: 228px;
  178. color: #000;
  179. font-weight: 500;
  180. }
  181. .business-source {
  182. font-size: 14px;
  183. color: #777;
  184. }
  185. .desc {
  186. width: 180px;
  187. color: #666;
  188. font-weight: 500;
  189. font-size: 12px;
  190. }
  191. .position-name {
  192. width: 180px;
  193. font-size: 14px;
  194. font-weight: 600;
  195. }
  196. </style>