2024-05-30 17:30:52 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { ref, watch } from 'vue';
|
2024-06-18 17:05:56 +08:00
|
|
|
import { contentTypeRecord } from '@/constants/business';
|
2024-05-30 17:30:52 +08:00
|
|
|
|
|
|
|
defineOptions({
|
|
|
|
name: 'CallbackDetail'
|
|
|
|
});
|
|
|
|
|
|
|
|
interface Props {
|
2024-06-18 17:05:56 +08:00
|
|
|
modelValue?: Workflow.ConditionNodeType;
|
2024-05-30 17:30:52 +08:00
|
|
|
open?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
open: false,
|
|
|
|
modelValue: () => ({})
|
|
|
|
});
|
|
|
|
|
|
|
|
interface Emits {
|
|
|
|
(e: 'update:open', open: boolean): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
const emit = defineEmits<Emits>();
|
|
|
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
|
|
|
watch(
|
|
|
|
() => props.open,
|
|
|
|
val => {
|
|
|
|
visible.value = val;
|
|
|
|
},
|
|
|
|
{ immediate: true }
|
|
|
|
);
|
|
|
|
|
|
|
|
const onClose = () => {
|
|
|
|
emit('update:open', false);
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-07-12 19:31:19 +08:00
|
|
|
<DetailDrawer v-model="visible" title="回调详情" :width="['50%', '90%']" @after-leave="onClose">
|
|
|
|
<NDescriptions :column="1" label-placement="left" bordered :label-style="{ width: '120px' }">
|
|
|
|
<NDescriptionsItem label="节点名称">{{ modelValue.nodeName }}</NDescriptionsItem>
|
|
|
|
<NDescriptionsItem label="webhook">{{ modelValue.callback?.webhook }}</NDescriptionsItem>
|
|
|
|
<NDescriptionsItem label="请求类型">
|
|
|
|
{{ contentTypeRecord[modelValue.callback?.contentType!] }}
|
|
|
|
</NDescriptionsItem>
|
|
|
|
<NDescriptionsItem label="密钥">
|
|
|
|
{{ modelValue.callback?.secret }}
|
|
|
|
</NDescriptionsItem>
|
|
|
|
</NDescriptions>
|
|
|
|
</DetailDrawer>
|
2024-05-30 17:30:52 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|