فهرست منبع

//数据合并算法整合

wyj0522 1 روز پیش
والد
کامیت
f1f76147ec
24فایلهای تغییر یافته به همراه904 افزوده شده و 1402 حذف شده
  1. 2 2
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/EvaluationIndicatorController.java
  2. 17 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PerformanceEvaluationController.java
  3. 2 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/BasePO.java
  4. 9 2
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/EvaluationIndicator.java
  5. 5 47
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/EvaluationIndicatorMapper.java
  6. 6 6
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IEvaluationIndicatorService.java
  7. 3 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPerformanceEvaluationService.java
  8. 24 10
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/EvaluationIndicatorServiceImpl.java
  9. 28 15
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/ModelDataGenServiceImpl.java
  10. 94 2
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PerformanceEvaluationServiceImpl.java
  11. 0 60
      fdapfe-admin/src/main/resources/mapper/eval/EvaluationIndicatorMapper.xml
  12. 29 0
      fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileCopyUtils.java
  13. 1 0
      fdapfe-ui/package.json
  14. 8 1
      fdapfe-ui/src/api/test/perf.js
  15. BIN
      fdapfe-ui/src/assets/images/backgrand.jpg
  16. BIN
      fdapfe-ui/src/assets/images/backgrand.png
  17. BIN
      fdapfe-ui/src/assets/images/img.png
  18. 369 0
      fdapfe-ui/src/views/add.vue
  19. 0 1
      fdapfe-ui/src/views/eval/indicator/index.vue
  20. 115 1149
      fdapfe-ui/src/views/form.vue
  21. 32 40
      fdapfe-ui/src/views/index.vue
  22. 18 0
      fdapfe-ui/src/views/model/faultPhysical/form.vue
  23. 140 47
      fdapfe-ui/src/views/model/faultPhysical/index.vue
  24. 2 20
      fdapfe-ui/src/views/test/ddAlgorithm/index.vue

+ 2 - 2
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/EvaluationIndicatorController.java

@@ -64,7 +64,7 @@ public class EvaluationIndicatorController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('eval:indicator:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") String id)
     {
         return success(evaluationIndicatorService.selectEvaluationIndicatorById(id));
     }
@@ -97,7 +97,7 @@ public class EvaluationIndicatorController extends BaseController
     @PreAuthorize("@ss.hasPermi('eval:indicator:remove')")
     @Log(title = "评估指标体系管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable String[] ids)
     {
         return toAjax(evaluationIndicatorService.deleteEvaluationIndicatorByIds(ids));
     }

+ 17 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PerformanceEvaluationController.java

@@ -97,6 +97,23 @@ public class PerformanceEvaluationController extends BaseController
             }
         }).start();
     }
+    @PreAuthorize("@ss.hasPermi('test:perf:add')")
+    @Log(title = "算法性能评估", businessType = BusinessType.INSERT)
+    @PostMapping("add2index")
+    public void add2index(@RequestBody PerformanceEvaluation performanceEvaluation) throws Exception {
+        UUID uuid = UUID.randomUUID();
+        performanceEvaluation.setTaskId(uuid.toString());
+        new Thread(() -> {
+            try {
+                // 在新线程中处理性能评估
+                performanceEvaluationService.add2index(performanceEvaluation);
+            } catch (Exception e) {
+                // 异常处理
+                WebSocketUsers.sendMessageToUsersByText("NO");
+                e.printStackTrace();
+            }
+        }).start();
+    }
 
     /**
      * 修改算法性能评估

+ 2 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/BasePO.java

@@ -2,6 +2,7 @@ package com.cn.fdapfe.biz.domain;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.cn.fdapfe.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
@@ -23,6 +24,7 @@ public class BasePO implements Serializable {
 
     /** 更新时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
     /** 备注 */

+ 9 - 2
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/EvaluationIndicator.java

@@ -1,5 +1,8 @@
 package com.cn.fdapfe.biz.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -13,19 +16,23 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * @date 2025-03-07
  */
 @Data
-public class EvaluationIndicator extends BaseEntity
+@TableName("biz_evaluation_indicator")
+public class EvaluationIndicator extends BasePO
 {
     private static final long serialVersionUID = 1L;
 
     /** 序号 */
-    private Long id;
+    @TableId(value = "id")
+    private String id;
 
     /** 评估体系名称 */
     @Excel(name = "评估体系名称")
+    @TableField(value = "name")
     private String name;
 
     /** 评估体系参数 */
     @Excel(name = "评估体系参数")
+    @TableField(value = "biz_params")
     private String bizParams;
 
 }

+ 5 - 47
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/EvaluationIndicatorMapper.java

@@ -1,7 +1,10 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.cn.fdapfe.biz.domain.EvaluationIndicator;
+import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 评估指标体系管理Mapper接口
@@ -9,53 +12,8 @@ import com.cn.fdapfe.biz.domain.EvaluationIndicator;
  * @author Allen
  * @date 2025-03-07
  */
