Hua hai 3 meses
pai
achega
ab3975317e

+ 1 - 1
ruoyi-ui/src/api/register/regCom.js

@@ -445,7 +445,7 @@ export function changeShenhe(query) {
 
 export function changeSerShenhe(query) {
     return request({
-        url: '/pt/service/audit',
+        url: '/model/info/audit',
         method: 'get',
         params: query
     })

+ 1 - 1
ruoyi-ui/src/api/service/info.js

@@ -156,7 +156,7 @@ export function delGuan(id) {
 }
 export function publishModel(query) {
   return request({
-    url: "/pt/service/publish",
+    url: "/model/info/publish",
     method: "get",
     params: query,
   });

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

@@ -1515,6 +1515,7 @@ function shenhe(row){
   changeShenhe(par).then(res=>{
     if(res.code===200){
       proxy.$modal.msgSuccess("已可测试!");
+      getModelListTable()
     }
   })
 }

+ 29 - 5
ruoyi-ui/src/views/service/info/fabu.vue

@@ -39,7 +39,7 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="name" label="模型名称"  width="200">
+          <el-table-column prop="name" label="模型名称"  width="250">
           </el-table-column>
           <el-table-column prop="type" label="接口类型"  width="200">
           </el-table-column>
@@ -58,6 +58,16 @@
               </div>
             </template>
           </el-table-column>
+          <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>
+              <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">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.publish=='1'">
@@ -223,6 +233,7 @@ import { getUserProfile } from "@/api/system/user";
 import JsonViewer from 'vue-json-viewer'
 import 'vue-json-viewer/style.css' 
 import  JsonEditorVue from 'json-editor-vue3'
+import {getModelList} from "@/api/register/regCom";
 import { cloneDeep } from 'lodash'
 import { useClipboard } from "@vueuse/core";
 
@@ -450,10 +461,7 @@ function saveShenhe(){
   publishModel(parShenhe.value).then(res=>{
     if(res.code===200){
       proxy.$modal.msgSuccess("已发布!");
-      var par1  = {
-        data:{id:parMdid.value}
-      }
-      handleNodeClick(null,par1,null)
+        getList()
       }
       dialogVisibleTest.value = false
   })
@@ -815,10 +823,26 @@ function getDate(){
   
   date.value = `${year}-${month}-${day}`;
 }
+function getList(){
+  tableData.value = []
+  var par = {
+    parasms:{
+      toPublish:'1'
+    }
+  }
+  getModelList(par).then(res => {
+    res.rows.forEach(item => {
+      if(item.audit==='1'||item.audit==='3'){
+        tableData.value.push(item)
+      }
+    });
+  });
+}
 onMounted(() => {
   fetchData()
   getTreeLeft()
   getDate()
+  getList()
 });
 
 </script>

+ 117 - 15
ruoyi-ui/src/views/service/info/shenhe.vue

@@ -64,11 +64,106 @@
     </div>
     <div style="width: 84%;margin-left: 1%;padding-top: 0.5%;" class="tab-container">
       <div>
-        <!-- <el-button @click="" type="primary" plain  size="mini" style="margin-left: 1%;" :disabled="testAll">审核该模型</el-button> -->
-        <el-button @click="showShen" type="primary" plain  size="mini" style="margin-left: 1%;">审核该模型</el-button>
+        <div ref="expandableDiv" style="position: relative;width: 98%;margin-left: 1%;min-height: 10vh;margin-top: 1%;border-radius: 8px;">
+            <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+              <div style="display: flex;align-items: center;width: 50%;">
+                <div style="font-size: 16px;font-weight: bold;">
+                  模型名称:
+                </div>
+                <div style="font-size: 15px;margin-left: 1%;">
+                  {{ parTree.name }}
+                </div>
+              </div>
+              <div style="display: flex;align-items: center;width: 50%;">
+                <div style="font-size: 16px;font-weight: bold;">
+                  英文名称:
+                </div>
+                <div style="font-size: 15px;margin-left: 1%;">
+                  {{ parTree.enname }}
+                </div>
+              </div>
+            </div>
+            <div style="display: flex;align-items: center;width: 50%;margin-top: 1%;margin-left: 3%;">
+              <div style="font-size: 16px;font-weight: bold;">
+                模型简介:
+              </div>
+              <div style="font-size: 15px;margin-left: 1%;">
+                {{ parTree.intro }}
+              </div>
+            </div>
+            <div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    版本号:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.version }}
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    接口分类:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.cateName }}
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    开发语言:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.devLang }}
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    模型归属单位:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.mdUnit }}
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    联系方式:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.mdContact }}
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    技术支持单位:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.devUnit }}
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    联系方式:
+                  </div>
+                  <div style="font-size: 15px;margin-left: 1%;">
+                    {{ parTree.devContact }}
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!-- <el-link :icon="isExpanded ? ArrowUp : ArrowDown"   @click="zhankai" type="primary"  size="mini" style="position: absolute;right:1%;bottom: 5%;">{{ isExpanded ? '收起' : '展开' }}</el-link > -->
+          </div>
+        <el-button @click="showShen" type="primary" plain  size="mini" style="float: right;margin-right: 1%;margin-top: 1%;" :disabled="testAll">审核该模型</el-button>
+        <!-- <el-button @click="showShen" type="primary" plain  size="mini" style="margin-left: 1%;">审核该模型</el-button> -->
         <el-table 
           :data="tableData" 
