uniapp steps步骤条 uview组件 实现样式如图~

实现效果图如下:


代码如下:

<template>
	<view class="container">
		<u-steps dot direction="column" current="2" class="stepbox">
			<u-steps-item v-for="(item,index) in stepList" :key="index">
				<view class="topbox" slot="desc">
					<view class="stepTitle">
						<view :class="item.stat=='0'?'textColor':'textColore'">{{item.statVal}}</view>
						<view>{{item.date}}</view>
					</view>
					<view class="itembox">
						<view class="d-flex u-flex-row justify-content-between">
							<view>{{item.workName}}</view>
							<view>{{item.operate}}</view>
						</view>
						<view class="font-size-sm text-color-assist item">
							<view>产品编号{{item.productNum}} </view>
							<view>良品数量:<text>{{item.goodNum}}</text> / 不良品数量: <text>{{item.defectNum}}</text></view>
							<view>不良原因:{{item.reason}}</view>
						</view>
					</view>
				</view>
			</u-steps-item>
		</u-steps>
	</view>
</template>

目前采用的是本地测试数据,具体可根据自己需求来改:

<script>
	export default {
		data() {
			return {
				stepList: [{
						id: '0',
						state: '备料中',
						date: '2023.04.11 10:22:01',
						workName: '操作工A',
						operate: '备料',
						productNum: '2013ASDE433dd',
						goodNum: "200",
						defectNum: '50',
						reason: '设备维修中'
					},
					{
						id: '1',
						state: '已跟进',
						date: '2023.06.22 11:32:45',
						workName: '操作工A',
						operate: '投料',
						productNum: '2013ASDE433dd',
						goodNum: "200",
						defectNum: '50',
						reason: '人员不足'

					},
					{
						id: '2',
						state: '操作中',
						date: '2023.08.04 13:01:31',
						workName: '搅拌',
						operate: '下料',
						productNum: '2013ASDE433dd',
						goodNum: "200",
						defectNum: '50',
						reason: '设备数量过少'
					},
					{
						id: '3',
						state: '已完结',
						date: '2023.09.20 08:10:28',
						workName: '操作工A',
						operate: '称量',
						productNum: '2013ASDE433dd',
						goodNum: "200",
						defectNum: '50',
						reason: '人员不足'
					},
				],
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;	
		box-sizing: border-box;
        .title{
			background: #fff;
			line-height: 80rpx;
			padding-left: 20rpx;
		}
		.stepbox{
			padding: 40rpx;
			.topbox {
				width: 100%;
				.stepTitle {
					display: flex;
					flex-direction: row;
					justify-content: space-between;
					font-size: 26rpx;
					
					.textColor {
						color: #307AF0;
					}
					.textColore {
						color: #333333;
					}
				}
			
				.itembox {
					width: 550rpx;
					background: #fff;
					margin: 20rpx;
					display: flex;
					flex-direction: column;
					border-radius: 20rpx;
					padding: 30rpx 70rpx 30rpx 30rpx;
			
					.item {
						margin-top: 20rpx;
						line-height: 50rpx;
			
						text {
							color: blue;
							margin-right: 6rpx;
						}
					}
				}
			}
				
		}
		
	}
	::v-deep .u-steps-item__wrapper {
		background: #E2E7F5;
		border-radius: 30rpx;
	}
</style>

  • 9
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值