Эх сурвалжийг харах

Merge branch 'rmd-dev'

# Conflicts:
#	pdaaphm-admin/src/main/resources/application-druid.yml
#	pdaaphm-ui/src/views/system/preprocess/index.vue
Rmengdi 7 сар өмнө
parent
commit
ddff89032c

+ 2 - 2
pdaaphm-admin/src/main/resources/application-druid.yml

@@ -6,9 +6,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://101.126.133.7:3306/pdaaphm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://101.126.133.7:9006/pdaaphm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-                password: 123456
+                password: 404cf3eae29df38f
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 75 - 99
pdaaphm-ui/src/views/dashboard/BarChart.vue

@@ -1,146 +1,122 @@
 <template>
-  <div ref="barChart" :class="className" :style="{ height: height, width: width }" />
+  <div
+    ref="barChart"
+    :class="className"
+    :style="{ height: height, width: width }"
+  />
 </template>
 
 <script>
-import { listSubType } from "@/api/conf/subType";
-import * as echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
+import * as echarts from "echarts";
+require("echarts/theme/macarons"); // echarts theme
+import resize from "./mixins/resize";
 
 export default {
   mixins: [resize],
   props: {
     className: {
       type: String,
-      default: 'barChart',
+      default: "barChart",
     },
     width: {
       type: String,
-      default: '100%',
+      default: "100%",
     },
     height: {
       type: String,
-      default: '200px',
+      default: "200px",
+    },
+    agloTypeData: {
+      type: Array,
+      require: true,
     },
   },
   data() {
     return {
       chart: null,
-      // 数量
-      estimate: 0,
-      extract: 0,
-      denoise: 0,
-      fault: 0,
-      completion: 0,
-      expand: 0
-    }
+      color: [
+        "#5470c6",
+        "#91cc75",
+        "#fac858",
+        "#ee6666",
+        "#73c0de",
+        "#3ba272",
+        "#fc8452",
+        "#9a60b4",
+        "#ea7ccc",
+      ],
+    };
   },
   mounted() {
-    // this.getList(1);
-    // this.getList(2);
-    // this.getList(3);
-    // this.getList(4);
-    // this.getList(5);
-    // this.getList(6);
-    this.initChart()
+    this.$nextTick(() => {
+      this.initChart();
+    });
   },
   beforeDestroy() {
     if (!this.chart) {
-      return
+      return;
     }
-    this.chart.dispose()
-    this.chart = null
+    this.chart.dispose();
+    this.chart = null;
   },
   methods: {
     initChart() {
-      var chartDom = this.$refs.barChart
+      let xAxisData = [];
+      let seriesData = [];
+      this.agloTypeData.forEach((item, index) => {
+        xAxisData.push(item.name);
+        seriesData.push({
+          value: item.value,
+          itemStyle: {
+            color: this.color[index],
+          },
+        });
+      });
+
+      var chartDom = this.$refs.barChart;
       // var myChart = echarts.init(chartDom)
-      this.chart = echarts.init(chartDom)
-      var option
+      this.chart = echarts.init(chartDom);
+      var option;
       option = {
         xAxis: {
-          type: 'category',
-          data: ['补全', '去噪', '扩充', '特征提取', '退化评估', '故障预测'],
+          type: "category",
+          data: xAxisData,
           axisLabel: {
             show: true,
-            color: '#ffffff',
-          }
+            color: "#ffffff",
+          },
         },
         yAxis: {
-          type: 'value',
+          type: "value",
+          splitLine: {
+            //x网格样式
+            show: true,
+            lineStyle: {
+              color: "rgba(255, 255, 255, 0.1)",
+              type: "solid",
+              width: "1",
+            },
+          },
         },
         series: [
           {
-            data: [
-              {
-                // value: this.denoise,
-                value: 5,
-                itemStyle: {
-                  color: '#5470c6',
-                },
-              },
-              {
-                value: 3,
-                itemStyle: {
-                  color: '#5470c6',
-                },
-              },
-              {
-                value: 5,
-                itemStyle: {
-                  color: '#5470c6',
-                },
-              },
-              {
-                value: 5,
-                itemStyle: {
-                  color: '#9fe080',
-                },
+            data: seriesData,
+            type: "bar",
+            barWidth: 50,
+            label: {
+              show: true,
+              position: "inside",
+              textStyle: {
+                color: "#fff",
+                fontSize: 16,
               },
-              {
-                value: 5,
-                itemStyle: {
-                  color: '#ffdc60',
-                },
-              },
-              {
-                value: 5,
-                itemStyle: {
-                  color: '#ff7070',
-                },
-              }
-            ],
-            type: 'bar',
-            barWidth: 50
+            },
           },
         ],
-      }
-      option && this.chart.setOption(option)
+      };
+      option && this.chart.setOption(option);
     },
     // 获取
-    getList(value) {
-      this.queryParams = { pageNum: 1, pageSize: 100, type: value }
-      listSubType(this.queryParams).then(response => {
-        // this.subTypeList = response.rows;
-
-        if (value === 1) {
-          console.log(value);
-          console.log(this.estimate);
-        } else if (value === 2) {
-          this.extract = response.total
-        } else if (value === 3) {
-          this.denoise = response.total
-        } else if (value === 4) {
-          this.fault = response.total
-        } else if (value === 5) {
-          this.completion = response.total
-        } else {
-          this.expand = response.total
-        }
-      });
-    },
   },
-}
+};
 </script>

+ 0 - 1
pdaaphm-ui/src/views/homePage/preCharts.vue

