<template>
  <div>
    <PageTable ref="logTable" action="LogMgQueryOperateLogList" :columns="columns" :autoFirst="false">
    </PageTable>
  </div>
</template>
<script>
  export default{
    components:{

    },
    props: {
      instanceId: {
        type: String,
        default() {
          return "";
        }
      }
    },
    data(){
      return{
        // dataList: [],
        columns: [
          {
            title: this.$t('module.operateLog.operateType'),
            key: "operateType",
            width: 70,
            align: "center"
          },
          {
            title: this.$t('module.operateLog.operator'),
            key: "operator",
            width: 90,
            render: (h, params) => {
              return h(
                "span",
                {
                  attrs: {
                    title: params.row.operator
                  }
                },
                params.row.operator
              );
            }
          },
          {
            title: this.$t('module.operateLog.operateTime'),
            key: "operateTime",
            width: 140,
            render: (h, params) => {
              return h(
                "span",
                {
                  attrs: {
                    title: params.row.operateTime
                  }
                },
                params.row.operateTime
              );
            }
          },
          {
            title: this.$t('module.operateLog.operateResult'),
            key: "operateResult",
            width: 70,
            align: "center"
          },
          {
            title: this.$t('module.operateLog.operateParam'),
            key: "instanceParameters",
            ellipsis: true,
            render: (h, params) => {
              return h(
                "span",
                {
                  attrs: {
                    title: params.row.instanceParameters
                  }
                },
                params.row.instanceParameters
              );
            }
          }
        ],
        formSearch: {
          instanceId: ""
        }
      }
    },
    computed:{
  
    },
    created:function(){

    },
    beforeMount:function(){

    },
    mounted:function(){
      this.search();
    },
    beforeDestroy:function(){

    },
    destroyed:function(){

    },
    methods:{
      search(page) {
        this.formSearch.instanceId = this.instanceId;
        this.$refs["logTable"].load(this.formSearch, page);
      },
    },
    watch:{

    },
    directives:{

    }
  }
</script>
