可信代码库-个人中心预警通知列表显示修改

This commit is contained in:
付民康
2025-07-01 15:12:56 +08:00
parent 845bbd3412
commit f496b3a3be
2 changed files with 10 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData"> <d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<d-column field="updateTime" header="时间"> <d-column field="updateTime" header="时间">
<template #default="scope"> <template #default="scope">
<span>{{ formatTime(scope.row.updateTime, 'YYYY-MM-DD') }}</span> {{ scope.row.updateTime? dayjs(scope.row.updateTime).format('YYYY-MM-DD HH:mm:ss') :'--' }}
</template> </template>
</d-column> </d-column>
<d-column field="name" header="标题"> <d-column field="name" header="标题">
@@ -12,7 +12,7 @@
<a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a> <a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a>
</template> </template>
</d-column> </d-column>
<d-column field="alertMsg" header="详情"> <d-column field="alertMsg" header="详情" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span> <span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
</template> </template>
@@ -69,6 +69,7 @@ import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDe
import NoData from '@/components/NoData/NoData.vue'; import NoData from '@/components/NoData/NoData.vue';
import { getgroupNoticeList, getNoticeList } from '@/api/jyh'; import { getgroupNoticeList, getNoticeList } from '@/api/jyh';
import { useAccountStore } from '@/stores/user'; import { useAccountStore } from '@/stores/user';
import dayjs from 'dayjs';
const account = useAccountStore(); const account = useAccountStore();
const tableData = ref([ const tableData = ref([
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 }, // { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 },

View File

@@ -2,13 +2,17 @@
<Card simple class="jyh-card mt-3"> <Card simple class="jyh-card mt-3">
<div class="mb-3"> <div class="mb-3">
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData"> <d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<d-column field="updateTime" header="时间"></d-column> <d-column field="updateTime" header="时间">
<template #default="scope">
{{ dayjs(scope.row.updateTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</d-column>
<d-column field="name" header="标题"> <d-column field="name" header="标题">
<template #default="scope"> <template #default="scope">
<a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a> <a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a>
</template> </template>
</d-column> </d-column>
<d-column field="alertMsg" header="详情"> <d-column field="alertMsg" header="详情" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span> <span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
</template> </template>
@@ -65,6 +69,7 @@ import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDe
import NoData from '@/components/NoData/NoData.vue'; import NoData from '@/components/NoData/NoData.vue';
import { getNoticeList } from '@/api/jyh'; import { getNoticeList } from '@/api/jyh';
import { useAccountStore } from '@/stores/user'; import { useAccountStore } from '@/stores/user';
import dayjs from 'dayjs';
const account = useAccountStore(); const account = useAccountStore();
const tableData = ref([ const tableData = ref([
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 }, // { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 },