Explorar o código

add base code

allen hai 1 mes
pai
achega
63e5e080b5
Modificáronse 54 ficheiros con 1939 adicións e 850 borrados
  1. BIN=BIN
      doc/若依环境使用手册.docx
  2. 11 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/DataController.java
  3. 12 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultDiagnosisModelController.java
  4. 12 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultPhysicalModelController.java
  5. 10 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FdAlgorithmController.java
  6. 12 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PerformanceEvaluationController.java
  7. 206 55
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PerformanceEvaluation.java
  8. 3 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/DataMapper.java
  9. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultDiagnosisModelMapper.java
  10. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultPhysicalModelMapper.java
  11. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FdAlgorithmMapper.java
  12. 1 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PerformanceEvaluationMapper.java
  13. 6 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IDataService.java
  14. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultDiagnosisModelService.java
  15. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultPhysicalModelService.java
  16. 4 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFdAlgorithmService.java
  17. 4 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPerformanceEvaluationService.java
  18. 7 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/DataServiceImpl.java
  19. 7 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultDiagnosisModelServiceImpl.java
  20. 7 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultPhysicalModelServiceImpl.java
  21. 7 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FdAlgorithmServiceImpl.java
  22. 30 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PerformanceEvaluationServiceImpl.java
  23. 4 4
      fdapfe-admin/src/main/resources/application.yml
  24. 3 0
      fdapfe-admin/src/main/resources/mapper/data/DataMapper.xml
  25. 4 0
      fdapfe-admin/src/main/resources/mapper/model/FaultDiagnosisModelMapper.xml
  26. 4 0
      fdapfe-admin/src/main/resources/mapper/model/FaultPhysicalModelMapper.xml
  27. 4 0
      fdapfe-admin/src/main/resources/mapper/test/FdAlgorithmMapper.xml
  28. 51 15
      fdapfe-admin/src/main/resources/mapper/test/PerformanceEvaluationMapper.xml
  29. 1 1
      fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/MimeTypeUtils.java
  30. 2 2
      fdapfe-ui/.env.development
  31. 2 2
      fdapfe-ui/.env.production
  32. 2 2
      fdapfe-ui/.env.staging
  33. 2 2
      fdapfe-ui/package.json
  34. 27 19
      fdapfe-ui/src/api/data/data.js
  35. 27 19
      fdapfe-ui/src/api/dataGen/phyModel.js
  36. 27 19
      fdapfe-ui/src/api/dataGen/phyNoise.js
  37. 27 19
      fdapfe-ui/src/api/dataGen/test.js
  38. 27 19
      fdapfe-ui/src/api/model/faultDiagnosis.js
  39. 27 19
      fdapfe-ui/src/api/model/faultPhysical.js
  40. 8 0
      fdapfe-ui/src/api/test/ddAlgorithm.js
  41. 27 19
      fdapfe-ui/src/api/test/perf.js
  42. 104 44
      fdapfe-ui/src/views/data/data/index.vue
  43. 167 58
      fdapfe-ui/src/views/dataGen/phyModel/index.vue
  44. 196 65
      fdapfe-ui/src/views/dataGen/phyNoise/index.vue
  45. 47 20
      fdapfe-ui/src/views/dataGen/test/index.vue
  46. 101 42
      fdapfe-ui/src/views/eval/indicator/index.vue
  47. 71 39
      fdapfe-ui/src/views/login.vue
  48. 120 56
      fdapfe-ui/src/views/model/faultDiagnosis/index.vue
  49. 118 56
      fdapfe-ui/src/views/model/faultPhysical/index.vue
  50. 43 16
      fdapfe-ui/src/views/test/ddAlgorithm/index.vue
  51. 134 94
      fdapfe-ui/src/views/test/perf/index.vue
  52. 127 63
      fdapfe-ui/src/views/test/perf/perfDetail.vue
  53. 73 74
      fdapfe-ui/vue.config.js
  54. 3 3
      sql/biz20250307.sql

BIN=BIN
doc/若依环境使用手册.docx


+ 11 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/DataController.java

@@ -101,4 +101,15 @@ public class DataController extends BaseController
     {
         return toAjax(dataService.deleteDataByIds(ids));
     }
+
+
+    /**
+     * 查询数据管理Options
+     */
+    @PreAuthorize("@ss.hasPermi('data:data:list')")
+    @GetMapping("/getOptions")
+    public AjaxResult getOptions()
+    {
+        return success(dataService.getOptions());
+    }
 }

+ 12 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultDiagnosisModelController.java

@@ -2,6 +2,8 @@ package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.cn.fdapfe.biz.domain.Data;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -101,4 +103,14 @@ public class FaultDiagnosisModelController extends BaseController
     {
         return toAjax(faultDiagnosisModelService.deleteFaultDiagnosisModelByIds(ids));
     }
+
+    /**
+     * 查询故障诊断算法模型Options
+     */
+    @PreAuthorize("@ss.hasPermi('model:faultDiagnosis:list')")
+    @GetMapping("/getOptions")
+    public AjaxResult getOptions()
+    {
+        return success(faultDiagnosisModelService.getOptions());
+    }
 }

+ 12 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultPhysicalModelController.java

@@ -2,6 +2,8 @@ package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.cn.fdapfe.biz.domain.Data;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -101,4 +103,14 @@ public class FaultPhysicalModelController extends BaseController
     {
         return toAjax(faultPhysicalModelService.deleteFaultPhysicalModelByIds(ids));
     }
+
+    /**
+     * 查询故障物理模型Options
+     */
+    @PreAuthorize("@ss.hasPermi('model:faultPhysical:list')")
+    @GetMapping("/getOptions")
+    public AjaxResult getOptions()
+    {
+        return success(faultPhysicalModelService.getOptions());
+    }
 }

+ 10 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FdAlgorithmController.java

@@ -112,4 +112,14 @@ public class FdAlgorithmController extends BaseController
     {
         return toAjax(fdAlgorithmService.handleVerify(id));
     }
+
+    /**
+     * 查询故障诊断算法功能验证Options
+     */
+    @PreAuthorize("@ss.hasPermi('test:ddAlgorithm:list')")
+    @GetMapping("/getOptions")
+    public AjaxResult getOptions()
+    {
+        return success(fdAlgorithmService.getOptions());
+    }
 }

+ 12 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PerformanceEvaluationController.java

@@ -25,7 +25,7 @@ import com.cn.fdapfe.common.core.page.TableDataInfo;
  * 算法性能评估Controller
  * 
  * @author Allen
- * @date 2025-03-07
+ * @date 2025-03-09
  */
 @RestController
 @RequestMapping("/test/perf")
@@ -101,4 +101,15 @@ public class PerformanceEvaluationController extends BaseController
     {
         return toAjax(performanceEvaluationService.deletePerformanceEvaluationByIds(ids));
     }
+
+    /**
+     * 运行算法性能评估
+     */
+    @PreAuthorize("@ss.hasPermi('test:perf:edit')")
+    @Log(title = "运行算法性能评估", businessType = BusinessType.UPDATE)
+    @PutMapping("/run/{id}")
+    public AjaxResult run(@PathVariable Long id)
+    {
+        return toAjax(performanceEvaluationService.run(id));
+    }
 }

+ 206 - 55
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PerformanceEvaluation.java

@@ -11,7 +11,7 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * 算法性能评估对象 biz_performance_evaluation
  * 
  * @author Allen
- * @date 2025-03-07
+ * @date 2025-03-09
  */
 public class PerformanceEvaluation extends BaseEntity
 {
@@ -28,21 +28,48 @@ public class PerformanceEvaluation extends BaseEntity
     @Excel(name = "类型")
     private String type;
 
-    /** 评估id */
-    @Excel(name = "评估id")
-    private Long valuationIndicatorId;
+    /** 循环次数 */
+    @Excel(name = "循环次数")
+    private Long loopCount;
 
     /** 故障诊断算法id */
     @Excel(name = "故障诊断算法id")
     private Long fdAlgorithmId;
 
-    /** 数据id */
-    @Excel(name = "数据id")
-    private String dataId;
+    /** 实际标签 */
+    @Excel(name = "实际标签")
+    private String truthLabels;
 
-    /** 参数 */
-    @Excel(name = "参数")
-    private String bizParams;
+    /** 物理生成模型 */
+    private Long phyModelId;
+
+    /** 物理模型参数 */
+    private String phyParams;
+
+    /** 物理数据 */
+    private String phyDataIds;
+
+    /** 噪声生成模型 */
+    private Long noseModelId;
+
+    /** 噪声模型参数 */
+    private String noseParams;
+
+    /** 噪声数据 */
+    private String noseDataIds;
+
+    /** 测试生成模型 */
+    private Long testModelId;
+
+    /** 测试模型参数 */
+    private String testParams;
+
+    /** 测试数据 */
+    private String testDataIds;
+
+    /** 图片结果 */
+    @Excel(name = "图片结果")
+    private String resultImagePath;
 
     /** 文件结果 */
     @Excel(name = "文件结果")
@@ -53,100 +80,224 @@ public class PerformanceEvaluation extends BaseEntity
     private String resultText;
 
     /** 开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date startTime;
 
     /** 结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date endTime;
 
-    public Long getId() {
-        return id;
+    public void setId(Long id) 
+    {
+        this.id = id;
     }
 
-    public void setId(Long id) {
-        this.id = id;
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
     }
 
-    public String getName() {
+    public String getName() 
+    {
         return name;
     }
-
-    public void setName(String name) {
-        this.name = name;
+    public void setType(String type) 
+    {
+        this.type = type;
     }
 
-    public String getType() {
+    public String getType() 
+    {
         return type;
     }
+    public void setLoopCount(Long loopCount) 
+    {
+        this.loopCount = loopCount;
+    }
 
-    public void setType(String type) {
-        this.type = type;
+    public Long getLoopCount() 
+    {
+        return loopCount;
+    }
+    public void setFdAlgorithmId(Long fdAlgorithmId) 
+    {
+        this.fdAlgorithmId = fdAlgorithmId;
     }
 
-    public Long getValuationIndicatorId() {
-        return valuationIndicatorId;
+    public Long getFdAlgorithmId() 
+    {
+        return fdAlgorithmId;
+    }
+    public void setTruthLabels(String truthLabels) 
+    {
+        this.truthLabels = truthLabels;
     }
 
-    public void setValuationIndicatorId(Long valuationIndicatorId) {
-        this.valuationIndicatorId = valuationIndicatorId;
+    public String getTruthLabels() 
+    {
+        return truthLabels;
+    }
+    public void setPhyModelId(Long phyModelId) 
+    {
+        this.phyModelId = phyModelId;
     }
 
-    public Long getFdAlgorithmId() {
-        return fdAlgorithmId;
+    public Long getPhyModelId() 
+    {
+        return phyModelId;
+    }
+    public void setPhyParams(String phyParams) 
+    {
+        this.phyParams = phyParams;
     }
 
-    public void setFdAlgorithmId(Long fdAlgorithmId) {
-        this.fdAlgorithmId = fdAlgorithmId;
+    public String getPhyParams() 
+    {
+        return phyParams;
+    }
+    public void setPhyDataIds(String phyDataIds) 
+    {
+        this.phyDataIds = phyDataIds;
     }
 
-    public String getDataId() {
-        return dataId;
+    public String getPhyDataIds() 
+    {
+        return phyDataIds;
+    }
+    public void setNoseModelId(Long noseModelId) 
+    {
+        this.noseModelId = noseModelId;
     }
 
-    public void setDataId(String dataId) {
-        this.dataId = dataId;
+    public Long getNoseModelId() 
+    {
+        return noseModelId;
+    }
+    public void setNoseParams(String noseParams) 
+    {
+        this.noseParams = noseParams;
     }
 
-    public String getBizParams() {
-        return bizParams;
+    public String getNoseParams() 
+    {
+        return noseParams;
+    }
+    public void setNoseDataIds(String noseDataIds) 
+    {
+        this.noseDataIds = noseDataIds;
     }
 
-    public void setBizParams(String bizParams) {
-        this.bizParams = bizParams;
+    public String getNoseDataIds() 
+    {
+        return noseDataIds;
+    }
+    public void setTestModelId(Long testModelId) 
+    {
+        this.testModelId = testModelId;
     }
 
-    public String getResultFilePath() {
-        return resultFilePath;
+    public Long getTestModelId() 
+    {
+        return testModelId;
+    }
+    public void setTestParams(String testParams) 
+    {
+        this.testParams = testParams;
     }
 
-    public void setResultFilePath(String resultFilePath) {
-        this.resultFilePath = resultFilePath;
+    public String getTestParams() 
+    {
+        return testParams;
+    }
+    public void setTestDataIds(String testDataIds) 
+    {
+        this.testDataIds = testDataIds;
     }
 
-    public String getResultText() {
-        return resultText;
+    public String getTestDataIds() 
+    {
+        return testDataIds;
+    }
+    public void setResultImagePath(String resultImagePath) 
+    {
+        this.resultImagePath = resultImagePath;
     }
 
-    public void setResultText(String resultText) {
-        this.resultText = resultText;
+    public String getResultImagePath() 
+    {
+        return resultImagePath;
+    }
+    public void setResultFilePath(String resultFilePath) 
+    {
+        this.resultFilePath = resultFilePath;
     }
 
-    public Date getStartTime() {
-        return startTime;
+    public String getResultFilePath() 
+    {
+        return resultFilePath;
+    }
+    public void setResultText(String resultText) 
+    {
+        this.resultText = resultText;
     }
 
-    public void setStartTime(Date startTime) {
+    public String getResultText() 
+    {
+        return resultText;
+    }
+    public void setStartTime(Date startTime) 
+    {
         this.startTime = startTime;
     }
 
-    public Date getEndTime() {
+    public Date getStartTime() 
+    {
+        return startTime;
+    }
+    public void setEndTime(Date endTime) 
+    {
+        this.endTime = endTime;
+    }
+
+    public Date getEndTime() 
+    {
         return endTime;
     }
 
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("type", getType())
+            .append("loopCount", getLoopCount())
+            .append("fdAlgorithmId", getFdAlgorithmId())
+            .append("truthLabels", getTruthLabels())
+            .append("phyModelId", getPhyModelId())
+            .append("phyParams", getPhyParams())
+            .append("phyDataIds", getPhyDataIds())
+            .append("noseModelId", getNoseModelId())
+            .append("noseParams", getNoseParams())
+            .append("noseDataIds", getNoseDataIds())
+            .append("testModelId", getTestModelId())
+            .append("testParams", getTestParams())
+            .append("testDataIds", getTestDataIds())
+            .append("resultImagePath", getResultImagePath())
+            .append("resultFilePath", getResultFilePath())
+            .append("resultText", getResultText())
+            .append("remark", getRemark())
+            .append("startTime", getStartTime())
+            .append("endTime", getEndTime())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
     }
 }

+ 3 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/DataMapper.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.Data;
 
 /**
@@ -58,4 +60,5 @@ public interface DataMapper
      * @return 结果
      */
     public int deleteDataByIds(Long[] ids);
+    public List<Map<String,Object>> getOptions();
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultDiagnosisModelMapper.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FaultDiagnosisModel;
 
 /**
@@ -58,4 +60,6 @@ public interface FaultDiagnosisModelMapper
      * @return 结果
      */
     public int deleteFaultDiagnosisModelByIds(Long[] ids);
+
+    public List<Map<String,Object>> getOptions();
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultPhysicalModelMapper.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FaultPhysicalModel;
 
 /**
@@ -58,4 +60,6 @@ public interface FaultPhysicalModelMapper
      * @return 结果
      */
     public int deleteFaultPhysicalModelByIds(Long[] ids);
+
+    public List<Map<String,Object>> getOptions();
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FdAlgorithmMapper.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FdAlgorithm;
 
 /**
@@ -58,4 +60,6 @@ public interface FdAlgorithmMapper
      * @return 结果
      */
     public int deleteFdAlgorithmByIds(Long[] ids);
+
+    public List<Map<String,Object>> getOptions();
 }

