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': { 'edge/Device': {
children: [{ code: 'Remote', name: '远程控制' }], children: [{ code: 'Remote', name: '远程控制' }],
}, },
'rule-engine/Alarm/Log': {
children: [{ code: 'Record', name: '处理记录' }]
}
}; };

View File

@ -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>

View File

@ -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;
@ -264,7 +263,8 @@ const getProtocol = async () => {
{ {
key: 'Device', key: 'Device',
tab: '设备接入', tab: '设备接入',
},] },
];
} }
} }
} }

View File

@ -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"

View File

@ -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;

View File

@ -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 },
);
}, },
}, },
]; ];