huangyinfeng
6 天以前 a9a03d64cf190188d3db04d14970fc0908b03491
src/views/email/components/ListPage/list.vue
@@ -1,7 +1,7 @@
<template>
  <PageWrapper>
    <div style="height: calc(100vh - 84px)">
      <div class="head">
      <div class="my-head">
        <div class="left">
          <div class="left-box p-3">
            <!-- 多选 -->
@@ -23,12 +23,14 @@
        </div>
        <div class="right p-3"
          >共<span style="padding: 0 5px">20</span>封
          >共<span style="padding: 0 5px">{{page.total}}</span>封
          <a-pagination
            v-model:current="pageCurrent"
             v-model:page-size='page.limit'
            simple
            :total="50"
            :total="page.total"
            style="margin-left: 10px"
            @change="handlePageChange"
          />
          <FilterOutlined style="margin-left: 10px" />
          <a-popover placement="left" trigger="click">
@@ -59,7 +61,7 @@
          </a-switch>
        </div>
      </div>
      <div v-if="checked" class="left-bt p-3">
      <div v-if="checked" style="height: 30px;" class="left-bt p-3">
        已选择此页面上所有 20 封邮件 , 选择全部 335 封邮件
      </div>
      <div class="p-4" style="height: 90%; overflow: hidden">
@@ -74,6 +76,7 @@
              ref="tableRef"
              :page="pageCurrent"
              :pageList="newList"
              :isDrafts="isDrafts"
              @selectAll="fnSelectAll"
              @updateSelectAll="updateSelectAll"
            />
@@ -95,11 +98,14 @@
  import pageHeadLeft from './pageHeadLeft.vue';
  import { PageWrapper } from '@/components/Page';
  import { ref, watch, defineProps, defineEmits, computed, reactive, onMounted } from 'vue';
  import { ref, watch, defineProps, defineEmits, computed, reactive, onMounted,inject } from 'vue';
  // 定义属性
  interface Props {
    pageList: [];
    pageList?: [];
    pageData?: any;
    mailType?: number;
    isDrafts?: boolean;
  }
  const props = defineProps<Props>();
  const newList = ref([]);
@@ -111,6 +117,7 @@
    },
  );
const page = computed(() => props.pageData);
  const checked = computed(() => selectAllRow.value.length > 0);
  const pageCurrent = ref(1);
  const tableRef = ref();
@@ -143,12 +150,12 @@
      {
        key: '1',
        label: '全部',
        num: 60,
        num: 0,
      },
      {
        key: '2',
        label: '客户',
        num: 20,
        num: 0,
      },
      {
        key: '3',
@@ -163,7 +170,7 @@
      {
        key: '5',
        label: '其他',
        num: 30,
        num: 0,
      },
    ];
  });
@@ -176,12 +183,24 @@
  function fnSelectAll() {
    console.log('44444444444');
  }
  const emit = defineEmits(['pageChange']);
  defineExpose({
    fnSelectAll,
  });
  const getDataList = inject('getDataList');
  function handlePageChange(page, pageSize){
    getDataList(page)
  }
</script>
<style scoped lang="less">
  .head {
  .my-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    border-bottom: 1px solid rgb(5 5 5 / 6%);
    /* 增加选择器特异性 */
@@ -193,6 +212,7 @@
        align-items: center;
        justify-content: space-flex-start;
        width: 100%;
        height: 100%;;
        & .icon {
          margin-right: 15px;