Hua 2 달 전
부모
커밋
03e85bba6a

+ 1 - 1
ruoyi-ui/.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_Title = '/sh'
 VITE_APP_BASE_API = '/sh-api'
 
 # VITE_DEV_PATH = 'http://localhost:8082'
-VITE_DEV_PATH = 'http://192.168.2.119:8082'
+VITE_DEV_PATH = 'http://192.168.2.105:8082'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 27 - 0
ruoyi-ui/src/api/service/info.js

@@ -308,4 +308,31 @@ export function serState(query) {
     method: "get",
     params: query,
   });
+}
+export function getMdfile(query) {
+  return request({
+    url: "/md/file/list",
+    method: "get",
+    params: query,
+  });
+}
+export function addMdfile(data) {
+  return request({
+    url: "/md/file",
+    method: 'post',
+    data:data
+  });
+}
+export function startMdfile(data) {
+  return request({
+    url: "/md/file/start",
+    method: 'post',
+    data:data
+  });
+}
+export function delMdfile(id) {
+  return request({
+    url: '/md/file/' + id,
+    method: 'delete'
+  })
 }

+ 7 - 0
ruoyi-ui/src/views/platform/plugin/index.vue

@@ -54,6 +54,8 @@
                <span>{{ parseTime(scope.row.createTime) }}</span>
             </template>
          </el-table-column>
+         <el-table-column label="标签" align="center" prop="label" width="200">
+         </el-table-column>
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary"  @click="handleUpdate(scope.row)">修改</el-button>
@@ -89,6 +91,11 @@
                      <el-input-number v-model="form.sort" controls-position="right" :min="0" />
                   </el-form-item>
                </el-col>
+               <el-col :span="16">
+                  <el-form-item label="标签" prop="">
+                     <el-input v-model="form.label" placeholder="请输入标签" />
+                  </el-form-item>
+               </el-col>
                <el-col :span="16">
                   <el-form-item label="目录说明">
                      <el-input :row="2" type="textarea" v-model="form.remark" placeholder="请输入目录说明"/>

+ 142 - 1
ruoyi-ui/src/views/register/componentReg/index.vue

@@ -708,6 +708,83 @@
                 </el-table-column>
               </el-table>
             </el-tab-pane>
+            <el-tab-pane label="版本信息" style="" :key="activeTabKey">
+              <div style="display: flex;height:100%;">
+                <div style="width: 65%;background-color: ;height:100%;">
+                  <div style="font-size: 20px;">
+                    历史版本信息
+                  </div>
+                  <el-table 
+                     v-loading="loadVer"
+                    :data="tableDataVer"
+                    style="width: 98%;margin-left: 1%;margin-top: 1%;height: 38vh;"
+                    :cell-style="{ padding:'5px' }"
+                    :header-cell-style="{height: heightAll*0.01+'px',}"
+                    :row-style="{ fontSize: '16px',textAlign:'center'}"
+                    border >
+                    <el-table-column type="index" label="序号" width="80">
+                      <template #default="{ $index }">
+                        <div style="text-align: center;">
+                          {{ $index + 1 }}
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="fileVersion" label="文件版本"  width="100">
+                    </el-table-column>
+                    <el-table-column prop="createBy" label="创建人员"  width="150">
+                    </el-table-column>
+                    <el-table-column prop="jobStatus" label="状态" width="100">
+                        <template #default="scope">
+                            <el-switch @change="changeVerStatus(scope.row)" v-model="scope.row.state" active-value="1" inactive-value="0"/>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="创建时间"  show-overflow-tooltip/>
+                    <el-table-column prop="remark" label="说明" width="200" show-overflow-tooltip/>
+                    <el-table-column prop="address" label="操作" width="100">
+                        <template #default="scope">
+                            <div style="display: flex;justify-content: space-between;width: 100%;">
+                              <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="delVer(scope.row)">删除</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+                <div style="width: 35%;background-color: ;height:100%;">
+                  <div style="font-size: 20px;">
+                    上传新的版本文件
+                  </div>
+                  <el-upload
+                    ref="uploadRefVer"
+                    :limit="1"
+                    accept=".jar, .ph, .sh, .exe, .zip, .bat"
+                    :headers="upload.headers"
+                    :on-change="handleChangeVer"
+                    :file-list="fileListVer"
+                    :action="upload.url + '?file=' + upload.updateSupport"
+                    :on-success="handleFileSuccessVer"
+                    :auto-upload="false"
+                    drag
+                    style="margin-top:2%"
+                > 
+                    <el-icon style="margin-top:3%" class="el-icon--upload"><upload-filled /></el-icon>
+                    <div style="height: 8vh;" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                </el-upload>
+                  <div style="display: flex;margin-left: 1%;margin-top: 1%;align-items: center;">
+                    <div>
+                      说明:{{"\u3000"}}
+                    </div>
+                    <el-input v-model="remarkVer" style="width: 50%;margin-left: 1%;" placeholder="" />
+                  </div>
+                  <div style="display: flex;margin-left: 1%;margin-top: 2%;align-items: center;">
+                    <div>
+                      版本号:
+                    </div>
+                    <el-input v-model="fileVersion" style="width: 50%;margin-left: 1%;" placeholder="" />
+                    <el-button type="primary" style="margin-left:5%;" @click="addVer">上传</el-button>
+                  </div>
+                </div>
+              </div>
+            </el-tab-pane>
           </el-tabs>
           <template #footer>
           <span class="dialog-footer">
