ownerDetail.vue
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<view class="company_container">
<up-navbar placeholder title="车主详情" autoBack leftIconColor="#fff" :titleStyle="titleStyle" bgColor="transparent" />
<view class="work_box">
<!-- 车主信息 -->
<view class="ownerInfo">
<view class="header_info">
<navTop />
<ownerInfo />
</view>
<view class="navlist">
<view v-for="(item, index) in navList" :key="item.id" class="nav_item" :class="{active: current === index}" @click="toggle(index)">
{{ item.title }}
</view>
<view class="line"></view>
</view>
<view v-for="scheduleItem in 10" :key="scheduleItem" class="schedule">
<view class="applyTime">
<text class="li"></text>
<text>2024-09-09</text>
</view>
<commentCard />
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import navTop from '@/components/navTop.vue';
import ownerInfo from '@/components/ownerInfo.vue';
import commentCard from '@/components/commentCard.vue';
const current = ref(0)
const navList = ref([
{ id: 1, title: "进度汇报" },
{ id: 2, title: "转单" },
{ id: 3, title: "办结" }
])
const titleStyle = {
fontSize: '36rpx',
color: '#fff',
fontWeight: 500
}
const leftWidth = ref(0)
const toggle = (index) => {
leftWidth.value = `${index * 230}rpx`
current.value = index
}
</script>
<style lang="scss" scoped>
.company_container{
width: 100%;
height: 100vh;
background: url('http://bxhd.crgx.net/profile/avatar/2024/09/25/bg-index_20240925113012A004.png') no-repeat;
background-size: 100% 100%;
overflow: hidden;
.work_box{
padding: 20rpx 30rpx 180rpx;
height: calc(100vh - 88rpx);
background-color: #F8F9FF;
overflow-y: scroll;
.ownerInfo{
background: #fff;
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(10,22,44,0.06);
border-radius: 20rpx;
overflow: hidden;
.header_info{
padding: 22rpx 30rpx;
}
}
}
}
.navlist{
position: relative;
display: flex;
align-items: center;
height: 58rpx;
.line{
position: absolute;
bottom: 0;
left: v-bind(leftWidth);
width: 230rpx;
height: 4rpx;
background-color: #3680FE;
transition: all .5s;
}
.nav_item{
flex: 1;
text-align: center;
color: #999999;
font-size: 24rpx;
line-height: 58rpx;
&.active{
color: #3680FE;
font-weight: 500;
}
}
}
.schedule{
padding: 20rpx 30rpx 30rpx;
border-bottom: 2rpx solid #eee;
.applyTime{
display: flex;
align-items: center;
gap: 20rpx;
color: #3d3d3d;
font-size: 24rpx;
line-height: 32rpx;
margin-bottom: 20rpx;
.li{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background-color: #3680FE;
}
}
&:last-child{
border-bottom: 0;
}
}
</style>