+ 1 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PerformanceEvaluationMapper.java

@@ -7,7 +7,7 @@ import com.cn.fdapfe.biz.domain.PerformanceEvaluation;
  * 算法性能评估Mapper接口
  * 
  * @author Allen
- * @date 2025-03-07
+ * @date 2025-03-09
  */
 public interface PerformanceEvaluationMapper 
 {

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

@@ -1,7 +1,10 @@
 package com.cn.fdapfe.biz.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.Data;
+import com.cn.fdapfe.common.core.domain.AjaxResult;
 
 /**
  * 数据管理Service接口
@@ -58,4 +61,7 @@ public interface IDataService
      * @return 结果
      */
     public int deleteDataById(Long id);
+
+    List<Map<String,Object>> getOptions();
+
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultDiagnosisModelService.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FaultDiagnosisModel;
 
 /**
@@ -58,4 +60,6 @@ public interface IFaultDiagnosisModelService
      * @return 结果
      */
     public int deleteFaultDiagnosisModelById(Long id);
+
+    List<Map<String,Object>> getOptions();
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultPhysicalModelService.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FaultPhysicalModel;
 
 /**
@@ -58,4 +60,6 @@ public interface IFaultPhysicalModelService
      * @return 结果
      */
     public int deleteFaultPhysicalModelById(Long id);
+
+    List<Map<String,Object>> getOptions();
 }

+ 4 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFdAlgorithmService.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.biz.domain.FdAlgorithm;
 
 /**
@@ -60,4 +62,6 @@ public interface IFdAlgorithmService
     public int deleteFdAlgorithmById(Long id);
 
     int handleVerify(Long id);
+
+    List<Map<String,Object>> getOptions();
 }

+ 4 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPerformanceEvaluationService.java

@@ -7,7 +7,7 @@ import com.cn.fdapfe.biz.domain.PerformanceEvaluation;
  * 算法性能评估Service接口
  * 
  * @author Allen
- * @date 2025-03-07
+ * @date 2025-03-09
  */
 public interface IPerformanceEvaluationService 
 {
@@ -58,4 +58,7 @@ public interface IPerformanceEvaluationService
      * @return 结果
      */
     public int deletePerformanceEvaluationById(Long id);
+
+    int run(Long id);
+
 }

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/DataServiceImpl.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -93,4 +95,9 @@ public class DataServiceImpl implements IDataService
     {
         return dataMapper.deleteDataById(id);
     }
+
+    @Override
+    public List<Map<String, Object>> getOptions() {
+        return dataMapper.getOptions();
+    }
 }

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultDiagnosisModelServiceImpl.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -93,4 +95,9 @@ public class FaultDiagnosisModelServiceImpl implements IFaultDiagnosisModelServi
     {
         return faultDiagnosisModelMapper.deleteFaultDiagnosisModelById(id);
     }
+
+    @Override
+    public List<Map<String, Object>> getOptions() {
+        return faultDiagnosisModelMapper.getOptions();
+    }
 }

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultPhysicalModelServiceImpl.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -93,4 +95,9 @@ public class FaultPhysicalModelServiceImpl implements IFaultPhysicalModelService
     {
         return faultPhysicalModelMapper.deleteFaultPhysicalModelById(id);
     }
+
+    @Override
+    public List<Map<String, Object>> getOptions() {
+        return faultPhysicalModelMapper.getOptions();
+    }
 }

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FdAlgorithmServiceImpl.java

@@ -4,6 +4,8 @@ import java.time.Instant;
 import java.time.temporal.ChronoUnit;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+
 import com.cn.fdapfe.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -114,4 +116,9 @@ public class FdAlgorithmServiceImpl implements IFdAlgorithmService
         fdAlgorithm.setTestLabels(fdAlgorithm.getTruthLabels());
         return this.updateFdAlgorithm(fdAlgorithm);
     }
+
+    @Override
+    public List<Map<String, Object>> getOptions() {
+        return fdAlgorithmMapper.getOptions();
+    }
 }

+ 30 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PerformanceEvaluationServiceImpl.java

@@ -1,5 +1,8 @@
 package com.cn.fdapfe.biz.service.impl;
 
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.Date;
 import java.util.List;
 import com.cn.fdapfe.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,7 +15,7 @@ import com.cn.fdapfe.biz.service.IPerformanceEvaluationService;
  * 算法性能评估Service业务层处理
  * 
  * @author Allen
- * @date 2025-03-07
+ * @date 2025-03-09
  */
 @Service
 public class PerformanceEvaluationServiceImpl implements IPerformanceEvaluationService 
@@ -93,4 +96,30 @@ public class PerformanceEvaluationServiceImpl implements IPerformanceEvaluationS
     {
         return performanceEvaluationMapper.deletePerformanceEvaluationById(id);
     }
+
+    @Override
+    public int run(Long id) {
+        PerformanceEvaluation performanceEvaluation = this.selectPerformanceEvaluationById(id);
+        if(performanceEvaluation == null){
+            return 0;
+        }
+        Date currentDate = new Date();
+        performanceEvaluation.setStartTime(currentDate);
+        Instant instant = currentDate.toInstant();
+        Instant newInstant = instant.plus(5, ChronoUnit.SECONDS);
+
+        // 转换回 Date
+        Date newDate = Date.from(newInstant);
+        performanceEvaluation.setEndTime(newDate);
+        performanceEvaluation.setResultFilePath("/profile/upload/2025/03/09/demo/文件结果.txt");
+        performanceEvaluation.setResultImagePath("/profile/upload/2025/03/09/demo/图片结果.png");
+        if("1".equals(performanceEvaluation.getType())){ //速率测试
+            performanceEvaluation.setResultText("{\"平均速率\":\"97ms\",\"最大时长\":\"257ms\",\"最小时长\":\"37ms\"}");
+        } else if ("2".equals(performanceEvaluation.getType())){
+            performanceEvaluation.setResultText("{\"准确率\":\"83.04%\",\"召回率\":\"85.69%\"}");
+        }
+
+
+        return this.updatePerformanceEvaluation(performanceEvaluation);
+    }
 }

+ 4 - 4
fdapfe-admin/src/main/resources/application.yml

@@ -1,13 +1,13 @@
 # 项目相关配置
 ruoyi:
   # 名称
-  name: RuoYi
-  # 版本
-  version: 3.8.9
+  name: Fdapfe
+  # 版本 ruoyi 3.8.9
+  version: 1.0.1
   # 版权年份
   copyrightYear: 2024
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-  profile: D:/ruoyi/uploadPath
+  profile: E:/fdapfe/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证

+ 3 - 0
fdapfe-admin/src/main/resources/mapper/data/DataMapper.xml

@@ -82,4 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+    <select id="getOptions" resultType="map">
+        select id,name from biz_data order by id desc
+    </select>
 </mapper>

+ 4 - 0
fdapfe-admin/src/main/resources/mapper/model/FaultDiagnosisModelMapper.xml

@@ -87,4 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOptions" resultType="map">
+        select id,name from biz_fault_diagnosis_model order by id desc
+    </select>
 </mapper>

+ 4 - 0
fdapfe-admin/src/main/resources/mapper/model/FaultPhysicalModelMapper.xml

@@ -88,4 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOptions" resultType="map">
+        select id,name from biz_fault_physical_model order by id desc
+    </select>
 </mapper>

+ 4 - 0
fdapfe-admin/src/main/resources/mapper/test/FdAlgorithmMapper.xml

@@ -101,4 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOptions" resultType="map">
+        select id,name from biz_fd_algorithm order by id desc
+    </select>
 </mapper>

+ 51 - 15
fdapfe-admin/src/main/resources/mapper/test/PerformanceEvaluationMapper.xml

@@ -8,10 +8,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="name"    column="name"    />
         <result property="type"    column="type"    />
-        <result property="valuationIndicatorId"    column="valuation_indicator_id"    />
+        <result property="loopCount"    column="loop_count"    />
         <result property="fdAlgorithmId"    column="fd_algorithm_id"    />
-        <result property="dataId"    column="data_id"    />
-        <result property="bizParams"    column="biz_params"    />
+        <result property="truthLabels"    column="truth_labels"    />
+        <result property="phyModelId"    column="phy_model_id"    />
+        <result property="phyParams"    column="phy_params"    />
+        <result property="phyDataIds"    column="phy_data_ids"    />
+        <result property="noseModelId"    column="nose_model_id"    />
+        <result property="noseParams"    column="nose_params"    />
+        <result property="noseDataIds"    column="nose_data_ids"    />
+        <result property="testModelId"    column="test_model_id"    />
+        <result property="testParams"    column="test_params"    />
+        <result property="testDataIds"    column="test_data_ids"    />
+        <result property="resultImagePath"    column="result_image_path"    />
         <result property="resultFilePath"    column="result_file_path"    />
         <result property="resultText"    column="result_text"    />
         <result property="remark"    column="remark"    />
