update 增加互联

main
haha 2024-08-02 23:37:42 +08:00
parent e3b440c689
commit 3f2741c473
6 changed files with 117 additions and 135 deletions

View File

@ -49,7 +49,6 @@ const download=(id)=>{
}
//上传数据文件
const upload = (file) => {
debugger
const formData = new FormData();
formData.append("file_name", file.name);
formData.append("file_content",file)

View File

@ -20,28 +20,23 @@
<span class="sp-title">互联名称:</span>
<span class="sp-text">{{ info.data.connection_name }}</span>
</td>
<td style="width: 50%;">
<span class="sp-title">标签:</span>
<span class="sp-text">{{ info.data.connection_label }}</span>
</td>
</tr>
<tr>
<td style="width: 50%;">
<span class="sp-title">创建用户:</span>
<span class="sp-text">{{ info.data.user_name }}</span>
</td>
</tr>
<tr>
<td style="width: 50%;">
<span class="sp-title">创建时间:</span>
<span class="sp-text">{{ info.data.create_time }}</span>
</td>
</tr>
<tr>
<td style="width: 100%;" colspan="2">
<td style="width: 50%;" colspan="2">
<span class="sp-title">互联说明:</span>
<span class="sp-text">{{ info.data.connection_desc }}</span>
</td>
</tr>
</table>
</el-card>
<el-card style="margin-top: 12px;margin-bottom: 60px;">

View File

@ -67,14 +67,8 @@ const config = {
};
const showFlow = (o) => {
info.opers = o.operator_list;
info.edges=o.operator_edges;
info.nodes=o.operator_nodes.map(it=>{
let tmps=info.opers.filter(d=>d.operator_id==it.properties.node);
if(tmps.length>0){
it.text.value=tmps[0].operator_name;
}
return it;
});
info.edges = o.operator_node_data.edges || [];
info.nodes = o.operator_node_data.nodes || [];
let data = { nodes: info.nodes, edges: info.edges };
lf.value.render(data)

View File

@ -18,16 +18,11 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="互联名称" prop="connection_name">
<el-input v-model="upForm.connection_name" placeholder="请输入互联名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签" prop="connection_label">
<el-input v-model="upForm.connection_label" placeholder="请输入标签" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
@ -139,13 +134,11 @@ const upForm = reactive({
model_name: '',
model_version: '',
connection_name: '',
connection_label: '',
connection_desc: ''
});
const upRules = computed(() => {
return {
connection_name: [{ required: true, trigger: "blur", message: "请输入互联名称", },],
connection_label: [{ required: true, trigger: "blur", message: "请输入标签", },],
connection_desc: [{ required: true, trigger: "blur", message: "请输入互联说明", },],
}
});
@ -336,8 +329,10 @@ const doSave = () => {
connection_desc: upForm.connection_desc,
operator_list: operator_list,
operator_connection_list: operator_connection_list,
operator_connection_nodes: flowData.nodes,
operator_connection_edges: flowData.edges
operator_node_data: {
nodes: flowData.nodes,
edges: flowData.edges
}
};
if (info.type == "add") {
ConnApi.add(postData).then(d => {

View File

@ -36,7 +36,7 @@
<template #default="scope">
<el-button text type="primary" size="small" @click="doShowDetail(scope.row)"><i-ep-edit />查看</el-button>
<el-button text type="primary" size="small" style="margin:0px;"
@click="doEdit(scope.row.connection_id)"><i-ep-link />修改互联</el-button>
@click="doEdit(scope.row)"><i-ep-link />修改互联</el-button>
<el-button text type="primary" size="small" @click="doAdd(scope.row)"
style="margin:0px;"><i-ep-plus />新建互联</el-button>
<el-button text type="primary" size="small" @click="handleDelete(scope.row)"

View File

@ -294,7 +294,6 @@ function handleFileChange(file, b) {
name: file.file.name,
serverName: res.data.data.file_name
})
debugger
upForm.model_file_list = listOpt.upFiles.map(it => it.serverName);
});