<template>
    <el-dialog class="applyDialog" title="查看" :visible.sync="dialogVisible" width="50%" append-to-body>
        <p class="apply-title">申请信息：</p>

        <el-table :data="tableData"  style="width:95%;margin:0 auto;">
            <el-table-column prop="realName" label="姓名" width="180"> </el-table-column>
            <el-table-column prop="telephone" label="联系方式" width="180"> </el-table-column>
            <el-table-column label="申请类型" prop="applType" width="180">
                <template slot-scope="{ row }">
                    <span v-if="row.applType==1">法律维权帮扶</span>
                    <span v-if="row.applType==2">困难救助</span>
                    <span v-if="row.applType==3">劳动争议调解</span>
                    <span v-if="row.applType==4">职业伤害保障</span>
                </template>
            </el-table-column>
            <el-table-column prop="applyTime" label="申请时间">
                <template slot-scope="{row}">
                    <span>{{format(row.applyTime)}}</span>
                </template>
            </el-table-column>
        </el-table>

        <p class="apply-title">申请内容：</p>
        <div class="applyContent">{{content}}</div>
    </el-dialog>
</template>
<script>
    import { dateFormat } from "@/util/date";
    export default {
        props: {

        },
        data() {
            return {
                dialogVisible: false,
                tableData: [],
                content: '',

            }
        },
        methods: {
            open(row) {
                this.tableData = [];
                this.tableData.push(row);
                this.content = row.applComment
                this.dialogVisible = true;
            },
            format(date) {
                if (date) {
                    return dateFormat(new Date(date), "yyyy-MM-dd hh:mm:ss");
                }
            }
        }
    }
</script>
<style>
    .apply-title {
        font-size: 14px;
        color: #333333;
        font-size: 14px;

        text-align: left;
        padding-left: 20px;
    }

    .applyContent {
        border: 1px solid #f2f2f2;
        height: 200px;
        width: 835px;
        margin: 0 auto;
    }

    .applyContent {
        text-indent: 2em;
        padding-top: 10px;
    }
    .applyDialog thead th{
        background-color: #ebeef5;
    }
</style>