| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <template>
- <view >
- <view class="recommend-info" >
- <view class="goods-list">
- <view @click="showDetail(item)" class="list" v-for="(item,index) in list" :key="index">
- <view class="pictrue" >
- <!-- 入场记录 -->
- <image v-if="current==0" :src="item.enterImgPath?item.enterImgPath:'/static/index/noimg3.png'" mode="scaleToFill"></image>
- <!-- 出场记录 -->
- <image v-if="current==1" :src="item.outImgPath?item.outImgPath:'/static/index/noimg3.png'" mode="scaleToFill"></image>
-
- <view class="car">{{item.carNo}}</view>
- </view>
- <view class="content">
- <view>
- <u-icon style="margin-right: 15rpx;" name="clock-fill" color="#5064eb" size="34"></u-icon>
- <text>进:{{formatDate(item.enterTime)}}</text>
- </view>
- <!-- 出场时间 -->
- <view v-if="current==1" style="padding-top: 8rpx;">
- <text class="cuIcon-timefill base-color margin-right-10"></text>
- <text>出:{{formatDate(item.outTime)}}</text>
- </view>
- <!-- 入场车道 -->
- <view v-if="current==0" style="padding-top: 8rpx;">
- <u-icon style="margin-right: 10rpx;" name="map-fill" color="#5064eb" size="36"></u-icon>
- <text>{{item.enterGateName}}</text>
- </view>
- <view class="flex justify-center" style="margin: 20rpx 0 0;">
- <view class="cu-btn base-line round df" style="width: 70%;">
- 查看详情
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props:{
- list: {
- type: Array,
- default: () => {
- return []
- }
- },
- current: {
- type: Number,
- default: () => {
- return 0
- }
- },
- },
- data() {
- return {
-
- }
- },
- computed:{
- formatDate(){
- return val=>{
- if (this.$isEmpty(val)) {
- return '未知'
- }
- return this.$u.timeFormat(new Date(val).getTime(), 'mm-dd hh:MM:ss')
- }
- },
- },
- methods: {
- showDetail(item){
- uni.navigateTo({
- url:"/pages/index/car/detail?id="+item.id+"¤t="+this.current
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- /* 为你推荐 */
- .recommend-info{
- width: 100%;
- .recommend-title{
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100rpx;
- .title{
- display: flex;
- align-items: center;
- image{
- width: 416rpx;
- height: 40rpx;
- }
- }
- }
- .goods-list{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- padding: 0 30rpx;
- .list{
- width: 49%;
- height: 540rpx;
- margin-bottom: 20rpx;
- background-color: #FFFFFF;
- border-radius: 10rpx;
- overflow: hidden;
- .pictrue{
- width: 100%;
- position: relative;
- image{
- border-top-right-radius: 12rpx;
- border-top-left-radius: 12rpx;
- height: 330rpx;
- }
- .car{
- position: absolute;
- bottom: 20rpx;
- left: 10rpx;
- color: #FFFFFF;
- }
- }
-
- .content{
- padding: 20rpx;
- text{
- padding: 10rpx 0;
- }
- }
-
- }
- }
- }
- </style>
|