Ver código fonte

Merge remote-tracking branch 'origin/master'

Lin Qilong 4 meses atrás
pai
commit
9de900917e
22 arquivos alterados com 572 adições e 1467 exclusões
  1. 1 1
      ruoyi-admin/src/main/resources/application.yml
  2. 1 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdCatalogController.java
  3. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelInfoController.java
  4. 39 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java
  5. 1 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java
  6. 9 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java
  7. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceMapper.java
  8. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceService.java
  9. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdEstimateFirmlyServiceImpl.java
  10. 10 7
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java
  11. 15 4
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java
  12. 5 1
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml
  13. 32 5
      ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml
  14. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
  15. 1 1
      ruoyi-ui/src/api/register/regCom.js
  16. 1 1
      ruoyi-ui/src/api/service/info.js
  17. 27 0
      ruoyi-ui/src/api/system/dept.js
  18. 208 1406
      ruoyi-ui/src/views/platform/plugin/index.vue
  19. 3 2
      ruoyi-ui/src/views/register/componentReg/index.vue
  20. 41 11
      ruoyi-ui/src/views/service/info/fabu.vue
  21. 164 22
      ruoyi-ui/src/views/service/info/shenhe.vue
  22. 3 3
      ruoyi-ui/src/views/service/info/test.vue

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -12,7 +12,7 @@ ruoyi:
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证
   captchaType: math
-  gatewayUrl: http://localhost:8080
+  gatewayUrl: http://localhost:8081
 
 # 开发环境配置
 server:

+ 1 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdCatalogController.java

