<template>
  <el-dialog :visible="true" title="日志详情" :before-close="closeDialog">
    <el-form label-width="100px">
      <el-form-item label="ID">{{detail.id}}</el-form-item>
      <el-form-item :label="$t('时间')">{{detail.createTime|parseTime}}</el-form-item>
      <el-form-item :label="$t('操作人')">{{detail.creatorName}}【ID: {{detail.creator}}】</el-form-item>
      <el-form-item :label="$t('操作人类型')">{{detail.userType == 2 ? $t('管理员') : $t('会员')}}</el-form-item>
      <el-form-item :label="$t('操作描述')">{{detail.msg}}</el-form-item>
      <el-form-item :label="$t('操作类型')">{{detail.type}}</el-form-item>
      <el-form-item :label="$t('请求地址')">{{detail.requestUrl}}</el-form-item>
      <el-form-item :label="$t('请求备注')">{{detail.note}}</el-form-item>
      <el-form-item :label="$t('请求内容')">{{detail.body}}</el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
import {getOperateLogDetail} from "@/api/ecw/order";
import {parseTime} from '@/utils/ruoyi'
export default {
  name: "OperateLogDetail",
  filters: {parseTime},
  props:{
    logId: Number
  },
  data(){
    return {
      detail: null
    }
  },
  created() {
    this.$nextTick(this.getDetail)
  },
  methods:{
    getDetail(){
      getOperateLogDetail(this.logId).then(res => {
        this.detail = res.data
      })
    },
    closeDialog(){
      this.$emit('close')
    }
  }
}
</script>

<style scoped>

</style>
