<script setup lang="tsx">
import { reactive, ref, unref } from 'vue';
import { useI18n } from '@/hooks/web/useI18n';
import { ContentWrap } from '@/components/ContentWrap';
import { useRouter } from 'vue-router'
import { getUserInfo } from '@/utils/auth';
import { getCsckBusinessSystemListApi, getCsckWorkFlowSubTable, saveCsckBusinessSystemApi } from '@/api/csck/CsckWorkFlow';
import path from 'path';

//图片的引入
import m1Image from "@/assets/imgs/m1.png";
import m2Image from "@/assets/imgs/m2.png";
import m3Image from "@/assets/imgs/m3.png";
import m4Image from "@/assets/imgs/m4.png";
import m5Image from "@/assets/imgs/m5.png";
import m6Image from "@/assets/imgs/m6.png";
import m7Image from "@/assets/imgs/m7.png";
import m8Image from "@/assets/imgs/m8.png";
import m9Image from "@/assets/imgs/m9.png";
import m10Image from "@/assets/imgs/m10.png";
import m11Image from "@/assets/imgs/m11.png";
import m12Image from "@/assets/imgs/m12.png";
import m13Image from "@/assets/imgs/m13.png";
import m14Image from "@/assets/imgs/m14.png";
import m15Image from "@/assets/imgs/m15.png";


//图片引入结束
defineOptions({
  name: 'Home'
})

const userInfo = getUserInfo();

// 获取当前用户机构号
const loginOrganCode = userInfo.session_organCode;

// 获取登录Id
const loginId = userInfo.session_userId;

// 获取登录名
const loginName = userInfo.session_loginName;

const { t } = useI18n();
const router = useRouter();

//反洗钱待办列表
// const modelList=
//   [
//     {
//       label:'流水待补入',
//       count:258,
//       field: m1Image,
//       path:"/dataSupplement/TransactionInfo",
//     },
//     {
//       label:'大额案例待处理',
//       count:28,
//       field:m2Image,
//       path:'/caseManage/LargScaleCaseDeal'
//     },
//     {
//       label:'可疑案例待处理',
//       count:null,
//       field: m3Image,
//       path:'/caseManage/SuspiciousCaseDeal'
//     },
//     {
//       label:'可疑案例上报待复核',
//       count:258,
//       field:m4Image,
//       path:'/caseManage/SuspiciousCaseReview'
//     },
//     {
//       label:'可疑案例排除待复核',
//       count:258,
//       field:m5Image,
//       path:'/caseManage/SuspiciousCaseExclude'
//     },
//     {
//       label:'大额案例待审核',
//       count:100,
//       field: m6Image,
//       path:'/caseManage/LargeCaseReview'
//     },
//     {
//       label:'跟踪库待处理',
//       count:0,
//       field:m7Image,
//     },
//     {
//       label:'可疑案例待审批',
//       count:100,
//       field:m8Image,
//       path:'/caseManage/SuspiciousCaseVerify'
//     },
//     {
//       label:'可疑退回待处理',
//       count:0,
//       field:m9Image,
      
//     },
//     {
//       label:'大额报文待生成',
//       count:100,
//       field:m10Image,
//       path:'/paperManagement/LargeMessageGenerate'
//     },
//     {
//       label:'可疑报文待生成',
//       count:100,
//       field:m11Image,
//       path:'/paperManagement/SuspiciousMessageGenerate'
//     },
//     {
//       label:'回执待处理',
//       count:100,
//       field:m12Image,
//       path:'/receiptManagement/AmlSysDataurgeQuery'
//     },
//     {
//       label:'风险评级待初评',
//       count:100,
//       field:m13Image,
//       path:'/customerRiskLevel/crrRiskResultFirst',
//     },
//     {
//       label:'风险评级待复评',
//       count:0,
//       field: m14Image,
//     },
//     {
//       label:'风险评级待审核',
//       count:100,
//       field:m15Image,
//       path:'/customerRiskLevel/crrRiskResultVerify',
//     }
// ]

//一表通待办列表
const modelList =
  [
    {
      label:'整改记录',
      count:0,
      field: m1Image,
      path:"/taskCenterManage/RectificationRecord",
    },
    {
      label:'重报申请',
      count:0,
      field: m2Image,
      path:"/taskCenterManage/ReSubmitApplication",
    },
    {
      label:'待处理通知',
      count:2,
      field: m3Image,
      path:"/taskCenterManage/PendingNotice",
    },
    {
      label:'字段校验',
      count:0,
      field: m4Image,
      path:"/qualityCenterManage/FieldVerification",
    },
    {
      label:'记录校验',
      count:0,
      field: m5Image,
      path:"/qualityCenterManage/RecordVerification",
    },
    {
      label:'校验规则管理',
      count:0,
      field: m6Image,
      path:"/qualityCenterManage/SrdbRuleVersion",
    },
    {
      label:'查询接口日志',
      count:0,
      field: m7Image,
      path:"/dataInterfaceManage/QueryInterfaceDiary",
    },
    {
      label:'制度包查询',
      count:0,
      field: m8Image,
      path:"/dataInterfaceManage/SystemPackageQuery",
    },
    {
      label:'监管指标更新',
      count:0,
      field: m9Image,
      path:"/dataInterfaceManage/RegulatoryIndicators",
    },
    {
      label:'操作日志',
      count:0,
      field: m10Image,
      path:"/dataInterfaceManage/OperationLog",
    },
  ]
const gomodel = (row) => {
  if(row.path){
    router.push(row.path)
  }
}

</script>

<template>
  <ContentWrap>
    <div class="cont">
      <div class="cardItem" v-for="(item,index) in modelList" :key="index">
        <div class="card" @click="gomodel(item)">
          <div class="text">
            <div class="title">{{ item.label }}</div>
            <div class="count">{{ item.count }}</div>
          </div>
          <!-- <img :src="`${imageBasePath}/${item.field}`" alt="" class="h-60px rounded-[1%]"> -->
          <img :src="`${item.field}`" alt="" class="h-46px rounded-[1%]" />
        </div>
      </div>
    </div>
  </ContentWrap>
</template>

<style lang="less" scoped>
.cont{
  display: flex !important;
  justify-content: flex-start;
  flex-wrap: wrap;
  .cardItem{
    width: 20%;
    padding: 5px;
    min-width: 180px;
    .card{
      width: 100%;
      border: 1px solid #ccc;
      display: flex;
      justify-content: space-between;
      cursor: pointer;
      align-items: center;
      padding: 0 8px;
      .text{
        width: calc(100% - 40px);
        line-height: 30px;
        text-align: center;
        >div{
          height: 30px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }
    }
    .card:hover{
      background: #ecf5ff;
      border-color: #409eff;
      .title{
        color: #409eff;
      }
    }
  }
}
:deep(.el-card__body) {
  height: calc(100vh - 95px) !important;
  display: flex !important;
}
:deep(.el-card__body>div) {
  width: 100%;
}
</style>
