nanjingliujinyu hace 5 meses
padre
commit
00ca59d625

+ 1 - 0
ruoyi-ui/src/assets/icons/svg/startTest.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755832632207" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5635" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M385.011469 321.043513l319.507958 191.704775-319.507958 191.704774V321.043513z m569.363181 448.589173l-95.213371-95.021667a386.988038 386.988038 0 1 0-184.6756 184.547796l95.213371 95.085569a511.979551 511.979551 0 1 1 184.6756-184.611698z" fill="#4C89FB" p-id="5636"></path></svg>

+ 0 - 1
ruoyi-ui/src/layout/components/editModel.vue

@@ -1249,7 +1249,6 @@ function delCan(index){
 }
 function addCanAdd(){
     var par = {
-        itemName:''
     }
     tableDataCanAdd.value.push(par)
 }

+ 80 - 21
ruoyi-ui/src/views/standardization/modeling/index.vue

@@ -1,19 +1,72 @@
 <template>
   <div>
-    <el-button type="primary" @click="showData">测试</el-button>
-    <!-- <div style="margin-left: 1%;padding-top: 1%;position: absolute;z-index: 1000;cursor: pointer;" @click="back"> 
+    <!-- <el-button type="primary" @click="showData">测试</el-button> -->
+    <div style="display: flex;margin-left: 1%;padding-top: 1%;position: absolute;z-index: 1000;cursor: pointer;justify-content: space-between;width: 98%;" @click="back"> 
       <el-icon size="large"><Back /></el-icon>
-    </div> -->
-    <div style="height: 85vh;width: 20vw;position: absolute;float: right;z-index: 1000;right: 1%;top: 1%;border: 0.1px solid #dedfe0;border-radius: 6px;background-color: white;">
+      <el-button style="margin-left: auto;" type="danger" size="mini">删除</el-button>
+      <el-button style="margin-left: 1%;" type="primary" size="mini">保存</el-button>
+    </div>
+    <div v-if="nodeDeSer" style="height: 85vh;width: 20vw;position: absolute;float: right;z-index: 1000;right: 1%;top: 1%;border: 0.1px solid #dedfe0;border-radius: 6px;background-color: white;">
       <div style="display: flex;margin-left: 3%;margin-top: 3%;align-items: center;justify-content: space-between;width: 95%;">
         <el-tag class="ml-2" style="" type="warning">服务</el-tag>
         <div style="margin-left: 4%;">
-          获取台风信息列表
+          {{servieName}}
         </div>
-        <el-icon style="margin-left: auto;"><Close /></el-icon>
+        <el-icon @click="nodeDeSer = false" 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;">
+        <el-input v-model="serviceUrl" style="width: 90%;" placeholder="Please input" disabled>
+          <template #prepend>
+            <div v-if="serviceRqtype==='GET'" style="color: #67C23A;background-color: transparent;">
+              GET
+            </div>
+            <div v-if="serviceRqtype==='POST'" style="color: #409EFF;background-color: transparent;">
+              POST
+            </div>
+          </template>
+        </el-input>
+        <svg-icon 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%">
+          <el-table-column prop="paramCode" label="参数名" width="" />
+          <el-table-column prop="paramValue" label="参数值" width="">
+            <template #default="scope">
+              <div style="width: 100%;">
+                  <el-input placeholder="" type="primary" class="noBor" v-model="scope.row.paramValue" size="mini" text style="margin-left: 0%;"></el-input>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div style="display: flex;width: 90%;margin-left: 5%;margin-top:10%;align-items: center;justify-content: space-between;">
+        <el-form ref="deptRef" :model="form" :rules="rules" label-width="80px" label-position="top">
+          <el-form-item label="BODY">
+            <!-- 单选 -->
+            <el-radio-group v-model="form.bodyType">
+              <el-radio value="none">none</el-radio>
+              <el-radio value="form-data">form-data</el-radio>
+              <el-radio value="x-www-form-urlencoded">x-www-form-urlencoded</el-radio>
+              <el-radio value="JSON">JSON</el-radio>
+              <el-radio value="raw">raw</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="失败处理">
+            <el-select v-model="form.errorPolicy" style="width: 50%">
+              <el-option label="报错" value="ABORT"></el-option>
+              <el-option label="忽视" value="IGNORE"></el-option>
+              <el-option label="重连" value="RETRY"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item  label="失败重连次数">
+            <el-input-number  v-model="form.retryCount" :min="1" style="width: 50%" :max="30"/>
+          </el-form-item>
+        </el-form>
+      </div>
       </div>
     </div>
