<template>
	<view class="processWrapper ">
		<view class="ding">
			<calendar></calendar>
			
		</view>

		<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">
							<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.des}}
									</view>
								</view>
								<view class="pro-date ">{{item.time}}</view>
							</view>
							<view class="action" style="z-index:99">
								<view class="unProcess" v-if="type==1" >未处理</view>
								<view class="unProcess" v-else>未处理</view>
							</view>
						</view>
						<view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
					</view>
			</view>
		</block>
		<view class="padding-lr padding-bottom-lg" style="position:fixed;bottom:0;width:100%">
			<view class="btn-area">
				<button class="bg-blue  round missReport margin-top" @tap="showModal" data-target="DialogModal" >导 出 </button>
			</view>
		</view>
		
		
		<!-- 弹框 -->
		
		<view class="cu-modal" :class="modalName=='DialogModal'?'show':''">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="action" @tap="hideModal">
						<text class="cuIcon-close"></text>
					</view>
				</view>
				<view class="padding-sm bg-white">
					<image src="../../static/ok.png" style="width:100rpx;height:100rpx"></image>
					<view style="margin:20rpx 0">已导出文件，是否打开？</view>
				</view>
				<view class="cu-bar bg-white" style="min-height: 100rpx;">
					<view class="action margin-0 flex-sub  " @tap="hideModal">
						另存为</view>
					<view class="action margin-0 flex-sub  solid-left text-blue" @tap="hideModal">打开</view>
				</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	import json from '../../data/json.js';
	export default {
		data() {
			return {
				 unporcessList: json.unprocessList,
				 porcessedList: json.processedList,
	
				type: '0',
				modalName: null,
				listTouchStart: 0,
				listTouchDirection: null,
				CustomBar: this.CustomBar,
				TabCur: 0,
				tabNav: ['未处理', '已处理'],
				
				
				CustomBar: this.CustomBar,
				modalName: null,
			};
		},
		onLoad: function(option) {
			

			
		},
		
		onNavigationBarButtonTap(e) {
			console.log(e)
			uni.navigateTo({
				url: '/pages/export/export',
				success: res => {},
				fail: () => {},
				complete: () => {}
			});
		},
		methods: {
			
			showModal(e) {
				this.modalName = e.currentTarget.dataset.target
			},
			hideModal(e) {
				this.modalName = null
			},
			
			// exportData(){
			// 	uni.showModal({
			// 	    title: '提示',
			// 	    content: '已导出文件是否打开？',
			// 	    success: function (res) {
			// 	        if (res.confirm) {
			// 	            console.log('用户点击确定');
			// 	        } else if (res.cancel) {
			// 	            console.log('用户点击取消');
			// 	        }
			// 	    }
			// 	});
			// },
			
			InputFocus(e) {
				this.InputBottom = e.detail.height
			},
			InputBlur(e) {
				this.InputBottom = 0
			},
			
			

			tabSelect(e) {

				console.log(e.currentTarget);
				this.TabCur = e.currentTarget.dataset.id;
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;



			},

			
		}
	}
</script>

<style lang="scss">
	
</style>
