<template>
    <div>
        <LHeader :text="$route.meta.title"></LHeader>
        <!-- 内容列表 -->
        <div class="con-list">
            <div class="cell-wrap">
                <!-- <p>隐患上报</p> -->
                <van-cell-group inset>
                    <van-row gutter="">
                        <van-col span="7"
                            ><span class="field-title"
                                >隐患单编号：</span
                            ></van-col
                        >
                        <van-col span="17">{{ data.pid }}</van-col>
                    </van-row>
                    <van-row gutter="">
                        <van-col span="7"
                            ><span class="field-title"
                                >延期时间：</span
                            ></van-col
                        >
                        <van-col span="17">{{ data.applyDate }}</van-col>
                    </van-row>
                    <van-row gutter="">
                        <van-col span="7"
                            ><span class="field-title"
                                >延期理由：</span
                            ></van-col
                        >
                        <van-col span="17">{{ data.applyReason }}</van-col>
                    </van-row>
                     <van-row gutter="">
                        <van-col span="7"
                            ><span class="field-title"
                                >审批结果：</span
                            ></van-col
                        >
                        <van-col span="17">{{ data.examineResult==0?'退回':(data.examineResult==1?'通过':'待审批') }}</van-col>
                    </van-row>
                    <van-row gutter="" v-if="data.examineResult ">
                        <van-col span="7"
                            ><span class="field-title"
                                >审批理由：</span
                            ></van-col
                        >
                        <van-col span="17">{{ data.examineResult }}</van-col>
                    </van-row>
                    <!-- examineResult -->
                </van-cell-group>
                <van-cell-group>
                    <van-button  plain type="info" block @click="$router.back()" color="#2980F7">返回列表</van-button>
                </van-cell-group>
            </div>
        </div>
    </div>
</template>

<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
    components: {
        LHeader,
    },
    data() {
        return {
            id: 0,
            data: {},
        };
    },
    created() {
        this.id = this.$route.params.id;
        this.getDetail();
    },
    methods: {
        getDetail() {
            this.$toast.loading({
                message: "加载中...",
                forbidClick: true,
                loadingType: "spinner",
                duration: 0,
            });

            getFun("/delayApply/delayDetails/" + this.id)
                .then((res) => {
                    this.$toast.clear();
                    this.data = res.data.delayApply;
                })
                .catch((err) => {
                    console.log(err);
                    this.$toast.clear();
                    this.$toast.fail("加载失败,请稍后再试");
                });
        },
    },
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
    padding: 10px 10px 0.533333rem;
    background-color: #f0f1f5;
    .cell-wrap {
        position: relative;
    }
    p {
        font-size: 0.4rem;
        font-weight: none;
        padding-left: 0.16rem;
        margin: 0.186667rem 0;
        color: #7f7f7f;
    }
    .van-cell-group--inset {
        margin: 0;
        margin-bottom: 10px;
        padding: 10px;
        font-size: 13px;
        position: relative;
        .van-row {
            margin-bottom: 0.133333rem;
            line-height: 0.64rem;
        }
    }
    .confirm-wrap {
        position: relative;
    }
    .journal-wrap {
        position: relative;
    }
    .supervise-wrap {
        position: relative;
    }
    .info-title {
        color: #2980f7;
        font-weight: none;
    }
    .field-title {
        color: black;
        font-weight: none;
    }
  
}
</style>