@@ -91,7 +91,6 @@ export default {
       this.setOptions(this.chartData);
     },
     setOptions({ legendData, xAxisData, yAxisData, seriesData } = {}) {
-      console.log("seriesData", seriesData);
       this.chart.setOption({
         title: {
           text: this.title,

+ 101 - 69
pdaaphm-ui/src/views/homePage/ringChart.vue

@@ -1,124 +1,156 @@
 <template>
   <div>
-    <div ref='ringChart' class="ringChart" style="width:290px;height:200px"></div>
+    <div
+      ref="ringChart"
+      class="ringChart"
+      style="width: 290px; height: 250px"
+    ></div>
   </div>
 </template>
 
 <script>
-import { listSubType } from "@/api/conf/subType";
-import * as echarts from 'echarts';
+import * as echarts from "echarts";
+import { listAlgConfig } from "@/api/system/algConfig";
+
 export default {
-  name: 'RingChart',
+  name: "RingChart",
+  props: {
+    total: {
+      type: Number,
+      require: true,
+    },
+    agloTypeData: {
+      type: Array,
+      require: true,
+    },
+  },
   data() {
     return {
       // 总数量
-      total:0,
-      chart:null,
-      option:null
-    }
+      totalAll: 0,
+      chart: null,
+      option: null,
+      data: null,
+      // agloTypeData: [],
+    };
   },
   mounted() {
-    this.getList();
-    this.ringChart()
+    // this.getTotal();
+    this.$nextTick(() => {
+      this.ringChart();
+    });
   },
   beforeDestroy() {
     if (!this.chart) {
-      return
+      return;
     }
-    this.chart.dispose()
-    this.chart = null
+    this.chart.dispose();
+    this.chart = null;
   },
   methods: {
+    // 获取总条数
+    getTotal() {
+      this.queryParams = { pageNum: 1, pageSize: 1000 };
+      listAlgConfig(this.queryParams).then((response) => {
+        this.total = response.total;
+        const typeFrequency = response.rows.map((item) => {
+          return item.algType;
+        });
+        console.log("typeFrequency", typeFrequency);
+        const countedTypeFrequency = typeFrequency?.reduce((obj, name) => {
+          if (name in obj) {
+            obj[name]++;
+          } else {
+            obj[name] = 1;
+          }
+          return obj;
+        }, {});
+
+        const agloType = this.dict.type.biz_alg_type;
+        for (let key in this.dict.type.biz_alg_type) {
+          this.agloTypeData.push({
+            value: countedTypeFrequency[key],
+            name: agloType[key].label,
+          });
+        }
+        this.ringChart();
+      });
+    },
+
     ringChart() {
-      var chartDom = this.$refs.ringChart
-      this.chart = echarts.init(chartDom)
+      this.totalAll = this.total;
+      var chartDom = this.$refs.ringChart;
+      this.chart = echarts.init(chartDom);
       this.option = {
         tooltip: {
-          trigger: 'item',
+          trigger: "item",
         },
         legend: {
-          left: 'center',
-          top:'top',
-          padding:[0,0,10,0],
-          textStyle:{//图例文字的样式
-            color:'#fff'
-          }
+          x: "left", //可设定图例在左、右、居中
+          y: "top",
+          padding: [0, 0, 30, 0],
+          textStyle: {
+            //图例文字的样式
+            color: "#fff",
+          },
         },
         title: {
-          text: '算法总数',
-          subtext:28,
+          text: "算法总数",
+          subtext: this.totalAll,
           textStyle: {
-            fontSize: 16, 
-            color:'#fff',
-            fontWeight: 400, 
+            fontSize: 16,
+            color: "#fff",
+            fontWeight: 400,
           },
-          subtextStyle:{
-            fontSize: 24, 
-            fontWeight: 700, 
+          subtextStyle: {
+            fontSize: 24,
+            fontWeight: 700,
             color: "rgb(50,197,233)",
           },
-          left: 'center', // 文字水平居中
-          top: '40%', // 文字垂直居中
+          left: "center", // 文字水平居中
+          top: "40%", // 文字垂直居中
         },
         series: [
           {
-            name: '算法',
-            type: 'pie',
-            radius: ['45%', '70%'],
+            name: "算法",
+            type: "pie",
+            radius: ["45%", "65%"],
             avoidLabelOverlap: false,
             label: {
               show: false,
-              position: 'center',
+              position: "center",
             },
             emphasis: {
               label: {
                 show: true,
                 fontSize: 24,
-                fontWeight: 'bold',
+                fontWeight: "bold",
               },
             },
             labelLine: {
               show: false,
             },
-            data: [
-              { value: 13, name: '数据预处理' },
-              { value: 5, name: '特征提取' },
-              { value: 5, name: '退化评估' },
-              { value: 5, name: '故障预测' },
-            ],
+            data: this.agloTypeData,
           },
         ],
-      }
-      this.chart.on('mousemove',  (params) => {
+      };
+      this.chart.on("mousemove", (params) => {
         if (params.data) {
-          this.option.title.text = ' '
-          this.option.title.subtext = ' '
-          this.chart.setOption(this.option)
+          this.option.title.text = " ";
+          this.option.title.subtext = " ";
+          this.chart.setOption(this.option);
         }
-      })
+      });
 
-      this.chart.on('mouseout',  () => {
-        this.option.title.text = '算法总数'
-        this.option.title.subtext = 28
-        this.chart.setOption(this.option)
-      })
-      this.option && this.chart.setOption(this.option)
-    },
-    // 获取总条数
-    getList() {
-      this.loading = true;
-      this.queryParams={pageNum:1,pageSize:100}
-      listSubType(this.queryParams).then(response => {
-        // this.subTypeList = response.rows;
-        // this.total = response.total;
-        this.loading = false;
-        this.ringChart()
+      this.chart.on("mouseout", () => {
+        this.option.title.text = "算法总数";
+        this.option.title.subtext = this.totalAll;
+        this.chart.setOption(this.option);
       });
+      this.option && this.chart.setOption(this.option);
     },
-    
   },
-}
+};
 </script>
 
-<style scoped>
-</style>
+<style scoped></style>

+ 267 - 0
pdaaphm-ui/src/views/index.scss

@@ -0,0 +1,267 @@
+.home {
+  width: 100%;
+  min-height: calc(100vh - 94px);
+  overflow: hidden;
+}
+
+.first {
+  width: 97%;
+  height: 250px;
+  margin: 20px;
+  // background-color: white;
+  border-radius: 15px;
+  overflow: hidden;
+}
+
+.chart {
+  display: flex;
+  justify-content: space-around;
+  margin-left: 30px;
+}
+
+.second {
+  width: 97%;
+  height: 440px;
+  margin: 50px 20px;
+  // overflow: hidden;
+  display: flex;
+  flex-direction: column;
+
+  .step {
+    width: 100%;
+    height: 120px;
+    display: flex;
+    justify-content: space-around;
+
+    .yuan,
+    .one,
+    .two,
+    .three,
+    .four,
+    .five,
+    .six,
+    .final {
+      width: 12%;
+      height: 100%;
+      text-align: center;
+    }
+
+    .item {
+      margin-top: 10px;
+      margin-right: 40px;
+    }
+
+    .img {
+      width: 40%;
+      height: 95%;
+      margin: 0 auto;
+      position: relative;
+    }
+
+    .img::after {
+      content: "";
+      position: absolute;
+      top: 50%;
+      transform: translateX(26%);
+      width: 200%;
+      height: 1px;
+      // background-color: #546882;
+      background-color: #00aaff;
+      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
+    }
+
+    .noAfter::after {
+      content: none;
+    }
+
+    .odd::before {
+      content: "";
+      position: absolute;
+      transform: translateY(-50%);
+      width: 1px;
+      height: 50%;
+      // background-color: #546882;
+      background-color: #00aaff;
+      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
+    }
+
+    .even::before {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      transform: translateY(50%);
+      width: 1px;
+      height: 50%;
+      // background-color: #546882;00aaff
+      background-color: #00aaff;
+      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
+    }
+
+    .yuanBg {
+      background: url("../assets/images/yuan.png") no-repeat center / contain;
+    }
+
+    .oneBg {
+      background: url("../assets/images/one.png") no-repeat center / contain;
+    }
+
+    .twoBg {
+      background: url("../assets/images/two.png") no-repeat center / contain;
+    }
+
+    .threeBg {
+      background: url("../assets/images/three.png") no-repeat center / contain;
+    }
+
+    .fourBg {
+      background: url("../assets/images/four.png") no-repeat center / contain;
+    }
+
+    .fiveBg {
+      background: url("../assets/images/five.png") no-repeat center / contain;
+    }
+
+    .sixBg {
+      background: url("../assets/images/six.png") no-repeat center / contain;
+    }
+
+    .tag {
+      color: #fff;
+      background: linear-gradient(
+        to right,
+        rgba(8, 200, 236, 0),
+        rgba(8, 200, 236, 0.8),
+        rgba(8, 200, 236, 0.8),
+        rgba(8, 200, 236, 0)
+      );
+      position: absolute;
+      top: -15px;
+      left: 100%;
+    }
+    .tag2 {
+      color: #fff;
+      background: linear-gradient(
+        to right,
+        rgba(8, 200, 236, 0),
+        rgba(8, 200, 236, 0.8),
+        rgba(8, 200, 236, 0.8),
+        rgba(8, 200, 236, 0)
+      );
+      position: absolute;
+      top: -15px;
+      left: 125%;
+    }
+  }
+
+  .topPanel {
+    width: 100%;
+    height: 37%;
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 1.5%;
+  }
+
+  .bottomPanel {
+    width: 100%;
+    height: 37%;
+    display: flex;
+    justify-content: space-around;
+    margin-left: 6%;
+    margin-top: 1%;
+  }
+
+  .tPanel,
+  .bPanel {
+    // position: relative;
+    width: 18%;
+    height: 95%;
+    overflow: auto;
+    border: 2px solid transparent;
+    background-clip: padding-box;
+    box-shadow: 0 0 10px rgba(63, 155, 255, 0.5);
+    border-radius: 5%;
+  }
+}
+
+.file,
+.beforeFile {
+  cursor: pointer;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.file:hover {
+  color: #00aaff;
+}
+
+.square {
+  width: 90px;
+  height: 50px;
+  line-height: 50px;
+  text-align: center;
+  border-radius: 12px;
+  font-size: 14px;
+  border: 2px solid grey;
+}
+
+.diamond {
+  height: 100px;
+  width: 100px;
+  transform: rotateZ(45deg) skew(-20deg, -20deg);
+  position: relative;
+  border: 2px solid grey;
+
+  .diamond-p {
+    position: absolute;
+    width: 140px;
+    top: 14%;
+    left: -17%;
+    transform: skew(20deg, 20deg) rotateZ(-45deg);
+  }
+}
+
+.imgShow{
+  width: 100%;
+  text-align: center;
+  .imgTitle{
+    font-size: 1.1rem;
+    color: #fff;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+}
+
+::-webkit-scrollbar {
+  display: none;
+}
+
+::v-deep .el-table__empty-block {
+  background-color: #0b333f !important;
+  border: #0b333f;
+}
+
+::v-deep .vxe-body--row {
+  background-color: #0b333f;
+  color: white;
+}
+
+::v-deep .vxe-table--body :hover {
+  background-color: #0b333f;
+}
+
+::v-deep .vxe-header--row {
+  background-color: #1e262f;
+  color: white;
+}
+.remark {
+  margin-top: 20px;
+  font-size: 1.2rem;
+  color: #fff;
+  margin-left: 10%;
+}
+
+.image-preview {
+  margin-left: 50%;
+  transform: translate(-50%, 0);
+}

+ 96 - 295
pdaaphm-ui/src/views/index.vue

@@ -207,6 +207,7 @@
         <div class="four">
           <div class="img fourBg odd" @click="handleProcess(3)">
             <div class="tag">特征提取</div>
+            <div class="tag2">故障诊断</div>
           </div>
         </div>
         <div class="five">
@@ -393,8 +394,12 @@
     <div class="first">
       <h4 style="margin: 13px 0px 0px 20px; color: #fff">算法统计</h4>
       <div class="chart">
-        <RingChart />
-        <BarChart width="700px" />
+        <RingChart
+          v-if="flag"
+          :total="ringTotal"
+          :agloTypeData="agloTypeData"
+        />
+        <BarChart v-if="flag" :agloTypeData="agloTypeData" width="700px" />
       </div>
     </div>
     <el-dialog
@@ -402,6 +407,7 @@
       :visible.sync="dialogVisible"
       width="30%"
       :close-on-click-modal="false"
+      :before-close="handleClose"
     >
       <el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item
@@ -409,13 +415,13 @@
           label="选择数据类型"
           label-width="120px"
         >
-          <el-radio-group v-removeAriaHidden v-model="type">
+          <el-radio-group v-removeAriaHidden v-model="radioDatatype">
             <el-radio :label="2">去噪</el-radio>
             <el-radio :label="3">扩充</el-radio>
             <!-- <el-radio :label="4">特征提取</el-radio> -->
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="数据" prop="processType">
+        <el-form-item label="数据" prop="processedDataId">
           <el-select
             v-model="form.processedDataId"
             placeholder="请选择执行的数据"
@@ -428,7 +434,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="算法" prop="processType">
+        <el-form-item label="算法" prop="processAlgId">
           <el-select v-model="form.processAlgId" placeholder="请选择执行的算法">
             <el-option
               v-for="(item, index) in optionalAglo"
@@ -440,7 +446,7 @@
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button @click="handleClose">取 消</el-button>
         <el-button type="primary" @click="submitHandle()">确 定</el-button>
       </span>
     </el-dialog>
@@ -488,10 +494,18 @@
 
       <CurveCharts
         style="margin-top: 20px"
-        v-if="!isTableShow && !['4', '5'].includes(fileType)"
+        v-if="!isTableShow && !['4', '5'].includes(fileType) && !isImgShow"
         :title="'处理后数据'"
         :chartData="resultChartData"
       />
+      <!-- 有图片显示图片,没图片显示数据 -->
+      <div
+        v-if="!isTableShow && !['4', '5'].includes(fileType) && isImgShow"
+        class="imgShow"
+      >
+        <div class="imgTitle">处理后图片</div>
+        <ImagePreview class="image-preview" :src="imgUrl"></ImagePreview>
+      </div>
 
       <!-- <div
         v-if="!isTableShow && !['4', '5'].includes(fileType)"
@@ -515,12 +529,13 @@ import RingChart from "@/views/homePage/ringChart";
 import PreCharts from "@/views/homePage/preCharts";
 import CurveCharts from "@/views/homePage/curveCharts";
 import BarChart from "@/views/dashboard/BarChart";
-import { getAlgConfigByType } from "@/api/system/algConfig";
+import { getAlgConfigByType, listAlgConfig } from "@/api/system/algConfig";
 import { getDataProcessByType, addProcess } from "@/api/system/process";
 import { getDataByType, getData, listData } from "@/api/system/data";
+
 export default {
   name: "Index",
-  dicts: ["biz_process_status"],
+  dicts: ["biz_alg_type", "biz_process_status"],
   components: {
     CountTo,
     RingChart,
@@ -556,42 +571,68 @@ export default {
       resultFileId: null,
       // filePath: null,
       fileType: null,
-      chart: null,
       imgPreviewUrl: null,
-      type: 2,
+      radioDatatype: 2,
       dialogType: null,
       preChartData: {},
       resultChartData: {},
       nowRow: {},
       nowTypeNum: null,
       agloRemark: "",
+      ringTotal: 0,
+      agloTypeData: [],
+      flag: false,
+      isImgShow: false,
+      imgUrl: null,
     };
   },
+  mounted() {},
   created() {
+    this.getTotal();
     this.getTableData();
   },
-  beforeDestroy() {
-    if (this.chart != null && this.chart != "" && this.chart != undefined) {
-      this.chart.dispose();
-      this.chart = null;
-    }
-  },
   watch: {
     fileShowVisible(value) {
       if (!value) {
         this.isTableShow = false;
       }
     },
-    type(value) {
+    radioDatatype(value) {
       getDataByType(value).then((res) => {
         this.optionalData = res.data;
       });
-      getAlgConfigByType(3).then((res) => {
-        this.optionalAglo = res.data;
-      });
+      // getAlgConfigByType(3).then((res) => {
+      //   this.optionalAglo = res.data;
+      // });
     },
   },
   methods: {
+    getTotal() {
+      const queryParams = { pageNum: 1, pageSize: 1000 };
+      listAlgConfig(queryParams).then((response) => {
+        this.ringTotal = response.total;
+        const typeFrequency = response.rows.map((item) => {
+          return item.algType;
+        });
+        const countedTypeFrequency = typeFrequency?.reduce((obj, name) => {
+          if (name in obj) {
+            obj[name]++;
+          } else {
+            obj[name] = 1;
+          }
+          return obj;
+        }, {});
+
+        const agloType = this.dict.type.biz_alg_type;
+        for (let key in this.dict.type.biz_alg_type) {
+          this.agloTypeData.push({
+            value: countedTypeFrequency[key],
+            name: agloType[key].label,
+          });
+        }
+        this.flag = true;
+      });
+    },
     getTableData() {
       const query = {
         dataType: 0,
@@ -655,16 +696,20 @@ export default {
     submitHandle() {
       addProcess(this.form).then((response) => {
         this.$modal.msgSuccess("开始执行");
-        this.dialogVisible = false;
-        this.form = {
-          processedDataId: null,
-          processAlgId: null,
-        };
-        this.optionalData = [];
-        this.optionalAglo = [];
+
         this.getTableData();
       });
     },
+    handleClose() {
+      this.radioDatatype = 2;
+      this.dialogVisible = false;
+      this.form = {
+        processedDataId: null,
+        processAlgId: null,
+      };
+      this.optionalData = [];
+      this.optionalAglo = [];
+    },
     handleFile(row, typeNum) {
       this.nowRow = row;
       this.nowTypeNum = typeNum;
@@ -706,13 +751,23 @@ export default {
             const resData = resultRes.data;
             this.agloRemark = resData.remark;
             const url = process.env.VUE_APP_BASE_API + resData.dataPath;
-            this.fetchLogFile(url).then((text) => {
-              let data, content, head;
-              data = this.handleFileData(text);
-              content = data.contentData;
-              head = data.headData;
-              this.switchHandle(content, head, resData.dataType);
-            });
+            // resultRes.data.imagePath =
+            //   "/profile/upload/2024/12/06/testdata1_故障预测_20241206181334A015.jpeg";
+            // console.log("resData.dataType", resData);
+            if (resData.imagePath && resData.dataType == "4") {
+              this.imgUrl = resData.imagePath;
+              this.isImgShow = true;
+              this.loading = false;
+              this.fileShowVisible = true;
+            } else {
+              this.fetchLogFile(url).then((text) => {
+                let data, content, head;
+                data = this.handleFileData(text);
+                content = data.contentData;
+                head = data.headData;
+                this.switchHandle(content, head, resData.dataType);
+              });
+            }
           })
           .catch((error) => {
             console.error("Failed to fetch the log file:", error);
@@ -782,26 +837,14 @@ export default {
         .split("\r\n")
         .filter((line) => line.trim() !== "")
         .map((row) => row.split(","));
-      const headData = data[0];
+      let headData = [];
+      for (let i = 1; i <= data[0].length; i++) {
+        headData.push(`数据${i}`);
+      }
       const contentData = Array.from({ length: headData.length }, () => []);
-      for (let i = 1; i < data.length; i++) {
-        // 从 1 开始,跳过表头
+      for (let i = 0; i < data.length; i++) {
         data[i].forEach((value, index) => {
           contentData[index].push(value * 1);
-          // if (!value || value == 0 || value == NaN) {
-          //   contentData[index].push({
-          //     value: data[i][index - 1],
-          //     symbolSize: 20,
-          //     symbol: "circle",
-          //     itemStyle: {
-          //       normal: {
-          //         color: "#ff0000",
-          //       },
-          //     },
-          //   });
-          // } else {
-          //   contentData[index].push(value * 1);
-          // }
         });
       }
       return { contentData, headData };
@@ -950,247 +993,5 @@ export default {
 </script>
 
 <style scoped lang="scss">
-.home {
-  width: 100%;
-  min-height: calc(100vh - 94px);
-  overflow: hidden;
-}
-
-.first {
-  width: 97%;
-  height: 210px;
-  margin: 20px;
-  // background-color: white;
-  border-radius: 15px;
-  overflow: hidden;
-}
-
-.chart {
-  display: flex;
-  justify-content: space-around;
-  margin-left: 30px;
-}
-
-.second {
-  width: 97%;
-  height: 440px;
-  margin: 50px 20px;
-  // overflow: hidden;
-  display: flex;
-  flex-direction: column;
-
-  .step {
-    width: 100%;
-    height: 120px;
-    display: flex;
-    justify-content: space-around;
-
-    .yuan,
-    .one,
-    .two,
-    .three,
-    .four,
-    .five,
-    .six,
-    .final {
-      width: 12%;
-      height: 100%;
-      text-align: center;
-    }
-
-    .item {
-      margin-top: 10px;
-      margin-right: 40px;
-    }
-
-    .img {
-      width: 40%;
-      height: 95%;
-      margin: 0 auto;
-      position: relative;
-    }
-
-    .img::after {
-      content: "";
-      position: absolute;
-      top: 50%;
-      transform: translateX(26%);
-      width: 200%;
-      height: 1px;
-      // background-color: #546882;
-      background-color: #00aaff;
-      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
-    }
-
-    .noAfter::after {
-      content: none;
-    }
-
-    .odd::before {
-      content: "";
-      position: absolute;
-      transform: translateY(-50%);
-      width: 1px;
-      height: 50%;
-      // background-color: #546882;
-      background-color: #00aaff;
-      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
-    }
-
-    .even::before {
-      content: "";
-      position: absolute;
-      bottom: 0;
-      transform: translateY(50%);
-      width: 1px;
-      height: 50%;
-      // background-color: #546882;00aaff
-      background-color: #00aaff;
-      box-shadow: 0 5px 15px rgba(0, 170, 255, 0.5);
-    }
-
-    .yuanBg {
-      background: url("../assets/images/yuan.png") no-repeat center / contain;
-    }
-
-    .oneBg {
-      background: url("../assets/images/one.png") no-repeat center / contain;
-    }
-
-    .twoBg {
-      background: url("../assets/images/two.png") no-repeat center / contain;
-    }
-
-    .threeBg {
-      background: url("../assets/images/three.png") no-repeat center / contain;
-    }
-
-    .fourBg {
-      background: url("../assets/images/four.png") no-repeat center / contain;
-    }
-
-    .fiveBg {
-      background: url("../assets/images/five.png") no-repeat center / contain;
-    }
-
-    .sixBg {
-      background: url("../assets/images/six.png") no-repeat center / contain;
-    }
-
-    .tag {
-      color: #fff;
-      background: linear-gradient(
-        to right,
-        rgba(8, 200, 236, 0),
-        rgba(8, 200, 236, 0.8),
-        rgba(8, 200, 236, 0.8),
-        rgba(8, 200, 236, 0)
-      );
-      position: absolute;
-      top: -15px;
-      left: 100%;
-    }
-  }
-
-  .topPanel {
-    width: 100%;
-    height: 37%;
-    display: flex;
-    justify-content: space-between;
-    margin-bottom: 1.5%;
-  }
-
-  .bottomPanel {
-    width: 100%;
-    height: 37%;
-    display: flex;
-    justify-content: space-around;
-    margin-left: 6%;
-    margin-top: 1%;
-  }
-
-  .tPanel,
-  .bPanel {
-    // position: relative;
-    width: 18%;
-    height: 95%;
-    overflow: auto;
-    border: 2px solid transparent;
-    background-clip: padding-box;
-    box-shadow: 0 0 10px rgba(63, 155, 255, 0.5);
-    border-radius: 5%;
-  }
-}
-
-.file,
-.beforeFile {
-  cursor: pointer;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.file:hover {
-  color: #00aaff;
-}
-
-.square {
-  width: 90px;
-  height: 50px;
-  line-height: 50px;
-  text-align: center;
-  border-radius: 12px;
-  font-size: 14px;
-  border: 2px solid grey;
-}
-
-.diamond {
-  height: 100px;
-  width: 100px;
-  transform: rotateZ(45deg) skew(-20deg, -20deg);
-  position: relative;
-  border: 2px solid grey;
-
-  .diamond-p {
-    position: absolute;
-    width: 140px;
-    top: 14%;
-    left: -17%;
-    transform: skew(20deg, 20deg) rotateZ(-45deg);
-  }
-}
-
-::-webkit-scrollbar {
-  display: none;
-}
-
-::v-deep .el-table__empty-block {
-  background-color: #0b333f !important;
-  border: #0b333f;
-}
-
-::v-deep .vxe-body--row {
-  background-color: #0b333f;
-  color: white;
-}
-
-::v-deep .vxe-table--body :hover {
-  background-color: #0b333f;
-}
-
-::v-deep .vxe-header--row {
-  background-color: #1e262f;
-  color: white;
-}
-.remark {
-  margin-top: 20px;
-  font-size: 1.2rem;
-  color: #fff;
-  margin-left: 10%;
-}
-
-.image-preview {
-  margin-left: 50%;
-  transform: translate(-50%, 0);
-}
+@import "./index.scss";
 </style>

+ 78 - 46
pdaaphm-ui/src/views/login.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="login">
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
+    <el-form
+      ref="loginForm"
+      :model="loginForm"
+      :rules="loginRules"
+      class="login-form"
+    >
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -8,7 +13,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">
@@ -19,7 +28,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">
@@ -30,26 +43,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; color:black">记住密码</el-checkbox>
-      <el-form-item style="width:100%;">
+      <el-checkbox
+        v-model="loginForm.rememberMe"
+        style="margin: 0px 0px 25px 0px; color: black"
+        >记住密码</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>
@@ -63,7 +86,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",
@@ -75,32 +98,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();
@@ -108,8 +131,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;
@@ -119,42 +143,50 @@ 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>
 
-<style rel="stylesheet/scss" lang="scss">
+<style scoped rel="stylesheet/scss" lang="scss">
 .login {
   display: flex;
   justify-content: center;
@@ -162,26 +194,26 @@ export default {
   height: 100%;
   background-image: url("../assets/images/login-background.jpg");
   background-size: 100% 100%;
-  background-attachment:fixed;
+  background-attachment: fixed;
 }
 .title {
   margin: 0px auto 30px auto;
   text-align: center;
-  color: #FFFFFF;
+  color: #ffffff;
 }
 
 .login-form {
   margin-top: 15%;
   border-radius: 6px;
-  background: rgba(255,255,255);
+  background: rgba(255, 255, 255);
   width: 400px;
   padding: 25px 25px 5px 25px;
   .el-input {
     height: 30px;
-    background-color: rgba(255,255,255,0.6);
+    background-color: rgba(255, 255, 255, 0.6);
     input {
       height: 30px;
-      background-color: rgba(255,255,255,0.6);
+      background-color: rgba(255, 255, 255, 0.6);
     }
   }
   .input-icon {
@@ -190,7 +222,7 @@ export default {
     margin-left: 2px;
   }
   .el-form-item {
-    margin-bottom: 10px
+    margin-bottom: 10px;
   }
 }
 .login-tip {
@@ -222,7 +254,7 @@ export default {
 .login-code-img {
   height: 38px;
 }
-.el-input__inner{
+.el-input__inner {
   background: white !important;
   color: #000;
 }

+ 136 - 59
pdaaphm-ui/src/views/system/algConfig/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="algName">
         <el-input
           v-model="queryParams.algName"
@@ -10,7 +17,11 @@
         />
       </el-form-item>
       <el-form-item label="算法类型" prop="algType">
-        <el-select v-model="queryParams.algType" placeholder="请选择算法类型" clearable>
+        <el-select
+          v-model="queryParams.algType"
+          placeholder="请选择算法类型"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.biz_alg_type"
             :key="dict.value"
@@ -20,7 +31,11 @@
         </el-select>
       </el-form-item>
       <el-form-item label="算法语言" prop="algLang">
-        <el-select v-model="queryParams.algLang" placeholder="请选择算法语言" clearable>
+        <el-select
+          v-model="queryParams.algLang"
+          placeholder="请选择算法语言"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.biz_alg_lang"
             :key="dict.value"
@@ -29,7 +44,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="处理的算法" prop="algUrl">
+      <el-form-item label-width="85px" label="处理的算法" prop="algUrl">
         <el-input
           v-model="queryParams.algUrl"
           placeholder="请输入处理的算法"
@@ -54,8 +69,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>
 
@@ -68,7 +91,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:algConfig:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -79,7 +103,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:algConfig:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -90,7 +115,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:algConfig:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -100,12 +126,20 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:algConfig: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="algConfigList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="algConfigList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" width="100" align="center" prop="id" />
       <el-table-column
@@ -121,16 +155,26 @@
         prop="algType"
       >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.biz_alg_type" :value="scope.row.algType"/>
+          <dict-tag
+            :options="dict.type.biz_alg_type"
+            :value="scope.row.algType"
+          />
         </template>
       </el-table-column>
       <el-table-column label="算法语言" align="center" prop="algLang">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.biz_alg_lang" :value="scope.row.algLang"/>
+          <dict-tag
+            :options="dict.type.biz_alg_lang"
+            :value="scope.row.algLang"
+          />
         </template>
       </el-table-column>
       <el-table-column label="是否固定输入输出" align="center" prop="fixed" />
-      <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"
@@ -138,20 +182,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:algConfig:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:algConfig: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"
@@ -160,7 +206,13 @@
 
     <!-- 添加或修改算法配置对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="150px" label-position= 'left'>
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="150px"
+        label-position="left"
+      >
         <el-form-item label="算法名称" prop="algName">
           <el-input v-model="form.algName" placeholder="请输入算法名称" />
         </el-form-item>
@@ -170,7 +222,8 @@
               v-for="dict in dict.type.biz_alg_type"
               :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="algLang">
@@ -179,20 +232,22 @@
               v-for="dict in dict.type.biz_alg_lang"
               :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="algUrl">
           <el-input v-model="form.algUrl" placeholder="请输入处理的算法" />
         </el-form-item>
         <el-form-item label="是否固定输入输出" prop="fixed">
-            <el-switch
-              v-model="form.fixed"
-              active-color="#13ce66"
-              inactive-color="#ff4949"
-              active-value="是"
-              inactive-value="否">
-            </el-switch>
+          <el-switch
+            v-model="form.fixed"
+            active-color="#13ce66"
+            inactive-color="#ff4949"
+            active-value="是"
+            inactive-value="否"
+          >
+          </el-switch>
         </el-form-item>
         <el-form-item label="输入地址" prop="inputUrl">
           <el-input v-model="form.inputUrl" placeholder="请输入输入地址" />
@@ -201,7 +256,11 @@
           <el-input v-model="form.outUrl" 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">
@@ -213,11 +272,17 @@
 </template>
 
 <script>
-import { listAlgConfig, getAlgConfig, delAlgConfig, addAlgConfig, updateAlgConfig } from "@/api/system/algConfig";
+import {
+  listAlgConfig,
+  getAlgConfig,
+  delAlgConfig,
+  addAlgConfig,
+  updateAlgConfig,
+} from "@/api/system/algConfig";
 
 export default {
   name: "AlgConfig",
-  dicts: ['biz_alg_type', 'biz_alg_lang'],
+  dicts: ["biz_alg_type", "biz_alg_lang"],
   data() {
     return {
       // 遮罩层
@@ -255,21 +320,25 @@ export default {
       // 表单校验
       rules: {
         algName: [
-          { required: true, message: "算法名称不能为空", trigger: "blur" }
+          { required: true, message: "算法名称不能为空", trigger: "blur" },
         ],
         algType: [
-          { required: true, message: "算法类型不能为空", trigger: "change" }
+          { required: true, message: "算法类型不能为空", trigger: "change" },
         ],
         algLang: [
-          { required: true, message: "算法语言不能为空", trigger: "change" }
+          { required: true, message: "算法语言不能为空", trigger: "change" },
         ],
         fixed: [
-          { required: true, message: "是否固定输入输出不能为空", trigger: "blur" }
+          {
+            required: true,
+            message: "是否固定输入输出不能为空",
+            trigger: "blur",
+          },
         ],
         algUrl: [
-          { required: true, message: "处理的算法不能为空", trigger: "blur" }
+          { required: true, message: "处理的算法不能为空", trigger: "blur" },
         ],
-      }
+      },
     };
   },
   created() {
@@ -279,7 +348,7 @@ export default {
     /** 查询算法配置列表 */
     getList() {
       this.loading = true;
-      listAlgConfig(this.queryParams).then(response => {
+      listAlgConfig(this.queryParams).then((response) => {
         this.algConfigList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -297,7 +366,7 @@ export default {
         algName: null,
         algType: null,
         algLang: null,
-        fixed: '否',
+        fixed: "否",
         algUrl: null,
         inputUrl: null,
         outUrl: null,
@@ -305,7 +374,7 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
-        remark: null
+        remark: null,
       };
       this.resetForm("form");
     },
@@ -321,9 +390,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() {
@@ -334,8 +403,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getAlgConfig(id).then(response => {
+      const id = row.id || this.ids;
+      getAlgConfig(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改算法配置";
@@ -343,16 +412,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateAlgConfig(this.form).then(response => {
+            updateAlgConfig(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addAlgConfig(this.form).then(response => {
+            addAlgConfig(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -364,19 +433,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除算法配置编号为"' + ids + '"的数据项?').then(function() {
-        return delAlgConfig(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除算法配置编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delAlgConfig(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/algConfig/export', {
-        ...this.queryParams
-      }, `algConfig_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "system/algConfig/export",
+        {
+          ...this.queryParams,
+        },
+        `algConfig_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 57 - 39
pdaaphm-ui/src/views/system/preprocess/index.vue

@@ -118,18 +118,6 @@
           >新增</el-button
         >
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:process:edit']"
-          >修改</el-button
-        >
-      </el-col>
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -225,14 +213,6 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:process:edit']"
-            >修改</el-button
-          >
           <el-button
             size="mini"
             type="text"
@@ -254,10 +234,21 @@
     />
 
     <!-- 添加或修改数据处理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      :before-close="cancel"
+      append-to-body
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="数据类型" prop="processType">
-          <el-select v-model="form.processType" placeholder="请选择数据类型">
+          <el-select
+            v-model="form.processType"
+            placeholder="请选择数据类型"
+            @change="getAgloData"
+          >
             <el-option
               v-for="dict in dict.type.biz_preaglo_type"
               :key="dict.value"
@@ -267,24 +258,35 @@
           </el-select>
         </el-form-item>
         <el-form-item
-          label="处理的算法id"
-          label-width="110px"
+          label="处理的算法"
+          label-width="100px"
           prop="processAlgId"
         >
-          <el-input
-            v-model="form.processAlgId"
-            placeholder="请输入处理的算法id"
-          />
+          <el-select v-model="form.processAlgId" placeholder="请选择执行的算法">
+            <el-option
+              v-for="(item, index) in optionalAglo"
+              :key="index"
+              :label="item.algName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item
-          label="被处理数据id"
+          label="被处理数据"
           prop="processedDataId"
-          label-width="110px"
+          label-width="100px"
         >
-          <el-input
+          <el-select
             v-model="form.processedDataId"
-            placeholder="请输入被处理数据id"
-          />
+            placeholder="请选择被处理数据"
+          >
+            <el-option
+              v-for="(item, index) in optionalData"
+              :key="index"
+              :label="item.dataName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item
           label="处理结果数据id"
@@ -358,6 +360,8 @@ import {
   addProcess,
   updateProcess,
 } from "@/api/system/process";
+import { getAlgConfigByType } from "@/api/system/algConfig";
+import { getDataByType } from "@/api/system/data";
 
 export default {
   name: "preprocess",
@@ -400,13 +404,14 @@ export default {
       // 表单校验
       rules: {
         processAlgId: [
-          { required: true, message: "处理的算法id不能为空", trigger: "blur" },
+          { required: true, message: "处理的算法不能为空", trigger: "blur" },
         ],
         processedDataId: [
-          { required: true, message: "被处理数据id不能为空", trigger: "blur" },
+          { required: true, message: "被处理数据不能为空", trigger: "blur" },
         ],
       },
-      type: [1, 2],
+      optionalData: [],
+      optionalAglo: [],
     };
   },
   created() {
@@ -416,7 +421,7 @@ export default {
     /** 查询数据处理列表 */
     getList() {
       this.loading = true;
-      getPreprocessList(this.queryParams).then((response) => {
+      getPreprocessList(this.queryParams).then(response => {
         this.processList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -426,12 +431,24 @@ export default {
     cancel() {
       this.open = false;
       this.reset();
+      this.optionalData = [];
+      this.optionalAglo = [];
     },
+
+    getAgloData(type) {
+      getDataByType(type).then((res) => {
+        this.optionalData = res.data;
+      });
+      getAlgConfigByType(type).then((res) => {
+        this.optionalAglo = res.data;
+      });
+    },
+
     // 表单重置
     reset() {
       this.form = {
         id: null,
-        processType: this.type,
+        processType: null,
         processAlgId: null,
         processedDataId: null,
         resultDataId: null,
@@ -473,10 +490,11 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
+      this.getAgloData(row.processType);
       getProcess(id).then((response) => {
         this.form = response.data;
-        this.open = true;
         this.title = "修改数据处理";
+        this.open = true;
       });
     },
     /** 提交按钮 */

+ 264 - 90
pdaaphm-ui/src/views/system/process/index.vue

@@ -1,8 +1,20 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="80px"
+    >
       <el-form-item label="数据类型" prop="processType">
-        <el-select v-model="queryParams.processType" disabled placeholder="请选择数据类型" clearable>
+        <el-select
+          v-model="queryParams.processType"
+          disabled
+          placeholder="请选择数据类型"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.biz_alg_type"
             :key="dict.value"
@@ -11,7 +23,11 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="处理的算法id" prop="processAlgId" label-width="110px">
+      <el-form-item
+        label="处理的算法id"
+        prop="processAlgId"
+        label-width="110px"
+      >
         <el-input
           v-model="queryParams.processAlgId"
           placeholder="请输入处理的算法id"
@@ -19,7 +35,11 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="被处理数据id" prop="processedDataId" label-width="110px">
+      <el-form-item
+        label="被处理数据id"
+        prop="processedDataId"
+        label-width="110px"
+      >
         <el-input
           v-model="queryParams.processedDataId"
           placeholder="请输入被处理数据id"
@@ -27,7 +47,11 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="处理结果数据id" prop="resultDataId" label-width="110px">
+      <el-form-item
+        label="处理结果数据id"
+        prop="resultDataId"
+        label-width="110px"
+      >
         <el-input
           v-model="queryParams.resultDataId"
           placeholder="请输入处理结果数据id"
@@ -36,7 +60,11 @@
         />
       </el-form-item>
       <el-form-item label="状态" prop="processStatus">
-        <el-select v-model="queryParams.processStatus" placeholder="请选择状态" clearable>
+        <el-select
+          v-model="queryParams.processStatus"
+          placeholder="请选择状态"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.biz_process_status"
             :key="dict.value"
@@ -46,24 +74,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>
 
@@ -76,18 +116,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:process:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:process:edit']"
-        >修改</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -98,7 +128,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:process:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -108,61 +139,95 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:process: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="processList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="processList"
+      @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="processType">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.biz_alg_type" :value="scope.row.processType"/>
+          <dict-tag
+            :options="dict.type.biz_alg_type"
+            :value="scope.row.processType"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="处理的算法id" align="center" prop="processAlgId" />
-      <el-table-column label="被处理数据id" align="center" prop="processedDataId" />
-      <el-table-column label="处理结果数据id" align="center" prop="resultDataId" />
+      <el-table-column
+        label="处理的算法id"
+        align="center"
+        prop="processAlgId"
+      />
+      <el-table-column
+        label="被处理数据id"
+        align="center"
+        prop="processedDataId"
+      />
+      <el-table-column
+        label="处理结果数据id"
+        align="center"
+        prop="resultDataId"
+      />
       <el-table-column label="状态" align="center" prop="processStatus">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.biz_process_status" :value="scope.row.processStatus"/>
+          <dict-tag
+            :options="dict.type.biz_process_status"
+            :value="scope.row.processStatus"
+          />
         </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="log" />
       <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"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:process:edit']"
-          >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:process: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"
@@ -170,10 +235,21 @@
     />
 
     <!-- 添加或修改数据处理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      :close-on-click-modal="false"
+      append-to-body
+      :before-close="cancel"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="数据类型" prop="processType">
-          <el-select v-model="form.processType" placeholder="请选择数据类型" disabled>
+          <el-select
+            v-model="form.processType"
+            placeholder="请选择数据类型"
+            disabled
+          >
             <el-option
               v-for="dict in dict.type.biz_alg_type"
               :key="dict.value"
@@ -182,14 +258,52 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="处理的算法id" label-width="110px" prop="processAlgId" >
-          <el-input v-model="form.processAlgId" placeholder="请输入处理的算法id" />
+        <el-form-item
+          label="处理的算法"
+          label-width="100px"
+          prop="processAlgId"
+        >
+          <el-select v-model="form.processAlgId" placeholder="请选择执行的算法">
+            <el-option
+              v-for="(item, index) in optionalAglo"
+              :key="index"
+              :label="item.algName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="被处理数据id" prop="processedDataId" label-width="110px">
-          <el-input v-model="form.processedDataId" placeholder="请输入被处理数据id" />
+        <el-form-item
+          label="被处理数据"
+          prop="processedDataId"
+          label-width="100px"
+        >
+          <el-select
+            v-model="form.processedDataId"
+            placeholder="请选择被处理数据"
+          >
+            <el-option
+              v-for="(item, index) in optionalData"
+              :key="index"
+              :label="item.dataName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="处理结果数据id" prop="resultDataId" label-width="110px">
-          <el-input v-model="form.resultDataId" placeholder="请输入处理结果数据id" />
+        <!-- <el-form-item label="处理的算法id" label-width="110px" prop="processAlgId" >
+          <el-input v-model="form.processAlgId" placeholder="请输入处理的算法id" />
+        </el-form-item> -->
+        <!-- <el-form-item label="被处理数据id" prop="processedDataId" label-width="110px">
+          <el-input v-model="form.processedDataId" placeholder="请输入被处理数据id" />
+        </el-form-item> -->
+        <el-form-item
+          label="处理结果数据id"
+          prop="resultDataId"
+          label-width="110px"
+        >
+          <el-input
+            v-model="form.resultDataId"
+            placeholder="请输入处理结果数据id"
+          />
         </el-form-item>
         <el-form-item label="状态" prop="processStatus">
           <el-select v-model="form.processStatus" placeholder="请选择状态">
@@ -202,26 +316,38 @@
           </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="log">
-          <el-input v-model="form.log" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.log"
+            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">
@@ -233,11 +359,19 @@
 </template>
 
 <script>
-import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/system/process";
+import {
+  listProcess,
+  getProcess,
+  delProcess,
+  addProcess,
+  updateProcess,
+} from "@/api/system/process";
+import { getAlgConfigByType } from "@/api/system/algConfig";
+import { getDataByType } from "@/api/system/data";
 
 export default {
   name: "Process",
-  dicts: ['biz_process_status', 'biz_alg_type'],
+  dicts: ["biz_process_status", "biz_alg_type"],
   data() {
     return {
       // 遮罩层
@@ -276,35 +410,67 @@ export default {
       // 表单校验
       rules: {
         processAlgId: [
-          { required: true, message: "处理的算法id不能为空", trigger: "blur" }
+          { required: true, message: "处理的算法不能为空", trigger: "blur" },
         ],
         processedDataId: [
-          { required: true, message: "被处理数据id不能为空", trigger: "blur" }
+          { required: true, message: "被处理数据不能为空", trigger: "blur" },
         ],
       },
-      type:null
+      type: null,
+      optionalData: [],
+      optionalAglo: [],
     };
   },
   created() {
-    this.type=this.$route.query.type
-    this.queryParams.processType=this.$route.query.type
+    this.type = this.$route.query.type;
+    this.queryParams.processType = this.$route.query.type;
     this.getList();
   },
   methods: {
     /** 查询数据处理列表 */
     getList() {
       this.loading = true;
-      listProcess(this.queryParams).then(response => {
+      listProcess(this.queryParams).then((response) => {
         this.processList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
+      this.getAgloData(this.type);
     },
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
+      this.optionalData = [];
+      this.optionalAglo = [];
     },
+
+    getAgloData(type) {
+      let match;
+      if (type === 5) {
+        match = type - 1;
+      } else {
+        match = type;
+      }
+      console.log("match", match);
+      if (match == 3) {
+        getDataByType(match - 1).then((res2) => {
+          this.optionalData.push(...res2.data);
+        });
+        getDataByType(match).then((res) => {
+          this.optionalData.push(...res.data);
+        });
+      } else {
+        getDataByType(match).then((res) => {
+          this.optionalData = res.data;
+        });
+      }
+
+      getAlgConfigByType(type).then((res) => {
+        this.optionalAglo = res.data;
+      });
+    },
+
     // 表单重置
     reset() {
       this.form = {
@@ -321,7 +487,7 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
-        remark: null
+        remark: null,
       };
       this.resetForm("form");
     },
@@ -337,9 +503,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() {
@@ -350,8 +516,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getProcess(id).then(response => {
+      const id = row.id || this.ids;
+      getProcess(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改数据处理";
@@ -359,16 +525,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateProcess(this.form).then(response => {
+            updateProcess(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addProcess(this.form).then(response => {
+            addProcess(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -380,19 +546,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除数据处理编号为"' + ids + '"的数据项?').then(function() {
-        return delProcess(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除数据处理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delProcess(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/process/export', {
-        ...this.queryParams
-      }, `process_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "system/process/export",
+        {
+          ...this.queryParams,
+        },
+        `process_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>