432 lines
9.6 KiB
Vue
432 lines
9.6 KiB
Vue
<template>
|
|
<view class="container">
|
|
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
|
|
<view class="bodyTopBg"></view>
|
|
<view class="body">
|
|
<view class="userInfoBox" @click="showUserDetail">
|
|
<image style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-if="''==userInfo.avatar || null == userInfo.avatar" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
|
|
<image style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else :src="imgUrlPrex+userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
|
|
<view class="userInfo">
|
|
<text class="userName">{{ userInfo.nickname }}</text>
|
|
<!-- <text class="userType">{{ userInfo.userType }}</text>-->
|
|
</view>
|
|
<image style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
|
|
</view>
|
|
<view class="body-top-grid">
|
|
<view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)">
|
|
<view>
|
|
<view class="title">{{ item.title }}</view>
|
|
<view class="desc">{{ item.desc }}</view>
|
|
<image class="btn" mode="aspectFit" src="@/static/icons/homeMenuIcon/menuBtn.png"></image>
|
|
</view>
|
|
<image :src="item.icon" class="icon" mode="aspectFit"></image>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="todoListBox">
|
|
<view class="title">
|
|
待办工单
|
|
<text class="titleDesc">当前共
|
|
<text class="titleCount">2</text>
|
|
项工单需要处理
|
|
</text>
|
|
</view>
|
|
<view class="todoList">
|
|
<order-card v-for="(item, index) in orderList" :key="index" :order="item"></order-card>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<tabBarVue msg="1"></tabBarVue>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
|
import OrderCard from "@/components/orderCard.vue";
|
|
import config from '@/config'
|
|
import {
|
|
getToken,
|
|
getUserInfo
|
|
} from '@/utils/auth'
|
|
|
|
export default {
|
|
components: {
|
|
OrderCard,
|
|
tabBarVue,
|
|
VNavigationBar
|
|
},
|
|
data() {
|
|
return {
|
|
imgUrlPrex:config.baseImageUrl,
|
|
userInfo: {
|
|
avatar: undefined,
|
|
nickname: '曾廷'
|
|
},
|
|
menuList: [
|
|
{
|
|
title: '新建工单',
|
|
desc: '直接添加客户订单',
|
|
icon: require('@/static/icons/homeMenuIcon/menu1.png'),
|
|
path: '/pages-order/addOrder/addOrder'
|
|
},
|
|
{title: '预约开单', desc: '查询预约记录', icon: require('@/static/icons/homeMenuIcon/menu1.png'), path: '/pages-order/appointOrder/appointOrder'}
|
|
],
|
|
bannerIndex: 0,
|
|
shopList: [],
|
|
bannerList: [],
|
|
richTextHtml: null,
|
|
orderList: [
|
|
{
|
|
orderNo: '1209840149750105501',
|
|
flag: 1, flagStr: '待处理', carNum: '川A 184AO1',
|
|
carModel: '一汽奥迪 2024款 A6L',
|
|
projectList: [
|
|
{ name: '清洗内饰', id: 1 },
|
|
{ name: '内饰精洗除臭', id: 2 },
|
|
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
],
|
|
userName: '张三',
|
|
userPhone: '157****6879',
|
|
appointDate: '2024-10-20 12:00',
|
|
counselorName: '李相东'
|
|
},
|
|
{
|
|
orderNo: '1209840149750105501',
|
|
flag: 1, flagStr: '待处理', carNum: '川A 184AO1',
|
|
carModel: '一汽奥迪 2024款 A6L',
|
|
projectList: [
|
|
{ name: '清洗内饰', id: 1 },
|
|
{ name: '内饰精洗除臭', id: 2 },
|
|
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
],
|
|
userName: '张三',
|
|
userPhone: '157****6879',
|
|
appointDate: '2024-10-20 12:00',
|
|
counselorName: '李相东'
|
|
}
|
|
],
|
|
defaultAvatar: require('@/static/icons/avatar.png')
|
|
}
|
|
},
|
|
onLoad() {
|
|
if(!getToken()){
|
|
uni.reLaunch({
|
|
url: '/pages/login/login'
|
|
})
|
|
}else{
|
|
//直接取缓存中的用户信息
|
|
this.userInfo = getUserInfo()
|
|
}
|
|
},
|
|
methods: {
|
|
gotoPage(menu) {
|
|
uni.navigateTo({
|
|
url: menu.path
|
|
})
|
|
},
|
|
avatarErr(err) {
|
|
console.log('err', err)
|
|
this.userInfo.avatar = this.defaultAvatar
|
|
},
|
|
showUserDetail() {
|
|
uni.navigateTo({
|
|
url: '/pages/my/myInfo'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.container {
|
|
height: 100%;
|
|
//background: linear-gradient(180deg, #0174F6 0%, rgba(1, 116, 246, 0) 100%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
padding-top: 60rpx;
|
|
background-color: #F3F5F7;
|
|
|
|
|
|
.bodyTopBg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 500rpx;
|
|
background-image: url("@/static/bg.png");
|
|
background-size: 100% 100%;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.body {
|
|
position: relative;
|
|
z-index: 10;
|
|
flex: 1;
|
|
height: 0;
|
|
overflow: auto;
|
|
padding-bottom: 30rpx;
|
|
}
|
|
|
|
.userInfoBox {
|
|
margin: 0 32rpx 40rpx;
|
|
|
|
display: flex;
|
|
column-gap: 20rpx;
|
|
align-items: center;
|
|
|
|
.userInfo {
|
|
flex: 1;
|
|
width: 0;
|
|
.userName {
|
|
font-weight: bold;
|
|
font-size: 36rpx;
|
|
color: #333333;
|
|
display: block;
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.userType {
|
|
font-size: 24rpx;
|
|
color: #0174F6;
|
|
display: inline-block;
|
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
border: 1rpx solid #0174F6;
|
|
padding: 8rpx 16rpx;
|
|
}
|
|
}
|
|
}
|
|
.body-top-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
column-gap: 30rpx;
|
|
margin: 0 32rpx;
|
|
|
|
.body-top-item {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 30rpx 0 30rpx 20rpx;
|
|
background: linear-gradient(360deg, #FFFFFF 0%, #D7EAFF 100%);
|
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
border: 2rpx solid;
|
|
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(202, 223, 247, 1)) 2 2;
|
|
|
|
& > view:first-child {
|
|
flex: 1;
|
|
width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
row-gap: 30rpx;
|
|
}
|
|
|
|
.title {
|
|
font-weight: bold;
|
|
font-size: 32rpx;
|
|
color: #113A68;
|
|
}
|
|
|
|
.desc {
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
color: #858BA0;
|
|
}
|
|
|
|
.btn {
|
|
width: 40rpx;
|
|
height: 30rpx;
|
|
}
|
|
|
|
.icon {
|
|
width: 136rpx;
|
|
height: 136rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.todoListBox {
|
|
margin: 40rpx 32rpx;
|
|
|
|
.title {
|
|
margin-bottom: 30rpx;
|
|
font-weight: bold;
|
|
font-size: 32rpx;
|
|
color: #113A68;
|
|
|
|
.titleDesc {
|
|
margin-left: 20rpx;
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
color: #858BA0;
|
|
}
|
|
|
|
.titleCount {
|
|
color: #0174F6;
|
|
}
|
|
}
|
|
|
|
.todoList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
row-gap: 20rpx;
|
|
}
|
|
}
|
|
|
|
.body-top-banner {
|
|
text-align: center;
|
|
}
|
|
|
|
.banner {
|
|
margin: 24rpx 0 0;
|
|
width: 686rpx;
|
|
height: 100%;
|
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
background-color: #0174F6;
|
|
}
|
|
|
|
.menus {
|
|
margin: 30rpx auto 0;
|
|
box-sizing: border-box;
|
|
width: 686rpx;
|
|
padding: 40rpx 38rpx;
|
|
background: #FFFFFF;
|
|
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(10, 54, 104, 0.1);
|
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
row-gap: 22rpx;
|
|
font-size: 24rpx;
|
|
|
|
.menu-icon {
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
}
|
|
}
|
|
|
|
.info {
|
|
width: 686rpx;
|
|
margin: 38rpx auto 0;
|
|
display: flex;
|
|
align-items: center;
|
|
column-gap: 20rpx;
|
|
|
|
.info-icon {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
}
|
|
|
|
.infoList {
|
|
flex: 1;
|
|
width: 0;
|
|
|
|
.infoItem {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
column-gap: 10rpx;
|
|
}
|
|
|
|
.infoIndex {
|
|
width: 12rpx;
|
|
height: 12rpx;
|
|
border-radius: 50%;
|
|
background-color: #333;
|
|
}
|
|
|
|
.infoText {
|
|
flex: 1;
|
|
width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
|
|
.more-icon {
|
|
width: 24rpx;
|
|
height: 24rpx;
|
|
}
|
|
}
|
|
|
|
.repairShop {
|
|
width: 686rpx;
|
|
margin: 38rpx auto 0;
|
|
|
|
.title {
|
|
font-weight: bold;
|
|
font-size: 32rpx;
|
|
color: #333333;
|
|
}
|
|
|
|
.shopList {
|
|
.shopItem {
|
|
padding: 30rpx 0;
|
|
border-bottom: 1rpx solid #DDDDDD;
|
|
display: flex;
|
|
align-items: center;
|
|
column-gap: 20rpx;
|
|
}
|
|
|
|
.shopImg {
|
|
width: 160rpx;
|
|
height: 100rpx;
|
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
background-color: #999;
|
|
}
|
|
|
|
.shopInfo {
|
|
flex: 1;
|
|
width: 0;
|
|
}
|
|
|
|
.shopTitle {
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #333333;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.shopDetail {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 24rpx;
|
|
color: #666666;
|
|
column-gap: 10rpx;
|
|
}
|
|
|
|
.shopAddress {
|
|
flex: 1;
|
|
width: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.line {
|
|
width: 2rpx;
|
|
height: 24rpx;
|
|
background-color: #858BA0;
|
|
}
|
|
|
|
.shopDistance {
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|