fix: bug#11011、11072、11077、11079
This commit is contained in:
parent
0ea4214ee3
commit
be224bbe5d
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -6,7 +6,6 @@ export const getList_api = (data: object): any => server.get(`/notifications/_qu
|
||||||
export const getListByUnRead_api = (data: object): any => server.post(`/notifications/_query`, data)
|
export const getListByUnRead_api = (data: object): any => server.post(`/notifications/_query`, data)
|
||||||
// 修改记录状态
|
// 修改记录状态
|
||||||
export const changeStatus_api = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}`, data)
|
export const changeStatus_api = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}`, data)
|
||||||
export const read = (id: string): any => server.get(`notifications/${id}/read`)
|
|
||||||
|
|
||||||
|
|
||||||
const encodeParams = (params: Record<string, any>) => {
|
const encodeParams = (params: Record<string, any>) => {
|
||||||
|
|
|
@ -5,10 +5,13 @@
|
||||||
:trigger="['click']"
|
:trigger="['click']"
|
||||||
@visible-change="visibleChange"
|
@visible-change="visibleChange"
|
||||||
>
|
>
|
||||||
<div class="icon-content">
|
<!-- <div class="icon-content">
|
||||||
<AIcon type="BellOutlined" style="font-size: 16px" />
|
<AIcon type="BellOutlined" style="font-size: 16px" />
|
||||||
<span class="unread" v-show="total > 0">{{ total }}</span>
|
<span class="unread" v-show="total > 0">{{ total }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
<j-badge :count="total" :offset="[3, -3]">
|
||||||
|
<AIcon type="BellOutlined" style="font-size: 16px" />
|
||||||
|
</j-badge>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<div>
|
<div>
|
||||||
<NoticeInfo :data="list" @on-action="handleRead" />
|
<NoticeInfo :data="list" @on-action="handleRead" />
|
||||||
|
@ -26,6 +29,9 @@ import { notification, Button } from 'ant-design-vue';
|
||||||
import { changeStatus_api } from '@/api/account/notificationRecord';
|
import { changeStatus_api } from '@/api/account/notificationRecord';
|
||||||
import { useUserInfo } from '@/store/userInfo';
|
import { useUserInfo } from '@/store/userInfo';
|
||||||
|
|
||||||
|
import { useMenuStore } from '@/store/menu';
|
||||||
|
|
||||||
|
const { jumpPage } = useMenuStore();
|
||||||
const updateCount = computed(() => useUserInfo().$state.alarmUpdateCount);
|
const updateCount = computed(() => useUserInfo().$state.alarmUpdateCount);
|
||||||
|
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
@ -44,29 +50,37 @@ const subscribeNotice = () => {
|
||||||
class="ellipsis"
|
class="ellipsis"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
changeStatus_api('_read', [resp.id]);
|
{
|
||||||
|
/* changeStatus_api('_read', [resp.id]); */
|
||||||
|
}
|
||||||
|
read('', resp);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{resp?.payload?.message}
|
{resp?.payload?.message}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
changeStatus_api('_read', [resp.id]);
|
// changeStatus_api('_read', [resp.id])
|
||||||
|
read('', resp);
|
||||||
},
|
},
|
||||||
key: resp.payload.id,
|
key: resp.payload.id,
|
||||||
btn: (
|
btn: (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
changeStatus_api('_read', [resp.id]).then(
|
{
|
||||||
|
/* changeStatus_api('_read', [resp.id]).then(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
notification.close(resp.payload.id);
|
notification.close(resp.payload.id);
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
); */
|
||||||
|
}
|
||||||
|
e.stopPropagation();
|
||||||
|
read('_read', resp);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
标记已读
|
标记已读
|
||||||
|
@ -75,6 +89,21 @@ const subscribeNotice = () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const read = (type: string, data: any) => {
|
||||||
|
changeStatus_api('_read', [data.payload.id]).then((resp: any) => {
|
||||||
|
if (resp.status !== 200) return;
|
||||||
|
|
||||||
|
notification.close(data.payload.id);
|
||||||
|
getList();
|
||||||
|
if (type !== '_read') {
|
||||||
|
jumpPage('account/NotificationRecord', {
|
||||||
|
row: data.payload.detail,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container :tabList="list" @tabChange="onTabChange">
|
<page-container :tabList="list" :tabActiveKey="activeKey" @tabChange="onTabChange">
|
||||||
<AccessLog v-if="activeKey === '1'" />
|
<AccessLog v-if="activeKey === '1'" />
|
||||||
<SystemLog v-else />
|
<SystemLog v-else />
|
||||||
</page-container>
|
</page-container>
|
||||||
|
@ -8,7 +8,9 @@
|
||||||
import { defineComponent, ref } from 'vue';
|
import { defineComponent, ref } from 'vue';
|
||||||
import AccessLog from './Access/index.vue';
|
import AccessLog from './Access/index.vue';
|
||||||
import SystemLog from './System/index.vue';
|
import SystemLog from './System/index.vue';
|
||||||
|
import {useRouterParams} from "@/utils/hooks/useParams";
|
||||||
|
|
||||||
|
const routerParams = useRouterParams()
|
||||||
const activeKey = ref('1');
|
const activeKey = ref('1');
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
|
@ -25,4 +27,10 @@ const list = [
|
||||||
const onTabChange = (e: string) => {
|
const onTabChange = (e: string) => {
|
||||||
activeKey.value = e;
|
activeKey.value = e;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (routerParams.params.value.tab === 'system') {
|
||||||
|
activeKey.value = '2';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -565,6 +565,9 @@ onMounted(() => {
|
||||||
if (routerParams.params.value.type === 'add') {
|
if (routerParams.params.value.type === 'add') {
|
||||||
handleAdd();
|
handleAdd();
|
||||||
}
|
}
|
||||||
|
if (routerParams.params.value.type === 'import') {
|
||||||
|
importVisible.value = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleParams = (config: Record<string, any>) => {
|
const handleParams = (config: Record<string, any>) => {
|
||||||
|
|
|
@ -193,31 +193,31 @@ const opsStepDetails: recommendList[] = [
|
||||||
title: '协议管理',
|
title: '协议管理',
|
||||||
details:
|
details:
|
||||||
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'link/Protocol',
|
linkUrl: 'link/Protocol',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '证书管理',
|
title: '证书管理',
|
||||||
details: '统一维护平台内的证书,用于数据通信加密。',
|
details: '统一维护平台内的证书,用于数据通信加密。',
|
||||||
iconUrl: '/images/home/bottom-6.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'link/Certificate',
|
linkUrl: 'link/Certificate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '网络组件',
|
title: '网络组件',
|
||||||
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
iconUrl: '/images/home/Frame 4529.png',
|
||||||
linkUrl: 'link/Type',
|
linkUrl: 'link/Type',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备接入网关',
|
title: '设备接入网关',
|
||||||
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
iconUrl: '/images/home/Frame 4528(1).png',
|
||||||
linkUrl: 'link/AccessConfig',
|
linkUrl: 'link/AccessConfig',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '日志管理',
|
title: '日志管理',
|
||||||
details: '监控系统日志,及时处理系统异常。',
|
details: '监控系统日志,及时处理系统异常。',
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'Log',
|
linkUrl: 'Log',
|
||||||
params: {
|
params: {
|
||||||
tab: 'system',
|
tab: 'system',
|
||||||
|
|
|
@ -53,31 +53,31 @@ const opsStepDetails: recommendList[] = [
|
||||||
title: '协议管理',
|
title: '协议管理',
|
||||||
details:
|
details:
|
||||||
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'link/Protocol',
|
linkUrl: 'link/Protocol',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '证书管理',
|
title: '证书管理',
|
||||||
details: '统一维护平台内的证书,用于数据通信加密。',
|
details: '统一维护平台内的证书,用于数据通信加密。',
|
||||||
iconUrl: '/images/home/bottom-6.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'link/Certificate',
|
linkUrl: 'link/Certificate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '网络组件',
|
title: '网络组件',
|
||||||
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
iconUrl: '/images/home/Frame 4529.png',
|
||||||
linkUrl: 'link/Type',
|
linkUrl: 'link/Type',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备接入网关',
|
title: '设备接入网关',
|
||||||
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
iconUrl: '/images/home/Frame 4528(1).png',
|
||||||
linkUrl: 'link/AccessConfig',
|
linkUrl: 'link/AccessConfig',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '日志管理',
|
title: '日志管理',
|
||||||
details: '监控系统日志,及时处理系统异常。',
|
details: '监控系统日志,及时处理系统异常。',
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
iconUrl: '/images/home/Frame 4528.png',
|
||||||
linkUrl: 'Log',
|
linkUrl: 'Log',
|
||||||
params: {
|
params: {
|
||||||
tab: 'system',
|
tab: 'system',
|
||||||
|
|
|
@ -139,7 +139,7 @@ const deviceStepDetails: recommendList[] = [
|
||||||
linkUrl: 'device/Instance',
|
linkUrl: 'device/Instance',
|
||||||
auth: devicePermission('import'),
|
auth: devicePermission('import'),
|
||||||
params: {
|
params: {
|
||||||
import: true,
|
type: 'import',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue