123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <template>
- <view>
- <view class="top">
- <view class="top_item item_1">
- <view class="name">地面总车辆数</view>
- <view class="num">{{groundCarCount}}辆</view>
- </view>
- <view class="top_item item_2">
- <view class="name">井下总车辆数</view>
- <view class="num">{{pitCarCount}}辆</view>
- </view>
- </view>
-
- <view class="list">
-
- <view class="item" v-for="item in carList" :key="item.CarID">
- <view class="box_1">
- <view class="left">
- <view class="icon">
- <image src="./icon/vehicle.png" mode=""></image>
- </view>
- <view class="name">{{item.CarUserNo}}</view>
- </view>
- <view class="right">
- <view class="icon"></view>
- <view class="speed">{{item.InterzoneNo}}km/h</view>
- <view class="icon_right">
- <uni-icons type="arrowright"></uni-icons>
- </view>
- </view>
- </view>
- <view class="box_2">
- <view class="icon"></view>
- <view class="name">{{item.InterzoneName}}</view>
- </view>
- <view class="box_3">
- <view class="text">车辆型号:{{item.CarModel}}</view>
- <view class="text">设备类型:{{item.DeviceType}}</view>
- <view class="text">车辆类型:{{item.CarType}}</view>
- <view class="text">平均速度:{{item.AvgSpeed}}</view>
- </view>
- </view>
-
-
-
- </view>
-
- <view class="phone_btn">
- <view class="icon"></view>
- <view class="text">一键叫车</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- carList:[],
- // 地面总车辆
- groundCarCount:'',
- // 井下总车辆
- pitCarCount:''
- };
- },
- onLoad() {
- this.getCarList()
- },
- methods:{
- async getCarList(){
- const res = await this.$myRequest({
- url:"/car/list"
- })
- console.log(res.data.data.carList)
- this.carList = res.data.data.carList
- this.groundCarCount = res.data.data.groundCarCount
- this.pitCarCount = res.data.data.pitCarCount
- }
- }
- }
- </script>
- <style lang="scss">
- page{
- background-color: #f3f3f3;
- }
- .top{
- margin-top: 20rpx;
-
- display: flex;
- justify-content: space-around;
- .top_item{
- box-sizing: border-box;
- padding: 25rpx 15rpx 0;
-
- width: 334rpx;
- height: 143rpx;
- background: #E67E22;
- border-radius: 21rpx;
-
- text-align: center;
- font-size: 33rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 47rpx;
- }
- .item_2{
- background: #27AE60;
- }
- }
- .list{
- margin-top: 20rpx;
- .item{
- margin: 0 auto;
- margin-bottom: 20rpx;
- width: 720rpx;
- background: #FFFFFF;
- border-radius: 15rpx;
-
- box-sizing: border-box;
- padding: 15rpx 22rpx;
- .box_1{
- display: flex;
- justify-content: space-between;
-
- height: 78rpx;
- .left{
- height: 78rpx;
- display: flex;
- align-items: center;
- .icon{
- width: 78rpx;
- height: 78rpx;
- image{
- width: 78rpx;
- height: 78rpx;
- }
- }
- .name{
- margin-left: 18rpx;
- font-size: 33rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #232627;
- line-height: 78rpx;
- }
- }
- .right{
- height: 78rpx;
- display: flex;
- align-items: center;
- .icon{
- width: 47rpx;
- height: 47rpx;
-
- background-image: url(icon/speed.png);
- background-size: cover;
- background-repeat: no-repeat;
- }
- .speed{
- margin-left: 10rpx;
- font-size: 33rpx;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #2ECC71;
- }
- .icon_right{
- margin-left: 28rpx;
- }
- }
- }
- .box_2{
- margin: 0 auto;
- margin-top: 30rpx;
- width: 670rpx;
- height: 77rpx;
- background: #009FE8;
- border-radius: 37rpx;
-
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding-left: 21rpx;
- .icon{
- width: 47rpx;
- height: 47rpx;
-
- background-image: url(icon/position.png);
- background-size: cover;
- background-repeat: no-repeat;
- }
- .name{
- margin-left: 18rpx;
- font-size: 29rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- }
- }
- .box_3{
- margin-top: 25rpx;
-
- display: flex;
- flex-wrap: wrap;
- .text{
- margin-bottom: 24rpx;
- width: 338rpx;
-
- font-size: 29rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #6C6F74;
- line-height: 42rpx;
- }
- }
- }
- }
- .phone_btn{
- position: fixed;
- left: 250rpx;
- bottom: 60rpx;
-
- width: 250rpx;
- height: 77rpx;
- background: #2ECC71;
- border-radius: 47rpx;
-
- display: flex;
- justify-content: center;
- align-items: center;
- .icon{
- width: 37rpx;
- height: 43rpx;
-
- background-image: url(icon/phone.png);
- background-size: cover;
- background-repeat: no-repeat;
- }
- .text{
- margin-left: 18rpx;
- font-size: 33rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- </style>
|