@@ -24,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectPerformanceEvaluationVo">
-        select id, name, type, valuation_indicator_id, fd_algorithm_id, data_id, biz_params, result_file_path, result_text, remark, start_time, end_time, create_by, create_time, update_by, update_time from biz_performance_evaluation
+        select id, name, type, loop_count, fd_algorithm_id, truth_labels, phy_model_id, phy_params, phy_data_ids, nose_model_id, nose_params, nose_data_ids, test_model_id, test_params, test_data_ids, result_image_path, result_file_path, result_text, remark, start_time, end_time, create_by, create_time, update_by, update_time from biz_performance_evaluation
     </sql>
 
     <select id="selectPerformanceEvaluationList" parameterType="PerformanceEvaluation" resultMap="PerformanceEvaluationResult">
@@ -32,8 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
+            <if test="fdAlgorithmId != null "> and fd_algorithm_id = #{fdAlgorithmId}</if>
+            <if test="truthLabels != null  and truthLabels != ''"> and truth_labels = #{truthLabels}</if>
         </where>
     </select>
     
@@ -47,10 +56,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="name != null">name,</if>
             <if test="type != null">type,</if>
-            <if test="valuationIndicatorId != null">valuation_indicator_id,</if>
+            <if test="loopCount != null">loop_count,</if>
             <if test="fdAlgorithmId != null">fd_algorithm_id,</if>
-            <if test="dataId != null">data_id,</if>
-            <if test="bizParams != null">biz_params,</if>
+            <if test="truthLabels != null">truth_labels,</if>
+            <if test="phyModelId != null">phy_model_id,</if>
+            <if test="phyParams != null">phy_params,</if>
+            <if test="phyDataIds != null">phy_data_ids,</if>
+            <if test="noseModelId != null">nose_model_id,</if>
+            <if test="noseParams != null">nose_params,</if>
+            <if test="noseDataIds != null">nose_data_ids,</if>
+            <if test="testModelId != null">test_model_id,</if>
+            <if test="testParams != null">test_params,</if>
+            <if test="testDataIds != null">test_data_ids,</if>
+            <if test="resultImagePath != null">result_image_path,</if>
             <if test="resultFilePath != null">result_file_path,</if>
             <if test="resultText != null">result_text,</if>
             <if test="remark != null">remark,</if>
@@ -64,10 +82,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="name != null">#{name},</if>
             <if test="type != null">#{type},</if>
-            <if test="valuationIndicatorId != null">#{valuationIndicatorId},</if>
+            <if test="loopCount != null">#{loopCount},</if>
             <if test="fdAlgorithmId != null">#{fdAlgorithmId},</if>
-            <if test="dataId != null">#{dataId},</if>
-            <if test="bizParams != null">#{bizParams},</if>
+            <if test="truthLabels != null">#{truthLabels},</if>
+            <if test="phyModelId != null">#{phyModelId},</if>
+            <if test="phyParams != null">#{phyParams},</if>
+            <if test="phyDataIds != null">#{phyDataIds},</if>
+            <if test="noseModelId != null">#{noseModelId},</if>
+            <if test="noseParams != null">#{noseParams},</if>
+            <if test="noseDataIds != null">#{noseDataIds},</if>
+            <if test="testModelId != null">#{testModelId},</if>
+            <if test="testParams != null">#{testParams},</if>
+            <if test="testDataIds != null">#{testDataIds},</if>
+            <if test="resultImagePath != null">#{resultImagePath},</if>
             <if test="resultFilePath != null">#{resultFilePath},</if>
             <if test="resultText != null">#{resultText},</if>
             <if test="remark != null">#{remark},</if>
@@ -85,10 +112,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="name != null">name = #{name},</if>
             <if test="type != null">type = #{type},</if>
-            <if test="valuationIndicatorId != null">valuation_indicator_id = #{valuationIndicatorId},</if>
+            <if test="loopCount != null">loop_count = #{loopCount},</if>
             <if test="fdAlgorithmId != null">fd_algorithm_id = #{fdAlgorithmId},</if>
-            <if test="dataId != null">data_id = #{dataId},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
+            <if test="truthLabels != null">truth_labels = #{truthLabels},</if>
+            <if test="phyModelId != null">phy_model_id = #{phyModelId},</if>
+            <if test="phyParams != null">phy_params = #{phyParams},</if>
+            <if test="phyDataIds != null">phy_data_ids = #{phyDataIds},</if>
+            <if test="noseModelId != null">nose_model_id = #{noseModelId},</if>
+            <if test="noseParams != null">nose_params = #{noseParams},</if>
+            <if test="noseDataIds != null">nose_data_ids = #{noseDataIds},</if>
+            <if test="testModelId != null">test_model_id = #{testModelId},</if>
+            <if test="testParams != null">test_params = #{testParams},</if>
+            <if test="testDataIds != null">test_data_ids = #{testDataIds},</if>
+            <if test="resultImagePath != null">result_image_path = #{resultImagePath},</if>
             <if test="resultFilePath != null">result_file_path = #{resultFilePath},</if>
             <if test="resultText != null">result_text = #{resultText},</if>
             <if test="remark != null">remark = #{remark},</if>

+ 1 - 1
fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/MimeTypeUtils.java

@@ -30,7 +30,7 @@ public class MimeTypeUtils
             // 图片
             "bmp", "gif", "jpg", "jpeg", "png",
             // word excel powerpoint
-            "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
+            "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "csv",
             // 压缩文件
             "rar", "zip", "gz", "bz2",
             // 视频格式

+ 2 - 2
fdapfe-ui/.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 故障诊断算法模型性能和功能评估平台
+VUE_APP_TITLE = 故障诊断专家知识系统验证与评估平台
 
 # 开发环境配置
 ENV = 'development'
 
-# 故障诊断算法模型性能和功能评估平台/开发环境
+# 故障诊断专家知识系统验证与评估平台/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 2 - 2
fdapfe-ui/.env.production

@@ -1,8 +1,8 @@
 # 页面标题
-VUE_APP_TITLE = 故障诊断算法模型性能和功能评估平台
+VUE_APP_TITLE = 故障诊断专家知识系统验证与评估平台
 
 # 生产环境配置
 ENV = 'production'
 
-# 故障诊断算法模型性能和功能评估平台/生产环境
+# 故障诊断专家知识系统验证与评估平台/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 2 - 2
fdapfe-ui/.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 故障诊断算法模型性能和功能评估平台
+VUE_APP_TITLE = 故障诊断专家知识系统验证与评估平台
 
 BABEL_ENV = production
 
@@ -8,5 +8,5 @@ NODE_ENV = production
 # 测试环境配置
 ENV = 'staging'
 
-# 故障诊断算法模型性能和功能评估平台/测试环境
+# 故障诊断专家知识系统验证与评估平台/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 2 - 2
fdapfe-ui/package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.8.9",
-  "description": "故障诊断算法模型性能和功能评估平台",
+  "description": "故障诊断专家知识系统验证与评估平台",
   "author": "若依",
   "license": "MIT",
   "scripts": {
@@ -90,4 +90,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 27 - 19
fdapfe-ui/src/api/data/data.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询数据管理列表
 export function listData(query) {
   return request({
-    url: '/data/data/list',
-    method: 'get',
-    params: query
-  })
+    url: "/data/data/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询数据管理详细
 export function getData(id) {
   return request({
-    url: '/data/data/' + id,
-    method: 'get'
-  })
+    url: "/data/data/" + id,
+    method: "get",
+  });
 }
 
 // 新增数据管理
 export function addData(data) {
   return request({
-    url: '/data/data',
-    method: 'post',
-    data: data
-  })
+    url: "/data/data",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改数据管理
 export function updateData(data) {
   return request({
-    url: '/data/data',
-    method: 'put',
-    data: data
-  })
+    url: "/data/data",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除数据管理
 export function delData(id) {
   return request({
-    url: '/data/data/' + id,
-    method: 'delete'
-  })
+    url: "/data/data/" + id,
+    method: "delete",
+  });
+}
+
+// 数据管理getOptions
+export function getDataOptions() {
+  return request({
+    url: "/data/data/getOptions",
+    method: "get",
+  });
 }

+ 27 - 19
fdapfe-ui/src/api/dataGen/phyModel.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询物理模型数据生成管理列表
 export function listPhyModel(query) {
   return request({
-    url: '/dataGen/phyModel/list',
-    method: 'get',
-    params: query
-  })
+    url: "/dataGen/phyModel/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询物理模型数据生成管理详细
 export function getPhyModel(id) {
   return request({
-    url: '/dataGen/phyModel/' + id,
-    method: 'get'
-  })
+    url: "/dataGen/phyModel/" + id,
+    method: "get",
+  });
 }
 
 // 新增物理模型数据生成管理
 export function addPhyModel(data) {
   return request({
-    url: '/dataGen/phyModel',
-    method: 'post',
-    data: data
-  })
+    url: "/dataGen/phyModel",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改物理模型数据生成管理
 export function updatePhyModel(data) {
   return request({
-    url: '/dataGen/phyModel',
-    method: 'put',
-    data: data
-  })
+    url: "/dataGen/phyModel",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除物理模型数据生成管理
 export function delPhyModel(id) {
   return request({
-    url: '/dataGen/phyModel/' + id,
-    method: 'delete'
-  })
+    url: "/dataGen/phyModel/" + id,
+    method: "delete",
+  });
+}
+
+// 物理模型数据生成getOptions
+export function getPhyModelOptions() {
+  return request({
+    url: "/dataGen/phyModel/getOptions",
+    method: "get",
+  });
 }

+ 27 - 19
fdapfe-ui/src/api/dataGen/phyNoise.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询噪声数据生成管理列表
 export function listPhyNoise(query) {
   return request({
-    url: '/dataGen/phyNoise/list',
-    method: 'get',
-    params: query
-  })
+    url: "/dataGen/phyNoise/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询噪声数据生成管理详细
 export function getPhyNoise(id) {
   return request({
-    url: '/dataGen/phyNoise/' + id,
-    method: 'get'
-  })
+    url: "/dataGen/phyNoise/" + id,
+    method: "get",
+  });
 }
 
 // 新增噪声数据生成管理
 export function addPhyNoise(data) {
   return request({
-    url: '/dataGen/phyNoise',
-    method: 'post',
-    data: data
-  })
+    url: "/dataGen/phyNoise",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改噪声数据生成管理
 export function updatePhyNoise(data) {
   return request({
-    url: '/dataGen/phyNoise',
-    method: 'put',
-    data: data
-  })
+    url: "/dataGen/phyNoise",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除噪声数据生成管理
 export function delPhyNoise(id) {
   return request({
-    url: '/dataGen/phyNoise/' + id,
-    method: 'delete'
-  })
+    url: "/dataGen/phyNoise/" + id,
+    method: "delete",
+  });
+}
+
+// 噪声模型数据生成getOptions
+export function getPhyModelOptions() {
+  return request({
+    url: "/dataGen/phyNoise/getOptions",
+    method: "get",
+  });
 }

+ 27 - 19
fdapfe-ui/src/api/dataGen/test.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询测试数据生成管理列表
 export function listTest(query) {
   return request({
-    url: '/dataGen/test/list',
-    method: 'get',
-    params: query
-  })
+    url: "/dataGen/test/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询测试数据生成管理详细
 export function getTest(id) {
   return request({
-    url: '/dataGen/test/' + id,
-    method: 'get'
-  })
+    url: "/dataGen/test/" + id,
+    method: "get",
+  });
 }
 
 // 新增测试数据生成管理
 export function addTest(data) {
   return request({
-    url: '/dataGen/test',
-    method: 'post',
-    data: data
-  })
+    url: "/dataGen/test",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改测试数据生成管理
 export function updateTest(data) {
   return request({
-    url: '/dataGen/test',
-    method: 'put',
-    data: data
-  })
+    url: "/dataGen/test",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除测试数据生成管理
 export function delTest(id) {
   return request({
-    url: '/dataGen/test/' + id,
-    method: 'delete'
-  })
+    url: "/dataGen/test/" + id,
+    method: "delete",
+  });
+}
+
+// 测试模型数据生成getOptions
+export function getTestModelOptions() {
+  return request({
+    url: "/dataGen/test/getOptions",
+    method: "get",
+  });
 }

