<!-- 不同状态列表 -->
<template>
	<view>
		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="back"></uni-nav-bar>
		<view class="" v-for="item in orderList" :key="item.id">
			<view v-if="item.type == type"  @click="goDetail(item.id)">
				<OrderList lable1="" :value1="item.orderNo" lable2="" :value2="item.typeName" lable3="来源:"
					:value3="item.source" lable4="" :value4="item.data" lable5="" :value5="item.typeList" lable6="截止时间:"
					:value6="item.endTime" :type="item.type"></OrderList>
			</view>
		</view>
	</view>
</template>

<script>
	import OrderList from '../components/OrderList.vue'
	export default {
		components: {
			OrderList
		},
		data() {
			return {
				title:'',
				type:'',
				orderList: [{
						orderNo: "AJD266352001452",
						typeName: "数控-定期检测",
						source: "配置处理",
						data: "7周 第二周",
						type: 1, //1:截止时间红色字体  2：完成时间灰色字体
						typeList: "待接单",
						endTime: "2022-2-12",
					},
					{
						orderNo: "AJD266352001452",
						typeName: "数控-定期检测",
						source: "7周 第二周",
						data: "2021-11-06 14:6",
						type: 2, //1:截止时间红色字体  2：完成时间灰色字体
						typeList: "已执行",
						endTime: "2022-2-12",
					},
					{
						orderNo: "AJD266352001452",
						typeName: "数控-定期检测",
						source: "7周 第二周",
						data: "2021-11-06 14:6",
						type: 3, //1:截止时间红色字体  2：完成时间灰色字体
						typeList: "已处置",
						endTime: "2022-2-12",
					},
					{
						orderNo: "AJD266352001452",
						typeName: "数控-定期检测",
						source: "7周 第二周",
						data: "2021-11-06 14:6",
						type: 4, //1:截止时间红色字体  2：完成时间灰色字体
						typeList: "异常",
						endTime: "2022-2-12",
					}
				],
			}
		},
		onLoad(options) {
			this.title = options.title
			this.type = options.type
		},
		methods: {
			goDetail(id){
				uni.navigateTo({
					url:'../detail/detail?id=' + id
				})
			},
			
		}
	}
</script>

<style>

</style>
