ResumeItem.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="jp-work-item" @click="ckBtn">
  3. <view class="jp-work-name">
  4. <h3>{{item.positionCategoryName}}</h3>
  5. <span>{{item.dreamMoney}}</span>
  6. </view>
  7. <view class="jp-work-tag" >
  8. <u-tag :text="item.jobStatus" mode="dark"
  9. bg-color="#f1f1f7" color="#999" size="mini" />
  10. </view>
  11. <view class="jp-work-info">
  12. <view class="u-flex">
  13. <p>{{item.sex}}|{{item.age}}岁|{{item.workExp}}|{{item.education}}</p>
  14. </view>
  15. </view>
  16. <view class="jp-work-info">
  17. <view class="u-flex">
  18. <u-avatar :src="item.headImage?item.headImage:item.headImageUrl" size="40"></u-avatar>
  19. <p>{{item.realName}}</p>
  20. <p v-if="mode==2" >{{item.address}}</p>
  21. </view>
  22. <p v-if="mode!=2" >{{item.address}}</p>
  23. <u-button size="mini" style="margin:0;" v-if="mode==2" @click="$emit('mode2',item.resumeId)">删除</u-button>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. name: "Common",
  30. props: {
  31. item: {
  32. require: true,
  33. default: {},
  34. },
  35. ck: {
  36. require: false,
  37. default: true
  38. },
  39. obj: {
  40. require: false,
  41. default: null
  42. },
  43. mode:{
  44. require: false,
  45. default: 1
  46. },
  47. },
  48. data() {
  49. return {
  50. };
  51. },
  52. watch:{
  53. item(newVal,oldVal){
  54. this.setItem()
  55. }
  56. },
  57. methods: {
  58. setItem(){
  59. if (this.obj) {
  60. var sz = this.obj.split(",");
  61. for (var i in sz) {
  62. var string1 = sz[i].split("=")[0];
  63. var string2 = sz[i].split("=")[1];
  64. this.item[string2] = this.item[string1];
  65. }
  66. this.$forceUpdate()
  67. }
  68. },
  69. ckBtn() {
  70. if (this.ck) {
  71. this.gotoUrl('pages/hr/index/resumeInfo/resumeInfo?id=' + this.item.resumeId)
  72. } else {
  73. this.$emit("ckItem", this.item.resumeId)
  74. }
  75. },
  76. spiltItem(text) {
  77. if (text) {
  78. return text.split(",")
  79. } else {
  80. return []
  81. }
  82. },
  83. },
  84. mounted() {
  85. this.setItem()
  86. },
  87. destroyed() {
  88. }
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .jp-work-item {
  93. padding: 30rpx;
  94. background-color: #fff;
  95. border-bottom: 1px solid #f7f7f7;
  96. &:last-child {
  97. border-bottom: none;
  98. }
  99. .jp-work-name {
  100. display: flex;
  101. justify-content: space-between;
  102. align-items: center;
  103. h3 {
  104. font-size: 36rpx;
  105. }
  106. span {
  107. font-size: 32rpx;
  108. color: #FF1700
  109. }
  110. }
  111. .jp-work-tag {
  112. display: flex;
  113. align-items: center;
  114. margin-top: 10rpx;
  115. * {
  116. margin-right: 10rpx;
  117. }
  118. }
  119. .jp-work-info {
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. margin-top: 10rpx;
  124. p {
  125. color: #999;
  126. font-size: 24rpx;
  127. margin-left: 10rpx;
  128. }
  129. }
  130. }
  131. </style>