wanggaokun vor 1 Jahr
Ursprung
Commit
d2ebf3f815
29 geänderte Dateien mit 1641 neuen und 1127 gelöschten Zeilen
  1. 22 0
      pom.xml
  2. 2 0
      tfis-admin/src/main/java/com/tfis/TFISApplication.java
  3. 28 39
      tfis-admin/src/main/java/com/tfis/system/controller/AircraftSubsystemController.java
  4. 29 33
      tfis-admin/src/main/java/com/tfis/system/controller/AircraftSystemController.java
  5. 25 33
      tfis-admin/src/main/java/com/tfis/system/controller/AircraftTypeController.java
  6. 35 31
      tfis-admin/src/main/java/com/tfis/system/controller/FaultCaseController.java
  7. 40 41
      tfis-admin/src/main/java/com/tfis/system/domain/AircraftSubsystem.java
  8. 39 42
      tfis-admin/src/main/java/com/tfis/system/domain/AircraftSystem.java
  9. 38 42
      tfis-admin/src/main/java/com/tfis/system/domain/AircraftType.java
  10. 130 15
      tfis-admin/src/main/java/com/tfis/system/domain/FaultCase.java
  11. 10 0
      tfis-admin/src/main/java/com/tfis/system/es/mapper/EsFaultCaseMapper.java
  12. 12 10
      tfis-admin/src/main/java/com/tfis/system/mapper/AircraftSubsystemMapper.java
  13. 12 10
      tfis-admin/src/main/java/com/tfis/system/mapper/AircraftSystemMapper.java
  14. 10 10
      tfis-admin/src/main/java/com/tfis/system/mapper/AircraftTypeMapper.java
  15. 10 10
      tfis-admin/src/main/java/com/tfis/system/mapper/FaultCaseMapper.java
  16. 10 10
      tfis-admin/src/main/java/com/tfis/system/service/IAircraftSubsystemService.java
  17. 11 12
      tfis-admin/src/main/java/com/tfis/system/service/IAircraftSystemService.java
  18. 10 12
      tfis-admin/src/main/java/com/tfis/system/service/IAircraftTypeService.java
  19. 11 10
      tfis-admin/src/main/java/com/tfis/system/service/IFaultCaseService.java
  20. 20 26
      tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftSubsystemServiceImpl.java
  21. 20 26
      tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftSystemServiceImpl.java
  22. 19 27
      tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftTypeServiceImpl.java
  23. 43 26
      tfis-admin/src/main/java/com/tfis/system/service/impl/FaultCaseServiceImpl.java
  24. 7 2
      tfis-admin/src/main/resources/application-druid.yml
  25. 14 0
      tfis-framework/pom.xml
  26. 12 1
      tfis-system/pom.xml
  27. 7 0
      tfis-ui/src/api/system/case.js
  28. 575 355
      tfis-ui/src/views/index.vue
  29. 440 304
      tfis-ui/src/views/system/case/index.vue

+ 22 - 0
pom.xml

@@ -30,11 +30,33 @@
         <poi.version>4.1.2</poi.version>
         <velocity.version>2.3</velocity.version>
         <jwt.version>0.9.1</jwt.version>
+        <easy-es.version>2.0.0-beta4</easy-es.version>
+        <es.version>7.12.1</es.version>
     </properties>
 	
     <!-- 依赖声明 -->
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.elasticsearch.client</groupId>
+                <artifactId>elasticsearch-rest-high-level-client</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.elasticsearch.client</groupId>
+                <artifactId>elasticsearch-rest-client</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.elasticsearch</groupId>
+                <artifactId>elasticsearch</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.dromara.easy-es</groupId>
+                <artifactId>easy-es-boot-starter</artifactId>
+                <version>${easy-es.version}</version>
+            </dependency>
 
             <!-- SpringBoot的依赖配置-->
             <dependency>

+ 2 - 0
tfis-admin/src/main/java/com/tfis/TFISApplication.java

@@ -1,5 +1,6 @@
 package com.tfis;
 
