<template>
	<view style="padding-top: 30rpx;">
		<view class="whiteCard">
			<u--form labelPosition="top" :labelStyle="{fontSize:'32rpx',color:'#666'}" labelWidth="200" :model="form" :rules="rules" ref="uForm">
				<u-form-item label="摄像头(多选)" prop="name" borderBottom>
					<view
						style="width: 160%;margin-left: -30rpx;margin-right: -30rpx;margin-bottom: -20rpx;margin-top: -10rpx;">
						<selectSearch :value.sync="form.shexiangtou"
							:options="[{value:1,label:'走廊尽头(海康)'},{value:2,label:'厨房(海康)'},{value:3,label:'走廊尽头(海康)'},{value:4,label:'厨房(海康)'}]"
							placeholder="请选择摄像头" :filterable="false" multiple />
					</view>
				</u-form-item>
				<u-form-item label="查询时间段" prop="timeslot" borderBottom>
					<uni-datetime-picker v-model="form.tick" type="datetimerange">
						<view class="demo-layout">
							<view>
								{{form.tick.length?form.tick.join('-'):'请选择'}}
							</view>
							<image style="width: 30rpx;height:30rpx;"
								src="@/static/image/earlyWarning/calendar.png" mode=""></image>
						</view>
					</uni-datetime-picker>
				</u-form-item>
				<u-form-item label="系部/专业/班级" prop="timeslot" borderBottom>
					<view
						style="width: 160%;margin-left: -30rpx;margin-right: -30rpx;margin-bottom: -20rpx;margin-top: -10rpx;">
						
						<selectTree v-model="form.departCalss" :labels.sync="form.departCalssName"/>
					</view>
				</u-form-item>
				<u-form-item labelPosition="left" label="分片类型（天/小时）" prop="timeslot" borderBottom>
					<u-radio-group v-model="form.type">
						<u-radio v-for="(item,index) in [{value:'1',label:'天'},{value:'2',label:'小时'}]" :key="index" :label="item.label"
							:name="item.value"></u-radio>
					</u-radio-group>
				</u-form-item>
			</u--form>
		</view>
		<view style="padding: 36rpx 30rpx;position: fixed;bottom: 0;width: 100%;box-sizing: border-box;">
			<u-button @click="confirm" type="primary" style="border-radius: 36rpx;height: 72rpx;"
				text="确定"></u-button>
		</view>
	</view>
</template>

<script>
	import selectSearch from "@/components/selectSearch.vue"
	import selectTree from "@/components/selectTree.vue"
	export default {
		components: {
			selectSearch,
			selectTree
		},
		data() {
			return {
				form: {
					shexiangtou: [],
					tick: [],
				},
				rules: []
			}
		},
		methods: {
			confirm(){
				this.CONFIRM(`是否删除点名任务？`).then(()=>{
					
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.whiteCard {
		padding: 30rpx 30rpx;
		margin: 15rpx 30rpx;
		border-radius: 18rpx;
		background-color: #ffffff;
		font-size: 32rpx;
	}
	
	.demo-layout{
		display: flex;
		padding: 15rpx 0;
		justify-content: space-between;
		align-items: center;
		&:first-child{
			flex: 1;
			padding-right:30rpx;
		}
	}
	
	.u-radio-group{
		&>*:first-child{
			margin-right: 36rpx;
		}
	}
</style>