-public interface EvaluationIndicatorMapper 
+@Mapper
+public interface EvaluationIndicatorMapper  extends BaseMapper<EvaluationIndicator>
 {
-    /**
-     * 查询评估指标体系管理
-     * 
-     * @param id 评估指标体系管理主键
-     * @return 评估指标体系管理
-     */
-    public EvaluationIndicator selectEvaluationIndicatorById(Long id);
-
-    /**
-     * 查询评估指标体系管理列表
-     * 
-     * @param evaluationIndicator 评估指标体系管理
-     * @return 评估指标体系管理集合
-     */
-    public List<EvaluationIndicator> selectEvaluationIndicatorList(EvaluationIndicator evaluationIndicator);
-
-    /**
-     * 新增评估指标体系管理
-     * 
-     * @param evaluationIndicator 评估指标体系管理
-     * @return 结果
-     */
-    public int insertEvaluationIndicator(EvaluationIndicator evaluationIndicator);
-
-    /**
-     * 修改评估指标体系管理
-     * 
-     * @param evaluationIndicator 评估指标体系管理
-     * @return 结果
-     */
-    public int updateEvaluationIndicator(EvaluationIndicator evaluationIndicator);
-
-    /**
-     * 删除评估指标体系管理
-     * 
-     * @param id 评估指标体系管理主键
-     * @return 结果
-     */
-    public int deleteEvaluationIndicatorById(Long id);
 
-    /**
-     * 批量删除评估指标体系管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEvaluationIndicatorByIds(Long[] ids);
 }

+ 6 - 6
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IEvaluationIndicatorService.java

@@ -17,7 +17,7 @@ public interface IEvaluationIndicatorService
      * @param id 评估指标体系管理主键
      * @return 评估指标体系管理
      */
-    public EvaluationIndicator selectEvaluationIndicatorById(Long id);
+     EvaluationIndicator selectEvaluationIndicatorById(String id);
 
     /**
      * 查询评估指标体系管理列表
@@ -25,7 +25,7 @@ public interface IEvaluationIndicatorService
      * @param evaluationIndicator 评估指标体系管理
      * @return 评估指标体系管理集合
      */
-    public List<EvaluationIndicator> selectEvaluationIndicatorList(EvaluationIndicator evaluationIndicator);
+     List<EvaluationIndicator> selectEvaluationIndicatorList(EvaluationIndicator evaluationIndicator);
 
     /**
      * 新增评估指标体系管理
@@ -33,7 +33,7 @@ public interface IEvaluationIndicatorService
      * @param evaluationIndicator 评估指标体系管理
      * @return 结果
      */
-    public int insertEvaluationIndicator(EvaluationIndicator evaluationIndicator);
+     int insertEvaluationIndicator(EvaluationIndicator evaluationIndicator);
 
     /**
      * 修改评估指标体系管理
@@ -41,7 +41,7 @@ public interface IEvaluationIndicatorService
      * @param evaluationIndicator 评估指标体系管理
      * @return 结果
      */
-    public int updateEvaluationIndicator(EvaluationIndicator evaluationIndicator);
+     int updateEvaluationIndicator(EvaluationIndicator evaluationIndicator);
 
     /**
      * 批量删除评估指标体系管理
@@ -49,7 +49,7 @@ public interface IEvaluationIndicatorService
      * @param ids 需要删除的评估指标体系管理主键集合
      * @return 结果
      */
-    public int deleteEvaluationIndicatorByIds(Long[] ids);
+     int deleteEvaluationIndicatorByIds(String[] ids);
 
     /**
      * 删除评估指标体系管理信息
@@ -57,5 +57,5 @@ public interface IEvaluationIndicatorService
      * @param id 评估指标体系管理主键
      * @return 结果
      */
-    public int deleteEvaluationIndicatorById(Long id);
+     int deleteEvaluationIndicatorById(String id);
 }

+ 3 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPerformanceEvaluationService.java

@@ -1,5 +1,6 @@
 package com.cn.fdapfe.biz.service;
 
+import java.io.IOException;
 import java.util.List;
 import com.cn.fdapfe.biz.domain.PerformanceEvaluation;
 
@@ -54,4 +55,6 @@ public interface IPerformanceEvaluationService
     int run(String id);
 
     Object processPerformanceEvaluation(PerformanceEvaluation performanceEvaluation) throws Exception;
+
+    Object add2index(PerformanceEvaluation performanceEvaluation) throws Exception;
 }

+ 24 - 10
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/EvaluationIndicatorServiceImpl.java

@@ -1,13 +1,21 @@
 package com.cn.fdapfe.biz.service.impl;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.cn.fdapfe.common.utils.DateUtils;
+import com.cn.fdapfe.common.utils.SecurityUtils;
+import com.cn.fdapfe.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.cn.fdapfe.biz.mapper.EvaluationIndicatorMapper;
 import com.cn.fdapfe.biz.domain.EvaluationIndicator;
 import com.cn.fdapfe.biz.service.IEvaluationIndicatorService;
 
+import javax.annotation.Resource;
+
 /**
  * 评估指标体系管理Service业务层处理
  * 
@@ -17,7 +25,7 @@ import com.cn.fdapfe.biz.service.IEvaluationIndicatorService;
 @Service
 public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorService 
 {
-    @Autowired
+    @Resource
     private EvaluationIndicatorMapper evaluationIndicatorMapper;
 
     /**
@@ -27,9 +35,9 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
      * @return 评估指标体系管理
      */
     @Override
-    public EvaluationIndicator selectEvaluationIndicatorById(Long id)
+    public EvaluationIndicator selectEvaluationIndicatorById(String id)
     {
-        return evaluationIndicatorMapper.selectEvaluationIndicatorById(id);
+        return evaluationIndicatorMapper.selectById(id);
     }
 
     /**
@@ -41,7 +49,11 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
     @Override
     public List<EvaluationIndicator> selectEvaluationIndicatorList(EvaluationIndicator evaluationIndicator)
     {
-        return evaluationIndicatorMapper.selectEvaluationIndicatorList(evaluationIndicator);
+        QueryWrapper<EvaluationIndicator> wrapper = new QueryWrapper<>();
+        wrapper.lambda().eq(StringUtils.isNotEmpty(evaluationIndicator.getId()),EvaluationIndicator::getId,evaluationIndicator.getId())
+                .like(StringUtils.isNotEmpty(evaluationIndicator.getName()),EvaluationIndicator::getName,evaluationIndicator.getName())
+                .like(StringUtils.isNotEmpty(evaluationIndicator.getBizParams()),EvaluationIndicator::getBizParams,evaluationIndicator.getBizParams());
+        return evaluationIndicatorMapper.selectList(wrapper);
     }
 
     /**
@@ -53,8 +65,9 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
     @Override
     public int insertEvaluationIndicator(EvaluationIndicator evaluationIndicator)
     {
+        evaluationIndicator.setCreateBy(SecurityUtils.getUsername());
         evaluationIndicator.setCreateTime(DateUtils.getNowDate());
-        return evaluationIndicatorMapper.insertEvaluationIndicator(evaluationIndicator);
+        return evaluationIndicatorMapper.insert(evaluationIndicator);
     }
 
     /**
@@ -67,7 +80,8 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
     public int updateEvaluationIndicator(EvaluationIndicator evaluationIndicator)
     {
         evaluationIndicator.setUpdateTime(DateUtils.getNowDate());
-        return evaluationIndicatorMapper.updateEvaluationIndicator(evaluationIndicator);
+        evaluationIndicator.setUpdateBy(SecurityUtils.getUsername());
+        return evaluationIndicatorMapper.updateById(evaluationIndicator);
     }
 
     /**
@@ -77,9 +91,9 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
      * @return 结果
      */
     @Override
