<template>
    <div class="editWarnTable">
        <a-form :model="formStates" labelAlign="center" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
            <a-form-item label="所属煤层：">
                <a-select v-model:value="formStates.ssmc" placeholder="请选择...">
                    <a-select-option v-for="item in mcList" :value="item.value">{{ item.label }}</a-select-option>
                </a-select>
            </a-form-item>
            <a-form-item label="绿色预警CO：">
                <a-input v-model:value="formStates.lsco" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="绿色预警CO/CO₂：">
                <a-input v-model:value="formStates.lsco2" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="黄色预警CO：">
                <a-input v-model:value="formStates.hsco" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="黄色预警CO/CO₂：">
                <a-input v-model:value="formStates.hsco2" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="黄色预警C₂H₄：">
                <a-input v-model:value="formStates.hsc2h4" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="黄色预警C3H8/C2H6：">
                <a-input v-model:value="formStates.hsc2h6" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="红色预警CO：">
                <a-input v-model:value="formStates.rsco" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="红色预警CO/CO₂：">
                <a-input v-model:value="formStates.rsco2" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="红色预警C₂H₄：">
                <a-input v-model:value="formStates.rsc2h4" placeholder="请输入..." />
            </a-form-item>
            <a-form-item label="红色预警C3H8/C2H6：">
                <a-input v-model:value="formStates.rsc2h6" placeholder="请输入..." />
            </a-form-item>
        </a-form>
    </div>
</template>

<script setup lang="ts">
import { ref, reactive, watch,onMounted } from 'vue'
import {sysTypeWarnList} from '../../../monitorManager/alarmMonitor/common.api.ts'

let formStates = reactive({})
let mcList=reactive<any[]>([])

//获取煤层列表

async function getMenuList() {
    let res = await sysTypeWarnList({ type: 'fire' })
    mcList.length=0
    if(res.fire && res.fire.length!=0){
        res.fire.forEach(el=>{
            mcList.push({label:el.systemname,value:el.id})
        })
    }
}
onMounted(()=>{
    getMenuList() 
})


</script>

<style lang="less" scoped>
.warnTargetFire-brt {
    width: 100%;
    height: 600px;
    padding: 15px;
    box-sizing: border-box
}
</style>