<script setup name="search">
import { reactive, ref } from 'vue'
import SubmitBtn from '@com/SubmitBtn.vue'

const queryForm = reactive({
	maxs: 25,
	mins: 0,
	maxp: 2500,
	minp: 0,
	dimension: 10,  //拟合维度
	mode: 0   //拟合方式
})
/**导出 */
const emits = defineEmits(['submit'])
const funSubmit = async () => {
	emits('submit', queryForm)
}
/**created */
</script>
<template>
	<div class="pl-[20px] flex items-center h-[80px] relative">
		<div class="absolute top-[-7px] left-[20px] text-[#838383] text-[14px]">操作面板</div>
		<el-form class="" :inline="true" :model="queryForm">
			<el-form-item label="最大风速" class="!mb-0">
				<el-input-number v-model="queryForm.maxs" size="small" :max="30"></el-input-number>
			</el-form-item>
			<el-form-item label="最小风速" class="!mb-0">
				<el-input-number v-model="queryForm.mins" size="small" :min="0"></el-input-number>
			</el-form-item>
			<el-form-item label="最大功率" class="!mb-0">
				<el-input-number v-model="queryForm.maxp" size="small"></el-input-number>
			</el-form-item>
			<el-form-item label="最小功率" class="!mb-0">
				<el-input-number v-model="queryForm.minp" size="small" :min="0"></el-input-number>
			</el-form-item>
			<el-form-item label="多项式" class="!mb-0">
				<el-select v-model="queryForm.dimension" class="w-[80px]">
					<el-option v-for="item in 30" :key="item" :value="item" :label="item"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="拟合方式" class="!mb-0">
				<el-select v-model="queryForm.mode" class="w-[120px]">
					<el-option :value="0" label="单台拟合"></el-option>
					<el-option :value="1" label="合并拟合"></el-option>
					<el-option :value="2" label="同名拟合"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item class="!mb-0">
				<submit-btn @click="funSubmit" desc="曲线拟合"></submit-btn>
			</el-form-item>
		</el-form>
	</div>
</template>