-    public int deleteEvaluationIndicatorByIds(Long[] ids)
+    public int deleteEvaluationIndicatorByIds(String[] ids)
     {
-        return evaluationIndicatorMapper.deleteEvaluationIndicatorByIds(ids);
+        return evaluationIndicatorMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
     /**
@@ -89,8 +103,8 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
      * @return 结果
      */
     @Override
-    public int deleteEvaluationIndicatorById(Long id)
+    public int deleteEvaluationIndicatorById(String id)
     {
-        return evaluationIndicatorMapper.deleteEvaluationIndicatorById(id);
+        return evaluationIndicatorMapper.deleteById(id);
     }
 }

+ 28 - 15
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/ModelDataGenServiceImpl.java

@@ -15,6 +15,7 @@ import com.cn.fdapfe.common.utils.file.FileCopyUtils;
 import com.cn.fdapfe.common.utils.file.FileToMultipartFile;
 import com.cn.fdapfe.web.controller.common.CommonController;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.sun.xml.bind.v2.TODO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -204,24 +205,35 @@ public class ModelDataGenServiceImpl implements IModelDataGenService {
         data.setType("1");
         String key = processMap(item);
         HashMap<String, Object> noiseMap = new HashMap<>();
-        noiseMap.put("noiseType", item.get("noiseType").toString());
+        if(item.containsKey("noiseType")) {
+            noiseMap.put("noiseType", item.get("noiseType").toString());
+        }
         noiseMap.put(key, item.get(key).toString());
-
         // 调用噪声算法进行加噪
         sendPostRequest(model.getModelPath(), JSON.toJSONString(noiseMap));
 
         // 将文件进行备份存储
         try {
-            FileToMultipartFile file = new FileToMultipartFile(item.get("input_file").toString(), "file");
-            AjaxResult ajaxResult = commonController.customUploadFile(file, storagePath);
-
-            data.setUrl(ajaxResult.get("url").toString());
-            data.setName(po.getDataGenName());
-            data.setFileName(ajaxResult.get("originalFilename").toString());
-            data.setFileSize(ajaxResult.get("fileSize").toString());
-            data.setFileSizeBytes(ajaxResult.get("fileSizeBytes").toString());
-            data.setFileSuffix(ajaxResult.get("fileSuffix").toString());
-
+            if(item.containsKey("noiseType")) {
+                FileToMultipartFile file = new FileToMultipartFile(item.get("input_file").toString(), "file");
+                AjaxResult ajaxResult = commonController.customUploadFile(file, storagePath);
+                data.setUrl(ajaxResult.get("url").toString());
+                data.setName(po.getDataGenName());
+                data.setFileName(ajaxResult.get("originalFilename").toString());
+                data.setFileSize(ajaxResult.get("fileSize").toString());
+                data.setFileSizeBytes(ajaxResult.get("fileSizeBytes").toString());
+                data.setFileSuffix(ajaxResult.get("fileSuffix").toString());
+            }else{
+                //TODO 文件合并后上传逻辑
+                FileToMultipartFile file = new FileToMultipartFile(item.get("output_file").toString(), "file");
+                AjaxResult ajaxResult = commonController.customUploadFile(file, storagePath);
+                data.setUrl(ajaxResult.get("url").toString());
+                data.setName(po.getDataGenName());
+                data.setFileName(ajaxResult.get("originalFilename").toString());
+                data.setFileSize(ajaxResult.get("fileSize").toString());
+                data.setFileSizeBytes(ajaxResult.get("fileSizeBytes").toString());
+                data.setFileSuffix(ajaxResult.get("fileSuffix").toString());
+            }
             dataService.insertData(data);
         } catch (Exception e) {
             throw new RuntimeException(e);
@@ -343,7 +355,6 @@ public class ModelDataGenServiceImpl implements IModelDataGenService {
         URL url = new URL(apiUrl);
         HttpURLConnection connection = (HttpURLConnection) url.openConnection();
         connection.setRequestMethod("POST");
-        // 显式指定UTF-8编码
         connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
         connection.setDoOutput(true);
 
@@ -369,11 +380,13 @@ public class ModelDataGenServiceImpl implements IModelDataGenService {
                 response.append(line);
             }
         }
-        logger.info("API 请求响应: {}", response);
+
+        // 记录完整响应信息
+        logger.info("API 请求响应: 状态码={}, 响应数据={}", responseCode, response);
+
         // 判断响应状态码是否在200 - 299之间
         return responseCode >= 200 && responseCode < 300;
     }
-
     /**
      * 构建查询条件
      */

+ 94 - 2
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PerformanceEvaluationServiceImpl.java

@@ -18,6 +18,7 @@ import com.cn.fdapfe.biz.mapper.ParamsConfigMapper;
 import com.cn.fdapfe.common.core.domain.AjaxResult;
 import com.cn.fdapfe.common.utils.DateUtils;
 import com.cn.fdapfe.common.utils.StringUtils;
+import com.cn.fdapfe.common.utils.file.FileCopyUtils;
 import com.cn.fdapfe.common.utils.file.FileToMultipartFile;
 import com.cn.fdapfe.framework.websocket.WebSocketUsers;
 import com.cn.fdapfe.web.controller.common.CommonController;
@@ -165,8 +166,8 @@ public class PerformanceEvaluationServiceImpl implements IPerformanceEvaluationS
                         }
                     }
                     // 清理文件
-                    deleteAllFiles(outputPath);
-                    deleteAllFiles(hashMap.get("inputPath").toString());
+//                    deleteAllFiles(outputPath);
+//                    deleteAllFiles(hashMap.get("inputPath").toString());
                     po.setResultImagePath(JSON.toJSONString(todoFileUrl));
                 }
 
@@ -185,6 +186,97 @@ public class PerformanceEvaluationServiceImpl implements IPerformanceEvaluationS
         return performanceEvaluationMapper.insert(po);
     }
 
