|
@@ -3,6 +3,7 @@
|
|
|
<!-- <el-button type="primary" @click="saveFlow">测试</el-button> -->
|
|
<!-- <el-button type="primary" @click="saveFlow">测试</el-button> -->
|
|
|
<div style="display: flex;margin-left: 1%;padding-top: 0.5%;position: absolute;z-index: 1000;justify-content: space-between;width: 98%;align-items: center;">
|
|
<div style="display: flex;margin-left: 1%;padding-top: 0.5%;position: absolute;z-index: 1000;justify-content: space-between;width: 98%;align-items: center;">
|
|
|
<el-icon size="large" style="cursor: pointer" @click="back"><Back /></el-icon>
|
|
<el-icon size="large" style="cursor: pointer" @click="back"><Back /></el-icon>
|
|
|
|
|
+ <div style="margin-left:1% ;">{{flowName}}</div>
|
|
|
<el-button @click="delWholeFlow" style="margin-left: auto;" type="danger" size="mini">删除</el-button>
|
|
<el-button @click="delWholeFlow" style="margin-left: auto;" type="danger" size="mini">删除</el-button>
|
|
|
<!-- <el-button style="margin-left: 1%;" type="info" size="mini" plain @click="toImage">导出为图片</el-button> -->
|
|
<!-- <el-button style="margin-left: 1%;" type="info" size="mini" plain @click="toImage">导出为图片</el-button> -->
|
|
|
<el-button style="margin-left: 1%;" type="primary" size="mini" @click="saveFlow">保存</el-button>
|
|
<el-button style="margin-left: 1%;" type="primary" size="mini" @click="saveFlow">保存</el-button>
|
|
@@ -250,9 +251,9 @@
|
|
|
<el-checkbox-button key="service" label="service">
|
|
<el-checkbox-button key="service" label="service">
|
|
|
服务
|
|
服务
|
|
|
</el-checkbox-button>
|
|
</el-checkbox-button>
|
|
|
- <el-checkbox-button key="tool" label="tool">
|
|
|
|
|
|
|
+ <!-- <el-checkbox-button key="tool" label="tool">
|
|
|
工具
|
|
工具
|
|
|
- </el-checkbox-button>
|
|
|
|
|
|
|
+ </el-checkbox-button> -->
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-if="checkboxGroup1.includes('service')"
|
|
v-if="checkboxGroup1.includes('service')"
|
|
@@ -703,7 +704,7 @@ import {useVueFlow, VueFlow ,MarkerType } from '@vue-flow/core'
|
|
|
import SpecialNode from './components/SpecialNode.vue'
|
|
import SpecialNode from './components/SpecialNode.vue'
|
|
|
import SpecialEdge from './components/SpecialEdge.vue'
|
|
import SpecialEdge from './components/SpecialEdge.vue'
|
|
|
import {getPtServiceList,getSerDe} from "@/api/service/info.js";
|
|
import {getPtServiceList,getSerDe} from "@/api/service/info.js";
|
|
|
-import { createWebSocket } from '@/utils/websocket'
|
|
|
|
|
|
|
+import { getWebSocketUrl } from '@/utils/websocket'
|
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
|
import {getModelList2} from "@/api/register/regCom.js";
|
|
import {getModelList2} from "@/api/register/regCom.js";
|
|
|
import {copyObject} from "@/utils/index.js";
|
|
import {copyObject} from "@/utils/index.js";
|
|
@@ -711,6 +712,7 @@ import {getModelingDe,addModelingFlow,editModelingFlow,delFlow,runflow} from "@/
|
|
|
import { useStore } from 'vuex';
|
|
import { useStore } from 'vuex';
|
|
|
import {Handle, Position} from '@vue-flow/core'
|
|
import {Handle, Position} from '@vue-flow/core'
|
|
|
import { computed } from 'vue';
|
|
import { computed } from 'vue';
|
|
|
|
|
+import {getModellist} from '@/api/standardization/modeling'
|
|
|
import { modelTreeSelect,testService } from "@/api/service/info";
|
|
import { modelTreeSelect,testService } from "@/api/service/info";
|
|
|
// import { toRaw, isReactive, isProxy } from 'vue';
|
|
// import { toRaw, isReactive, isProxy } from 'vue';
|
|
|
const {
|
|
const {
|
|
@@ -1191,11 +1193,14 @@ async function startTest(){
|
|
|
messages.value = []
|
|
messages.value = []
|
|
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
|
const host = window.location.host;
|
|
const host = window.location.host;
|
|
|
- ws.value = createWebSocket('/websocket/message')
|
|
|
|
|
|
|
+ console.log('ws://' + host + '/websocket/websocket/message')
|
|
|
|
|
+ ws.value = getWebSocketUrl('/websocket/message')
|
|
|
|
|
+ // ws.value = new WebSocket('wss://10.91.9.204:18082/websocket/websocket/message')
|
|
|
|
|
+ // ws.value = new WebSocket('wss://' + host + '/websocket/websocket/message')
|
|
|
|
|
+
|
|
|
ws.value.onopen = () => {
|
|
ws.value.onopen = () => {
|
|
|
connected.value = true;
|
|
connected.value = true;
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
ws.value.onmessage = (event) => {
|
|
ws.value.onmessage = (event) => {
|
|
|
messages.value.push(event.data); // 存储接收到的消息
|
|
messages.value.push(event.data); // 存储接收到的消息
|
|
|
};
|
|
};
|
|
@@ -1715,7 +1720,18 @@ const disconnect = () => {
|
|
|
ws.value = null;
|
|
ws.value = null;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+const flowName = ref()
|
|
|
|
|
+function getName() {
|
|
|
|
|
+ const count = computed(() => store.getters.id)
|
|
|
|
|
+ getModellist().then(res => {
|
|
|
|
|
+ res.rows.forEach(item=>{
|
|
|
|
|
+ console.log(item.appId,count)
|
|
|
|
|
+ if(item.appId === count.value){
|
|
|
|
|
+ flowName.value = item.appTitle
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
// 组件卸载时自动断开连接
|
|
// 组件卸载时自动断开连接
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
disconnect();
|
|
disconnect();
|
|
@@ -1724,6 +1740,7 @@ onMounted(() => {
|
|
|
// connect()
|
|
// connect()
|
|
|
getTreeLeft()
|
|
getTreeLeft()
|
|
|
getList();
|
|
getList();
|
|
|
|
|
+ getName()
|
|
|
})
|
|
})
|
|
|
watch(messages, (newMessages) => {
|
|
watch(messages, (newMessages) => {
|
|
|
newMessages.forEach(item=>{
|
|
newMessages.forEach(item=>{
|