fix: bug#20382
This commit is contained in:
parent
35db2f350e
commit
057ab09612
|
@ -88,8 +88,9 @@ const subscribeNotice = () => {
|
||||||
const read = (type: string, data: any) => {
|
const read = (type: string, data: any) => {
|
||||||
changeStatus_api('_read', [data.payload.id]).then((resp: any) => {
|
changeStatus_api('_read', [data.payload.id]).then((resp: any) => {
|
||||||
if (resp.status !== 200) return;
|
if (resp.status !== 200) return;
|
||||||
notification.close(data.payload.id);
|
// notification.close(data.payload.id);
|
||||||
getList();
|
getList();
|
||||||
|
console.log(data,type)
|
||||||
if (type !== '_read') {
|
if (type !== '_read') {
|
||||||
menuStory.routerPush('account/center', {
|
menuStory.routerPush('account/center', {
|
||||||
tabKey: 'StationMessage',
|
tabKey: 'StationMessage',
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal visible title="详情" width="754px" @cancel="emits('update:visible', false)" class="view-dialog-container">
|
||||||
visible
|
|
||||||
title="详情"
|
|
||||||
width="754px"
|
|
||||||
@cancel="emits('update:visible', false)"
|
|
||||||
class="view-dialog-container"
|
|
||||||
>
|
|
||||||
<template v-if="['device-transparent-codec', 'system-event'].includes(data?.topicProvider)">
|
<template v-if="['device-transparent-codec', 'system-event'].includes(data?.topicProvider)">
|
||||||
<div>
|
<div>
|
||||||
<div class="label">通知流水:</div>
|
<div class="label">通知流水:</div>
|
||||||
|
@ -16,57 +10,50 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="['workflow-task-cc','workflow-task-todo','workflow-task-reject', 'workflow-process-finish', 'workflow-process-repealed'].includes(data?.topicProvider)">
|
<template
|
||||||
<j-descriptions
|
v-else-if="['workflow-task-cc', 'workflow-task-todo', 'workflow-task-reject', 'workflow-process-finish', 'workflow-process-repealed'].includes(data?.topicProvider)">
|
||||||
:column="2"
|
<j-descriptions :column="2" :contentStyle="{
|
||||||
:contentStyle="{
|
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}"
|
}" :labelStyle="{
|
||||||
:labelStyle="{
|
|
||||||
color: 'rgba(0, 0, 0, 0.6)',
|
color: 'rgba(0, 0, 0, 0.6)',
|
||||||
width: '72px',
|
width: '72px',
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<j-descriptions-item label="发起人">
|
<j-descriptions-item label="发起人">
|
||||||
<j-ellipsis>{{ _data?.creatorName }}</j-ellipsis>
|
<j-ellipsis>{{ workFlowData?.creatorName }}</j-ellipsis>
|
||||||
</j-descriptions-item>
|
</j-descriptions-item>
|
||||||
<j-descriptions-item label="发起时间">
|
<j-descriptions-item label="发起时间">
|
||||||
<j-ellipsis>
|
<j-ellipsis>
|
||||||
{{ dayjs(_data?.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ dayjs(workFlowData?.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</j-ellipsis>
|
</j-ellipsis>
|
||||||
</j-descriptions-item>
|
</j-descriptions-item>
|
||||||
<j-descriptions-item label="流程分类">
|
<j-descriptions-item label="流程分类">
|
||||||
<j-ellipsis>
|
<j-ellipsis>
|
||||||
{{ _data?.classifiedName }}
|
{{ workFlowData?.classifiedName }}
|
||||||
</j-ellipsis>
|
</j-ellipsis>
|
||||||
</j-descriptions-item>
|
</j-descriptions-item>
|
||||||
<j-descriptions-item label="流程名称"><j-ellipsis>
|
<j-descriptions-item label="流程名称"><j-ellipsis>
|
||||||
{{ _data?.modelName }}
|
{{ workFlowData?.modelName }}
|
||||||
</j-ellipsis></j-descriptions-item>
|
</j-ellipsis></j-descriptions-item>
|
||||||
<j-descriptions-item label="标题"><j-ellipsis>
|
<j-descriptions-item label="标题"><j-ellipsis>
|
||||||
{{ _data?.name }}
|
{{ workFlowData?.name }}
|
||||||
</j-ellipsis></j-descriptions-item>
|
</j-ellipsis></j-descriptions-item>
|
||||||
<j-descriptions-item label="摘要">
|
<j-descriptions-item label="摘要">
|
||||||
<j-ellipsis>
|
<j-ellipsis>
|
||||||
{{ _data?.summary }}
|
{{ workFlowData?.summary }}
|
||||||
</j-ellipsis>
|
</j-ellipsis>
|
||||||
</j-descriptions-item>
|
</j-descriptions-item>
|
||||||
</j-descriptions>
|
</j-descriptions>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<j-descriptions
|
<j-descriptions :column="2" :contentStyle="{
|
||||||
:column="2"
|
|
||||||
:contentStyle="{
|
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}"
|
}" :labelStyle="{
|
||||||
:labelStyle="{
|
|
||||||
color: 'rgba(0, 0, 0, 0.6)',
|
color: 'rgba(0, 0, 0, 0.6)',
|
||||||
width: '72px',
|
width: '72px',
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<template v-if="data?.topicProvider === 'alarm-device'">
|
<template v-if="data?.topicProvider === 'alarm-device'">
|
||||||
<j-descriptions-item label="告警设备">
|
<j-descriptions-item label="告警设备">
|
||||||
<j-ellipsis>{{ _data?.targetName || ''}}</j-ellipsis>
|
<j-ellipsis>{{ _data?.targetName || '' }}</j-ellipsis>
|
||||||
</j-descriptions-item>
|
</j-descriptions-item>
|
||||||
<j-descriptions-item label="设备ID">
|
<j-descriptions-item label="设备ID">
|
||||||
<j-ellipsis>
|
<j-ellipsis>
|
||||||
|
@ -95,10 +82,7 @@
|
||||||
<div class="label">告警流水:</div>
|
<div class="label">告警流水:</div>
|
||||||
<div style="padding: 10px; background-color: #fafafa">
|
<div style="padding: 10px; background-color: #fafafa">
|
||||||
<j-scrollbar height="200px">
|
<j-scrollbar height="200px">
|
||||||
<JsonViewer
|
<JsonViewer style="background-color: #fafafa" :value="JSON.parse(_data?.alarmInfo || '{}')" />
|
||||||
style="background-color: #fafafa"
|
|
||||||
:value="JSON.parse(_data?.alarmInfo || '{}')"
|
|
||||||
/>
|
|
||||||
</j-scrollbar>
|
</j-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -112,8 +96,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { JsonViewer } from 'vue3-json-viewer';
|
import { JsonViewer } from 'vue3-json-viewer';
|
||||||
import 'vue3-json-viewer/dist/index.css';
|
import 'vue3-json-viewer/dist/index.css';
|
||||||
import { queryLevel as queryLevel_api} from '@/api/rule-engine/config';
|
import { queryLevel as queryLevel_api } from '@/api/rule-engine/config';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
import { getWorkflowNotice } from '@/api/account/notificationRecord';
|
||||||
|
|
||||||
const emits = defineEmits(['update:visible']);
|
const emits = defineEmits(['update:visible']);
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -123,6 +108,8 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const levelList = ref<any[]>([]);
|
const levelList = ref<any[]>([]);
|
||||||
|
//工作流详情的值
|
||||||
|
const workFlowData = ref()
|
||||||
|
|
||||||
const _data = computed(() => {
|
const _data = computed(() => {
|
||||||
if (props.data.detailJson) return JSON.parse(props.data.detailJson);
|
if (props.data.detailJson) return JSON.parse(props.data.detailJson);
|
||||||
|
@ -140,9 +127,22 @@ const getLevelLabel = (id: number) => {
|
||||||
return obj?.title;
|
return obj?.title;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if(!['device-transparent-codec', 'system-event'].includes(props?.data?.topicProvider)){
|
if (!['device-transparent-codec', 'system-event'].includes(props?.data?.topicProvider)) {
|
||||||
getLevel();
|
getLevel();
|
||||||
}
|
}
|
||||||
|
if (['workflow-task-cc', 'workflow-task-todo', 'workflow-task-reject', 'workflow-process-finish', 'workflow-process-repealed'].includes(props?.data?.topicProvider)) {
|
||||||
|
const params = {
|
||||||
|
terms: [{
|
||||||
|
type: "or",
|
||||||
|
value: ['workflow-process-finish', 'workflow-process-repealed'].includes(props?.data?.topicProvider) ? props?.data?.dataId : props?.data?.detailJson ? JSON.parse(props?.data?.detailJson)?.processId : props?.data?.detail?.processId,
|
||||||
|
termType: "eq",
|
||||||
|
column: "id"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
getWorkflowNotice(params).then((res) => {
|
||||||
|
workFlowData.value = { 'topicProvider': props?.data?.topicProvider, ...res?.result?.[0] }
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,6 @@ import {
|
||||||
getList_api,
|
getList_api,
|
||||||
changeStatus_api,
|
changeStatus_api,
|
||||||
changeAllStatus,
|
changeAllStatus,
|
||||||
getWorkflowNotice
|
|
||||||
} from '@/api/account/notificationRecord';
|
} from '@/api/account/notificationRecord';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useUserInfo } from '@/store/userInfo';
|
import { useUserInfo } from '@/store/userInfo';
|
||||||
|
@ -221,24 +220,8 @@ const queryParams = ref({});
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
const view = (row: any) => {
|
const view = (row: any) => {
|
||||||
if(props.type === 'workflow-notification'){
|
|
||||||
const params = {
|
|
||||||
terms:[{
|
|
||||||
type: "or",
|
|
||||||
value: ['workflow-process-finish', 'workflow-process-repealed'].includes(row.topicProvider) ? row.dataId : JSON.parse(row.detailJson)?.processId,
|
|
||||||
termType: "eq",
|
|
||||||
column: "id"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
getWorkflowNotice(params).then((res)=>{
|
|
||||||
viewItem.value = {'topicProvider':row.topicProvider,...res?.result?.[0]}
|
|
||||||
viewVisible.value = true;
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
viewItem.value = row;
|
viewItem.value = row;
|
||||||
viewVisible.value = true;
|
viewVisible.value = true;
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
const refresh = () => {
|
const refresh = () => {
|
||||||
tableRef.value && tableRef.value.reload();
|
tableRef.value && tableRef.value.reload();
|
||||||
|
|
Loading…
Reference in New Issue