+    @Override
+    public Object add2index(PerformanceEvaluation po) throws Exception {
+        HashMap<String, Object> hashMap1 = new HashMap<>();
+        po.setStartTime(DateUtils.getTime());
+        // 获取总任务数
+        ObjectMapper mappers = new ObjectMapper();
+        LinkedHashMap[] array = mappers.readValue(po.getPostApiData(), LinkedHashMap[].class);
+        int totalItems = array.length;
+
+        // 计算每个阶段的基准进度
+        int preProcessWeight = 10; // 预处理权重
+        int noiseProcessWeight = 20; // 噪声处理权重
+        int diagnosisWeight = 50; // 诊断处理权重
+        int fileProcessWeight = 30; // 文件处理权重
+        int postProcessWeight = 10; // 后处理权重
+        // 获取噪声模型的详细信息
+        FaultPhysicalModel noesmodel = faultPhysicalModelMapper.selectById(po.getNoseModelId());
+        // 构建查询条件,查询诊断算法的参数配置信息
+        QueryWrapper<ParamsConfig> wrapper = new QueryWrapper<>();
+        wrapper.lambda().eq(StringUtils.isNotEmpty(po.getFdAlgorithmId()), ParamsConfig::getModelId, po.getFdAlgorithmId());
+        List<ParamsConfig> configs = paramsConfigMapper.selectList(wrapper);
+
+        // 将配置信息存入map中,方便后面进行循环取值
+        HashMap<String, Object> hashMap = new HashMap<>();
+        configs.forEach(items -> {
+            hashMap.put(items.getParamName(), items.getParamDefaultValue());
+        });
+        // 计算每个项目的权重
+        int itemWeight = (noiseProcessWeight + diagnosisWeight + fileProcessWeight) / totalItems;
+        // 处理每个项目
+        for (int i = 0; i < totalItems; i++) {
+            LinkedHashMap item = array[i];
+            // 让噪声算法默认将文件生成都诊断算法的输入目录中,覆盖原本output_path的值
+            item.put("output_path", hashMap.get("inputPath"));
+
+            // 加噪声
+            boolean b = sendPostRequest(noesmodel.getModelPath(), JSON.toJSONString(item));
+            if (b) {
+                File[] nofiles = FileCopyUtils.filesInDirectory(hashMap.get("inputPath").toString());
+                if (nofiles != null) {
+
+                    ArrayList<Object> returnPathFileList = new ArrayList<>();
+                    for (File file : nofiles) {
+                        if (file.isFile()) {
+                            MultipartFile multipartFile = new FileToMultipartFile(file.getAbsolutePath(), "file");
+                            AjaxResult ajaxResult = commonController.customUploadFile(multipartFile, null);
+                            returnPathFileList.add(ajaxResult.get("todofilePath").toString());
+                        }
+                    }
+                    hashMap1.put("noData",returnPathFileList);
+                    //发送中间文件处理过程文件,给到首页进行查看
+                    sendProgress(hashMap1);
+                }
+                // 诊断
+                ExeProcessManager.startExe(hashMap.get("exePath").toString(), true);
+
+                // 获取输出目录
+                String outputPath = hashMap.get("outputPath").toString();
+
+                File[] files = waitForFileAndGetAllFiles(hashMap, "diagnosis_results_summary.json", 1000);
+                if (files != null) {
+                    ArrayList<String> todoFileUrl = new ArrayList<>();
+                    for (File file : files) {
+                        if (file.isFile()) {
+                            MultipartFile multipartFile = new FileToMultipartFile(file.getAbsolutePath(), "file");
+                            AjaxResult ajaxResult = commonController.customUploadFile(multipartFile, null);
+                            String fileName = ajaxResult.get("fileName").toString();
+                            if (fileName.startsWith("diagnosis_results_summary") && fileName.endsWith(".json")) {
+                                String jsonPath = file.getAbsolutePath();
+                                String jsonData = new String(Files.readAllBytes(Paths.get(jsonPath)));
+                                po.setResultText(jsonData);
+                                po.setResultFilePath(ajaxResult.get("todofilePath").toString());
+                                hashMap1.put("data",ajaxResult.get("todofilePath").toString());
+                                sendProgress(hashMap1);
+                            } else if (ajaxResult.get("fileSuffix").equals("png") || ajaxResult.get("fileSuffix").equals("jpg")) {
+                                todoFileUrl.add(ajaxResult.get("todofilePath").toString());
+                            }
+                        }
+                    }
+                    // 清理文件
+                    deleteAllFiles(outputPath);
+                    deleteAllFiles(hashMap.get("inputPath").toString());
+                    po.setResultImagePath(JSON.toJSONString(todoFileUrl));
+                }
+
+            }
+        }
+        po.setEndTime(DateUtils.getTime());
+        return performanceEvaluationMapper.insert(po);
+    }
+
     // 发送进度的辅助方法
     private void sendProgress(Object progress) {
         WebSocketUsers.sendMessageToUsersByText(String.valueOf(progress));

+ 0 - 60
fdapfe-admin/src/main/resources/mapper/eval/EvaluationIndicatorMapper.xml

@@ -18,64 +18,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectEvaluationIndicatorVo">
         select id, name, biz_params, remark, create_by, create_time, update_by, update_time from biz_evaluation_indicator
     </sql>
-
-    <select id="selectEvaluationIndicatorList" parameterType="EvaluationIndicator" resultMap="EvaluationIndicatorResult">
-        <include refid="selectEvaluationIndicatorVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>
-        </where>
-    </select>
-    
-    <select id="selectEvaluationIndicatorById" parameterType="Long" resultMap="EvaluationIndicatorResult">
-        <include refid="selectEvaluationIndicatorVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertEvaluationIndicator" parameterType="EvaluationIndicator" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_evaluation_indicator
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="bizParams != null">biz_params,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="bizParams != null">#{bizParams},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEvaluationIndicator" parameterType="EvaluationIndicator">
-        update biz_evaluation_indicator
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteEvaluationIndicatorById" parameterType="Long">
-        delete from biz_evaluation_indicator where id = #{id}
-    </delete>
-
-    <delete id="deleteEvaluationIndicatorByIds" parameterType="String">
-        delete from biz_evaluation_indicator where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>

+ 29 - 0
fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileCopyUtils.java

@@ -256,4 +256,33 @@ public class FileCopyUtils {
             writer.flush();
         }
     }
