position-card.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="gwList-box-item flex justify-center">
  3. <view class="gwList-box-item-box">
  4. <!-- 标题-薪资 -->
  5. <view class="gwList-box-item-box-title flex justify-between align-center">
  6. <view class="title-left flex align-center">
  7. <view class="job-title-text"
  8. style="max-width: 450rpx;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;">
  9. <template>
  10. {{ data.ruleClassifyName }}
  11. </template>
  12. </view>
  13. <view v-if="data.isDue == 1" class="salary-text-box">
  14. <image src="../../static/images/index/jipinIcom.svg"
  15. class="jipin-icon" />
  16. <text class="jipin-text">急聘</text>
  17. </view>
  18. </view>
  19. <view>
  20. <text class="clip-color">{{ data.salaryRange }}</text>
  21. <text class="clip-color"> · </text>
  22. <text class="clip-color">{{ data.salaryTimes }}</text>
  23. </view>
  24. </view>
  25. <!-- 公司名称-公司人数 -->
  26. <view class="flex align-center justify-between">
  27. <view class="gwList-box-item-box-name flex align-center">
  28. <text class="company-name company-name-overflow">{{ data.company ?
  29. data.company.companyName : '' }}</text>
  30. <text class="company-people" v-if="data.company">{{ data.company ?
  31. data.company.companyPeople : '0人' }}</text>
  32. </view>
  33. <view class="experience">
  34. <text>{{ data.experience }}</text>
  35. <text>{{ data.education }}</text>
  36. </view>
  37. </view>
  38. <!-- 福利标签 -->
  39. <view class="benefits" v-if="data.welfareTag">{{ parseWelfare(data.welfareTag) }}</view>
  40. <!-- 职位标签 -->
  41. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  42. <text class="job-tag" v-for="(ite, ind) in parseSkills(data.positionTag)"
  43. :key="ind">{{ ite }}</text>
  44. </view>
  45. <!-- 公司简介-位置 -->
  46. <view class="gwList-box-item-box-info flex justify-between align-center">
  47. <view class="gwList-box-item-box-info-l flex align-center">
  48. <view class="user-image">
  49. <image
  50. :src="data.hr && data.hr.hrImg ? data.hr.hrImg : '../../static/images/logo.jpg'" class="hr-avatar">
  51. </image>
  52. <view class="online-status"
  53. :style="{ 'background-color': data.user && data.user.onlineStatus == 'ONLINE' ? '#00DD9A' : '#999' }">
  54. </view>
  55. </view>
  56. <view class="company-info-text">
  57. {{ data.user && data.user.userName || '未知' }}·{{ data.hr &&
  58. data.hr.hrPosition || '未知' }}
  59. </view>
  60. <view v-if="data.respondTime" class="reply-time">{{ data.respondTime }}
  61. </view>
  62. </view>
  63. <view class="location-text">
  64. {{ data.distance }} {{ data.county }}
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. props: {
  73. data: {
  74. type: Object,
  75. default: () => {
  76. return {}
  77. }
  78. }
  79. },
  80. data() {
  81. return {}
  82. },
  83. methods: {
  84. parseWelfare(str) {
  85. if (!str) return ''
  86. return str?.replace(/;/g, ' | ')
  87. },
  88. parseSkills(str) {
  89. if (!str) return []
  90. return str?.split(',') || []
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .title-left {
  97. display: flex;
  98. align-items: center;
  99. gap: 8rpx;
  100. }
  101. .job-title-text {
  102. color: rgba(23, 23, 37, 1);
  103. font-family: DM Sans;
  104. font-size: 32rpx;
  105. font-weight: bold;
  106. line-height: 48rpx;
  107. letter-spacing: 0.5%;
  108. text-align: left;
  109. }
  110. .salary-text-box {
  111. border-radius: 24rpx;
  112. background: #FEE2E3;
  113. display: flex;
  114. justify-content: flex-start;
  115. align-items: center;
  116. padding: 0 16rpx;
  117. .jipin-icon {
  118. width: 20rpx;
  119. height: 20rpx;
  120. margin-right: 8rpx;
  121. }
  122. .jipin-text {
  123. color: rgba(237, 66, 69, 1);
  124. font-family: DM Sans;
  125. font-size: 16rpx;
  126. font-weight: 400;
  127. line-height: 40rpx;
  128. letter-spacing: 0.5%;
  129. text-align: left;
  130. }
  131. }
  132. .clip-color {
  133. font-size: 24rpx;
  134. font-weight: bold;
  135. line-height: 40rpx;
  136. background-image: linear-gradient(90.00deg, rgba(13, 39, 247, 1),rgba(19, 193, 234, 1));
  137. -webkit-background-clip: text;
  138. color: transparent;
  139. background-clip: text;
  140. }
  141. .company-name,
  142. .company-people {
  143. color: rgba(156, 164, 171, 1);
  144. font-family: DM Sans;
  145. font-size: 24rpx;
  146. font-weight: 400;
  147. line-height: 40rpx;
  148. letter-spacing: 0.5%;
  149. text-align: left;
  150. }
  151. .job-tag {
  152. padding: 8rpx;
  153. border-radius: 8rpx;
  154. background: rgba(198, 198, 198, 0.1);
  155. margin-right: 8rpx;
  156. margin-bottom: 8rpx;
  157. color: rgba(153, 153, 153, 1);
  158. font-size: 20rpx;
  159. line-height: 1;
  160. }
  161. .company-info-text,
  162. .location-text {
  163. color: rgba(156, 164, 171, 1);
  164. font-family: DM Sans;
  165. font-size: 20rpx;
  166. font-weight: 400;
  167. line-height: 40rpx;
  168. letter-spacing: 0.5%;
  169. text-align: left;
  170. }
  171. .reply-time {
  172. display: flex;
  173. flex-direction: row;
  174. justify-content: center;
  175. align-items: center;
  176. padding: 4rpx 8rpx;
  177. font-family: DM Sans;
  178. font-size: 16rpx;
  179. font-weight: 400;
  180. line-height: 20rpx;
  181. letter-spacing: 0.5%;
  182. text-align: left;
  183. border-radius: 12rpx;
  184. background: #ECE1FD;
  185. color: #8858C5;
  186. }
  187. .user-image {
  188. position: relative;
  189. .online-status {
  190. width: 12rpx;
  191. height: 12rpx;
  192. position: absolute;
  193. bottom: 0rpx;
  194. right: 0rpx;
  195. border-radius: 50%;
  196. box-sizing: border-box;
  197. border: 0.5px solid rgba(255, 255, 255, 1);
  198. }
  199. .hr-avatar {
  200. display: block;
  201. width: 40rpx;
  202. height: 40rpx;
  203. border: 0.5px solid rgba(240, 240, 240, 1);
  204. border-radius: 20rpx;
  205. }
  206. }
  207. .gwList-box-item {
  208. width: 712rpx;
  209. background-color: #ffffff;
  210. border-radius: 12rpx;
  211. box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.1);
  212. background: rgba(253, 253, 253, 1);
  213. margin-bottom: 12rpx;
  214. padding: 16rpx 36rpx;
  215. }
  216. .gwList-box-item-box {
  217. width: 100%;
  218. .gwList-box-item-box-title {
  219. margin-bottom: 12rpx;
  220. }
  221. .gwList-box-item-box-label {
  222. margin-top: 14rpx;
  223. }
  224. .gwList-box-item-box-name {
  225. color: rgba(156, 164, 171, 1);
  226. font-size: 24rpx;
  227. font-weight: 400;
  228. line-height: 40rpx;
  229. .company-name-overflow {
  230. max-width: 360rpx;
  231. overflow: hidden;
  232. text-overflow: ellipsis;
  233. white-space: nowrap;
  234. margin-right: 8rpx;
  235. }
  236. }
  237. .experience {
  238. font-size: 24rpx;
  239. line-height: 32rpx;
  240. color: rgba(1, 107, 246, 1);
  241. text {
  242. margin-left: 12rpx;
  243. }
  244. }
  245. .benefits {
  246. width: 640rpx;
  247. font-size: 20rpx;
  248. line-height: 28rpx;
  249. color: rgba(153, 153, 153, 1);
  250. overflow: hidden;
  251. text-overflow: ellipsis;
  252. white-space: nowrap;
  253. margin-top: 12rpx;
  254. }
  255. .gwList-box-item-box-line {
  256. width: 100%;
  257. border: 1rpx solid #E6E6E6;
  258. margin-top: 30rpx;
  259. margin-bottom: 20rpx;
  260. }
  261. .gwList-box-item-box-info {
  262. font-size: 26rpx;
  263. margin-top: 10rpx;
  264. .gwList-box-item-box-info-l {
  265. color: #1A1A1A;
  266. display: flex;
  267. align-items: center;
  268. gap: 12rpx;
  269. .people {
  270. max-width: 110rpx;
  271. overflow: hidden; //超出的文本隐藏
  272. text-overflow: ellipsis; //溢出用省略号显示
  273. white-space: nowrap; // 默认不换行;
  274. }
  275. }
  276. .gwList-box-item-box-info-r {
  277. color: #999999;
  278. max-width: 50%;
  279. overflow: hidden; //超出的文本隐藏
  280. text-overflow: ellipsis; //溢出用省略号显示
  281. white-space: nowrap; // 默认不换行;
  282. }
  283. }
  284. }
  285. </style>