fix: bug#9308

This commit is contained in:
leiqiaochu 2023-03-23 15:21:33 +08:00
parent 73351235ce
commit 83284569aa
6 changed files with 45 additions and 53 deletions

View File

@ -148,6 +148,9 @@ const extraRouteObj = {
'edge/Device': {
children: [{ code: 'Remote', name: '远程控制' }],
},
'rule-engine/Alarm/Log': {
children: [{ code: 'Record', name: '处理记录' }]
}
};
@ -206,7 +209,7 @@ const findDetailRoutes = (routes: any[]): any[] => {
export const findCodeRoute = (asyncRouterMap: any[]) => {
const routeMeta = {}
function getDetail( code: string, url: string) {
function getDetail(code: string, url: string) {
const detail = findDetailRouteItem(code, url)
if (!detail) return
routeMeta[(detail as MenuItem).code] = {
@ -217,7 +220,7 @@ export const findCodeRoute = (asyncRouterMap: any[]) => {
}
}
function findChildren (data: any[], code: string = '') {
function findChildren(data: any[], code: string = '') {
data.forEach(route => {
routeMeta[route.code] = {
path: route.url || route.path,
@ -254,7 +257,7 @@ export const findCodeRoute = (asyncRouterMap: any[]) => {
return routeMeta
}
export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level = 1): { menusData: any, silderMenus: any} {
export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level = 1): { menusData: any, silderMenus: any } {
const _asyncRouterMap = cloneDeep(asyncRouterMap)
const menusData: any[] = []
const silderMenus: any[] = []
@ -270,7 +273,7 @@ export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level =
},
}
const silder = {..._route}
const silder = { ..._route }
// 查看是否有隐藏子路由
route.children = findChildrenRoute(route.code, route.url, route.children)

View File

@ -33,7 +33,7 @@
"
>
<j-button
style="margin: 0 0 0 20px"
class="changeBtn"
size="small"
:disabled="
productStore.current?.count &&
@ -1085,4 +1085,10 @@ nextTick(() => {
font-weight: 400;
font-size: 12px;
}
.changeBtn{
margin: 0 0 0 20px;
color: #315EFB;
background: #ffffff;
border: 1px solid #315EFB
}
</style>

View File

@ -1,7 +1,6 @@
<template>
<page-container
:tabList="list"
@back="onBack"
:tabActiveKey="productStore.tabActiveKey"
@tabChange="onTabChange"
showBack="true"
@ -51,7 +50,17 @@
</div>
<div style="padding-top: 10px">
<j-descriptions size="small" :column="4">
<j-descriptions-item label="设备数量"
<j-descriptions-item
label="设备数量"
:labelStyle="{
fontSize: '14px',
opacity: 0.55,
}"
:contentStyle="{
fontSize: '14px',
color: '#092EE7',
cursor: 'pointer',
}"
><span @click="jumpDevice">{{
productStore.current?.count
? productStore.current?.count
@ -62,18 +71,6 @@
</div>
</template>
<template #extra>
<!-- <j-popconfirm
title="确认应用配置"
@confirm="handleCofig"
okText="确定"
cancelText="取消"
>
<j-button
:disabled="productStore.current.state === 0"
type="primary"
>应用配置</j-button
>
</j-popconfirm> -->
<PermissionButton
type="primary"
:popConfirm="{
@ -172,7 +169,9 @@ watch(
getProtocol();
},
);
const onBack = () => {};
const onBack = () => {
history.back();
};
const onTabChange = (e: string) => {
productStore.tabActiveKey = e;
@ -250,7 +249,7 @@ const getProtocol = async () => {
tab: '数据解析',
},
];
}else{
} else {
list.value = [
{
key: 'Info',
@ -264,7 +263,8 @@ const getProtocol = async () => {
{
key: 'Device',
tab: '设备接入',
},]
},
];
}
}
}

View File

@ -84,7 +84,7 @@
>
<template #title="item">
<span>{{ item.title }}</span>
<a-tooltip :title="item"
<a-tooltip :title="item.option.tooltip"
><AIcon
type="QuestionCircleOutlined"
style="margin-left: 2px"

View File

@ -1,13 +1,5 @@
<template>
<j-modal
visible
title="处理记录"
:width="1200"
cancelText="取消"
okText="确定"
@ok="clsoeModal"
@cancel="clsoeModal"
>
<page-container>
<pro-search
:columns="columns"
target="bind-channel"
@ -30,7 +22,7 @@
<span>
{{
dayjs(slotsProps.handleTime).format(
'YYYY-MM-DD HH:mm:ss'
'YYYY-MM-DD HH:mm:ss',
)
}}
</span>
@ -41,29 +33,25 @@
<template #alarmTime="slotProps">
<span>
{{
dayjs(slotProps.alarmTime).format(
'YYYY-MM-DD HH:mm:ss',
)
dayjs(slotProps.alarmTime).format('YYYY-MM-DD HH:mm:ss')
}}
</span>
</template>
</JProTable>
</j-modal>
</page-container>
</template>
<script lang="ts" setup>
import { queryHandleHistory } from '@/api/rule-engine/log';
import dayjs from 'dayjs';
const props = defineProps({
data: {
type: Object,
},
});
import { useRoute } from 'vue-router';
const route = useRoute();
const id = route.query?.id;
const terms = [
{
column: 'alarmRecordId',
termType: 'eq',
value: props.data.id,
value: id,
type: 'and',
},
];
@ -119,9 +107,6 @@ const emit = defineEmits(['closeLog']);
/**
* 关闭弹窗
*/
const clsoeModal = () => {
emit('closeLog');
};
const handleSearch = (e: any) => {
params.value = e;

View File

@ -136,11 +136,6 @@
v-if="data.solveVisible"
@closeSolve="closeSolve"
/>
<SolveLog
:data="data.current"
v-if="data.logVisible"
@closeLog="closeLog"
/>
</div>
</template>
@ -412,8 +407,11 @@ const getActions = (
},
icon: 'FileTextOutlined',
onClick: () => {
data.value.current = currentData;
data.value.logVisible = true;
menuStory.jumpPage(
'rule-engine/Alarm/Log/Record',
{},
{ id: currentData.id },
);
},
},
];