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