+    /**
+     * 查询指定路径中的所有文件(不包括目录)
+     * @param path 指定的路径
+     * @return 返回路径中的所有文件,如果路径不存在、不可访问或没有文件则返回空数组
+     */
+    public static File[] filesInDirectory(String path) {
+        if (path == null || path.trim().isEmpty()) {
+            throw new IllegalArgumentException("路径不能为空");
+        }
+
+        File directory = new File(path);
+
+        // 检查目录是否存在且为有效目录
+        if (!directory.exists()) {
+            System.out.println("指定的路径不存在: " + path);
+            return new File[0];
+        }
+
+        if (!directory.isDirectory()) {
+            System.out.println("指定的路径不是一个目录: " + path);
+            return new File[0];
+        }
+
+        // 使用文件过滤器只获取文件(不包括目录)
+        File[] files = directory.listFiles((dir, name) -> new File(dir, name).isFile());
+
+        // 如果获取失败(例如没有权限),返回空数组
+        return files != null ? files : new File[0];
+    }
 }

+ 1 - 0
fdapfe-ui/package.json

@@ -51,6 +51,7 @@
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",
     "jsencrypt": "3.0.0-rc.1",
+    "katex": "^0.16.22",
     "mathjax": "^3.2.2",
     "nprogress": "0.2.0",
     "numeral": "^2.0.6",

+ 8 - 1
fdapfe-ui/src/api/test/perf.js

@@ -25,7 +25,14 @@ export function addPerf(data) {
     data: data,
   });
 }
