<template>
    <el-dialog :title="$t('控货日志')" visible :before-close="closeDialog" :close-on-click-modal="false" width="1000px">
      <el-table :data="list">
        <el-table-column :label="$t('操作时间')" prop="createTime" width="200">
          <template slot-scope="{row}">{{row.createTime|parseTime}}</template>
        </el-table-column>
        <el-table-column :label="$t('操作人')" prop="creatorName" width="100"></el-table-column>
        <el-table-column :label="$t('操作人类型')" prop="content" width="100">
          <template slot-scope="{row}">{{row.userType == 1 ? $t('会员') : $t('管理员')}}</template>
        </el-table-column>
        <el-table-column :label="$t('操作类型')" prop="type" width="200"></el-table-column>
        <el-table-column :label="$t('备注')" prop="msg"></el-table-column>
      </el-table>
    </el-dialog>
</template>
<script>
import {
  getControlLogList,
} from '@/api/ecw/orderCargoControl'
import {parseTime} from '@/utils/ruoyi'
export default {
    props:{
        orderId: Number
    },
  filters: {parseTime},
    data(){
        return {
            show: false,
            list:[]
        }
    },
    created(){
        this.show = true
        this.loadData()
    },
    methods:{
        loadData(){
          getControlLogList(this.orderId).then(res => this.list = res.data)
        },
        closeDialog(){
            this.show = false
            this.$emit('close');
        }
    }
}
</script>
<style lang="scss" scoped>

</style>
