companyInfo.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <view>
  3. <u-navbar title="公司详情" :custom-back="back" ></u-navbar>
  4. <view class="resumeInfo">
  5. <view class="resumeInfo-company">
  6. <view class="resumeInfo-company-text">
  7. <view class="resumeInfo-company-name">
  8. <h3>{{companyInfo.name}}</h3>
  9. <view class="u-flex">
  10. <span>{{companyInfo.scaleName}}</span>
  11. <u-line color="#ccc" length="20" direction="col" margin="0 20rpx"/>
  12. <span>{{companyInfo.industryName}}</span>
  13. </view>
  14. </view>
  15. </view>
  16. <u-avatar :src="companyInfo.logo" size="100" mode="square"></u-avatar>
  17. </view>
  18. <view class="resumeInfo-info-foot">
  19. <view class="resumeInfo-title">
  20. 公司地址
  21. </view>
  22. <view class="resumeInfo-address">
  23. {{companyInfo.address}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="jp-work">
  28. <view class="jp-work-title">
  29. 招聘岗位({{recordsTotal}})
  30. </view>
  31. <view class="jp-work-list">
  32. <RecruitmentItem v-for="(item ,index) in list" :key="item.id" :item="item" :ck="vck" @ckItem="ckBtn" ></RecruitmentItem>
  33. <u-loadmore @loadmore="myLoadmore" :status="list.length<recordsTotal?'loadmore':'nomore'" ></u-loadmore>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import * as API from '@/apis/job/job.js'
  40. import RecruitmentItem from '@/components/job/RecruitmentItem.vue'
  41. export default {
  42. name:"Common",
  43. props:{
  44. vshow: {
  45. require: true,
  46. default: false,
  47. },
  48. vck: {
  49. require: false,
  50. default: true,
  51. },
  52. companyId:{
  53. require: false,
  54. default:""
  55. },
  56. companyInfo:{
  57. require: false,
  58. default:{}
  59. }
  60. },
  61. components:{RecruitmentItem},
  62. data() {
  63. return {
  64. pageIndex:0,
  65. recordsTotal:0,
  66. myCompanyId:null,
  67. list:[],
  68. };
  69. },methods:{
  70. myLoadmore(){
  71. if(this.list.length<this.recordsTotal){
  72. this.pageIndex+=1;
  73. this.getInfo()
  74. }
  75. },
  76. back(){
  77. this.$emit("back")
  78. },
  79. ckBtn(id){
  80. this.$emit("ckItem",id)
  81. },
  82. getInfo(){
  83. uni.showLoading({
  84. title:"加载中",mask:true,
  85. })
  86. var data={
  87. id:this.companyId,
  88. pageIndex:this.pageIndex
  89. };
  90. API.getCompanyDetails(data).then((res)=>{
  91. this.myCompanyId=this.companyId
  92. if(this.pageIndex==1){
  93. this.list=res.data.data;
  94. }else{
  95. this.list=[
  96. ...this.list,
  97. ...res.data.data
  98. ];
  99. }
  100. this.recordsTotal=res.data.recordsTotal
  101. //this.list=res
  102. uni.hideLoading()
  103. }).catch(error => {
  104. uni.showToast({
  105. title:error
  106. })
  107. })
  108. }
  109. },mounted(){
  110. },destroyed(){
  111. },watch:{
  112. vshow:function(val) {
  113. if(val&&this.companyId&&(!this.myCompanyId||(this.myCompanyId&&this.companyId!=this.myCompanyId))){
  114. this.pageIndex=1;
  115. this.getInfo()
  116. document.getElementsByTagName('uni-page-wrapper')[0].style="background-color: #F7F7F7;"
  117. }else{
  118. document.getElementsByTagName('uni-page-wrapper')[0].style=""
  119. }
  120. }
  121. }
  122. }
  123. </script>
  124. <style >
  125. </style>
  126. <style scoped lang="scss">
  127. .resumeInfo-info{
  128. padding-top: 20rpx;
  129. .resumeInfo-info-head{
  130. font-size: 36rpx;
  131. font-weight: bold;
  132. }
  133. .resumeInfo-info-main{
  134. padding: 20rpx 0;
  135. }
  136. }
  137. .resumeInfo-info-foot{
  138. margin-top: 40rpx;
  139. .resumeInfo-title{
  140. color:#999;
  141. }
  142. .resumeInfo-address{
  143. flex: 1;
  144. min-width: 0;
  145. margin-top: 10rpx;
  146. }
  147. }
  148. .resumeInfo{
  149. background-color: #fff;
  150. padding: 20rpx;
  151. margin-bottom: 20rpx;
  152. .resumeInfo-row{
  153. display: flex;
  154. justify-content: space-between;
  155. align-items: center;
  156. margin-bottom: 10rpx;
  157. h3{
  158. font-size: 46rpx;
  159. }
  160. span{
  161. color:#2295FF;
  162. border: 1px solid #2295FF;
  163. padding: 0 10rpx;
  164. border-radius: 6rpx;
  165. }
  166. .jp-work-tag{
  167. display: flex;
  168. align-items: center;
  169. *{
  170. margin-right: 10rpx;
  171. }
  172. }
  173. h2{
  174. color:#FF6D58;
  175. font-size: 36rpx;
  176. }
  177. }
  178. }
  179. .resumeInfo-company{
  180. display: flex;
  181. align-items: center;
  182. padding-top: 20rpx;
  183. .resumeInfo-company-text{
  184. display: flex;
  185. align-items: center;
  186. justify-content: space-between;
  187. flex: 1;
  188. }
  189. .resumeInfo-company-name{
  190. h3{
  191. margin-bottom: 10rpx;
  192. font-size: 40rpx;
  193. }
  194. span{
  195. color:#999;
  196. font-size: 24rpx;
  197. }
  198. }
  199. }
  200. .resumeInfo-data{
  201. display: flex;
  202. justify-content: space-between;
  203. align-items: center;
  204. margin-top: 20rpx;
  205. padding: 20rpx 0;
  206. border-top: 1px solid #F7F7F7;
  207. border-bottom: 1px solid #F7F7F7;
  208. .resumeInfo-data-item{
  209. display: flex;
  210. flex-direction: column;
  211. align-items: center;
  212. p{
  213. font-size: 24rpx;
  214. color:#999;
  215. margin-bottom: 10rpx;
  216. }
  217. span{
  218. font-size: 32rpx;
  219. }
  220. }
  221. }
  222. .jp-work-title{
  223. background-color: #fff;
  224. border-bottom: 1px solid #F7F7F7;
  225. font-size: 32rpx;
  226. padding: 20rpx 20rpx;
  227. }
  228. .jp-work-item{
  229. padding:30rpx;
  230. background-color: #fff;
  231. border-bottom: 1px solid #f7f7f7;
  232. &:last-child{
  233. border-bottom:none;
  234. }
  235. .jp-work-name{
  236. display: flex;
  237. justify-content: space-between;
  238. align-items: center;
  239. h3{
  240. font-size: 36rpx;
  241. }
  242. span{
  243. font-size: 32rpx;
  244. color:#FF1700
  245. }
  246. }
  247. .jp-work-tag{
  248. display: flex;
  249. align-items: center;
  250. margin-top: 10rpx;
  251. *{
  252. margin-right: 10rpx;
  253. }
  254. }
  255. .jp-work-info{
  256. display: flex;
  257. justify-content: space-between;
  258. align-items: center;
  259. margin-top: 10rpx;
  260. p{
  261. color:#999;
  262. font-size: 24rpx;
  263. margin-left: 10rpx;
  264. }
  265. }
  266. }
  267. </style>