<template>
    <div class="recordsDetails">
        <div>
            <div id="pdfId">
                <div class="recordsTable">
                    <table>
                        <tbody>
                        <tr>
                            <td colspan="11">通风作业单位：{{name}}</td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="3">仓房</td>
                            <td colspan="1">仓房名称</td>
                            <td colspan="1">{{tableData.warehouseName}}</td>
                            <td colspan="1">仓房编号</td>
                            <td colspan="1">{{tableData.cfbh}}</td>
                            <td colspan="1">仓型</td>
                            <td colspan="1">
                                <span v-if="tableData.cflx == '2971'">平房仓</span>
                                <span v-else-if="tableData.cflx == '2972'">筒仓</span>
                                <span v-else-if="tableData.cflx == '2973'">浅圆仓</span>
                                <span v-else-if="tableData.cflx == '2974'">楼房仓</span>
                                <span v-else-if="tableData.cflx == '2975'">地下仓</span>
                                <span v-else-if="tableData.cflx == '2976'">气膜仓</span>
                                <span v-else-if="tableData.cflx == '2977'">球仓</span>
                                <span v-else-if="tableData.cflx == '2978'">其他粮仓</span>
                                <span v-else-if="tableData.cflx == '5211'">土堤仓</span>
                                <span v-else-if="tableData.cflx == '5212'">露天垛</span>
                                <span v-else-if="tableData.cflx == '5213'">席茓囤</span>
                                <span v-else-if="tableData.cflx == '5214'">简易囤</span>
                                <span v-else>{{ tableData.cflx }}</span>
                            </td>
                            <td colspan="1">仓内长度（m）</td>
                            <td colspan="1">{{tableData.cncd}}</td>
                            <td colspan="1">仓内宽度（m）</td>
                            <td colspan="1">{{tableData.cnkd}}</td>
                        </tr>
                        <tr>
                            <td colspan="1">设计存粮高度线（m）</td>
                            <td colspan="1">{{ tableData.sjclxgd }}</td>
                            <td colspan="1">内径直径（m）</td>
                            <td colspan="1">{{ tableData.zjnj }}</td>
                            <td colspan="1">通风开始时间</td>
                            <td colspan="1">
                                {{
                                  tableData.tfkssj
                                    ? tableData.tfkssj.substring(0, 10).replace(/-/g, ".")
                                    : ""
                                }}
                            </td>
                            <td colspan="1">通风结束时间</td>
                            <td colspan="1">
                                {{
                                  tableData.tfjssj
                                    ? tableData.tfjssj.substring(0, 10).replace(/-/g, ".")
                                    : ""
                                }}
                            </td>
                            <td colspan="1">通风目的</td>
                            <td colspan="1">
                                <span v-if="tableData.tfmd == '1'">降温通风</span>
                                <span v-else-if="tableData.tfmd == '2'">降水通风</span>
                                <span v-else-if="tableData.tfmd == '3'">处理发热粮通风</span>
                                <span v-else-if="tableData.tfmd == '4'">均衡粮温通风</span>
                                <span v-else-if="tableData.tfmd == '5'">其他目的通风</span>
                                <span v-else>{{ tableData.tfmd }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="1">登记日期</td>
                            <td colspan="1">
                                {{
                                  tableData.djrq
                                    ? tableData.djrq.substring(0, 10).replace(/-/g, ".")
                                    : ""
                                }}
                            </td>
                            <td colspan="1">通风作业负责人</td>
                            <td colspan="3">{{ tableData.tfzyfzr }}</td>
                            <td colspan="1">通风作业人员</td>
                            <td colspan="3">{{ tableData.tfzyry }}</td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="2">粮堆</td>
                            <td colspan="1">品种</td>
                            <td colspan="1">
                                <span v-if="tableData.pz == '3164'">小麦</span>
                                <span v-else-if="tableData.pz == '3165'">玉米</span>
                                <span v-else-if="tableData.pz == '2777'">大豆</span>
                                <span v-else-if="tableData.pz == '3166'">稻谷</span>
                                <span v-else-if="tableData.pz == '7052'">大豆原油</span>
                                <span v-else-if="tableData.pz == '7038'">小麦粉</span>
                                <span v-else-if="tableData.pz == '7107'">大米</span>
                                <span v-else>{{ tableData.pz }}</span>
                            </td>
                            <td colspan="1">数量（吨）</td>
                            <td colspan="1">
                                {{
                                  tableData.slstr && String(tableData.slstr).indexOf(".") > -1
                                    ? Number(tableData.slstr).toFixed(3)
                                    : tableData.slstr
                                }}
                            </td>
                            <td colspan="1">孔隙度（%）</td>
                            <td colspan="1">{{tableData.kxd}}</td>
                            <td colspan="1">长度（m）</td>
                            <td colspan="1">{{tableData.cd}}</td>
                            <td colspan="1">宽度（m）</td>
                            <td colspan="1">{{tableData.kd}}</td>
                        </tr>
                        <tr>
                            <td colspan="1">直径（m）</td>
                            <td colspan="1">{{tableData.zj}}</td>
                            <td colspan="1">粮堆高度（m）</td>
                            <td colspan="1">{{tableData.ldgd}}</td>
                            <td colspan="1">堆粮形式</td>
                            <td colspan="1">
                                <span v-if="tableData.dlxs == '5412'">散堆</span>
                                <span v-else-if="tableData.dlxs == '5413'">包堆</span>
                                <span v-else>{{ tableData.dlxs }}</span>
                            </td>
                            <td colspan="4"></td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="2">通风系统配置</td>
                            <td colspan="1">通风类型</td>
                            <td colspan="1">
                                <span v-if="tableData.tflx == '1'">自然空气通风</span>
                                <span v-else-if="tableData.tflx == '2'">加热空气通风</span>
                                <span v-else-if="tableData.tflx == '3'">冷却空气通风</span>
                                <span v-else-if="tableData.tflx == '4'">内循环控温</span>
                                <span v-else-if="tableData.tflx == '5'">空调控温通风</span>
                                <span v-else-if="tableData.tflx == '6'">维持通风</span>
                                <span v-else>{{ tableData.tflx }}</span>
                            </td>
                            <td colspan="1">风网类型</td>
                            <td colspan="1">
                                <span v-if="tableData.fwlx == '1'">地槽</span>
                                <span v-else-if="tableData.fwlx == '2'">地上笼</span>
                                <span v-else-if="tableData.fwlx == '3'">移动式</span>
                                <span v-else-if="tableData.fwlx == '4'">内循环控温</span>
                                <span v-else-if="tableData.fwlx == '5'">空调控温通风</span>
                                <span v-else-if="tableData.fwlx == '6'">维持通风</span>
                                <span v-else-if="tableData.fwlx == '7'">其他</span>
                                <span v-else>{{ tableData.fwlx }}</span>
                            </td>
                            <td colspan="1">风网设置方式</td>
                            <td colspan="1">
                                <span v-if="tableData.fwszfs == '1'">地上槽</span>
                                <span v-else-if="tableData.fwszfs == '2'">地下槽</span>
                                <span v-else-if="tableData.fwszfs == '3'">横向</span>
                                <span v-else-if="tableData.fwszfs == '4'">径向</span>
                                <span v-else>{{ tableData.fwszfs }}</span>
                            </td>
                            <td colspan="1">主风道截面积（m²）</td>
                            <td colspan="1">{{ tableData.zfdjmj }}</td>
                            <td colspan="1">风网开孔率（%）</td>
                            <td colspan="1">{{ tableData.fwkkl }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">空气途径比（%）</td>
                            <td colspan="1">{{ tableData.kqtjb }}</td>
                            <td colspan="1">通风口设置个数（个）</td>
                            <td colspan="1">{{ tableData.tfkszgs }}</td>
                            <td colspan="1">风道型式</td>
                            <td colspan="1">
                                <span v-if="tableData.fdxs == '1'">一字型</span>
                                <span v-else-if="tableData.fdxs == '2'">土字型</span>
                                <span v-else-if="tableData.fdxs == '3'">圭字型</span>
                                <span v-else-if="tableData.fdxs == '4'">U字型</span>
                                <span v-else-if="tableData.fdxs == '5'">横向</span>
                                <span v-else-if="tableData.fdxs == '6'">夹底</span>
                                <span v-else-if="tableData.fdxs == '9'">其他</span>
                                <span v-else>{{ tableData.fdxs }}</span>
                            </td>
                            <td colspan="1">支风道截面积（m²）</td>
                            <td colspan="1">{{ tableData.zfdjmj_zhi }}</td>
                            <td colspan="1">支风道总长度（m）</td>
                            <td colspan="1">{{ tableData.zfdzcd }}</td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="2">通风机械配置</td>
                            <td colspan="1">通风机型号</td>
                            <td colspan="1">{{ tableData.tfjxh }}</td>
                            <td colspan="1">通风机台数（台）</td>
                            <td colspan="1">{{ tableData.tfjts }}</td>
                            <td colspan="1">单台风机额定全压（Kpa）</td>
                            <td colspan="1">{{ tableData.dtfjedqy }}</td>
                            <td colspan="1">单台风机额定风量（m³/h）</td>
                            <td colspan="1">{{ tableData.dtfjedfl }}</td>
                            <td colspan="1">单台风机额定功率（kw）</td>
                            <td colspan="1">{{ tableData.dtfjedgl }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">送风方式</td>
                            <td colspan="1">
                                <span v-if="tableData.sffs == '1'">压入式通风</span>
                                <span v-else-if="tableData.sffs == '2'">吸出式通风</span>
                                <span v-else-if="tableData.sffs == '3'">压入与吸出相结合式通风</span>
                                <span v-else-if="tableData.sffs == '4'">环流通风</span>
                                <span v-else-if="tableData.sffs == '9'">其它</span>
                                <span v-else>{{ tableData.sffs }}</span>
                            </td>
                            <td colspan="8"></td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="2">运行工艺参数</td>
                            <td colspan="1">单台风机实测风量（m³/h）</td>
                            <td colspan="1">{{ tableData.dtfjscfl }}</td>
                            <td colspan="1">单台风机轴功率（kw）</td>
                            <td colspan="1">{{ tableData.dtfjzgl }}</td>
                            <td colspan="1">总风量（m³/h）</td>
                            <td colspan="1">{{ tableData.zfl }}</td>
                            <td colspan="1">单位通风量（m³/t.h）</td>
                            <td colspan="1">{{ tableData.dwtfl }}</td>
                            <td colspan="1">实测系统阻力（Kpa）</td>
                            <td colspan="1">{{ tableData.scxtzl }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">总耗电量（kw）</td>
                            <td colspan="1">{{ tableData.zhdl }}</td>
                            <td colspan="8"></td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="4">作业过程</td>
                            <td colspan="2" style="background-color:#ccc;">第一阶段</td>
                            <td colspan="2" style="background-color:#ccc;">第二阶段</td>
                            <td colspan="2" style="background-color:#ccc;">第三阶段</td>
                            <td colspan="2" style="background-color:#ccc;">第四阶段</td>
                            <td colspan="2"></td>
                        </tr>
                        <tr>
                            <td colspan="1">平均气温（°C）</td>
                            <td colspan="1">{{ tableData.oneQw }}</td>
                            <td colspan="1">平均气温（°C）</td>
                            <td colspan="1">{{ tableData.twoQw }}</td>
                            <td colspan="1">平均气温（°C）</td>
                            <td colspan="1">{{ tableData.threeQw }}</td>
                            <td colspan="1">平均气温（°C）</td>
                            <td colspan="1">{{ tableData.fourQw }}</td>
                            <td colspan="2"></td>
                        </tr>
                        <tr>
                            <td colspan="1">平均气湿（%）</td>
                            <td colspan="1">{{ tableData.onePjqs }}</td>
                            <td colspan="1">平均气湿（%）</td>
                            <td colspan="1">{{ tableData.twoPjqs }}</td>
                            <td colspan="1">平均气湿（%）</td>
                            <td colspan="1">{{ tableData.threePjqs }}</td>
                            <td colspan="1">平均气湿（%）</td>
                            <td colspan="1">{{ tableData.fourPjqs }}</td>
                            <td colspan="2"></td>
                        </tr>
                        <tr>
                            <td colspan="1">作业时长（h）</td>
                            <td colspan="1">{{ tableData.oneZysc }}</td>
                            <td colspan="1">作业时长（h）</td>
                            <td colspan="1">{{ tableData.twoZysc }}</td>
                            <td colspan="1">作业时长（h）</td>
                            <td colspan="1">{{ tableData.threeZysc }}</td>
                            <td colspan="1">作业时长（h）</td>
                            <td colspan="1">{{ tableData.fourZysc }}</td>
                            <td colspan="2"></td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="6">作业评价</td>
                            <td colspan="1">通风前平均水分（%）</td>
                            <td colspan="1">{{ tableData.tfqpjsf }}</td>
                            <td colspan="1">通风后平均水分（%）</td>
                            <td colspan="1">{{ tableData.tfhpjsf }}</td>
                            <td colspan="1">降水幅度（%）</td>
                            <td colspan="1">{{ tableData.jsfd }}</td>
                            <td colspan="1">吨粮降水能耗（kw/1%.t）</td>
                            <td colspan="1">{{ tableData.dljsnh }}</td>
                            <td colspan="1">作业前平均粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfqpjlw }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">结束后平均粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfhpjlw }}</td>
                            <td colspan="1">通风降水（均匀性）整仓</td>
                            <td colspan="1">{{ tableData.jyxzx }}</td>
                            <td colspan="1">通风降水（均匀性）上层</td>
                            <td colspan="1">{{ tableData.jyxsc }}</td>
                            <td colspan="1">通风降水（均匀性）中层</td>
                            <td colspan="1">{{ tableData.jyxzc }}</td>
                            <td colspan="1">通风降水（均匀性）下层</td>
                            <td colspan="1">{{ tableData.jyxxc }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">通风前仓内温（°C）</td>
                            <td colspan="1">{{ tableData.tfqcnw }}</td>
                            <td colspan="1">通风前仓内湿（%）</td>
                            <td colspan="1">{{ tableData.tfqcns }}</td>
                            <td colspan="1">通风前仓外温（°C）</td>
                            <td colspan="1">{{ tableData.tfqcww }}</td>
                            <td colspan="1">通风前仓外湿（%）</td>
                            <td colspan="1">{{ tableData.tfqcws }}</td>
                            <td colspan="1">通风前仓最高粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfqzglw }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">通风前仓最低粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfqzdlw }}</td>
                            <td colspan="1">通风后仓内温（°C）</td>
                            <td colspan="1">{{ tableData.tfhcnw }}</td>
                            <td colspan="1">通风后仓内湿（%）</td>
                            <td colspan="1">{{ tableData.tfhcns }}</td>
                            <td colspan="1">通风后仓外温（°C）</td>
                            <td colspan="1">{{ tableData.tfhcww }}</td>
                            <td colspan="1">通风后仓外湿（%）</td>
                            <td colspan="1">{{ tableData.tfhcws }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">通风后最高粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfhzglw }}</td>
                            <td colspan="1">通风后最低粮温（°C）</td>
                            <td colspan="1">{{ tableData.tfhzdlw }}</td>
                            <td colspan="1">通风前氧气（%）</td>
                            <td colspan="1">{{ tableData.tfqyq }}</td>
                            <td colspan="1">通风前二氧化碳（%）</td>
                            <td colspan="1">{{ tableData.tfqeyht }}</td>
                            <td colspan="1">通风前磷化氢（%）</td>
                            <td colspan="1">{{ tableData.tfqlhq }}</td>
                        </tr>
                        <tr>
                            <td colspan="1">通风后氧气（%）</td>
                            <td colspan="1">{{ tableData.tfhyq }}</td>
                            <td colspan="1">通风后二氧化碳（%）</td>
                            <td colspan="1">{{ tableData.tfheyht }}</td>
                            <td colspan="1">通风后磷化氢（%）</td>
                            <td colspan="1">{{ tableData.tfhlhq }}</td>
                            <td colspan="4"></td>
                        </tr>
                        <tr>
                            <td colspan="1">备注</td>
                            <td colspan="10">{{ tableData.bz }}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div style="text-align: center">
                <el-button type="primary" @click="returnFun" class="iconfont iconfanhui">返回</el-button>
            </div>
        </div>
    </div>
</template>

<script>
    import {
        tfDetailGet
    } from "@/api/grainReserves/zygl/index";
    // import { FileApi } from "@/api";
    // import htmlToPdf from "@/utils/htmlToPdf";
    // import {updateWarehousefacilityFiling} from "@/api/zgsq/ccssba";
    export default {
        name: "ventilationDetail",
        data () {
            return {
                tableData: {},
                name:''
            }
        },
        methods: {
            //取消
            returnFun(){
                this.$router.go(-1)
            },

            getInfo(){
                let params = {
                    id: this.$route.query.id
                }
                tfDetailGet(params).then(res=>{
                    if(res.code && res.code == 200){
                        this.tableData = res.data
                        console.log(this.tableData,'@@@@@!!!@@@@')
                    }
                }).catch()
            },
        },
        created() {
            this.name = this.$route.query.name
            this.getInfo()
        }
    }
</script>

<style scoped lang="scss">
.recordsDetails{
    font-size: 14px;
    padding-bottom: 20px;
    #pdfId{
        padding: 20px;
    }
    .littleMsg{
        height: 17px;
    }
    .title{
        font-size: 26px;
        font-weight: 500;
        text-align: center;
    }
    table {
        margin: 10px 0;
        font-size: 14px;
        border-collapse: separate;
        border-spacing: 0;
        border-top: 1px solid #b0b0b0;
        border-left: 1px solid #b0b0b0;
        color: #525357;
    }
    th {
        font-weight: 700;
        font-size: 18px;
    }
    td {
         border: 1px solid #b0b0b0;
        border-top: none;
        border-left: none;
    }
    td,
    th {
        padding: 10px;
        text-align: center;
    }
}
</style>
<style>
    #qyxzbaInfoApply {
        position: relative !important;
    }
    #qyxzbaInfoApply > div {
        left: 0px !important;
        top: -40px !important;
    }
    #qyxzbaInfoApplySign {
        left: 0px !important;
        top: -40px !important;
    }
    #gxxzbaInfoApply {
        position: relative !important;
    }
    #gxxzbaInfoApply > div {
        left: 0px !important;
        top: -160px !important;
    }
    #gxxzbaInfoApplySign {
        left: 0px !important;
        top: -160px !important;
    }
    #xzbaInfoApply {
        position: relative !important;
    }
    #xzbaInfoApply > div {
        left: 0px !important;
        top: -160px !important;
    }
    #xzbaInfoApplySign {
        left: 0px !important;
        top: -160px !important;
    }
</style>
