<template>
	<view>
		<view >
			<select-cy ref="selectCyRefs" :value="tvalinfo" placeholder="请选择航空公司" name="name"
				:options="datalist" :showClearIcon="true" :zindex="zindex"
				@change="change_select_cy" ></select-cy>
		</view>
	</view>
		
</template>

<script>
	import {
		ftmAirlinelist,
		ftmFleetlistAll,
	} from '@/utils/requestahm.js';
	
	export default {
	
		data() {
			return{											
				tvalinfo:[],
				// //模拟数据列表
				 datalist: [
				//	{
				// 		label: '海南航空',
				// 		value: '海南航空'
				// 	},
				// 	{
				// 		label: '国际航空',
				// 		value: '国际航空'
				// 	},
				],
			}
		},
		mounted() {
			
		},
		props: {
			tval:{
				type:Array,
				default:[],
			},
			zindex:Number,			
		},
		methods:{
			// opo1234(){
			// 	this.$nextTick(function(){
		
			// 		this.$refs.selectCyRefs.close()
				    
			// 	})			
			// },
			async getDate(){
				const Airlinelistitem = await ftmAirlinelist({
				
				})
			
				let param = {}
				for (var i = 0; i < Airlinelistitem.data.length; i++) {
					 param = {
						label:Airlinelistitem.data[i].name,
						value:Airlinelistitem.data[i].name,
					}
					this.datalist.push(param)
				}
			},
			// onchangeafter(){
			// 	let gg ='88'
			// 	return  gg
			// },
			//下拉框改变
			change_select_cy(item, value) {
			
				this.tvalinfo = value;
				this.$emit('changevalue', this.tvalinfo)
			},
			
		},
		created() {
			if(this.tval.length>0){
				this.tvalinfo = this.tval 
			}
			this.getDate()
		}
	}
</script>

<style>
</style>