@@ -1185,7 +1262,7 @@
 import { getModelList,addModel,delMdid,getModelDetail,updateModel,
   addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
 import {getServiceInfo,addService,modelTreeSelect,getSerDe,delService,testService,
-  addServiceParam,editService} from "@/api/service/info";
+  addServiceParam,editService,delMdfile,startMdfile,addMdfile,getMdfile} from "@/api/service/info";
 import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import {getGatewayRouters} from "@/api/gateway/gatewayRouters.js";
 import { Search } from '@element-plus/icons-vue'
@@ -1204,6 +1281,7 @@ import { editGroup } from "../../../api/register/regCom";
 import pinyin from 'pinyin';
 
 const { proxy } = getCurrentInstance();
+const tableDataVer = ref([])
 const dialogVisibleFen = ref(false)
 const currentHeight = ref(100)
 const dragTableRef = ref()
@@ -1372,6 +1450,7 @@ const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
 const tableKey = ref(0);
 const totalComReg = ref()
 const parMgid = ref()
+const fileVersion = ref('')
 const currentPage = ref(1)
 const tableData2 = ref([ 
   { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
@@ -1476,6 +1555,8 @@ const optionsEnv = ref([
     label: '欧拉',
   },
 ])
+const fileListVer = ref([])
+const uploadRefVer = ref(null)
 const uploadRef = ref(null);
 const fileList = ref([]);
 const fileList1 = ref([]);
@@ -1491,6 +1572,9 @@ onMounted(() => {
 const handleChange = (file, files) => {
   fileList.value = files;
 };
+const handleChangeVer = (file, files) => {
+  fileListVer.value = files;
+};
 const handleChange1 = (file, files) => {
   fileList1.value = files;
 };
@@ -1736,6 +1820,23 @@ async function addSer() {
 function handleBlur(){
   formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
 }
+const loadVer = ref(false)
+function changeVerStatus(row){
+  console.log(row)
+  if(row.state==='1'){
+    var par = {
+      fileId:row.fileId,
+      mdid:parRow.value.mdid
+    }
+    startMdfile(par).then(res=>{
+      loadVer.value = true
+      if(res.code===200){
+        proxy.$modal.msgSuccess(res.msg);
+        showPei(parRow.value)
+      }
+    })
+  }
+}
 function gatherTable(){
   if(checked1.value===false){
     var keyArray = []
@@ -1930,6 +2031,8 @@ function saveChangePar(){
   }
 }
 async function showPei(row){
+  remarkVer.value = ''
+  fileVersion.value = ''
   tableDataSer.value = []
   dialogVisiblePei.value = true
   parRow.value = row
@@ -1938,6 +2041,13 @@ async function showPei(row){
   }
   parId.value = row.mdid
   formAdd.value.mdid = row.mdid
+  loadVer.value = true
+  await getMdfile(par).then(res=>{
+    if(res.code===200){
+      tableDataVer.value = res.rows
+      loadVer.value = false
+    }
+  })
   await getServiceInfo(par).then(res=>{
       if(res.data){
         tableDataSer.value = res.data.serviceList
@@ -1982,6 +2092,7 @@ async function showPei(row){
       item.key = Math.random()
     })
   }) 
+  
   tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
 }
 function delCan(index,row){
@@ -2098,6 +2209,10 @@ async function showEdit(row){
     }
   })
 }
+async function addVer(){
+  console.log(1111)
+  await proxy.$refs["uploadRefVer"].submit();
+}
 async function subEdit(){
   if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef"].submit();
@@ -2188,6 +2303,23 @@ async function handleFileSuccess(response, file, fileList){
     }
   });
 };
+const remarkVer = ref('')
+async function handleFileSuccessVer(response, file, fileList){
+  var par = {
+    mdid:parRow.value.mdid,
+    fileVersion:fileVersion.value,
+    filePath:response.originalFilename,
+    remark:remarkVer.value
+  }
+  addMdfile(par).then(res=>{
+    if(res.code===200){
+      proxy.$modal.msgSuccess("修改成功");
+      dialogVisible.value = false
+      showPei(parRow.value)
+    }
+  })
+  fileListVer.value = []
+};
 function clearFromTree(){
   formTree.value = {}
 }
@@ -2200,6 +2332,15 @@ async function delSer(row) {
   }).catch(() => {
   });
 }
