云
3 天以前 ec8ff4f6259404460a0b4437e29a40986c2c4b9d
src/views/crm/backlog/index.vue
@@ -1,9 +1,10 @@
<script lang="ts" setup>
import { computed, onActivated, onMounted, ref } from 'vue';
import { computed, onActivated, onMounted, ref, watch } from 'vue';
import { Page } from '@vben/common-ui';
import { Badge, Card, List } from 'ant-design-vue';
import { automaticApproval } from '#/store/audit-policy';
import { getFollowClueCount } from '#/api/crm/clue';
import {
@@ -49,6 +50,14 @@
  receivableAuditCount,
  receivablePlanRemindCount,
);
const visibleLeftSides = computed(() => leftSides.filter((item) =>
  !automaticApproval.value || !['contractAudit', 'receivableAudit'].includes(item.menu),
));
watch(automaticApproval, (automatic) => {
  if (automatic && ['contractAudit', 'receivableAudit'].includes(leftMenu.value)) {
    leftMenu.value = 'customerTodayContact';
  }
});
const currentComponent = computed(() => {
  const components = {
@@ -75,9 +84,9 @@
  customerPutPoolRemindCount.value = await getPutPoolRemindCustomerCount();
  customerFollowCount.value = await getFollowCustomerCount();
  clueFollowCount.value = await getFollowClueCount();
  contractAuditCount.value = await getAuditContractCount();
  if (!automaticApproval.value) contractAuditCount.value = await getAuditContractCount();
  contractRemindCount.value = await getRemindContractCount();
  receivableAuditCount.value = await getAuditReceivableCount();
  if (!automaticApproval.value) receivableAuditCount.value = await getAuditReceivableCount();
  receivablePlanRemindCount.value = await getReceivablePlanRemindCount();
}
@@ -95,7 +104,7 @@
  <Page auto-content-height>
    <div class="flex h-full w-full">
      <Card class="w-1/5">
        <List item-layout="horizontal" :data-source="leftSides">
        <List item-layout="horizontal" :data-source="visibleLeftSides">
          <template #renderItem="{ item }">
            <List.Item
              @click="sideClick(item)"