irrigatedArea.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="irrigated-area">
  3. <view class="irrigated-area-list">
  4. <view
  5. class="irrigated-area-item"
  6. v-for="(item, index) in irrigatedAreaList"
  7. :key="index"
  8. >
  9. <view class="irrigated-area-item-title">
  10. <view class="irrigated-area-item-title-text">{{
  11. item.sfDisplayname || item.sfName
  12. }}</view>
  13. <view class="irrigated-area-item-title-time"></view>
  14. </view>
  15. <view class="irrigated-area-item-content">
  16. <view
  17. class="irrigated-area-item-content-item"
  18. v-for="(i, n) in item.childrenList"
  19. :key="n"
  20. >
  21. <view class="irrigated-area-item-content-item-title">{{
  22. i.sfDisplayname || i.sfName || '暂无数据'
  23. }}</view>
  24. <view class="irrigated-area-item-content-item-icon">
  25. <image
  26. :src="i.value !== '0' ? bucketOpen1 : bucketClose1"
  27. class="bucket-icon"
  28. />
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import bucketOpen1 from '../assets/bucketOpen1.png';
  38. import bucketClose1 from '../assets/bucketClose1.png';
  39. export default {
  40. props: {
  41. irrigatedAreaList: {
  42. type: Array,
  43. default: () => [],
  44. },
  45. },
  46. data() {
  47. return {
  48. bucketOpen1,
  49. bucketClose1,
  50. };
  51. },
  52. methods: {
  53. formartDate(date) {
  54. return date.slice(0, 10);
  55. },
  56. },
  57. components: {},
  58. mounted() {},
  59. };
  60. </script>
  61. <style scoped lang="scss">
  62. .irrigated-area {
  63. .irrigated-area-list {
  64. .irrigated-area-item {
  65. display: flex;
  66. justify-content: space-between;
  67. align-items: center;
  68. padding: 10px;
  69. background: #f5f7fa;
  70. margin-bottom: 8rpx;
  71. .irrigated-area-item-title {
  72. width: 120rpx;
  73. .irrigated-area-item-title-text {
  74. color: #042118;
  75. text-align: left;
  76. font-family: 'Source Han Sans CN VF';
  77. font-size: 24rpx;
  78. font-weight: 500;
  79. // 超出隐藏
  80. overflow: hidden;
  81. text-overflow: ellipsis;
  82. white-space: nowrap;
  83. }
  84. .irrigated-area-item-title-time {
  85. color: #14a478;
  86. font-family: 'Source Han Sans CN VF';
  87. font-size: 24rpx;
  88. font-weight: 500;
  89. text-align: left;
  90. margin-top: 8rpx;
  91. height: 30rpx;
  92. }
  93. }
  94. .irrigated-area-item-content {
  95. display: flex;
  96. width: calc(100% - 120rpx);
  97. justify-content: start;
  98. .irrigated-area-item-content-item {
  99. width: 20%;
  100. .irrigated-area-item-content-item-title {
  101. width: 100%;
  102. color: #333333;
  103. font-family: 'Source Han Sans CN VF';
  104. font-size: 24rpx;
  105. font-weight: 400;
  106. margin-bottom: 20rpx;
  107. // 超出隐藏
  108. overflow: hidden;
  109. text-overflow: ellipsis;
  110. white-space: nowrap;
  111. text-align: center;
  112. }
  113. .irrigated-area-item-content-item-icon {
  114. display: flex;
  115. justify-content: center;
  116. .bucket-icon {
  117. width: 24rpx;
  118. height: 24rpx;
  119. margin-right: 10rpx;
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. </style>