jobTable.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="job-table">
  3. <view @click="goUnsubmittedJob(item)" v-for="(item,index) in list" :key='index' class="job-table-item">
  4. <view class="job-table-item-title">
  5. <view class="job-table-item-title-left">
  6. {{item.assignment_title}}
  7. </view>
  8. <view class="job-table-item-title-right">
  9. <!-- <view :style="`background-color: ${item.color};`" class="job-table-item-title-right-color">
  10. </view> -->
  11. <view :style="` background-color:${color(item.assignment_status)}`" class="job-table-item-title-right-text">
  12. {{item.assignment_status_txt}}
  13. </view>
  14. </view>
  15. </view>
  16. <view class="job-table-item-content">
  17. <view class="job-table-item-img">
  18. <!-- <uni-file-picker readonly :value="item.imgs" :imageStyles="imageStyles" file-mediatype="image">
  19. </uni-file-picker> -->
  20. <view @click="BlowUpImg(item,index1)" v-for="(item1,index1) in item.media_url" :key="index1"
  21. class="job-table-item-img-item">
  22. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item1" mode=""></image>
  23. </view>
  24. </view>
  25. <view class="job-table-item-date">
  26. <view style="display: flex;" class="job-table-item-date-left">
  27. <view style="width: 120rpx;margin-right: 10rpx;" class="">
  28. 发布日期
  29. </view>
  30. <view class="">
  31. {{item.start_time}}
  32. </view>
  33. </view>
  34. <view style="display: flex;" class="job-table-item-date-right">
  35. <view style="width: 120rpx;margin-right: 10rpx;" class="">
  36. 截止日期
  37. </view>
  38. <view class="">
  39. {{item.end_time}}
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. name: "jobTable",
  50. props: {
  51. list: {
  52. type: Array,
  53. default: () => []
  54. }
  55. },
  56. data() {
  57. return {
  58. imageStyles: {
  59. width: 103,
  60. height: 103,
  61. border: {
  62. radius: 5
  63. }
  64. },
  65. };
  66. },
  67. methods: {
  68. color(val){
  69. if(val == -1){
  70. return '#FE6B6B'
  71. }else if(val == 0) {
  72. return '#43B3FF'
  73. }else if(val == 1) {
  74. return '#05CCA1'
  75. }
  76. },
  77. BlowUpImg(item, index) {
  78. let arr = []
  79. item.media_url.forEach(item => {
  80. arr.push(item)
  81. })
  82. uni.previewImage({
  83. current: index,
  84. urls: arr
  85. })
  86. },
  87. goUnsubmittedJob(item) {
  88. this.$emit('click',item)
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .job-table {
  95. width: 100%;
  96. padding-bottom: 32rpx;
  97. .job-table-item {
  98. width: 100%;
  99. box-sizing: border-box;
  100. .job-table-item-content {
  101. background-color: #fff;
  102. padding: 32rpx;
  103. border-radius: 5.33px;
  104. box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
  105. box-sizing: border-box;
  106. margin-bottom: 32rpx;
  107. box-sizing: border-box;
  108. }
  109. .job-table-item-img {
  110. margin-bottom: 32rpx;
  111. }
  112. .job-table-item-title {
  113. display: flex;
  114. justify-content: space-between;
  115. margin-bottom: 32rpx;
  116. }
  117. .job-table-item-title-left {
  118. font-size: 32rpx;
  119. }
  120. .job-table-item-title-right {
  121. display: flex;
  122. align-items: center;
  123. .job-table-item-title-right-text {
  124. color: #fff;
  125. padding: 0 10rpx;
  126. font-size: 24rpx;
  127. border-radius: 8rpx;
  128. margin-left: 20rpx;
  129. }
  130. .job-table-item-title-right-color {
  131. width: 16rpx;
  132. height: 16rpx;
  133. border-radius: 50%;
  134. margin-right: 20rpx;
  135. }
  136. }
  137. }
  138. .job-table-item-date {
  139. display: flex;
  140. justify-content: space-between;
  141. align-items: center;
  142. font-size: 24rpx;
  143. color: #999;
  144. }
  145. }
  146. .job-table-item-img {
  147. display: flex;
  148. flex-wrap: wrap;
  149. .job-table-item-img-item {
  150. width: 196rpx;
  151. height: 196rpx;
  152. border-radius: 10rpx;
  153. margin-right: 20rpx;
  154. margin-bottom: 20rpx;
  155. }
  156. .job-table-item-img-item:nth-child(3n) {
  157. margin-right: 0;
  158. }
  159. }
  160. </style>