@@ -49,7 +49,7 @@ public class MdCatalogController extends BaseController {
     public AjaxResult edit(@RequestBody MdCatalog catalog)
     {
         Integer catalogId = catalog.getCatalogId();
-        if (catalog.getParentId().equals(catalogId))
+        if (StringUtils.isNotNull(catalog.getParentId()) && catalog.getParentId().equals(catalogId))
         {
             return error("修改目录'" + catalog.getCatalogName() + "'失败,上级目录不能是自己");
         }

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelInfoController.java

@@ -159,6 +159,7 @@ public class MdModelInfoController extends BaseController {
         if (org.apache.commons.lang3.StringUtils.isEmpty(modelInfo.getMdid())) {
             return error("模型id不可为空");
         }
+        if (StringUtils.isNull(modelInfo.getAudit())) return error("审核状态不可为空");
         MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "AUDIT", modelInfo.getAudit(), getUsername(), nowDate, modelInfo.getAuditRemark());
         int i = mdAuditService.insertMdAudit(audit);
         modelInfo.setAuditBy(getUsername());
@@ -175,6 +176,8 @@ public class MdModelInfoController extends BaseController {
      */
     @GetMapping("/publish")
     public AjaxResult publish(MdModelInfo modelInfo) {
+        if (StringUtils.isNull(modelInfo.getMdid())) return error("模型id不可为空");
+        if (StringUtils.isNull(modelInfo.getPublish())) return error("发布状态不可为空");
         Date nowDate = DateUtils.getNowDate();
         MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "PUBLISH", modelInfo.getPublish(), getUsername(), nowDate, modelInfo.getAuditRemark());
         int i = mdAuditService.insertMdAudit(audit);

+ 39 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java

@@ -52,6 +52,9 @@ public class PtServiceController extends BaseController {
     @Autowired
     private IPtServiceRunLogService serviceRunLogService;
 
+    @Autowired
+    private IMdModelInfoService  mdModelInfoService;
+
     @Autowired
     private SM4Util sm4Util;
 
@@ -66,7 +69,21 @@ public class PtServiceController extends BaseController {
         ptService.setMaintainContacer(sm4Util.encrypt(ptService.getMaintainContacer()));
         ptService.setAdName(sm4Util.encrypt(ptService.getAdName()));
 
+        ptService.setAudit("0");
+        ptService.setPublish("0");
+
         boolean save = ptServiceService.save(ptService);
+
+        MdModelInfo mdModelInfo = mdModelInfoService.selectMdModelInfoByMdid(ptService.getMdid());
+        if ("1".equals(mdModelInfo.getAudit())){ //模型以审核通过
+            mdModelInfo.setAudit("3");
+            mdModelInfoService.audit(mdModelInfo);
+        }
+        if ("1".equals(mdModelInfo.getPublish())){ //模型以审核通过
+            mdModelInfo.setPublish("3");
+            mdModelInfoService.publish(mdModelInfo);
+        }
+
         if (save) {
             return AjaxResult.success(ptService);
 
@@ -104,6 +121,7 @@ public class PtServiceController extends BaseController {
      */
     @GetMapping("/modelService")
     public AjaxResult modelService(MdModelInfoVo par) {
+        if (par.getMdid() == null) return error("模型id不可为空");
         return AjaxResult.success(ptServiceService.modelService(par));
     }
 
@@ -173,6 +191,11 @@ public class PtServiceController extends BaseController {
         return PageUtils.convert(pageInfo);
     }
 
+    @GetMapping("/state")
+    public AjaxResult state(PtService service){
+        return success(ptServiceService.state(service));
+    }
+
     @ApiOperation("根据主键获取数据")
     @PostMapping(value = "/list")
     public Page list(@RequestBody PageParam<PtService> ptServicePage) {
@@ -209,6 +232,22 @@ public class PtServiceController extends BaseController {
         ptService.setMaintainContacer(sm4Util.encrypt(ptService.getMaintainContacer()));
         ptService.setAdName(sm4Util.encrypt(ptService.getAdName()));
 
+
+        boolean save = ptServiceService.save(ptService);
+
+        MdModelInfo mdModelInfo = mdModelInfoService.selectMdModelInfoByMdid(ptService.getMdid());
+
+
+        if ("1".equals(mdModelInfo.getAudit())){ //模型以审核通过
+            mdModelInfo.setAudit("3");
+            mdModelInfoService.audit(mdModelInfo);
+        }
+        if ("1".equals(mdModelInfo.getPublish())){ //模型以审核通过
+            mdModelInfo.setPublish("3");
+            mdModelInfoService.publish(mdModelInfo);
+        }
+
+
         return AjaxResult.success(ptServiceService.put(ptService));
     }
 

+ 1 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java

@@ -369,7 +369,7 @@ public class MdModelInfo extends BaseEntity {
 
     /**
      * 审核状态
-     * 审核状态 0=待审核;1=已审核;2 = 驳回
+     * 审核状态 0=待审核;1=已审核;2 = 驳回 ;3=更新审核
      */
     private String audit;
     private String auditBy;

+ 9 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java

@@ -80,6 +80,10 @@ public class PtService implements Serializable {
     private String proxyAddress;
     @ApiModelProperty("代理路径")
     private String proxyPath;
+    /**
+     * 网管代理id
+     */
+    private String gatewayId;
     @ApiModelProperty("示例")
     private String example;
 
@@ -111,6 +115,11 @@ public class PtService implements Serializable {
     @ApiModelProperty("请求参数列表")
     private List<PtServiceParam> params;
 
+    /**
+     * 模型状态
+     */
+    private String state;
+
     public PtService(String mdid) {
         this.mdid = mdid;
     }

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceMapper.java

@@ -75,6 +75,8 @@ public interface PtServiceMapper extends BaseMapper<PtService> {
 
     int updatePtServicePublishByMdid(PtService service);
 
+    int updateState(PtService service);
+
  /*   int insertSelective(PtServiceWithBLOBs record);
 
     PtServiceWithBLOBs selectByPrimaryKey(String srvId);

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.interfaces.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.interfaces.domain.MdModelInfo;
 import com.ruoyi.interfaces.domain.PtService;
 import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
@@ -49,4 +50,6 @@ public interface PtServiceService extends IService<PtService> {
     int publish(PtService service);
 
     int publishByMdid(PtService mdid);
+
+    int state(PtService service);
 }

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdEstimateFirmlyServiceImpl.java

@@ -128,6 +128,8 @@ public class MdEstimateFirmlyServiceImpl implements IMdEstimateFirmlyService {
         } else {
             mdEstimateFirmly.setCreateBy(estimateFirmly.getCreateBy());
             mdEstimateFirmly.setCreateTime(estimateFirmly.getCreateTime());
+            mdEstimateFirmly.setFirmlyConfirm(estimateFirmly.getFirmlyConfirm());
+            mdEstimateFirmly.setFirmlyState(estimateFirmly.getFirmlyType());
             mdEstimateFirmlyMapper.updateMdEstimateFirmly(mdEstimateFirmly);
         }
         return "认定成功";

+ 10 - 7
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java

@@ -57,7 +57,7 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService {
     @Override
     public List<MdModelInfo> selectMdModelInfoList(MdModelInfo mdModelInfo) {
         List<MdModelInfo> mdModelInfos = mdModelInfoMapper.selectMdModelInfoList(mdModelInfo);
-        mdModelInfos.forEach(p->{
+        mdModelInfos.forEach(p -> {
             p.setMdContact(sm4Util.decrypt(p.getMdContact()));
             p.setDevContact(sm4Util.decrypt(p.getDevContact()));
 
@@ -121,15 +121,18 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService {
 
     @Autowired
     private PtServiceService ptServiceService;
+
     @Override
     public int publish(MdModelInfo mdModelInfo) {
         int i = mdModelInfoMapper.updateMdModelInfoPublish(mdModelInfo);
-        PtService ptService = new PtService();
-        ptService.setMdid(mdModelInfo.getMdid());
-        ptService.setPublishBy(mdModelInfo.getPublishBy());
-        ptService.setPublishTime(DateUtils.getNowDate());
-        ptService.setPublish(mdModelInfo.getPublish());
-        ptServiceService.publishByMdid(ptService);
+        if ("1".equals(mdModelInfo.getPublish())) {
+            PtService ptService = new PtService();
+            ptService.setMdid(mdModelInfo.getMdid());
+            ptService.setPublishBy(mdModelInfo.getPublishBy());
+            ptService.setPublishTime(DateUtils.getNowDate());
+            ptService.setPublish(mdModelInfo.getPublish());
+            ptServiceService.publishByMdid(ptService);
+        }
         return i;
     }
 

+ 15 - 4
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java

@@ -7,13 +7,13 @@ import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.utils.*;
 import com.ruoyi.common.utils.http.HttpUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
-import com.ruoyi.interfaces.domain.PtService;
-import com.ruoyi.interfaces.domain.PtServiceLog;
-import com.ruoyi.interfaces.domain.PtServiceParam;
+import com.ruoyi.interfaces.domain.*;
 import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
 import com.ruoyi.interfaces.mapper.PtServiceMapper;
 import com.ruoyi.interfaces.mapper.PtServiceParamMapper;
+import com.ruoyi.interfaces.service.GatewayRoutesService;
 import com.ruoyi.interfaces.service.IMdModelInfoService;
+import com.ruoyi.interfaces.service.PtAppService;
 import com.ruoyi.interfaces.service.PtServiceService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -114,6 +114,9 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
     @Override
     public MdModelInfoVo modelService(MdModelInfoVo par) {
         MdModelInfoVo mdModelInfoVo = ptServiceMapper.selectModelService(par);
+        mdModelInfoVo.setMdContact(sm4Util.decrypt(mdModelInfoVo.getMdContact()));
+        mdModelInfoVo.setDevContact(sm4Util.decrypt(mdModelInfoVo.getDevContact()));
+
         if (StringUtils.isNotNull(mdModelInfoVo) && StringUtils.isNotEmpty(mdModelInfoVo.getServiceList()))
             mdModelInfoVo.getServiceList().forEach(p -> {
                 p.setDevelopContacter(sm4Util.decrypt(p.getDevelopContacter()));
@@ -141,10 +144,13 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
     }
 
 
+    @Autowired
+    private GatewayRoutesService gatewayRoutesService;
     @Override
     public HashMap<String, String> testRun(PtService ptService) throws IOException {
 
-        String url = RuoYiConfig.getGatewayUrl() + ptService.getProxyPath() + ptService.getUrl();
+        GatewayRoutes gatewayRoutes = gatewayRoutesService.getById(ptService.getGatewayId());
+        String url = RuoYiConfig.getGatewayUrl() + gatewayRoutes.getPredicates() + ptService.getUrl();
         System.out.println(url);
         //String url = ptService.getUrl();
         HashMap<String, String> headers = new HashMap<>();
@@ -184,6 +190,11 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
         return ptServiceMapper.updatePtServicePublishByMdid(service);
     }
 
+    @Override
+    public int state(PtService service) {
+        return ptServiceMapper.updateState(service);
+    }
+
     public void senServiceLog() {
     }
 }

+ 5 - 1
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml

@@ -174,7 +174,7 @@
             <if test="mdAuth != null  and mdAuth != ''">and MD_AUTH = #{mdAuth}</if>
             <if test="mdHeader != null  and mdHeader != ''">and MD_HEADER = #{mdHeader}</if>
             <if test="mdSecret != null  and mdSecret != ''">and MD_SECRET = #{mdSecret}</if>
-            <if test="mdUnit != null  and mdUnit != ''">and MD_UNIT = #{mdUnit}</if>
+            <if test="mdUnit != null  and mdUnit != ''">and MD_UNIT like concat('%', #{mdUnit},'%')</if>
             <if test="mdContact != null  and mdContact != ''">and MD_CONTACT = #{mdContact}</if>
             <if test="devUnit != null  and devUnit != ''">and DEV_UNIT = #{devUnit}</if>
             <if test="devContact != null  and devContact != ''">and DEV_CONTACT = #{devContact}</if>
@@ -217,6 +217,10 @@
             <if test="publish != null and publish != ''">
                 and PUBLISH = #{publish}
             </if>
+            <if test="params.toPublish != null">
+                and "AUDIT" is not null
+                and "AUDIT" not in ('0','2')
+            </if>
         </where>
         order by SORT
     </select>

+ 32 - 5
ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml

@@ -19,6 +19,7 @@
         <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
         <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
         <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
+        <result column="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
         <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
         <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
         <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
@@ -45,12 +46,13 @@
         <result column="AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
         <result column="PUBLISH" property="publish" jdbcType="VARCHAR"/>
         <result column="PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
+        <result column="state" property="state" jdbcType="VARCHAR"/>
         <result column="PUBLISH_TIME" property="publishTime"/>
     </resultMap>
     <resultMap id="AuthVoResultMap" type="com.ruoyi.interfaces.domain.vo.PtServiceVo">
         <result property="id" jdbcType="VARCHAR" column="ID"/>
         <result property="deadline" column="DEADLINE"/>
-        <result property="appId" jdbcType="VARCHAR" column="APP_ID"/>
+        <result property="gatewayId" jdbcType="VARCHAR" column="gateway_id"/>
         <result property="srvId" jdbcType="VARCHAR" column="SRV_ID"/>
         <result property="userId" jdbcType="VARCHAR" column="USER_ID"/>
         <result column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
@@ -69,6 +71,8 @@
         <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
         <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
         <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
+        <result column="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
+        <result column="state" jdbcType="VARCHAR" property="state"/>
         <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
         <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
         <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
@@ -109,7 +113,9 @@ AUDIT_TIME,
 AUDIT_REMARK,
         PUBLISH,
 PUBLISH_BY,
-PUBLISH_TIME
+PUBLISH_TIME,
+        GATEWAY_ID,
+        state
     </sql>
     <sql id="Blob_Column_List">
         RPCONTENT
@@ -124,6 +130,8 @@ AUDIT_REMARK,
         PUBLISH,
 PUBLISH_BY,
 PUBLISH_TIME
+        ,GATEWAY_ID,
+        state
     </sql>
     <sql id="table_columns">
         MDID
@@ -170,7 +178,9 @@ PUBLISH_TIME
             AUDIT_REMARK,
             PUBLISH,
             PUBLISH_BY,
-            PUBLISH_TIME
+            PUBLISH_TIME,
+        GATEWAY_ID,
+        state
     </sql>
     <sql id="entity_properties">
         #{mdid,jdbcType=VARCHAR},
@@ -200,6 +210,7 @@ PUBLISH_TIME
         #{tm, jdbcType=DATE},
         #{proxyAddress,jdbcType=VARCHAR},
         #{proxyPath,jdbcType=VARCHAR},
+        #{gatewayId,jdbcType=VARCHAR},
         #{serviceSource,jdbcType=VARCHAR},
         #{serviceDept,jdbcType=VARCHAR},
         #{manageName,jdbcType=VARCHAR},
@@ -217,6 +228,7 @@ PUBLISH_TIME
         #{publish,jdbcType=VARCHAR},
         #{publishBy,jdbcType=VARCHAR},
         #{publishTime,jdbcType=DATE}
+        #{gatewayId,jdbcType=DATE}
     </sql>
     <sql id="page_where">
         <trim prefix="where" prefixOverrides="and | or ">
@@ -301,6 +313,11 @@ PUBLISH_TIME
             <if test="proxyPath != null and proxyPath != ''">
                 and PROXY_PATH = #{proxyPath}
             </if>
+            <if test="gatewayId != null and gatewayId != ''">
+                and gateway_id = #{gatewayId}
+            </if> <if test="state != null and state != ''">
+                and state = #{state}
+            </if>
             <if test="serviceSource != null and serviceSource != ''">
                 and SERVICE_SOURCE = #{serviceSource}
             </if>
@@ -432,6 +449,7 @@ PUBLISH_TIME
             <if test="userId != null and userId != ''">USER_ID = #{userId},</if>
             <if test="proxyAddress != null and proxyAddress != ''">PROXY_ADDRESS = #{proxyAddress},</if>
             <if test="proxyPath != null and proxyPath != ''">PROXY_PATH = #{proxyPath},</if>
+            <if test="gatewayId != null and gatewayId != ''">gateway_id = #{gatewayId},</if>
             <if test="serviceSource != null and serviceSource != ''">SERVICE_SOURCE = #{serviceSource},</if>
             <if test="serviceDept != null and serviceDept != ''">SERVICE_DEPT = #{serviceDept},</if>
             <if test="manageName != null and manageName != ''">MANAGE_NAME = #{manageName},</if>
@@ -470,6 +488,11 @@ PUBLISH_TIME
             PUBLISH_TIME = #{publishTime}
         where mdid = #{mdid}
     </update>
+    <update id="updateState">
+        update PT_SERVICE
+        set state = #{state}
+        where SRV_ID = #{srvId}
+    </update>
 
     <!--根据主键删除数据-->
     <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -499,7 +522,6 @@ PUBLISH_TIME
     <select id="listByUserService" resultMap="AuthVoResultMap">
         SELECT A.ID,
                A.DEADLINE,
-               A.APP_ID,
                A.USER_ID,
                P.UP_CYCL,
                P.OPEN_CNDTN,
@@ -533,7 +555,9 @@ PUBLISH_TIME
                P.DEVELOP_CONTACTER,
                P.MAINTAIN_UNIT,
                P.MAINTAIN_CONTACER,
-               P.VIEW_NUM
+               P.VIEW_NUM,
+               P.state,
+               P.gateway_id,
         FROM PT_SERVICE P
                  JOIN PT_SERVICE_AUTH A ON P.SRV_ID = A.SRV_ID
         WHERE A.USER_ID = #{userId}
@@ -620,6 +644,8 @@ PUBLISH_TIME
         <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
         <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
         <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
+        <result column="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
+        <result column="state" jdbcType="VARCHAR" property="state"/>
         <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
         <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
         <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
@@ -755,6 +781,7 @@ PUBLISH_TIME
         s.PUBLISH AS S_PUBLISH,
         s.PUBLISH_BY AS S_PUBLISH_BY,
         s.PUBLISH_TIME AS S_PUBLISH_TIME,
+        s.state,
         r.SEN_STATE
         from md_model_info m left join pt_service s on m.mdid = s.MDID
         LEFT JOIN (

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

@@ -618,6 +618,6 @@ public class HttpUtils {
     }
 
     public static void setGatewayHeaders(HashMap<String, String> hashMap) {
-        hashMap.put("Authorization", "1478702065085063169");
+        hashMap.put("Authorization", "f8d39ab1da75466e9340ac331bd9520b");
     }
 }

+ 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,
   });

+ 27 - 0
ruoyi-ui/src/api/system/dept.js

@@ -49,4 +49,31 @@ export function delDept(deptId) {
     url: '/system/dept/' + deptId,
     method: 'delete'
   })
+}
+export function catalogList(query) {
+  return request({
+    url: '/md/catalog/list',
+    method: 'get',
+    params: query
+  })
+}
+export function updateCatalog(data) {
+  return request({
+    url: '/md/catalog',
+    method: 'put',
+    data: data
+  })
+}
+export function addCatalog(data) {
+  return request({
+    url: '/md/catalog',
+    method: 'post',
+    data: data
+  })
+}
+export function delCatalog(catalogId) {
+  return request({
+    url: '/md/catalog/' + catalogId,
+    method: 'delete'
+  })
 }

+ 208 - 1406
ruoyi-ui/src/views/platform/plugin/index.vue

@@ -1,1442 +1,244 @@
 <template>
-  <div style="width: 100%;padding-top: 1%;" :style="{'height':heightAll+'px'}">
-    <div style="display: flex;width: 100%;margin-left: 1%;justify-content: space-between;">
-      <div style="display: flex;width: 35%;">
-        <div style="display: flex;width: 100%;align-items: center;">
-            <div>
-                模型名称:
-            </div>
-            <el-input v-model="name" style="width:50%;margin-left: 1%;" placeholder="" />
-        </div>
-        <div style="display: flex;width: 100%;align-items: center;margin-left:-15%;">
-            <div>
-                模型归属单位:
-            </div>
-            <el-input v-model="mdUnit" style="width: 50%;margin-left: 1%;" placeholder="" />
-        </div>
-        <el-button type="primary" style="margin-left: -10%;" @click="getModelListTable" :icon="Search">查询</el-button>
-      </div>
-        <div style="display: flex;align-items: center;margin-right: 3%;">
-            
-            <el-button type="primary" style="margin-left:5%;" @click="reg" icon="Plus">注册</el-button>
-        </div>
-    </div>
-    <div style="margin-top: 0%;margin-left: 0%;width: 100%;">
-        <el-table 
-        :data="tableData" 
-        height="80vh"
-        style="width: 98%;margin-left: 1%;margin-top: 0.5%;"
-        :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="name" label="模型名称">
-          <template #default="scope">
-            <div style="color: #409EFF;cursor: pointer;" @click="showDe(scope.row)">{{scope.row.name}}</div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="enname" label="英文名称">
-        </el-table-column>
-        <el-table-column prop="type" label="模型类型" width="160"/>
-        <el-table-column prop="mdUnit" label="模型单位" width="200"/>
-        <el-table-column prop="mdContact" label="联系方式" width="100"/>
-        <el-table-column prop="status" label="模型状态" width="140">
-        </el-table-column>
-        <el-table-column prop="modifyBy" label="发布时间" width="170"/>
-        <el-table-column prop="version" label="版本" width="120"/>
-        <el-table-column prop="address" label="操作" width="270">
+   <div class="app-container">
+      <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
+         <el-form-item label="目录名称" prop="deptName">
+            <el-input
+               v-model="queryParams.deptName"
+               placeholder=""
+               clearable
+               style="width: 200px"
+               @keyup.enter="handleQuery"
+            />
+         </el-form-item>
+         <el-form-item label="状态" prop="status">
+            <el-select v-model="queryParams.status" placeholder="" clearable style="width: 200px">
+               <el-option
+                  v-for="dict in sys_normal_disable"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+               />
+            </el-select>
+         </el-form-item>
+         <el-form-item>
+            <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+         </el-form-item>
+      </el-form>
+
+      <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          style="margin-right: 1%;float: right;"
+          @click="handleAdd"
+      >新增</el-button>
+
+      <el-table
+         v-if="refreshTable"
+         v-loading="loading"
+         :data="deptList"
+         row-key="deptId"
+         :default-expand-all="isExpandAll"
+         :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      >
+         <el-table-column prop="catalogName" label="目录名称" width="260"></el-table-column>
+         <el-table-column prop="sort" label="排序" width="200"></el-table-column>
+         <el-table-column prop="status" label="状态" width="100">
+            <template #default="scope">
+               <div v-if="scope.row.status==='0'" style="color: red;">停用</div>
+               <div v-if="scope.row.status==='1'" style="color: #409EFF;">正常</div>
+            </template>
+         </el-table-column>
+         <el-table-column label="创建时间" align="center" prop="createTime" width="200">
+            <template #default="scope">
+               <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+         </el-table-column>
+         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
-                <div style="display: flex;justify-content: space-between;width: 100%;">
-                    <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: -5%;">配置</el-button>
-                    <el-button type="danger" @click="delModel(scope.row)" text size="mini" style="margin-left: -5%;">删除</el-button>
-                    <el-button type="danger" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button>
-                </div>
+               <el-button link type="primary"  @click="handleUpdate(scope.row)">修改</el-button>
+               <el-button link type="primary"  @click="handleAdd(scope.row)" >新增</el-button>
+               <el-button v-if="scope.row.parentId != 0" link type="primary"  @click="handleDelete(scope.row)">删除</el-button>
             </template>
-        </el-table-column>
+         </el-table-column>
       </el-table>
-        <el-dialog v-model="dialogVisible" title="" width="60%" @close="clearForm">
-                <div class="card-header">
-                  <span style="font-size: 20px;margin-left: 1%;">基本信息</span>
-                  <el-divider style="margin-top: 1%;"/>
-                </div>
-              <div>
-                <el-form  size="mini"  style="margin-top: 0%;width: 98%;"  :model="formJi" label-position="right" ref="formRefJi" label-width="120px" :rules="rulesJi">
-                  <el-row :gutter="40">
-                        <el-col :span="8">
-                          <el-form-item label="模型名称:" prop="name" style="">
-                              <div style="display: flex;width: 120%;justify-content: space-between;">
-                                <el-input  v-model="formJi.name" style="width: 100%;"/>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="8">
-                          <el-form-item label="英文名:" prop="enname" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input  v-model="formJi.enname" style="width: 100%;"/>
-                            </div>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="6">
-                          <el-form-item label="版本号:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input  v-model="formJi.version" style="width: 100%;"/>
-                            </div>
-                          </el-form-item>
-                        </el-col>
-                  </el-row>
-                  <el-row :gutter="48">
-                    <el-col :span="8">
-                      <el-form-item label="模型类型:" prop="" style="">
-                        <div style="display: flex;width: 100%;justify-content: space-between;">
-                          <el-input placeholder="如水利模型、排水模型、供水模型、海洋模型" v-model="formJi.type" style="width: 100%;" resize="none"/>
-                        </div>
-                      </el-form-item>
-                    </el-col>
-                  </el-row>
-                  <el-form-item label="排序:" prop="" style="">
-                      <div style="display: flex;width: 100%;justify-content: space-between;">
-                        <el-input-number v-model="formJi.sort" :min="1" style="width: 22%;"/>
-                      </div>
+
+      <!-- 添加或修改目录对话框 -->
+      <el-dialog :title="title" v-model="open" width="30%" append-to-body>
+         <el-form ref="deptRef" :model="form" :rules="rules" label-width="80px">
+            <el-row>
+               <el-col :span="16">
+                  <el-form-item label="上级目录" prop="">
+                     <el-tree-select
+                        v-model="form.parentId"
+                        :data="deptOptions"
+                        :props="{ value: 'catalogId', label: 'catalogName', children: 'children' }"
+                        value-key="catalogId"
+                        placeholder="不选择时视为添加最上层"
+                        check-strictly
+                     />
                   </el-form-item>
-                  <el-row :gutter="48">
-                    <el-col :span="24">
-                      <el-form-item label="开发语言:">
-                          <el-radio-group v-model="formJi.devlang" class="custom-radio-group" style="width: 100%;">
-                            <el-radio label="java" size="large">java</el-radio>
-                            <el-radio label="nodeJs" size="large">nodeJs</el-radio>
-                            <el-radio label="python" size="large">python</el-radio>
-                            <el-radio label="c/c++" size="large">c/c++</el-radio>
-                            <el-radio label="1" size="large">
-                              <div class="custom-input-wrapper">
-                                <span>其它</span>
-                                <el-input 
-                                  v-model="elseLan"
-                                  class="underline-input"
-                                  v-show="isElse"
-                                />
-                              </div>
-                            </el-radio>
-                            </el-radio-group>
-                      </el-form-item>
-                    </el-col>
-                  </el-row>
-                  <el-row :gutter="48">
-                        <el-col :span="16">
-                          <el-form-item label="简介:">
-                              <el-input  v-model="formJi.intro" style="width: 100%;" :rows="3" resize="none" type="textarea"/>
-                          </el-form-item>
-                        </el-col>
-                  </el-row>
-                </el-form>
-              </div>
-            
-              <div class="card-header">
-                <span style="font-size: 20px;margin-left: 1%;">单位</span>
-                <el-divider style="margin-top: 1%;"/>
-              </div>
-            <div style="margin-top: 0%;">
-              <el-form size="mini" :key="tableKey" style="margin-top: 0%;width: 98%;"  :model="formJi" label-position="right"  label-width="120px" :rules="rulesJi">
-                <el-row :gutter="48">
-                      <el-col :span="11">
-                        <el-form-item label="模型归属单位:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input  v-model="formJi.mdUnit" style="width: 100%;"/>
-                            </div>
-                        </el-form-item>
-                      </el-col>
-                      <el-col :span="11">
-                        <el-form-item label="联系方式:" prop="" style="">
-                          <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <el-input  v-model="formJi.mdContact" style="width: 100%;"/>
-                          </div>
-                        </el-form-item>
-                      </el-col>
-                </el-row>
-                <el-row :gutter="48">
-                      <el-col :span="11">
-                        <el-form-item label="技术支持单位:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input  v-model="formJi.devUnit" style="width: 100%;"/>
-                            </div>
-                        </el-form-item>
-                      </el-col>
-                      <el-col :span="11">
-                        <el-form-item label="联系方式:" prop="" style="">
-                          <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <el-input  v-model="formJi.devContact" style="width: 100%;"/>
-                          </div>
-                        </el-form-item>
-                      </el-col>
-                </el-row>
-              </el-form>
-            </div>
-            <el-tabs
-            v-model="activeName"
-            type="card"
-            style="margin-top: 1%;"
-          >
-            <el-tab-pane label="部署情况" name="first">
-              <el-form size="mini" :key="tableKey" style="margin-top: 0%;width: 98%;"  :model="formJi" label-position="right" label-width="120px"   :rules="rulesJi">
-                <el-row :gutter="48">
-                      <el-col :span="11">
-                        <el-form-item label="服务器IP:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input   v-model="formJi.deployIp" style="width: 100%;"/>
-                            </div>
-                        </el-form-item>
-                      </el-col>
-                      <el-col :span="11">
-                        <el-form-item label="端口:" prop="" style="">
-                          <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <el-input placeholder="可填写多个端口,以“,”分隔"  v-model="formJi.deployPort" style="width: 100%;"/>
-                          </div>
-                        </el-form-item>
-                      </el-col>
-                </el-row>
-                <el-row :gutter="48">
-                      <el-col :span="15">
-                        <el-form-item label="部署位置:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                              <el-input  v-model="formJi.deployDir" style="width: 100%;"/>
-                            </div>
-                        </el-form-item>
-                      </el-col>
-                      <el-col :span="10">
-                      </el-col>
-                </el-row>
-                <el-row :gutter="48">
-                      <el-col :span="15">
-                        <el-form-item label="服务访问地址:" prop="" style="">
-                          <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <el-input  v-model="formJi.mirrorImageUrl" style="width: 100%;"/>
-                          </div>
-                        </el-form-item>
-                      </el-col>
-                </el-row>
-                <el-row :gutter="48">
-                      <el-col :span="15">
-                        <el-form-item label="服务器运行命令:" prop="" style="">
-                          <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <el-input  v-model="formJi.mdRunCmd" style="width: 100%;"/>
-                          </div>
-                        </el-form-item>
-                      </el-col>
-                </el-row>
-              </el-form>
-              <div style="display: flex;margin-top: -5%;">
-                <div class="card-header" style="margin-top: 5%;display: flex;justify-content: inherit;margin-left: 2%">
-                  <span style="font-size: 20px;margin-top: 5%; writing-mode: vertical-rl;position: relative;top: 15%;">运行环境</span>
-                </div>
-                <el-form size="mini" :key="tableKey" style="margin-top: 5%;width: 85%;"  :model="formJi" label-position="right" label-width="120px"   :rules="rulesJi">
-                  <el-row :gutter="48">
-                        <el-col :span="12">
-                          <el-form-item label="操作系统:" prop="" style="">
-                              <div style="display: flex;width: 100%;justify-content: space-between;">
-                                <el-select
-                                v-model="formJi.envOs"
-                                
-                                    style="width: 75%;margin-left: 0%;"
-                                >
-                                    <el-option
-                                    v-for="item in optionsEnv"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                    />
-                                </el-select>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="12">
-                          <el-form-item label="运行架构:" prop="" style="">
-                            <div style="display: flex;width: 100%;justify-content: space-between;">
-                               <el-radio-group v-model="formJi.evnArmX86" class="ml-4" size="small" style="" >
-                                    <el-radio label="X86" size="large">X86</el-radio>
-                                    <el-radio label="ARM" size="large">ARM</el-radio>
-                                </el-radio-group>
-                            </div>
-                          </el-form-item>
-                        </el-col>
-                  </el-row>
-                  <el-row :gutter="24">
-                        <el-col :span="8">
-                          <el-form-item label="硬盘:" prop="" style="">
-                              <div style="display: flex;width: 100%;" >
-                                <el-input-number
-                                  v-model="formJi.envDisk"
-                                  :min="100"
-                                  :max="2048"
-                                  size="mini"
-                                  controls-position="right"
-                                  @change="handleChange"
-                                />
-                                <div style="margin-left: 4%;font-size: 15px;">
-                                  G
-                                </div>
-                              </div>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="8">
-                          <el-form-item label="CPU核数:" prop="" style="">
-                            <div style="display: flex;width: 100%;" >
-                                <el-input-number
-                                  v-model="formJi.envCpuNum"
-                                  :max="64"
-                                  :min="2"
-                                  size="mini"
-                                  controls-position="right"
-                                  @change="handleChange"
-                                />
-                                <div style="margin-left: 4%;font-size: 15px;">
-                                  个
-                                </div>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="8">
-                          <el-form-item label="内存:" prop="" style="">
-                            <div style="display: flex;width: 100%;" >
-                                <el-input-number
-                                  v-model="formJi.envMem"
-                                  :max="512"
-                                  :min="1"
-                                  size="mini"
-                                  controls-position="right"
-                                  @change="handleChange"
-                                />
-                                <div style="margin-left: 4%;font-size: 15px;">
-                                  G
-                                </div>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                  </el-row>
-                  <el-row :gutter="24">
-                        <el-col :span="8">
-                          <el-form-item label="GPU型号:" prop="" style="">
-                              <div style="display: flex;width: 100%;">
-                                <el-input   v-model="formJi.envGpuType" style="width: 100%;"/>
-                              </div>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="8">
-                          <el-form-item label="GPU数量:" prop="" style="">
-                            <div style="display: flex;width: 100%;" >
-                               <el-input-number
-                                  v-model="formJi.envGpuNum"
-                                  :min="1"
-                                  :max="64"
-                                  size="mini"
-                                  controls-position="right"
-                                  @change="handleChange"
-                                />
-                                <div style="margin-left: 4%;font-size: 15px;">
-                                  个
-                                </div>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="8">
-                          <el-form-item label="GUP显存:" prop="" style="">
-                            <div style="display: flex;width: 100%;" >
-                                <el-input-number
-                                  v-model="formJi.envGpuMem"
-                                  :min="1"
-                                  size="mini"
-                                  :max="512"
-                                  controls-position="right"
-                                  @change="handleChange"
-                                />
-                                <div style="margin-left: 4%;font-size: 15px;">
-                                  G
-                                </div>
-                              </div>
-                          </el-form-item>
-                        </el-col>
-                  </el-row>
-                </el-form>
-              </div>
-            </el-tab-pane>
-            <el-tab-pane label="输入" name="second">
-              <el-form style="margin-left: 5%;margin-top: 2%;" label-position="right" label-width="120px" :model="formZu" class="demo-form-inline" ref="formRefZu" :rules="rulesZu">
-                <el-form-item label="输入文档:" prop="">
-                    <div style="width: 75%;">
-                      <el-upload
-                          ref="uploadRef"
-                          :limit="1"
-                          accept=".xlsx, .xls"
-                          :headers="upload.headers"
-                          :on-change="handleChange"
-                          :file-list="fileList"
-                          :action="upload.url + '?file=' + upload.updateSupport"
-                          :on-progress="handleFileUploadProgress"
-                          :on-success="handleFileSuccess"
-                          :auto-upload="false"
-                          drag
-                      >
-                          <el-icon class="el-icon--upload"><upload-filled /></el-icon>
-                          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-                      </el-upload>
-                    </div>
-                    <div style="color: #b1b3b8;width: 100%;">
-                      注:请上传后缀名为.docx .pdf .txt的文件
-                    </div>
-                    <el-link type="primary" @click="downIn">{{formJi.mdInName}}</el-link>
+               </el-col>
+               <el-col :span="16">
+                  <el-form-item label="目录名称" prop="catalogName">
+                     <el-input v-model="form.catalogName" placeholder="请输入目录名称" />
                   </el-form-item>
-                  <el-form-item label="说明:" prop="" style="margin-left: -1%;">
-                    <el-input v-model="formJi.mdInNote" style="width: 75%;" placeholder="请输入组件执行路径" :rows="2" type="textarea" resize="none"/>
+               </el-col>
+               <el-col :span="12">
+                  <el-form-item label="排序" prop="sort">
+                     <el-input-number v-model="form.sort" controls-position="right" :min="0" />
                   </el-form-item>
-                </el-form>
-            </el-tab-pane>
-            <el-tab-pane label="输出" name="third">
-              <el-form  style="margin-left: 5%;margin-top: 2%;" label-position="right" label-width="120px" :model="formZu" class="demo-form-inline" ref="formRefZu" :rules="rulesZu">
-                <el-form-item label="输出文档:" prop="">
-                    <div style="width: 75%;">
-                      <el-upload
-                          ref="uploadRef1"
-                          :limit="1"
-                          accept=".xlsx, .xls"
-                          :headers="upload.headers"
-                          :on-change="handleChange1"
-                          :file-list="fileList1"
-                          :action="upload.url + '?file=' + upload.updateSupport"
-                          :on-progress="handleFileUploadProgress"
-                          :on-success="handleFileSuccess1"
-                          :auto-upload="false"
-                          drag
-                      >
-                          <el-icon class="el-icon--upload"><upload-filled /></el-icon>
-                          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-                      </el-upload>
-                    </div>
-                    <div style="color: #b1b3b8;width: 100%;">
-                      注:请上传后缀名为.docx .pdf .txt的文件
-                    </div>
-                    <el-link type="primary" @click="downOut">{{formJi.mdOutName}}</el-link>
+               </el-col>
+               <el-col :span="16">
+                  <el-form-item label="目录说明">
+                     <el-input :row="2" type="textarea" v-model="form.remark" placeholder="请输入目录说明"/>
                   </el-form-item>
-                  <el-form-item label="说明:" prop="" style="margin-left: -1%;">
-                    <el-input v-model="formJi.mdOutNote" style="width: 75%;" placeholder="请输入组件执行路径" :rows="2" type="textarea" resize="none"/>
+               </el-col>
+               <el-col :span="12">
+                  <el-form-item label="目录状态" prop="status">
+                     <el-radio-group v-model="form.status">
+                        <el-radio
+                           v-for="dict in sys_normal_disable"
+                           :key="dict.value"
+                           :value="dict.value"
+                        >{{ dict.label }}</el-radio>
+                     </el-radio-group>
                   </el-form-item>
-                </el-form>
-            </el-tab-pane>
-          </el-tabs>
-            <template #footer>
-            <span class="dialog-footer">
-                <el-button @click="dialogVisible = false">取消</el-button>
-                <el-button type="primary" @click="submit" v-if="!isEdit">
-                  提交
-                </el-button>
-                <el-button type="primary" @click="subEdit" v-if="isEdit">
-                  提交
-                </el-button>
-            </span>
-            </template>
-        </el-dialog>
-        <el-dialog  v-model="dialogVisibleDe" title="" width="50%" @close="" destroy-on-close class="custom-dialog-bg">
-          <el-descriptions title="基本信息" :column="3" style="margin-top: 0%;margin-left: 1%;background: transparent;">
-            <el-descriptions-item label="模型名称:">{{formJi.name}}</el-descriptions-item>
-            <el-descriptions-item label="英文名:">{{formJi.enname}}</el-descriptions-item>
-            <el-descriptions-item label="版本号:">{{formJi.version}}</el-descriptions-item>
-            <el-descriptions-item label="接口分类:">{{formJi.type}}</el-descriptions-item>
-            <el-descriptions-item label="开发语言:"  span="2">{{formJi.devlang}}</el-descriptions-item>
-            <el-descriptions-item label="简介:" span="3">{{formJi.intro}}</el-descriptions-item>
-          </el-descriptions>
-          <el-divider style="margin-top: 0%;"/>
-          <el-descriptions title="单位" :column="2" style="margin-top: 1%;margin-left: 1%;background-color: transparent;">
-            <el-descriptions-item label="模型归属单位:">{{formJi.mdUnit}}</el-descriptions-item>
-            <el-descriptions-item label="联系方式:">{{formJi.mdContact}}</el-descriptions-item>
-            <el-descriptions-item label="技术支持单位:">{{formJi.devUnit}}</el-descriptions-item>
-            <el-descriptions-item label="联系方式:">{{formJi.devContact}}</el-descriptions-item>
-          </el-descriptions>
-          <el-tabs
-            v-model="activeName"
-            type="card"
-            style="margin-top: 1%;background-color: transparent;"
-          >
-            <el-tab-pane label="部署情况" name="first" style="background-color: transparent;">
-              <el-descriptions title="" :column="3" style="margin-top: 0%;margin-left: 1%;background-color: transparent;">
-                <el-descriptions-item label="服务器IP:" span="2">{{formJi.deployIp}}</el-descriptions-item>
-                <el-descriptions-item label="端口:">{{formJi.deployPort}}</el-descriptions-item>
-                <el-descriptions-item label="部署位置:" span="2">{{formJi.deployDir}}</el-descriptions-item>
-                <el-descriptions-item label="服务访问地址:">{{formJi.mirrorImageUrl}}</el-descriptions-item>
-                <el-descriptions-item label="服务器运行命令:" span="3">{{formJi.mdRunCmd}}</el-descriptions-item>
-                <el-descriptions-item label="操作系统:" span="2">{{formJi.envOs}}</el-descriptions-item>
-                <el-descriptions-item label="运行架构:" span="3">{{formJi.evnArmX86}}</el-descriptions-item>
-                <el-descriptions-item label="硬盘:" span="">
-                  {{formJi.envDisk + 'G'}}
-                </el-descriptions-item>
-                <el-descriptions-item label="CPU核心数:">
-                  {{formJi.envCpuNum + '个'}}
-                </el-descriptions-item>
-                <el-descriptions-item label="内存:">
-                  {{formJi.envMem + 'G'}}
-                </el-descriptions-item>
-                <el-descriptions-item label="GPU型号:">{{formJi.envGpuType}}</el-descriptions-item>
-                <el-descriptions-item label="GPU数量:">
-                  {{formJi.envGpuNum + '个'}}
-                </el-descriptions-item>
-                <el-descriptions-item label="GUP显存:">
-                  {{formJi.envGpuMem + 'G'}}
-                </el-descriptions-item>
-              </el-descriptions>
-            </el-tab-pane>
-            <el-tab-pane label="输入" name="second">
-              <el-descriptions title="" :column="2" style="margin-top: 0%;margin-left: 1%;">
-                <el-descriptions-item label="输入文档:" span="2">
-                  <el-link type="primary"  @click="downIn">{{formJi.mdInName}}</el-link>
-                </el-descriptions-item>
-                <el-descriptions-item label="说明:">{{formJi.mdInNote}}</el-descriptions-item>
-              </el-descriptions>
-            </el-tab-pane>
-            <el-tab-pane label="输出" name="third">
-              <el-descriptions title="" :column="2" style="margin-top: 0%;margin-left: 1%;">
-                <el-descriptions-item label="输出文档:" span="2">
-                  <el-link type="primary" @click="downOut">{{formJi.mdOutName}}</el-link>
-                </el-descriptions-item>
-                <el-descriptions-item label="说明:">{{formJi.mdOutNote}}</el-descriptions-item>
-              </el-descriptions>
-            </el-tab-pane>
-          </el-tabs>
-        </el-dialog>
-        <el-dialog  @close="clearForm" v-model="dialogVisiblePei" width="70%" title="参数配置">
-          <el-tabs v-model="activeName" type="border-card" style="height: 45vh;">
-            <el-tab-pane label="基本信息" name="first">
-              <el-descriptions title="" :column="3" style="margin-top: 0%;margin-left: 1%;background: transparent;">
-                <el-descriptions-item label="模型名称:">{{formJi.name}}</el-descriptions-item>
-                <el-descriptions-item label="英文名:">{{formJi.enname}}</el-descriptions-item>
-                <el-descriptions-item label="版本号:">{{formJi.version}}</el-descriptions-item>
-                <el-descriptions-item label="接口分类:">{{formJi.type}}</el-descriptions-item>
-                <el-descriptions-item label="开发语言:"  span="2">{{formJi.devlang}}</el-descriptions-item>
-                <el-descriptions-item label="简介:" span="3">{{formJi.intro}}</el-descriptions-item>
-              </el-descriptions>
-              <el-divider style="margin-top: 0%;"/>
-              <el-descriptions title="" :column="2" style="margin-top: 1%;margin-left: 1%;background-color: transparent;">
-                <el-descriptions-item label="模型归属单位:">{{formJi.mdUnit}}</el-descriptions-item>
-                <el-descriptions-item label="联系方式:">{{formJi.mdContact}}</el-descriptions-item>
-                <el-descriptions-item label="技术支持单位:">{{formJi.devUnit}}</el-descriptions-item>
-                <el-descriptions-item label="联系方式:">{{formJi.devContact}}</el-descriptions-item>
-              </el-descriptions>
-            </el-tab-pane>
-            <el-tab-pane label="模型参数" style="height: 45vh;" :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"/>
-                  <el-button  @click="showAddFenzu" style="margin-left: 10%;" type="success" size="mini" plain v-if="checked1">新增分组</el-button>
-                </div>
-                <div style="display: flex;justify-content: flex-end;margin-right: 1%;">
-                  <el-button  @click="addCan" style="margin-left: 5%;" type="success" size="mini" plain :disabled="selFen">新增参数</el-button>
-                  <el-button  @click="delAllCan" style="margin-top: 0%;" type="danger" size="mini" plain>删除</el-button>
-                </div>
-              </div>
-              <div style="display: flex;">
-                <div v-if="checked1" style="margin-top:1%;width: 10%;background-color: #F2F6FC;height:45vh;">
-                  <el-tree :expand-on-click-node="false" ref="treeRef" :filter-node-method="filterNode" :current-node-key="currentNodeKey" class="treeLeft" 
-                    :data="groupTreeData" @node-click="handleNodeClick" node-key="id" style="margin-left: 0%;margin-top: 1%;width: 100%;background-color: transparent;" default-expand-all :key="valueKet">
-                        <template #default="{ node, data }">
-                          <span  style="justify-content: space-between;display: flex;width: 100%;align-items: center;margin-left: -10%;">
-                            <div class="custom-tree-node" style="align-items: center;line-height: 1.5;">
-                              <span style="">{{ node.label }}</span>
-                            </div>
-                            <div style="margin-right: 1%;position: absolute;left:78%;">
-                              <el-dropdown trigger="hover" @click.stop v-if="currentNodeKey === data.mgid">
-                                  <el-icon><MoreFilled /></el-icon>
-                                  <!-- <svg-icon icon-class="zhankai"/> -->
-                                <template #dropdown>
-                                  <el-dropdown-menu>
-                                    <el-dropdown-item style="display: flex;"  @click="showEditFen">
-                                      <el-icon class="el-icon--right" style="color: black;">
-                                        <Connection />
-                                      </el-icon>
-                                      <div>
-                                        编辑分组
-                                      </div>
-                                    </el-dropdown-item>
-                                    <divider/>
-                                    <el-dropdown-item style="display: flex;"  @click="delFenZu" divided>
-                                      <el-icon class="el-icon--right" style="color: black;">
-                                        <CircleClose />
-                                      </el-icon>
-                                      <div>
-                                        删除分组
-                                      </div>
-                                    </el-dropdown-item>
-                                  </el-dropdown-menu>
-                                </template>
-                              </el-dropdown>
-                            </div>
-                          </span>
-                        </template>
-                      </el-tree>
-                </div>
-                <div style="width: 90%;flex: 1;">
-                  <el-table 
-                style="margin-top: 1%;width: 100%;margin-left: 1%;overflow: auto;"
-                :data="tableDataCan" 
-                :cell-style="{ textAlign: 'center',padding:'3px 0px' }"
-                :header-cell-style="{ textAlign: 'center', }"
-                max-height="45vh"
-                :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center'  }"
-                border>
-                    <el-table-column prop="parName" label="*参数英文名">
-                      <template #default="scope" style="width: 120%;">
-                          <el-input  v-model="scope.row.parEnname" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parName" label="*参数名称">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parName" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parType" label="*参数类型" >
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parType" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parLine" label="行号">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parLine" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="维度">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parDimen" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="表达式">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parExpr" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="*默认值">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parDefVal" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="参数范围">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parRange" style="width: 120%;margin-left: -10%;"/>
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="版本号">
-                      <template #default="scope">
-                          <el-input  v-model="scope.row.parVersion" style="width: 120%;margin-left: -10%;"/>
-                      </template> 
-                    </el-table-column>
-                    <el-table-column prop="parNote" label="操作" width="85">
-                      <template #default="scope">
-                          <el-button type="danger" @click="delCan(scope.$index, scope.row)" text size="mini" style="margin-left: 0%;">删除</el-button>
-                      </template> 
-                    </el-table-column>
-                </el-table>
-                </div>
-              </div>
-            </el-tab-pane>
-            <el-tab-pane label="模型状态">Role</el-tab-pane>
-          </el-tabs>
-          <template #footer>
-          <span class="dialog-footer">
-              <el-button @click="dialogVisiblePei = false">取消</el-button>
-              <el-button type="primary" @click="saveChangePar">
-                提交
-              </el-button>
-          </span>
-          </template>
-        </el-dialog >
-        <el-dialog v-model="dialogVisibleFen" :title="titleFen" width="30%" @close="clearFromTree" destroy-on-close :key="tableKey">
-          <el-form :label-width="100" label-position="right" style="margin-left: 5%;margin-top: 2%;"  :model="formTree" class="demo-form-inline" ref="formRefTree" :rules="rulesTree">
-            <el-form-item label="名称:" prop="parGroupName" style="">
-              <el-input v-model="formTree.parGroupName" @blur="handleBlur" style="width: 75%;" placeholder=""  resize="none"/>
-            </el-form-item>
-            <el-form-item label="组编码:" prop="parGroupCode"  style="">
-              <el-input v-model="formTree.parGroupCode" style="width: 75%;" placeholder=""  resize="none"/>
-            </el-form-item>
-            <el-form-item label="说明:" prop="parGroupNote">
-              <el-input v-model="formTree.parGroupNote" style="width: 75%;" placeholder="" type="textarea"  resize="none"/>
-            </el-form-item>
-            <el-form-item label="排序:" prop="parGroupSort">
-              <el-input-number v-model="formTree.parGroupSort" :min="1" style="width: 50%;"/>
-            </el-form-item>
-          </el-form>
-          <template #footer>
-            <span class="dialog-footer">
-              <el-button size="mini" @click="dialogVisibleFen = false">取消</el-button>
-              <el-button type="primary" @click="submitFen" size="mini">
-                提交
-              </el-button>
-            </span>
-          </template>
-        </el-dialog>
-    </div>
-  </div>
+               </el-col>
+            </el-row>
+         </el-form>
+         <template #footer>
+            <div class="dialog-footer">
+               <el-button type="primary" @click="submitForm">确 定</el-button>
+               <el-button @click="cancel">取 消</el-button>
+            </div>
+         </template>
+      </el-dialog>
+   </div>
 </template>
-<script   setup>
-import { getModelList,addModel,delMdid,getModelDetail,updateModel,addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
-import { ref, onMounted, onUnmounted, nextTick } from 'vue';
-import { Search } from '@element-plus/icons-vue'
-import {
-  ArrowLeft,
-  Plus
-} from '@element-plus/icons-vue'
-import { reactive } from 'vue'
-import { forwardRefProps } from 'element-plus/es/components/tooltip-v2/src/forward-ref.mjs';
-import { getToken } from "@/utils/auth";
-import { fa } from "element-plus/es/locales.mjs";
-import { column } from "element-plus/es/components/table-v2/src/common.mjs";
-import { TRUE } from "sass";
-import { editGroup } from "../../../api/register/regCom";
-import pinyin from 'pinyin';
+
+<script setup name="Dept">
+import { catalogList, getDept, delCatalog, addCatalog, updateCatalog, listDeptExcludeChild } from "@/api/system/dept";
 
 const { proxy } = getCurrentInstance();
-const dialogVisibleFen = ref(false)
-const dragTableRef = ref()
-const isaddFen = ref(false)
-const dialogVisible = ref(false)
-const dialogVisibleDe = ref(false)
-const dialogVisiblePei = ref(false)
-const active = ref(0)
-const isEdit = ref(true)
-const name = ref('')
-const isAdd = ref(true)
-const mdUnit = ref('')
-const isElse = ref(false)
-const elseLan = ref('')
-const tableDataCan = ref([])
-const selFen = ref(true)
-const groupTreeData = ref([])
-const parRow = ref({})
-const formJi = ref({
-  name:'',
-  version:'',
-  enname:'',
-  devlang:'',
-  intro:'',
-  type:'',
-  mdContact:'',
-  mdUnit:'',
-  devUnit:'',
-  devContact:'',
-  deployDir:'',
-  deployIp:'',
-  deployPort:'',
-  mirrorImageUrl:'',
-  mdRunCmd:'',
-  envOs:'',
-  envDisk:'',
-  envGpuMem:'11',
-  evnArmX86:'',
-  envCpuNum:'',
-  envGpuType:'',
-  envGpuNum:'2',
-  envMem:'',
-  mdInNote:'',
-  mdOutNote:''
-});
-const activeTabKey = ref(0)
-const rulesJi = reactive({
-  name: [{ required: true, message: '必填', trigger: 'blur' }],
-  enname: [{ required: true, message: '必填', trigger: 'blur' }],
-});
-const formRefJi = ref();
+const sys_normal_disable = ref([
+  { label: "正常", value: "1" },
+  { label: "停用", value: "0" }
+])
 
-const formZu = ref({
-  mirrorImageEurl:'',
-  mdCPU:'',
-  mdGPU:''
-});
-const rulesZu = reactive({
-  mirrorImageEurl: [{ required: true, message: '必填', trigger: 'blur' }],
-  mdCPU: [{ required: true, message: '必填', trigger: 'blur' }],
-});
-const formRefZu = ref();
+const deptList = ref([]);
+const open = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const title = ref("");
+const deptOptions = ref([]);
+const isExpandAll = ref(true);
+const refreshTable = ref(true);
 
-const formTree = ref({
-  parGroupSort:1,
-  parGroupNote:'',
-  parGroupName:'',
-  parGroupCode:''
-});
-const rulesTree = reactive({
-  parGroupName: [{ required: true, message: '必填', trigger: 'blur' }],
-  parGroupSort: [{ required: true, message: '必填', trigger: 'blur' }],
-  parGroupCode: [{ required: true, message: '必填', trigger: 'blur' }],
-});
-const formRefTree = ref();
-const activeName = ref('first')
-const titleFen = ref('');
-const upload = reactive({
-  // 是否显示弹出层(用户导入)
-  open: false,
-  // 弹出层标题(用户导入)
-  title: "",
-  // 是否禁用上传
-  isUploading: false,
-  // 是否更新已经存在的用户数据
-  updateSupport: '',
-  // 设置上传的请求头部
-  headers: { Authorization: "Bearer " + getToken() },
-  // 上传的地址
-  url: import.meta.env.VITE_APP_BASE_API + "/common/upload"
-});
-const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
-const tableKey = ref(0);
-const totalComReg = ref()
-const parMgid = ref()
-const currentPage = ref(1)
-const tableData2 = ref([ 
-  { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
-  { date1:'雨量站', date2:'', date3:'single', date4:'基于水文响应' },
-  { date1:'水库', date2:'', date3:'single', date4:'基于水文响应' }
-]);
-const tableData3 = ref([
-  { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
-  { date1:'水库', date2:'', date3:'single', date4:'基于水文响应' },
-  { date1:'雨量站', date2:'', date3:'single', date4:'基于水文响应' }
-]);
-const checked1 = ref(true)
-const tableData1= [{date1:'初始状态',
-  date2:'sts',
-  date3:'数据项',
-  date4:'初始状态',
-  date5:'是',
-  date6:'否',
-  date7:'2023-09-08'
-}]
-const checkGroup = [
-    {label:'水文预报'},
-    {label:'维水动力'},
-    {label:'二维水动力'},
-    {label:'机器学习'},
-]
-let tableData = ref([{name:'1'}])
-const heightAll = window.innerHeight
-const valueHelpSel = '';
-const tableheight = window.innerHeight*0.8
-const optionsType = [
-  {
-    value: '1',
-    label: '水利专业模型',
-  },
-  {
-    value: '2',
-    label: '排水专业模型',
-  },
-  {
-    value: '3',
-    label: '供水专业模型',
-  },
-  {
-    value: '4',
-    label: '海洋专业模型',
-  },
-]
-const optionsEnv = ref([
-  {
-    value: 'windwos',
-    label: 'windwos',
+const data = reactive({
+  form: {},
+  queryParams: {
+    status: undefined,
+    catalogName: null,
   },
-  {
-    value: 'Linux',
-    label: 'Linux',
+  rules: {
+    catalogName: [{ required: true, message: "上级目录不能为空", trigger: "blur" }],
+    sort: [{ required: true, message: "目录名称不能为空", trigger: "blur" }],
+    orderNum: [{ required: true, message: "显示排序不能为空", trigger: "blur" }],
   },
-  {
-    value: 'Ubuntu',
-    label: 'Ubuntu',
-  },
-  {
-    value: 'CentOS',
-    label: 'CentOS',
-  },
-  {
-    value: 'Debian',
-    label: 'Debian',
-  },
-  {
-    value: 'RedHat',
-    label: 'RedHat',
-  },
-  {
-    value: '统信',
-    label: '统信',
-  },
-  {
-    value: '麒麟',
-    label: '麒麟',
-  },
-  {
-    value: '欧拉',
-    label: '欧拉',
-  },
-])
-const uploadRef = ref(null);
-const fileList = ref([]);
-const fileList1 = ref([]);
-const tableDataCanAll = ref([]);
-const parForm = ref('')
-const currentNodeKey = ref('')
-const parTree = ref({})
-onMounted(() => {
-  getModelListTable()
-  // addNewModel()
 });
 
-const handleChange = (file, files) => {
-  fileList.value = files;
-};
-const handleChange1 = (file, files) => {
-  fileList1.value = files;
-};
-function getChineseInitials(str) {
-    if (!str || typeof str !== 'string') return '';
-    
-    // 拆分字符串为字符数组
-    const chars = str.split('');
-    const result = chars.map(char => {
-        // 判断是否为中文(Unicode范围:\u4e00-\u9fa5)
-        if (/[\u4e00-\u9fa5]/.test(char)) {
-            // 获取中文首字母拼音(忽略多音字)
-            const pinyinArr = pinyin(char, {
-                style: pinyin.STYLE_FIRST_LETTER,
-                heteronym: false
-            });
-            return pinyinArr[0][0]; // 返回首字母
-        }
-        return char; // 非中文字符直接保留(若需忽略英文可改为空字符串)
-    });
-    return result.join('');
-}
-function shenhe(row){
-  var par = {
-    srvIds:row.mdid,
-    audit:'2',
-    devkind:'SYS'
-  }
-  changeShenhe(par).then(res=>{
-    if(res.code===200){
-      proxy.$modal.msgSuccess("已可测试!");
-    }
-  })
-}
-function handleBlur(){
-  formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
-}
-function gatherTable(){
-  if(checked1.value===false){
-    var keyArray = []
-    tableDataCanAll.value.forEach(item=>{
-      keyArray.push(item.key)
-    })
-    tableDataCanAll.value.forEach(item=>{
-      tableDataCan.value.forEach(item2=>{
-        if(item2.key===item.key){
-          item = item2
-        }
-      })
-    })
-    tableDataCan.value.forEach(item=>{
-      if(!keyArray.includes(item.key)){
-        tableDataCanAll.value.push(item)
-      }
-    })
-    currentNodeKey.value = null
-    selFen.value = true
-    tableDataCan.value = tableDataCanAll.value
-  }
-}
-function handleNodeClick(node, data){
-    console.log(node.mgid)
-    parMgid.value = node.mgid
-    var keyArray = []
-    selFen.value = false
-    tableDataCanAll.value.forEach(item=>{
-      keyArray.push(item.key)
-    })
-    tableDataCanAll.value.forEach(item=>{
-      tableDataCan.value.forEach(item2=>{
-        if(item2.key===item.key){
-          item = item2
-        }
-      })
-    })
-    tableDataCan.value.forEach(item=>{
-      if(!keyArray.includes(item.key)){
-        tableDataCanAll.value.push(item)
-      }
-    })
-    parTree.value = data.data
-    tableDataCan.value = []
-    tableDataCanAll.value.forEach(item=>{
-      if(item.parGroup==data.data.parGroupCode){
-        tableDataCan.value.push(item)
-      }
-    })
-    currentNodeKey.value = data.data.mgid
-}
-function submitFen(){
-  formTree.value.mdid = parForm.value.mdid
-  console.log(isaddFen.value)
-  if(isaddFen.value===true){
-    addGroup(formTree.value).then(res=>{
-      if(res.code===200){
-        var par = {
-          mdid:parForm.value.mdid
-        }
-        getModelParList(par).then(res1=>{
-          proxy.$modal.msgSuccess("新增成功");
-          groupTreeData.value = res1.data
-          groupTreeData.value.forEach((item, index, array) => { 
-          item.label = item.parGroupName
-          item.value = item.parGroupCode
-          dialogVisibleFen.value = false
-        })
-      })
-      }
-    })
-  }
-  else{
-    editGroup(formTree.value).then(res=>{
-      if(res.code===200){
-        var par = {
-          mdid:parForm.value.mdid
-        }
-        getModelParList(par).then(res1=>{
-          proxy.$modal.msgSuccess("修改成功");
-          groupTreeData.value = res1.data
-          groupTreeData.value.forEach((item, index, array) => { 
-          item.label = item.parGroupName
-          item.value = item.parGroupCode
-          dialogVisibleFen.value = false
-        })
-      })
-      }
-    })
-  }
-  
-}
-function showEditFen(){
-  isaddFen.value = false
-  dialogVisibleFen.value = true
-  formTree.value = parTree.value
-}
-function showAddFenzu(){
-  isaddFen.value = true
-  dialogVisibleFen.value = true
-}
-function delFenZu(){
-  proxy.$modal.confirm('是否确认删除所有参数?').then(function () {
-    return delFen(parTree.value.mgid);
-  }).then(() => {
-    var par = {
-      mdid:parForm.value.mdid
-    }
-    getModelParList(par).then(res1=>{
-        groupTreeData.value = res1.data
-        groupTreeData.value.forEach((item, index, array) => { 
-        item.label = item.parGroupName
-        item.value = item.parGroupCode
-        dialogVisibleFen.value = false
-      })
-    })
-    proxy.$modal.msgSuccess("删除成功");
-  }).catch(() => {});
-}
-function delAllCan(){
-  proxy.$modal.confirm('是否确认删除所有参数?').then(function () {
-    return delAllPar(parForm.value.mdid);
-  }).then(() => {
-    tableDataCan.value = []
-    proxy.$modal.msgSuccess("删除成功");
-  }).catch(() => {});
-}
-function saveChangePar(){
-  if(checked1.value===true&&tableDataCan.value.length>0){
-    tableDataCan.value.forEach((item, index, array) => { 
-      tableDataCanAll.value.push(item)
-    })
-  }
-  if(tableDataCanAll.value.length>0){
-    tableDataCanAll.value.forEach((item, index, array) => { 
-      item.mdid = parForm.value.mdid
-      item.parCate = 'int'
-    })
-    changePar(tableDataCanAll.value).then(res=>{
-      if(res.code===200){
-        proxy.$modal.msgSuccess("修改成功");
-        dialogVisiblePei.value = false
-        getModelListTable()
-      }
-    })
-  }
-  else{
-    var par = {
-      mdid:parForm.value.mdid
-    }
-    delModelPar(par).then(res=>{
-      if(res.code===200){
-        proxy.$modal.msgSuccess("修改成功");
-        dialogVisiblePei.value = false
-        getModelListTable()
-      }
-    })
-  }
-}
-async function showPei(row){
-  dialogVisiblePei.value = true
-  parRow.value = row
-  var par = {
-    mdid:row.mdid
-  }
-  await getModelParList(par).then(res=>{
-    groupTreeData.value = res.data
-    groupTreeData.value.forEach((item, index, array) => { 
-      item.label = item.parGroupName
-      item.value = item.parGroupCode
-    })
-  })
-  await getModelDetail(row.mdid).then(res=>{
-    parForm.value = res.data
-    formJi.value = res.data
-  })
-  
-  await getParamsList(par).then(res=>{
-    tableDataCan.value = res.data
-    tableDataCan.value.forEach(item=>{
-      item.key = Math.random()
-    })
-  }) 
-  tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
-}
-function delCan(index,row){
-  tableDataCan.value.splice(index, 1)
-  tableDataCanAll.value.forEach((item,index,array)=>{
-    if(item.key===row.key){
-      array.splice(index,1)
-    }
-  })
-}
-function showDe(row){
-  dialogVisibleDe.value = true
-  getModelDetail(row.mdid).then(res=>{
-    parForm.value = res.data
-    formJi.value = res.data
-    if(formJi.value.devlang!=='java'&&formJi.value.devlang!=='nodeJs'&&formJi.value.devlang!=='python'&&formJi.value.devlang!=='c/c++'){
-      isElse.value = true
-      formJi.value.devlang = 1
-    }
-  })
-}
-function addCan(){
-  tableDataCan.value.push({
-    key:Math.random(),
-    mgid:parMgid.value,
-    parGroup:parTree.value.parGroupCode
-  })
-  console.log(tableDataCan.value)
-}
-function downOut(){
-  var url = window.location.host + formJi.value.mdOutFile
-  console.log(url)
-  const link = document.createElement('a');
-  link.href = 'http://' + url.toString();
-  link.download = formJi.value.mdOutName; // 自定义文件名(可选)
-  document.body.appendChild(link);
-  link.click();
-  document.body.removeChild(link);
-}
-function downIn(){
-  var url = window.location.host + formJi.value.mdInFile
-  console.log(url)
-  const link = document.createElement('a');
-  link.href = 'http://' + url.toString();
-  link.download = formJi.value.mdInName; // 自定义文件名(可选)
-  document.body.appendChild(link);
-  link.click();
-  document.body.removeChild(link);
-}
-function delModel(row){
-  proxy.$modal.confirm('是否确认删除?').then(function () {
-    return delMdid(row.mdid);
-  }).then(() => {
-    getModelListTable();
-    proxy.$modal.msgSuccess("删除成功");
-  }).catch(() => {});
-}
-async function showEdit(row){
-  dialogVisible.value = true
-  isEdit.value = true
-  await nextTick()
-  getModelDetail(row.mdid).then(res=>{
-    formJi.value = res.data
-    if(formJi.value.devlang!=='java'&&formJi.value.devlang!=='nodeJs'&&formJi.value.devlang!=='python'&&formJi.value.devlang!=='c/c++'){
-      console.log(formJi.value.devlang)
-      isElse.value = true
-      formJi.value.devlang = '1'
-    }
-  })
-}
-async function subEdit(){
-  if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
-    await proxy.$refs["uploadRef"].submit();
-  }
-  else if(fileList1.value&&fileList1.value.length>0&&fileList1.value.length===0){
-    await proxy.$refs["uploadRef1"].submit();
-  }
-  else if(fileList.value&&fileList1.value&&fileList.value.length>0&&fileList1.value.length>0){
-    await proxy.$refs["uploadRef1"].submit();
-    await proxy.$refs["uploadRef"].submit();
-  }
-  else{
-    await formRefJi.value.validate((valid) => {
-      if(valid){
-        if(formJi.value.devlang==='1'){
-          formJi.value.devlang = elseLan.value
-        }
-          delete formJi.value.msort
-          formJi.value.devkind = 'SYS'
-          updateModel(formJi.value).then(res=>{
-          if(res.code===200){
-            proxy.$modal.msgSuccess("修改成功");
-            dialogVisible.value = false
-            getModelListTable()
-          }
-        })
-      }
-    });
-  }
-}
-async function submit(){
-  formRefJi.value.validate((valid) => {
-    console.log(formJi.value,valid)
-    if(valid){
-        if(formJi.value.devlang==='1'){
-          formJi.value.devlang = elseLan.value
-        }
-        delete formJi.value.msort
-        formJi.value.devkind = 'SYS'
-        formJi.value.cateid = 'eec8aee5-d859-4b44-b0a1-56a22e0c29bb'
-        addModel(formJi.value).then(res=>{
-        if(res.code===200){
-          proxy.$modal.msgSuccess("新增成功");
-          dialogVisible.value = false
-          getModelListTable()
-        }
-      })
-    }
-  })
-}
-async function handleFileSuccess1(response, file, fileList){
-  formJi.value.mdOutFile = response.originalFilename
-  formJi.value.mdOutName = response.fileName
-  await formRefJi.value.validate((valid) => {
-    if(valid){
-        if(formJi.value.devlang==='1'){
-          formJi.value.devlang = elseLan.value
-        }
-        delete formJi.value.msort
-        formJi.value.devkind = 'SYS'
-        updateModel(formJi.value).then(res=>{
-        if(res.code===200){
-          proxy.$modal.msgSuccess("修改成功");
-          dialogVisible.value = false
-          getModelListTable()
-        }
-      })
-    }
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询目录列表 */
+function getList() {
+  catalogList().then(response => {
+    deptOptions.value = proxy.handleTree(response.data, "catalogId");
   });
-};
-async function handleFileSuccess(response, file, fileList){
-  formJi.value.mdInFile = response.originalFilename
-  formJi.value.mdInName = response.fileName
-  await formRefJi.value.validate((valid) => {
-    if(valid){
-        if(formJi.value.devlang==='1'){
-          formJi.value.devlang = elseLan.value
-        }
-        delete formJi.value.msort
-        formJi.value.devkind = 'SYS'
-        updateModel(formJi.value).then(res=>{
-        if(res.code===200){
-          proxy.$modal.msgSuccess("修改成功");
-          dialogVisible.value = false
-          getModelListTable()
-        }
-      })
-    }
+  loading.value = true;
+  catalogList(queryParams.value).then(response => {
+    deptList.value = proxy.handleTree(response.data, "catalogId");
+    loading.value = false;
   });
-};
-function clearFromTree(){
-  formTree.value = {}
-}
-function clearForm(){
-  tableDataCan.value = []
-  checked1.value = false
-  activeName.value = 'first'
-  fileList.value = []
-  fileList1.value = []
-  formJi.value = {
-    name:'',
-    version:'',
-    enname:'',
-    devlang:'',
-    intro:'',
-    type:'',
-    mdContact:'',
-    mdUnit:'',
-    devUnit:'',
-    devContact:'',
-    deployDir:'',
-    deployIp:'',
-    deployPort:'',
-    mirrorImageUrl:'',
-    mdRunCmd:'',
-    envOs:'',
-    envDisk:'',
-    envGpuMem:'',
-    evnArmX86:'',
-    envCpuNum:'',
-    envGpuType:'',
-    envGpuNum:'',
-    envMem:'',
-    mdInNote:'',
-    mdOutNote:''
-  }
-}
-function reg(){
-  isEdit.value = false
-  dialogVisible.value = true
 }
-function getModelListTable(){
-  tableData.value = [] 
-  var par = {
-    pageNum:1,
-    pageSize:20,
-    name:name.value,
-    mdUnit:mdUnit.value,
-    devkind:'SYS'
-  }
-  getModelList(par).then(res=>{
-    tableData.value = res.rows
-    totalComReg.value = res.total
-    console.log(tableData)
-  })
+
+/** 取消按钮 */
+function cancel() {
+  open.value = false;
+  reset();
 }
-const seledMo = ['primary','plain','plain','plain','plain','plain','plain']
 
-</script>
-<style scoped>
-:deep(.treeLeft) .el-tree-node__content {
-  display: flex !important;
-  height: 28px;                  /* 按设计稿调整高度 */
-  align-items: center;
-  padding-top: 0 !important;
+/** 表单重置 */
+function reset() {
+  form.value = {
+    deptId: undefined,
+    parentId: undefined,
+    deptName: undefined,
+    orderNum: 0,
+    leader: undefined,
+    phone: undefined,
+    email: undefined,
+    status: "0"
+  };
+  proxy.resetForm("deptRef");
 }
-:deep(.treeLeft) .el-tree-node__content:hover {
-  background-color: #e9e9eb;
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  getList();
 }
-:deep(.treeLeft) .el-tree-node__content:active {
-    background-color: rgka(69,157,255,0.1) !important;
-  }
 
-  /* 选中态(Active) */
-:deep(.treeLeft) .el-tree-node.is-current > .el-tree-node__content {
-    background-color: #c6e2ff !important;
+/** 新增按钮操作 */
+function handleAdd(row) {
+  reset();
+  catalogList().then(response => {
+    deptOptions.value = proxy.handleTree(response.data, "catalogId");
+  });
+  if (row != undefined) {
+    form.value.parentId = row.catalogId;
   }
-
-.tabs-wrapper {
-  position: relative; /* 确保内容层在伪元素上方 */
-  z-index: 1; /* 关键:高于背景图 */
+  open.value = true;
+  title.value = "添加目录";
 }
 
-.tabs-wrapper :deep(.el-tabs),
-.tabs-wrapper :deep(.el-tabs__content) {
-  background-color: red !important; 
-}
-:deep(.el-tabs){
-  background-color: transparent !important;
-}
-:deep(.el-tabs__content){
-  background-color: transparent !important; 
-}
-:deep(.custom-dialog-bg) {
-  z-index: 1000;
-  background-image: url('@/assets/images/backDia.jpg') !important; 
-  background-position-x: left;
-  background-position-y: bottom;
-  background-size: initial;
-  background-repeat: repeat-x;
-  background-attachment: initial;
-  background-origin: initial;
-  background-clip: initial;
-  background-color: rgb(255, 255, 255);
-}
-:deep(.custom-dialog-bg .el-dialog__header) {
-  
-}
-:deep(.custom-dialog-bg .el-dialog__body) {
-  
-  color: #ecf0f1 !important; ; /* 内容文字颜色 */
-}
-/* 横向排列单选框标签和输入框 */
-.custom-input-wrapper {
-  display: flex;
-  align-items: center;
-  gap: 10px; /* 调整间距 */
-}
 
-/* 输入框仅显示底部横线 */
-.underline-input :deep(.el-input__wrapper) {
-  padding: 0;
-  box-shadow: none !important;
-  border-bottom: 1px solid #dcdfe6; /* 横线颜色 */
-  border-radius: 0;
-  background: transparent;
-}
-.underline-input :deep(.el-input__inner) {
-  height: 24px;
-  padding: 0 5px;
-}
-:deep(.el-table__body tr:hover > td) {
-  background-color: #eaf7ff !important;
-}
-.drag-handle {
-  cursor: move;
+/** 修改按钮操作 */
+function handleUpdate(row) {
+  open.value = true;
+  form.value = JSON.parse(JSON.stringify(row));
+  delete form.value.children;
 }
 
-.ghost {
-  opacity: 0.5;
-  background: #c8ebfb;
+/** 提交按钮 */
+function submitForm() {
+  proxy.$refs["deptRef"].validate(valid => {
+    if (valid) {
+      if (form.value.catalogId != undefined) {
+        updateCatalog(form.value).then(response => {
+          proxy.$modal.msgSuccess("修改成功");
+          open.value = false;
+          getList();
+        });
+      } else {
+        addCatalog(form.value).then(response => {
+          proxy.$modal.msgSuccess("新增成功");
+          open.value = false;
+          getList();
+        });
+      }
+    }
+  });
 }
 
-/* 防止文字选中 */
-:deep(.el-table__row) {
-  user-select: none;
-  -webkit-user-select: none;
+/** 删除按钮操作 */
+function handleDelete(row) {
+  proxy.$modal.confirm('是否确认删除名称为"' + row.catalogName + '"的数据项?').then(function() {
+    return delCatalog(row.catalogId);
+  }).then(() => {
+    getList();
+    proxy.$modal.msgSuccess("删除成功");
+  }).catch(() => {});
 }
-</style>
-<style scoped lang="scss">
 
-
-.el-table .el-table__row td {
-  height: 60px !important; /* 行高 */
-}
-.custom-tree-node {
-  display: flex;       /* 启用 Flex 布局 */
-  align-items: center; /* 垂直居中 */
-  gap: 8px;            /* 图标与文字间距 */
-}
-:deep(.svg-icon) {
-  outline: none;
-}
-:deep(.svg-icon svg) {
-  stroke: none;
-}
-</style>
+getList();
+</script>

+ 3 - 2
ruoyi-ui/src/views/register/componentReg/index.vue

@@ -526,7 +526,7 @@
             </el-tab-pane>
           </el-tabs>
         </el-dialog>
-        <el-dialog  @close="clearForm" v-model="dialogVisiblePei" width="70%" title="参数配置">
+        <el-dialog  @close="clearForm" v-model="dialogVisiblePei" width="70%" title="模型配置">
           <el-tabs v-model="activeName" type="border-card" style="height: 50vh;">
             <el-tab-pane label="基本信息" name="first" >
               <el-descriptions title="" :column="3" style="margin-top: 0%;margin-left: 1%;background: transparent;">
@@ -1508,13 +1508,14 @@ function getChineseInitials(str) {
 }
 function shenhe(row){
   var par = {
-    srvIds:row.mdid,
+    mdid:row.mdid,
     audit:'2',
     devkind:'APP'
   }
   changeShenhe(par).then(res=>{
     if(res.code===200){
       proxy.$modal.msgSuccess("已可测试!");
+      getModelListTable()
     }
   })
 }

+ 41 - 11
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,13 +58,26 @@
               </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'">
                 已发布
               </div>
-              <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.publish=='0'||scope.row.publish==null">
-                未发布
+              <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.publish=='2'||scope.row.publish==null">
+                下线
+              </div>
+              <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.publish=='3'">
+                更新
               </div>
             </template>
           </el-table-column>
@@ -145,7 +158,7 @@
             <el-form-item label="是否发布:" prop="" style="">
               <el-radio-group v-model="publish" style="margin-top: -0.5%;">
                 <el-radio value="1" size="large">发布</el-radio>
-                <el-radio value="0" size="large">不发布</el-radio>
+                <el-radio value="2" size="large">下线</el-radio>
               </el-radio-group>
             </el-form-item>
             <el-form-item label="说明:" prop="" style="">
@@ -180,7 +193,7 @@
             {{titleFabu}}
           </div>
           <el-table 
-          style="margin-top: 2%;width: 98%;min-height: 400px;"
+          style="margin-top: 2%;width: 98%;height: 400px;"
           :data="tableDataLog" 
           :cell-style="{ textAlign: 'center',padding:'2px 0' }"
           :header-cell-style="{ textAlign: 'center'}"
@@ -217,12 +230,13 @@ 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,addServiceParam,delService,addTree,deTree,getServiceInfo,testService,publishModel } from "@/api/service/info";
+import { modelTreeSelect,getSerDe,addService,shenheLog,addServiceParam,delService,addTree,deTree,getServiceInfo,testService,publishModel,testLog } from "@/api/service/info";
 import { ref, onMounted, onUnmounted, nextTick,onBeforeMount } from 'vue';
 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";
 
@@ -434,9 +448,10 @@ const copied = ref(false);
 const parShenhe = ref({})
 
 function showLog(row){
+  parMdid.value = row.mdid
   dialogVisibleLevel.value = true
   var par = {
-    proId:row.srvId,
+    proId:row.mdid,
     proType:'PUBLISH'
   }
   titleFabu.value = row.name
@@ -447,18 +462,17 @@ function showLog(row){
 function saveShenhe(){
   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("已发布!");
-      var par1  = {
-        data:{id:parMdid.value}
-      }
-      handleNodeClick(null,par1,null)
+        getList()
       }
       dialogVisibleTest.value = false
   })
 }
 function shenhe(row){
+  parMdid.value = row.mdid
   dialogVisibleTest.value = true
   parShenhe.value = {
     srvId:row.srvId,
@@ -815,10 +829,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>

+ 164 - 22
ruoyi-ui/src/views/service/info/shenhe.vue

@@ -64,10 +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>
+        <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'}"
@@ -106,7 +202,7 @@
           <el-table-column prop="audit" label="测试状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState==1">
-                测试
+                测试成功
               </div>
               <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState==0">
                 测试失败
@@ -182,12 +278,12 @@
             </span>
           </template>
         </el-dialog>
-        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" :title="titleShen" width="40%" destroy-on-close :key="tableKey">
+        <el-dialog @close="clearAdd" v-model="dialogVisibleShen" :title="titleShen" 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="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="">
@@ -221,7 +317,7 @@
           <div style="margin-top:0%;font-size: 18px;">
             {{titleShen}}
           </div>
-          <el-table 
+          <!-- <el-table 
           style="margin-top: 2%;width: 98%;min-height: 400px;height: 40vh;"
           :data="tableDataLog" 
           :cell-style="{ textAlign: 'center',padding:'2px 0' }"
@@ -247,7 +343,46 @@
               </el-table-column>
               <el-table-column prop="remark" label="审核备注" show-overflow-tooltip>
               </el-table-column>
-          </el-table>
+          </el-table> -->
+          <el-table 
+            style="margin-top: 2%;width: 98%;height: 40vh;"
+            :data="tableDataLog" 
+            :cell-style="{ textAlign: 'center',padding:'3px 0' }"
+            :header-cell-style="{ textAlign: 'center'}"
+            :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center'  }"
+            border >
+                <el-table-column prop="createBy" label="测试发起人">
+                </el-table-column>
+                <el-table-column prop="runTm" label="测试时间">
+                </el-table-column>
+                <el-table-column prop="execTm" label="测试耗时" show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column prop="returnData" label="测试返回结果" show-overflow-tooltip>
+                </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.senState==1">
+                      测试成功
+                    </div>
+                    <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState==0">
+                      测试失败
+                    </div>
+                    <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.senState==null">
+                      未测试
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="errorMessage" label="错误信息" show-overflow-tooltip>
+                  <template #default="scope">
+                    <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.errorMessage!==null">
+                      {{scope.row.errorMessage}}
+                    </div>
+                    <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.errorMessage==null">
+                      /
+                    </div>
+                  </template>
+                </el-table-column>
+            </el-table>
           <template #footer>
               <span class="dialog-footer">
                 <el-button type="primary" size="mini" @click="dialogVisibleLevel = false">确定</el-button>
@@ -262,8 +397,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,testLog } 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' 
@@ -272,6 +407,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" }))
@@ -453,6 +589,7 @@ const rulesTree = reactive({
   itemName: [{ required: true, message: '必填', trigger: 'blur' }],
 });
 const formRefTree = ref();
+const dialogVisibleShen = ref(false)
 const formLev = ref({
   itemName:'',
   itemNo:'',
@@ -484,16 +621,19 @@ const parShenhe = ref({})
 function showLog(row){
   dialogVisibleLevel.value = true
   var par = {
-    proId:row.srvId,
-    proType:'AUDIT'
+    serId:row.srvId
   }
-  shenheLog(par).then(res=>{
-    tableDataLog.value = res.data
+  testLog(par).then(res=>{
+    tableDataLog.value = res.rows
   })
 }
+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("未通过时请填写说明!");
   }
@@ -503,12 +643,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
     })
   }
   
@@ -706,13 +842,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=>{
@@ -721,10 +861,10 @@ async function handleNodeClick(node,data,event){
         }
       })
       if(parMdid.value&&allright){
-        testAll.value = true
+        testAll.value = false
       }
       else{
-        testAll.value = false
+        testAll.value = true
 
       }
     }
@@ -865,10 +1005,12 @@ function getDate(){
   
   date.value = `${year}-${month}-${day}`;
 }
+
 onMounted(() => {
   fetchData()
   getTreeLeft()
   getDate()
+  
 });
 
 </script>

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

@@ -105,7 +105,7 @@
           <el-table-column prop="audit" label="测试状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState==1">
-                测试
+                测试成功
               </div>
               <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState==0">
                 测试失败
@@ -240,7 +240,7 @@
           <el-table 
             style="margin-top: 2%;width: 98%;height: 40vh;"
             :data="tableDataLog" 
-            :cell-style="{ textAlign: 'center',padding:'2px 0' }"
+            :cell-style="{ textAlign: 'center',padding:'3px 0' }"
             :header-cell-style="{ textAlign: 'center'}"
             :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center'  }"
             border >
@@ -255,7 +255,7 @@
                 <el-table-column prop="audit" label="测试状态" width="100">
                   <template #default="scope">
                     <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState==1">
-                      测试
+                      测试成功
                     </div>
                     <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState==0">
                       测试失败