|
|
|
@ -20,8 +20,9 @@ import { defineEmits, defineProps, ref } from 'vue';
|
|
|
|
|
import { NodeResizer } from '@vue-flow/node-resizer';
|
|
|
|
|
import { Connection } from '@element-plus/icons-vue';
|
|
|
|
|
import { Handle, Position } from '@vue-flow/core';
|
|
|
|
|
import request from '@/utils/request';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import request from '@/utils/request.js';
|
|
|
|
|
import { isD } from '../../tool.js';
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
isView: {
|
|
|
|
@ -83,18 +84,12 @@ const getOutputData = () => {
|
|
|
|
|
(props.data.customData.inputData || []).forEach((item) => {
|
|
|
|
|
params[item.name] = props.inputData[item.name];
|
|
|
|
|
});
|
|
|
|
|
request({
|
|
|
|
|
(isD ? request : axios.request)({
|
|
|
|
|
method: props.data.customData.method,
|
|
|
|
|
url: props.data.customData.url,
|
|
|
|
|
params: props.data.customData.method === 'get' ? params : '',
|
|
|
|
|
data: props.data.customData.method === 'post' ? params : ''
|
|
|
|
|
}).then(res => {
|
|
|
|
|
// axios.request({
|
|
|
|
|
// method: props.data.customData.method,
|
|
|
|
|
// url: props.data.customData.url,
|
|
|
|
|
// params: props.data.customData.method === 'get' ? params : '',
|
|
|
|
|
// data: props.data.customData.method === 'post' ? params : ''
|
|
|
|
|
// }).then(res => {
|
|
|
|
|
let output = {};
|
|
|
|
|
props.data.customData.outputData.forEach(item => {
|
|
|
|
|
output[item.name] = parseData(res.data, item.tier);
|
|
|
|
|