-
+// 首页新增算法性能评估
+export function addPerf2index(data) {
+  return request({
+    url: "/test/perf/add2index",
+    method: "post",
+    data: data,
+  });
+}
 // 修改算法性能评估
 export function updatePerf(data) {
   return request({

BIN
fdapfe-ui/src/assets/images/backgrand.jpg


BIN
fdapfe-ui/src/assets/images/backgrand.png


BIN
fdapfe-ui/src/assets/images/img.png


+ 369 - 0
fdapfe-ui/src/views/add.vue

@@ -0,0 +1,369 @@
+<template>
+  <el-dialog
+    title="性能评估"
+    :visible.sync="dialogOpen"
+    width="1000px"
+    :close-on-click-modal="false"
+    append-to-body
+    @close="handleClose"
+  >
+    <!-- 任务未开始时显示表单 -->
+    <div>
+      <el-form ref="form" :model="formData" label-width="100px">
+        <el-form-item label="任务名称" prop="name">
+          <el-input v-model="formData.name" placeholder="请输入任务名称" />
+        </el-form-item>
+        <el-form-item label="诊断模型">
+          <el-select
+            v-model="formData.fdAlgorithmId"
+            placeholder="请选择诊断模型"
+            :disabled="isProcessing"
+          >
+            <el-option
+              v-for="item in faultOptions"
+              :key="item.modelId"
+              :label="item.modelName"
+              :value="item.modelId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="噪声模型" prop="type">
+          <el-select
+            v-model="formData.noseModelId"
+            placeholder="请选择噪声模型"
+            @change="onModelChange"
+            :disabled="isProcessing"
+          >
+            <el-option
+              v-for="item in faultPhysicalOptions"
+              :key="item.modelId"
+              :label="item.modelName"
+              :value="item.modelId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="参数普">
+          <dynamic-parameter-form
+            :limit="1"
+            :config-data="initialData"
+            @submit="handleSubmitDataList"
+            :disabled="isProcessing"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="submitForm"
+          :loading="submitting"
+          :disabled="isProcessing"
+        >
+          确 定
+        </el-button>
+        <el-button @click="handleClose" :disabled="isProcessing">
+          取消
+        </el-button>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { getDataOptions } from "@/api/data/data";
+import { getFaultPhysical, getFaultPhysicalOptions } from '@/api/model/faultPhysical';
+import { addPerf, addPerf2index, cancelPerf } from '@/api/test/perf'
+import DynamicParameterForm from '@/views/dataGen/DynamicParameterForm.vue';
+
+export default {
+  name: "DdAlgorithmDetail",
+  components: { DynamicParameterForm },
+  dicts: ["biz_perf_eval_type"],
+  props: {
+    value: {
+      type: Boolean,
+      default: false
+    },
+  },
+  data() {
+    return {
+      formData: {
+        name: '',
+        noseModelId: '',
+        noseParams: '',
+        diagModelId: '',
+        postApiData: null,
+        noseDataIds: '',
+        fdAlgorithmId: ''
+      },
+      dataOptions: [],
+      faultPhysicalOptions: [],
+      initialData: [],
+      modelType: null,
+      faultOptions: [],
+      dialogOpen: false,
+      isProcessing: false,
+      submitting: false,
+      taskId: null,
+      statusMessage: '准备开始...',
+      errorMessage: '',
+      websocket: null,
+      isWebSocketConnected: false,
+      reconnectTimer: null,
+      reconnectAttempts: 0,
+      maxReconnectAttempts: 10,
+      reconnectInterval: 3000, // 3秒后重连
+      wsUrl: "ws://127.0.0.1:8080/websocket/message", // WebSocket连接地址
+      receivedMessages: [] // 存储接收到的WebSocket消息
+    };
+  },
+  watch: {
+    value(newVal) {
+      console.log('状态更新了', newVal);
+      this.dialogOpen = newVal;
+
+      // 关闭对话框时清理资源
+      if (!newVal && this.isProcessing) {
+        this.cancelTask();
+      }
+    }
+  },
+  created() {
+    this.fetchDataOptions();
+  },
+  mounted() {
+    // 组件挂载后可以初始化WebSocket,但通常在需要时建立连接
+  },
+  methods: {
+    // 获取数据选项
+    fetchDataOptions() {
+      getDataOptions().then((resp) => {
+        this.dataOptions = resp.data;
+      });
+
+      getFaultPhysicalOptions({ modelAttribution: 2 }).then((resp) => {
+        this.faultPhysicalOptions = resp.data;
+      });
+
+      // 诊断模型选项(类型1)
+      getFaultPhysicalOptions({ modelAttribution: 1 }).then(resp => {
+        this.faultOptions = resp.data || [];
+      });
+    },
+
+    // 建立WebSocket连接
+    connectWebSocket(taskId) {
+      if (this.websocket) {
+        this.closeWebSocket();
+      }
+
+      this.websocket = new WebSocket(`${this.wsUrl}`);
+      this.isWebSocketConnected = false;
+      this.reconnectAttempts = 0;
+
+      this.websocket.onopen = (event) => {
+        this.isWebSocketConnected = true;
+        this.reconnectAttempts = 0;
+        this.statusMessage = 'WebSocket连接已建立,正在接收任务进度...';
+        console.log('WebSocket连接成功', event);
+      };
+
+      this.websocket.onmessage = (event) => {
+        // 存储接收到的消息
+        this.receivedMessages.push(event.data);
+        // 更新状态消息
+        this.statusMessage = event.data;
+        // 返回消息给父组件
+        this.$emit('message', event.data);
+        // 任务结束时关闭对话框
+        if (event.data === '任务结束') {
+          this.closeWithCleanup();
+        }
+      };
+
+      this.websocket.onerror = (error) => {
+        this.isWebSocketConnected = false;
+        this.statusMessage = 'WebSocket连接错误';
+        this.errorMessage = `WebSocket错误: ${error.message}`;
+        console.error('WebSocket错误', error);
+        this.tryToReconnect();
+      };
+
+      this.websocket.onclose = (event) => {
+        this.isWebSocketConnected = false;
+      };
+    },
+
+    // 尝试重连
+    tryToReconnect() {
+      if (this.reconnectTimer) {
+        clearTimeout(this.reconnectTimer);
+      }
+
+      if (this.maxReconnectAttempts === 0 || this.reconnectAttempts < this.maxReconnectAttempts) {
+        this.reconnectAttempts++;
+        this.reconnectTimer = setTimeout(() => {
+          this.connectWebSocket(this.taskId);
+        }, this.reconnectInterval);
+        this.statusMessage = `尝试重连 (${this.reconnectAttempts}/${this.maxReconnectAttempts})...`;
+      } else {
+        this.statusMessage = '达到最大重连次数,停止重连';
+        this.errorMessage = 'WebSocket重连失败,达到最大重连次数';
+      }
+    },
+
+    // 关闭WebSocket连接
+    closeWebSocket() {
+      if (this.websocket) {
+        this.websocket.close();
+        this.websocket = null;
+      }
+      this.isWebSocketConnected = false;
+      if (this.reconnectTimer) {
+        clearTimeout(this.reconnectTimer);
+        this.reconnectTimer = null;
+      }
+    },
+
+    // 提交表单
+    submitForm() {
+      // 表单验证
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.submitting = true;
+          this.isProcessing = true;
+          this.errorMessage = '';
+          // 发送请求启动任务
+          this.statusMessage = '任务已启动,正在建立WebSocket连接...';
+          // 建立WebSocket连接以接收进度
+          this.connectWebSocket();
+          this.taskPromise = addPerf2index(this.formData).then((response) => {
+            return response;
+          }).catch(error => {
+            this.isProcessing = false;
+            this.errorMessage = error.response?.data?.message || '启动任务失败';
+            this.$message.error(this.errorMessage);
+            console.error(error);
+          }).finally(() => {
+            this.submitting = false;
+          });
+        }
+      });
+    },
+
+    // 处理动态参数提交
+    handleSubmitDataList(data) {
+      console.log('data', data);
+      this.formData.postApiData = JSON.stringify(data);
+      this.formData.noseParams = JSON.stringify(data);
+      this.formData.noseDataIds = data.file_path;
+    },
+
+    // 模型变更处理
+    onModelChange(modelId) {
+      getFaultPhysical(modelId).then(rest => {
+        this.initialData = rest.data.configData;
+        this.modelType = rest.data.modelAttribution;
+        this.formData.modelId = rest.data.modelId;
+        console.log('modelDataParams', rest.data.modelAttribution);
+      });
+    },
+
+    // 取消任务
+    cancelTask() {
+      if (this.taskId) {
+        // 调用取消任务API
+        cancelPerf(this.taskId).then(() => {
+          this.$message.info('已请求取消任务');
+        }).catch(error => {
+          this.$message.error('取消任务请求失败');
+          console.error(error);
+        }).finally(() => {
+          this.closeWithCleanup();
+        });
+      } else {
+        this.closeWithCleanup();
+      }
+    },
+
+    // 关闭对话框并清理资源
+    closeWithCleanup() {
+      this.isProcessing = false;
+      this.submitting = false;
+      this.statusMessage = '准备开始...';
+      this.errorMessage = '';
+
+      // 发送所有消息给父组件
+      this.$emit('allMessages', this.receivedMessages);
+
+      // 关闭WebSocket连接
+      this.closeWebSocket();
+
+      // 重置表单
+      this.formData = {
+        name: '',
+        noseModelId: '',
+        noseParams: '',
+        diagModelId: '',
+        postApiData: null,
+        noseDataIds: '',
+        fdAlgorithmId: ''
+      };
+
+      // 清空消息列表
+      this.receivedMessages = [];
+
+      // 关闭对话框
+      this.dialogOpen = false;
+      this.$emit('callback', false);
+    },
+
+    // 对话框关闭处理
+    handleClose() {
+      if (this.isProcessing) {
+        this.$confirm('任务正在处理中,确定要取消吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.cancelTask();
+        }).catch(() => {
+          // 取消关闭
+        });
+      } else {
+        this.closeWithCleanup();
+      }
+    }
+  },
+  beforeDestroy() {
+    // 组件销毁时清理资源
+    this.closeWebSocket();
+    if (this.reconnectTimer) {
+      clearTimeout(this.reconnectTimer);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.processing-container {
+  padding: 20px;
+  text-align: center;
+}
+
+.status-message {
+  margin-bottom: 20px;
+  font-size: 16px;
+  color: #666;
+}
+
+.error-message {
+  margin-bottom: 20px;
+  font-size: 14px;
+  color: #f56c6c;
+}
+
+.footer-actions {
+  text-align: center;
+  margin-top: 30px;
+}
+</style>

+ 0 - 1
fdapfe-ui/src/views/eval/indicator/index.vue

@@ -89,7 +89,6 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="id" />
       <el-table-column label="评估体系名称" align="center" prop="name" />
       <el-table-column label="评估体系参数" align="center" prop="bizParams" />
       <el-table-column label="说明" align="center" prop="remark" />

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 115 - 1149
fdapfe-ui/src/views/form.vue


+ 32 - 40
fdapfe-ui/src/views/index.vue

@@ -17,15 +17,16 @@
           </div>
         </div>
         <dv-decoration-6 style="width:150px;height:30px;"/>
-        <div class="two">
-          <div class="img twoBg even">
-            <div class="tag">算法验证</div>
-          </div>
-        </div>
-        <dv-decoration-6 style="width:150px;height:30px;" />
+<!--        <div class="two">-->
+<!--          <div class="img twoBg even">-->
+<!--            <div class="tag">算法验证</div>-->
+<!--          </div>-->
+<!--        </div>-->
+<!--        <dv-decoration-6 style="width:150px;height:30px;" />-->
         <div class="three"  @click="switchHandle('1')">
           <div class="img threeBg even">
-            <div class="tag">算法评估</div>
+            <div class="tag">功能验证</div>
+            <div class="tag2">算法评估</div>
           </div>
         </div>
         <dv-decoration-6 style="width:150px;height:30px;"/>
@@ -38,7 +39,7 @@
 
       <div class="bottomPanel">
         <div class="vanel"></div>
-        <dv-border-box-13 class="bPanel">
+        <div class="bPanel">
           <el-table size="mini">
             <el-table-column
               prop="processedDataName"
@@ -90,9 +91,9 @@
               </template>
             </el-table-column>
           </el-table>
-        </dv-border-box-13>
-        <dv-border-box-13 class="bPanel">
-          <el-table size="mini">
+        </div>
+        <div class="bPanel">
+          <el-table :data="messages[0]" size="mini">
             <el-table-column
               prop="processedDataName"
               label="处理前数据"
@@ -143,27 +144,9 @@
               </template>
             </el-table-column>
           </el-table>
-        </dv-border-box-13>
-        <dv-border-box-13 class="bPanel">
+        </div>
+        <div class="bPanel">
           <el-table size="mini">
-            <el-table-column
-              prop="processedDataName"
-              label="处理前数据"
-              align="center"
-            >
-              <template slot-scope="scope">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="scope.row"
-                  placement="top"
-                >
-                  <span class="beforeFile">{{
-                      scope.row
-                    }}</span>
-                </el-tooltip>
-              </template>
-            </el-table-column>
             <el-table-column
               prop="resultDataName"
               label="处理后数据"
@@ -196,11 +179,14 @@
               </template>
             </el-table-column>
           </el-table>
-        </dv-border-box-13>
+        </div>
         <div class="vanel"></div>
       </div>
     </div>
-    <form-model-view v-model="dialogVisible" @callback="handleRowData"/>
+    <form-model-view v-model="dialogVisible"
+                     @message="handleMessage"
+                     @allMessages="handleAllMessages"
+                     @callback="handleRowData"/>
   </div>
 </template>
 
@@ -211,7 +197,7 @@ import PreCharts from '@/views/homePage/preCharts'
 import CurveCharts from '@/views/homePage/curveCharts'
 import BarChart from '@/views/dashboard/BarChart'
 import { getDataOptions } from '@/api/data/data'
-import FormModelView from './test/perf/perfDetail.vue'
+import FormModelView from './add.vue'
 import FileTable from '@/views/fileTable.vue'
 
 export default {
@@ -230,7 +216,8 @@ export default {
     return {
       dialogVisible: false,
       loading: false, // 补充可能存在的loading状态
-      initFileData: {}
+      initFileData: {},
+      messages: []
       // 保留原有数据属性...
     }
   },
@@ -243,11 +230,16 @@ export default {
     // 保留原有watchers...
   },
   methods: {
-    // 新增对话框打开方法
-    handleDialogOpen(rowData) {
-      this.dialogVisible = true
-      // 可根据需求传递rowData到子组件,例如通过props或Vuex
-      // 假设FormModelView需要接收数据,可添加props: { dialogData: Object },并传递rowData
+    handleMessage(message) {
+      this.messages.push(message);
+      console.log('父组件接收到消息:', message);
+    },
+    handleAllMessages(allMessages) {
+      this.messages = allMessages;
+      console.log('父组件接收到所有消息:', allMessages);
+    },
+    handleDialogClose(visible) {
+      this.dialogVisible = visible;
     },
     handleRowData(row) {
       this.dialogVisible= false

+ 18 - 0
fdapfe-ui/src/views/model/faultPhysical/form.vue

@@ -11,6 +11,23 @@
       <el-form-item label="模型名称" prop="modelName">
         <el-input v-model="formData.modelName" placeholder="请输入模型名称"/>
       </el-form-item>
+      <el-form-item v-if="modelAtrtibution==='0'" label="模型类型" prop="type">
+        <el-select
+          v-model="formData.modelType"
+          placeholder="请选择模型类型"
+          clearable
+        >
+          <el-option
+            label="Amesim模型"
+            value="1"
+          />
+          <el-option
+            label="Matlab模型"
+            value="2"
+          />
+        </el-select>
+      </el-form-item>
+      <div v-else>
       <el-form-item label="模型类型" prop="type">
         <el-select
           v-model="formData.modelType"
@@ -39,6 +56,7 @@
           />
         </el-select>
       </el-form-item>
+      </div>
       <el-form-item v-if="!disable"  label="模型接口地址" prop="modelPath">
         <el-input v-model="formData.modelPath" placeholder="请输入模型接口地址"/>
       </el-form-item>

+ 140 - 47
fdapfe-ui/src/views/model/faultPhysical/index.vue

@@ -95,54 +95,147 @@
       ></right-toolbar>
     </el-row>
 
-    <el-table
-      v-loading="loading"
-      :data="faultPhysicalList"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="模型名称" align="center" prop="modelName"/>
-      <el-table-column  label="模型接口地址" align="center" prop="modelPath"/>
-      <el-table-column label="模型类型" align="center" prop="modelType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.biz_model_type" :value="scope.row.modelType" />
-        </template>
-      </el-table-column>
-      <el-table-column label="模型种类" align="center" prop="modelTypet">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.model_tepe_t" :value="scope.row.modelTypet" />
-        </template>
-      </el-table-column>
 
-      <el-table-column label="备注" align="center" prop="remark"/>
-      <el-table-column label="操作"  align="center" class-name="small-padding fixed-width" >
-        <template slot-scope="scope">
-          <el-link
-            size="mini"
-            type="primary"
-            icon="el-icon-edit"
-            @click="handleViews(scope.row,'edit')"
-            v-hasPermi="['model:faultPhysical:edit']"
-          >修改
-          </el-link>       |
-          <el-link
-            size="mini"
-            type="warning"
-            icon="el-icon-view"
-            @click="handleViews(scope.row,'info')"
-          >详情</el-link>
-          |
-          <el-link
-            size="mini"
-            type="danger"
-            icon="el-icon-delete"
-            @click="handleViews(scope.row,'remove')"
-            v-hasPermi="['model:faultPhysical:remove']"
-          >删除
-          </el-link>
-        </template>
-      </el-table-column>
-    </el-table>
+      <div v-if="modelAtrtibution==='0'">
+        <el-table
+          v-loading="loading"
+          :data="faultPhysicalList"
+          @selection-change="handleSelectionChange"
+        >
+        <el-table-column type="selection" width="55" align="center"/>
+        <el-table-column label="模型名称" align="center" prop="modelName"/>
+        <el-table-column label="模型类型" align="center" prop="modelType" >
+          <template slot-scope="scope" >
+            <span>{{scope.row.modelType==='1'?"Amesim模型":"Matlab模型"}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center" prop="remark"/>
+        <el-table-column label="操作"  align="center" class-name="small-padding fixed-width" >
+          <template slot-scope="scope">
+            <el-link
+              size="mini"
+              type="primary"
+              icon="el-icon-edit"
+              @click="handleViews(scope.row,'edit')"
+              v-hasPermi="['model:faultPhysical:edit']"
+            >修改
+            </el-link>       |
+            <el-link
+              size="mini"
+              type="warning"
+              icon="el-icon-view"
+              @click="handleViews(scope.row,'info')"
+            >详情</el-link>
+            |
+            <el-link
+              size="mini"
+              type="danger"
+              icon="el-icon-delete"
+              @click="handleViews(scope.row,'remove')"
+              v-hasPermi="['model:faultPhysical:remove']"
+            >删除
+            </el-link>
+          </template>
+        </el-table-column>
+        </el-table>
+      </div>
+      <div v-if="modelAtrtibution==='1'">
+        <el-table
+          v-loading="loading"
+          :data="faultPhysicalList"
+          @selection-change="handleSelectionChange"
+        >
+        <el-table-column type="selection" width="55" align="center"/>
+        <el-table-column label="模型名称" align="center" prop="modelName"/>
+        <el-table-column label="模型类型" align="center" prop="modelType">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.biz_model_type" :value="scope.row.modelType" />
+          </template>
+        </el-table-column>
+        <el-table-column label="模型种类" align="center" prop="modelTypet">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.model_tepe_t" :value="scope.row.modelTypet" />
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center" prop="remark"/>
+        <el-table-column label="操作"  align="center" class-name="small-padding fixed-width" >
+          <template slot-scope="scope">
+            <el-link
+              size="mini"
+              type="primary"
+              icon="el-icon-edit"
+              @click="handleViews(scope.row,'edit')"
+              v-hasPermi="['model:faultPhysical:edit']"
+            >修改
+            </el-link>       |
+            <el-link
+              size="mini"
+              type="warning"
+              icon="el-icon-view"
+              @click="handleViews(scope.row,'info')"
+            >详情</el-link>
+            |
+            <el-link
+              size="mini"
+              type="danger"
+              icon="el-icon-delete"
+              @click="handleViews(scope.row,'remove')"
+              v-hasPermi="['model:faultPhysical:remove']"
+            >删除
+            </el-link>
+          </template>
+        </el-table-column>
+        </el-table>
+      </div>
+      <div v-if="modelAtrtibution==='2'">
+        <el-table
+          v-loading="loading"
+          :data="faultPhysicalList"
+          @selection-change="handleSelectionChange"
+        >
+        <el-table-column type="selection" width="55" align="center"/>
+        <el-table-column label="模型名称" align="center" prop="modelName"/>
+        <el-table-column v-if="modelAtrtibution==='2'" label="模型接口地址" align="center" prop="modelPath"/>
+        <el-table-column label="模型类型" align="center" prop="modelType">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.biz_model_type" :value="scope.row.modelType" />
+          </template>
+        </el-table-column>
+        <el-table-column label="模型种类" align="center" prop="modelTypet">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.model_tepe_t" :value="scope.row.modelTypet" />
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center" prop="remark"/>
+        <el-table-column label="操作"  align="center" class-name="small-padding fixed-width" >
+          <template slot-scope="scope">
+            <el-link
+              size="mini"
+              type="primary"
+              icon="el-icon-edit"
+              @click="handleViews(scope.row,'edit')"
+              v-hasPermi="['model:faultPhysical:edit']"
+            >修改
+            </el-link>       |
+            <el-link
+              size="mini"
+              type="warning"
+              icon="el-icon-view"
+              @click="handleViews(scope.row,'info')"
+            >详情</el-link>
+            |
+            <el-link
+              size="mini"
+              type="danger"
+              icon="el-icon-delete"
+              @click="handleViews(scope.row,'remove')"
+              v-hasPermi="['model:faultPhysical:remove']"
+            >删除
+            </el-link>
+          </template>
+        </el-table-column>
+        </el-table>
+      </div>
 
     <pagination
       v-show="total > 0"

+ 2 - 20
fdapfe-ui/src/views/test/ddAlgorithm/index.vue

@@ -148,7 +148,7 @@
             @click="handleVerify(scope.row)"
             v-hasPermi="['test:ddAlgorithm:edit']"
           >
-            开始评估
+            开始验证
           </el-button>
           <el-button
             size="mini"
@@ -181,25 +181,7 @@
       @close="handleDialogClose"
     >
       <el-form :model="verifyRow" label-width="80px">
-        <el-form-item
-          v-if="!returnDataShow"
-          label="所属指标"
-          prop="verifyData"
-        >
-          <el-select
-            v-model="verifyRow.verifyData"
-            placeholder="请选择所属指标"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="dict in dict.type.biz_perf_eval_type"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="验证结果" v-else>
+        <el-form-item label="验证结果">
           <template>
             <el-row :gutter="5">
               <el-col

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است