irrigatedArea.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. export default {
  38. props: {
  39. irrigatedAreaList: {
  40. type: Array,
  41. default: () => [],
  42. },
  43. },
  44. data() {
  45. return {
  46. bucketOpen1:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketOpen1.png',
  47. bucketClose1:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketClose1.png',
  48. };
  49. },
  50. methods: {
  51. formartDate(date) {
  52. return date.slice(0, 10);
  53. },
  54. },
  55. components: {},
  56. mounted() {},
  57. };
  58. </script>
  59. <style scoped lang="scss">
  60. .irrigated-area {
  61. .irrigated-area-list {
  62. .irrigated-area-item {
  63. display: flex;
  64. justify-content: space-between;
  65. align-items: center;
  66. padding: 10px;
  67. background: #f5f7fa;
  68. margin-bottom: 8rpx;
  69. .irrigated-area-item-title {
  70. width: 120rpx;
  71. .irrigated-area-item-title-text {
  72. color: #042118;
  73. text-align: left;
  74. font-family: 'Source Han Sans CN VF';
  75. font-size: 24rpx;
  76. font-weight: 500;
  77. // 超出隐藏
  78. overflow: hidden;
  79. text-overflow: ellipsis;
  80. white-space: nowrap;
  81. }
  82. .irrigated-area-item-title-time {
  83. color: #14a478;
  84. font-family: 'Source Han Sans CN VF';
  85. font-size: 24rpx;
  86. font-weight: 500;
  87. text-align: left;
  88. margin-top: 8rpx;
  89. height: 30rpx;
  90. }
  91. }
  92. .irrigated-area-item-content {
  93. display: flex;
  94. width: calc(100% - 120rpx);
  95. justify-content: start;
  96. .irrigated-area-item-content-item {
  97. width: 20%;
  98. .irrigated-area-item-content-item-title {
  99. width: 100%;
  100. color: #333333;
  101. font-family: 'Source Han Sans CN VF';
  102. font-size: 24rpx;
  103. font-weight: 400;
  104. margin-bottom: 20rpx;
  105. // 超出隐藏
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. white-space: nowrap;
  109. text-align: center;
  110. }
  111. .irrigated-area-item-content-item-icon {
  112. display: flex;
  113. justify-content: center;
  114. .bucket-icon {
  115. width: 24rpx;
  116. height: 24rpx;
  117. margin-right: 10rpx;
  118. }
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. </style>