Explorar el Código

-修改密封点重复验证提示
-修改删除检测任务时不删除检测点的问题

jiangbiao hace 2 años
padre
commit
b3cfb4b10f

+ 2 - 6
master/src/main/java/com/ruoyi/project/base/controller/TBasePointController.java

@@ -120,14 +120,10 @@ public class TBasePointController extends BaseController {
                 tBasePoint.setCreaterCode(getUserId());
                 return toAjax(tBasePointService.insertTBasePoint(tBasePoint));
             } else {
-                return AjaxResult.success("当前装置下的密封点已存在该群组编号和扩展编码!", 0);
+                return AjaxResult.error("当前装置下的密封点已存在该群组编号和扩展编码!");
             }
-        } catch (MyBatisSystemException e) {
-            e.printStackTrace();
-            return AjaxResult.success("当前装置下的密封点已存在该群组编号和扩展编码!", 0);
         } catch (Exception e) {
-            e.printStackTrace();
-            return AjaxResult.error();
+            e.printStackTrace();return AjaxResult.error("当前装置下的密封点已存在该群组编号和扩展编码!");
         }
 
     }

+ 4 - 0
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java

@@ -413,6 +413,10 @@ public class TTaskInspectionPlanController extends BaseController {
             if (CollectionUtils.isNotEmpty(tTaskInspectionService.selectTTaskInspectionList(tTaskInspection))) {
                 return AjaxResult.error("不可删除已存在检测任务的计划!");
             }
+            TCheckCheckpoints tCheckCheckpoints = new TCheckCheckpoints();
+            tCheckCheckpoints.setChoose("4");
+            tCheckCheckpoints.setPlanId(id);
+            tCheckCheckpointsService.deleteCheckpoints(tCheckCheckpoints);
         }
         return toAjax(tTaskInspectionPlanService.deleteTTaskInspectionPlanByIds(ids));
     }

+ 26 - 19
ui/src/views/base/point/index.vue

@@ -273,7 +273,8 @@
             type="text"
             icon="el-icon-view"
             @click="handleSee(scope.row,true)"
-          >{{ $t('预览') }}</el-button>
+          >{{ $t('预览') }}
+          </el-button>
         </template>
       </el-table-column>
       <el-table-column label="群组照片号" align="center" prop="picNo" width="110" :show-overflow-tooltip="true">
@@ -284,7 +285,8 @@
             type="text"
             icon="el-icon-view"
             @click="handleSee(scope.row,false)"
-          >{{ $t('预览') }}</el-button>
+          >{{ $t('预览') }}
+          </el-button>
         </template>
       </el-table-column>
       <el-table-column label="TOC质量分数" align="center" prop="tocMark" width="110" :show-overflow-tooltip="true"/>
@@ -631,7 +633,16 @@
 </template>
 
 <script>
-import {listPoint, getPoint, delPoint, addPoint, updatePoint, handleApprove,handleApproveAll, handleUpload} from "@/api/base/point";
+import {
+  listPoint,
+  getPoint,
+  delPoint,
+  addPoint,
+  updatePoint,
+  handleApprove,
+  handleApproveAll,
+  handleUpload
+} from "@/api/base/point";
 import {getAllPlantName} from "@/api/base/plant";
 import {getAllRegion} from "@/api/base/region";
 import {getAllDeviceByRegionId} from "@/api/base/device";
@@ -645,7 +656,7 @@ export default {
   components: {PointDetail},
   data() {
     return {
-      pic : {
+      pic: {
         title: '图片预览',
         picUrl: '',
         numPages: null,
@@ -653,7 +664,7 @@ export default {
         pageNum: 1,
         pageTotalNum: 1,
         loadedRatio: 0,
-        picList:[],
+        picList: [],
       },
 
       detailVisible: false,
@@ -826,9 +837,9 @@ export default {
     })
   },
   methods: {
-    handleSee (row,flag){
+    handleSee(row, flag) {
       this.pic.picList = []
-      this.pic.open =true
+      this.pic.open = true
       if (flag) {
         this.pic.title = row.pidNo
         this.pic.picUrl = process.env.VUE_APP_BASE_API + row.pidUrl;
@@ -845,7 +856,7 @@ export default {
     //附件上传成功处理
     handleFileDocSuccess(response, file, fileList) {
       let data = {};
-      if (this.pidFlag==1)
+      if (this.pidFlag == 1)
         data.pidUrl = response.msg;
       else
         data.picUrl = response.msg;
@@ -855,7 +866,7 @@ export default {
       handleUpload(data).then(() => {
         this.getList();
       })
-      this.fileList=[];
+      this.fileList = [];
       this.doc.open = false;
     },
     handleExceed(files, fileList) {
@@ -1096,13 +1107,9 @@ export default {
             });
           } else {
             addPoint(this.form).then(response => {
-              if (response.data != 0) {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              } else {
-                this.$modal.msgWarning(response.msg);
-              }
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
             });
           }
         }
@@ -1157,8 +1164,8 @@ export default {
       });
     },
     handleApproveAll(status) {
-       let data = deepClone(this.queryParams);
-       data.approveStatus = status
+      let data = deepClone(this.queryParams);
+      data.approveStatus = status
       handleApproveAll(data).then(response => {
         this.$modal.msgSuccess(response.msg);
         this.getList();
@@ -1168,7 +1175,7 @@ export default {
       this.doc.open = true;
       this.doc.title = title;
       this.pidFlag = flag;
-      this.fileList=[];
+      this.fileList = [];
     }
   }
 };