+ 27 - 19
fdapfe-ui/src/api/model/faultDiagnosis.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询故障诊断算法模型管理列表
 export function listFaultDiagnosis(query) {
   return request({
-    url: '/model/faultDiagnosis/list',
-    method: 'get',
-    params: query
-  })
+    url: "/model/faultDiagnosis/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询故障诊断算法模型管理详细
 export function getFaultDiagnosis(id) {
   return request({
-    url: '/model/faultDiagnosis/' + id,
-    method: 'get'
-  })
+    url: "/model/faultDiagnosis/" + id,
+    method: "get",
+  });
 }
 
 // 新增故障诊断算法模型管理
 export function addFaultDiagnosis(data) {
   return request({
-    url: '/model/faultDiagnosis',
-    method: 'post',
-    data: data
-  })
+    url: "/model/faultDiagnosis",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改故障诊断算法模型管理
 export function updateFaultDiagnosis(data) {
   return request({
-    url: '/model/faultDiagnosis',
-    method: 'put',
-    data: data
-  })
+    url: "/model/faultDiagnosis",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除故障诊断算法模型管理
 export function delFaultDiagnosis(id) {
   return request({
-    url: '/model/faultDiagnosis/' + id,
-    method: 'delete'
-  })
+    url: "/model/faultDiagnosis/" + id,
+    method: "delete",
+  });
+}
+
+// 故障诊断算法模型getOptions
+export function getFaultDiagnosisOptions() {
+  return request({
+    url: "/model/faultDiagnosis/getOptions",
+    method: "get",
+  });
 }

+ 27 - 19
fdapfe-ui/src/api/model/faultPhysical.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询故障物理模型管理列表
 export function listFaultPhysical(query) {
   return request({
-    url: '/model/faultPhysical/list',
-    method: 'get',
-    params: query
-  })
+    url: "/model/faultPhysical/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询故障物理模型管理详细
 export function getFaultPhysical(id) {
   return request({
-    url: '/model/faultPhysical/' + id,
-    method: 'get'
-  })
+    url: "/model/faultPhysical/" + id,
+    method: "get",
+  });
 }
 
 // 新增故障物理模型管理
 export function addFaultPhysical(data) {
   return request({
-    url: '/model/faultPhysical',
-    method: 'post',
-    data: data
-  })
+    url: "/model/faultPhysical",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改故障物理模型管理
 export function updateFaultPhysical(data) {
   return request({
-    url: '/model/faultPhysical',
-    method: 'put',
-    data: data
-  })
+    url: "/model/faultPhysical",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除故障物理模型管理
 export function delFaultPhysical(id) {
   return request({
-    url: '/model/faultPhysical/' + id,
-    method: 'delete'
-  })
+    url: "/model/faultPhysical/" + id,
+    method: "delete",
+  });
+}
+
+// 故障故障物理模型getOptions
+export function getFaultPhysicalOptions() {
+  return request({
+    url: "/model/faultPhysical/getOptions",
+    method: "get",
+  });
 }

+ 8 - 0
fdapfe-ui/src/api/test/ddAlgorithm.js

@@ -50,3 +50,11 @@ export function verify(id) {
     method: "put",
   });
 }
+
+// 故障故障诊断算法功能验证getOptions
+export function getDdAlgorithmOptions() {
+  return request({
+    url: "/test/ddAlgorithm/getOptions",
+    method: "get",
+  });
+}

+ 27 - 19
fdapfe-ui/src/api/test/perf.js

@@ -1,44 +1,52 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询算法性能评估列表
 export function listPerf(query) {
   return request({
-    url: '/test/perf/list',
-    method: 'get',
-    params: query
-  })
+    url: "/test/perf/list",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询算法性能评估详细
 export function getPerf(id) {
   return request({
-    url: '/test/perf/' + id,
-    method: 'get'
-  })
+    url: "/test/perf/" + id,
+    method: "get",
+  });
 }
 
 // 新增算法性能评估
 export function addPerf(data) {
   return request({
-    url: '/test/perf',
-    method: 'post',
-    data: data
-  })
+    url: "/test/perf",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改算法性能评估
 export function updatePerf(data) {
   return request({
-    url: '/test/perf',
-    method: 'put',
-    data: data
-  })
+    url: "/test/perf",
+    method: "put",
+    data: data,
+  });
 }
 
 // 删除算法性能评估
 export function delPerf(id) {
   return request({
-    url: '/test/perf/' + id,
-    method: 'delete'
-  })
+    url: "/test/perf/" + id,
+    method: "delete",
+  });
+}
+
+// 运行算法性能评估
+export function run(id) {
+  return request({
+    url: `/test/perf/run/${id}`,
+    method: "put",
+  });
 }

+ 104 - 44
fdapfe-ui/src/views/data/data/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="数据名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,7 +17,11 @@
         />
       </el-form-item>
       <el-form-item label="数据类型" prop="type">
-        <el-select v-model="queryParams.type" placeholder="请选择数据类型" clearable>
+        <el-select
+          v-model="queryParams.type"
+          placeholder="请选择数据类型"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.data_type"
             :key="dict.value"