-          style="width: 98%;margin-left: 1%;margin-top: 0.5%;"
+          style="width: 98%;margin-left: 1%;margin-top: 4%;"
           :cell-style="{ padding:'5px' }"
           :header-cell-style="{height: heightAll*0.01+'px',}"
           :row-style="{ fontSize: '16px',textAlign:'center'}"
@@ -187,8 +282,8 @@
           <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="audit" style="margin-top: -0.5%;">
-                <el-radio value="4" size="large">通过</el-radio>
-                <el-radio value="0" size="large">不通过</el-radio>
+                <el-radio value="1" size="large">通过</el-radio>
+                <el-radio value="2" size="large">不通过</el-radio>
               </el-radio-group>
             </el-form-item>
             <el-form-item label="*说明:" prop="" style="">
@@ -263,8 +358,8 @@ import {getCatalog} from "@/api/service/catalog";
 import { Plus,Search,Filter,Promotion,Check  } from '@element-plus/icons-vue'
 import { reactive } from 'vue'
 import { changeSerShenhe } from "@/api/register/regCom";
-import { modelTreeSelect,getSerDe,addService,shenheLog,editService,editParam,addServiceParam,delService,getTreeDe,addTree,deTree,getServiceInfo,testService } from "@/api/service/info";
-import { ref, onMounted, onUnmounted, nextTick,onBeforeMount } from 'vue';
+import { modelTreeSelect,getSerDe,addService,shenheLog,addServiceParam,delService,addTree,deTree,getServiceInfo,testService } from "@/api/service/info";
+import { ref, onMounted } from 'vue';
 import { getUserProfile } from "@/api/system/user";
 import JsonViewer from 'vue-json-viewer'
 import 'vue-json-viewer/style.css' 
@@ -273,6 +368,7 @@ import { cloneDeep } from 'lodash'
 import { useClipboard } from "@vueuse/core";
 import { fa } from "element-plus/es/locales.mjs";
 
+
 const { proxy } = getCurrentInstance();
 const tableDataLog = ref([])
 const JsonAdd= ref(JSON.stringify({ data: "初始值1" }))
@@ -493,9 +589,13 @@ function showLog(row){
     tableDataLog.value = res.data
   })
 }
+function showShen(){
+  titleShen.value = '审核模型'
+  dialogVisibleShen.value = true
+}
 function saveShenhe(){
-  
   parShenhe.value.audit = audit.value
+  parShenhe.value.mdid = parMdid.value
   if(audit.value==='0'&&!auditRemark.value){
     proxy.$modal.msgWarning("未通过时请填写说明!");
   }
@@ -505,12 +605,8 @@ function saveShenhe(){
     changeSerShenhe(parShenhe.value).then(res=>{
       if(res.code===200){
         proxy.$modal.msgSuccess(res.msg);
-        var par1  = {
-          data:{id:parMdid.value}
-        }
-        handleNodeClick(null,par1,null)
       }
-      dialogVisibleTest.value = false
+      dialogVisibleShen.value = false
     })
   }
   
@@ -708,13 +804,17 @@ function showAdd(){
   dialogVisible.value = true
 }
 async function handleNodeClick(node,data,event){
+  testAll.value = true
   parMdid.value = data.data.id
   var par = {
     mdid:data.data.id
   }
+  console.log(data.data)
+  
   console.log(data.data.id)
   await getServiceInfo(par).then(res=>{
     if(res.data){
+      parTree.value = res.data
       tableData.value = res.data.serviceList
       const allright = true
       tableData.value.forEach(item=>{
@@ -723,10 +823,10 @@ async function handleNodeClick(node,data,event){
         }
       })
       if(parMdid.value&&allright){
-        testAll.value = true
+        testAll.value = false
       }
       else{
-        testAll.value = false
+        testAll.value = true
 
       }
     }
@@ -867,10 +967,12 @@ function getDate(){
   
   date.value = `${year}-${month}-${day}`;
 }
+
 onMounted(() => {
   fetchData()
   getTreeLeft()
   getDate()
+  
 });
 
 </script>