aircraft-pilot/aircraft/server/order/order.vue

244 lines
5.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="aircraft-order">
<Topnav :topLevel="topLevel" title="爱尚云" />
<u-image width="100%" :src="fileUrl+banner" mode="widthFix" />
<view class="order-list">
<view class="order-item" v-for="(item,index) in orders" :key="index">
<view class="item-first">
<view class="item-status">{{ item.mainOrderStatus }}</view>
<view class="item-type">订单类型<text>{{ item.orderType }}</text></view>
</view>
<view class="item-second">
<view class="item-spot">
<view class="item-dot"/>景区{{ item.attractionId }}
</view>
<view class="item-route">
<view class="item-dot"/>路线{{ item.routeName }}
</view>
</view>
<view class="item-third">
<view class="item-identity">
<u-image class="item-avatar" width="80rpx" height="80rpx"
:src="fileUrl+(item.gender === 0 ? boyIcon : girlIcon)" />
<view class="item-self">
<text class="item-name">{{ item.customerName }}</text>
<text class="item-phone">{{ item.customerPhone }}</text>
</view>
</view>
<view class="item-active">
<u-button type="warning" :custom-style="customStyle" :hair-line="false">执行任务</u-button>
</view>
</view>
</view>
<view class="order-empty" v-if="orders.length===0">
<u-empty text="订单为空" mode="list"
src="/static/empty.png" icon-size="300" font-size="40"
margin-top="250"></u-empty>
</view>
</view>
<Movable :iconName="fileUrl+addIcon" />
<u-toast ref="uToast"></u-toast>
</div>
</template>
<script>
import configService from '@/common/config.service.js';
import Movable from './components/movable.vue';
import Topnav from '@/components/topnav/index.vue';
export default {
// #ifdef MP
options: {
styleIsolation: 'shared'
},
// #endif
components: { Movable, Topnav },
props: {
topLevel:{
type: Number,
default: 0
},
},
data(){
return {
fileUrl: configService.fileUrl + 'aerocraft/order/',//订单页图标基础路径
// 轮播图
banner: 'banner.png',
// 新增图标
addIcon: 'add.png',
// 女生头像
girlIcon: 'girl.png',
// 男生头像
boyIcon: 'boy.png',
// 订单列表
orders: [{
mainOrderStatus: '待接单',
orderType: '载物',
attractionId: '白云山',
customerPhone: '13624566325',
routeName: '南门→山顶广场',
gender: 1,
customerName: '李晓霞'
},{
mainOrderStatus: '待接单',
orderType: '载人',
attractionId: '白云山',
customerPhone: '13624566325',
routeName: '南门→山顶广场',
gender: 0,
customerName: '李道明'
},{
mainOrderStatus: '待接单',
orderType: '载物',
attractionId: '白云山',
customerPhone: '13624566325',
routeName: '南门→山顶广场',
gender: 1,
customerName: '李晓霞'
},{
mainOrderStatus: '待接单',
orderType: '载物',
attractionId: '白云山',
customerPhone: '13624566325',
routeName: '南门→山顶广场',
gender: 1,
customerName: '李晓霞'
}],
// 执行任务按钮样式
customStyle: {
backgroundColor: '#FEE547',
color: '#333333',
fontSize: '30rpx',
fontWeight: 'bold',
fontFamily: 'Source Han Sans SC',
width: '180rpx',
height: '72rpx',
borderRadius: '12rpx',
border: 'none'
}
}
},
methods:{
// 初始化
async init(){
},
}
}
</script>
<style scoped lang="scss">
.aircraft-order{
height: 100%;
display: flex;
flex-direction: column;
.order-list{
flex: 1;
z-index: 1;
margin-top: -30rpx;
width: 100%;
background-color: #F5F5F5;
border-radius: 24rpx 16rpx 16rpx 16rpx;
.order-item{
border-radius: 24rpx 16rpx 16rpx 16rpx;
display: flex;
flex-direction: column;
padding: 0rpx 0rpx 38rpx;
background: #FFFFFF;
margin-bottom: 26rpx;
.item-first{
display: flex;
align-items: center;
.item-status{
width: 120rpx;
height: 60rpx;
background: linear-gradient(0deg, #666666, #333333);
border-radius: 24rpx 0rpx 30rpx 0rpx;
margin-right: 30rpx;
font-family: Source Han Sans SC;
font-weight: 500;
font-size: 28rpx;
color: #FFFEFE;
display: flex;
align-items: center;
justify-content: center;
}
.item-type{
margin-top: 20rpx;
font-family: Source Han Sans SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
text{
font-weight: bold;
font-size: 30rpx;
}
}
}
.item-second{
margin: 38rpx 30rpx 0;
border-bottom: 2rpx solid #E6E6E6;
.item-spot,.item-route{
font-family: Source Han Sans SC;
font-weight: 400;
font-size: 30rpx;
color: #333333;
display: flex;
align-items: center;
.item-dot{
background-color: #FCCF16;
border-radius: 50%;
width: 12rpx;
height: 12rpx;
margin-right: 12rpx;
}
}
.item-spot{
margin-bottom: 30rpx;
}
.item-route{
margin-bottom: 36rpx;
}
}
.item-third{
margin: 28rpx 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.item-identity{
display: flex;
align-items: center;
.item-avatar{
margin-right: 14rpx;
}
.item-self{
display: flex;
flex-direction: column;
justify-content: space-between;
font-family: Source Han Sans SC;
font-weight: 500;
font-size: 28rpx;
color: #333333;
.item-name{
margin-top: 6rpx;
}
.item-phone{
margin-bottom: 6rpx;
font-family: Arial;
}
}
}
.item-active{
}
}
}
}
.order-empty{
&::v-deep .u-icon__label{
margin-top: 24rpx !important;
font-weight: 500;
font-family: Source Han Sans SC;
}
}
}
</style>