<template>
  <div class="data-dictionary h100">
    <common-layout  ref="layoutRef" :table-attrs="{
     'has-operation':false
   }" :form-attrs="{
     'span-attrs':{
       span:4
     }
   }" :table-header="userLogHeader" :get-table-list="getTableData" :filter-form="userLog">
    </common-layout>
  </div>
</template>

<script>
import CommonLayout from "@/components/CommonLayout.vue";
import {Plus} from "@element-plus/icons-vue";
import {ref} from "vue";
import {useRootStore} from "@/pinia/useStore";
import {userLog} from "@/data/all-form";
import {userLogHeader} from "@/data/all-table-header";
import {proXyxxSelectZYMLSyslog} from "@/service/system-manage/user-log/user-log";

export default {
  name: "UserLog",
  components:{CommonLayout},
  computed: {
    Plus(){
      return Plus
    }
  },
  setup(){
    const layoutRef = ref(null);
    const store =useRootStore();
    function getTableData (){
      proXyxxSelectZYMLSyslog({
        A_MANAGER:true,
        A_USER_UNITID:localStorage.getItem("xyxx_unitcode"),
        A_KEY_WORLD:layoutRef.value.form.GJZ==undefined?'':layoutRef.value.form.GJZ,
        A_STARTTIME:layoutRef.value.form.START_DATE==undefined?'':layoutRef.value.form.START_DATE,
        A_ENDTIME:layoutRef.value.form.END_DATE==undefined?'':layoutRef.value.form.END_DATE,
        pageIndex:layoutRef.value.pageIndex,
        pageSize:layoutRef.value.pageSize
      }).then(res =>{
        let originData = res.msg[0].Rows

        layoutRef.value.getResData(originData,res.msg[0].TotalRowCount)
      })
    }
    return {
      userLog,
      userLogHeader,
      getTableData,
      layoutRef
    }

  }
}
</script>

<style scoped>

</style>