<template>
    <div>
        <table class="table">
            <tr>
                <td rowspan="3" colspan="3">分类</td>
                <td colspan="2" style="border-bottom: 0px;text-align: left;padding-left: 20px">成交面积</td>
                <td colspan="2" style="border-bottom: 0px;text-align: left;padding-left: 20px">成交金额</td>
                <td colspan="2" style="border-bottom: 0px;text-align: left;padding-left: 20px">成交套数</td>
                <td colspan="2" style="border-bottom: 0px;text-align: left;padding-left: 20px">平均销售价格</td>
            </tr>
            <tr>
                <td rowspan="2" style="border: 0px"></td>
                <td rowspan="2">与上年同期比（%）</td>
                <td rowspan="2" style="border: 0px"></td>
                <td rowspan="2">与上年同期比（%）</td>
                <td rowspan="2" style="border: 0px"></td>
                <td rowspan="2">与上年同期比（%）</td>
            </tr>
            <tr>
                <td style="border: 0px"></td>
                <td>与上年同期比（%）</td>
            </tr>
            <tr>
                <td rowspan="2">当年期内</td>
                <td colspan="2" style="border-bottom: 0px;">二手房</td>
                <td :class="props.udata[`area` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.area }}</td>
                <td :class="props.udata[`areaProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.areaProportion }}</td>
                <td :class="props.udata[`amount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.amount }}</td>
                <td :class="props.udata[`amountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.amountProportion }}
                </td>
                <td :class="props.udata[`count` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.count }}</td>
                <td :class="props.udata[`countProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.countProportion }}
                </td>
                <td :class="props.udata[`price` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.price }}</td>
                <td :class="props.udata[`priceProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.priceProportion }}
                </td>
            </tr>
            <tr>
                <td style="border: 0px"></td>
                <td>二手住房</td>
                <td :class="props.udata[`resArea` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resAreaProportion }}</td>
                <td :class="props.udata[`areaProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.areaProportion }}</td>
                <td :class="props.udata[`resAmount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resAmount }}</td>
                <td :class="props.udata[`resAmountProportion` + `tag`] == 1 ? 'redbg' : ''">{{
                    props.udata.resAmountProportion }}</td>
                <td :class="props.udata[`resCount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resCount }}</td>
                <td :class="props.udata[`resCountProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resCountProportion
                }}</td>
                <td :class="props.udata[`resPrice` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resPrice }}</td>
                <td :class="props.udata[`resPriceProportion` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resPriceProportion
                }}</td>
            </tr>
            <tr>
                <td rowspan="2">去年同期</td>
                <td colspan="2" style="border-bottom: 0px;">二手房</td>
                <td :class="props.udata[`lastArea` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.lastArea }}</td>
                <td></td>
                <td :class="props.udata[`lastAmount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.lastAmount }}</td>
                <td></td>
                <td :class="props.udata[`dealLastCount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealLastCount }}</td>
                <td></td>
                <td :class="props.udata[`lastPrice` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.lastPrice }}</td>
                <td></td>
            </tr>
            <tr>
                <td style="border-top: 0px"></td>
                <td>二手住房</td>
                <td :class="props.udata[`resLastArea` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resLastArea }}</td>
                <td></td>
                <td :class="props.udata[`resLastAmount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resLastAmount }}</td>
                <td></td>
                <td :class="props.udata[`dealLastResCount` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.dealLastResCount }}</td>
                <td></td>
                <td :class="props.udata[`resLastPrice` + `tag`] == 1 ? 'redbg' : ''">{{ props.udata.resLastPrice }}</td>
                <td></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>