<template>
    <table class="" style="width: 100%" border="1" cellspacing="1">
        <tbody>
        </tbody>
        <colgroup>
            <col class="bg0" width="15%">
            <col width="40%">
            <col class="bg0" width="15%">
            <col>
        </colgroup>
        <tbody v-if="lableFirst == '地块调查'">
            <tr class="ant-table-cell ant-table-cell-ellipsis">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">{{textLable}}调查开始日期</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">{{ data?.fbsj }}</td>
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">{{textLable}}调查完成日期</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">{{ data?.wcsj }}</td>
            </tr>
            <tr class="ant-table-cell ant-table-cell-ellipsis">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">公示</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">
                    {{ data.projectType == 1 ? "网址" : data.projectType == 3 ? '其它' : '未知' }}</td>
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">{{ data.projectType == 1 ? "公示网址" : data.projectType == 3 ? '信息' : '' }}</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">{{ data?.gswz }}</td>
            </tr>
            <!-- <img :src="baseUploadUrl + data.gspic" class="w-20 h-20" /> -->
            <!-- <a-image style="display: inline-block;" :width="200" :src="baseUploadUrl + data.gspic"/> -->
            <!-- <tr class="ant-table-cell ant-table-cell-ellipsis">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">
                    {{ data.projectType == 1 ? "公示截图" : data.projectType == 3 ? '照片' : '未知' }}</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">
                    <a-button @click="downloadFile(data.gspic,data.projectType == 1?'公示截图':data.projectType==3?'照片' : '未知')" preIcon="ant-design:vertical-align-bottom-outlined"
                        type="primary">
                        下载
                    </a-button>
                </td>
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">调查报告</td>
                <td class="ant-table-cell ant-table-cell-ellipsis">
                    <a-button @click="downloadFile(data.dcbglj, '调查报告')" preIcon="ant-design:vertical-align-bottom-outlined"
                        type="primary">
                        下载
                    </a-button>
                </td>
            </tr> -->
            <tr class="ant-table-cell ant-table-cell-ellipsis">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">是否为超标地块</td>
                <td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">{{ data?.pollueted == 1?'是':'否'}}</td>
            </tr>
            <!-- <tr class="ant-table-cell ant-table-cell-ellipsis">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">是否只进行书面调查</td>
                <td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">{{ data?.jxsmdc == 1?'是':'否' }}</td>
            </tr> -->
            <!-- <tr class="ant-table-cell ant-table-cell-ellipsis" style="display: table-row;">
                <td class="ant-table-cell ant-table-cell-ellipsis bgColor">调查方式</td>
                <td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">{{ data?.cbdcfs ? '委托第三方调查' : '自行组织调查' }}
                </td>
            </tr> -->
        </tbody>
    </table>
</template>
  
<script lang="ts" setup>
import { defineProps } from "vue";
import { useGlobSetting } from '/@/hooks/setting';
import { downloadFile } from '/@/utils/common/renderUtils';
const globSetting = useGlobSetting();
const baseUploadUrl = globSetting.uploadUrl;
defineProps({
    data: {
        type: Object,
        default: () => { }
    },
    lableFirst:{
        type:String,
        default:'地块调查'
    },
    textLable:{
        type:String,
        default:'初步'
    }
})
</script>

<style scoped>
table {
    border-collapse: collapse;
    border: 1px #dfe6ec solid
}

tbody tr td {
    padding: 6px;
    height: 40px;
}

.bgColor {
    background-color: rgba(244, 247, 249, 0.8);
    text-align: center;
}
</style>