<template>
	<view class="container">
		<view  v-for="item in dataList" class="uni-list-item">
			<view class="uni-list-item__container">
				<view class="uni-list-item__content" @click="handleClick(item)">
					<view class="uni-list-item__content-title">{{item.title}}</view>
					<view class="uni-list-item__content-note">预约日期：{{item.mdate}}</view>
					<view class="uni-list-item__content-note">参加人数：{{item.participant_count}}</view>
					<view class="uni-list-item__content-note">所属部门：{{item.belong_dept_name}}</view>
					<view class="uni-list-item__content-note">参会领导：{{item.key_participants}}</view>
					<view class="uni-list-item__content-note">预约会议室：{{item.mroom_name}}</view>
					<view class="uni-list-item__content-note">预约时间：<text v-for="range in item.time_ranges">{{range}}、</text></view>
					<view v-if="item.note!==null" class="uni-list-item__content-note">备注：{{item.note}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				page:1,
				page_size:10,
				dataList:[],
			}
		},
		mounted() {
			this.getlistData();
		},
		methods:{
			getlistData(){
				let that = this;
				that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
					that.dataList = res.results;
				})
			},
			handleClick(item){
				uni.navigateTo({
					url:'/pages/ofm/booking?item='+item,
				})
			},
		},
	}
</script>

<style scoped>
	.container{
		height: 100%;
		padding: 0!important;
	}
	.chat-custom-right {
		flex: 1;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: space-between;
		align-items: flex-end;
	}
	
	.chat-custom-text {
		font-size: 12px;
		color: #999;
	}
	.uniListItem{
		position: relative;
	}
	.stateIcon{
		position: absolute;
		top: 0;
		right: 0;
		z-index: 1;
	}
	.yiwancheng{
		color: #ff0000;
	}
	.uni-list-item{
		display: flex;
		font-size: 16px;
		position: relative;
		justify-content: space-between;
		align-items: center;
		flex-direction: row;
		cursor: pointer;
	}
	.uni-list-item__container{
		 position: relative;
		 display: flex;
		 flex-direction: row;
		 padding:20upx 30upx;
		 padding-left: 30upx;
		 flex: 1;
		 overflow: hidden;
	}
	.uni-list-item__content{
		display: flex;
		flex: 1;
		color: #3b4144;
		background-color: #c4f0f6;
		flex-direction: column;
		justify-content: space-between;
		overflow: hidden;
		border: 5upx solid #9ce7f1;
		box-sizing: border-box;
		padding: 20upx;
		border-radius: 20upx;
		box-shadow: 0 0 10upx 10upx rgba(196,232,246,.3);
	}
	/* .uni-list-item__content:hover,
	.uni-list-item__content:focus{
		border: 1px solid #7ed47e;
	} */
	.uni-list-item__content-title{
		font-size: 14px;
		color: #3b4144;
		overflow: hidden;
	}
	.uni-list-item__content-note{
		margin-top: 0.1875rem;
		color: #999;
		font-size: 12px;
		overflow: hidden;
	}
</style>