
<style>
@import '../../assets/css/Record.css';
</style>
<template>
  <div class="Record" id="Record">
    <div class="ha-cont" style="justify-content: flex-start; align-items: stretch;" v-for="(item, index) in logList" :key="index">
      <div class="ha-circle"></div>
      <div class="ha-time">{{item.UpdateDate}}</div>
      <!-- <div class="ha-name">admin</div> -->
      <div class="ha-content">
        <p data-v-0d9b8f7a="">{{item.LogInfo}}</p>
      </div>
      <div class="ha-line"></div>
    </div>
    <div v-if="logList.length < 1" class="nodata font-color-info">
      <p>暂无数据</p>
    </div>
  </div>
</template>
<script>
export default {
  props: ['CustomerId'],
  data() {
    return {
      logList: [],
      msg: {
        Type: 3,
        pageIndex: 1,
        pageSize: 10,
        SourceId: 0
      }
    };
  },watch:{
    
 },
  mounted() {
    let $this= this
    document
      .getElementById("Record")
      .addEventListener("scroll", function() {
        //全部动态
        if (this.scrollHeight - this.scrollTop === this.clientHeight) {
          $this.logMsg.pageIndex = $this.logMsg.pageIndex + 1
          $this.GetOperationLogPageList(1)
        }
    });
    this.msg.SourceId = this.CustomerId
    this.GetOperationLogPageList()
  },
  methods: {
    GetOperationLogPageList(t){
      this.apipost('/api/Customer/GetOperationLogPageList', this.msg, res=>{
        if (res.data.resultCode == 1) {
          let data = res.data.data
          if (t) {
            this.logList = this.logList.concat(
              data.pageData
            )
          } else {
            this.logList = data.pageData
          }
        }
      })
    }
  }
}
</script>