+async function delVer(row) {
+  proxy.$modal.confirm('是否确认删除?').then(function () {
+    return delMdfile(row.fileId);
+  }).then(() => {
+    showPei(parRow.value)
+    proxy.$modal.msgSuccess("删除成功");
+  }).catch(() => {
+  });
+}
 function clearForm(){
   tableDataCan.value = []
   formAdd.value = {

+ 295 - 32
ruoyi-ui/src/views/register/componentReg/peizhi.vue

@@ -53,9 +53,11 @@
         <el-table-column prop="audit" label="审核状态" width="140">
           <template #default="scope">
             <div>
-              <div v-if="scope.row.audit === '0'||scope.row.audit === null" style="color:#909399">待审核</div>
+              <div v-if="scope.row.audit === null||scope.row.audit === ''" style="color:#E6A23C">待申请</div>
+              <div v-if="scope.row.audit === '0'" style="color:#909399">待审核</div>
               <div v-else-if="scope.row.audit === '1'" style="color: #67C23A">审核通过</div>
               <div v-else-if="scope.row.audit === '2'" style="color: #F56C6C">驳回</div>
+              <div v-else-if="scope.row.audit === '3'" style="color: #F56C6C">更新审核</div>
             </div>
           </template>
         </el-table-column>
@@ -64,10 +66,11 @@
             <div>
               <div v-if="scope.row.publish === '0'||scope.row.publish === null" style="color:#909399">未发布</div>
               <div v-else-if="scope.row.publish === '1'" style="color: #67C23A">已发布</div>
+              <div v-else-if="scope.row.publish === '3'" style="color: #F56C6C">更新发布</div>
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="modifyBy" label="发布时间" width="170"/>
+        <el-table-column prop="modifyby" label="注册时间" width="170"/>
         <el-table-column prop="version" label="版本" width="120"/>
         <el-table-column prop="address" label="操作" width="100">
             <template #default="scope">
@@ -75,9 +78,9 @@
                     <!-- <el-button type="primary" @click="showEdit(scope.row)" size="mini" text style="margin-left: 0%;">编辑</el-button> -->
                     <!-- <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button> -->
                     <!-- <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">查看</el-button> -->
-                    <el-button @click="showPei(scope.row)" type="warning" text size="mini" style="margin-left: 1%;">配置</el-button>
+                    <el-button @click="showPei(scope.row)" type="warning" text size="mini" style="margin-left: -5%;">配置</el-button>
                     <!-- <el-button type="danger" @click="delModel(scope.row)" text size="mini" style="margin-left: -5%;">删除</el-button>
-                    <el-button v-if="scope.row.audit === '0'||scope.row.audit === null" type="info" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
+                    <el-button v-if="scope.row.audit === null||scope.row.audit === '2'||scope.row.audit === ''" type="info" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
                 </div>
             </template>
         </el-table-column>
@@ -545,7 +548,7 @@
                 <el-descriptions-item label="联系方式:">{{formJi.devContact}}</el-descriptions-item>
               </el-descriptions>
             </el-tab-pane>
-            <el-tab-pane label="模型参数" style="height: " :key="activeTabKey">
+            <el-tab-pane label="模型参数" style="height: ;" :key="activeTabKey">
               <div style="display: flex;justify-content: space-between;margin-right: 2%;align-items: center;background-color: #e9e9eb;;width: 100%;">
                 <div style="display: flex;align-items: center;margin-left: 1%;">
                   <el-checkbox v-model="checked1" label="参数是否分组" size="large"  @change="gatherTable"/>
@@ -705,6 +708,83 @@
                 </el-table-column>
               </el-table>
             </el-tab-pane>
+            <el-tab-pane label="版本信息" style="" :key="activeTabKey">
+              <div style="display: flex;height:100%;">
+                <div style="width: 65%;background-color: ;height:100%;">
+                  <div style="font-size: 20px;">
+                    历史版本信息
+                  </div>
+                  <el-table 
+                     v-loading="loadVer"
+                    :data="tableDataVer"
+                    style="width: 98%;margin-left: 1%;margin-top: 1%;height: 38vh;"
+                    :cell-style="{ padding:'5px' }"
+                    :header-cell-style="{height: heightAll*0.01+'px',}"
+                    :row-style="{ fontSize: '16px',textAlign:'center'}"
+                    border >
+                    <el-table-column type="index" label="序号" width="80">
+                      <template #default="{ $index }">
+                        <div style="text-align: center;">
+                          {{ $index + 1 }}
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="fileVersion" label="文件版本"  width="100">
+                    </el-table-column>
+                    <el-table-column prop="createBy" label="创建人员"  width="150">
+                    </el-table-column>
+                    <el-table-column prop="jobStatus" label="状态" width="100">
+                        <template #default="scope">
+                            <el-switch @change="changeVerStatus(scope.row)" v-model="scope.row.state" active-value="1" inactive-value="0"/>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="创建时间"  show-overflow-tooltip/>
+                    <el-table-column prop="remark" label="说明" width="200" show-overflow-tooltip/>
+                    <el-table-column prop="address" label="操作" width="100">
+                        <template #default="scope">
+                            <div style="display: flex;justify-content: space-between;width: 100%;">
+                              <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="delVer(scope.row)">删除</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+                <div style="width: 35%;background-color: ;height:100%;">
+                  <div style="font-size: 20px;">
+                    上传新的版本文件
+                  </div>
+                  <el-upload
+                    ref="uploadRefVer"
+                    :limit="1"
+                    accept=".jar, .ph, .sh, .exe, .zip, .bat"
+                    :headers="upload.headers"
+                    :on-change="handleChangeVer"
+                    :file-list="fileListVer"
+                    :action="upload.url + '?file=' + upload.updateSupport"
+                    :on-success="handleFileSuccessVer"
+                    :auto-upload="false"
+                    drag
+                    style="margin-top:2%"
+                > 
+                    <el-icon style="margin-top:3%" class="el-icon--upload"><upload-filled /></el-icon>
+                    <div style="height: 8vh;" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                </el-upload>
+                  <div style="display: flex;margin-left: 1%;margin-top: 1%;align-items: center;">
+                    <div>
+                      说明:{{"\u3000"}}
+                    </div>
+                    <el-input v-model="remarkVer" style="width: 50%;margin-left: 1%;" placeholder="" />
+                  </div>
+                  <div style="display: flex;margin-left: 1%;margin-top: 2%;align-items: center;">
+                    <div>
+                      版本号:
+                    </div>
+                    <el-input v-model="fileVersion" style="width: 50%;margin-left: 1%;" placeholder="" />
+                    <el-button type="primary" style="margin-left:5%;" @click="addVer">上传</el-button>
+                  </div>
+                </div>
+              </div>
+            </el-tab-pane>
           </el-tabs>
           <template #footer>
           <span class="dialog-footer">
@@ -736,7 +816,7 @@
                         style="width: 100%;margin-left: 0%;"
                     >
                       <el-option
-                          v-for="item in optionsType"
+                          v-for="item in optionsJieType"
                           :key="item.value"
                           :label="item.label"
                           :value="item.value"
@@ -754,12 +834,12 @@
               <el-col :span="10">
                 <el-form-item label="接口地址:" prop="url">
                   <el-input v-model="formAdd.url" style="width: 100%;" class="input-with-select">
-                    <template #prepend>
+                    <!-- <template #prepend>
                       <el-select v-model="formAdd.proxyPath" placeholder="Select" style="width: 115px;">
-                        <el-option v-for="item in gatewayRouters" :key="item.id" :label="item.serviceName"
+                        <el-option v-for="item in gatewayRouters" :key="item.id" :label="item.uri"
                                    :value="item.predicates"/>
                       </el-select>
-                    </template>
+                    </template> -->
                   </el-input>
                 </el-form-item>
               </el-col>
@@ -1138,7 +1218,7 @@
               {{ detailJson.url }}
             </div>
             <!-- <svg-icon @click="test" icon-class="startTest" style="margin-left: 1%;width: 50px;height: 25px;cursor: pointer;"/> -->
-            <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击试</el-button>
+            <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击试</el-button>
           </div>
           <div style="margin-top:2%;font-size: 18px;">
             请求参数
@@ -1182,8 +1262,9 @@
 import { getModelList,addModel,delMdid,getModelDetail,updateModel,
   addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
 import {getServiceInfo,addService,modelTreeSelect,getSerDe,delService,testService,
-  addServiceParam,editService} from "@/api/service/info";
+  addServiceParam,editService,delMdfile,startMdfile,addMdfile,getMdfile} from "@/api/service/info";
 import { ref, onMounted, onUnmounted, nextTick } from 'vue';
+import {getGatewayRouters} from "@/api/gateway/gatewayRouters.js";
 import { Search } from '@element-plus/icons-vue'
 import {
   ArrowLeft,
@@ -1200,6 +1281,7 @@ import { editGroup } from "../../../api/register/regCom";
 import pinyin from 'pinyin';
 
 const { proxy } = getCurrentInstance();
+const tableDataVer = ref([])
 const dialogVisibleFen = ref(false)
 const currentHeight = ref(100)
 const dragTableRef = ref()
@@ -1368,6 +1450,7 @@ const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
 const tableKey = ref(0);
 const totalComReg = ref()
 const parMgid = ref()
+const fileVersion = ref('')
 const currentPage = ref(1)
 const tableData2 = ref([ 
   { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
@@ -1398,6 +1481,24 @@ let tableData = ref([{name:'1'}])
 const heightAll = window.innerHeight
 const valueHelpSel = '';
 const tableheight = window.innerHeight*0.8
+const optionsJieType =ref([
+  {
+    value: 'RESTful',
+    label: 'RESTful',
+  },
+  {
+    value: 'WebService',
+    label: 'WebService',
+  },
+  {
+    value: 'HTTP',
+    label: 'HTTP',
+  },
+  {
+    value: 'WebSocket',
+    label: 'WebSocket',
+  },
+])
 const optionsType = [
   {
     value: '1',
@@ -1454,6 +1555,8 @@ const optionsEnv = ref([
     label: '欧拉',
   },
 ])
+const fileListVer = ref([])
+const uploadRefVer = ref(null)
 const uploadRef = ref(null);
 const fileList = ref([]);
 const fileList1 = ref([]);
@@ -1469,6 +1572,9 @@ onMounted(() => {
 const handleChange = (file, files) => {
   fileList.value = files;
 };
+const handleChangeVer = (file, files) => {
+  fileListVer.value = files;
+};
 const handleChange1 = (file, files) => {
   fileList1.value = files;
 };
@@ -1506,6 +1612,11 @@ function getChineseInitials(str) {
     });
     return result.join('');
 }
+function getGate(){
+  getGatewayRouters().then(res => {
+    gatewayRouters.value = res.data
+  })
+}
 function shenhe(row){
   var par = {
     mdid:row.mdid,
@@ -1569,16 +1680,36 @@ async function saveEditService() {
         if (res.code === 200) {
           var parCan = tableDataCanAdd.value
           if(parCan.length!== 0){
-            parCan.forEach(item => {
-                item.srvId = parId.value
-              });
-              addServiceParam(parCan).then(res1 => {
-              if (res1.code === 200) {
-                proxy.$modal.msgSuccess("修改成功");
-                dialogVisibleSer.value = false
-                showPei(parRow.value)
+            var parRule = true
+            parCan.forEach((item, index) => {
+              item.srvId = res.data.srvId
+              if(item.paramCode&&item.paramType&&item.paramName){
+                item.parRule = true
+              }
+              else{
+                item.parRule = false
+              }
+              if (item.paramName === '') {
+                parCan.splice(index, 1)
+              }
+            });
+            parCan.forEach((item, index) => {
+              if(item.parRule===false){
+                parRule = false
               }
             })
+            if(parRule){
+              addServiceParam(parCan).then(res1 => {
+                if (res1.code === 200) {
+                  proxy.$modal.msgSuccess("修改成功");
+                  dialogVisibleSer.value = false
+                  showPei(parRow.value)
+                }
+              })
+            }
+            else{
+              proxy.$modal.msgError("请填写必填项!");
+            }
           }
           else{
             proxy.$modal.msgSuccess("修改成功");
@@ -1607,12 +1738,10 @@ function clearAdd(){
   exampleAdd.value = ''
 }
 async function addSer() {
-  console.log(JsonAdd.value)
   var valid
   await formRefAdd.value.validate((valid1) => {
     valid = valid1
   });
-  console.log(valid)
   if (valid) {
     var par = formAdd.value
     par.example = exampleAdd.value
@@ -1622,29 +1751,92 @@ async function addSer() {
       if (res.code === 200) {
         var parCan = tableDataCanAdd.value
         if (tableDataCanAdd.value.length !== 0) {
+          var parRule = true
           parCan.forEach((item, index) => {
             item.srvId = res.data.srvId
+            if(item.paramCode&&item.paramType&&item.paramName){
+              item.parRule = true
+            }
+            else{
+              item.parRule = false
+            }
             if (item.paramName === '') {
               parCan.splice(index, 1)
             }
           });
-          addServiceParam(parCan).then(res1 => {
-            if (res1.code === 200) {
-              proxy.$modal.msgSuccess("新增成功");
-              dialogVisibleSer.value = false
-              showPei(parRow.value)
+          parCan.forEach((item, index) => {
+            if(item.parRule===false){
+              parRule = false
             }
           })
+          if(parRule){
+            addServiceParam(parCan).then(res1 => {
+              if (res1.code === 200) {
+                proxy.$modal.msgSuccess("新增成功");
+                dialogVisibleSer.value = false
+                showPei(parRow.value)
+              }
+            })
+          }
+          else{
+            proxy.$modal.msgError("请填写必填项!");
+          }
         }
 
       }
     })
   }
-
 }
+// if(tableDataCanAll.value.length>0){
+//     var parRule = true
+//     tableDataCanAll.value.forEach((item, index, array) => { 
+//       item.mdid = parForm.value.mdid
+//       item.parCate = 'int'
+//       if(item.parDefVal&&item.parType&&item.parName&&item.parEnname){
+//         item.parRule = true
+//       }
+//       else{
+//         item.parRule = false
+//       }
+//     })
+//     tableDataCanAll.value.forEach((item, index, array) => { 
+//       if(item.parRule===false){
+//         parRule = false
+//       }
+//     })
+//     if(parRule === true){
+//       changePar(tableDataCanAll.value).then(res=>{
+//         if(res.code===200){
+//           proxy.$modal.msgSuccess("修改成功");
+//           dialogVisiblePei.value = false
+//           getModelListTable()
+//         }
+//       })
+//     }
+//     else{
+//       proxy.$modal.msgError("请填写必填项!");
+//     }
+//   }
 function handleBlur(){
   formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
 }
+const loadVer = ref(false)
+function changeVerStatus(row){
+  console.log(row)
+  if(row.state==='1'){
+    var par = {
+      fileId:row.fileId,
+      mdid:parRow.value.mdid
+    }
+    startMdfile(par).then(res=>{
+      loadVer.value = true
+      if(res.code===200){
+        proxy.$modal.msgSuccess(res.msg);
+        showPei(parRow.value)
+      }
+    })
+  }
+}
 function gatherTable(){
   if(checked1.value===false){
     var keyArray = []
@@ -1796,17 +1988,34 @@ function saveChangePar(){
     })
   }
   if(tableDataCanAll.value.length>0){
+    var parRule = true
     tableDataCanAll.value.forEach((item, index, array) => { 
       item.mdid = parForm.value.mdid
       item.parCate = 'int'
+      if(item.parDefVal&&item.parType&&item.parName&&item.parEnname){
+        item.parRule = true
+      }
+      else{
+        item.parRule = false
+      }
     })
-    changePar(tableDataCanAll.value).then(res=>{
-      if(res.code===200){
-        proxy.$modal.msgSuccess("修改成功");
-        dialogVisiblePei.value = false
-        getModelListTable()
+    tableDataCanAll.value.forEach((item, index, array) => { 
+      if(item.parRule===false){
+        parRule = false
       }
     })
+    if(parRule === true){
+      changePar(tableDataCanAll.value).then(res=>{
+        if(res.code===200){
+          proxy.$modal.msgSuccess("修改成功");
+          dialogVisiblePei.value = false
+          getModelListTable()
+        }
+      })
+    }
+    else{
+      proxy.$modal.msgError("请填写必填项!");
+    }
   }
   else{
     var par = {
@@ -1822,6 +2031,9 @@ function saveChangePar(){
   }
 }
 async function showPei(row){
+  remarkVer.value = ''
+  fileVersion.value = ''
+  tableDataSer.value = []
   dialogVisiblePei.value = true
   parRow.value = row
   var par = {
@@ -1829,6 +2041,13 @@ async function showPei(row){
   }
   parId.value = row.mdid
   formAdd.value.mdid = row.mdid
+  loadVer.value = true
+  await getMdfile(par).then(res=>{
+    if(res.code===200){
+      tableDataVer.value = res.rows
+      loadVer.value = false
+    }
+  })
   await getServiceInfo(par).then(res=>{
       if(res.data){
         tableDataSer.value = res.data.serviceList
@@ -1873,6 +2092,7 @@ async function showPei(row){
       item.key = Math.random()
     })
   }) 
+  
   tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
 }
 function delCan(index,row){
@@ -1989,6 +2209,10 @@ async function showEdit(row){
     }
   })
 }
+async function addVer(){
+  console.log(1111)
+  await proxy.$refs["uploadRefVer"].submit();
+}
 async function subEdit(){
   if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef"].submit();
@@ -2079,6 +2303,23 @@ async function handleFileSuccess(response, file, fileList){
     }
   });
 };
+const remarkVer = ref('')
+async function handleFileSuccessVer(response, file, fileList){
+  var par = {
+    mdid:parRow.value.mdid,
+    fileVersion:fileVersion.value,
+    filePath:response.originalFilename,
+    remark:remarkVer.value
+  }
+  addMdfile(par).then(res=>{
+    if(res.code===200){
+      proxy.$modal.msgSuccess("修改成功");
+      dialogVisible.value = false
+      showPei(parRow.value)
+    }
+  })
+  fileListVer.value = []
+};
 function clearFromTree(){
   formTree.value = {}
 }
@@ -2091,6 +2332,15 @@ async function delSer(row) {
   }).catch(() => {
   });
 }
+async function delVer(row) {
+  proxy.$modal.confirm('是否确认删除?').then(function () {
+    return delMdfile(row.fileId);
+  }).then(() => {
+    showPei(parRow.value)
+    proxy.$modal.msgSuccess("删除成功");
+  }).catch(() => {
+  });
+}
 function clearForm(){
   tableDataCan.value = []
   formAdd.value = {
@@ -2167,6 +2417,15 @@ function filterModelNodes(nodes) {
   }
   return result;
 }
+function maskString(str) {
+    if (!str || str.length <= 6) {
+        return str;
+    }
+    
+    return str.replace(/^(.{3})(.*)(.{3})$/, (_, first, middle, last) => {
+        return first + '*'.repeat(middle.length) + last;
+    });
+}
 function getModelListTable(){
   tableData.value = [] 
   var par = {
@@ -2180,11 +2439,15 @@ function getModelListTable(){
     tableData.value = res.rows
     totalComReg.value = res.total
     formJi.value.sort = res.total+1
+    tableData.value.forEach((item,index,array)=>{
+      item.mdContact = maskString(item.mdContact)
+    })
   })
 }
 const seledMo = ['primary','plain','plain','plain','plain','plain','plain']
 onMounted(() => {
   getTreeLeft()
+  getGate()
 });
 </script>
 <style scoped>

+ 82 - 3
ruoyi-ui/src/views/service/info/editModel.vue

@@ -114,10 +114,11 @@
           </el-table-column>
           <!-- <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
           </el-table-column> -->
-          <el-table-column prop="address" label="操作" width="150">
+          <el-table-column prop="address" label="操作" width="200">
               <template #default="scope">
                   <div style="display: flex;justify-content: space-between;width: 100%;">
-                    <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">查看</el-button>
+                    <el-button @click="showJian(scope.row)" type="warning" text size="mini" style="margin-left: 0%;">监控</el-button>
+                    <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">查看</el-button>
                     <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="delSer(scope.row)">删除</el-button>
                   </div>
               </template>
@@ -796,6 +797,61 @@
             </span>
         </template>
       </el-dialog>
+      <el-dialog @close="clearFromLev" title="服务监控" v-model="dialogVisibleJian" width="80%" destroy-on-close>
+        <el-table
+            style="margin-top: 1%;width: 98%;"
+            :data="tableDataJian"
+            :cell-style="{ textAlign: 'center',padding:'2px 0' }"
+            :header-cell-style="{ textAlign: 'center'}"
+            :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center'  }"
+            border>
+          <el-table-column type="index" align="center" label="序号" width="60">
+            <template #default="{ $index }">
+              <div style="text-align: center;">{{ $index + 1 }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip header-align="center" align="left" width="240" prop="modelName"
+                          label="调用模型"/>
+          <el-table-column show-overflow-tooltip header-align="center" align="left" width="200" prop="serviceName"
+                          label="服务名称"/>
+          <el-table-column prop="url" show-overflow-tooltip header-align="center" align="left" label="服务地址"/>
+          <el-table-column show-overflow-tooltip header-align="center" align="left" width="220" prop="senText"
+                          label="请求参数" :tooltip-formatter="({ row }) =>  {
+            if( row.senText.length >= 30){
+              return row.senText.substring(0, 30) + '...';
+            }
+            return row.senText;
+          }">
+            <template #default="scope">
+              <span style="cursor: copy;" @click="copyParams(scope.row.senText)">{{ scope.row.senText }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip align="center" width="180" prop="tm" label="请求时间"></el-table-column>
+          <el-table-column show-overflow-tooltip align="center" width="120" prop="execTm" label="请求耗时(ms)"/>
+          <el-table-column show-overflow-tooltip align="center" width="100" prop="userName" label="请求用户"/>
+          <el-table-column show-overflow-tooltip header-align="center" align="left" width="150" prop="appName" label="请求应用"/>
+          <el-table-column show-overflow-tooltip align="center" width="100" prop="statusCode" label="请求状态">
+            <template #default="scope">
+              <el-tag v-if="scope.row.statusCode==200">成功</el-tag>
+              <el-tag v-else type="danger">失败</el-tag>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="display: flex;">
+          <el-pagination
+            v-if="totalJian>12"
+            small
+            background
+            style="margin-top: 1%;margin-left: auto;display: flex;margin-right: 1%;"
+            layout="prev, pager, next"
+            :total="totalJian"
+            v-model="pageNumJian"
+            @change="fanJian"
+            class="mt-4"
+        />
+        </div>
+        
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -819,9 +875,12 @@ import {
 } from "@/api/service/info";
 import 'vue-json-viewer/style.css'
 import {cloneDeep} from 'lodash'
+import {getServiceLogList} from "@/api/service/log.js";
 import {getGatewayRouters} from "@/api/gateway/gatewayRouters.js";
-
+const dialogVisibleJian = ref(false)
+const pageNumJian = ref(1)
 const dialogVisibleSerDe = ref(false)
+const tableDataJian = ref([])
 const {proxy} = getCurrentInstance();
 const JsonAdd = ref(JSON.stringify({data: "初始值1"}))
 const exampleAdd = ref('')
@@ -1053,6 +1112,26 @@ function changejobStatus(row){
     }
   })
 }
+const totalJian = ref(0)
+function fanJian(val){
+  pageNumJian.value = val
+  showJian(parRow.value)
+}
+const parRow = ref(null)
+function showJian(row){
+  parRow.value = row
+  dialogVisibleJian.value = true
+  var par ={
+    pageNum: pageNumJian.value,
+    pageSize: 20,
+    srvId:row.srvId
+  }
+  getServiceLogList(par)
+      .then((r) => {
+        tableDataJian.value = r.rows;
+        totalJian.value = r.total;
+      });
+}
 function removeNodeById(tree, targetId) {
   // 检查树是否为空
   if (!tree || !Array.isArray(tree) || tree.length === 0) {

+ 67 - 17
ruoyi-ui/src/views/service/info/fabu.vue

@@ -46,12 +46,9 @@
           <el-table-column prop="intro" label="介绍"  show-overflow-tooltip/>
           <el-table-column prop="audit" label="审核状态" width="100">
             <template #default="scope">
-              <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.audit=='1'">
+              <div style="text-align: center;display: flex;color:#67C23A">
                 已审核
               </div>
-              <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.audit=='3'">
-                更新审核
-              </div>
             </template>
           </el-table-column>
           <el-table-column prop="audit" label="发布状态" width="100">
@@ -63,14 +60,14 @@
                 下线
               </div>
               <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.publish=='3'">
-                更新发布
+                更新
               </div>
               <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.publish==null">
                 待发布
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column prop="address" label="操作" width="250">
               <template #default="scope">
                   <!-- <div style="display: flex;justify-content: space-between;width: 100%;">
                       <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button>
@@ -79,8 +76,10 @@
                       <el-button @click="testSer(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">审核</el-button>
                   </div> -->
                   <div style="display: flex;">
-                    <el-button @click="shenhe(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">发布</el-button>
-                    <el-button @click="xiaxian(scope.row)" type="danger" text size="mini" style="margin-left: 0%;">下线</el-button>
+                    
+                    <el-button :disabled="scope.row.publish!==null" @click="shenhe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">发布</el-button>
+                    <el-button :disabled="scope.row.publish!=='3'" @click="gengxin(scope.row)" type="warning" text size="mini" style="margin-left:0%;">更新</el-button>
+                    <el-button :disabled="scope.row.publish!=='1'&& scope.row.publish!=='3'" @click="xiaxian(scope.row)" type="danger" text size="mini" style="margin-left: 0%;">下线</el-button>
                     <el-button @click="showLog(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">日志</el-button>
                   </div>
               </template>
@@ -177,6 +176,41 @@
             </span>
           </template>
         </el-dialog>
+        <el-dialog @close="clearAdd" v-model="dialogVisibleUpdate" title="" width="40%" destroy-on-close :key="tableKey">
+          <el-form size="mini" :key="tableKey" style="margin-top: 1%;width: 90%;"   label-position="right" label-width="120px" :rules="rulesLev">
+            <el-form-item label="是否更新:" prop="" style="">
+              <el-radio-group v-model="publish" style="margin-top: -0.5%;">
+                <el-radio value="5" size="large">更新</el-radio>
+                <!-- <el-radio value="2" size="large">下线</el-radio> -->
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="说明:" prop="" style="">
+              <el-input v-model="auditRemark" style="width: 100%;" type="textarea"/>
+            </el-form-item>
+          </el-form>
+          <div style="display: flex;font-size: 13px;align-items: center;line-height: 1.5;margin-left: 1%;margin-top: 5%;">
+            <div style="">
+              当前审核人:
+            </div>
+            <div>
+              {{userName}}
+            </div>
+            <div style="margin-left: 5%;">
+              当前日期:
+            </div>
+            <div>
+              {{date}}
+            </div>
+          </div>
+          <template #footer>
+            <span class="dialog-footer">
+                <el-button size="mini" @click="dialogVisibleUpdate = false">取消</el-button>
+                <el-button type="primary" @click="saveGengxin" size="mini">
+                  提交
+                </el-button>
+            </span>
+          </template>
+        </el-dialog>
         <el-dialog @close="clearFromLev" title="发布日志" v-model="dialogVisibleLevel" width="50%" destroy-on-close :key="tableKey">
           <div style="margin-top:0%;font-size: 18px;">
             {{titleFabu}}
@@ -202,6 +236,9 @@
                   <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.state=='0'||scope.row.state==null">
                     未发布
                   </div>
+                  <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.state=='5'">
+                    已更新
+                  </div>
                 </template>
               </el-table-column>
           </el-table>
@@ -239,6 +276,7 @@ const detail = ref({
   rqtype:'',
   rptype:''
 })
+const dialogVisibleUpdate = ref(false)
 const userName = ref('')
 const date = ref('')
 const publish = ref('1')
@@ -466,6 +504,18 @@ function xiaxian(row){
 
 
   
+}
+function saveGengxin(){
+  parShenhe.value.publish = publish.value
+  parShenhe.value.auditRemark = auditRemark.value
+  parShenhe.value.mdid = parMdid.value
+  publishModel(parShenhe.value).then(res=>{
+    if(res.code===200){
+      proxy.$modal.msgSuccess("已更新!");
+        getList()
+      }
+      dialogVisibleTest.value = false
+  })
 }
 function saveShenhe(){
   parShenhe.value.publish = publish.value
@@ -479,21 +529,21 @@ function saveShenhe(){
       dialogVisibleTest.value = false
   })
 }
+function gengxin(row){
+  parMdid.value = row.mdid
+  publish.value = '5'
+  dialogVisibleUpdate.value = true
+  parShenhe.value = {
+    srvId:row.srvId,
+  }
+}
 function shenhe(row){
   parMdid.value = row.mdid
+  publish.value = '1'
   dialogVisibleTest.value = true
   parShenhe.value = {
     srvId:row.srvId,
   }
-  // proxy.$modal.confirm('是否确认审核?').then(function () {
-  //   return changeSerShenhe(par).then(res=>{
-  //     if(res.code===200){
-  //       proxy.$modal.msgSuccess("已审核!");
-  //       handleNodeClick(parMdid.value)
-  //     }
-  //   })
-  // }).then(() => {
-  // }).catch(() => {});
 }
 function test(){
   var par = detailJson.value

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

@@ -1185,12 +1185,12 @@ function deepToRaw(obj) {
   // 如果是普通对象,直接返回
   return obj;
 }
-async function startTest(){
+async function startTest(){ 
   const baseUrl = window.location.origin.toString().substring(6)
   messages.value = []
   const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
   const host = window.location.host;
-  ws.value = new WebSocket('ws://' + '192.168.2.119:8082/websocket/message'); 
+  ws.value = new WebSocket('ws://' + '192.168.2.119:8082/websocket/message');
   ws.value.onopen = () => {
     connected.value = true;
   };