d第一次提交

This commit is contained in:
dt_2916866708
2024-02-28 17:34:03 +08:00
commit 0689cf2677
1234 changed files with 144804 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<template>
<view class="topbar-container">
<view class="topbar" :style="{height:`${titleStyle.height}px`,paddingTop:`${titleStyle.top}px`}">
{{configuration.title}}
</view>
</view>
</template>
<script>
export default {
name: "TopBar",
props: {
configuration: {
type: Object,
default: () => null
},
titleStyle: {
type: Object,
default: () => {
// #ifdef MP-WEIXIN
return wx.getMenuButtonBoundingClientRect();
// #endif
// #ifndef MP-WEIXIN
return null
// #endif
}
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style scoped>
.topbar-container{
background: linear-gradient(to bottom, #A7CEFF, #F1F2F7);
padding-bottom: 44rpx;
}
.topbar {
display: flex;
color: #191919;
font-size: 34rpx;
font-weight: 400;
justify-content: center;
align-items: center;
background-size: 124rpx 100%;
font-weight: 600;
}
</style>

View File

@@ -0,0 +1,63 @@
.orderItem {
width: 690rpx;
// height: 502rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(132, 132, 132, 0.05);
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
position: relative;
left: 0;
right: 0;
margin: 0 auto;
margin-bottom: 27rpx;
padding: 20rpx;
box-sizing: border-box;
.orderItem-footer {
color: #007dff;
font-size: 30rpx;
padding: 20rpx 0 0 0;
text {
margin-left: 10rpx;
}
}
.orderItem-center {
padding-bottom: 20rpx;
box-sizing: border-box;
.orderItem-line {
overflow: hidden;
margin-top: 20rpx;
.orderItem-line-value {
font-size: 28rpx;
color: #333333;
font-weight: 400;
overflow: hidden;
text {
width: 100%;
overflow: hidden;
text-align: right;
}
}
.orderItem-line-label {
color: #666666;
font-size: 28rpx;
}
}
}
.orderItem-header {
padding-bottom: 20rpx;
border-bottom: solid 1rpx #f3f5f7;
.orderItem-header-type {
font-size: 36rpx;
color: #f98b13;
}
.orderItem-header-number {
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
.bottom-broder {
border-bottom: solid 1rpx #f3f5f7;
}

View File

@@ -0,0 +1,128 @@
<template>
<view class="orderItem">
<!-- 顶部 -->
<view class="orderItem-header flex jw bottom-broder">
<view class="orderItem-header-number">
<view> {{orderData.orderNumber}}</view>
<view> {{orderData.createTime}}</view>
</view>
<view :style="{color:tool.orderStatus(orderData.status).color}" class="orderItem-header-type">{{tool.orderStatus(orderData.status).label}}</view>
</view>
<!-- 中间 -->
<view @click="centerClick" :class="type=='item'?'bottom-broder': ''" class="orderItem-center ">
<view class="orderItem-line flex jw">
<view class="orderItem-line-label">车辆信息</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">
{{orderData.plateNumber}}
</text>
</view>
</view>
<view class="orderItem-line flex jw">
<view class="orderItem-line-label">预计发货时间</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">
{{orderData.departureDate}}
</text>
</view>
</view>
<view v-if="orderData.unloadingDate" class="orderItem-line flex jw">
<view class="orderItem-line-label">卸货时间</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">
{{orderData.unloadingDate}}
</text>
</view>
</view>
<view class="orderItem-line flex jw">
<view class="orderItem-line-label">货物信息</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">
{{dataMark['CARGO_TYPE'][orderData.cargoType ]||'暂无'}}
</text>
</view>
</view>
<view v-if="orderData.weight" class="orderItem-line flex jw">
<view class="orderItem-line-label">货物重量</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">
{{orderData.weight}}
</text>
</view>
</view>
<view v-if="type=='item'" class="orderItem-line flex jw textov">
<view class="orderItem-line-label">备注信息</view>
<view class="orderItem-line-value oneflex flex flex-end ">
<text class="textov">{{orderData.remark||"暂无"}}</text>
</view>
</view>
<view style="word-break: break-all;" v-else class="orderItem-line ">
<view class="orderItem-line-label">备注信息</view>
<view style="margin-top: 10rpx;word-breakbreak-all;" class="orderItem-line-value">
{{orderData.remark||"暂无"}}
</view>
</view>
</view>
<!-- 底部 -->
<view @click="orderItemFooterClick" v-if="type=='item'&orderData.status!=='4'&orderData.uploadFlag=='1' " class="orderItem-footer flex jc ac">
<uni-icons type="compose" size="20" color="#007DFF"></uni-icons>
<text>{{orderData.status | status}}</text>
</view>
</view>
</template>
<script>
export default {
name: "orderItem",
props: {
orderData: {
type: Object,
default: () => null
},
listIndex: {
type: Number,
default: 0
},
type:{
type:String,
default:"item"
}
},
data() {
return {
dataMark: uni.getStorageSync('dataMark') || null,
};
},
filters: {
status(e) {
switch (e) {
case '1':
return '录入发货信息'
case '2':
return '录入卸货信息'
case '3':
return '上传费用'
case '4':
return '已取消'
default :
return '暂无'
}
}
},
methods: {
centerClick(){
this.$emit('orderItemCenterClick',this.orderData)
},
orderItemFooterClick() {
this.$emit('orderItemFooterClick',this.orderData)
// uni.navigateTo({
// url:"/Enter/pages/send/index"
// })
}
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>

View File

@@ -0,0 +1,24 @@
.select-container {
background-color: #f1f2f7;
padding: 30rpx;
.select-list {
min-height: 50vh;
max-height: 50vh;
overflow-y: auto;
.select-list-item {
border-radius: 10rpx;
background-color: #ffffff;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(132, 132, 132, 0.05);
margin-bottom: 20rpx;
box-sizing: border-box;
padding: 40rpx 20rpx;
}
}
.select-search {
margin-bottom: 20rpx;
}
.select-title {
text-align: center;
margin-bottom: 20rpx;
}
}

View File

@@ -0,0 +1,102 @@
<template>
<view>
<uni-popup @change="change" ref="popup" type="bottom" background-color="#fff">
<view class="select-container flex column">
<view class="select-title">
<slot name="title"> 请选择</slot>
</view>
<view class="select-search">
<slot name="search"></slot>
</view>
<view class="select-list oneflex">
<view @click="select(item[selectValue])" v-for="item in options" class="select-list-item flex">
<view class="select-list-item-label oneflex">{{item[label]}}</view>
<view class="select-list-item-bottom">
<radio style="transform:scale(0.7)" :value="item[selectValue]"
:checked="selectedData.includes(item[selectValue])" />
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
maxLength:{
type:Number,
default: 3
},
label:{
type: String,
default: 'label'
},
selectValue:{
type: String,
default: 'value'
},
value: {
type: Boolean,
default: false
},
isMultiple: {
type: Boolean,
default: true
},
options: {
type: Array,
default: () => {
return [ ]
}
}
},
watch: {
options:function(n, o){
this.selectedData=[];
},
value: function(n, o) {
if (n) {
this.$refs.popup.open('bottom')
} else {
this.$refs.popup.close();
this.$emit('settle',this.settle());
}
}
},
created() {},
data() {
return {
selectedData: []
}
},
methods: {
settle(){
return this.isMultiple? this.options.filter(item=>this.selectedData.includes(item[this.selectValue]) ):this.options.find(item=>this.selectedData.includes(item[this.selectValue]))
},
select(e) {
if(this.selectedData.length>=this.maxLength&&!this.selectedData.includes(e)){
uni.showToast({
title:'最多选择3位',
icon:"none"
})
}else{
if (this.isMultiple) {
this.selectedData.includes(e)? this.selectedData.splice(this.selectedData.findIndex(item => item == e), 1): this.selectedData.push(e);
} else {
this.selectedData = this.selectedData.includes(e)?[]:[e];
}
}
},
change(e) {
this.$emit('input', e.show)
},
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>

View File

@@ -0,0 +1,91 @@
.stationItem_bottom_label {
margin-right: 15rpx;
/* padding: 10rpx 15rpx;
border: solid 1rpx #48B8BAFF;
box-sizing: border-box;
border-radius: 32rpx; */
}
.stationItem_bottom_label:last-child {
margin-right: 0;
}
.stationItem_bottom_label_container {}
.stationItem_bottom_label text {
font-size: 24rpx;
color: #000000;
}
.stationItem_bottom_label_logo {
padding: 2rpx 8rpx;
opacity: 1;
border: 2rpx solid #48B8BA;
border-radius: 30rpx;
font-size: 20rpx;
color: #48B8BA;
margin-right: 8rpx;
}
.stationItem_bottom_price {
font-size: 32rpx;
color: #121836;
}
.is_stop_row {
font-size: 24rpx;
color: #CACACA;
margin-bottom: 18rpx;
}
.is_stop_row image {
/* width: 35rpx; */
/* height: 35rpx; */
margin-right: 14rpx;
}
.stationItem_bottom {
margin-top: 30rpx;
}
.stationItem_address {
font-size: 24rpx;
color: #CACACA;
}
.stationItem_distance {
font-size: 24rpx;
color: #121836;
}
.stationItem_top_label_container {
margin-top: 10rpx;
}
.stationItem_top_label {
font-size: 22rpx;
color: #FFFFFF;
padding: 5rpx 17rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx;
margin-right: 12rpx;
}
.stationItem_top_title {
font-size: 30rpx;
font-weight: 400;
color: #000000;
}
.stationItem {
position: relative;
width: 690rpx;
margin: 0 auto;
min-height: 234rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 15rpx 15rpx 15rpx 15rpx;
margin-top: 60rpx;
padding: 25rpx 30rpx;
box-sizing: border-box !important;
}

View File

@@ -0,0 +1,81 @@
<template>
<view v-if="data" @click="goDetails" class="stationItem">
<!-- 上半部分 -->
<view class="stationItem_top">
<view class="stationItem_top_title">{{data.name}}</view>
<view class="flex ac">
<view class=" stationItem_top_label_container oneflex flex">
<view v-for="(item,index) in data.tags" :key="index" :style="{background:item.color}"
class="stationItem_top_label"> {{item.label}}</view>
</view>
<view class="stationItem_distance flex">
<uni-icons style="margin-right: 10rpx;" type="paperplane-filled" color="#121836"
size="15"></uni-icons>
{{data.distance}}KM
</view>
</view>
</view>
<!-- 下半部分 -->
<view class="stationItem_bottom">
<view class="is_stop_row flex ac">
<image style="width: 35rpx;height:40rpx;" src="../../static/stop.png"></image>
{{data.parkFee}}
</view>
<view class=" flex ">
<view class="stationItem_bottom_label_container oneflex flex">
<view class="stationItem_bottom_label flex ac">
<view class="stationItem_bottom_label_logo flex ac jc"></view>
<text>{{data.fastChargingIdleRatio}}</text>
</view>
<view class="stationItem_bottom_label flex ac">
<view style="border: 2rpx solid #36658DFF;color: #36658DFF;" class="stationItem_bottom_label_logo flex ac jc"></view>
<text>{{data.slowChargingIdleRatio}}</text>
</view>
<view class="stationItem_bottom_label flex ac">
<view style="border: 2rpx solid #F67A22FF;color: #F67A22FF;" class="stationItem_bottom_label_logo flex ac jc">其他</view>
<text class="flex">{{data.otherIdleRatio}} </text>
</view>
</view>
<view class="stationItem_bottom_price">{{ tool.getnum(data.unitPrice,3) }}/</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "stationItem",
props: {
data: {
type: Object,
default: () => {}
}
},
data() {
return {
};
},
created() {
console.log(this.data.tags, 'data.tags')
},
methods: {
goDetails() {
let {stationLng,stationLat,id,tags} = this.data;
let location = uni.getStorageSync('location') || {
longitude: 116.38,
latitude: 39.90,
} ;
uni.navigateTo({
url: `/ChargingStation/pages/index/index?data=${JSON.stringify({
stationLng:location.longitude ,
stationLat:location.latitude,id,tags})}`
});
}
}
}
</script>
<style scoped>
@import 'index.css';
</style>

View File

@@ -0,0 +1,38 @@
.tabBar_contaier {
background: #ffffff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
padding-top: 26rpx;
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(213,233,255,0.8);
border-radius: 82rpx 82rpx 0rpx 0rpx;
.tabBar_item {
image {
width: 66rpx;
height: 66rpx;
}
.tabBar_item_text{
color: #CACACA;
font-size: 20rpx;
margin-top: 10rpx;
}
.select_tabBar_item_text{
color: #121836;
}
}
.tabBar_item:nth-child(3) {
width: 50rpx;
position: relative;
image {
position: absolute;
width: 150rpx;
height: 150rpx;
top: -60rpx;
padding: 10rpx;
// left: -10rpx;
background-color: #ffffff;
border-radius: 50%;
}
}
}

View File

@@ -0,0 +1,48 @@
<template>
<view class="tabBar_contaier flex around">
<view @click="selectFn(item,index)" class="tabBar_item flex jc column ac" v-for="(item,index) in tabBarList " :key="index">
<image :src="value==item.selectIndex?item.selectedIconPath:item.iconPath"></image>
<view :class=" 'tabBar_item_text' + (value==item.selectIndex?' .select_tabBar_item_text':'') ">{{item.text}}</view>
</view>
</view>
</template>
<script>
import station from '@/api/station.js'
export default {
name: "tabBar",
props:{
value:{
type:Number,
default:0
},
tabBarList:{
type:Array,
default:()=>[]
}
},
data() {
return {};
},
created() {
// debugger
},
methods:{
async scanCode(){
let res = await this.tool.scanCode();
if(res.result){
uni.navigateTo({
url:`/ChargingStation/pages/placeOrder/index?type=qrCode&id=${res.result}`
})
}
},
selectFn(e,index){
this.$emit('input',e.selectIndex);
}
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>