<template>
    <layout-view>
            <el-drawer
            :title="title"
            :visible.sync="open"
            :direction="direction"
            size="75%">
        <el-descriptions  :column="column"  :size="size" :colon="false" border>
                        <el-descriptions-item label="TraceId"  label-class-name="labelClass" content-class-name="contentClass">
                            {{form.traceID}}
                        </el-descriptions-item>
                        <el-descriptions-item label="应用标识" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.appName}}
                        </el-descriptions-item>
                        <!-- <el-descriptions-item label="主机名" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.hostName}}
                        </el-descriptions-item> -->
                        <el-descriptions-item label="消息标识" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.message}}
                        </el-descriptions-item>
                        <el-descriptions-item label="所属平台" label-class-name="labelClass" content-class-name="contentClass">
                            {{ form.platform }}
                        </el-descriptions-item>
                        <el-descriptions-item label="函数调用名称" label-class-name="labelClass" content-class-name="contentClass">
                           <div class="text-wrapper"> {{form.culprit}} </div>
                        </el-descriptions-item>
                        <el-descriptions-item label="异常事件标记" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.tags}}
                        </el-descriptions-item>
                        <el-descriptions-item label="告警等级" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.level}}
                        </el-descriptions-item>
                       
                        <el-descriptions-item label="线程号" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.threadNo}}
                        </el-descriptions-item>
                       
                        <el-descriptions-item label="异常堆栈信息" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.errorStack}}
                        </el-descriptions-item>
                        <el-descriptions-item label="上下文信息" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.context}}
                        </el-descriptions-item>
                         <el-descriptions-item label="环境变量" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.environment}}
                        </el-descriptions-item>
                        <el-descriptions-item label="版本信息" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.releaseVersion}}
                        </el-descriptions-item>
                        <el-descriptions-item label="指纹标识" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.fingerprint}}
                        </el-descriptions-item>
                        <el-descriptions-item label="扩展信息" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.extra}}
                        </el-descriptions-item>
                        
                         <el-descriptions-item label="异常事件数量" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.checkNum}}
                        </el-descriptions-item>
                        <el-descriptions-item label="日志时间" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.logTime}}
                        </el-descriptions-item>
        </el-descriptions>
    </el-drawer>
    </layout-view>
</template>

<script>
    import view from "@/assets/mixins/view";
    import formatterDate from "@/assets/utils/index.js";
    export default {
        mixins: [view],
        components: {
        },
          methods: {
       formatterDate,
    
            /** 查看*/
            view(row) {
        
                this.query = { id: row.id };
                this.urls.currUrl ="error/log/view";
                this.getData();
                this.pageInfo.type="view"
                this.title = "异常日志详细";
            },
            /**获取数据后弹框 */
            afterRender(data) {
                this.open = true;
            },

        },
        data() {
            return {
                size:"small",
                column:1,
                 loading: true,
                // 弹出层标题
                title: "异常日志",
                // 是否显示弹出层
                open: false,
                direction:"rtl",
                toString:[
                ],
    
                toArrays: [

                ],
                  toDate:[
                    "logTime",
                ],
            }
        }
    }
</script>
<style lang="scss" scoped >

.text-wrapper {
  white-space: pre-wrap;
}
    .labelClass{
          white-space: pre-wrap;
         width: 250px;
         font-size: 13px;
         color: #191a1b;
    }

    .el-descriptions__body{
        margin-left: 5px;
        margin-right: 5px;
        color: #191a1b;
        background-color: #FFF;
    }
    .contentClass{
        width: 888px;
    }
</style>