<template>
  <div class="condition_item">
    <el-select v-model="condition.code" placeholder="请选择阀门 Code" style="width: 200px" filterable>
      <el-option v-for="item in codeOptions" :key="item.code" :label="item.equipmentName" :value="item.code" />
    </el-select>
    <el-button type="danger" size="small" @click="$emit('remove')">删除</el-button>
  </div>
</template>

<script setup>
defineProps({
  condition: Object,
  codeOptions: Array
});
defineEmits(['remove']);
</script>

<style scoped>
.condition_item {
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
</style>
