gasSwiper.vue
4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<template>
<view class="cardCss" v-if="swipers.length">
<swiper class="uni-swiper-wrapper" active-class="swiperCss" indicator-active-color="#EA5604" indicator-dots
circular interval="3000">
<swiper-item v-for="(item,index) in swipers" :key="item.id+item.fZt">
<view class="cardItemCss">
<view class="flex">
<view class="iconCss">
<u-image src="/static/images/gas-icon/gas-bottle.png" mode="heightFix" width="50px" height="50px"></u-image>
</view>
<view class="topBodyCss flex justify-between">
<view
class="flex flex-direction justify-center align-start margin-top-sm margin-left-xl">
<view class="flex text-lg" @click="goToGasBottlePage(item)">
{{item.fQpgg || ""}} {{item.fCzjz || ""}}
<u-icon class="margin-left-xs" name="arrow-right"></u-icon>
</view>
<view class="text-gray margin-top-sm">
{{item.fQptm || ""}}
</view>
</view>
<view
class="flex flex-direction justify-start align-center margin-top-sm margin-right-sm">
<view class="flex">
<u-tag color="#0CB6C3" borderColor="#fff" :text="item.fZt || ''" size="mini"
bgColor="#E6F7F7"></u-tag>
</view>
<!-- <view class="text-orange margin-top-sm">
2/99
</view> -->
</view>
</view>
</view>
<u-divider></u-divider>
<view class="flex justify-around align-center margin-tb">
<view class="flex flex-direction align-center">
<view class="flex align-center" style="height: 30px;">
<text class="text-xxl text-bold">{{item.fQpgg || ""}}</text>
<!-- <text>(L)</text> -->
</view>
<view class="margin-top-sm flex justify-end text-gray">
预计气量
</view>
</view>
<view class="flex flex-direction" @click="goToGasBottlePage(item)">
<view class="flex justify-center">
<u-image src="/static/images/home/qpxx.png" mode="heightFix" width="30px" height="30px"></u-image>
</view>
<view class="margin-top-sm text-gray">
气瓶信息
</view>
</view>
<view class="flex flex-direction" @click="goTohomeSecurityCheckPage(item)">
<view class="flex justify-center">
<u-image src="/static/images/home/rhaj.png" mode="heightFix" width="30px" height="30px"></u-image>
</view>
<view class="margin-top-sm text-gray">
入户安检
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
<view class="flex bomTextCss justify-center text-orange text-lg" @click="goToMyGasBottle">
查看其他气瓶状态
</view>
</view>
</template>
<script>
export default {
name: "gasSwiper",
data() {
return {
parmas: {
current: 1,
size: 10,
zt:'使用中'
},
swipers: []
};
},
mounted() {
this.getwQpssxxList()
},
methods: {
async getwQpssxxList() {
const result = await this.$api.memberApi.getwQpssxxList(this.parmas);
let {code,value} = result;
if (code === 200) {
this.swipers = value.records
}
console.log("在用气瓶列表",this.swipers);
},
goToGasBottlePage(val) {
console.log('打印val',val);
let itemId = val.id;
// if(val.ajid){
// itemId = val.ajid
// }
uni.navigateTo({
url: `/pages/home/gasBottle?qpid=${itemId}`
})
},
goToMyGasBottle() {
uni.navigateTo({
url: '/pages/mine/myGasBottle'
})
},
goTohomeSecurityCheckPage(val) {
console.log('打印val',val);
uni.navigateTo({
url:`/pages/mine/appList/homeSecurity/checkDetail?id=${val.fAjid}`
})
// uni.navigateTo({
// url: '/pages/mine/appList/homeSecurity/homeSecurityCheck'
// })
},
}
}
</script>
<style lang="scss">
.cardCss {
border-radius: 15px;
background: #fff;
padding: 10px;
overflow: hidden;
.cardItemCss {
// height: 350px;
position: relative;
.iconCss {
padding: 10px 0 0 25px;
}
.topBodyCss {
width: 100%;
}
}
.bomTextCss {
padding-top: 30px;
}
}
/deep/.uni-swiper-dots {
bottom: -20px;
}
/deep/.uni-swiper-wrapper {
overflow: visible;
}
</style>