@@ -20,8 +31,16 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -34,7 +53,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['data:data:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -45,7 +65,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['data:data:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -56,7 +77,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['data:data:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -66,23 +88,35 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['data:data:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="dataList"
+      @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="type">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.data_type" :value="scope.row.type"/>
+          <dict-tag :options="dict.type.data_type" :value="scope.row.type" />
         </template>
       </el-table-column>
       <el-table-column label="文件路径" align="center" prop="filePath" />
       <el-table-column label="说明" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -90,20 +124,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['data:data:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['data:data:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -111,7 +147,13 @@
     />
 
     <!-- 添加或修改数据管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="数据名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入数据名称" />
@@ -127,10 +169,14 @@
           </el-select>
         </el-form-item>
         <el-form-item label="文件路径" prop="filePath">
-          <el-input v-model="form.filePath" placeholder="请输入文件路径" />
+          <file-upload v-model="form.filePath" :fileType="uploadFileType" />
         </el-form-item>
         <el-form-item label="说明" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -142,11 +188,17 @@
 </template>
 
 <script>
-import { listData, getData, delData, addData, updateData } from "@/api/data/data";
+import {
+  listData,
+  getData,
+  delData,
+  addData,
+  updateData,
+} from "@/api/data/data";
 
 export default {
   name: "Data",
-  dicts: ['data_type'],
+  dicts: ["data_type"],
   data() {
     return {
       // 遮罩层
@@ -177,8 +229,8 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
+      uploadFileType: ["csv", "xls", "xlsx"],
     };
   },
   created() {
@@ -188,7 +240,7 @@ export default {
     /** 查询数据管理列表 */
     getList() {
       this.loading = true;
-      listData(this.queryParams).then(response => {
+      listData(this.queryParams).then((response) => {
         this.dataList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -210,7 +262,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -226,9 +278,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -239,8 +291,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getData(id).then(response => {
+      const id = row.id || this.ids;
+      getData(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改数据管理";
@@ -248,16 +300,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateData(this.form).then(response => {
+            updateData(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addData(this.form).then(response => {
+            addData(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -269,19 +321,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除数据管理编号为"' + ids + '"的数据项?').then(function() {
-        return delData(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除数据管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delData(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('data/data/export', {
-        ...this.queryParams
-      }, `data_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "data/data/export",
+        {
+          ...this.queryParams,
+        },
+        `data_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 167 - 58
fdapfe-ui/src/views/dataGen/phyModel/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="数据生成名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,24 +17,36 @@
         />
       </el-form-item>
       <el-form-item label="开始时间" prop="startTime">
-        <el-date-picker clearable
+        <el-date-picker
+          clearable
           v-model="queryParams.startTime"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="请选择开始时间">
+          placeholder="请选择开始时间"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item label="结束时间" prop="endTime">
-        <el-date-picker clearable
+        <el-date-picker
+          clearable
           v-model="queryParams.endTime"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="请选择结束时间">
+          placeholder="请选择结束时间"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -40,7 +59,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['dataGen:phyModel:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -51,7 +71,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['dataGen:phyModel:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -62,7 +83,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['dataGen:phyModel:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -72,31 +94,53 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['dataGen:phyModel:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="phyModelList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="phyModelList"
+      @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="modelId" />
       <el-table-column label="参数" align="center" prop="bizParams" />
-      <el-table-column label="数据id" align="center" prop="dataId" />
+      <el-table-column label="数据" align="center" prop="dataId" />
       <el-table-column label="状态" align="center" prop="status" />
-      <el-table-column label="开始时间" align="center" prop="startTime" width="180">
+      <el-table-column
+        label="开始时间"
+        align="center"
+        prop="startTime"
+        width="180"
+      >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="结束时间" align="center" prop="endTime" width="180">
+      <el-table-column
+        label="结束时间"
+        align="center"
+        prop="endTime"
+        width="180"
+      >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</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">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -104,20 +148,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['dataGen:phyModel:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['dataGen:phyModel:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -125,38 +171,72 @@
     />
 
     <!-- 添加或修改物理模型数据生成管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="数据生成名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入数据生成名称" />
         </el-form-item>
         <el-form-item label="数据生成模型" prop="modelId">
-          <el-input v-model="form.modelId" placeholder="请输入数据生成模型" />
+          <el-select v-model="form.modelId" placeholder="请选择数据">
+            <el-option
+              v-for="item in faultPhysicalOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="参数" prop="bizParams">
-          <el-input v-model="form.bizParams" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.bizParams"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
-        <el-form-item label="数据id" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请输入数据id" />
+        <el-form-item label="数据" prop="dataId">
+          <el-select v-model="form.dataId" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="开始时间" prop="startTime">
-          <el-date-picker clearable
+          <el-date-picker
+            clearable
             v-model="form.startTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择开始时间">
+            placeholder="请选择开始时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="结束时间" prop="endTime">
-          <el-date-picker clearable
+          <el-date-picker
+            clearable
             v-model="form.endTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择结束时间">
+            placeholder="请选择结束时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="说明" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -168,8 +248,16 @@
 </template>
 
 <script>
-import { listPhyModel, getPhyModel, delPhyModel, addPhyModel, updatePhyModel } from "@/api/dataGen/phyModel";
+import {
+  listPhyModel,
+  getPhyModel,
+  delPhyModel,
+  addPhyModel,
+  updatePhyModel,
+} from "@/api/dataGen/phyModel";
 
+import { getDataOptions } from "@/api/data/data";
+import { getFaultPhysicalOptions } from "@/api/model/faultPhysical";
 export default {
   name: "PhyModel",
   data() {
@@ -204,23 +292,34 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
+      // 数据Optipons
+      dataOptions: [],
+      faultPhysicalOptions: [],
     };
   },
   created() {
     this.getList();
+    this.getOption();
   },
   methods: {
     /** 查询物理模型数据生成管理列表 */
     getList() {
       this.loading = true;
-      listPhyModel(this.queryParams).then(response => {
+      listPhyModel(this.queryParams).then((response) => {
         this.phyModelList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
     },
+    getOption() {
+      getDataOptions().then((resp) => {
+        this.dataOptions = resp.data;
+      });
+      getFaultPhysicalOptions().then((resp) => {
+        this.faultPhysicalOptions = resp.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -241,7 +340,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -257,9 +356,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -270,8 +369,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getPhyModel(id).then(response => {
+      const id = row.id || this.ids;
+      getPhyModel(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改物理模型数据生成管理";
@@ -279,16 +378,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updatePhyModel(this.form).then(response => {
+            updatePhyModel(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addPhyModel(this.form).then(response => {
+            addPhyModel(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -300,19 +399,29 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除物理模型数据生成管理编号为"' + ids + '"的数据项?').then(function() {
-        return delPhyModel(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm(
+          '是否确认删除物理模型数据生成管理编号为"' + ids + '"的数据项?'
+        )
+        .then(function () {
+          return delPhyModel(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('dataGen/phyModel/export', {
-        ...this.queryParams
-      }, `phyModel_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "dataGen/phyModel/export",
+        {
+          ...this.queryParams,
+        },
+        `phyModel_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 196 - 65
fdapfe-ui/src/views/dataGen/phyNoise/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="数据生成名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,7 +17,11 @@
         />
       </el-form-item>
       <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择状态"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.sys_job_status"
             :key="dict.value"
@@ -20,24 +31,36 @@
         </el-select>
       </el-form-item>
       <el-form-item label="开始时间" prop="startTime">
-        <el-date-picker clearable
+        <el-date-picker
+          clearable
           v-model="queryParams.startTime"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="请选择开始时间">
+          placeholder="请选择开始时间"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item label="结束时间" prop="endTime">
-        <el-date-picker clearable
+        <el-date-picker
+          clearable
           v-model="queryParams.endTime"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="请选择结束时间">
+          placeholder="请选择结束时间"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -50,7 +73,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['dataGen:phyNoise:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -61,7 +85,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['dataGen:phyNoise:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -72,7 +97,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['dataGen:phyNoise:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -82,36 +108,65 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['dataGen:phyNoise:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="phyNoiseList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="phyNoiseList"
+      @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="modelId" />
       <el-table-column label="参数" align="center" prop="bizParams" />
-      <el-table-column label="原始数据id" align="center" prop="originalDataId" />
-      <el-table-column label="生成后数据id" align="center" prop="generatedDataId" />
+      <el-table-column label="原始数据" align="center" prop="originalDataId" />
+      <el-table-column
+        label="生成后数据"
+        align="center"
+        prop="generatedDataId"
+      />
       <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/>
+          <dict-tag
+            :options="dict.type.sys_job_status"
+            :value="scope.row.status"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="开始时间" align="center" prop="startTime" width="180">
+      <el-table-column
+        label="开始时间"
+        align="center"
+        prop="startTime"
+        width="180"
+      >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="结束时间" align="center" prop="endTime" width="180">
+      <el-table-column
+        label="结束时间"
+        align="center"
+        prop="endTime"
+        width="180"
+      >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</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">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -119,20 +174,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['dataGen:phyNoise:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['dataGen:phyNoise:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -140,22 +197,59 @@
     />
 
     <!-- 添加或修改噪声数据生成管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="数据生成名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入数据生成名称" />
         </el-form-item>
         <el-form-item label="数据生成模型" prop="modelId">
-          <el-input v-model="form.modelId" placeholder="请输入数据生成模型" />
+          <el-select v-model="form.modelId" placeholder="请选择数据">
+            <el-option
+              v-for="item in faultPhysicalOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="参数" prop="bizParams">
-          <el-input v-model="form.bizParams" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.bizParams"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
-        <el-form-item label="原始数据id" prop="originalDataId">
-          <el-input v-model="form.originalDataId" placeholder="请输入原始数据id" />
+        <el-form-item label="原始数据" prop="originalDataId">
+          <el-select v-model="form.originalDataId" placeholder="请选择原始数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="生成后数据id" prop="generatedDataId">
-          <el-input v-model="form.generatedDataId" placeholder="请输入生成后数据id" />
+        <el-form-item label="生成后数据" prop="generatedDataId">
+          <el-select
+            v-model="form.generatedDataId"
+            placeholder="请选择生成后数据"
+          >
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-radio-group v-model="form.status">
@@ -163,27 +257,36 @@
               v-for="dict in dict.type.sys_job_status"
               :key="dict.value"
               :label="dict.value"
-            >{{dict.label}}</el-radio>
+              >{{ dict.label }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
         <el-form-item label="开始时间" prop="startTime">
-          <el-date-picker clearable
+          <el-date-picker
+            clearable
             v-model="form.startTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择开始时间">
+            placeholder="请选择开始时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="结束时间" prop="endTime">
-          <el-date-picker clearable
+          <el-date-picker
+            clearable
             v-model="form.endTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择结束时间">
+            placeholder="请选择结束时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="说明" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -195,11 +298,20 @@
 </template>
 
 <script>
-import { listPhyNoise, getPhyNoise, delPhyNoise, addPhyNoise, updatePhyNoise } from "@/api/dataGen/phyNoise";
+import {
+  listPhyNoise,
+  getPhyNoise,
+  delPhyNoise,
+  addPhyNoise,
+  updatePhyNoise,
+} from "@/api/dataGen/phyNoise";
+
+import { getDataOptions } from "@/api/data/data";
+import { getFaultPhysicalOptions } from "@/api/model/faultPhysical";
 
 export default {
   name: "PhyNoise",
-  dicts: ['sys_job_status'],
+  dicts: ["sys_job_status"],
   data() {
     return {
       // 遮罩层
@@ -233,23 +345,34 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
+      // 数据Optipons
+      dataOptions: [],
+      faultPhysicalOptions: [],
     };
   },
   created() {
     this.getList();
+    this.getOption();
   },
   methods: {
     /** 查询噪声数据生成管理列表 */
     getList() {
       this.loading = true;
-      listPhyNoise(this.queryParams).then(response => {
+      listPhyNoise(this.queryParams).then((response) => {
         this.phyNoiseList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
     },
+    getOption() {
+      getDataOptions().then((resp) => {
+        this.dataOptions = resp.data;
+      });
+      getFaultPhysicalOptions().then((resp) => {
+        this.faultPhysicalOptions = resp.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -271,7 +394,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -287,9 +410,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -300,8 +423,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getPhyNoise(id).then(response => {
+      const id = row.id || this.ids;
+      getPhyNoise(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改噪声数据生成管理";
@@ -309,16 +432,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updatePhyNoise(this.form).then(response => {
+            updatePhyNoise(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addPhyNoise(this.form).then(response => {
+            addPhyNoise(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -330,19 +453,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除噪声数据生成管理编号为"' + ids + '"的数据项?').then(function() {
-        return delPhyNoise(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除噪声数据生成管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delPhyNoise(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('dataGen/phyNoise/export', {
-        ...this.queryParams
-      }, `phyNoise_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "dataGen/phyNoise/export",
+        {
+          ...this.queryParams,
+        },
+        `phyNoise_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 47 - 20
fdapfe-ui/src/views/dataGen/test/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="80px"
+      label-width="100px"
     >
       <el-form-item label="数据生成名称" prop="name">
         <el-input
@@ -113,13 +113,9 @@
       <el-table-column label="数据生成名称" align="center" prop="name" />
       <el-table-column label="数据生成模型" align="center" prop="modelId" />
       <el-table-column label="参数" align="center" prop="bizParams" />
+      <el-table-column label="原始数据" align="center" prop="originalDataIds" />
       <el-table-column
-        label="原始数据ids"
-        align="center"
-        prop="originalDataIds"
-      />
-      <el-table-column
-        label="生成后数据id"
+        label="生成后数据"
         align="center"
         prop="generatedDataId"
       />
@@ -187,12 +183,20 @@
       :close-on-click-modal="false"
       append-to-body
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="数据生成名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入数据生成名称" />
         </el-form-item>
         <el-form-item label="数据生成模型" prop="modelId">
-          <el-input v-model="form.modelId" placeholder="请输入数据生成模型" />
+          <el-select v-model="form.modelId" placeholder="请选择数据">
+            <el-option
+              v-for="item in faultPhysicalOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="参数" prop="bizParams">
           <el-input
@@ -201,17 +205,27 @@
             placeholder="请输入内容"
           />
         </el-form-item>
-        <el-form-item label="原始数据ids" prop="originalDataIds">
-          <el-input
-            v-model="form.originalDataIds"
-            placeholder="请输入原始数据ids"
-          />
+        <el-form-item label="原始数据" prop="originalDataIds">
+          <el-select v-model="form.originalDataIds" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="生成后数据id" prop="generatedDataId">
-          <el-input
-            v-model="form.generatedDataId"
-            placeholder="请输入生成后数据id"
-          />
+        <el-form-item label="生成后数据" prop="generatedDataId">
+          <el-select v-model="form.generatedDataId" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="开始时间" prop="startTime">
           <el-date-picker
@@ -257,7 +271,8 @@ import {
   addTest,
   updateTest,
 } from "@/api/dataGen/test";
-
+import { getDataOptions } from "@/api/data/data";
+import { getFaultPhysicalOptions } from "@/api/model/faultPhysical";
 export default {
   name: "Test",
   data() {
@@ -294,10 +309,14 @@ export default {
       form: {},
       // 表单校验
       rules: {},
+      // 数据Optipons
+      dataOptions: [],
+      faultPhysicalOptions: [],
     };
   },
   created() {
     this.getList();
+    this.getOption();
   },
   methods: {
     /** 查询测试数据生成管理列表 */
@@ -309,6 +328,14 @@ export default {
         this.loading = false;
       });
     },
+    getOption() {
+      getDataOptions().then((resp) => {
+        this.dataOptions = resp.data;
+      });
+      getFaultPhysicalOptions().then((resp) => {
+        this.faultPhysicalOptions = resp.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;

+ 101 - 42
fdapfe-ui/src/views/eval/indicator/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="评估体系名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,8 +17,16 @@
         />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -24,7 +39,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['eval:indicator:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -35,7 +51,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['eval:indicator:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -46,7 +63,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['eval:indicator:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -56,18 +74,30 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['eval:indicator:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="indicatorList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="indicatorList"
+      @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" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -75,20 +105,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['eval:indicator:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['eval:indicator:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -96,16 +128,30 @@
     />
 
     <!-- 添加或修改评估指标体系管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="评估体系名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入评估体系名称" />
         </el-form-item>
         <el-form-item label="评估体系参数" prop="bizParams">
-          <el-input v-model="form.bizParams" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.bizParams"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
         <el-form-item label="说明" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -117,7 +163,13 @@
 </template>
 
 <script>
-import { listIndicator, getIndicator, delIndicator, addIndicator, updateIndicator } from "@/api/eval/indicator";
+import {
+  listIndicator,
+  getIndicator,
+  delIndicator,
+  addIndicator,
+  updateIndicator,
+} from "@/api/eval/indicator";
 
 export default {
   name: "Indicator",
@@ -151,8 +203,7 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
   },
   created() {
@@ -162,7 +213,7 @@ export default {
     /** 查询评估指标体系管理列表 */
     getList() {
       this.loading = true;
-      listIndicator(this.queryParams).then(response => {
+      listIndicator(this.queryParams).then((response) => {
         this.indicatorList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -183,7 +234,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -199,9 +250,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -212,8 +263,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getIndicator(id).then(response => {
+      const id = row.id || this.ids;
+      getIndicator(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改评估指标体系管理";
@@ -221,16 +272,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateIndicator(this.form).then(response => {
+            updateIndicator(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addIndicator(this.form).then(response => {
+            addIndicator(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -242,19 +293,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除评估指标体系管理编号为"' + ids + '"的数据项?').then(function() {
-        return delIndicator(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除评估指标体系管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delIndicator(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('eval/indicator/export', {
-        ...this.queryParams
-      }, `indicator_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "eval/indicator/export",
+        {
+          ...this.queryParams,
+        },
+        `indicator_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 71 - 39
fdapfe-ui/src/views/login.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="login">
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">故障诊断算法模型性能和功能评估平台</h3>
+    <el-form
+      ref="loginForm"
+      :model="loginForm"
+      :rules="loginRules"
+      class="login-form"
+    >
+      <h3 class="title">故障诊断专家知识系统验证与评估平台</h3>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -9,7 +14,11 @@
           auto-complete="off"
           placeholder="账号"
         >
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+          <svg-icon
+            slot="prefix"
+            icon-class="user"
+            class="el-input__icon input-icon"
+          />
         </el-input>
       </el-form-item>
       <el-form-item prop="password">
@@ -20,7 +29,11 @@
           placeholder="密码"
           @keyup.enter.native="handleLogin"
         >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          <svg-icon
+            slot="prefix"
+            icon-class="password"
+            class="el-input__icon input-icon"
+          />
         </el-input>
       </el-form-item>
       <el-form-item prop="code" v-if="captchaEnabled">
@@ -31,26 +44,36 @@
           style="width: 63%"
           @keyup.enter.native="handleLogin"
         >
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+          <svg-icon
+            slot="prefix"
+            icon-class="validCode"
+            class="el-input__icon input-icon"
+          />
         </el-input>
         <div class="login-code">
-          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
+          <img :src="codeUrl" @click="getCode" class="login-code-img" />
         </div>
       </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
-      <el-form-item style="width:100%;">
+      <el-checkbox
+        v-model="loginForm.rememberMe"
+        style="margin: 0px 0px 25px 0px"
+        >记住密码</el-checkbox
+      >
+      <el-form-item style="width: 100%">
         <el-button
           :loading="loading"
           size="medium"
           type="primary"
-          style="width:100%;"
+          style="width: 100%"
           @click.native.prevent="handleLogin"
         >
           <span v-if="!loading">登 录</span>
           <span v-else>登 录 中...</span>
         </el-button>
-        <div style="float: right;" v-if="register">
-          <router-link class="link-type" :to="'/register'">立即注册</router-link>
+        <div style="float: right" v-if="register">
+          <router-link class="link-type" :to="'/register'"
+            >立即注册</router-link
+          >
         </div>
       </el-form-item>
     </el-form>
@@ -64,7 +87,7 @@
 <script>
 import { getCodeImg } from "@/api/login";
 import Cookies from "js-cookie";
-import { encrypt, decrypt } from '@/utils/jsencrypt'
+import { encrypt, decrypt } from "@/utils/jsencrypt";
 
 export default {
   name: "Login",
@@ -76,32 +99,32 @@ export default {
         password: "admin123",
         rememberMe: false,
         code: "",
-        uuid: ""
+        uuid: "",
       },
       loginRules: {
         username: [
-          { required: true, trigger: "blur", message: "请输入您的账号" }
+          { required: true, trigger: "blur", message: "请输入您的账号" },
         ],
         password: [
-          { required: true, trigger: "blur", message: "请输入您的密码" }
+          { required: true, trigger: "blur", message: "请输入您的密码" },
         ],
-        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }],
       },
       loading: false,
       // 验证码开关
       captchaEnabled: true,
       // 注册开关
       register: false,
-      redirect: undefined
+      redirect: undefined,
     };
   },
   watch: {
     $route: {
-      handler: function(route) {
+      handler: function (route) {
         this.redirect = route.query && route.query.redirect;
       },
-      immediate: true
-    }
+      immediate: true,
+    },
   },
   created() {
     this.getCode();
@@ -109,8 +132,9 @@ export default {
   },
   methods: {
     getCode() {
-      getCodeImg().then(res => {
-        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+      getCodeImg().then((res) => {
+        this.captchaEnabled =
+          res.captchaEnabled === undefined ? true : res.captchaEnabled;
         if (this.captchaEnabled) {
           this.codeUrl = "data:image/gif;base64," + res.img;
           this.loginForm.uuid = res.uuid;
@@ -120,38 +144,46 @@ export default {
     getCookie() {
       const username = Cookies.get("username");
       const password = Cookies.get("password");
-      const rememberMe = Cookies.get('rememberMe')
+      const rememberMe = Cookies.get("rememberMe");
       this.loginForm = {
         username: username === undefined ? this.loginForm.username : username,
-        password: password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
+        password:
+          password === undefined ? this.loginForm.password : decrypt(password),
+        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
       };
     },
     handleLogin() {
-      this.$refs.loginForm.validate(valid => {
+      this.$refs.loginForm.validate((valid) => {
         if (valid) {
           this.loading = true;
           if (this.loginForm.rememberMe) {
             Cookies.set("username", this.loginForm.username, { expires: 30 });
-            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
-            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
+            Cookies.set("password", encrypt(this.loginForm.password), {
+              expires: 30,
+            });
+            Cookies.set("rememberMe", this.loginForm.rememberMe, {
+              expires: 30,
+            });
           } else {
             Cookies.remove("username");
             Cookies.remove("password");
-            Cookies.remove('rememberMe');
+            Cookies.remove("rememberMe");
           }
-          this.$store.dispatch("Login", this.loginForm).then(() => {
-            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
-          }).catch(() => {
-            this.loading = false;
-            if (this.captchaEnabled) {
-              this.getCode();
-            }
-          });
+          this.$store
+            .dispatch("Login", this.loginForm)
+            .then(() => {
+              this.$router.push({ path: this.redirect || "/" }).catch(() => {});
+            })
+            .catch(() => {
+              this.loading = false;
+              if (this.captchaEnabled) {
+                this.getCode();
+              }
+            });
         }
       });
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 120 - 56
fdapfe-ui/src/views/model/faultDiagnosis/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="故障模型名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,26 +17,30 @@
         />
       </el-form-item>
       <el-form-item label="故障模型类型" prop="type">
-        <el-select v-model="queryParams.type" placeholder="请选择故障模型类型" clearable>
+        <el-select
+          v-model="queryParams.type"
+          placeholder="请选择故障模型类型"
+          clearable
+        >
           <el-option
-            v-for="dict in dict.type.data_type"
+            v-for="dict in dict.type.biz_model_type"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="故障模型接口地址" prop="path">
-        <el-input
-          v-model="queryParams.path"
-          placeholder="请输入故障模型接口地址"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -42,7 +53,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['model:faultDiagnosis:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -53,7 +65,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['model:faultDiagnosis:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -64,7 +77,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['model:faultDiagnosis:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -74,24 +88,43 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['model:faultDiagnosis:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="faultDiagnosisList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="faultDiagnosisList"
+      @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="type">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.data_type" :value="scope.row.type"/>
+          <dict-tag
+            :options="dict.type.biz_model_type"
+            :value="scope.row.type"
+          />
         </template>
       </el-table-column>
       <el-table-column label="故障模型接口地址" align="center" prop="path" />
-      <el-table-column label="故障模型参数参数" align="center" prop="bizParams" />
+      <el-table-column
+        label="故障模型参数参数"
+        align="center"
+        prop="bizParams"
+      />
       <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -99,20 +132,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['model:faultDiagnosis:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['model:faultDiagnosis:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -120,15 +155,21 @@
     />
 
     <!-- 添加或修改故障诊断算法模型管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="700px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="故障模型名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入故障模型名称" />
         </el-form-item>
         <el-form-item label="故障模型类型" prop="type">
           <el-select v-model="form.type" placeholder="请选择故障模型类型">
             <el-option
-              v-for="dict in dict.type.data_type"
+              v-for="dict in dict.type.biz_model_type"
               :key="dict.value"
               :label="dict.label"
               :value="dict.value"
@@ -139,10 +180,18 @@
           <el-input v-model="form.path" placeholder="请输入故障模型接口地址" />
         </el-form-item>
         <el-form-item label="故障模型参数参数" prop="bizParams">
-          <el-input v-model="form.bizParams" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.bizParams"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -154,11 +203,17 @@
 </template>
 
 <script>
-import { listFaultDiagnosis, getFaultDiagnosis, delFaultDiagnosis, addFaultDiagnosis, updateFaultDiagnosis } from "@/api/model/faultDiagnosis";
+import {
+  listFaultDiagnosis,
+  getFaultDiagnosis,
+  delFaultDiagnosis,
+  addFaultDiagnosis,
+  updateFaultDiagnosis,
+} from "@/api/model/faultDiagnosis";
 
 export default {
   name: "FaultDiagnosis",
-  dicts: ['data_type'],
+  dicts: ["biz_model_type"],
   data() {
     return {
       // 遮罩层
@@ -190,8 +245,7 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
   },
   created() {
@@ -201,7 +255,7 @@ export default {
     /** 查询故障诊断算法模型管理列表 */
     getList() {
       this.loading = true;
-      listFaultDiagnosis(this.queryParams).then(response => {
+      listFaultDiagnosis(this.queryParams).then((response) => {
         this.faultDiagnosisList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -224,7 +278,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -240,9 +294,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -253,8 +307,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getFaultDiagnosis(id).then(response => {
+      const id = row.id || this.ids;
+      getFaultDiagnosis(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改故障诊断算法模型管理";
@@ -262,16 +316,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateFaultDiagnosis(this.form).then(response => {
+            updateFaultDiagnosis(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addFaultDiagnosis(this.form).then(response => {
+            addFaultDiagnosis(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -283,19 +337,29 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除故障诊断算法模型管理编号为"' + ids + '"的数据项?').then(function() {
-        return delFaultDiagnosis(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm(
+          '是否确认删除故障诊断算法模型管理编号为"' + ids + '"的数据项?'
+        )
+        .then(function () {
+          return delFaultDiagnosis(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('model/faultDiagnosis/export', {
-        ...this.queryParams
-      }, `faultDiagnosis_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "model/faultDiagnosis/export",
+        {
+          ...this.queryParams,
+        },
+        `faultDiagnosis_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 118 - 56
fdapfe-ui/src/views/model/faultPhysical/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="故障模型名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -10,26 +17,30 @@
         />
       </el-form-item>
       <el-form-item label="故障模型类型" prop="type">
-        <el-select v-model="queryParams.type" placeholder="请选择故障模型类型" clearable>
+        <el-select
+          v-model="queryParams.type"
+          placeholder="请选择故障模型类型"
+          clearable
+        >
           <el-option
-            v-for="dict in dict.type.data_type"
+            v-for="dict in dict.type.biz_model_type"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="故障模型接口地址" prop="path">
-        <el-input
-          v-model="queryParams.path"
-          placeholder="请输入故障模型接口地址"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -42,7 +53,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['model:faultPhysical:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -53,7 +65,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['model:faultPhysical:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -64,7 +77,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['model:faultPhysical:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -74,24 +88,43 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['model:faultPhysical:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="faultPhysicalList" @selection-change="handleSelectionChange">
+    <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="id" />
       <el-table-column label="故障模型名称" align="center" prop="name" />
       <el-table-column label="故障模型类型" align="center" prop="type">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.data_type" :value="scope.row.type"/>
+          <dict-tag
+            :options="dict.type.biz_model_type"
+            :value="scope.row.type"
+          />
         </template>
       </el-table-column>
       <el-table-column label="故障模型接口地址" align="center" prop="path" />
-      <el-table-column label="故障模型参数参数" align="center" prop="bizParams" />
+      <el-table-column
+        label="故障模型参数参数"
+        align="center"
+        prop="bizParams"
+      />
       <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -99,20 +132,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['model:faultPhysical:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['model:faultPhysical:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -120,15 +155,21 @@
     />
 
     <!-- 添加或修改故障物理模型管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="700px"
+      :close-on-click-modal="false"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="故障模型名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入故障模型名称" />
         </el-form-item>
         <el-form-item label="故障模型类型" prop="type">
           <el-select v-model="form.type" placeholder="请选择故障模型类型">
             <el-option
-              v-for="dict in dict.type.data_type"
+              v-for="dict in dict.type.biz_model_type"
               :key="dict.value"
               :label="dict.label"
               :value="dict.value"
@@ -139,10 +180,18 @@
           <el-input v-model="form.path" placeholder="请输入故障模型接口地址" />
         </el-form-item>
         <el-form-item label="故障模型参数参数" prop="bizParams">
-          <el-input v-model="form.bizParams" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.bizParams"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -154,11 +203,17 @@
 </template>
 
 <script>
-import { listFaultPhysical, getFaultPhysical, delFaultPhysical, addFaultPhysical, updateFaultPhysical } from "@/api/model/faultPhysical";
+import {
+  listFaultPhysical,
+  getFaultPhysical,
+  delFaultPhysical,
+  addFaultPhysical,
+  updateFaultPhysical,
+} from "@/api/model/faultPhysical";
 
 export default {
   name: "FaultPhysical",
-  dicts: ['data_type'],
+  dicts: ["biz_model_type"],
   data() {
     return {
       // 遮罩层
@@ -191,8 +246,7 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
   },
   created() {
@@ -202,7 +256,7 @@ export default {
     /** 查询故障物理模型管理列表 */
     getList() {
       this.loading = true;
-      listFaultPhysical(this.queryParams).then(response => {
+      listFaultPhysical(this.queryParams).then((response) => {
         this.faultPhysicalList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -225,7 +279,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -241,9 +295,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -254,8 +308,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getFaultPhysical(id).then(response => {
+      const id = row.id || this.ids;
+      getFaultPhysical(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改故障物理模型管理";
@@ -263,16 +317,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateFaultPhysical(this.form).then(response => {
+            updateFaultPhysical(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addFaultPhysical(this.form).then(response => {
+            addFaultPhysical(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -284,19 +338,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除故障物理模型管理编号为"' + ids + '"的数据项?').then(function() {
-        return delFaultPhysical(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除故障物理模型管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delFaultPhysical(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('model/faultPhysical/export', {
-        ...this.queryParams
-      }, `faultPhysical_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "model/faultPhysical/export",
+        {
+          ...this.queryParams,
+        },
+        `faultPhysical_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 43 - 16
fdapfe-ui/src/views/test/ddAlgorithm/index.vue

@@ -8,10 +8,10 @@
       v-show="showSearch"
       label-width="100px"
     >
-      <el-form-item label="故障诊断名称" prop="name">
+      <el-form-item label="任务名称" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入故障诊断名称"
+          placeholder="请输入任务名称"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -126,7 +126,7 @@
     >
       <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="name" />
       <el-table-column label="模型" align="center" prop="modelId" />
       <el-table-column label="数据" align="center" prop="dataId" />
       <el-table-column label="实际标签" align="center" prop="truthLabels" />
@@ -194,7 +194,7 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改故障诊断算法功能验证对话框 -->
+    <!-- 添加或修改功能验证对话框 -->
     <el-dialog
       :title="title"
       :visible.sync="open"
@@ -203,14 +203,30 @@
       append-to-body
     >
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="故障诊断名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入故障诊断名称" />
+        <el-form-item label="任务名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入任务名称" />
         </el-form-item>
         <el-form-item label="模型" prop="modelId">
-          <el-input v-model="form.modelId" placeholder="请输入模型" />
+          <el-select v-model="form.modelId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请输入数据" />
+          <el-select v-model="form.dataId" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
@@ -263,7 +279,8 @@ import {
   addDdAlgorithm,
   updateDdAlgorithm,
 } from "@/api/test/ddAlgorithm";
-
+import { getDataOptions } from "@/api/data/data";
+import { getFaultDiagnosisOptions } from "@/api/model/faultDiagnosis";
 export default {
   name: "DdAlgorithm",
   data() {
@@ -280,7 +297,7 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
-      // 故障诊断算法功能验证表格数据
+      // 功能验证表格数据
       ddAlgorithmList: [],
       // 弹出层标题
       title: "",
@@ -300,13 +317,17 @@ export default {
       form: {},
       // 表单校验
       rules: {},
+      // 数据Optipons
+      dataOptions: [],
+      faultDiagnosisOptions: [],
     };
   },
   created() {
     this.getList();
+    this.getOption();
   },
   methods: {
-    /** 查询故障诊断算法功能验证列表 */
+    /** 查询功能验证列表 */
     getList() {
       this.loading = true;
       listDdAlgorithm(this.queryParams).then((response) => {
@@ -315,6 +336,14 @@ export default {
         this.loading = false;
       });
     },
+    getOption() {
+      getDataOptions().then((resp) => {
+        this.dataOptions = resp.data;
+      });
+      getFaultDiagnosisOptions().then((resp) => {
+        this.faultDiagnosisOptions = resp.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -359,7 +388,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加故障诊断算法功能验证";
+      this.title = "添加功能验证";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -368,7 +397,7 @@ export default {
       getDdAlgorithm(id).then((response) => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改故障诊断算法功能验证";
+        this.title = "修改功能验证";
       });
     },
     /** 验证*/
@@ -409,9 +438,7 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal
-        .confirm(
-          '是否确认删除故障诊断算法功能验证编号为"' + ids + '"的数据项?'
-        )
+        .confirm('是否确认删除功能验证编号为"' + ids + '"的数据项?')
         .then(function () {
           return delDdAlgorithm(ids);
         })

+ 134 - 94
fdapfe-ui/src/views/test/perf/index.vue

@@ -8,10 +8,10 @@
       v-show="showSearch"
       label-width="100px"
     >
-      <el-form-item label="性能评估名称" prop="name">
+      <el-form-item label="任务名称" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入性能评估名称"
+          placeholder="请输入任务名称"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -30,25 +30,21 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="开始时间" prop="startTime">
-        <el-date-picker
+      <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
+        <el-input
+          v-model="queryParams.fdAlgorithmId"
+          placeholder="请输入故障诊断算法"
           clearable
-          v-model="queryParams.startTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择开始时间"
-        >
-        </el-date-picker>
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
-      <el-form-item label="结束时间" prop="endTime">
-        <el-date-picker
+      <el-form-item label="实际标签" prop="truthLabels">
+        <el-input
+          v-model="queryParams.truthLabels"
+          placeholder="请输入实际标签"
           clearable
-          v-model="queryParams.endTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择结束时间"
-        >
-        </el-date-picker>
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item>
         <el-button
@@ -124,7 +120,7 @@
     >
       <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="name" />
       <el-table-column label="类型" align="center" prop="type">
         <template slot-scope="scope">
           <dict-tag
@@ -133,21 +129,34 @@
           />
         </template>
       </el-table-column>
-      <el-table-column
-        label="评估"
-        align="center"
-        prop="valuationIndicatorId"
-      />
+      <!-- <el-table-column label="循环次数" align="center" prop="loopCount" /> -->
       <el-table-column
         label="故障诊断算法"
         align="center"
         prop="fdAlgorithmId"
       />
-      <el-table-column label="数据" align="center" prop="dataId" />
-      <el-table-column label="参数" align="center" prop="bizParams" />
-      <el-table-column label="文件结果" align="center" prop="resultFilePath" />
+      <el-table-column label="实际标签" align="center" prop="truthLabels" />
+      <el-table-column label="图片结果" align="center" prop="resultImagePath">
+        <template slot-scope="scope">
+          <el-image
+            style="width: 100px; height: 100px"
+            :src="baseUrl + scope.row.resultImagePath"
+            :preview-src-list="baseUrl + scope.row.resultImagePath"
+          >
+          </el-image
+        ></template>
+      </el-table-column>
+      <el-table-column label="文件结果" align="center" prop="resultFilePath">
+        <template slot-scope="scope">
+          <el-image
+            style="width: 100px; height: 100px"
+            :src="baseUrl + scope.row.resultFilePath"
+            :preview-src-list="baseUrl + scope.row.resultFilePath"
+          >
+          </el-image
+        ></template>
+      </el-table-column>
       <el-table-column label="文本结果" align="center" prop="resultText" />
-      <el-table-column label="说明" align="center" prop="remark" />
       <el-table-column
         label="开始时间"
         align="center"
@@ -174,6 +183,14 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-video-play"
+            @click="handleRun(scope.row)"
+            v-hasPermi="['test:ddAlgorithm:edit']"
+            >运行</el-button
+          >
           <el-button
             size="mini"
             type="text"
@@ -217,8 +234,8 @@
         @cancelPerfDetail="cancelPerfDetail"
       ></perfDetail>
       <!--<el-form ref="form" :model="form" :rules="rules" label-width="100px">
-         <el-form-item label="性能评估名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入性能评估名称" />
+         <el-form-item label="任务名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入任务名称" />
         </el-form-item>
         <el-form-item label="类型" prop="type">
           <el-select v-model="form.type" placeholder="请选择类型">
@@ -230,66 +247,68 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="评估" prop="valuationIndicatorId">
-          <el-input
-            v-model="form.valuationIndicatorId"
-            placeholder="请输入评估"
-          />
+        <el-form-item label="循环次数" prop="loopCount">
+          <el-input v-model="form.loopCount" placeholder="请输入循环次数" />
         </el-form-item>
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-input v-model="form.fdAlgorithmId" placeholder="请输入故障诊断算法" />
         </el-form-item>
-        <el-form-item label="数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请输入数据" />
+        <el-form-item label="实际标签" prop="truthLabels">
+          <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
-        <el-form-item label="参数" prop="bizParams">
-          <el-input
-            v-model="form.bizParams"
-            type="textarea"
-            placeholder="请输入内容"
-          />
+        <el-form-item label="物理生成模型" prop="phyModelId">
+          <el-input v-model="form.phyModelId" placeholder="请输入物理生成模型" />
+        </el-form-item>
+        <el-form-item label="物理模型参数" prop="phyParams">
+          <el-input v-model="form.phyParams" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="物理数据" prop="phyDataIds">
+          <el-input v-model="form.phyDataIds" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="噪声生成模型" prop="noseModelId">
+          <el-input v-model="form.noseModelId" placeholder="请输入噪声生成模型" />
+        </el-form-item>
+        <el-form-item label="噪声模型参数" prop="noseParams">
+          <el-input v-model="form.noseParams" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="噪声数据" prop="noseDataIds">
+          <el-input v-model="form.noseDataIds" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="测试生成模型" prop="testModelId">
+          <el-input v-model="form.testModelId" placeholder="请输入测试生成模型" />
+        </el-form-item>
+        <el-form-item label="测试模型参数" prop="testParams">
+          <el-input v-model="form.testParams" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="测试数据" prop="testDataIds">
+          <el-input v-model="form.testDataIds" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="图片结果" prop="resultImagePath">
+          <el-input v-model="form.resultImagePath" placeholder="请输入图片结果" />
         </el-form-item>
         <el-form-item label="文件结果" prop="resultFilePath">
-          <el-input
-            v-model="form.resultFilePath"
-            placeholder="请输入文件结果"
-          />
+          <el-input v-model="form.resultFilePath" placeholder="请输入文件结果" />
         </el-form-item>
         <el-form-item label="文本结果" prop="resultText">
-          <el-input
-            v-model="form.resultText"
-            type="textarea"
-            placeholder="请输入内容"
-          />
+          <el-input v-model="form.resultText" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="说明" prop="remark">
-          <el-input
-            v-model="form.remark"
-            type="textarea"
-            placeholder="请输入内容"
-          />
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="开始时间" prop="startTime">
-          <el-date-picker
-            clearable
+          <el-date-picker clearable
             v-model="form.startTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择开始时间"
-          >
+            placeholder="请选择开始时间">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="结束时间" prop="endTime">
-          <el-date-picker
-            clearable
+          <el-date-picker clearable
             v-model="form.endTime"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择结束时间"
-          >
+            placeholder="请选择结束时间">
           </el-date-picker>
         </el-form-item>
       </el-form>
@@ -308,10 +327,9 @@ import {
   delPerf,
   addPerf,
   updatePerf,
+  run,
 } from "@/api/test/perf";
-
 import perfDetail from "./perfDetail.vue";
-
 export default {
   name: "Perf",
   components: {
@@ -320,6 +338,7 @@ export default {
   dicts: ["biz_perf_eval_type"],
   data() {
     return {
+      baseUrl: process.env.VUE_APP_BASE_API,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -344,8 +363,8 @@ export default {
         pageSize: 10,
         name: null,
         type: null,
-        startTime: null,
-        endTime: null,
+        fdAlgorithmId: null,
+        truthLabels: null,
       },
       // 表单参数
       form: {},
@@ -377,10 +396,19 @@ export default {
         id: null,
         name: null,
         type: null,
-        valuationIndicatorId: null,
+        loopCount: null,
         fdAlgorithmId: null,
-        dataId: null,
-        bizParams: null,
+        truthLabels: null,
+        phyModelId: null,
+        phyParams: null,
+        phyDataIds: null,
+        noseModelId: null,
+        noseParams: null,
+        noseDataIds: null,
+        testModelId: null,
+        testParams: null,
+        testDataIds: null,
+        resultImagePath: null,
         resultFilePath: null,
         resultText: null,
         remark: null,
@@ -427,23 +455,19 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          if (this.form.id != null) {
-            updatePerf(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addPerf(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
+      if (this.form.id != null) {
+        updatePerf(this.form).then((response) => {
+          this.$modal.msgSuccess("修改成功");
+          this.open = false;
+          this.getList();
+        });
+      } else {
+        addPerf(this.form).then((response) => {
+          this.$modal.msgSuccess("新增成功");
+          this.open = false;
+          this.getList();
+        });
+      }
     },
     /** 删除按钮操作 */
     handleDelete(row) {
@@ -471,12 +495,28 @@ export default {
     },
     submitPerfDetail(detailForm) {
       console.info(detailForm);
-      alert("确认成功");
+      // alert("确认成功");
+      this.form = detailForm;
+      this.submitForm();
       this.open = false;
     },
     cancelPerfDetail() {
       this.open = false;
     },
+    /** 验证*/
+    handleRun(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否运行")
+        .then(function () {
+          return run(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("运行成功");
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>

+ 127 - 63
fdapfe-ui/src/views/test/perf/perfDetail.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
     <el-form ref="form" :model="form" label-width="100px">
-      <el-form-item label="性能评估名称" prop="name">
-        <el-input v-model="form.name" placeholder="请输入性能评估名称" />
+      <el-form-item label="任务名称" prop="name">
+        <el-input v-model="form.name" placeholder="请输入任务名称" />
       </el-form-item>
       <el-form-item label="类型" prop="type">
         <el-select v-model="form.type" placeholder="请选择类型">
@@ -15,70 +15,101 @@
         </el-select>
       </el-form-item>
       <template v-if="form.type === '1'">
-        <el-form-item label="数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请选择数据集" />
-        </el-form-item>
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-select v-model="form.fdAlgorithmId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
+        <el-form-item label="数据" prop="testDataIds">
+          <el-select v-model="form.testDataIds" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
       </template>
       <template v-if="form.type === '2'">
-        <el-form-item label="数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请选择数据集" />
-        </el-form-item>
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-select v-model="form.fdAlgorithmId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
-        <el-form-item label="一级指标" prop="primaryIndicator">
+        <el-form-item label="数据" prop="testDataIds">
+          <el-select v-model="form.testDataIds" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="一级指标" prop="primaryIndicatorId">
           <el-input
-            v-model="form.primaryIndicator"
+            v-model="form.primaryIndicatorId"
             placeholder="请选择一级指标"
           />
         </el-form-item>
-        <el-form-item label="二级指标" prop="secondaryIndicator">
+        <el-form-item label="二级指标" prop="secondaryIndicatorId">
           <el-input
-            v-model="form.secondaryIndicator"
+            v-model="form.secondaryIndicatorId"
             placeholder="请选择二级指标"
           />
         </el-form-item>
-        <el-form-item label="三级指标" prop="tertiaryIndicator">
+        <el-form-item label="三级指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择三级指标"
           />
         </el-form-item>
       </template>
       <template v-if="form.type === '3'">
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-select v-model="form.fdAlgorithmId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
-        <el-form-item label="不确定指标" prop="tertiaryIndicator">
+        <el-form-item label="不确定指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择不确定指标"
           />
         </el-form-item>
-        <el-form-item label="物理模型" prop="tertiaryIndicator">
+        <el-form-item label="物理模型" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="输入物理模型"
           />
         </el-form-item>
@@ -91,37 +122,39 @@
         <el-form-item label="步长" prop="tertiaryIndicator">
           <el-input v-model="form.tertiaryIndicator" placeholder="输入参数" />
         </el-form-item>
-        <el-form-item label="噪声数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请选择噪声数据" />
+        <el-form-item label="噪声数据" prop="noseDataIds">
+          <el-input v-model="form.noseDataIds" placeholder="请选择噪声数据" />
         </el-form-item>
       </template>
       <template v-if="form.type === '4'">
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-select v-model="form.fdAlgorithmId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
-        <el-form-item label="不确定指标" prop="tertiaryIndicator">
+        <el-form-item label="不确定指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择不确定指标"
           />
         </el-form-item>
-        <el-form-item label="精度指标" prop="tertiaryIndicator">
+        <el-form-item label="精度指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择不确定指标"
           />
         </el-form-item>
-        <el-form-item label="物理模型" prop="tertiaryIndicator">
-          <el-input
-            v-model="form.tertiaryIndicator"
-            placeholder="输入物理模型"
-          />
+        <el-form-item label="物理模型" prop="phyModelId">
+          <el-input v-model="form.phyModelId" placeholder="输入物理模型" />
         </el-form-item>
         <el-form-item label="参数" prop="tertiaryIndicator">
           <el-input v-model="form.tertiaryIndicator" placeholder="输入参数" />
@@ -132,29 +165,42 @@
         <el-form-item label="步长" prop="tertiaryIndicator">
           <el-input v-model="form.tertiaryIndicator" placeholder="输入步长" />
         </el-form-item>
-        <el-form-item label="噪声数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请选择噪声数据" />
+        <el-form-item label="噪声数据" prop="noseDataIds">
+          <el-select v-model="form.noseDataIds" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
       </template>
       <template v-if="form.type === '5'">
         <el-form-item label="故障诊断算法" prop="fdAlgorithmId">
-          <el-input
-            v-model="form.fdAlgorithmId"
-            placeholder="请输入故障诊断算法"
-          />
+          <el-select v-model="form.fdAlgorithmId" placeholder="请选择模型">
+            <el-option
+              v-for="item in faultDiagnosisOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="实际标签" prop="truthLabels">
           <el-input v-model="form.truthLabels" placeholder="请输入实际标签" />
         </el-form-item>
-        <el-form-item label="不确定指标" prop="tertiaryIndicator">
+        <el-form-item label="不确定指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择不确定指标"
           />
         </el-form-item>
-        <el-form-item label="精度指标" prop="tertiaryIndicator">
+        <el-form-item label="精度指标" prop="tertiaryIndicatorId">
           <el-input
-            v-model="form.tertiaryIndicator"
+            v-model="form.tertiaryIndicatorId"
             placeholder="请选择不确定指标"
           />
         </el-form-item>
@@ -167,14 +213,22 @@
         <el-form-item label="步长" prop="tertiaryIndicator">
           <el-input v-model="form.tertiaryIndicator" placeholder="输入参数" />
         </el-form-item> -->
-        <el-form-item label="物理模型数据" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请选择噪声数据" />
-        </el-form-item>
-        <el-form-item label="噪声生成模型" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请输入噪声参数" />
-        </el-form-item>
-        <el-form-item label="噪声参数" prop="dataId">
-          <el-input v-model="form.dataId" placeholder="请输入噪声参数" />
+        <el-form-item label="物理模型数据" prop="phyModelId">
+          <el-select v-model="form.phyModelId" placeholder="请选择数据">
+            <el-option
+              v-for="item in dataOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="噪声生成模型" prop="noseModelId">
+          <el-input v-model="form.noseModelId" placeholder="请输入噪声参数" />
+        </el-form-item>
+        <el-form-item label="噪声参数" prop="noseParams">
+          <el-input v-model="form.noseParams" placeholder="请输入噪声参数" />
         </el-form-item>
       </template>
     </el-form>
@@ -186,6 +240,8 @@
 </template>
 
 <script>
+import { getDataOptions } from "@/api/data/data";
+import { getFaultDiagnosisOptions } from "@/api/model/faultDiagnosis";
 export default {
   name: "DdAlgorithmDetail",
   dicts: ["biz_perf_eval_type"],
@@ -198,10 +254,18 @@ export default {
   data() {
     return {
       form: {},
+      dataOptions: [],
+      faultDiagnosisOptions: [],
     };
   },
   created() {
     this.form = this._form;
+    getDataOptions().then((resp) => {
+      this.dataOptions = resp.data;
+    });
+    getFaultDiagnosisOptions().then((resp) => {
+      this.faultDiagnosisOptions = resp.data;
+    });
   },
   methods: {
     submitForm() {

+ 73 - 74
fdapfe-ui/vue.config.js

@@ -1,15 +1,15 @@
-'use strict'
-const path = require('path')
+"use strict";
+const path = require("path");
 
 function resolve(dir) {
-  return path.join(__dirname, dir)
+  return path.join(__dirname, dir);
 }
 
-const CompressionPlugin = require('compression-webpack-plugin')
+const CompressionPlugin = require("compression-webpack-plugin");
 
-const name = process.env.VUE_APP_TITLE || '故障诊断算法模型性能和功能评估平台' // 网页标题
+const name = process.env.VUE_APP_TITLE || "故障诊断专家知识系统验证与评估平台"; // 网页标题
 
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 80; // 端口
 
 // vue.config.js 配置说明
 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@@ -20,17 +20,17 @@ module.exports = {
   // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
   publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
   // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
-  outputDir: 'dist',
+  outputDir: "dist",
   // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
-  assetsDir: 'static',
+  assetsDir: "static",
   // 是否开启eslint保存检测,有效值:ture | false | 'error'
-  lintOnSave: process.env.NODE_ENV === 'development',
+  lintOnSave: process.env.NODE_ENV === "development",
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
   productionSourceMap: false,
-  transpileDependencies: ['quill'],
+  transpileDependencies: ["quill"],
   // webpack-dev-server 相关配置
   devServer: {
-    host: '0.0.0.0',
+    host: "0.0.0.0",
     port: port,
     open: true,
     proxy: {
@@ -39,93 +39,92 @@ module.exports = {
         target: `http://localhost:8080`,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
-        }
-      }
+          ["^" + process.env.VUE_APP_BASE_API]: "",
+        },
+      },
     },
-    disableHostCheck: true
+    disableHostCheck: true,
   },
   css: {
     loaderOptions: {
       sass: {
-        sassOptions: { outputStyle: "expanded" }
-      }
-    }
+        sassOptions: { outputStyle: "expanded" },
+      },
+    },
   },
   configureWebpack: {
     name: name,
     resolve: {
       alias: {
-        '@': resolve('src')
-      }
+        "@": resolve("src"),
+      },
     },
     plugins: [
       // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
       new CompressionPlugin({
-        cache: false,                                  // 不启用文件缓存
-        test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i,  // 压缩文件格式
-        filename: '[path][base].gz[query]',            // 压缩后的文件名
-        algorithm: 'gzip',                             // 使用gzip压缩
-        minRatio: 0.8,                                 // 压缩比例,小于 80% 的文件不会被压缩
-        deleteOriginalAssets: false                    // 压缩后删除原文件
-      })
+        cache: false, // 不启用文件缓存
+        test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
+        filename: "[path][base].gz[query]", // 压缩后的文件名
+        algorithm: "gzip", // 使用gzip压缩
+        minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
+        deleteOriginalAssets: false, // 压缩后删除原文件
+      }),
     ],
   },
   chainWebpack(config) {
-    config.plugins.delete('preload') // TODO: need test
-    config.plugins.delete('prefetch') // TODO: need test
+    config.plugins.delete("preload"); // TODO: need test
+    config.plugins.delete("prefetch"); // TODO: need test
 
     // set svg-sprite-loader
+    config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end();
     config.module
-      .rule('svg')
-      .exclude.add(resolve('src/assets/icons'))
-      .end()
-    config.module
-      .rule('icons')
+      .rule("icons")
       .test(/\.svg$/)
-      .include.add(resolve('src/assets/icons'))
+      .include.add(resolve("src/assets/icons"))
       .end()
-      .use('svg-sprite-loader')
-      .loader('svg-sprite-loader')
+      .use("svg-sprite-loader")
+      .loader("svg-sprite-loader")
       .options({
-        symbolId: 'icon-[name]'
+        symbolId: "icon-[name]",
       })
-      .end()
+      .end();
 
-    config.when(process.env.NODE_ENV !== 'development', config => {
-          config
-            .plugin('ScriptExtHtmlWebpackPlugin')
-            .after('html')
-            .use('script-ext-html-webpack-plugin', [{
+    config.when(process.env.NODE_ENV !== "development", (config) => {
+      config
+        .plugin("ScriptExtHtmlWebpackPlugin")
+        .after("html")
+        .use("script-ext-html-webpack-plugin", [
+          {
             // `runtime` must same as runtimeChunk name. default is `runtime`
-              inline: /runtime\..*\.js$/
-            }])
-            .end()
+            inline: /runtime\..*\.js$/,
+          },
+        ])
+        .end();
 
-          config.optimization.splitChunks({
-            chunks: 'all',
-            cacheGroups: {
-              libs: {
-                name: 'chunk-libs',
-                test: /[\\/]node_modules[\\/]/,
-                priority: 10,
-                chunks: 'initial' // only package third parties that are initially dependent
-              },
-              elementUI: {
-                name: 'chunk-elementUI', // split elementUI into a single package
-                test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
-                priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
-              },
-              commons: {
-                name: 'chunk-commons',
-                test: resolve('src/components'), // can customize your rules
-                minChunks: 3, //  minimum common number
-                priority: 5,
-                reuseExistingChunk: true
-              }
-            }
-          })
-          config.optimization.runtimeChunk('single')
-    })
-  }
-}
+      config.optimization.splitChunks({
+        chunks: "all",
+        cacheGroups: {
+          libs: {
+            name: "chunk-libs",
+            test: /[\\/]node_modules[\\/]/,
+            priority: 10,
+            chunks: "initial", // only package third parties that are initially dependent
+          },
+          elementUI: {
+            name: "chunk-elementUI", // split elementUI into a single package
+            test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
+            priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+          },
+          commons: {
+            name: "chunk-commons",
+            test: resolve("src/components"), // can customize your rules
+            minChunks: 3, //  minimum common number
+            priority: 5,
+            reuseExistingChunk: true,
+          },
+        },
+      });
+      config.optimization.runtimeChunk("single");
+    });
+  },
+};

+ 3 - 3
sql/biz20250307.sql

@@ -185,13 +185,13 @@ create table biz_performance_evaluation
   truth_labels varchar(255)  comment '实际标签',
   phy_model_id bigint(20)  comment '物理生成模型',
   phy_params TEXT  comment '物理模型参数',
-  phy_data_id bigint(20)  comment '物理数据',
+  phy_data_ids varchar(1000)  comment '物理数据',
   nose_model_id bigint(20)  comment '噪声生成模型',
   nose_params TEXT  comment '噪声模型参数',
-  nose_data_id bigint(20)  comment '噪声数据',
+  nose_data_ids varchar(1000)  comment '噪声数据',
   test_model_id bigint(20)  comment '测试生成模型',
   test_params TEXT  comment '测试模型参数',
-  test_data_id bigint(20)  comment '测试数据',
+  test_data_ids varchar(1000)  comment '测试数据',
   result_image_path varchar(255)  comment '图片结果',
   result_file_path varchar(255)  comment '文件结果',
   result_text Text  comment '文本结果',