<template>
  <div>
  <PageWrapper>
    <Card :bordered="false">
      <template #title>
        <p style="font-weight: 650;font-size: 16px">计划管理</p>
      </template>
      <a-space direction="vertical" :size="24" style="width:100%">
      <a-row :gutter="48">
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/plan/stPlanManList'" imgsrc="resource/img/控制活动.png" :menuName="'计划编制'" :menuDesc="'计划创建的编制'" :menuNow="menuInfo.planmain.updateDate" :menuCount="menuInfo.planmain.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/plan/stPlanManChangeList'" imgsrc="resource/img/度量指标.png" :menuName="'计划变更'" :menuDesc="'计划修改的变更'" :menuNow="menuInfo.planchange.updateDate" :menuCount="menuInfo.planchange.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/plan/stPlanApproveList'" imgsrc="resource/img/检查方法.png" :menuName="'计划审核'" :menuDesc="'计划的审核'" :menuNow="menuInfo.planapprove.updateDate" :menuCount="menuInfo.planapprove.count" />
        </a-col>
      </a-row>
      <a-row :gutter="48">
        <a-col :span="8" :hoverable="true">
          <ItemMenu v-show="false" :menuUrl="'/standardlib/controlactivity/StCaMainCollectionList'" imgsrc="resource/img/活动集合.png" :menuName="'活动集合'" :menuDesc="'控制活动集合的维护'" :menuNow="menuInfo.planapprove.updateDate" :menuCount="menuInfo.planapprove.count" />
        </a-col>
      </a-row>
      </a-space>
    </Card>
     <Card :bordered="false">
      <template #title>
        <p style="font-weight: 650;font-size: 16px">项目管理</p>
      </template>
      <a-space direction="vertical" :size="24" style="width:100%">
      <a-row :gutter="48">
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/project/stProjectCreList'" imgsrc="resource/img/控制活动.png" :menuName="'项目立项'" :menuDesc="'项目立项和审批'" :menuNow="menuInfo.projectCre.updateDate" :menuCount="menuInfo.projectCre.count" />
        </a-col>
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/project/stProjectPreparList'" imgsrc="resource/img/度量指标.png" :menuName="'项目准备'" :menuDesc="'项目实施前准备'" :menuNow="menuInfo.projectPrepar.updateDate" :menuCount="menuInfo.projectPrepar.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/projectexec/stProjectExecList'" imgsrc="resource/img/检查方法.png" :menuName="'项目实施'" :menuDesc="'项目实施'" :menuNow="menuInfo.rectifyPlanExec.updateDate" :menuCount="menuInfo.rectifyPlanExec.count" />
        </a-col>
      </a-row>
       <a-row :gutter="48">
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/projectexec/stProjectRecordList'" imgsrc="resource/img/控制活动.png" :menuName="'项目归档'" :menuDesc="'项目归档'" :menuNow="menuInfo.projectCre.updateDate" :menuCount="menuInfo.projectCre.count" />
        </a-col>
      </a-row>
      </a-space>
    </Card>
    <Card :bordered="false">
      <template #title>
        <p style="font-weight: 650;font-size: 16px">问题整改</p>
      </template>
      <a-space direction="vertical" :size="24" style="width:100%">
      <a-row :gutter="48">
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/rectify/stProblemTaskAssinList'" imgsrc="resource/img/控制活动.png" :menuName="'任务分配'" :menuDesc="'整改任务的分配'" :menuNow="menuInfo.problemTaskAssin.updateDate" :menuCount="menuInfo.problemTaskAssin.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/rectify/stRectifyPlanList'" imgsrc="resource/img/度量指标.png" :menuName="'整改计划编制'" :menuDesc="'整改计划的编制和审核'" :menuNow="menuInfo.rectifyPlan.updateDate" :menuCount="menuInfo.rectifyPlan.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/rectify/stExecutePlanList'" imgsrc="resource/img/检查方法.png" :menuName="'整改执行'" :menuDesc="'整改任务跟踪执行'" :menuNow="menuInfo.rectifyPlanExec.updateDate" :menuCount="menuInfo.rectifyPlanExec.count" />
        </a-col>
      </a-row>
      <a-row :gutter="48">
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/rectify/stRectifyApproveList'" imgsrc="resource/img/活动集合.png" :menuName="'整改审核'" :menuDesc="'整改任务审核'" :menuNow="menuInfo.rectifyApprove.updateDate" :menuCount="menuInfo.rectifyApprove.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/rectify/stRectifyStaticsChart'" imgsrc="resource/img/活动集合.png" :menuName="'整改情况统计'" :menuDesc="'整改情况的统计分析'"  :menuNow="menuInfo.rectifyApprove.updateDate" :menuCount="4"/>
        </a-col>
      </a-row>
      </a-space>
    </Card>
    <Card :bordered="false">
      <template #title>
        <p style="font-weight: 650;font-size: 16px">基础信息</p>
      </template>
      <a-space direction="vertical" :size="24" style="width:100%">
      <a-row :gutter="48">
        <a-col :span="8">
          <ItemMenu :menuUrl="'/project/base/stSysManageList'" imgsrc="resource/img/控制活动.png" :menuName="'系统管理'" :menuDesc="'系统信息维护'" :menuNow="menuInfo.problemTaskAssin.updateDate" :menuCount="menuInfo.problemTaskAssin.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/base/stOutsourcerManageList'" imgsrc="resource/img/度量指标.png" :menuName="'外包商管理'" :menuDesc="'外包商信息维护'" :menuNow="menuInfo.rectifyPlan.updateDate" :menuCount="menuInfo.rectifyPlan.count" />
        </a-col>
        <a-col :span="8" :hoverable="true">
          <ItemMenu :menuUrl="'/project/base/stProjectManageList'" imgsrc="resource/img/检查方法.png" :menuName="'项目管理'" :menuDesc="'项目信息维护'" :menuNow="menuInfo.rectifyPlanExec.updateDate" :menuCount="menuInfo.rectifyPlanExec.count" />
        </a-col>
      </a-row>
      </a-space>
    </Card>
  </PageWrapper>
