<template>
	<view class="page-container">
		<view class="top-filters">
			<view class="filter-middle">
				<uni-drop-down v-model="status" :menu="taskStatus"></uni-drop-down>
				<input class="search-input" type="text" value="" placeholder="输入文字" />
			</view>
			
			<view class="calender-wrap">
				<uni-icons @click="openCalendar" type="info" color="#fff"></uni-icons>
				<uni-calendar :insert="false" ref="calendar" @confirm="calendarConfirm"></uni-calendar>
			</view>
			
			<view class="submit-btn">
				<text style="color: #fff;font-size: 30rpx;">查询</text>
			</view>
		</view>
		
		<view class="task-detail-item">
			<view class="task-detail-label">
				客户评分：
			</view>
			<view class="task-detail-content">
				<uni-rate :readonly="true" :value="2" :max="5" />
			</view>
		</view>
		<view class="task-detail-item">
			<view class="task-detail-label">
				收到投诉：
			</view>
			<view class="task-detail-content">
				1起
				<navigator url="/pages/task/charts/charts">查看详情</navigator>
			</view>
		</view>
		<view class="task-detail-item">
			<view class="task-detail-label">
				工单完成数：
			</view>
			<view class="task-detail-content">
				10
			</view>
		</view>
		
		<view class="task-detail-item">
			<view class="task-detail-label">
				转单率：
			</view>
			<view class="task-detail-content">
				10%
			</view>
		</view>
		
		<view class="task-detail-item">
			<view class="task-detail-label">
				准时率：
			</view>
			<view class="task-detail-content">
				80%
			</view>
		</view>
		
		<view class="task-chart-area">
			<view>
				工单分布
			</view>
			<view>
				echars
			</view>
		</view>
	</view>
</template>

<script>
	import {taskStatus} from '../configs.js'
	export default {
		data() {
			return {
				taskStatus,
				status: 'all'
			}
		},
		methods: {
			openCalendar() {
				this.$refs.calendar.open();
			},
			calendarConfirm() {}
		}
	}
</script>

<style lang="less" scoped>
	.page-container {
		width: 100%;
		background-color: #CCCCCC;
	}
	.top-filters {
		display: flex;
		height: 72rpx;
		align-items: center;
		justify-content: center;
		padding: 20rpx 20rpx;
	}
	.filter-middle {
		flex: 1;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		background-color: #fff;
		border-radius: 8rpx;
		position: relative;
		height: 72rpx;
	}
	.filter-select {
		padding: 0 20rpx;
	}
	.calender-wrap {
		margin: 0 20rpx;
	}
	.search-input {
		flex: 1;
		background-color: #fff;
		font-size: 30rpx;
		padding: 0 10rpx;
		color: #666;
	}
	.task-detail {
		width: 100%;
		&-item {
			width: 100%;
			display: flex;
			align-items: center;
			flex-direction: row;
			border-bottom: 1px solid #666;
			padding: 10rpx 20rpx;
		}
		&-label {
			width: 200rpx;
		}
		&-content {
			flex: 1;
			display: flex;
		}
		&-bottom {
			display: flex;
			justify-content: space-between;
			padding: 0 40rpx;
			margin-top: 40rpx;
		}
	}
</style>
