Blame view

subPackages/treePage/treeLog.vue 2.75 KB
b951d827   刘淇   树木详情
1
2
  <template>
    <view class="container">
6cba22de   刘淇   图片上传
3
  
b951d827   刘淇   树木详情
4
5
6
7
8
9
10
      <!--    <tui-no-data imgUrl="/static/images/nodata.png" v-if="rows.length==0">暂无数据</tui-no-data>-->
      <view class="record-wrap">
        <view class="record-list-wrap cad-box-shadow fs-bg__white" v-for="i in rows" @click="todetailPage(i)">
          <view style="display: flex">
            <view class="record-list-left" :style="`background-image: url(${i.treephotoone});`"></view>
            <view class="record-list-right">
              <view class="record-list-right-title">
c872bdb3   刘淇   树木详情
11
12
                <view class="fs-ellipsis treetypeName">{{ i.treetype }}</view>
                <view style="text-align: right">{{ i.updatetime.substring(0, 10) }}</view>
b951d827   刘淇   树木详情
13
14
              </view>
              <view class="fs-mt8 fs-align__center">
c872bdb3   刘淇   树木详情
15
                <img src="/static/images/tree/tree-high.png" style="width: 14px;height: 14px;margin-right: 6px;"
b951d827   刘淇   树木详情
16
17
18
                     alt=""> 高度:{{ i.treeheight }} 米
              </view>
              <view class="fs-mt8 fs-align__center">
c872bdb3   刘淇   树木详情
19
                <img src="/static/images/tree/treearound.png" style="width: 14px;height: 14px;margin-right: 6px;"
b951d827   刘淇   树木详情
20
21
22
23
24
25
26
27
28
                     alt="">胸径:{{ i.dbh }} 厘米
              </view>
            </view>
          </view>
          <view class="fs-mt8 fs-ellipsis treenumber-no">
            树木编号:{{ i.treenumber }}
          </view>
        </view>
      </view>
6cba22de   刘淇   图片上传
29
  
b951d827   刘淇   树木详情
30
31
32
33
34
    </view>
  
  </template>
  
  <script>
c872bdb3   刘淇   树木详情
35
  import { useCounterStore } from '@/stores/counter'
b951d827   刘淇   树木详情
36
  import { treeLogReq } from "@/api/tree";
6cba22de   刘淇   图片上传
37
38
39
40
41
42
43
44
45
  export default {
    name: "treeLog",
    props: {
      logId: {
        type: String,
        required: true
      }
    },
    data() {
b951d827   刘淇   树木详情
46
47
48
49
      return {
        rows: [],
        roadId: ''
      }
6cba22de   刘淇   图片上传
50
51
52
53
54
55
    },
    watch: {
      logId: {
        immediate: true,
        handler(newVal, oldVal) {
          if (newVal !== oldVal) {
b951d827   刘淇   树木详情
56
            this.initLogQuery(newVal)
6cba22de   刘淇   图片上传
57
58
59
60
61
          }
        }
      }
    },
    methods: {
b951d827   刘淇   树木详情
62
63
64
65
66
67
68
69
70
71
72
73
      initLogQuery(val) {
        let obj = {
          treeid: val,
          pageNum: 1,
          pageSize: 10000
        }
        treeLogReq({data: {...obj}}).then(res => {
          console.log(res)
          this.rows = res.rows
        })
      },
      todetailPage(i) {
c872bdb3   刘淇   树木详情
74
75
        const shareStore = useCounterStore()
        shareStore.setTreeInfo(i)
b951d827   刘淇   树木详情
76
77
        uni.navigateTo({
          url: `/subPackages/treePage/treeInfo`,
b951d827   刘淇   树木详情
78
        })
6cba22de   刘淇   图片上传
79
80
81
82
83
      }
    }
  }
  </script>
  
6cba22de   刘淇   图片上传
84
85
  
  <style scoped>
b951d827   刘淇   树木详情
86
  .record-list-wrap {
c872bdb3   刘淇   树木详情
87
88
89
90
91
92
93
94
95
    margin: 20px 10px 0 ;
    padding:10px;
    border-radius: 6px;
    font-size: 14px;
  }
  .treetypeName{
    flex:1;
    font-size: 16px;
    font-weight: bold;
b951d827   刘淇   树木详情
96
  }
b951d827   刘淇   树木详情
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
  .record-list-left {
    height: 70px;
    width: 70px;
    background-size: 100% 100%;
  }
  
  .record-list-right {
    margin-left: 20px;
    flex: 1;
    overflow: hidden;
  
  }
  
  .record-list-right-title {
    display: flex;
    justify-content: space-between;
  }
  
  .treenumber-no {
    padding: 3px 10px;
    background: #bdefd0;
    font-size: 12px;
  }
6cba22de   刘淇   图片上传
120
121
  
  </style>