<template>
	<view class="processWrapper ">
		
		<block v-if="TabCur==0">
			<view class="processList">
				<view class="cu-list menu-avatar ">
					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index"  @tap="goUnprocessDetail">
						<view class="cu-avatar lg" style="background-image:url(../../static/process-icon.png);"></view>
						<view class="content">
							<view class="pro-title">
								<view class="cut">{{item.title}}</view>
							</view>
							<view class="pro-des  ">
								<view class="text-cut">
									{{item.subTitle}}
								</view>
							</view>
							<view class="pro-date ">{{item.time}}</view>
						</view>
						<view class="action">
							<view class="unProcess">{{item.status}}</view>
						</view>
					</view>
				</view>
			</view>
		</block>
		<block v-if="TabCur==1">
			<view class="processList">
				<view class="cu-list menu-avatar ">
					<view class="cu-item" v-for="(item,index) in processedList" :key="index" @tap="goProcessedDetail">
						<view class="cu-avatar lg" style="background-image:url(../../static/processed-icon.png);"></view>
						<view class="content">
							<view class="pro-title">
								<view class="cut">{{item.title}}</view>
							</view>
							<view class="pro-des  ">
								<view class="text-cut">
									{{item.subTitle}}
								</view>
							</view>
							<view class="pro-date ">{{item.time}}</view>
						</view>
						<view class="action">
							<view class="processed">{{item.status}}</view>
						</view>
					</view>
				</view>
			</view>
		</block>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				unporcessList:[{
					title:'母线停电',
					subTitle:'动作',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电2',
					subTitle:'复归',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电3',
					subTitle:'动作',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电4',
					subTitle:'复归',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电5',
					subTitle:'复归',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电6',
					subTitle:'复归',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'复归',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件未处理测试',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件未处理测试',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件未处理测试',
					status:'未处理',
					time:'2020-01-08 15:15:12'
				}],
				processedList:[{
					title:'母线停电',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电2',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电3',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电4',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电5',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},{
					title:'母线停电6',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				},
				{
					title:'母线停电',
					subTitle:'事件已处理测试',
					status:'已处理',
					time:'2020-01-08 15:15:12'
				}],

				
				modalName: null,
				listTouchStart: 0,
				listTouchDirection: null,
				CustomBar: this.CustomBar,
				TabCur: 0,
				
				tabNav: ['未处理', '已处理']
			};
		},
		methods: {
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
			},
			
			// 页面跳转
			goUnprocessDetail() {
				uni.navigateTo({
					url: '/pages/unprocessDetail/unprocessDetail',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},
			goProcessedDetail(){
				uni.navigateTo({
					url: '/pages/processedDetail/processedDetail',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
				
			}
		}
	}
</script>

<style lang="scss">

	.processList{
		position:static;
	}
	
</style>
