feat: 增加异常错误信息显示

This commit is contained in:
zhanghao 2026-03-19 13:36:14 +08:00
parent 3227aef1af
commit 320d15f26a
4 changed files with 90 additions and 70 deletions

View File

@ -5,6 +5,7 @@
<JsonViewer :value="inputJsonData" copyable boxed sort theme="light" />
</template>
<template #output>
<div v-if="nodeOperatingStatus != 'FAILED'">
<JsonViewer
v-if="props.properties.outputType === 'json'"
:value="outputJsonData"
@ -28,6 +29,8 @@
v-for="item in outputJsonData.videoUrl"
:videoUrl="item"
/>
</div>
<div v-else>{{ errorInfoData }}</div>
</template>
</NodeState>
<NodeTitle
@ -308,6 +311,7 @@ const setNodeName = (name) => {
const nodeOperatingStatus = ref("NORMAL");
const inputJsonData = ref({});
const outputJsonData = ref({});
const errorInfoData = ref('');
const visibleChange = (value, index, quote) => {
if (value) {
@ -425,6 +429,7 @@ onMounted(() => {
nodeOperatingStatus.value = data.status;
let inputData = {};
let output = {};
errorInfoData.value = data?.message || ''
try {
inputData = JSON.parse(data.paramsIn) || {};
output = JSON.parse(data.paramsOut) || {};

View File

@ -5,6 +5,7 @@
<JsonViewer :value="inputJsonData" copyable boxed sort theme="light" />
</template>
<template #output>
<div v-if="nodeOperatingStatus != 'FAILED'">
<JsonViewer
v-if="props.properties.outputType === 'json'"
:value="outputJsonData"
@ -28,6 +29,8 @@
v-for="item in outputJsonData.videoUrl"
:videoUrl="item"
/>
</div>
<div v-else>{{ errorInfoData }}</div>
</template>
</NodeState>
<NodeTitle
@ -328,6 +331,7 @@ const setNodeName = (name) => {
const nodeOperatingStatus = ref("NORMAL");
const inputJsonData = ref({});
const outputJsonData = ref({});
const errorInfoData = ref('');
const visibleChange = (value, index, quote) => {
if (value) {
@ -532,6 +536,7 @@ onMounted(() => {
nodeOperatingStatus.value = data.status;
let inputData = {};
let output = {};
errorInfoData.value = data?.message || ''
try {
inputData = JSON.parse(data.paramsIn) || {};
output = JSON.parse(data.paramsOut) || {};

View File

@ -5,6 +5,7 @@
<JsonViewer :value="inputJsonData" copyable boxed sort theme="light" />
</template>
<template #output>
<div v-if="nodeOperatingStatus != 'FAILED'">
<JsonViewer
v-if="props.properties.outputType === 'json'"
:value="outputJsonData"
@ -28,6 +29,8 @@
v-for="item in outputJsonData.videoUrl"
:videoUrl="item"
/>
</div>
<div v-else>{{ errorInfoData }}</div>
</template>
</NodeState>
<NodeTitle
@ -307,6 +310,7 @@ const setNodeName = (name) => {
const nodeOperatingStatus = ref("NORMAL");
const inputJsonData = ref({});
const outputJsonData = ref({});
const errorInfoData = ref('');
const visibleChange = (value, index, quote) => {
if (value) {
@ -424,6 +428,7 @@ onMounted(() => {
nodeOperatingStatus.value = data.status;
let inputData = {};
let output = {};
errorInfoData.value = data?.message || ''
try {
inputData = JSON.parse(data.paramsIn) || {};
output = JSON.parse(data.paramsOut) || {};

View File

@ -5,7 +5,10 @@
<JsonViewer :value="inputJsonData" copyable boxed sort theme="light" />
</template>
<template #output>
<div v-if="nodeOperatingStatus != 'FAILED'">
<JsonViewer :value="outputJsonData" copyable boxed sort theme="light" />
</div>
<div v-else>{{ errorInfoData }}</div>
</template>
</NodeState>
<NodeTitle
@ -384,6 +387,7 @@ const visibleChange = (value) => {
const nodeOperatingStatus = ref("NORMAL");
const inputJsonData = ref({});
const outputJsonData = ref({});
const errorInfoData = ref('');
watch(
() => props.properties,
@ -412,6 +416,7 @@ onMounted(() => {
nodeOperatingStatus.value = data.status;
let inputData = {};
let output = {};
errorInfoData.value = data?.message || ''
try {
inputData = JSON.parse(data.paramsIn) || {};
output = JSON.parse(data.paramsOut) || {};