<template>
    <div>
        <table class="table">
            <tr>
                <td rowspan="3" colspan="3">指标名称</td>
                <td rowspan="3">计量单位</td>
                <td rowspan="3">代码</td>
                <td colspan="2" class="text-left" style="border-bottom: 0px"></td>
            </tr>
            <tr>
                <td rowspan="2" style="border-bottom: 0px;border-top:0;">二手房</td>
                <td rowspan="2" style="border-bottom: 0px;">二手住房</td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td colspan="3">甲</td>
                <td>乙</td>
                <td>丙</td>
                <td>1</td>
                <td>2</td>
            </tr>
            <tr>
                <td colspan="3">成交面积</td>
                <td>万平方米</td>
                <td>601</td>
                <td :class="props.udata[`dealArea` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealArea }}</td>
                <td :class="props.udata[`resDealArea` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealArea }}</td>
            </tr>
            <tr>
                <td colspan="3">成交面积与上年同比增长</td>
                <td>%</td>
                <td>604</td>
                <td :class="props.udata[`dealProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealProportion }}</td>
                <td :class="props.udata[`resDealProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealProportion }}</td>
            </tr>
            <tr>
                <td colspan="3">成交金额</td>
                <td>亿元</td>
                <td>603</td>
                <td :class="props.udata[`dealAmount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealAmount }}</td>
                <td :class="props.udata[`resDealAmount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealAmount }}</td>
            </tr>
            <tr>
                <td colspan="3">成交金额与上年同比增长</td>
                <td>%</td>
                <td>606</td>
                <td :class="props.udata[`dealAmountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealAmountProportion }}</td>
                <td :class="props.udata[`resDealAmountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealAmountProportion }}</td>
            </tr>
            <tr>
                <td colspan="3">成交套数</td>
                <td>套</td>
                <td>602</td>
                <td :class="props.udata[`dealCount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealCount }}</td>
                <td :class="props.udata[`resDealCount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealCount }}</td>
            </tr>
            <tr>
                <td colspan="3">成交套数与上年同比增长</td>
                <td>%</td>
                <td>605</td>
                <td :class="props.udata[`dealCountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealCountProportion }}</td>
                <td :class="props.udata[`resDealCountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resDealCountProportion }}</td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue';
const props = defineProps({
    udata: {
        type: Object,
        default: {},
    },
});
</script>

<style scoped lang="scss"></style>