Commit 3d7c5939ba23060da69e2312b8a0ba5e9e2d5677
1 parent
7fc91f7a
新增时候 数量限制
Showing
2 changed files
with
22 additions
and
15 deletions
subPackages/treePage/treeFiles.vue
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | <!-- <tui-no-data imgUrl="/static/images/nodata.png">暂无数据</tui-no-data>--> | 57 | <!-- <tui-no-data imgUrl="/static/images/nodata.png">暂无数据</tui-no-data>--> |
58 | </view> | 58 | </view> |
59 | <view v-else> | 59 | <view v-else> |
60 | - <view v-for="i in roads" class="card-wrap cad-box-shadow" @click="toNewPage(i.roadId)"> | 60 | + <view v-for="i in roads" class="card-wrap cad-box-shadow" @click="toNewPage(i.roadId, i.treeCount)"> |
61 | 61 | ||
62 | <p class="fs-flex__between"> | 62 | <p class="fs-flex__between"> |
63 | <span class="fs-ellipsis">{{ i.roadName }}</span> | 63 | <span class="fs-ellipsis">{{ i.roadName }}</span> |
@@ -129,8 +129,9 @@ export default { | @@ -129,8 +129,9 @@ export default { | ||
129 | this.deptListQuery() | 129 | this.deptListQuery() |
130 | }, | 130 | }, |
131 | // 前往历史页面 | 131 | // 前往历史页面 |
132 | - toNewPage(params) { | ||
133 | - uni.$tui.href(`/subPackages/treePage/treeRecord?roadId=${params}`) | 132 | + toNewPage(roadId, treeCount) { |
133 | + console.log(treeCount) | ||
134 | + uni.$tui.href(`/subPackages/treePage/treeRecord?roadId=${roadId}&count=${treeCount}`) | ||
134 | }, | 135 | }, |
135 | // 搜索 | 136 | // 搜索 |
136 | searchChange() { | 137 | searchChange() { |
subPackages/treePage/treeRecord.vue
@@ -11,10 +11,12 @@ | @@ -11,10 +11,12 @@ | ||
11 | <view style="text-align: right">{{ i.updatetime.substring(0, 10) }}</view> | 11 | <view style="text-align: right">{{ i.updatetime.substring(0, 10) }}</view> |
12 | </view> | 12 | </view> |
13 | <view class="fs-mt8 fs-align__center"> | 13 | <view class="fs-mt8 fs-align__center"> |
14 | - <img src="../../static/images/tree/tree-high.png" style="width: 14px;height: 14px;margin-right: 6px;" alt=""> 高度:{{ i.treeheight }} 米 | 14 | + <img src="../../static/images/tree/tree-high.png" style="width: 14px;height: 14px;margin-right: 6px;" |
15 | + alt=""> 高度:{{ i.treeheight }} 米 | ||
15 | </view> | 16 | </view> |
16 | <view class="fs-mt8 fs-align__center"> | 17 | <view class="fs-mt8 fs-align__center"> |
17 | - <img src="../../static/images/tree/treearound.png" style="width: 14px;height: 14px;margin-right: 6px;" alt="">胸径:{{ i.dbh }} 厘米 | 18 | + <img src="../../static/images/tree/treearound.png" style="width: 14px;height: 14px;margin-right: 6px;" |
19 | + alt="">胸径:{{ i.dbh }} 厘米 | ||
18 | </view> | 20 | </view> |
19 | </view> | 21 | </view> |
20 | </view> | 22 | </view> |
@@ -24,8 +26,7 @@ | @@ -24,8 +26,7 @@ | ||
24 | </view> | 26 | </view> |
25 | </view> | 27 | </view> |
26 | 28 | ||
27 | - | ||
28 | - <tui-button class="addTree" @click="toAddTreePage">新增树木录入</tui-button> | 29 | + <tui-button class="addTree" @click="toAddTreePage" v-show="count>0&&count>rows.length">新增树木录入</tui-button> |
29 | </view> | 30 | </view> |
30 | 31 | ||
31 | </template> | 32 | </template> |
@@ -37,13 +38,16 @@ export default { | @@ -37,13 +38,16 @@ export default { | ||
37 | data() { | 38 | data() { |
38 | return { | 39 | return { |
39 | rows: [], | 40 | rows: [], |
40 | - roadId: '' | 41 | + roadId: '', |
42 | + count: 0 | ||
41 | } | 43 | } |
42 | }, | 44 | }, |
43 | onLoad(options) { | 45 | onLoad(options) { |
46 | + console.log(options) | ||
44 | this.roadId = options.roadId | 47 | this.roadId = options.roadId |
48 | + this.count = options.count | ||
45 | }, | 49 | }, |
46 | - onShow(){ | 50 | + onShow() { |
47 | this.treeRoadQuery() | 51 | this.treeRoadQuery() |
48 | }, | 52 | }, |
49 | methods: { | 53 | methods: { |
@@ -65,17 +69,19 @@ export default { | @@ -65,17 +69,19 @@ export default { | ||
65 | </script> | 69 | </script> |
66 | 70 | ||
67 | <style scoped> | 71 | <style scoped> |
68 | -.record-wrap{ | 72 | +.record-wrap { |
69 | padding-bottom: 60px; | 73 | padding-bottom: 60px; |
70 | } | 74 | } |
75 | + | ||
71 | .record-list-wrap { | 76 | .record-list-wrap { |
72 | - margin: 15px 10px 0 ; | ||
73 | - padding:10px; | 77 | + margin: 15px 10px 0; |
78 | + padding: 10px; | ||
74 | border-radius: 6px; | 79 | border-radius: 6px; |
75 | font-size: 14px; | 80 | font-size: 14px; |
76 | } | 81 | } |
77 | -.treetypeName{ | ||
78 | - flex:1; | 82 | + |
83 | +.treetypeName { | ||
84 | + flex: 1; | ||
79 | font-size: 16px; | 85 | font-size: 16px; |
80 | font-weight: bold; | 86 | font-weight: bold; |
81 | } | 87 | } |
@@ -98,7 +104,7 @@ export default { | @@ -98,7 +104,7 @@ export default { | ||
98 | justify-content: space-between; | 104 | justify-content: space-between; |
99 | } | 105 | } |
100 | 106 | ||
101 | -.treenumber-no{ | 107 | +.treenumber-no { |
102 | padding: 3px 10px; | 108 | padding: 3px 10px; |
103 | background: #bdefd0; | 109 | background: #bdefd0; |
104 | font-size: 12px; | 110 | font-size: 12px; |