Browse Source

dev selectPreprocessDataList

allen 11 months ago
parent
commit
c3636202ee

+ 1 - 2
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/impl/AlgConfigServiceImpl.java

@@ -98,7 +98,6 @@ public class AlgConfigServiceImpl implements IAlgConfigService
     public List<AlgConfig> getAlgConfigByType(String type) {
         AlgConfig algConfig = new AlgConfig();
         algConfig.setAlgType(type);
-        this.selectAlgConfigList(algConfig);
-        return null;
+        return this.selectAlgConfigList(algConfig);
     }
 }

+ 118 - 49
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,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="['system:algConfig:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -45,7 +65,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:algConfig:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -56,7 +77,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:algConfig:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -66,22 +88,48 @@
           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="编号" align="center" prop="id" />
-      <el-table-column label="算法名称" align="center" prop="algName" />
-      <el-table-column label="算法类型" align="center" prop="algType">
+      <el-table-column label="编号" width="100" align="center" prop="id" />
+      <el-table-column
+        label="算法名称"
+        width="150"
+        align="center"
+        prop="algName"
+      />
+      <el-table-column
+        label="算法类型"
+        width="150"
+        align="center"
+        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="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="算法地址" align="center" prop="algUrl" />
+      <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -89,20 +137,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"
@@ -121,14 +171,19 @@
               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="algUrl" label-width="100px">
           <el-input v-model="form.algUrl" 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">
@@ -140,11 +195,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'],
+  dicts: ["biz_alg_type"],
   data() {
     return {
       // 遮罩层
@@ -177,15 +238,15 @@ 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" },
         ],
         algUrl: [
-          { required: true, message: "处理的算法不能为空", trigger: "blur" }
+          { required: true, message: "处理的算法不能为空", trigger: "blur" },
         ],
-      }
+      },
     };
   },
   created() {
@@ -195,7 +256,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;
@@ -217,7 +278,7 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
-        remark: null
+        remark: null,
       };
       this.resetForm("form");
     },
@@ -233,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() {
@@ -246,8 +307,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 = "修改算法配置";
@@ -255,16 +316,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();
@@ -276,19 +337,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>