<template>
   <a-card :bordered="false" :body-style="{ padding: '0px 0px 8px' }" >
        <a-table
            :columns="columns"
            :data-source="dataLogs"
            rowKey="id"
            :scroll="{ y: 240 }"
            :loading = "logLoading"
        />
    </a-card>
</template>
<script>

import { postAction } from '@/api/manage'
import { initDictOptions } from '@/components/dict/JDictSelectUtil'
import store from '@/store'
import { message } from 'ant-design-vue';
import moment from 'moment'
import { Empty } from 'ant-design-vue';
export default {
    name: 'EducationDetailLogs',
    data() {
        return {
            simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
            dataLogs: [],
            logLoading: false,
            columns: [
                {
                    title:'操作时间',
                    align:"center",
                    dataIndex: 'createTime'
                },
                {
                    title:'操作人',
                    align:"center",
                    dataIndex: 'createBy_dictText'
                },
                {
                    title:'类型',
                    align:"center",
                    dataIndex: 'type_dictText'
                },
                {
                    title:'操作内容',
                    align:"center",
                    width: 550,
                    dataIndex: 'descType1',
                    customRender: function (t, r, index) {
                        return t+r.descComm1;
                    }
                },
            ]
        }
    },
    props: ['infoShow', 'dataPara'],
    created() { //没用watch 用的create 传入不同的key  key不同每次都会调用刷新 尤其应用在tabs上
        console.log(this.dataPara.id);
        this.logLoading = true;
        let para = {
            id: this.dataPara.id
        }
        postAction("/education/educationScheduleLog/allList", para).then((res) => {
            console.log(res)
            this.dataLogs = res.result.records;
            this.logLoading = false;
        }); 
    },
    methods: {

    }
}
</script>
  