</div> 
</template>
<script lang="ts" setup>
  import { Card } from 'ant-design-vue';
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import ItemMenu from './components/ItemMenu.vue';
import { statisticsProject } from './index.api';
import { PageWrapper } from '/@/components/Page';
import { dateUtil, formatToDate } from '/@/utils/dateUtil';
const router = useRouter()
  const loading = ref(true);
  const menuInfo = ref({
    planmain:{updateDate: '',count: 0,},
    planchange:{updateDate: '',count: 0,},
    planapprove:{updateDate: '',count: 0,},
    problemTaskAssin:{updateDate: '',count: 0,},
    rectifyPlan:{updateDate: '',count: 0,},
    rectifyPlanExec:{updateDate: '',count: 0,},
    rectifyApprove:{updateDate: '',count: 0,},
    chartsInfo:{updateDate: formatToDate(dateUtil(),"yyyy-MM-dd HH:mm:ss"),count: 4,},
    projectCre: {updateDate: formatToDate(dateUtil(),"yyyy-MM-dd HH:mm:ss"),count: 0,},
    projectPrepar: {updateDate: formatToDate(dateUtil(),"yyyy-MM-dd HH:mm:ss"),count: 0,}
  })
  onMounted(()=>{
    loading.value = true;
    statisticsProject().then(rep=>{
      loading.value = false;
      menuInfo.value = rep;
    })
  })
  setTimeout(() => {
    loading.value = false;
  }, 500);
</script>
<style scoped>
.jeecg-basic-table-form-container {
  padding: 10px;
  position: relative;
}
.jeecg-basic-table-form-container .stm-query {
  padding: 12px 10px 6px 10px;
  margin-bottom: 8px;
  background-color: #fff;
  border-radius: 2px;
  position: relative;
}
.stm-typography{
  color: #009dff;
  font-size: 18px;
}
</style>