+import org.dromara.easyes.starter.register.EsMapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  * @author allen
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@EsMapperScan("com.tfis.system.es.mapper")
 public class TFISApplication
 {
     public static void main(String[] args)

+ 28 - 39
tfis-admin/src/main/java/com/tfis/system/controller/AircraftSubsystemController.java

@@ -1,38 +1,36 @@
 package com.tfis.system.controller;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
-import com.tfis.common.core.domain.entity.SysUser;
-import org.springframework.security.access.prepost.PreAuthorize;
+import com.tfis.common.annotation.Log;
+import com.tfis.common.core.controller.BaseController;
+import com.tfis.common.core.domain.AjaxResult;
+import com.tfis.common.core.page.TableDataInfo;
+import com.tfis.common.enums.BusinessType;
+import com.tfis.common.utils.poi.ExcelUtil;
+import com.tfis.system.domain.AircraftSubsystem;
+import com.tfis.system.service.IAircraftSubsystemService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.tfis.common.annotation.Log;
-import com.tfis.common.core.controller.BaseController;
-import com.tfis.common.core.domain.AjaxResult;
-import com.tfis.common.enums.BusinessType;
-import com.tfis.system.domain.AircraftSubsystem;
-import com.tfis.system.service.IAircraftSubsystemService;
-import com.tfis.common.utils.poi.ExcelUtil;
-import com.tfis.common.core.page.TableDataInfo;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 分系统信息管理Controller
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @RestController
 @RequestMapping("/system/subsystem")
-public class AircraftSubsystemController extends BaseController
-{
+public class AircraftSubsystemController extends BaseController {
     @Autowired
     private IAircraftSubsystemService aircraftSubsystemService;
 
@@ -41,8 +39,7 @@ public class AircraftSubsystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:subsystem:list')")
     @GetMapping("/list")
-    public TableDataInfo list(AircraftSubsystem aircraftSubsystem)
-    {
+    public TableDataInfo list(AircraftSubsystem aircraftSubsystem) {
         startPage();
         List<AircraftSubsystem> list = aircraftSubsystemService.selectAircraftSubsystemList(aircraftSubsystem);
         return getDataTable(list);
@@ -54,8 +51,7 @@ public class AircraftSubsystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:subsystem:export')")
     @Log(title = "分系统信息管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, AircraftSubsystem aircraftSubsystem)
-    {
+    public void export(HttpServletResponse response, AircraftSubsystem aircraftSubsystem) {
         List<AircraftSubsystem> list = aircraftSubsystemService.selectAircraftSubsystemList(aircraftSubsystem);
         ExcelUtil<AircraftSubsystem> util = new ExcelUtil<AircraftSubsystem>(AircraftSubsystem.class);
         util.exportExcel(response, list, "分系统信息管理数据");
@@ -66,8 +62,7 @@ public class AircraftSubsystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:subsystem:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(aircraftSubsystemService.selectAircraftSubsystemById(id));
     }
 
@@ -77,8 +72,7 @@ public class AircraftSubsystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:subsystem:add')")
     @Log(title = "分系统信息管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody AircraftSubsystem aircraftSubsystem)
-    {
+    public AjaxResult add(@RequestBody AircraftSubsystem aircraftSubsystem) {
         aircraftSubsystem.setCreateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftSubsystemService.insertAircraftSubsystem(aircraftSubsystem));
     }
@@ -89,8 +83,7 @@ public class AircraftSubsystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:subsystem:edit')")
     @Log(title = "分系统信息管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody AircraftSubsystem aircraftSubsystem)
-    {
+    public AjaxResult edit(@RequestBody AircraftSubsystem aircraftSubsystem) {
         aircraftSubsystem.setUpdateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftSubsystemService.updateAircraftSubsystem(aircraftSubsystem));
     }
@@ -100,31 +93,27 @@ public class AircraftSubsystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:subsystem:remove')")
     @Log(title = "分系统信息管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(aircraftSubsystemService.deleteAircraftSubsystemByIds(ids));
     }
 
-//    @PreAuthorize("@ss.hasPermi('system:subsystem:getsubsystemoption')")
+    //    @PreAuthorize("@ss.hasPermi('system:subsystem:getsubsystemoption')")
     @GetMapping(value = "/airsubsystem/{aircraftSystemId}")
-    public AjaxResult getSystemOption(@PathVariable("aircraftSystemId") Long aircraftsystemid)
-    {
+    public AjaxResult getSystemOption(@PathVariable("aircraftSystemId") Long aircraftsystemid) {
         return success(aircraftSubsystemService.getSubSystemOption(aircraftsystemid));
     }
 
 
     @GetMapping(value = "/airtts/{aircraftSystemId}")
-    public boolean checktsExistence(@PathVariable("aircraftSystemId") Long aircraftSystemId)
-    {
+    public boolean checktsExistence(@PathVariable("aircraftSystemId") Long aircraftSystemId) {
         logger.info(String.valueOf(aircraftSystemId));
         int count = aircraftSubsystemService.getSubSystemOption(aircraftSystemId).size();
-        return count>0;
+        return count > 0;
     }
 
     @GetMapping("/getSubOption")
-    public AjaxResult getOption()
-    {
+    public AjaxResult getOption() {
         return success(aircraftSubsystemService.getSubOption());
     }
 }

+ 29 - 33
tfis-admin/src/main/java/com/tfis/system/controller/AircraftSystemController.java

@@ -1,29 +1,36 @@
 package com.tfis.system.controller;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
 import com.tfis.common.annotation.Log;
 import com.tfis.common.core.controller.BaseController;
 import com.tfis.common.core.domain.AjaxResult;
+import com.tfis.common.core.page.TableDataInfo;
 import com.tfis.common.enums.BusinessType;
+import com.tfis.common.utils.poi.ExcelUtil;
 import com.tfis.system.domain.AircraftSystem;
 import com.tfis.system.service.IAircraftSystemService;
-import com.tfis.common.utils.poi.ExcelUtil;
-import com.tfis.common.core.page.TableDataInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 系统信息管理Controller
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @RestController
 @RequestMapping("/system/system")
-public class AircraftSystemController extends BaseController
-{
+public class AircraftSystemController extends BaseController {
     @Autowired
     private IAircraftSystemService aircraftSystemService;
 
@@ -32,8 +39,7 @@ public class AircraftSystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:system:list')")
     @GetMapping("/list")
-    public TableDataInfo list(AircraftSystem aircraftSystem)
-    {
+    public TableDataInfo list(AircraftSystem aircraftSystem) {
         startPage();
         List<AircraftSystem> list = aircraftSystemService.selectAircraftSystemList(aircraftSystem);
         return getDataTable(list);
@@ -45,8 +51,7 @@ public class AircraftSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:export')")
     @Log(title = "系统信息管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, AircraftSystem aircraftSystem)
-    {
+    public void export(HttpServletResponse response, AircraftSystem aircraftSystem) {
         List<AircraftSystem> list = aircraftSystemService.selectAircraftSystemList(aircraftSystem);
         ExcelUtil<AircraftSystem> util = new ExcelUtil<AircraftSystem>(AircraftSystem.class);
         util.exportExcel(response, list, "系统信息管理数据");
@@ -57,8 +62,7 @@ public class AircraftSystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:system:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(aircraftSystemService.selectAircraftSystemById(id));
     }
 
@@ -68,8 +72,7 @@ public class AircraftSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:add')")
     @Log(title = "系统信息管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody AircraftSystem aircraftSystem)
-    {
+    public AjaxResult add(@RequestBody AircraftSystem aircraftSystem) {
         aircraftSystem.setCreateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftSystemService.insertAircraftSystem(aircraftSystem));
     }
@@ -80,8 +83,7 @@ public class AircraftSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:edit')")
     @Log(title = "系统信息管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody AircraftSystem aircraftSystem)
-    {
+    public AjaxResult edit(@RequestBody AircraftSystem aircraftSystem) {
         aircraftSystem.setUpdateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftSystemService.updateAircraftSystem(aircraftSystem));
     }
@@ -91,37 +93,31 @@ public class AircraftSystemController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:system:remove')")
     @Log(title = "系统信息管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(aircraftSystemService.deleteAircraftSystemByIds(ids));
     }
 
-//    @PreAuthorize("@ss.hasPermi('system:system:getsystemoption')")
+    //    @PreAuthorize("@ss.hasPermi('system:system:getsystemoption')")
     @GetMapping(value = "/airsystem/{aircraftTypeId}")
-    public AjaxResult getSystemOption(@PathVariable("aircraftTypeId") Long aircraftTypeId)
-    {
+    public AjaxResult getSystemOption(@PathVariable("aircraftTypeId") Long aircraftTypeId) {
         logger.info(String.valueOf(aircraftTypeId));
         return success(aircraftSystemService.getSystemOption(aircraftTypeId));
     }
 
     @GetMapping(value = "/airts/{aircraftTypeId}")
-    public boolean checktsExistence(@PathVariable("aircraftTypeId") Long aircraftTypeId)
-    {
+    public boolean checktsExistence(@PathVariable("aircraftTypeId") Long aircraftTypeId) {
         logger.info(String.valueOf(aircraftTypeId));
         int count = aircraftSystemService.getSystemOption(aircraftTypeId).size();
-        return count>0;
+        return count > 0;
     }
 
 
-
     @GetMapping("/getSysOption")
-    public AjaxResult getOption()
-    {
+    public AjaxResult getOption() {
         return success(aircraftSystemService.getSysOption());
     }
 
 
-
 }
 

+ 25 - 33
tfis-admin/src/main/java/com/tfis/system/controller/AircraftTypeController.java

@@ -1,36 +1,36 @@
 package com.tfis.system.controller;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
+import com.tfis.common.annotation.Log;
+import com.tfis.common.core.controller.BaseController;
+import com.tfis.common.core.domain.AjaxResult;
+import com.tfis.common.core.page.TableDataInfo;
+import com.tfis.common.enums.BusinessType;
+import com.tfis.common.utils.poi.ExcelUtil;
+import com.tfis.system.domain.AircraftType;
+import com.tfis.system.service.IAircraftTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.tfis.common.annotation.Log;
-import com.tfis.common.core.controller.BaseController;
-import com.tfis.common.core.domain.AjaxResult;
-import com.tfis.common.enums.BusinessType;
-import com.tfis.system.domain.AircraftType;
-import com.tfis.system.service.IAircraftTypeService;
-import com.tfis.common.utils.poi.ExcelUtil;
-import com.tfis.common.core.page.TableDataInfo;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 机型信息管理Controller
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @RestController
 @RequestMapping("/system/type")
-public class AircraftTypeController extends BaseController
-{
+public class AircraftTypeController extends BaseController {
     @Autowired
     private IAircraftTypeService aircraftTypeService;
 
@@ -39,8 +39,7 @@ public class AircraftTypeController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:type:list')")
     @GetMapping("/list")
-    public TableDataInfo list(AircraftType aircraftType)
-    {
+    public TableDataInfo list(AircraftType aircraftType) {
         startPage();
         List<AircraftType> list = aircraftTypeService.selectAircraftTypeList(aircraftType);
         return getDataTable(list);
@@ -52,8 +51,7 @@ public class AircraftTypeController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:type:export')")
     @Log(title = "机型信息管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, AircraftType aircraftType)
-    {
+    public void export(HttpServletResponse response, AircraftType aircraftType) {
         List<AircraftType> list = aircraftTypeService.selectAircraftTypeList(aircraftType);
         ExcelUtil<AircraftType> util = new ExcelUtil<AircraftType>(AircraftType.class);
         util.exportExcel(response, list, "机型信息管理数据");
@@ -64,8 +62,7 @@ public class AircraftTypeController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:type:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(aircraftTypeService.selectAircraftTypeById(id));
     }
 
@@ -75,8 +72,7 @@ public class AircraftTypeController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:type:add')")
     @Log(title = "机型信息管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody AircraftType aircraftType)
-    {
+    public AjaxResult add(@RequestBody AircraftType aircraftType) {
         aircraftType.setCreateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftTypeService.insertAircraftType(aircraftType));
     }
@@ -87,8 +83,7 @@ public class AircraftTypeController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:type:edit')")
     @Log(title = "机型信息管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody AircraftType aircraftType)
-    {
+    public AjaxResult edit(@RequestBody AircraftType aircraftType) {
         aircraftType.setUpdateBy(getLoginUser().getUser().getUserName());
         return toAjax(aircraftTypeService.updateAircraftType(aircraftType));
     }
@@ -98,22 +93,19 @@ public class AircraftTypeController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:type:remove')")
     @Log(title = "机型信息管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(aircraftTypeService.deleteAircraftTypeByIds(ids));
     }
 
     @GetMapping("/getOption")
-    public AjaxResult getOption()
-    {
+    public AjaxResult getOption() {
         return success(aircraftTypeService.getOption());
     }
 
     @PreAuthorize("@ss.hasPermi('system:type:getTSSOption')")
     @GetMapping(value = "/getTSSOption/{aircraftTypeId}")
-    public AjaxResult getTSSOption(@PathVariable("aircraftTypeId") Long aircraftTypeId)
-    {
+    public AjaxResult getTSSOption(@PathVariable("aircraftTypeId") Long aircraftTypeId) {
         return success(aircraftTypeService.getTSSOption(aircraftTypeId));
     }
 

+ 35 - 31
tfis-admin/src/main/java/com/tfis/system/controller/FaultCaseController.java

@@ -1,36 +1,36 @@
 package com.tfis.system.controller;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
+import com.tfis.common.annotation.Log;
+import com.tfis.common.core.controller.BaseController;
+import com.tfis.common.core.domain.AjaxResult;
+import com.tfis.common.core.page.TableDataInfo;
+import com.tfis.common.enums.BusinessType;
+import com.tfis.common.utils.poi.ExcelUtil;
+import com.tfis.system.domain.FaultCase;
+import com.tfis.system.service.IFaultCaseService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.tfis.common.annotation.Log;
-import com.tfis.common.core.controller.BaseController;
-import com.tfis.common.core.domain.AjaxResult;
-import com.tfis.common.enums.BusinessType;
-import com.tfis.system.domain.FaultCase;
-import com.tfis.system.service.IFaultCaseService;
-import com.tfis.common.utils.poi.ExcelUtil;
-import com.tfis.common.core.page.TableDataInfo;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 故障案例管理Controller
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @RestController
 @RequestMapping("/system/case")
-public class FaultCaseController extends BaseController
-{
+public class FaultCaseController extends BaseController {
     @Autowired
     private IFaultCaseService faultCaseService;
 
@@ -39,8 +39,18 @@ public class FaultCaseController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('system:case:list')")
     @GetMapping("/list")
-    public TableDataInfo list(FaultCase faultCase)
-    {
+    public TableDataInfo list(FaultCase faultCase) {
+        startPage();
+        List<FaultCase> list = faultCaseService.selectFaultCaseList(faultCase);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询故障案例管理列表
+     */
+//    @PreAuthorize("@ss.hasPermi('system:case:list')")
+    @GetMapping("/esList")
+    public TableDataInfo esList(FaultCase faultCase) {
         startPage();
         List<FaultCase> list = faultCaseService.selectFaultCaseList(faultCase);
         return getDataTable(list);
@@ -52,8 +62,7 @@ public class FaultCaseController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:case:export')")
     @Log(title = "故障案例管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, FaultCase faultCase)
-    {
+    public void export(HttpServletResponse response, FaultCase faultCase) {
         List<FaultCase> list = faultCaseService.selectFaultCaseList(faultCase);
         ExcelUtil<FaultCase> util = new ExcelUtil<FaultCase>(FaultCase.class);
         util.exportExcel(response, list, "故障案例管理数据");
@@ -64,8 +73,7 @@ public class FaultCaseController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:case:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(faultCaseService.selectFaultCaseById(id));
     }
 
@@ -75,8 +83,7 @@ public class FaultCaseController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:case:add')")
     @Log(title = "故障案例管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody FaultCase faultCase)
-    {
+    public AjaxResult add(@RequestBody FaultCase faultCase) {
         faultCase.setCreateBy(getLoginUser().getUser().getUserName());
         return toAjax(faultCaseService.insertFaultCase(faultCase));
     }
@@ -87,8 +94,7 @@ public class FaultCaseController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:case:edit')")
     @Log(title = "故障案例管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody FaultCase faultCase)
-    {
+    public AjaxResult edit(@RequestBody FaultCase faultCase) {
         faultCase.setUpdateBy(getLoginUser().getUser().getUserName());
         return toAjax(faultCaseService.updateFaultCase(faultCase));
     }
@@ -98,16 +104,14 @@ public class FaultCaseController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:case:remove')")
     @Log(title = "故障案例管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(faultCaseService.deleteFaultCaseByIds(ids));
     }
 
     @PreAuthorize("@ss.hasPermi('system:case:query')")
     @GetMapping(value = "/countPlus/{id}")
-    public AjaxResult countPlus(@PathVariable("id") Long id)
-    {
+    public AjaxResult countPlus(@PathVariable("id") Long id) {
         return success(faultCaseService.countPlus(id));
     }
 

+ 40 - 41
tfis-admin/src/main/java/com/tfis/system/domain/AircraftSubsystem.java

@@ -1,25 +1,36 @@
 package com.tfis.system.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.tfis.common.annotation.Excel;
 import com.tfis.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 分系统信息管理对象 biz_aircraft_subsystem
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public class AircraftSubsystem extends BaseEntity
-{
+public class AircraftSubsystem extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 编号 */
+    /**
+     * 编号
+     */
     private Long id;
 
     private String aircraftSystemName;
-    private  String aircraftSubsystemName;
+    private String aircraftSubsystemName;
+    /**
+     * 系统
+     */
+    @Excel(name = "系统")
+    private Long aircraftSystemId;
+    /**
+     * 分系统名称
+     */
+    @Excel(name = "分系统名称")
+    private String aircraftTypeName;
 
     public String getAircraftSystemName() {
         return aircraftSystemName;
@@ -37,53 +48,41 @@ public class AircraftSubsystem extends BaseEntity
         this.aircraftSubsystemName = aircraftSubsystemName;
     }
 
-    /** 系统 */
-    @Excel(name = "系统")
-    private Long aircraftSystemId;
-
-    /** 分系统名称 */
-    @Excel(name = "分系统名称")
-    private String aircraftTypeName;
+    public Long getId() {
+        return id;
+    }
 
-    public void setId(Long id) 
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public Long getAircraftSystemId() {
+        return aircraftSystemId;
     }
-    public void setAircraftSystemId(Long aircraftSystemId) 
-    {
+
+    public void setAircraftSystemId(Long aircraftSystemId) {
         this.aircraftSystemId = aircraftSystemId;
     }
 
-    public Long getAircraftSystemId() 
-    {
-        return aircraftSystemId;
-    }
-    public void setAircraftTypeName(String aircraftTypeName) 
-    {
-        this.aircraftTypeName = aircraftTypeName;
+    public String getAircraftTypeName() {
+        return aircraftTypeName;
     }
 
-    public String getAircraftTypeName() 
-    {
-        return aircraftTypeName;
+    public void setAircraftTypeName(String aircraftTypeName) {
+        this.aircraftTypeName = aircraftTypeName;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("aircraftSystemId", getAircraftSystemId())
-            .append("aircraftTypeName", getAircraftTypeName())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("aircraftSystemId", getAircraftSystemId())
+                .append("aircraftTypeName", getAircraftTypeName())
+                .append("remark", getRemark())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
     }
 }

+ 39 - 42
tfis-admin/src/main/java/com/tfis/system/domain/AircraftSystem.java

@@ -1,34 +1,39 @@
 package com.tfis.system.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.tfis.common.annotation.Excel;
 import com.tfis.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 系统信息管理对象 biz_aircraft_system
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public class AircraftSystem extends BaseEntity
-{
+public class AircraftSystem extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 编号 */
+    /**
+     * 编号
+     */
     private Long id;
 
-    /** 机型 */
+    /**
+     * 机型
+     */
     @Excel(name = "机型")
     private Long aircraftTypeId;
-
-    public void setAircraftTypeName(String aircraftTypeName) {
-        this.aircraftTypeName = aircraftTypeName;
-    }
-
-    /** 系统名称 */
+    /**
+     * 系统名称
+     */
     @Excel(name = "系统名称")
     private String aircraftTypeName;
+    private String aircraftSystemName;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
 
     public String getAircraftSystemName() {
         return aircraftSystemName;
@@ -38,49 +43,41 @@ public class AircraftSystem extends BaseEntity
         this.aircraftSystemName = aircraftSystemName;
     }
 
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
+    public Long getId() {
+        return id;
     }
 
-    private  String aircraftSystemName;
-
-
-    public void setId(Long id) 
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public Long getAircraftTypeId() {
+        return aircraftTypeId;
     }
-    public void setAircraftTypeId(Long aircraftTypeId) 
-    {
+
+    public void setAircraftTypeId(Long aircraftTypeId) {
         this.aircraftTypeId = aircraftTypeId;
     }
 
-    public Long getAircraftTypeId() 
-    {
-        return aircraftTypeId;
+    public String getAircraftTypeName() {
+        return aircraftTypeName;
     }
 
-
-    public String getAircraftTypeName()
-    {
-        return aircraftTypeName;
+    public void setAircraftTypeName(String aircraftTypeName) {
+        this.aircraftTypeName = aircraftTypeName;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("aircraftTypeId", getAircraftTypeId())
-            .append("aircraftTypeName", getAircraftTypeName())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("aircraftTypeId", getAircraftTypeId())
+                .append("aircraftTypeName", getAircraftTypeName())
+                .append("remark", getRemark())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
     }
 }

+ 38 - 42
tfis-admin/src/main/java/com/tfis/system/domain/AircraftType.java

@@ -1,29 +1,42 @@
 package com.tfis.system.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.tfis.common.annotation.Excel;
 import com.tfis.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 机型信息管理对象 biz_aircraft_type
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public class AircraftType extends BaseEntity
-{
+public class AircraftType extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 编号 */
+    /**
+     * 编号
+     */
     private Long id;
 
-    /** 机型名称 */
+    /**
+     * 机型名称
+     */
     @Excel(name = "机型名称")
     private String aircraftTypeName;
 
-    /** 系统 */
+    /**
+     * 系统
+     */
     private Long aircraftSystemId;
+    @Excel(name = "系统")
+    private String aircraftSystemName;
+    /**
+     * 分系统
+     */
+    private Long aircraftSubsystemId;
+    @Excel(name = "分系统")
+    private String aircraftSubsystemName;
 
     public Long getAircraftSystemId() {
         return aircraftSystemId;
@@ -57,49 +70,32 @@ public class AircraftType extends BaseEntity
         this.aircraftSubsystemName = aircraftSubsystemName;
     }
 
-    @Excel(name = "系统")
-    private String aircraftSystemName;
-
-    /** 分系统 */
-    private Long aircraftSubsystemId;
-
-    @Excel(name = "分系统")
-    private String aircraftSubsystemName;
-
-
-
-
-
+    public Long getId() {
+        return id;
+    }
 
-    public void setId(Long id) 
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setAircraftTypeName(String aircraftTypeName) 
-    {
-        this.aircraftTypeName = aircraftTypeName;
+    public String getAircraftTypeName() {
+        return aircraftTypeName;
     }
 
-    public String getAircraftTypeName() 
-    {
-        return aircraftTypeName;
+    public void setAircraftTypeName(String aircraftTypeName) {
+        this.aircraftTypeName = aircraftTypeName;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("aircraftTypeName", getAircraftTypeName())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("aircraftTypeName", getAircraftTypeName())
+                .append("remark", getRemark())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
     }
 }

+ 130 - 15
tfis-admin/src/main/java/com/tfis/system/domain/FaultCase.java

@@ -1,71 +1,186 @@
 package com.tfis.system.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.tfis.common.annotation.Excel;
 import com.tfis.common.core.domain.BaseEntity;
+import org.dromara.easyes.annotation.HighLight;
+import org.dromara.easyes.annotation.IndexField;
+import org.dromara.easyes.annotation.IndexId;
+import org.dromara.easyes.annotation.IndexName;
+import org.dromara.easyes.annotation.rely.Analyzer;
+import org.dromara.easyes.annotation.rely.FieldStrategy;
+import org.dromara.easyes.annotation.rely.FieldType;
+import org.dromara.easyes.annotation.rely.IdType;
+
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * 故障案例管理对象 biz_fault_case
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public class FaultCase extends BaseEntity
-{
+@IndexName("fault_case_index")
+public class FaultCase implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    /** 编号 */
+    /**
+     * 编号
+     */
+    @IndexId(type = IdType.CUSTOMIZE)
     private Long id;
 
-    /** 机型 */
+    /**
+     * 机型
+     */
 
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
     private Long aircraftTypeId;
 
     @Excel(name = "机型")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
     private String aircraftTypeName;
 
-    /** 系统 */
+    /**
+     * 系统
+     */
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
     private Long aircraftSystemId;
 
     @Excel(name = "系统")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
     private String aircraftSystemName;
 
-    /** 分系统 */
+    /**
+     * 分系统
+     */
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
     private Long aircraftSubsystemId;
 
     @Excel(name = "分系统")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
     private String aircraftSubsystemName;
 
     @Excel(name = "作者")
     private String author;
 
-    /** 故障现象 */
+    /**
+     * 故障现象
+     */
     @Excel(name = "故障现象")
+    @IndexField(value = "pContent", fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY,
+            analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_MAX_WORD)
+    @HighLight( preTag = "<font color=\"red\" >", postTag = "</font>")
     private String faultPhenomenon;
 
-    /** 故障原因 */
+    /**
+     * 故障原因
+     */
     @Excel(name = "故障原因")
+    @IndexField(value = "fContent", fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY,
+            analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_MAX_WORD)
+    @HighLight(preTag = "<font color=\"red\" >", postTag = "</font>")
     private String faultCause;
 
-    /** 故障树 */
+    /**
+     * 故障树
+     */
     @Excel(name = "故障树")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+            searchAnalyzer = Analyzer.IK_MAX_WORD)
     private String faultTreePath;
 
-    /** 故障图 */
+    /**
+     * 故障图
+     */
     @Excel(name = "故障图")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+            searchAnalyzer = Analyzer.IK_MAX_WORD)
     private String faultPicturePath;
 
-    /** 排故方法 */
+    /**
+     * 排故方法
+     */
     @Excel(name = "排故方法")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+            searchAnalyzer = Analyzer.IK_MAX_WORD)
     private String troubleshootingMethodPath;
 
-    /** 浏览次数 */
+    /**
+     * 创建者
+     */
+    @IndexField(fieldType = FieldType.TEXT)
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    @IndexField(fieldType = FieldType.TEXT)
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")
+    private Date updateTime;
+
+    /**
+     * 浏览次数
+     */
     @Excel(name = "浏览次数")
     private Long viewCount;
 
     private String orderBy;
 
+    public String getCreateBy()
+    {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy)
+    {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy()
+    {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy)
+    {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime()
+    {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime)
+    {
+        this.updateTime = updateTime;
+    }
+
     public Long getId() {
         return id;
     }

+ 10 - 0
tfis-admin/src/main/java/com/tfis/system/es/mapper/EsFaultCaseMapper.java

@@ -0,0 +1,10 @@
+package com.tfis.system.es.mapper;
+
+import com.tfis.system.domain.FaultCase;
+import org.dromara.easyes.core.core.BaseEsMapper;
+
+/**
+ * es 故障案例
+ */
+public interface EsFaultCaseMapper extends BaseEsMapper<FaultCase> {
+}

+ 12 - 10
tfis-admin/src/main/java/com/tfis/system/mapper/AircraftSubsystemMapper.java

@@ -1,19 +1,19 @@
 package com.tfis.system.mapper;
 
-import java.util.List;
 import com.tfis.system.domain.AircraftSubsystem;
 
+import java.util.List;
+
 /**
  * 分系统信息管理Mapper接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface AircraftSubsystemMapper 
-{
+public interface AircraftSubsystemMapper {
     /**
      * 查询分系统信息管理
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 分系统信息管理
      */
@@ -21,7 +21,7 @@ public interface AircraftSubsystemMapper
 
     /**
      * 查询分系统信息管理列表
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 分系统信息管理集合
      */
@@ -29,7 +29,7 @@ public interface AircraftSubsystemMapper
 
     /**
      * 新增分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface AircraftSubsystemMapper
 
     /**
      * 修改分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface AircraftSubsystemMapper
 
     /**
      * 删除分系统信息管理
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface AircraftSubsystemMapper
 
     /**
      * 批量删除分系统信息管理
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
@@ -61,12 +61,14 @@ public interface AircraftSubsystemMapper
 
     /**
      * 返回所有系统信息
+     *
      * @return
      */
     List getSubOption();
 
     /**
      * 根据系统返回分系统信息
+     *
      * @param aircraftsystemid
      * @return
      */

+ 12 - 10
tfis-admin/src/main/java/com/tfis/system/mapper/AircraftSystemMapper.java

@@ -1,19 +1,19 @@
 package com.tfis.system.mapper;
 
-import java.util.List;
 import com.tfis.system.domain.AircraftSystem;
 
+import java.util.List;
+
 /**
  * 系统信息管理Mapper接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface AircraftSystemMapper 
-{
+public interface AircraftSystemMapper {
     /**
      * 查询系统信息管理
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 系统信息管理
      */
@@ -21,7 +21,7 @@ public interface AircraftSystemMapper
 
     /**
      * 查询系统信息管理列表
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 系统信息管理集合
      */
@@ -29,7 +29,7 @@ public interface AircraftSystemMapper
 
     /**
      * 新增系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface AircraftSystemMapper
 
     /**
      * 修改系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface AircraftSystemMapper
 
     /**
      * 删除系统信息管理
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface AircraftSystemMapper
 
     /**
      * 批量删除系统信息管理
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
@@ -61,6 +61,7 @@ public interface AircraftSystemMapper
 
     /**
      * 根据机型返回系统信息
+     *
      * @param aircraftTypeId
      * @return
      */
@@ -68,6 +69,7 @@ public interface AircraftSystemMapper
 
     /**
      * 返回系统信息
+     *
      * @return
      */
     List getSysOption();

+ 10 - 10
tfis-admin/src/main/java/com/tfis/system/mapper/AircraftTypeMapper.java

@@ -1,19 +1,19 @@
 package com.tfis.system.mapper;
 
-import java.util.List;
 import com.tfis.system.domain.AircraftType;
 
+import java.util.List;
+
 /**
  * 机型信息管理Mapper接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface AircraftTypeMapper 
-{
+public interface AircraftTypeMapper {
     /**
      * 查询机型信息管理
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 机型信息管理
      */
@@ -21,7 +21,7 @@ public interface AircraftTypeMapper
 
     /**
      * 查询机型信息管理列表
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 机型信息管理集合
      */
@@ -29,7 +29,7 @@ public interface AircraftTypeMapper
 
     /**
      * 新增机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface AircraftTypeMapper
 
     /**
      * 修改机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface AircraftTypeMapper
 
     /**
      * 删除机型信息管理
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface AircraftTypeMapper
 
     /**
      * 批量删除机型信息管理
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 10 - 10
tfis-admin/src/main/java/com/tfis/system/mapper/FaultCaseMapper.java

@@ -1,19 +1,19 @@
 package com.tfis.system.mapper;
 
-import java.util.List;
 import com.tfis.system.domain.FaultCase;
 
+import java.util.List;
+
 /**
  * 故障案例管理Mapper接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface FaultCaseMapper 
-{
+public interface FaultCaseMapper {
     /**
      * 查询故障案例管理
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 故障案例管理
      */
@@ -21,7 +21,7 @@ public interface FaultCaseMapper
 
     /**
      * 查询故障案例管理列表
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 故障案例管理集合
      */
@@ -29,7 +29,7 @@ public interface FaultCaseMapper
 
     /**
      * 新增故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface FaultCaseMapper
 
     /**
      * 修改故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface FaultCaseMapper
 
     /**
      * 删除故障案例管理
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface FaultCaseMapper
 
     /**
      * 批量删除故障案例管理
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 10 - 10
tfis-admin/src/main/java/com/tfis/system/service/IAircraftSubsystemService.java

@@ -1,19 +1,19 @@
 package com.tfis.system.service;
 
-import java.util.List;
 import com.tfis.system.domain.AircraftSubsystem;
 
+import java.util.List;
+
 /**
  * 分系统信息管理Service接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface IAircraftSubsystemService 
-{
+public interface IAircraftSubsystemService {
     /**
      * 查询分系统信息管理
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 分系统信息管理
      */
@@ -21,7 +21,7 @@ public interface IAircraftSubsystemService
 
     /**
      * 查询分系统信息管理列表
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 分系统信息管理集合
      */
@@ -29,7 +29,7 @@ public interface IAircraftSubsystemService
 
     /**
      * 新增分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface IAircraftSubsystemService
 
     /**
      * 修改分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface IAircraftSubsystemService
 
     /**
      * 批量删除分系统信息管理
-     * 
+     *
      * @param ids 需要删除的分系统信息管理主键集合
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface IAircraftSubsystemService
 
     /**
      * 删除分系统信息管理信息
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 结果
      */

+ 11 - 12
tfis-admin/src/main/java/com/tfis/system/service/IAircraftSystemService.java

@@ -1,29 +1,28 @@
 package com.tfis.system.service;
 
-import java.util.List;
 import com.tfis.system.domain.AircraftSystem;
 
+import java.util.List;
+
 /**
  * 系统信息管理Service接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface IAircraftSystemService 
-{
+public interface IAircraftSystemService {
     /**
      * 查询系统信息管理
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 系统信息管理
      */
     public AircraftSystem selectAircraftSystemById(Long id);
 
 
-
     /**
      * 查询系统信息管理列表
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 系统信息管理集合
      */
@@ -31,7 +30,7 @@ public interface IAircraftSystemService
 
     /**
      * 新增系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
@@ -39,7 +38,7 @@ public interface IAircraftSystemService
 
     /**
      * 修改系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
@@ -47,7 +46,7 @@ public interface IAircraftSystemService
 
     /**
      * 批量删除系统信息管理
-     * 
+     *
      * @param ids 需要删除的系统信息管理主键集合
      * @return 结果
      */
@@ -55,14 +54,14 @@ public interface IAircraftSystemService
 
     /**
      * 删除系统信息管理信息
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 结果
      */
     public int deleteAircraftSystemById(Long id);
 
 
-    List  getSystemOption(Long aircraftTypeId);
+    List getSystemOption(Long aircraftTypeId);
 
     List getSysOption();
 }

+ 10 - 12
tfis-admin/src/main/java/com/tfis/system/service/IAircraftTypeService.java

@@ -1,21 +1,19 @@
 package com.tfis.system.service;
 
-import java.util.List;
-import java.util.Map;
-
 import com.tfis.system.domain.AircraftType;
 
+import java.util.List;
+
 /**
  * 机型信息管理Service接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface IAircraftTypeService 
-{
+public interface IAircraftTypeService {
     /**
      * 查询机型信息管理
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 机型信息管理
      */
@@ -23,7 +21,7 @@ public interface IAircraftTypeService
 
     /**
      * 查询机型信息管理列表
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 机型信息管理集合
      */
@@ -31,7 +29,7 @@ public interface IAircraftTypeService
 
     /**
      * 新增机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
@@ -39,7 +37,7 @@ public interface IAircraftTypeService
 
     /**
      * 修改机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
@@ -47,7 +45,7 @@ public interface IAircraftTypeService
 
     /**
      * 批量删除机型信息管理
-     * 
+     *
      * @param ids 需要删除的机型信息管理主键集合
      * @return 结果
      */
@@ -55,7 +53,7 @@ public interface IAircraftTypeService
 
     /**
      * 删除机型信息管理信息
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 结果
      */

+ 11 - 10
tfis-admin/src/main/java/com/tfis/system/service/IFaultCaseService.java

@@ -1,19 +1,19 @@
 package com.tfis.system.service;
 
-import java.util.List;
 import com.tfis.system.domain.FaultCase;
 
+import java.util.List;
+
 /**
  * 故障案例管理Service接口
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
-public interface IFaultCaseService 
-{
+public interface IFaultCaseService {
     /**
      * 查询故障案例管理
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 故障案例管理
      */
@@ -21,15 +21,16 @@ public interface IFaultCaseService
 
     /**
      * 查询故障案例管理列表
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 故障案例管理集合
      */
     public List<FaultCase> selectFaultCaseList(FaultCase faultCase);
+    public List<FaultCase> selectEsFaultCaseList(FaultCase faultCase);
 
     /**
      * 新增故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface IFaultCaseService
 
     /**
      * 修改故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface IFaultCaseService
 
     /**
      * 批量删除故障案例管理
-     * 
+     *
      * @param ids 需要删除的故障案例管理主键集合
      * @return 结果
      */
@@ -53,7 +54,7 @@ public interface IFaultCaseService
 
     /**
      * 删除故障案例管理信息
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 结果
      */

+ 20 - 26
tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftSubsystemServiceImpl.java

@@ -1,101 +1,95 @@
 package com.tfis.system.service.impl;
 
-import java.util.List;
 import com.tfis.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.tfis.system.mapper.AircraftSubsystemMapper;
 import com.tfis.system.domain.AircraftSubsystem;
+import com.tfis.system.mapper.AircraftSubsystemMapper;
 import com.tfis.system.service.IAircraftSubsystemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 分系统信息管理Service业务层处理
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @Service
-public class AircraftSubsystemServiceImpl implements IAircraftSubsystemService 
-{
+public class AircraftSubsystemServiceImpl implements IAircraftSubsystemService {
     @Autowired
     private AircraftSubsystemMapper aircraftSubsystemMapper;
 
     /**
      * 查询分系统信息管理
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 分系统信息管理
      */
     @Override
-    public AircraftSubsystem selectAircraftSubsystemById(Long id)
-    {
+    public AircraftSubsystem selectAircraftSubsystemById(Long id) {
         return aircraftSubsystemMapper.selectAircraftSubsystemById(id);
     }
 
     /**
      * 查询分系统信息管理列表
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 分系统信息管理
      */
     @Override
-    public List<AircraftSubsystem> selectAircraftSubsystemList(AircraftSubsystem aircraftSubsystem)
-    {
+    public List<AircraftSubsystem> selectAircraftSubsystemList(AircraftSubsystem aircraftSubsystem) {
         return aircraftSubsystemMapper.selectAircraftSubsystemList(aircraftSubsystem);
     }
 
     /**
      * 新增分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
     @Override
-    public int insertAircraftSubsystem(AircraftSubsystem aircraftSubsystem)
-    {
+    public int insertAircraftSubsystem(AircraftSubsystem aircraftSubsystem) {
         aircraftSubsystem.setCreateTime(DateUtils.getNowDate());
         return aircraftSubsystemMapper.insertAircraftSubsystem(aircraftSubsystem);
     }
 
     /**
      * 修改分系统信息管理
-     * 
+     *
      * @param aircraftSubsystem 分系统信息管理
      * @return 结果
      */
     @Override
-    public int updateAircraftSubsystem(AircraftSubsystem aircraftSubsystem)
-    {
+    public int updateAircraftSubsystem(AircraftSubsystem aircraftSubsystem) {
         aircraftSubsystem.setUpdateTime(DateUtils.getNowDate());
         return aircraftSubsystemMapper.updateAircraftSubsystem(aircraftSubsystem);
     }
 
     /**
      * 批量删除分系统信息管理
-     * 
+     *
      * @param ids 需要删除的分系统信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftSubsystemByIds(Long[] ids)
-    {
+    public int deleteAircraftSubsystemByIds(Long[] ids) {
         return aircraftSubsystemMapper.deleteAircraftSubsystemByIds(ids);
     }
 
     /**
      * 删除分系统信息管理信息
-     * 
+     *
      * @param id 分系统信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftSubsystemById(Long id)
-    {
+    public int deleteAircraftSubsystemById(Long id) {
         return aircraftSubsystemMapper.deleteAircraftSubsystemById(id);
     }
 
     @Override
-    public List getSubSystemOption(Long aircraftsystemid){
+    public List getSubSystemOption(Long aircraftsystemid) {
         return aircraftSubsystemMapper.getSubSystemOption(aircraftsystemid);
     }
 

+ 20 - 26
tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftSystemServiceImpl.java

@@ -1,101 +1,95 @@
 package com.tfis.system.service.impl;
 
-import java.util.List;
 import com.tfis.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.tfis.system.mapper.AircraftSystemMapper;
 import com.tfis.system.domain.AircraftSystem;
+import com.tfis.system.mapper.AircraftSystemMapper;
 import com.tfis.system.service.IAircraftSystemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 系统信息管理Service业务层处理
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @Service
-public class AircraftSystemServiceImpl implements IAircraftSystemService 
-{
+public class AircraftSystemServiceImpl implements IAircraftSystemService {
     @Autowired
     private AircraftSystemMapper aircraftSystemMapper;
 
     /**
      * 查询系统信息管理
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 系统信息管理
      */
     @Override
-    public AircraftSystem selectAircraftSystemById(Long id)
-    {
+    public AircraftSystem selectAircraftSystemById(Long id) {
         return aircraftSystemMapper.selectAircraftSystemById(id);
     }
 
     /**
      * 查询系统信息管理列表
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 系统信息管理
      */
     @Override
-    public List<AircraftSystem> selectAircraftSystemList(AircraftSystem aircraftSystem)
-    {
+    public List<AircraftSystem> selectAircraftSystemList(AircraftSystem aircraftSystem) {
         return aircraftSystemMapper.selectAircraftSystemList(aircraftSystem);
     }
 
     /**
      * 新增系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
     @Override
-    public int insertAircraftSystem(AircraftSystem aircraftSystem)
-    {
+    public int insertAircraftSystem(AircraftSystem aircraftSystem) {
         aircraftSystem.setCreateTime(DateUtils.getNowDate());
         return aircraftSystemMapper.insertAircraftSystem(aircraftSystem);
     }
 
     /**
      * 修改系统信息管理
-     * 
+     *
      * @param aircraftSystem 系统信息管理
      * @return 结果
      */
     @Override
-    public int updateAircraftSystem(AircraftSystem aircraftSystem)
-    {
+    public int updateAircraftSystem(AircraftSystem aircraftSystem) {
         aircraftSystem.setUpdateTime(DateUtils.getNowDate());
         return aircraftSystemMapper.updateAircraftSystem(aircraftSystem);
     }
 
     /**
      * 批量删除系统信息管理
-     * 
+     *
      * @param ids 需要删除的系统信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftSystemByIds(Long[] ids)
-    {
+    public int deleteAircraftSystemByIds(Long[] ids) {
         return aircraftSystemMapper.deleteAircraftSystemByIds(ids);
     }
 
     /**
      * 删除系统信息管理信息
-     * 
+     *
      * @param id 系统信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftSystemById(Long id)
-    {
+    public int deleteAircraftSystemById(Long id) {
         return aircraftSystemMapper.deleteAircraftSystemById(id);
     }
 
     @Override
-    public List  getSystemOption(Long aircraftTypeId){
+    public List getSystemOption(Long aircraftTypeId) {
         return aircraftSystemMapper.getSystemOption(aircraftTypeId);
     }
 

+ 19 - 27
tfis-admin/src/main/java/com/tfis/system/service/impl/AircraftTypeServiceImpl.java

@@ -1,98 +1,90 @@
 package com.tfis.system.service.impl;
 
-import java.util.List;
-import java.util.Map;
-
 import com.tfis.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.tfis.system.mapper.AircraftTypeMapper;
 import com.tfis.system.domain.AircraftType;
+import com.tfis.system.mapper.AircraftTypeMapper;
 import com.tfis.system.service.IAircraftTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 机型信息管理Service业务层处理
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @Service
-public class AircraftTypeServiceImpl implements IAircraftTypeService 
-{
+public class AircraftTypeServiceImpl implements IAircraftTypeService {
     @Autowired
     private AircraftTypeMapper aircraftTypeMapper;
 
     /**
      * 查询机型信息管理
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 机型信息管理
      */
     @Override
-    public AircraftType selectAircraftTypeById(Long id)
-    {
+    public AircraftType selectAircraftTypeById(Long id) {
         return aircraftTypeMapper.selectAircraftTypeById(id);
     }
 
     /**
      * 查询机型信息管理列表
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 机型信息管理
      */
     @Override
-    public List<AircraftType> selectAircraftTypeList(AircraftType aircraftType)
-    {
+    public List<AircraftType> selectAircraftTypeList(AircraftType aircraftType) {
         return aircraftTypeMapper.selectAircraftTypeList(aircraftType);
     }
 
     /**
      * 新增机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
     @Override
-    public int insertAircraftType(AircraftType aircraftType)
-    {
+    public int insertAircraftType(AircraftType aircraftType) {
         aircraftType.setCreateTime(DateUtils.getNowDate());
         return aircraftTypeMapper.insertAircraftType(aircraftType);
     }
 
     /**
      * 修改机型信息管理
-     * 
+     *
      * @param aircraftType 机型信息管理
      * @return 结果
      */
     @Override
-    public int updateAircraftType(AircraftType aircraftType)
-    {
+    public int updateAircraftType(AircraftType aircraftType) {
         aircraftType.setUpdateTime(DateUtils.getNowDate());
         return aircraftTypeMapper.updateAircraftType(aircraftType);
     }
 
     /**
      * 批量删除机型信息管理
-     * 
+     *
      * @param ids 需要删除的机型信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftTypeByIds(Long[] ids)
-    {
+    public int deleteAircraftTypeByIds(Long[] ids) {
         return aircraftTypeMapper.deleteAircraftTypeByIds(ids);
     }
 
     /**
      * 删除机型信息管理信息
-     * 
+     *
      * @param id 机型信息管理主键
      * @return 结果
      */
     @Override
-    public int deleteAircraftTypeById(Long id)
-    {
+    public int deleteAircraftTypeById(Long id) {
         return aircraftTypeMapper.deleteAircraftTypeById(id);
     }
 

+ 43 - 26
tfis-admin/src/main/java/com/tfis/system/service/impl/FaultCaseServiceImpl.java

@@ -1,96 +1,113 @@
 package com.tfis.system.service.impl;
 
-import java.util.List;
 import com.tfis.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.tfis.system.mapper.FaultCaseMapper;
 import com.tfis.system.domain.FaultCase;
+import com.tfis.system.es.mapper.EsFaultCaseMapper;
+import com.tfis.system.mapper.FaultCaseMapper;
 import com.tfis.system.service.IFaultCaseService;
+import org.apache.commons.lang3.StringUtils;
+import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 故障案例管理Service业务层处理
- * 
+ *
  * @author allen
  * @date 2023-11-23
  */
 @Service
-public class FaultCaseServiceImpl implements IFaultCaseService 
-{
+public class FaultCaseServiceImpl implements IFaultCaseService {
     @Autowired
     private FaultCaseMapper faultCaseMapper;
 
+    @Autowired
+    private EsFaultCaseMapper esFaultCaseMapper;
+
     /**
      * 查询故障案例管理
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 故障案例管理
      */
     @Override
-    public FaultCase selectFaultCaseById(Long id)
-    {
+    public FaultCase selectFaultCaseById(Long id) {
         return faultCaseMapper.selectFaultCaseById(id);
     }
 
     /**
      * 查询故障案例管理列表
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 故障案例管理
      */
     @Override
-    public List<FaultCase> selectFaultCaseList(FaultCase faultCase)
-    {
+    public List<FaultCase> selectFaultCaseList(FaultCase faultCase) {
         return faultCaseMapper.selectFaultCaseList(faultCase);
     }
+    @Override
+    public List<FaultCase> selectEsFaultCaseList(FaultCase faultCase) {
+        LambdaEsQueryWrapper<FaultCase> wrapper = new LambdaEsQueryWrapper<>();
+        wrapper.match(StringUtils.isNotBlank(faultCase.getFaultPhenomenon()), "pContent", faultCase.getFaultPhenomenon(), 5.0f)
+                .or()
+                .match(StringUtils.isNotBlank(faultCase.getFaultPhenomenon()), "fContent", faultCase.getFaultPhenomenon(), 5.0f);
+        if (!esFaultCaseMapper.existsIndex("fault_case_index")) {
+            esFaultCaseMapper.createIndex();
+        }
+        return esFaultCaseMapper.selectList(wrapper);
+    }
 
     /**
      * 新增故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
     @Override
-    public int insertFaultCase(FaultCase faultCase)
-    {
+    public int insertFaultCase(FaultCase faultCase) {
         faultCase.setCreateTime(DateUtils.getNowDate());
-        return faultCaseMapper.insertFaultCase(faultCase);
+        faultCaseMapper.insertFaultCase(faultCase);
+
+        return esFaultCaseMapper.insert(faultCase);
     }
 
     /**
      * 修改故障案例管理
-     * 
+     *
      * @param faultCase 故障案例管理
      * @return 结果
      */
     @Override
-    public int updateFaultCase(FaultCase faultCase)
-    {
+    public int updateFaultCase(FaultCase faultCase) {
         faultCase.setUpdateTime(DateUtils.getNowDate());
+        esFaultCaseMapper.updateById(faultCase);
         return faultCaseMapper.updateFaultCase(faultCase);
     }
 
     /**
      * 批量删除故障案例管理
-     * 
+     *
      * @param ids 需要删除的故障案例管理主键
      * @return 结果
      */
     @Override
-    public int deleteFaultCaseByIds(Long[] ids)
-    {
+    public int deleteFaultCaseByIds(Long[] ids) {
+        esFaultCaseMapper.deleteBatchIds(Arrays.asList(ids));
         return faultCaseMapper.deleteFaultCaseByIds(ids);
     }
 
     /**
      * 删除故障案例管理信息
-     * 
+     *
      * @param id 故障案例管理主键
      * @return 结果
      */
     @Override
-    public int deleteFaultCaseById(Long id)
-    {
+    public int deleteFaultCaseById(Long id) {
+        esFaultCaseMapper.deleteById(id);
         return faultCaseMapper.deleteFaultCaseById(id);
     }
 

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

@@ -1,3 +1,8 @@
+easy-es:
+    address: 127.0.0.1:9200
+    banner: false # 默认为true 打印banner 若您不期望打印banner,可配置为false
+    username: #es用户名,若无则删去此行配置
+    password: #es密码,若无则删去此行配置
 # 数据源配置
 spring:
     datasource:
@@ -6,9 +11,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://localhost:3306/tfis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://47.108.150.237:3306/tfis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-                password: 123456
+                password: w.cf123321
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 14 - 0
tfis-framework/pom.xml

@@ -21,6 +21,20 @@
          <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.elasticsearch.client</groupId>
+                     <artifactId>elasticsearch-rest-high-level-client</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>org.elasticsearch.client</groupId>
+                     <artifactId>elasticsearch-rest-client</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>org.elasticsearch</groupId>
+                     <artifactId>elasticsearch</artifactId>
+                 </exclusion>
+             </exclusions>
         </dependency>
 
         <!-- SpringBoot 拦截器 -->

+ 12 - 1
tfis-system/pom.xml

@@ -16,7 +16,18 @@
     </description>
 
     <dependencies>
-
+        <dependency>
+            <groupId>org.elasticsearch.client</groupId>
+            <artifactId>elasticsearch-rest-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.elasticsearch</groupId>
+            <artifactId>elasticsearch</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.dromara.easy-es</groupId>
+            <artifactId>easy-es-boot-starter</artifactId>
+        </dependency>
         <!-- 通用工具-->
         <dependency>
             <groupId>com.tfis</groupId>

+ 7 - 0
tfis-ui/src/api/system/case.js

@@ -8,6 +8,13 @@ export function listCase(query) {
     params: query
   })
 }
+export function esListCase(query) {
+  return request({
+    url: '/system/case/esList',
+    method: 'get',
+    params: query
+  })
+}
 
 // 查询故障案例管理详细
 export function getCase(id) {

+ 575 - 355
tfis-ui/src/views/index.vue

@@ -2,11 +2,22 @@
   <div class="app-container">
     <div v-show="isfirstView" class="centerClass">
       <div class="centered-content">
-        <img :src="require('@/assets/images/j20_new.jpg')">
-        <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
+        <img :src="require('@/assets/images/j20_new.jpg')" />
+        <el-form
+          v-show="showSearch"
+          ref="queryForm"
+          :model="queryParams"
+          size="small"
+          :inline="true"
+          label-width="68px"
+        >
           <el-row>
             <el-form-item label="机型" prop="aircraftTypeId">
-              <el-select v-model="queryParams.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange">
+              <el-select
+                v-model="queryParams.aircraftTypeId"
+                placeholder="请选择"
+                @change="handleaircraftChange"
+              >
                 <el-option
                   v-for="item in typeOption"
                   :key="item.id"
@@ -16,7 +27,11 @@
               </el-select>
             </el-form-item>
             <el-form-item label="系统" prop="aircraftSystemId">
-              <el-select v-model="queryParams.aircraftSystemId" placeholder="请选择" @change="handlesystemChange">
+              <el-select
+                v-model="queryParams.aircraftSystemId"
+                placeholder="请选择"
+                @change="handlesystemChange"
+              >
                 <el-option
                   v-for="item in systemOption"
                   :key="item.id"
@@ -26,7 +41,10 @@
               </el-select>
             </el-form-item>
             <el-form-item label="分系统" prop="aircraftSubsystemId">
-              <el-select v-model="queryParams.aircraftSubsystemId" placeholder="请选择">
+              <el-select
+                v-model="queryParams.aircraftSubsystemId"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="item in subSystemOption"
                   :key="item.id"
@@ -35,27 +53,46 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="故障现象" prop="faultPhenomenon">
+            <el-form-item label="故障" prop="faultPhenomenon">
               <el-input
                 v-model="queryParams.faultPhenomenon"
-                placeholder="请输入故障现象"
+                placeholder="请输入故障"
                 clearable
                 @keyup.enter.native="handleQuery"
               />
             </el-form-item>
             <el-form-item>
-              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+              <el-button
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="handleQuery"
+                >搜索</el-button
+              >
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+                >重置</el-button
+              >
             </el-form-item>
           </el-row>
         </el-form>
       </div>
     </div>
     <div v-show="!isfirstView">
-      <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
+      <el-form
+        v-show="showSearch"
+        ref="queryForm"
+        :model="queryParams"
+        size="small"
+        :inline="true"
+        label-width="68px"
+      >
         <el-row>
           <el-form-item label="机型" prop="aircraftTypeId">
-            <el-select v-model="queryParams.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange">
+            <el-select
+              v-model="queryParams.aircraftTypeId"
+              placeholder="请选择"
+              @change="handleaircraftChange"
+            >
               <el-option
                 v-for="item in typeOption"
                 :key="item.id"
@@ -65,7 +102,11 @@
             </el-select>
           </el-form-item>
           <el-form-item label="系统" prop="aircraftSystemId">
-            <el-select v-model="queryParams.aircraftSystemId" placeholder="请选择" @change="handlesystemChange">
+            <el-select
+              v-model="queryParams.aircraftSystemId"
+              placeholder="请选择"
+              @change="handlesystemChange"
+            >
               <el-option
                 v-for="item in systemOption"
                 :key="item.id"
@@ -75,7 +116,10 @@
             </el-select>
           </el-form-item>
           <el-form-item label="分系统" prop="aircraftSubsystemId">
-            <el-select v-model="queryParams.aircraftSubsystemId" placeholder="请选择">
+            <el-select
+              v-model="queryParams.aircraftSubsystemId"
+              placeholder="请选择"
+            >
               <el-option
                 v-for="item in subSystemOption"
                 :key="item.id"
@@ -93,13 +137,25 @@
             />
           </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-row>
         <el-row>
           <el-form-item label="排序" prop="orderBy">
-            <el-select v-model="queryParams.orderBy" placeholder="请选择" @change="changeOrderBy">
+            <el-select
+              v-model="queryParams.orderBy"
+              placeholder="请选择"
+              @change="changeOrderBy"
+            >
               <el-option
                 v-for="item in orderByOption"
                 :key="item.id"
@@ -116,129 +172,263 @@
       </el-row>
       <el-row>
         <el-col v-for="varCase in caseList" :key="varCase.id" :span="8">
-          <el-card class="box-card" style="margin:10px">
+          <el-card class="box-card" style="margin: 10px">
             <div class="rounded-corners">
-              <el-row style="background: #d3dce6;">
-                <el-col :span="6"><div class="grid-content bg-purple" style="background-color: dodgerblue;text-align: center"><img :src="require('@/assets/icons/aircraft.png')" style="width: 1rem"><br>机型</div></el-col>
-                <el-col :span="18"><div class="grid-content bg-purple-light flex-center">{{ varCase.aircraftTypeName }}</div></el-col>
+              <el-row style="background: #d3dce6">
+                <el-col :span="6"
+                  ><div
+                    class="grid-content bg-purple"
+                    style="background-color: dodgerblue; text-align: center"
+                  >
+                    <img
+                      :src="require('@/assets/icons/aircraft.png')"
+                      style="width: 1rem"
+                    /><br />机型
+                  </div></el-col
+                >
+                <el-col :span="18"
+                  ><div class="grid-content bg-purple-light flex-center">
+                    {{ varCase.aircraftTypeName }}
+                  </div></el-col
+                >
               </el-row>
-              <el-row style="background: #e5e9f2;">
-                <el-col :span="6"><div class="grid-content bg-purple" style="background-color: rgb(56, 154, 251);text-align: center"><img :src="require('@/assets/icons/system.png')" style="width: 1rem"><br>系统</div></el-col>
-                <el-col :span="18"><div class="grid-content bg-purple-light flex-center">{{ varCase.aircraftSystemName }}</div></el-col>
+              <el-row style="background: #e5e9f2">
+                <el-col :span="6"
+                  ><div
+                    class="grid-content bg-purple"
+                    style="
+                      background-color: rgb(56, 154, 251);
+                      text-align: center;
+                    "
+                  >
+                    <img
+                      :src="require('@/assets/icons/system.png')"
+                      style="width: 1rem"
+                    /><br />系统
+                  </div></el-col
+                >
+                <el-col :span="18"
+                  ><div class="grid-content bg-purple-light flex-center">
+                    {{ varCase.aircraftSystemName }}
+                  </div></el-col
+                >
               </el-row>
-              <el-row style="background: #d3dce6;">
-                <el-col :span="6"><div class="grid-content bg-purple" style="background-color: dodgerblue;text-align: center"><img :src="require('@/assets/icons/subsystem.png')" style="width: 1rem"><br>分系统</div></el-col>
-                <el-col :span="18"><div class="grid-content bg-purple-light flex-center"> {{ varCase.aircraftSubsystemName }}</div></el-col>
+              <el-row style="background: #d3dce6">
+                <el-col :span="6"
+                  ><div
+                    class="grid-content bg-purple"
+                    style="background-color: dodgerblue; text-align: center"
+                  >
+                    <img
+                      :src="require('@/assets/icons/subsystem.png')"
+                      style="width: 1rem"
+                    /><br />分系统
+                  </div></el-col
+                >
+                <el-col :span="18"
+                  ><div class="grid-content bg-purple-light flex-center">
+                    {{ varCase.aircraftSubsystemName }}
+                  </div></el-col
+                >
               </el-row>
-              <el-row style="background: #e5e9f2;">
-                <el-col :span="6"><div class="grid-content bg-purple" style="background-color: rgb(56, 154, 251);text-align: center"><img :src="require('@/assets/icons/fault.png')" style="width: 1rem"><br>故障现象</div></el-col>
-                <el-col :span="18"><div class="grid-content bg-purple-light flex-center"> {{ truncatedText(varCase.faultPhenomenon) }}</div></el-col>
+              <el-row style="background: #e5e9f2">
+                <el-col :span="6"
+                  ><div
+                    class="grid-content bg-purple"
+                    style="
+                      background-color: rgb(56, 154, 251);
+                      text-align: center;
+                    "
+                  >
+                    <img
+                      :src="require('@/assets/icons/fault.png')"
+                      style="width: 1rem"
+                    /><br />故障现象
+                  </div></el-col
+                >
+                <el-col :span="18"
+                  ><div class="grid-content bg-purple-light flex-center">
+                    <span v-html="varCase.faultPhenomenon"></span></div
+                ></el-col>
+              </el-row>
+              <el-row style="background: #e5e9f2">
+                <el-col :span="6"
+                  ><div
+                    class="grid-content bg-purple"
+                    style="
+                      background-color: rgb(56, 154, 251);
+                      text-align: center;
+                    "
+                  >
+                    <img
+                      :src="require('@/assets/icons/fault.png')"
+                      style="width: 1rem"
+                    /><br />故障原因
+                  </div></el-col
+                >
+                <el-col :span="18"
+                  ><div class="grid-content bg-purple-light flex-center">
+                    <span v-html="varCase.faultCause"></span></div
+                ></el-col>
               </el-row>
             </div>
-            <el-divider style="margin: 12px 0;" />
+            <el-divider style="margin: 12px 0" />
             <div class="container">
-              <div class="left"><el-button type="text" class="button" @click="handleUpdate(varCase.id)">查看详情</el-button></div>
-              <div class="right"><time class="time">{{ varCase.createTime }}</time> <img :src="require('@/assets/icons/hot.png')" style="width: 1rem"> {{ varCase.viewCount }}</div>
+              <div class="left">
+                <el-button
+                  type="text"
+                  class="button"
+                  @click="handleUpdate(varCase.id)"
+                  >查看详情</el-button
+                >
+              </div>
+              <div class="right">
+                <time class="time">{{ varCase.createTime }}</time>
+                <img
+                  :src="require('@/assets/icons/hot.png')"
+                  style="width: 1rem"
+                />
+                {{ varCase.viewCount }}
+              </div>
             </div>
           </el-card>
         </el-col>
       </el-row>
 
       <pagination
-        v-show="total>0"
+        v-show="total > 0"
         :total="total"
         :page.sync="queryParams.pageNum"
         :limit.sync="queryParams.pageSize"
-        :page-sizes="[12,24,36,48]"
+        :page-sizes="[12, 24, 36, 48]"
         @pagination="getList"
       />
 
       <!-- 添加或修改故障案例管理对话框 -->
-      <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
+      <el-dialog
+        :title="title"
+        :visible.sync="open"
+        width="80%"
+        append-to-body
+        :close-on-click-modal="false"
+        :close-on-press-escape="false"
+      >
         <el-form ref="form" :model="form" :rules="rules" label-width="80px">
           <el-row>
-            <el-col :span="6"><div class="grid-content bg-purple">
-              <el-form-item label="机型" prop="faultPhenomenon">
-                <el-select v-model="form.aircraftTypeId" readonly @change="handleaircraftChange1">
-                  <el-option
-                    v-for="item in typeOption1"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id"
-                  />
-                </el-select>
-              </el-form-item>
-            </div></el-col>
-            <el-col :span="6"><div class="grid-content bg-purple">
-              <el-form-item label="系统" prop="aircraftSystemId">
-                <el-select v-model="form.aircraftSystemId" readonly @change="handlesystemChange1">
-                  <el-option
-                    v-for="item in systemOption1"
-                    :key="item.id"
-                    :label="item.aircraftSystemName"
-                    :value="item.id"
-                  />
-                </el-select>
-              </el-form-item>
-            </div></el-col>
-            <el-col :span="6"><div class="grid-content bg-purple">
-              <el-form-item label="分系统" prop="aircraftSubsystemId">
-                <el-select v-model="form.aircraftSubsystemId" readonly>
-                  <el-option
-                    v-for="item in subSystemOption1"
-                    :key="item.id"
-                    :label="item.aircraftSubsystemName"
-                    :value="item.id"
-                  />
-                </el-select>
-              </el-form-item>
-            </div>
+            <el-col :span="6"
+              ><div class="grid-content bg-purple">
+                <el-form-item label="机型" prop="faultPhenomenon">
+                  <el-select
+                    v-model="form.aircraftTypeId"
+                    readonly
+                    @change="handleaircraftChange1"
+                  >
+                    <el-option
+                      v-for="item in typeOption1"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item></div
+            ></el-col>
+            <el-col :span="6"
+              ><div class="grid-content bg-purple">
+                <el-form-item label="系统" prop="aircraftSystemId">
+                  <el-select
+                    v-model="form.aircraftSystemId"
+                    readonly
+                    @change="handlesystemChange1"
+                  >
+                    <el-option
+                      v-for="item in systemOption1"
+                      :key="item.id"
+                      :label="item.aircraftSystemName"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item></div
+            ></el-col>
+            <el-col :span="6"
+              ><div class="grid-content bg-purple">
+                <el-form-item label="分系统" prop="aircraftSubsystemId">
+                  <el-select v-model="form.aircraftSubsystemId" readonly>
+                    <el-option
+                      v-for="item in subSystemOption1"
+                      :key="item.id"
+                      :label="item.aircraftSubsystemName"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </div>
             </el-col>
             <el-col :span="6">
               <div class="grid-content bg-purple">
                 <el-form-item label="作者" prop="author">
                   <el-input v-model="form.author" readonly />
-                </el-form-item>
-              </div></el-col>
+                </el-form-item></div
+            ></el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-card class="box-card" style="margin:5px">
+              <el-card class="box-card" style="margin: 5px">
                 <div slot="header" class="clearfix">
                   <span>故障现象</span>
                 </div>
                 <div>
-                  <el-input v-model="form.faultPhenomenon" type="textarea" :rows="5" placeholder="请输入内容" readonly />
+                  <el-input
+                    v-model="form.faultPhenomenon"
+                    type="textarea"
+                    :rows="5"
+                    placeholder="请输入内容"
+                    readonly
+                  />
                 </div>
               </el-card>
             </el-col>
             <el-col :span="12">
-              <el-card class="box-card" style="margin:5px">
+              <el-card class="box-card" style="margin: 5px">
                 <div slot="header" class="clearfix">
                   <span>故障原因</span>
                 </div>
                 <div>
-                  <el-input v-model="form.faultCause" type="textarea" :rows="5" placeholder="请输入内容" readonly />
+                  <el-input
+                    v-model="form.faultCause"
+                    type="textarea"
+                    :rows="5"
+                    placeholder="请输入内容"
+                    readonly
+                  />
                 </div>
               </el-card>
             </el-col>
           </el-row>
           <el-row>
-            <el-card class="box-card" style="margin:5px">
+            <el-card class="box-card" style="margin: 5px">
               <div slot="header" class="clearfix">
                 <span>故障树</span>
               </div>
               <div>
                 <div v-if="form.faultTreePath">
                   <!-- <img :src="baseUrl+form.faultTreePath" style="max-width: 100%;" @load="showResetBtn = true;"> -->
-                  <img :src="baseUrl+form.faultTreePath" style="max-width: 100px;" @load="showResetBtn = true" @click="showModal = true;imageSrc=form.faultTreePath">
-                  <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
+                  <img
+                    :src="baseUrl + form.faultTreePath"
+                    style="max-width: 100px"
+                    @load="showResetBtn = true"
+                    @click="
+                      showModal = true;
+                      imageSrc = form.faultTreePath;
+                    "
+                  />
+                  <div style="flex: 1" />
+                  <!-- 占位符,用于将重置按钮推到最右侧 -->
                 </div>
               </div>
             </el-card>
           </el-row>
           <el-row>
-            <el-card class="box-card" style="margin:5px">
+            <el-card class="box-card" style="margin: 5px">
               <div slot="header" class="clearfix">
                 <span>排故方法</span>
               </div>
@@ -247,8 +437,17 @@
                   <span>故障图</span>
                   <div>
                     <div v-if="form.faultPicturePath">
-                      <img :src="baseUrl+form.faultPicturePath" style="max-width: 100px;" @load="showResetBtnpic = true" @click="showModal = true;imageSrc=form.faultPicturePath">
-                      <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
+                      <img
+                        :src="baseUrl + form.faultPicturePath"
+                        style="max-width: 100px"
+                        @load="showResetBtnpic = true"
+                        @click="
+                          showModal = true;
+                          imageSrc = form.faultPicturePath;
+                        "
+                      />
+                      <div style="flex: 1" />
+                      <!-- 占位符,用于将重置按钮推到最右侧 -->
                     </div>
                   </div>
                 </el-col>
@@ -256,11 +455,30 @@
                   <span>文档</span>
                   <div>
                     <div v-if="form.troubleshootingMethodPath">
-                      <span style="margin: 10px">{{ getFileNameByPath(form.troubleshootingMethodPath) }}</span>
-                      <el-button v-show="!viewWordFlag" type="primary" @click="viewWordFlag=true">预览</el-button>
-                      <el-button v-show="viewWordFlag" type="primary" @click="viewWordFlag=false">取消预览</el-button>
-                      <el-button type="primary" @click="download(form.troubleshootingMethodPath)">下载</el-button>
-                      <div v-show="viewWordFlag" ref="troubleshootingMethodFile" />
+                      <span style="margin: 10px">{{
+                        getFileNameByPath(form.troubleshootingMethodPath)
+                      }}</span>
+                      <el-button
+                        v-show="!viewWordFlag"
+                        type="primary"
+                        @click="viewWordFlag = true"
+                        >预览</el-button
+                      >
+                      <el-button
+                        v-show="viewWordFlag"
+                        type="primary"
+                        @click="viewWordFlag = false"
+                        >取消预览</el-button
+                      >
+                      <el-button
+                        type="primary"
+                        @click="download(form.troubleshootingMethodPath)"
+                        >下载</el-button
+                      >
+                      <div
+                        v-show="viewWordFlag"
+                        ref="troubleshootingMethodFile"
+                      />
                     </div>
                   </div>
                 </el-col>
@@ -268,7 +486,7 @@
             </el-card>
           </el-row>
           <div v-if="showModal" class="modal" @click="showModal = false">
-            <img :src="baseUrl+imageSrc" class="full-image">
+            <img :src="baseUrl + imageSrc" class="full-image" />
           </div>
         </el-form>
 
@@ -277,28 +495,27 @@
         </div>
       </el-dialog>
     </div>
-
   </div>
 </template>
 
 <script>
-import { listCase, getCase, countPlus } from '@/api/system/case'
-import { getTypeOption } from '@/api/system/type'
-import { getSystemOption } from '@/api/system/system'
-import { getSubSystemOption } from '@/api/system/subsystem'
-import { renderAsync } from 'docx-preview'
-import { getToken } from '@/utils/auth'
-import axios from 'axios'
+import { esListCase, getCase, countPlus } from "@/api/system/case";
+import { getTypeOption } from "@/api/system/type";
+import { getSystemOption } from "@/api/system/system";
+import { getSubSystemOption } from "@/api/system/subsystem";
+import { renderAsync } from "docx-preview";
+import { getToken } from "@/utils/auth";
+import axios from "axios";
 
 export default {
-  name: 'Index',
+  name: "Index",
   data() {
     return {
-      wordText: '',
-      wordURL: 'test.docx', // 文件地址,看你对应怎末获取、赋值
+      wordText: "",
+      wordURL: "test.docx", // 文件地址,看你对应怎末获取、赋值
       showResetBtn: false,
       showResetBtnpic: false,
-      name: '',
+      name: "",
       fileList: [],
       hideUpload: false,
       // 遮罩层
@@ -316,11 +533,11 @@ export default {
       // 故障案例管理表格数据
       caseList: [],
       // 弹出层标题
-      title: '',
+      title: "",
       // 是否显示弹出层
       open: false,
-      picUrl_tree: '',
-      faultTreePath: '',
+      picUrl_tree: "",
+      faultTreePath: "",
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -334,7 +551,7 @@ export default {
         faultPicturePath: null,
         troubleshootingMethodPath: null,
         viewCount: null,
-        orderBy: 'createTimeAsc'
+        orderBy: "createTimeAsc",
       },
       // 表单参数
       form: {
@@ -351,11 +568,10 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       },
       // 表单校验
-      rules: {
-      },
+      rules: {},
       fileList: [], // 存储上传文件列表
       typeOption: [],
       typeOption1: [],
@@ -364,218 +580,216 @@ export default {
       systemOption1: [],
       subSystemOption1: [],
       showModal: false, // 控制模态框显示的变量
-      imageSrc: '', // 图片路径
+      imageSrc: "", // 图片路径
       showResetBtnMethod: false,
       // file upload
       baseUrl: process.env.VUE_APP_BASE_API,
-      uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传文件服务器地址
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
       headers: {
-        Authorization: 'Bearer ' + getToken()
+        Authorization: "Bearer " + getToken(),
       },
       orderByOption: [
         {
-          'id': 'createTimeAsc',
-          'name': '按创建时间升序'
+          id: "createTimeAsc",
+          name: "按创建时间升序",
         },
         {
-          'id': 'createTimeDesc',
-          'name': '按创建时间降序'
+          id: "createTimeDesc",
+          name: "按创建时间降序",
         },
         {
-          'id': 'countAsc',
-          'name': '按点击量升序'
+          id: "countAsc",
+          name: "按点击量升序",
         },
         {
-          'id': 'countDesc',
-          'name': '按点击量降序'
-        }
+          id: "countDesc",
+          name: "按点击量降序",
+        },
       ],
       viewWordFlag: false,
-      isfirstView: true
-    }
+      isfirstView: true,
+    };
   },
   created() {
     // this.getList()
-    this.getOption()
-    this.getOption1()
+    this.getOption();
+    this.getOption1();
   },
   activated() {
-    this.getOption()
-    this.getOption1()
+    this.getOption();
+    this.getOption1();
   },
   methods: {
     getOption() {
-      getTypeOption().then(resp => {
-        this.typeOption = resp.data
-      })
+      getTypeOption().then((resp) => {
+        this.typeOption = resp.data;
+      });
     },
     // 用于获取飞机机型(放到添加功能中)
     getOption1() {
-      getTypeOption().then(resp => {
-        this.typeOption1 = resp.data
-      })
+      getTypeOption().then((resp) => {
+        this.typeOption1 = resp.data;
+      });
     },
 
     // 故障树
     beforeTreeUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
       const isOKType =
-        fileType === '.jpg' ||
-        fileType === '.png' ||
-        fileType === '.jpeg' ||
-        fileType === '.bmp' ||
-        fileType === '.gif'
+        fileType === ".jpg" ||
+        fileType === ".png" ||
+        fileType === ".jpeg" ||
+        fileType === ".bmp" ||
+        fileType === ".gif";
       if (!isOKType) {
-        this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
+        this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 2
+      const isLt2M = file.size / 1024 / 1024 < 2;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 2MB!')
+        this.$message.error("图片大小不能超过 2MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
     afterTreeUpload(response, file) {
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
       if (response.code === 200) {
-        this.form.faultTreePath = response.fileName
+        this.form.faultTreePath = response.fileName;
       }
     },
     reuploadTree() {
-      this.form.faultTreePath = ''
-      this.showResetBtn = false
+      this.form.faultTreePath = "";
+      this.showResetBtn = false;
     },
 
     // 故障图
     beforePicUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
       const isOKType =
-        fileType === '.jpg' ||
-        fileType === '.png' ||
-        fileType === '.jpeg' ||
-        fileType === '.bmp' ||
-        fileType === '.gif'
+        fileType === ".jpg" ||
+        fileType === ".png" ||
+        fileType === ".jpeg" ||
+        fileType === ".bmp" ||
+        fileType === ".gif";
       if (!isOKType) {
-        this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
+        this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 2
+      const isLt2M = file.size / 1024 / 1024 < 2;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 2MB!')
+        this.$message.error("图片大小不能超过 2MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
 
     afterPicUpload(response, file) {
       if (response.code === 200) {
-        this.form.faultPicturePath = response.fileName
+        this.form.faultPicturePath = response.fileName;
       }
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
     },
     reuploadPic() {
-      this.form.faultPicturePath = ''
+      this.form.faultPicturePath = "";
       // this.$refs.loadtree.clearFiles();
-      this.showResetBtnpic = false
+      this.showResetBtnpic = false;
     },
 
     // 排故流程word文档
     beforeMethodUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
-      const isOKType =
-        fileType === '.doc' ||
-        fileType === '.docx'
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
+      const isOKType = fileType === ".doc" || fileType === ".docx";
       if (!isOKType) {
-        this.$message.error('文件格式只能为doc/docx')
+        this.$message.error("文件格式只能为doc/docx");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 5
+      const isLt2M = file.size / 1024 / 1024 < 5;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 5MB!')
+        this.$message.error("图片大小不能超过 5MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
     afterMethodUpload(response, file) {
       if (response.code === 200) {
-        this.form.troubleshootingMethodPath = response.fileName
+        this.form.troubleshootingMethodPath = response.fileName;
         axios({
-          method: 'get',
-          responseType: 'blob',
-          url: this.baseUrl + this.form.troubleshootingMethodPath
+          method: "get",
+          responseType: "blob",
+          url: this.baseUrl + this.form.troubleshootingMethodPath,
         }).then((response) => {
-          renderAsync(response.data, this.$refs.troubleshootingMethodFile)
-        })
+          renderAsync(response.data, this.$refs.troubleshootingMethodFile);
+        });
       }
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
     },
     reuploadMethod() {
-      this.form.troubleshootingMethodPath = ''
+      this.form.troubleshootingMethodPath = "";
       // this.$refs.loadtree.clearFiles();
-      this.showResetBtnMethod = false
+      this.showResetBtnMethod = false;
     },
 
     // 机型变化后更新系统下拉框
     handleaircraftChange() {
-      this.queryParams.aircraftSystemId = ''
-      this.queryParams.aircraftSubsystemId = ''
+      this.queryParams.aircraftSystemId = "";
+      this.queryParams.aircraftSubsystemId = "";
       // alert(this.queryParams.aircraftTypeId)
-      getSystemOption(this.queryParams.aircraftTypeId).then(resp => {
-        this.systemOption = resp.data
-      })
+      getSystemOption(this.queryParams.aircraftTypeId).then((resp) => {
+        this.systemOption = resp.data;
+      });
     },
 
     // 系统变化后更新分系统
     handlesystemChange() {
-      this.queryParams.aircraftSubsystemId = ''
-      getSubSystemOption(this.queryParams.aircraftSystemId).then(resp => {
-        this.subSystemOption = resp.data
-      })
+      this.queryParams.aircraftSubsystemId = "";
+      getSubSystemOption(this.queryParams.aircraftSystemId).then((resp) => {
+        this.subSystemOption = resp.data;
+      });
     },
 
     // 添加或修改对话框中机型变化后,修改系统
     handleaircraftChange1(isClear = true) {
       if (isClear) {
-        this.form.aircraftSystemId = ''
-        this.form.aircraftSubsystemId = ''
+        this.form.aircraftSystemId = "";
+        this.form.aircraftSubsystemId = "";
       }
       if (this.form.aircraftTypeId) {
-        getSystemOption(this.form.aircraftTypeId).then(resp => {
-          this.systemOption1 = resp.data
-        })
+        getSystemOption(this.form.aircraftTypeId).then((resp) => {
+          this.systemOption1 = resp.data;
+        });
       }
     },
 
     // 添加或修改对话框中系统变化后,修改分系统
     handlesystemChange1(isClear = true) {
       if (isClear) {
-        this.form.aircraftSubsystemId = ''
+        this.form.aircraftSubsystemId = "";
       }
       if (this.form.aircraftSystemId) {
-        getSubSystemOption(this.form.aircraftSystemId).then(resp => {
-          this.subSystemOption1 = resp.data
-        })
+        getSubSystemOption(this.form.aircraftSystemId).then((resp) => {
+          this.subSystemOption1 = resp.data;
+        });
       }
     },
 
     /** 查询故障案例管理列表 */
     getList() {
-      this.loading = true
-      listCase(this.queryParams).then(response => {
-        this.caseList = response.rows
-        this.total = response.total
-        this.loading = false
-        this.isfirstView = false
-      })
+      this.loading = true;
+      esListCase(this.queryParams).then((response) => {
+        this.caseList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+        this.isfirstView = false;
+      });
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+      this.open = false;
+      this.reset();
     },
     // 表单重置
     reset() {
@@ -593,213 +807,219 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
-      }
-      this.resetForm('form')
+        updateTime: null,
+      };
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
-      this.handleQuery()
+      this.resetForm("queryForm");
+      this.handleQuery();
     },
     // 多选框选中数据
     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() {
-      this.reset()
-      this.open = true
-      this.title = '添加故障案例管理'
+      this.reset();
+      this.open = true;
+      this.title = "添加故障案例管理";
     },
     /** 修改按钮操作 */
     handleUpdate(id) {
-      getCase(id).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '修改故障案例管理'
+      getCase(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改故障案例管理";
         if (this.form.troubleshootingMethodPath) {
           axios({
-            method: 'get',
-            responseType: 'blob',
-            url: this.baseUrl + this.form.troubleshootingMethodPath
+            method: "get",
+            responseType: "blob",
+            url: this.baseUrl + this.form.troubleshootingMethodPath,
           }).then((response) => {
-            renderAsync(response.data, this.$refs.troubleshootingMethodFile)
-          })
+            renderAsync(response.data, this.$refs.troubleshootingMethodFile);
+          });
         }
-        this.handleaircraftChange1(false)
-        this.handlesystemChange1(false)
-      })
-      countPlus(id).then(response => {
-      })
+        this.handleaircraftChange1(false);
+        this.handlesystemChange1(false);
+      });
+      countPlus(id).then((response) => {});
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateCase(this.form).then(response => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.queryParams.aircraftTypeId = null
-              this.queryParams.aircraftSystemId = null
-              this.queryParams.aircraftSubsystemId = null
-              this.getList()
-            })
+            updateCase(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.queryParams.aircraftTypeId = null;
+              this.queryParams.aircraftSystemId = null;
+              this.queryParams.aircraftSubsystemId = null;
+              this.getList();
+            });
           } else {
-            addCase(this.form).then(response => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.queryParams.aircraftTypeId = null
-              this.queryParams.aircraftSystemId = null
-              this.queryParams.aircraftSubsystemId = null
-              this.getList()
-            })
+            addCase(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.queryParams.aircraftTypeId = null;
+              this.queryParams.aircraftSystemId = null;
+              this.queryParams.aircraftSubsystemId = null;
+              this.getList();
+            });
           }
         }
-      })
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids
-      this.$modal.confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?').then(function() {
-        return delCase(ids)
-      }).then(() => {
-        this.getList()
-        this.$modal.msgSuccess('删除成功')
-      }).catch(() => {})
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delCase(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/case/export', {
-        ...this.queryParams
-      }, `case_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/case/export",
+        {
+          ...this.queryParams,
+        },
+        `case_${new Date().getTime()}.xlsx`
+      );
     },
     truncatedText(text) {
-      const maxLength = 30 // 你希望的最大字符数
+      const maxLength = 30; // 你希望的最大字符数
       if (text.length > maxLength) {
-        return text.substring(0, maxLength) + '...'
+        return text.substring(0, maxLength) + "...";
       }
-      return text
+      return text;
     },
     download(path) {
-      this.$download.resource(path)
+      this.$download.resource(path);
     },
     getFileNameByPath(path) {
       if (!path) {
-        return ''
-      } else if (path.lastIndexOf('/') > -1) {
-        const newName = path.slice(path.lastIndexOf('/') + 1)
-        const names = newName.split('.')
-        if ((names.size = 2) && (names[0].length > 19)) {
-          return newName.substring(0, names[0].length - 19) + '.' + names[1]
+        return "";
+      } else if (path.lastIndexOf("/") > -1) {
+        const newName = path.slice(path.lastIndexOf("/") + 1);
+        const names = newName.split(".");
+        if ((names.size = 2) && names[0].length > 19) {
+          return newName.substring(0, names[0].length - 19) + "." + names[1];
         } else {
-          return newName
+          return newName;
         }
       } else {
-        return ''
+        return "";
       }
     },
     changeOrderBy() {
       if (this.caseList.length > 0) {
-        this.getList()
+        this.getList();
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style scoped>
-  .avatar-uploader {
-    display: inline-block;
-    text-align: center;
-    position: relative;
-    overflow: hidden;
-  }
-  .avatar {
-    width: 100px;
-    height: 100px;
-    display: block;
-  }
-
-  .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    display: block;
-    width: 100px;
-    height: 100px;
-    line-height: 100px;
-  }
+.avatar-uploader {
+  display: inline-block;
+  text-align: center;
+  position: relative;
+  overflow: hidden;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
 
-  .modal {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-color: rgba(0, 0, 0, 0.8);
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    z-index: 9999;
-  }
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  display: block;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+}
 
-  .full-image {
-    max-width: 80%;
-    max-height: 80%;
-  }
-  .el-divider--horizontal{
-    display: block;
-    height: 1px;
-    width: 100%;
-    margin: 12px 0;
-  }
-  .rounded-corners {
-    border-radius: 10px; /* 你可以根据需要调整这个值 */
-  }
+.modal {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.8);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  z-index: 9999;
+}
 
-  .flex-center {
-    display: flex;
-    align-items: center; /* 垂直居中 */
-    height: 2.5rem; /* 你需要一个确定的高度 */
-  }
-  .ellipsis {
-    white-space: nowrap;    /* 防止文本换行 */
-    overflow: hidden;       /* 隐藏超出容器的文本 */
-    text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
-    max-width: 200px;
-  }
+.full-image {
+  max-width: 80%;
+  max-height: 80%;
+}
+.el-divider--horizontal {
+  display: block;
+  height: 1px;
+  width: 100%;
+  margin: 12px 0;
+}
+.rounded-corners {
+  border-radius: 10px; /* 你可以根据需要调整这个值 */
+}
 
-  .left {
-    float: left;
-    /* 左边的样式 */
-  }
+.flex-center {
+  display: flex;
+  align-items: center; /* 垂直居中 */
+  height: 2.5rem; /* 你需要一个确定的高度 */
+}
+.ellipsis {
+  white-space: nowrap; /* 防止文本换行 */
+  overflow: hidden; /* 隐藏超出容器的文本 */
+  text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
+  max-width: 200px;
+}
 
-  .right {
-    float: right;
-    padding: 10px 20px
-    /* 右边的样式 */
-  }
+.left {
+  float: left;
+  /* 左边的样式 */
+}
 
-  .container::after {
-    content: "";
-    display: table;
-    clear: both;
-  }
-  .centerClass {
-  }
+.right {
+  float: right;
+  padding: 10px 20px;
+  /* 右边的样式 */
+}
 
-  .centered-content {
-    /* margin-top: 20%; */
-    text-align: center;
-    /* font-family: Arial, sans-serif; */
-  }
+.container::after {
+  content: "";
+  display: table;
+  clear: both;
+}
+.centerClass {
+}
 
+.centered-content {
+  /* margin-top: 20%; */
+  text-align: center;
+  /* font-family: Arial, sans-serif; */
+}
 </style>

+ 440 - 304
tfis-ui/src/views/system/case/index.vue

@@ -1,8 +1,19 @@
 <template>
   <div class="app-container">
-    <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
+    <el-form
+      v-show="showSearch"
+      ref="queryForm"
+      :model="queryParams"
+      size="small"
+      :inline="true"
+      label-width="68px"
+    >
       <el-form-item label="机型" prop="aircraftTypeId">
-        <el-select v-model="queryParams.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange">
+        <el-select
+          v-model="queryParams.aircraftTypeId"
+          placeholder="请选择"
+          @change="handleaircraftChange"
+        >
           <el-option
             v-for="item in typeOption"
             :key="item.id"
@@ -12,7 +23,11 @@
         </el-select>
       </el-form-item>
       <el-form-item label="系统" prop="aircraftSystemId">
-        <el-select v-model="queryParams.aircraftSystemId" placeholder="请选择" @change="handlesystemChange">
+        <el-select
+          v-model="queryParams.aircraftSystemId"
+          placeholder="请选择"
+          @change="handlesystemChange"
+        >
           <el-option
             v-for="item in systemOption"
             :key="item.id"
@@ -22,7 +37,10 @@
         </el-select>
       </el-form-item>
       <el-form-item label="分系统" prop="aircraftSubsystemId">
-        <el-select v-model="queryParams.aircraftSubsystemId" placeholder="请选择">
+        <el-select
+          v-model="queryParams.aircraftSubsystemId"
+          placeholder="请选择"
+        >
           <el-option
             v-for="item in subSystemOption"
             :key="item.id"
@@ -81,8 +99,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>
 
@@ -95,7 +121,8 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -106,7 +133,8 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -117,7 +145,8 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -127,17 +156,26 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
     </el-row>
 
-    <el-table v-loading="loading" :data="caseList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="caseList"
+      @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="aircraftTypeName" />
       <el-table-column label="系统" align="center" prop="aircraftSystemName" />
-      <el-table-column label="分系统" align="center" prop="aircraftSubsystemName" />
+      <el-table-column
+        label="分系统"
+        align="center"
+        prop="aircraftSubsystemName"
+      />
       <el-table-column label="故障现象" align="center" prop="faultPhenomenon" />
       <el-table-column label="故障原因" align="center" prop="faultCause" />
       <!-- <el-table-column label="故障树" align="center" prop="faultTreePath" />
@@ -145,7 +183,12 @@
       <el-table-column label="排故方法" align="center" prop="troubleshootingMethodPath" /> -->
       <el-table-column label="浏览次数" align="center" prop="viewCount" />
       <el-table-column label="作者" align="center" prop="author" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
@@ -156,7 +199,11 @@
           <span>{{ parseTime(scope.row.updateTime) }}</span>
         </template>
       </el-table-column> -->
-      <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
             v-hasPermi="['system:case:edit']"
@@ -164,20 +211,22 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             v-hasPermi="['system:case:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-          >删除</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"
@@ -185,45 +234,66 @@
     />
 
     <!-- 添加或修改故障案例管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="80%"
+      append-to-body
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
-          <el-col :span="6"><div class="grid-content bg-purple">
-            <el-form-item label="机型" prop="faultPhenomenon">
-              <el-select v-model="form.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange1">
-                <el-option
-                  v-for="item in typeOption1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </div></el-col>
-          <el-col :span="6"><div class="grid-content bg-purple">
-            <el-form-item label="系统" prop="aircraftSystemId">
-              <el-select v-model="form.aircraftSystemId" placeholder="请选择" @change="handlesystemChange1">
-                <el-option
-                  v-for="item in systemOption1"
-                  :key="item.id"
-                  :label="item.aircraftSystemName"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </div></el-col>
-          <el-col :span="6"><div class="grid-content bg-purple">
-            <el-form-item label="分系统" prop="aircraftSubsystemId">
-              <el-select v-model="form.aircraftSubsystemId" placeholder="请选择">
-                <el-option
-                  v-for="item in subSystemOption1"
-                  :key="item.id"
-                  :label="item.aircraftSubsystemName"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </div>
+          <el-col :span="6"
+            ><div class="grid-content bg-purple">
+              <el-form-item label="机型" prop="faultPhenomenon">
+                <el-select
+                  v-model="form.aircraftTypeId"
+                  placeholder="请选择"
+                  @change="handleaircraftChange1"
+                >
+                  <el-option
+                    v-for="item in typeOption1"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item></div
+          ></el-col>
+          <el-col :span="6"
+            ><div class="grid-content bg-purple">
+              <el-form-item label="系统" prop="aircraftSystemId">
+                <el-select
+                  v-model="form.aircraftSystemId"
+                  placeholder="请选择"
+                  @change="handlesystemChange1"
+                >
+                  <el-option
+                    v-for="item in systemOption1"
+                    :key="item.id"
+                    :label="item.aircraftSystemName"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item></div
+          ></el-col>
+          <el-col :span="6"
+            ><div class="grid-content bg-purple">
+              <el-form-item label="分系统" prop="aircraftSubsystemId">
+                <el-select
+                  v-model="form.aircraftSubsystemId"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in subSystemOption1"
+                    :key="item.id"
+                    :label="item.aircraftSubsystemName"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </div>
           </el-col>
           <el-col :span="6">
             <div class="grid-content bg-purple">
@@ -235,28 +305,40 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-card class="box-card" style="margin:5px">
+            <el-card class="box-card" style="margin: 5px">
               <div slot="header" class="clearfix">
                 <span>故障现象</span>
               </div>
               <div>
-                <el-input v-model="form.faultPhenomenon" type="textarea" :rows="5" placeholder="请输入内容" maxlength="500" />
+                <el-input
+                  v-model="form.faultPhenomenon"
+                  type="textarea"
+                  :rows="5"
+                  placeholder="请输入内容"
+                  maxlength="500"
+                />
               </div>
             </el-card>
           </el-col>
           <el-col :span="12">
-            <el-card class="box-card" style="margin:5px">
+            <el-card class="box-card" style="margin: 5px">
               <div slot="header" class="clearfix">
                 <span>故障原因</span>
               </div>
               <div>
-                <el-input v-model="form.faultCause" type="textarea" :rows="5" placeholder="请输入内容" maxlength="500" />
+                <el-input
+                  v-model="form.faultCause"
+                  type="textarea"
+                  :rows="5"
+                  placeholder="请输入内容"
+                  maxlength="500"
+                />
               </div>
             </el-card>
           </el-col>
         </el-row>
         <el-row>
-          <el-card class="box-card" style="margin:5px">
+          <el-card class="box-card" style="margin: 5px">
             <div slot="header" class="clearfix">
               <span>故障树</span>
             </div>
@@ -277,15 +359,29 @@
               </el-upload>
               <div v-if="form.faultTreePath">
                 <!-- <img :src="baseUrl+form.faultTreePath" style="max-width: 100%;" @load="showResetBtn = true;"> -->
-                <img :src="baseUrl+form.faultTreePath" style="max-width: 100px;" @load="showResetBtn = true" @click="showModal = true;imageSrc=form.faultTreePath">
-                <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
-                <el-button v-if="showResetBtn" type="danger" @click="reuploadTree">删除</el-button>
+                <img
+                  :src="baseUrl + form.faultTreePath"
+                  style="max-width: 100px"
+                  @load="showResetBtn = true"
+                  @click="
+                    showModal = true;
+                    imageSrc = form.faultTreePath;
+                  "
+                />
+                <div style="flex: 1" />
+                <!-- 占位符,用于将重置按钮推到最右侧 -->
+                <el-button
+                  v-if="showResetBtn"
+                  type="danger"
+                  @click="reuploadTree"
+                  >删除</el-button
+                >
               </div>
             </div>
           </el-card>
         </el-row>
         <el-row>
-          <el-card class="box-card" style="margin:5px">
+          <el-card class="box-card" style="margin: 5px">
             <div slot="header" class="clearfix">
               <span>排故方法</span>
             </div>
@@ -307,9 +403,23 @@
                     <i class="el-icon-plus" />
                   </el-upload>
                   <div v-if="form.faultPicturePath">
-                    <img :src="baseUrl+form.faultPicturePath" style="max-width: 100px;" @load="showResetBtnpic = true" @click="showModal = true;imageSrc=form.faultPicturePath">
-                    <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
-                    <el-button v-if="showResetBtnpic" type="danger" @click="reuploadPic">删除</el-button>
+                    <img
+                      :src="baseUrl + form.faultPicturePath"
+                      style="max-width: 100px"
+                      @load="showResetBtnpic = true"
+                      @click="
+                        showModal = true;
+                        imageSrc = form.faultPicturePath;
+                      "
+                    />
+                    <div style="flex: 1" />
+                    <!-- 占位符,用于将重置按钮推到最右侧 -->
+                    <el-button
+                      v-if="showResetBtnpic"
+                      type="danger"
+                      @click="reuploadPic"
+                      >删除</el-button
+                    >
                   </div>
                 </div>
               </el-col>
@@ -330,12 +440,33 @@
                     <i class="el-icon-plus" />
                   </el-upload>
                   <div v-if="form.troubleshootingMethodPath">
-                    <span style="margin: 10px">{{ getFileNameByPath(form.troubleshootingMethodPath) }}</span>
-                    <el-button v-show="!viewWordFlag" type="primary" @click="viewWordFlag=true">预览</el-button>
-                    <el-button v-show="viewWordFlag" type="primary" @click="viewWordFlag=false">取消预览</el-button>
-                    <el-button type="primary" @click="download(form.troubleshootingMethodPath)">下载</el-button>
-                    <el-button type="danger" @click="reuploadMethod">删除</el-button>
-                    <div v-show="viewWordFlag" ref="troubleshootingMethodFile" />
+                    <span style="margin: 10px">{{
+                      getFileNameByPath(form.troubleshootingMethodPath)
+                    }}</span>
+                    <el-button
+                      v-show="!viewWordFlag"
+                      type="primary"
+                      @click="viewWordFlag = true"
+                      >预览</el-button
+                    >
+                    <el-button
+                      v-show="viewWordFlag"
+                      type="primary"
+                      @click="viewWordFlag = false"
+                      >取消预览</el-button
+                    >
+                    <el-button
+                      type="primary"
+                      @click="download(form.troubleshootingMethodPath)"
+                      >下载</el-button
+                    >
+                    <el-button type="danger" @click="reuploadMethod"
+                      >删除</el-button
+                    >
+                    <div
+                      v-show="viewWordFlag"
+                      ref="troubleshootingMethodFile"
+                    />
                   </div>
                 </div>
               </el-col>
@@ -343,7 +474,7 @@
           </el-card>
         </el-row>
         <div v-if="showModal" class="modal" @click="showModal = false">
-          <img :src="baseUrl+imageSrc" class="full-image">
+          <img :src="baseUrl + imageSrc" class="full-image" />
         </div>
       </el-form>
 
@@ -352,28 +483,33 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-
   </div>
 </template>
 
 <script>
-import { listCase, getCase, delCase, addCase, updateCase } from '@/api/system/case'
-import { getTypeOption } from '@/api/system/type'
-import { getSystemOption } from '@/api/system/system'
-import { getSubSystemOption } from '@/api/system/subsystem'
-import { renderAsync } from 'docx-preview'
-import { getToken } from '@/utils/auth'
-import axios from 'axios'
+import {
+  listCase,
+  getCase,
+  delCase,
+  addCase,
+  updateCase,
+} from "@/api/system/case";
+import { getTypeOption } from "@/api/system/type";
+import { getSystemOption } from "@/api/system/system";
+import { getSubSystemOption } from "@/api/system/subsystem";
+import { renderAsync } from "docx-preview";
+import { getToken } from "@/utils/auth";
+import axios from "axios";
 
 export default {
-  name: 'Case',
+  name: "Case",
   data() {
     return {
-      wordText: '',
-      wordURL: 'test.docx', // 文件地址,看你对应怎末获取、赋值
+      wordText: "",
+      wordURL: "test.docx", // 文件地址,看你对应怎末获取、赋值
       showResetBtn: false,
       showResetBtnpic: false,
-      name: '',
+      name: "",
       fileList: [],
       hideUpload: false,
       // 遮罩层
@@ -391,11 +527,11 @@ export default {
       // 故障案例管理表格数据
       caseList: [],
       // 弹出层标题
-      title: '',
+      title: "",
       // 是否显示弹出层
       open: false,
-      picUrl_tree: '',
-      faultTreePath: '',
+      picUrl_tree: "",
+      faultTreePath: "",
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -408,7 +544,7 @@ export default {
         faultTreePath: null,
         faultPicturePath: null,
         troubleshootingMethodPath: null,
-        viewCount: null
+        viewCount: null,
       },
       // 表单参数
       form: {
@@ -425,11 +561,10 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       },
       // 表单校验
-      rules: {
-      },
+      rules: {},
       fileList: [], // 存储上传文件列表
       typeOption: [],
       typeOption1: [],
@@ -438,198 +573,196 @@ export default {
       systemOption1: [],
       subSystemOption1: [],
       showModal: false, // 控制模态框显示的变量
-      imageSrc: '', // 图片路径
+      imageSrc: "", // 图片路径
       showResetBtnMethod: false,
       // file upload
       baseUrl: process.env.VUE_APP_BASE_API,
-      uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传文件服务器地址
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
       headers: {
-        Authorization: 'Bearer ' + getToken()
+        Authorization: "Bearer " + getToken(),
       },
-      viewWordFlag: false
-    }
+      viewWordFlag: false,
+    };
   },
   created() {
-    this.getList()
-    this.getOption()
-    this.getOption1()
+    this.getList();
+    this.getOption();
+    this.getOption1();
   },
   activated() {
-    this.getOption()
-    this.getOption1()
+    this.getOption();
+    this.getOption1();
   },
   methods: {
     getOption() {
-      getTypeOption().then(resp => {
-        this.typeOption = resp.data
-      })
+      getTypeOption().then((resp) => {
+        this.typeOption = resp.data;
+      });
     },
     // 用于获取飞机机型(放到添加功能中)
     getOption1() {
-      getTypeOption().then(resp => {
-        this.typeOption1 = resp.data
-      })
+      getTypeOption().then((resp) => {
+        this.typeOption1 = resp.data;
+      });
     },
 
     // 故障树
     beforeTreeUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
       const isOKType =
-        fileType === '.jpg' ||
-        fileType === '.png' ||
-        fileType === '.jpeg' ||
-        fileType === '.bmp' ||
-        fileType === '.gif'
+        fileType === ".jpg" ||
+        fileType === ".png" ||
+        fileType === ".jpeg" ||
+        fileType === ".bmp" ||
+        fileType === ".gif";
       if (!isOKType) {
-        this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
+        this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 20
+      const isLt2M = file.size / 1024 / 1024 < 20;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 20MB!')
+        this.$message.error("图片大小不能超过 20MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
     afterTreeUpload(response, file) {
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
       if (response.code === 200) {
-        this.form.faultTreePath = response.fileName
+        this.form.faultTreePath = response.fileName;
       }
     },
     reuploadTree() {
-      this.form.faultTreePath = ''
-      this.showResetBtn = false
+      this.form.faultTreePath = "";
+      this.showResetBtn = false;
     },
 
     // 故障图
     beforePicUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
       const isOKType =
-        fileType === '.jpg' ||
-        fileType === '.png' ||
-        fileType === '.jpeg' ||
-        fileType === '.bmp' ||
-        fileType === '.gif'
+        fileType === ".jpg" ||
+        fileType === ".png" ||
+        fileType === ".jpeg" ||
+        fileType === ".bmp" ||
+        fileType === ".gif";
       if (!isOKType) {
-        this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
+        this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 20
+      const isLt2M = file.size / 1024 / 1024 < 20;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 20MB!')
+        this.$message.error("图片大小不能超过 20MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
 
     afterPicUpload(response, file) {
       if (response.code === 200) {
-        this.form.faultPicturePath = response.fileName
+        this.form.faultPicturePath = response.fileName;
       }
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
     },
     reuploadPic() {
-      this.form.faultPicturePath = ''
+      this.form.faultPicturePath = "";
       // this.$refs.loadtree.clearFiles();
-      this.showResetBtnpic = false
+      this.showResetBtnpic = false;
     },
 
     // 排故流程word文档
     beforeMethodUpload(file) {
-      const fileName = file.name
-      const fileType = fileName.substring(fileName.lastIndexOf('.'))
-      const isOKType =
-        fileType === '.doc' ||
-        fileType === '.docx'
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
+      const isOKType = fileType === ".doc" || fileType === ".docx";
       if (!isOKType) {
-        this.$message.error('文件格式只能为doc/docx')
+        this.$message.error("文件格式只能为doc/docx");
       }
 
-      const isLt2M = file.size / 1024 / 1024 < 20
+      const isLt2M = file.size / 1024 / 1024 < 20;
       if (!isLt2M) {
-        this.$message.error('图片大小不能超过 20MB!')
+        this.$message.error("图片大小不能超过 20MB!");
       }
-      return isLt2M && isOKType
+      return isLt2M && isOKType;
     },
     afterMethodUpload(response, file) {
       if (response.code === 200) {
-        this.form.troubleshootingMethodPath = response.fileName
+        this.form.troubleshootingMethodPath = response.fileName;
         axios({
-          method: 'get',
-          responseType: 'blob',
-          url: this.baseUrl + this.form.troubleshootingMethodPath
+          method: "get",
+          responseType: "blob",
+          url: this.baseUrl + this.form.troubleshootingMethodPath,
         }).then((response) => {
-          renderAsync(response.data, this.$refs.troubleshootingMethodFile)
-        })
+          renderAsync(response.data, this.$refs.troubleshootingMethodFile);
+        });
       }
       // 上传完成后的处理逻辑
-      console.log('上传完成', response, file)
+      console.log("上传完成", response, file);
     },
     reuploadMethod() {
-      this.form.troubleshootingMethodPath = ''
+      this.form.troubleshootingMethodPath = "";
       // this.$refs.loadtree.clearFiles();
-      this.showResetBtnMethod = false
+      this.showResetBtnMethod = false;
     },
 
     // 机型变化后更新系统下拉框
     handleaircraftChange() {
-      this.queryParams.aircraftSystemId = ''
-      this.queryParams.aircraftSubsystemId = ''
+      this.queryParams.aircraftSystemId = "";
+      this.queryParams.aircraftSubsystemId = "";
       // alert(this.queryParams.aircraftTypeId)
-      getSystemOption(this.queryParams.aircraftTypeId).then(resp => {
-        this.systemOption = resp.data
-      })
+      getSystemOption(this.queryParams.aircraftTypeId).then((resp) => {
+        this.systemOption = resp.data;
+      });
     },
 
     // 系统变化后更新分系统
     handlesystemChange() {
-      this.queryParams.aircraftSubsystemId = ''
-      getSubSystemOption(this.queryParams.aircraftSystemId).then(resp => {
-        this.subSystemOption = resp.data
-      })
+      this.queryParams.aircraftSubsystemId = "";
+      getSubSystemOption(this.queryParams.aircraftSystemId).then((resp) => {
+        this.subSystemOption = resp.data;
+      });
     },
 
     // 添加或修改对话框中机型变化后,修改系统
     handleaircraftChange1(isClear = true) {
       if (isClear) {
-        this.form.aircraftSystemId = ''
-        this.form.aircraftSubsystemId = ''
+        this.form.aircraftSystemId = "";
+        this.form.aircraftSubsystemId = "";
       }
       if (this.form.aircraftTypeId) {
-        getSystemOption(this.form.aircraftTypeId).then(resp => {
-          this.systemOption1 = resp.data
-        })
+        getSystemOption(this.form.aircraftTypeId).then((resp) => {
+          this.systemOption1 = resp.data;
+        });
       }
     },
 
     // 添加或修改对话框中系统变化后,修改分系统
     handlesystemChange1(isClear = true) {
       if (isClear) {
-        this.form.aircraftSubsystemId = ''
+        this.form.aircraftSubsystemId = "";
       }
       if (this.form.aircraftSystemId) {
-        getSubSystemOption(this.form.aircraftSystemId).then(resp => {
-          this.subSystemOption1 = resp.data
-        })
+        getSubSystemOption(this.form.aircraftSystemId).then((resp) => {
+          this.subSystemOption1 = resp.data;
+        });
       }
     },
 
     /** 查询故障案例管理列表 */
     getList() {
-      this.loading = true
-      listCase(this.queryParams).then(response => {
-        this.caseList = response.rows
-        this.total = response.total
-        this.loading = false
-      })
+      this.loading = true;
+      listCase(this.queryParams).then((response) => {
+        this.caseList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+      this.open = false;
+      this.reset();
     },
     // 表单重置
     reset() {
@@ -647,189 +780,192 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
-      }
-      this.resetForm('form')
+        updateTime: null,
+      };
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
-      this.systemOption = [],
-      this.subSystemOption = [],
-      this.handleQuery()
+      this.resetForm("queryForm");
+      (this.systemOption = []), (this.subSystemOption = []), this.handleQuery();
     },
     // 多选框选中数据
     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() {
-      this.reset()
-      this.open = true
-      this.title = '添加故障案例管理'
+      this.reset();
+      this.open = true;
+      this.title = "添加故障案例管理";
     },
     /** 修改按钮操作 */
     handleUpdate() {
-      this.resetForm('queryForm')
-      const id = row.id || this.ids
-      getCase(id).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '修改故障案例管理'
+      this.resetForm("queryForm");
+      const id = row.id || this.ids;
+      getCase(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改故障案例管理";
         if (this.form.troubleshootingMethodPath) {
           axios({
-            method: 'get',
-            responseType: 'blob',
-            url: this.baseUrl + this.form.troubleshootingMethodPath
+            method: "get",
+            responseType: "blob",
+            url: this.baseUrl + this.form.troubleshootingMethodPath,
           }).then((response) => {
-            renderAsync(response.data, this.$refs.troubleshootingMethodFile)
-          })
+            renderAsync(response.data, this.$refs.troubleshootingMethodFile);
+          });
         }
-        this.handleaircraftChange1(false)
-        this.handlesystemChange1(false)
-      })
+        this.handleaircraftChange1(false);
+        this.handlesystemChange1(false);
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.resetForm('queryForm')
-      const id = row.id || this.ids
-      getCase(id).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '修改故障案例管理'
+      this.resetForm("queryForm");
+      const id = row.id || this.ids;
+      getCase(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改故障案例管理";
         if (this.form.troubleshootingMethodPath) {
           axios({
-            method: 'get',
-            responseType: 'blob',
-            url: this.baseUrl + this.form.troubleshootingMethodPath
+            method: "get",
+            responseType: "blob",
+            url: this.baseUrl + this.form.troubleshootingMethodPath,
           }).then((response) => {
-            renderAsync(response.data, this.$refs.troubleshootingMethodFile)
-          })
+            renderAsync(response.data, this.$refs.troubleshootingMethodFile);
+          });
         }
-        this.handleaircraftChange1(false)
-        this.handlesystemChange1(false)
-      })
+        this.handleaircraftChange1(false);
+        this.handlesystemChange1(false);
+      });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateCase(this.form).then(response => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.queryParams.aircraftTypeId = null
-              this.queryParams.aircraftSystemId = null
-              this.queryParams.aircraftSubsystemId = null
-              this.getList()
-            })
+            updateCase(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.queryParams.aircraftTypeId = null;
+              this.queryParams.aircraftSystemId = null;
+              this.queryParams.aircraftSubsystemId = null;
+              this.getList();
+            });
           } else {
-            addCase(this.form).then(response => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.queryParams.aircraftTypeId = null
-              this.queryParams.aircraftSystemId = null
-              this.queryParams.aircraftSubsystemId = null
-              this.getList()
-            })
+            addCase(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.queryParams.aircraftTypeId = null;
+              this.queryParams.aircraftSystemId = null;
+              this.queryParams.aircraftSubsystemId = null;
+              this.getList();
+            });
           }
         }
-      })
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids
-      this.$modal.confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?').then(function() {
-        return delCase(ids)
-      }).then(() => {
-        this.getList()
-        this.$modal.msgSuccess('删除成功')
-      }).catch(() => {})
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delCase(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/case/export', {
-        ...this.queryParams
-      }, `case_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/case/export",
+        {
+          ...this.queryParams,
+        },
+        `case_${new Date().getTime()}.xlsx`
+      );
     },
     download(path) {
-      this.$download.resource(path)
+      this.$download.resource(path);
     },
     getFileNameByPath(path) {
       if (!path) {
-        return ''
-      } else if (path.lastIndexOf('/') > -1) {
-        const newName = path.slice(path.lastIndexOf('/') + 1)
-        const names = newName.split('.')
-        if ((names.size = 2) && (names[0].length > 19)) {
-          return newName.substring(0, names[0].length - 19) + '.' + names[1]
+        return "";
+      } else if (path.lastIndexOf("/") > -1) {
+        const newName = path.slice(path.lastIndexOf("/") + 1);
+        const names = newName.split(".");
+        if ((names.size = 2) && names[0].length > 19) {
+          return newName.substring(0, names[0].length - 19) + "." + names[1];
         } else {
-          return newName
+          return newName;
         }
       } else {
-        return ''
+        return "";
       }
     },
-    viewWord() {
-
-    }
-  }
-}
+    viewWord() {},
+  },
+};
 </script>
 
 <style>
-  .avatar-uploader {
-    display: inline-block;
-    text-align: center;
-    position: relative;
-    overflow: hidden;
-  }
-  .avatar {
-    width: 100px;
-    height: 100px;
-    display: block;
-  }
+.avatar-uploader {
+  display: inline-block;
+  text-align: center;
+  position: relative;
+  overflow: hidden;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
 
-  .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    display: block;
-    width: 100px;
-    height: 100px;
-    line-height: 100px;
-  }
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  display: block;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+}
 
-  .modal {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-color: rgba(0, 0, 0, 0.8);
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    z-index: 9999;
-  }
+.modal {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.8);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  z-index: 9999;
+}
 
-  .full-image {
-    max-width: 80%;
-    max-height: 80%;
-  }
+.full-image {
+  max-width: 80%;
+  max-height: 80%;
+}
 
-  /* .disabled .el-upload.el-upload--picture-card {
+/* .disabled .el-upload.el-upload--picture-card {
     display: none !important;
 }
 
 .disabled .el-button--success.is-plain {
     display: none !important;
 } */
-
 </style>