nanjingliujinyu 4 luni în urmă
părinte
comite
9fb1e57e1b
1 a modificat fișierele cu 19 adăugiri și 6 ștergeri
  1. 19 6
      ruoyi-ui/src/views/standardization/modeling/index.vue

+ 19 - 6
ruoyi-ui/src/views/standardization/modeling/index.vue

@@ -14,7 +14,7 @@
         <div style="margin-left: 4%;">
           {{servieName}}
         </div> 
-        <el-icon @click="saveNode" style="margin-left: auto;cursor: pointer;"><Close /></el-icon>
+        <el-icon @click="closeDe" style="margin-left: auto;cursor: pointer;"><Close /></el-icon>
       </div>
       <div>
       <div style="display: flex;width: 90%;margin-left: 5%;margin-top:10%;align-items: center;justify-content: space-between;">
@@ -28,7 +28,7 @@
             </div>
           </template>
         </el-input>
-        <svg-icon icon-class="startTest" style="margin-left: auto;width: 50px;height: 25px;cursor: pointer;"/>
+        <svg-icon @click="testOne" icon-class="startTest" style="margin-left: auto;width: 50px;height: 25px;cursor: pointer;"/>
       </div>
       <div style="display: flex;width: 90%;margin-left: 5%;margin-top:10%;align-items: center;justify-content: space-between;">
         <el-table :data="tableDataCan" border style="width: 100%">
@@ -692,7 +692,7 @@ import {getModelingDe,addModelingFlow,editModelingFlow,delFlow,runflow} from "@/
 import { useStore } from 'vuex';
 import {Handle, Position} from '@vue-flow/core'
 import { computed } from 'vue';
-import { modelTreeSelect } from "@/api/service/info";
+import { modelTreeSelect,testService } from "@/api/service/info";
 // import { toRaw, isReactive, isProxy } from 'vue';
 const {
   snapToGrid,
@@ -885,6 +885,7 @@ const loading = ref(true);
 const checkboxGroup1 = ref(['service'])
 const toolType = ref('0');
 const serviceList = ref([]);
+const serInfo = ref()
 const defaultEdgeStyle = {
   style: { 
     stroke: '#79bbff', 
@@ -951,6 +952,14 @@ function addEnd(){
 function delEnd(index){
   tableDataCanEnd.value.splice(index,1)
 }
+function testOne(){
+  var par = serInfo.value
+  par.params = tableDataCan.value
+  testService(par).then(res=>{
+    dialogVisibleSart.value = true
+    outputData.value = res.msg
+  })
+}
 function startTest(){
   var param = []
   var paramEnd = []
@@ -1045,6 +1054,9 @@ function addStart(){
 function delCanStart(index){
   tableDataCanStart.value.splice(index,1)
 }
+function closeDe(){
+  nodeDeSer.value = false
+}
 function saveNode(){
   // console.log(tableDataCan.value)
   var par = {
@@ -1053,7 +1065,7 @@ function saveNode(){
   }
   tableDataCan.value.forEach(item=>{
     if(item.paramValue!==null){
-      var parSplit = item.paramValue.split(':')
+      var parSplit = item.paramValue.split('.')
       if(parSplit[1]==='fixed'){
         var par1 = {
           name:item.paramName,
@@ -1091,7 +1103,7 @@ function saveNode(){
     }
   })
   console.log(toObject())
-  nodeDeSer.value = false
+  // nodeDeSer.value = false
   // const node = findNode(parNodeid.value)
   // node.data.data = par
   // updateNode(node.id, { data: { ...node.data, ...par } });
@@ -1324,7 +1336,7 @@ onNodeClick(({event, node}) => {
     if(tableDataCanStart.value.length>0){
       tableDataCanStart.value.forEach(item=>{
         var par = {
-          ref:item.value,
+          ref:'1' + '.' + item.name,
           name:item.name
         }
         optionsCan.value.push(par)
@@ -1344,6 +1356,7 @@ onNodeClick(({event, node}) => {
       serviceRqtype.value = res.data.ptService.rqtype
       servieName.value = res.data.ptService.name
       tableDataCan.value = res.data.list
+      serInfo.value = res.data.ptService
       parSerList.value = JSON.parse(JSON.stringify(res.data.list))
       var par1 =  parseJSONWithComments(res.data.ptService.rpcontent)
       var parShu = Object.keys((par1))