-    <div style="display: flex;height: 85vh;width: 100%;padding-top: 1%;">
+    <div style="display: flex;height: 85vh;width: 100%;padding-top:2%;">
       <div style="width: 20%;margin-left: 1%;overflow-y: auto;">
         <el-tree :expand-on-click-node="false" ref="treeRef" :filter-node-method="filterNode" :current-node-key="currentNodeKey" class="treeLeft" :data="dataTree" @node-click="handleNodeClick" node-key="id" style="margin-left: 5%;margin-top: 5%;width: 90%;background-color: transparent;" default-expand-all :key="valueKet">
           <template #default="{ node, data }">
@@ -62,7 +115,7 @@
             style="border: 0.5px solid #c8c9cc;border-radius: 6px;border-radius: 6px;min-height: 8vh;min-width: 13vw">
               <div style='width:100%;font-size:10px;display:flex;align-items:flex-end;height: 10px;margin-top: 2%;justify-content: space-between;'>
                 <img style="width: 15px;height:15px;border-radius: 12px;" src="@/assets/images/icon-HTTP.png" alt="">
-                <div style="margin-left:3%;font-weight: 500;width: 40%;">
+                <div style="margin-left:3%;font-weight: 500;">
                   {{ specialNodeProps.data.label }}
                 </div>
                 <el-icon style="cursor: pointer;margin-left: auto;"><CaretRight /></el-icon>
@@ -144,16 +197,16 @@
           <dynamic-map v-if="form.bodyType === 'x-www-form-urlencoded'" v-model="form.config.body"></dynamic-map>
         </el-form-item>
         <el-row>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="失败处理">
-              <el-select v-model="form.errorPolicy" style="width: 100px">
+              <el-select v-model="form.errorPolicy" style="width: 100%">
                 <el-option label="报错" value="ABORT"></el-option>
                 <el-option label="忽视" value="IGNORE"></el-option>
                 <el-option label="重连" value="RETRY"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item v-if="form.errorPolicy === 'RETRY'" label="失败重连次数">
               <el-input-number v-model="form.retryCount" :min="1" :max="30"/>
             </el-form-item>
@@ -176,7 +229,7 @@ import { onMounted, ref } from 'vue'
 import {useVueFlow, VueFlow ,MarkerType } from '@vue-flow/core'
 import SpecialNode from './components/SpecialNode.vue'
 import SpecialEdge from './components/SpecialEdge.vue'
-import {getPtServiceList} from "@/api/service/info.js";
+import {getPtServiceList,getSerDe} from "@/api/service/info.js";
 import {getModelList2} from "@/api/register/regCom.js";
 import {copyObject} from "@/utils/index.js";
 import {getWorkflowByModelId, saveWorkflow} from "@/api/standardization/workflow.js";
@@ -200,6 +253,11 @@ const {
   removeEdges,
 } = useVueFlow()
 snapToGrid.value = true
+const servieName = ref()
+const serviceRqtype = ref()
+const serviceUrl = ref()
+const tableDataCan = ref()
+const nodeDeSer = ref(false)
 const {proxy} = getCurrentInstance();
 const modelQueryParams = ref({
   name: undefined,
@@ -263,13 +321,18 @@ function handleModelClick(mid) {
 
 onNodeClick(({event, node}) => {
   console.log(node)
-  // form.value = node.data
-  open.value = true
-  // title.value = node.data.label
-  // nodeId.value = node.id
+  if(node.data.nodeType==='SERVICE'){
+    getSerDe(node.data.id).then(res=>{
+      servieName.value = res.data.ptService.name
+      tableDataCan.value = res.data.list
+      serviceUrl.value = res.data.ptService.url
+      dataReturn.value = res.data.returnList
+    })
+    nodeDeSer.value = true
+  }
+  
 });
 
-
 const data = reactive({
   form: {config: {}},
   queryParams: {
@@ -405,10 +468,6 @@ const filterNode = (value, data) => {
   return data.label.indexOf(value) !== -1;
 };
 
-/** 节点单击事件 */
-function handleNodeClick(node,data,event) {
-  console.log(data)
-}
 
 /** 搜索按钮操作 */
 function handleQuery() {