<template>
    <!-- 测风塔 -->
    <el-dialog title="测风塔信息" :visible.sync="localAnemometerdialog" width="600px" @close="handleClose">
        <div v-for="(item, index) in anemometerData" :key="index">
            <H3 class="centeredH3">测风塔名称:{{ item.anemometerName }}</H3>
            <div class="general">
                <div class="condition">
                  
                    <p>测风塔编号:</p>  <span>{{ item.anemometerCode }}</span>
                </div>
                <div class="condition">
                    <p>经度:</p><span>{{ item.longitude }}</span>
                </div>
                <div class="condition">
                    <p>维度:</p><span>{{ item.latitude }}</span>
                </div>
                <div class="condition">
                    <p>测风塔高度:</p><span>{{ item.anemometerHeightStrings }}</span> <span style="margin-left: 10px;">(米)</span>
                </div>
            </div>
        </div>
    </el-dialog>
</template>

<script>
export default {
    props: {
        anemometerdialog: {
            type: Boolean,
            default: false
        },
        anemometerData: {
            type: Array,
            default: () => []
        }
    },
    computed: {
        localAnemometerdialog: {
            get() {
                console.log(this.anemometerdialog);
                return this.anemometerdialog;
            },
            set(value) {
                // 在这里不进行任何修改
            }
        }
    },
    methods: {

        handleClose() {
            this.$emit('handleClose', false, 'anemometerdialog');
        }
    }
}
</script>

<style lang="scss" scoped>
.general {
    display: flex;
    flex-wrap: wrap;

    .condition {
        width: 50%;
        display: flex;

        p {
            width: 100px;
            text-align: right;
            line-height: 40px;
        }

        span {
            line-height: 40px;
        }

     
    }
}

</style>