ownerDetail.vue 2.7 KB
<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>