<template>
 <div>
  <my-breadcrumb class="my-breadcrumb" :breadcrumb-arr="myBread"/>
  <div class="my-detail-main">
    <div>
      <template v-if="!(detailTableHeader?.length >0)">
        <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
        <img src="../../../../../../assets/imgs/lmyh/sjdwcs-select.png" alt="">
      </template>
      <template v-else-if="+detailTableHeader[0].NUM === 1">
        <template v-if="+detailTableHeader[0].RESULT ===0">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/sjdwcs-select.png" alt="">
        </template>
        <template v-else-if="+detailTableHeader[0].RESULT ===1">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/sjdwcs.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/unit-check-selected.png" alt="">
        </template>
        <template v-else-if="+detailTableHeader[0].RESULT ===2">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/sjdwcs.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/check-btg-selected.png" alt="">
        </template>
        <template v-else-if="+detailTableHeader[0].RESULT ===3">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/sjdwcs.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/unit-check.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/check-success-selected.png" alt="">
        </template>
        <template v-else-if="+detailTableHeader[0].RESULT ===4">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/sjdwcs.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/unit-check.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/check-fail-select.png" alt="">
        </template>

      </template>
      <template v-else-if="+detailTableHeader[0].NUM === 2">
        <template v-if="+detailTableHeader[0].RESULT ===0">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/check-success-selected.png" alt="">
        </template>
        <template v-else-if="+detailTableHeader[0].RESULT ===2">
          <img src="../../../../../../assets/imgs/lmyh/apply.png" alt="">
          <img src="../../../../../../assets/imgs/lmyh/check-fail-select.png" alt="">
        </template>


      </template>
    </div>
   <div class="table-a">
     <my-table
       border
       :is-height-equal-max-height="true"
       :page-size="8"
       :headers="userManageDetailTableLmHeader"
       :table-data="detailTableHeader"
     >
       
     </my-table>
   </div>
    <div class="m-s">显示第 1 到第 {{totalCount}} 条记录，总共 {{totalCount}} 条记录</div>
  </div>
 </div>
</template>

<script>
import MyBreadcrumb from "@/components/common/MyBreadcrumb.vue";
import MyTable from "@/components/common/MyTable.vue";
import {onBeforeMount, ref} from "vue";
import {userManageDetailTableLmHeader} from "@/data/all-table-header";
import {lmUserCheckDetail} from "@/service/system-manage/user-manaeg";
import {UserInfo} from "@/unit/UserInfo";

export default {
  name: "UserManageDetailLm",
  components: {MyTable, MyBreadcrumb},
  props:{
    currentOpObj:{

    }
  },
  setup(props,{emit}) {

    const detailTableHeader = ref([])
    onBeforeMount(() => {
      lmUserCheckDetail({
        pageSize:1000,
        pageIndex:1,
        a_code:props.currentOpObj.USERID,
        appkey:new UserInfo().GetUserKeyCode()
      }).then(res => {
        detailTableHeader.value = res.msg[0].Rows
        totalCount.value = res.msg[0].TotalRowCount
      })
    })
    const myBread = [{name:'联盟用户管理  '},{name:' 查看详情'}]

    const totalCount = ref(0)
    return {
      myBread,

      totalCount,
      userManageDetailTableLmHeader,
      detailTableHeader
    }
  }
}
</script>

<style scoped lang="scss">
.table-a{
  margin-top: 20px;
}
</style>
