<template>
	<view>
		<view class="search-box" >
			<view class="search" >
				<uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @input="input"
					@cancel="cancel" @clear="clear" bgColor="#ffffff">
				</uni-search-bar>
			</view>
		</view>
		<ul style="list-style: none;padding-left: 0px;">
			<li v-for="data in msgdata" :key="data.customerId" style="margin:0 40rpx 40rpx;padding: 20rpx;background-color: #ffffff;">
				<view class="slot-text-filename" @click="clickDetail(data)">
					<text>{{data.ApplyMan}}</text>
				</view>
				<view class="slot-text-msg" @click="clickDetail(data)" style="display: flex;flex-direction: column;">
					<text class="slot-text-msg-data" style="font-size: 30rpx;">隔离点：{{data.IsolationPiontName}}</text>
					<text class="slot-text-msg-data" style="font-size: 30rpx;">批次：{{data.SamplingBatch}}</text>
					<text class="slot-text-msg-data" style="font-size: 30rpx;">创建人：{{data.CreateMan}}</text>
				</view>
			</li>
		</ul>
	</view>
</template>

<script>
	import {getAdmissionsList} from "../../api/sampling.js"
	export default {
		data() {
			return {
				msgdata:[]
			};
		},
		methods:{
			search(res) {
				uni.showToast({
					title: '搜索：' + res.value,
					icon: 'none'
				})
			},
			input(res) {
				console.log('----input:', res)
			},
			clear(res) {
				uni.showToast({
					title: 'clear事件，清除值为：' + res.value,
					icon: 'none'
				})
			},
			blur(res) {
				uni.showToast({
					title: 'blur事件，输入值为：' + res.value,
					icon: 'none'
				})
			},
			focus(e) {
				uni.showToast({
					title: 'focus事件，输出值为：' + e.value,
					icon: 'none'
				})
			},
			cancel(res) {
				uni.showToast({
					title: '点击取消，输入值为：' + res.value,
					icon: 'none'
				})
			}
		},
		onLoad() {
			getAdmissionsList().then(res=>{
				this.msgdata = res
			})
		}
	}
</script>

<style lang="scss">
page{
	background-color: #Faf8f8;
}
.search-box{
	// background-color: white;
	margin: 20rpx;
	// padding: 30rpx;
}
.search{
	// display: flex;
	margin-bottom: 20rpx;
}
.slot-text-filename{
	font-size: 40rpx;
	// border-bottom: 2px solid #c9c9cd;
}
.slot-text-btn{
	margin-top: 30rpx;
	display: flex;
	justify-content: space-around;
	button{
		width: 25%;
		font-size: 20rpx;
		color: white;
		background-color: blue;
	}
}
</style>
