RecruitmentItem.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template >
  2. <view class="jp-work-item" @click="ckBtn">
  3. <view class="jp-work-name">
  4. <h3>{{item.title}}</h3>
  5. <span>{{item.wageTypeN}}</span>
  6. </view>
  7. <view class="jp-work-tag" v-if="item.requirements">
  8. <u-tag v-for="(text,index) in spiltItem(item.requirements)" :key="index" :text="text" mode="dark" bg-color="#f1f1f7" color="#999" size="mini"/>
  9. </view>
  10. <view class="jp-work-info">
  11. <view class="u-flex">
  12. <u-avatar :src="item.logo" size="40"></u-avatar>
  13. <p>{{item.name}} {{item.scaleName}}</p>
  14. </view>
  15. <p>{{item.cityName}}</p>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. name:"Common",
  22. props:{
  23. item: {
  24. require: true,
  25. default: {},
  26. },
  27. ck:{
  28. require: false,
  29. default:true
  30. },
  31. obj:{
  32. require: false,
  33. default:null
  34. }
  35. },
  36. data() {
  37. return {
  38. };
  39. },methods:{
  40. ckBtn(){
  41. if(this.ck){
  42. this.gotoUrl('pages/job/index/recruitInfo/recruitInfo?id='+this.item.id)
  43. }else{
  44. this.$emit("ckItem",this.item.id)
  45. }
  46. },
  47. spiltItem(text){
  48. if(text){
  49. return text.split(",")
  50. }else{
  51. return []
  52. }
  53. },
  54. },mounted(){
  55. if(this.obj){
  56. var sz=this.obj.split(",");
  57. for(var i in sz ){
  58. var string1 = sz[i].split("=")[0];
  59. var string2 = sz[i].split("=")[1];
  60. this.item[string2]=this.item[string1];
  61. }
  62. this.$forceUpdate()
  63. }
  64. },destroyed(){
  65. }
  66. }
  67. </script>
  68. <style scoped lang="scss">
  69. .jp-work-item{
  70. padding:30rpx;
  71. background-color: #fff;
  72. border-bottom: 1px solid #f7f7f7;
  73. &:last-child{
  74. border-bottom:none;
  75. }
  76. .jp-work-name{
  77. display: flex;
  78. justify-content: space-between;
  79. align-items: center;
  80. h3{
  81. font-size: 36rpx;
  82. }
  83. span{
  84. font-size: 32rpx;
  85. color:#FF1700
  86. }
  87. }
  88. .jp-work-tag{
  89. display: flex;
  90. align-items: center;
  91. margin-top: 10rpx;
  92. *{
  93. margin-right: 10rpx;
  94. }
  95. }
  96. .jp-work-info{
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. margin-top: 10rpx;
  101. p{
  102. color:#999;
  103. font-size: 24rpx;
  104. margin-left: 10rpx;
  105. }
  106. }
  107. }
  108. </style>