修改时间冒泡的问题,调整电表详情
This commit is contained in:
@@ -34,14 +34,14 @@
|
|||||||
label="包含{{item.meterRoute}}个抄表点"
|
label="包含{{item.meterRoute}}个抄表点"
|
||||||
data-id="{{item.id}}"
|
data-id="{{item.id}}"
|
||||||
data-type="look"
|
data-type="look"
|
||||||
bind:click="jumpToReading"
|
catch:click="jumpToReading"
|
||||||
>
|
>
|
||||||
<view slot="right-icon">
|
<view slot="right-icon">
|
||||||
<van-button
|
<van-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
bind:tap="changeStartStatus"
|
catch:tap="changeStartStatus"
|
||||||
data-routeId="{{item.readingRouteId}}"
|
data-routeId="{{item.readingRouteId}}"
|
||||||
custom-style="margin-right: 20rpx;"
|
custom-style="margin-right: 20rpx;"
|
||||||
data-id="{{item.id}}"
|
data-id="{{item.id}}"
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<van-button
|
<van-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
bind:tap="jumpToReading"
|
catch:tap="jumpToReading"
|
||||||
data-id="{{item.id}}"
|
data-id="{{item.id}}"
|
||||||
data-type="edit"
|
data-type="edit"
|
||||||
custom-style="margin-right: 20rpx;"
|
custom-style="margin-right: 20rpx;"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<van-button
|
<van-button
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
bind:tap="changeEndStatus"
|
catch:tap="changeEndStatus"
|
||||||
data-id="{{item.id}}"
|
data-id="{{item.id}}"
|
||||||
wx:if="{{item.status === 1}}"
|
wx:if="{{item.status === 1}}"
|
||||||
data-routeId="{{item.readingRouteId}}"
|
data-routeId="{{item.readingRouteId}}"
|
||||||
|
@@ -15,7 +15,10 @@
|
|||||||
{{ meterInfo.address }}
|
{{ meterInfo.address }}
|
||||||
</view>
|
</view>
|
||||||
<view class="meterType">
|
<view class="meterType">
|
||||||
<van-tag type="primary">华昌宝能收费</van-tag>
|
<van-tag type="primary" custom-style="width: 100%;" wx:if="{{meterInfo.feeType === 1}}">物业代收1</van-tag>
|
||||||
|
<van-tag type="primary" custom-style="width: 100%;" wx:elif="{{meterInfo.feeType === 2}}">物业代收2</van-tag>
|
||||||
|
<van-tag type="primary" custom-style="width: 100%;" wx:elif="{{meterInfo.feeType === 3}}">物业代收线损</van-tag>
|
||||||
|
<van-tag type="primary" custom-style="width: 100%;" wx:else>华昌宝能收费</van-tag>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -50,23 +53,25 @@
|
|||||||
<van-col span="12">
|
<van-col span="12">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="titleText">
|
<view class="titleText">
|
||||||
状态
|
建筑
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{meterInfo.enabled}}">
|
<!-- <view wx:if="{{meterInfo.enabled}}">
|
||||||
正常
|
正常
|
||||||
</view>
|
</view>
|
||||||
<view wx:else>
|
<view wx:else>
|
||||||
停用
|
停用
|
||||||
</view>
|
</view> -->
|
||||||
|
<view> {{ meterInfo.buildingName || "-" }} </view>
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="12">
|
<van-col span="12">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="titleText">
|
<view class="titleText">
|
||||||
读数
|
楼层
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
{{meterInfo.overall}}
|
{{ meterInfo.floor || "-" }}
|
||||||
|
<!-- {{meterInfo.overall}} -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
|
@@ -20,6 +20,15 @@
|
|||||||
.info .title .address {
|
.info .title .address {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info .title .meterType {
|
||||||
|
display: flex;
|
||||||
|
justify-content: end;
|
||||||
|
width: 180rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info .detail {
|
.info .detail {
|
||||||
|
@@ -23,7 +23,7 @@ Component({
|
|||||||
if (newActive === 0) {
|
if (newActive === 0) {
|
||||||
this.setData({ scrollLeft: 0 })
|
this.setData({ scrollLeft: 0 })
|
||||||
} else if (newActive > 0) {
|
} else if (newActive > 0) {
|
||||||
this.setData({ scrollLeft: 220 * newList.length - 20 })
|
this.setData({ scrollLeft: (220 * (newActive) - 20) + "rpx" })
|
||||||
}
|
}
|
||||||
const { scrollWidth } = this.data;
|
const { scrollWidth } = this.data;
|
||||||
if (scrollWidth) {
|
if (scrollWidth) {
|
||||||
@@ -114,7 +114,8 @@ Component({
|
|||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
scrollLeft() {
|
handleScrollLeft() {
|
||||||
|
console.log("left--------------")
|
||||||
// 向左滚动:减少 scrollLeft,但不能小于0
|
// 向左滚动:减少 scrollLeft,但不能小于0
|
||||||
const newScrollLeft = Math.max(0, this.data.scrollLeft - 200);
|
const newScrollLeft = Math.max(0, this.data.scrollLeft - 200);
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -122,7 +123,8 @@ Component({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollRight() {
|
handleScrollRight() {
|
||||||
|
console.log("right-----------------")
|
||||||
// 向右滚动:增加 scrollLeft,但不能超过 maxScrollLeft
|
// 向右滚动:增加 scrollLeft,但不能超过 maxScrollLeft
|
||||||
const newScrollLeft = Math.min(this.data.maxScrollLeft, this.data.scrollLeft + 200);
|
const newScrollLeft = Math.min(this.data.maxScrollLeft, this.data.scrollLeft + 200);
|
||||||
this.setData({
|
this.setData({
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
<text> 电表列表 (总计{{list.length}}块,已抄{{list.length - finishNumber}}块) </text>
|
<text> 电表列表 (总计{{list.length}}块,已抄{{list.length - finishNumber}}块) </text>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex; align-items: center;margin-top: 20rpx;">
|
<view style="display: flex; align-items: center;margin-top: 20rpx;">
|
||||||
<van-icon name="arrow-left" size="50rpx" bind:tap="scrollLeft" />
|
<!-- <van-icon name="arrow-left" size="50rpx" bind:tap="handleScrollLeft" /> -->
|
||||||
<scroll-view
|
<scroll-view
|
||||||
scroll-x="{{true}}"
|
scroll-x="{{true}}"
|
||||||
class="meterListScrollView"
|
class="meterListScrollView"
|
||||||
scroll-left="{{scrollLeft}}"
|
scroll-left="{{scrollLeft}}"
|
||||||
bindscroll="onScroll"
|
scroll-with-animation="{{true}}"
|
||||||
scroll-with-animation="true"
|
scroll-anchoring="{{true}}"
|
||||||
>
|
>
|
||||||
<view style="display: flex;" class="scroll-content">
|
<view style="display: flex;" class="scroll-content">
|
||||||
<meter-item
|
<meter-item
|
||||||
@@ -19,14 +19,13 @@
|
|||||||
wx:for="{{list}}"
|
wx:for="{{list}}"
|
||||||
wx:key="id"
|
wx:key="id"
|
||||||
meter="{{item}}"
|
meter="{{item}}"
|
||||||
bind:click="handleSelect"
|
catch:click="handleSelect"
|
||||||
data-index="{{index}}"
|
data-index="{{index}}"
|
||||||
data-id="{{item.meterId}}"
|
data-id="{{item.meterId}}"
|
||||||
status="{{item.status}}"
|
status="{{item.status}}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<van-icon name="arrow" size="50rpx" bind:tap="scrollRight" />
|
<!-- <van-icon name="arrow" size="50rpx" bind:tap="handleScrollRight" /> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@@ -26,7 +26,7 @@ Component({
|
|||||||
this.checkFinish(newValue)
|
this.checkFinish(newValue)
|
||||||
},
|
},
|
||||||
"meterInfo": function(newValue) {
|
"meterInfo": function(newValue) {
|
||||||
|
console.log("workStatus------------", newValue)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@@ -11,8 +11,9 @@
|
|||||||
<meter-info
|
<meter-info
|
||||||
meterInfo="{{meterInfo}}"
|
meterInfo="{{meterInfo}}"
|
||||||
routeId="{{routeId}}"
|
routeId="{{routeId}}"
|
||||||
disabled="{{meterInfo.status === 1}}"
|
disabled="{{meterList[active].status === 1}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<reading-info
|
<reading-info
|
||||||
meterInfo="{{meterInfo}}"
|
meterInfo="{{meterInfo}}"
|
||||||
showLeft="{{active !== 0}}"
|
showLeft="{{active !== 0}}"
|
||||||
@@ -22,5 +23,5 @@
|
|||||||
routeId="{{routeId}}"
|
routeId="{{routeId}}"
|
||||||
bind:finishNumber="onSetFinishNumber"
|
bind:finishNumber="onSetFinishNumber"
|
||||||
bind:onSubmit="onSubmit"
|
bind:onSubmit="onSubmit"
|
||||||
disabled="{{meterInfo.status === 1}}"
|
disabled="{{meterList[active].status === 1}}"
|
||||||
/>
|
/>
|
Reference in New Issue
Block a user