fix: bug#9308
This commit is contained in:
parent
73351235ce
commit
83284569aa
|
@ -148,6 +148,9 @@ const extraRouteObj = {
|
||||||
'edge/Device': {
|
'edge/Device': {
|
||||||
children: [{ code: 'Remote', name: '远程控制' }],
|
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[]) => {
|
export const findCodeRoute = (asyncRouterMap: any[]) => {
|
||||||
const routeMeta = {}
|
const routeMeta = {}
|
||||||
|
|
||||||
function getDetail( code: string, url: string) {
|
function getDetail(code: string, url: string) {
|
||||||
const detail = findDetailRouteItem(code, url)
|
const detail = findDetailRouteItem(code, url)
|
||||||
if (!detail) return
|
if (!detail) return
|
||||||
routeMeta[(detail as MenuItem).code] = {
|
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 => {
|
data.forEach(route => {
|
||||||
routeMeta[route.code] = {
|
routeMeta[route.code] = {
|
||||||
path: route.url || route.path,
|
path: route.url || route.path,
|
||||||
|
@ -254,7 +257,7 @@ export const findCodeRoute = (asyncRouterMap: any[]) => {
|
||||||
return routeMeta
|
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 _asyncRouterMap = cloneDeep(asyncRouterMap)
|
||||||
const menusData: any[] = []
|
const menusData: any[] = []
|
||||||
const silderMenus: 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)
|
route.children = findChildrenRoute(route.code, route.url, route.children)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<j-button
|
<j-button
|
||||||
style="margin: 0 0 0 20px"
|
class="changeBtn"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="
|
:disabled="
|
||||||
productStore.current?.count &&
|
productStore.current?.count &&
|
||||||
|
@ -1085,4 +1085,10 @@ nextTick(() => {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
.changeBtn{
|
||||||
|
margin: 0 0 0 20px;
|
||||||
|
color: #315EFB;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #315EFB
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container
|
<page-container
|
||||||
:tabList="list"
|
:tabList="list"
|
||||||
@back="onBack"
|
|
||||||
:tabActiveKey="productStore.tabActiveKey"
|
:tabActiveKey="productStore.tabActiveKey"
|
||||||
@tabChange="onTabChange"
|
@tabChange="onTabChange"
|
||||||
showBack="true"
|
showBack="true"
|
||||||
|
@ -51,7 +50,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 10px">
|
<div style="padding-top: 10px">
|
||||||
<j-descriptions size="small" :column="4">
|
<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">{{
|
><span @click="jumpDevice">{{
|
||||||
productStore.current?.count
|
productStore.current?.count
|
||||||
? productStore.current?.count
|
? productStore.current?.count
|
||||||
|
@ -62,18 +71,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<!-- <j-popconfirm
|
|
||||||
title="确认应用配置"
|
|
||||||
@confirm="handleCofig"
|
|
||||||
okText="确定"
|
|
||||||
cancelText="取消"
|
|
||||||
>
|
|
||||||
<j-button
|
|
||||||
:disabled="productStore.current.state === 0"
|
|
||||||
type="primary"
|
|
||||||
>应用配置</j-button
|
|
||||||
>
|
|
||||||
</j-popconfirm> -->
|
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
type="primary"
|
type="primary"
|
||||||
:popConfirm="{
|
:popConfirm="{
|
||||||
|
@ -172,7 +169,9 @@ watch(
|
||||||
getProtocol();
|
getProtocol();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const onBack = () => {};
|
const onBack = () => {
|
||||||
|
history.back();
|
||||||
|
};
|
||||||
|
|
||||||
const onTabChange = (e: string) => {
|
const onTabChange = (e: string) => {
|
||||||
productStore.tabActiveKey = e;
|
productStore.tabActiveKey = e;
|
||||||
|
@ -250,7 +249,7 @@ const getProtocol = async () => {
|
||||||
tab: '数据解析',
|
tab: '数据解析',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}else{
|
} else {
|
||||||
list.value = [
|
list.value = [
|
||||||
{
|
{
|
||||||
key: 'Info',
|
key: 'Info',
|
||||||
|
@ -264,7 +263,8 @@ const getProtocol = async () => {
|
||||||
{
|
{
|
||||||
key: 'Device',
|
key: 'Device',
|
||||||
tab: '设备接入',
|
tab: '设备接入',
|
||||||
},]
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
>
|
>
|
||||||
<template #title="item">
|
<template #title="item">
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
<a-tooltip :title="item"
|
<a-tooltip :title="item.option.tooltip"
|
||||||
><AIcon
|
><AIcon
|
||||||
type="QuestionCircleOutlined"
|
type="QuestionCircleOutlined"
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal
|
<page-container>
|
||||||
visible
|
|
||||||
title="处理记录"
|
|
||||||
:width="1200"
|
|
||||||
cancelText="取消"
|
|
||||||
okText="确定"
|
|
||||||
@ok="clsoeModal"
|
|
||||||
@cancel="clsoeModal"
|
|
||||||
>
|
|
||||||
<pro-search
|
<pro-search
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
target="bind-channel"
|
target="bind-channel"
|
||||||
|
@ -30,7 +22,7 @@
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
dayjs(slotsProps.handleTime).format(
|
dayjs(slotsProps.handleTime).format(
|
||||||
'YYYY-MM-DD HH:mm:ss'
|
'YYYY-MM-DD HH:mm:ss',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -41,29 +33,25 @@
|
||||||
<template #alarmTime="slotProps">
|
<template #alarmTime="slotProps">
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
dayjs(slotProps.alarmTime).format(
|
dayjs(slotProps.alarmTime).format('YYYY-MM-DD HH:mm:ss')
|
||||||
'YYYY-MM-DD HH:mm:ss',
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</JProTable>
|
</JProTable>
|
||||||
</j-modal>
|
</page-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { queryHandleHistory } from '@/api/rule-engine/log';
|
import { queryHandleHistory } from '@/api/rule-engine/log';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
const props = defineProps({
|
import { useRoute } from 'vue-router';
|
||||||
data: {
|
const route = useRoute();
|
||||||
type: Object,
|
const id = route.query?.id;
|
||||||
},
|
|
||||||
});
|
|
||||||
const terms = [
|
const terms = [
|
||||||
{
|
{
|
||||||
column: 'alarmRecordId',
|
column: 'alarmRecordId',
|
||||||
termType: 'eq',
|
termType: 'eq',
|
||||||
value: props.data.id,
|
value: id,
|
||||||
type: 'and',
|
type: 'and',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -119,9 +107,6 @@ const emit = defineEmits(['closeLog']);
|
||||||
/**
|
/**
|
||||||
* 关闭弹窗
|
* 关闭弹窗
|
||||||
*/
|
*/
|
||||||
const clsoeModal = () => {
|
|
||||||
emit('closeLog');
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSearch = (e: any) => {
|
const handleSearch = (e: any) => {
|
||||||
params.value = e;
|
params.value = e;
|
|
@ -136,11 +136,6 @@
|
||||||
v-if="data.solveVisible"
|
v-if="data.solveVisible"
|
||||||
@closeSolve="closeSolve"
|
@closeSolve="closeSolve"
|
||||||
/>
|
/>
|
||||||
<SolveLog
|
|
||||||
:data="data.current"
|
|
||||||
v-if="data.logVisible"
|
|
||||||
@closeLog="closeLog"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -412,8 +407,11 @@ const getActions = (
|
||||||
},
|
},
|
||||||
icon: 'FileTextOutlined',
|
icon: 'FileTextOutlined',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
data.value.current = currentData;
|
menuStory.jumpPage(
|
||||||
data.value.logVisible = true;
|
'rule-engine/Alarm/Log/Record',
|
||||||
|
{},
|
||||||
|
{ id: currentData.id },
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue