fxyk-projectCard.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="d-flex u-padding-top-30 u-padding-bottom-30 u-margin-top-10 u-margin-bottom-12" :style="{'background-color': bgColor}">
  3. <view v-if="projectData.status === 1" span="2" ><text class="small-tag d-flex j-center" style="background-color: #4CB1FF;">已完成</text></view>
  4. <view v-else-if="projectData.status === 2" span="2" ><text class="small-tag d-flex j-center" style="background-color: #E7AE5E;">进行中</text></view>
  5. <view v-else span="2" ><text class="small-tag d-flex j-center" style="background-color: #FF0014;">已终止</text></view>
  6. <view class="w-100 over_style text-style u-padding-top-5" :style="{'color': textAndIconColor}">
  7. <text>项目名称:&ensp;{{ projectData.name }}</text>
  8. <view class="d-flex a-center j-sb w-100">
  9. <view class="over_style">
  10. <view class="u-margin-top-10">项目编号:&ensp;{{ projectData.number }}</view>
  11. <view class="u-margin-top-10">项目内容:&ensp;{{ projectData.content }}</view>
  12. </view>
  13. <view class="d-flex a-center u-margin-right-18">
  14. <u-icon name="arrow-right" :color="textAndIconColor" size="30"></u-icon>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props: {
  23. projectData: {
  24. type: Object,
  25. default: () => {
  26. return {}
  27. }
  28. },
  29. // 文字图标颜色
  30. textAndIconColor: {
  31. type: String,
  32. default: '#fff'
  33. },
  34. // 背景颜色
  35. bgColor: {
  36. type: String,
  37. default: '#40349C'
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .small-tag {
  44. width: 100rpx;
  45. height: 33rpx;
  46. border-radius: 8rpx;
  47. margin: 5rpx 10rpx 0;
  48. font-size: 21rpx;
  49. font-family: SimSun;
  50. font-weight: 400;
  51. line-height: 33rpx;
  52. color: #FFFFFF;
  53. }
  54. .text-style {
  55. font-size: 25rpx;
  56. font-family: SimSun;
  57. font-weight: 400;
  58. line-height: 33rpx;
  59. }
  60. </style>