ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
 
import { toDateText } from '@jnpf/utils';
 
import { getEmailList } from '#/api/onlineDev/portal';
 
import CardHeader from '../CardHeader/index.vue';
 
defineProps(['activeData']);
const list = ref<any[]>([]);
 
function initData() {
  getEmailList().then((res) => {
    list.value = res.data.list?.length ? res.data.list.slice(0, 7) : [];
  });
}
 
onMounted(() => initData());
</script>
<template>
  <a-card class="portal-card-box">
    <template #title v-if="activeData.title">
      <CardHeader :title="activeData.title" :card="activeData.card" />
    </template>
    <div class="portal-card-body portal-card-email">
      <template v-if="list.length">
        <div class="item" v-for="(item, i) in list" :key="i">
          <router-link :to="`/emailDetail?id=${item.id}`">
            <span class="name com-hover">{{ item.fullName }}</span>
          </router-link>
          <span class="time">{{ toDateText(item.creatorTime) }}</span>
        </div>
      </template>
      <div class="portal-common-noData" v-else>
        <jnpf-empty />
      </div>
    </div>
  </a-card>
</template>