<template>
	<view :class="{'gray':store.isgray==1}">
		<customNav>
			<view class="nav_box f-row aic jcb">
				<view class="back f-row aic" @click="back">
					<uni-icons type="left" size="20" color="#fff"></uni-icons>
				</view>
				<view class="search f-row aic">
					<input type="text" v-model="searchKey" @confirm="search" @blur="showicon=true&&!searchKey"
						@focus="showicon=false" />
					<view class="f-row aic" v-if="showicon">
						<image src="@/static/search.png" mode=""></image>
						<text>搜索</text>
					</view>
				</view>
			</view>
		</customNav>
		<view class="list_box">
			<view class="list" v-for="item,i in 3" :key="i" @click="jump(`/pages/meeting/detail?id=1`)">
				<view class="title f-row aic jcb">
					<view class="">
						年度部门讨论会议
					</view>
					<text>1分钟前</text>
				</view>
				<view class="info">
					<view class="f-row aic jcb">
						<view class="">
							发起人：
						</view>
						<text>周如意</text>
					</view>
					<view class="f-row aic jcb">
						<view class="">
							会议日期：
						</view>
						<text>周如意</text>
					</view>
					<view class="f-row aic jcb">
						<view class="">
							会议地点：
						</view>
						<text>周如意</text>
					</view>
					<view class="f-row aic jcb">
						<view class="">
							会议内容：
						</view>
						<text>周如意</text>
					</view>
				</view>
				<!-- <view class="btn f-row aic jcb">
					<view class="entrust">
						拒绝
					</view>
					<view class="handle">
						同意
					</view>
				</view> -->
				<view class="handled f-row">
					<view class="refused"> 
						已拒绝
					</view>
					<!-- <view class="agreed">
						已同意
					</view> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		useStore
	} from '@/store'
	const store = useStore()
	import {
		huiyilistApi
	} from '@/api/api.js';
	import customNav from '@/bpm/customNav.vue';
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		beforeJump
	} from '@/utils/index.js';
	const showicon = ref(true)
	const searchKey = ref('')
	onLoad(() => {
		// huiyilist()
	})
	const huiyilist = () => {
		huiyilistApi().then((res) => {
			if (res.success) {

			}
		}).catch((err) => {
			console.log(err);
		})
	}
	const jump = (url) => {
		beforeJump(url, () => {
			uni.navigateTo({
				url
			})
		})
	}
	const back = () => {
		uni.navigateBack()
	}
</script>

<style lang="scss" scoped>
	.nav_box {
		position: absolute;
		bottom: 14rpx;
		width: 100%;
		left: 0;
	}

	.back {
		padding: 0 30rpx;
	}

	.search {
		position: relative;
		padding-right: 30rpx;
		flex: 1;

		view {
			position: absolute;
			left: 28rpx;
			top: 50%;
			transform: translateY(-50%);

			font-size: 28rpx;
			color: #999999;

		}

		input {
			flex: 1;
			height: 72rpx;
			background: #F8F8F8;
			border-radius: 44rpx;
			padding: 0 28rpx;
		}

		image {
			width: 34rpx;
			height: 34rpx;
			margin-right: 16rpx;
		}
	}

	.list_box {
		padding: 14rpx 30rpx 0 30rpx;
		margin-top: 24rpx;

		.list {
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
			border-radius: 16rpx;
			padding: 30rpx;
			margin-bottom: 30rpx;

			.title {
				border-bottom: 1px solid #efefef;
				padding-bottom: 24rpx;
				margin-bottom: 8rpx;

				view {
					font-size: 28rpx;
					color: #333333;
				}

				text {
					font-size: 28rpx;
					color: #999999;
				}
			}

			.info {
				font-size: 28rpx;
				color: #666666;

				view {
					padding-top: 16rpx;
				}
			}

			.btn {
				margin-top: 30rpx;

				view {
					width: 300rpx;
					height: 64rpx;
					border-radius: 8rpx;
					font-size: 28rpx;
					text-align: center;
					line-height: 64rpx;
				}

				.entrust {
					background: #FFFFFF;
					border: 2rpx solid #01508B;
					box-sizing: border-box;
					color: #01508B;
				}

				.handle {
					background: #01508B;
					color: #FFFFFF;
				}
			}
		}
	}

	.refused {

		color: #333333;
	}

	.agreed {

		color: #01508B;
	}

	.handled {
		justify-content: flex-end;
		margin-top: 30rpx;

		view {
			width: 150rpx;
			height: 64rpx;
			background: #EFEFEF;
			border-radius: 8rpx;
			text-align: center;
			line-height: 64rpx;
			font-size: 28rpx;
		}
	}
</style>