浏览代码

add nose data

allen 2 月之前
父节点
当前提交
a54bcccebb

+ 38 - 0
sql/update20250415.sql

@@ -0,0 +1,38 @@
+DROP TABLE IF EXISTS `uavps_task`;
+CREATE TABLE `uavps_task`  (
+  `biz_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '业务ID',
+  `biz_name` varchar(127) COMMENT '任务名称',
+  `biz_type` varchar(7) COMMENT '业务类型(start:开始,change:队形转换,disappear:消失出现)',
+  `multiTarget` varchar(7) COMMENT '业务类型',
+  `platform_uav_str` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '固定翼平台无人机数据',
+  `fixed_multi_target_formation_str` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '固定编队目标数据',
+  `customized_multi_target_formation_str` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '自定义编队目标数据',
+  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`biz_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务数据表' ROW_FORMAT = Dynamic;
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据', '3', '1', 'task', 'system/task/index', 1, 0, 'C', '0', '0', 'system:task:list', '#', 'admin', sysdate(), '', null, '任务数据菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'system:task:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'system:task:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'system:task:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'system:task:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('任务数据导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'system:task:export',       '#', 'admin', sysdate(), '', null, '');

+ 75 - 18
uavps-framework/src/main/java/com/uavps/framework/websocket/WebSocketServer.java

@@ -1,5 +1,6 @@
 package com.uavps.framework.websocket;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.uavps.common.utils.spring.SpringUtils;
 import com.uavps.common.utils.uuid.IdUtils;
 import com.uavps.framework.udp.CoordinateSystem;
@@ -8,10 +9,13 @@ import com.uavps.framework.udp.UdpServerService;
 import com.uavps.framework.udp.utils.UdpDataUtils;
 import com.uavps.system.domain.UavpsAircraft;
 import com.uavps.system.domain.UavpsAlgorithmParameter;
+import com.uavps.system.domain.UavpsTask;
 import com.uavps.system.service.IUavpsAircraftService;
 import com.uavps.system.service.IUavpsAlgorithmParameterService;
+import com.uavps.system.service.IUavpsTaskService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
@@ -37,6 +41,8 @@ import java.util.concurrent.CompletableFuture;
 @Component
 @ServerEndpoint("/websocket/message")
 public class WebSocketServer {
+
+    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
     private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
 
     UdpServerService udpServerService = new UdpServerService();
@@ -47,6 +53,9 @@ public class WebSocketServer {
 
     private IUavpsAlgorithmParameterService algorithmParameterService = SpringUtils.getBean(IUavpsAlgorithmParameterService.class);
 
+    @Autowired
+    private IUavpsTaskService uavpsTaskService;
+
     /**
      * 连接建立成功调用的方法
      */
@@ -105,11 +114,21 @@ public class WebSocketServer {
                     CoordinateSystem.INSTANCE.reset();
 
                     String paramId = message.substring(4);
-                    UavpsAlgorithmParameter param = algorithmParameterService.selectUavpsAlgorithmParameterById(Long.parseLong(paramId));
-                    String parameter = UdpDataUtils.initAlgorithmParams(param);
-                    System.out.println("parameter:====" + parameter);
-                    System.out.println("param.toString():====" + param);
-                    udpClientService.send(parameter);
+//                    UavpsAlgorithmParameter param = algorithmParameterService.selectUavpsAlgorithmParameterById(Long.parseLong(paramId));
+                    UavpsTask uavpsTask = uavpsTaskService.selectUavpsTaskByBizId(Long.parseLong(paramId));
+                    uavpsTask.setBizType(UavpsTask.START);
+                    ObjectMapper mapper = new ObjectMapper();
+                    String json = null;
+                    try {
+                        json = mapper.writeValueAsString(uavpsTask);
+                        logger.info("json :{}", json);
+                    } catch (Exception e) {
+                        logger.error("WebSocketServer.onMessage to json error", e);
+                    }
+//                    String parameter = UdpDataUtils.initAlgorithmParams(param);
+
+                    assert json != null;
+                    udpClientService.send(json);
                     /*String str = "BB14030101010100B6EA5F459C96C9172B0001000200030015CD5B070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001A01B";
                     udpClientService.send(str);*/
                     UdpDataUtils.bizId = IdUtils.simpleUUID();
@@ -118,22 +137,60 @@ public class WebSocketServer {
 
                     String param = message.substring(15);
                     String[] paramAry = param.split(",");
-                    UavpsAlgorithmParameter parameter = algorithmParameterService.selectUavpsAlgorithmParameterById(Long.parseLong(paramAry[0]));
-                    if(!"null".equals(paramAry[1])){
-                        parameter.setLongitude(new BigDecimal(paramAry[1]));
+                    UavpsTask uavpsTask = new UavpsTask();
+                    uavpsTask.setBizId(Long.parseLong(paramAry[0]));
+                    uavpsTask.setBizType(UavpsTask.CHANGE);
+                    ObjectMapper mapper = new ObjectMapper();
+                    String json = null;
+                    try {
+                        json = mapper.writeValueAsString(uavpsTask);
+                        logger.info("json :{}", json);
+                    } catch (Exception e) {
+                        logger.error("WebSocketServer.onMessage to json error", e);
+                    }
+                    assert json != null;
+                    udpClientService.send(json);
+                    this.onOpen(session);
+                } else if (message.startsWith("DISAPPEAR:")) {
+                    String param = message.substring(10);
+                    String[] paramAry = param.split(",");
+                    UavpsTask uavpsTask = new UavpsTask();
+                    uavpsTask.setBizId(Long.parseLong(paramAry[0]));
+                    uavpsTask.setBizType(UavpsTask.DISAPPEAR);
+                    for (int i = 0; i <= paramAry.length; i++) {
+                        if (i != 0) {
+                            uavpsTask.getNumbers().add(Integer.parseInt(paramAry[i]));
+                        }
+                    }
+                    ObjectMapper mapper = new ObjectMapper();
+                    String json = null;
+                    try {
+                        json = mapper.writeValueAsString(uavpsTask);
+                        logger.info("json :{}", json);
+                    } catch (Exception e) {
+                        logger.error("WebSocketServer.onMessage to json error", e);
                     }
-                    if(!"null".equals(paramAry[2])){
-                        parameter.setLatitude(new BigDecimal(paramAry[2]));
+                    assert json != null;
+                } else if (message.startsWith("SHOW:")) {
+                    String param = message.substring(5);
+                    String[] paramAry = param.split(",");
+                    UavpsTask uavpsTask = new UavpsTask();
+                    uavpsTask.setBizId(Long.parseLong(paramAry[0]));
+                    uavpsTask.setBizType(UavpsTask.SHOW);
+                    for (int i = 0; i <= paramAry.length; i++) {
+                        if (i != 0) {
+                            uavpsTask.getNumbers().add(Integer.parseInt(paramAry[i]));
+                        }
                     }
-                    if(!"null".equals(paramAry[3])){
-                        parameter.setAltitude(Long.parseLong(paramAry[3]));
+                    ObjectMapper mapper = new ObjectMapper();
+                    String json = null;
+                    try {
+                        json = mapper.writeValueAsString(uavpsTask);
+                        logger.info("json :{}", json);
+                    } catch (Exception e) {
+                        logger.error("WebSocketServer.onMessage to json error", e);
                     }
-                    String transParam = UdpDataUtils.initAlgorithmParams(parameter);
-                    System.out.println("transParam:====" + transParam);
-                    System.out.println("param.toString():====" + parameter);
-                    udpClientService.send(transParam);
-                    this.onOpen(session);
-                    //String str = "BB14030101010100B6EA5F459C96C9172B0001000200030015CD5B070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001A01B";
+                    assert json != null;
                 } else {
                     session.getBasicRemote().sendText(message);
                 }

+ 104 - 0
uavps-system/src/main/java/com/uavps/system/controller/UavpsTaskController.java

@@ -0,0 +1,104 @@
+package com.uavps.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.GetMapping;
+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.uavps.common.annotation.Log;
+import com.uavps.common.core.controller.BaseController;
+import com.uavps.common.core.domain.AjaxResult;
+import com.uavps.common.enums.BusinessType;
+import com.uavps.system.domain.UavpsTask;
+import com.uavps.system.service.IUavpsTaskService;
+import com.uavps.common.utils.poi.ExcelUtil;
+import com.uavps.common.core.page.TableDataInfo;
+
+/**
+ * 任务数据Controller
+ * 
+ * @author ruoyi
+ * @date 2025-04-15
+ */
+@RestController
+@RequestMapping("/system/task")
+public class UavpsTaskController extends BaseController
+{
+    @Autowired
+    private IUavpsTaskService uavpsTaskService;
+
+    /**
+     * 查询任务数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(UavpsTask uavpsTask)
+    {
+        startPage();
+        List<UavpsTask> list = uavpsTaskService.selectUavpsTaskList(uavpsTask);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出任务数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:export')")
+    @Log(title = "任务数据", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, UavpsTask uavpsTask)
+    {
+        List<UavpsTask> list = uavpsTaskService.selectUavpsTaskList(uavpsTask);
+        ExcelUtil<UavpsTask> util = new ExcelUtil<UavpsTask>(UavpsTask.class);
+        util.exportExcel(response, list, "任务数据数据");
+    }
+
+    /**
+     * 获取任务数据详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:query')")
+    @GetMapping(value = "/{bizId}")
+    public AjaxResult getInfo(@PathVariable("bizId") Long bizId)
+    {
+        return success(uavpsTaskService.selectUavpsTaskByBizId(bizId));
+    }
+
+    /**
+     * 新增任务数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:add')")
+    @Log(title = "任务数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody UavpsTask uavpsTask)
+    {
+        return toAjax(uavpsTaskService.insertUavpsTask(uavpsTask));
+    }
+
+    /**
+     * 修改任务数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:edit')")
+    @Log(title = "任务数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody UavpsTask uavpsTask)
+    {
+        return toAjax(uavpsTaskService.updateUavpsTask(uavpsTask));
+    }
+
+    /**
+     * 删除任务数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:task:remove')")
+    @Log(title = "任务数据", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{bizIds}")
+    public AjaxResult remove(@PathVariable Long[] bizIds)
+    {
+        return toAjax(uavpsTaskService.deleteUavpsTaskByBizIds(bizIds));
+    }
+}

+ 221 - 0
uavps-system/src/main/java/com/uavps/system/domain/UavpsTask.java

@@ -0,0 +1,221 @@
+package com.uavps.system.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.uavps.common.annotation.Excel;
+import com.uavps.common.core.domain.BaseEntity;
+import com.uavps.system.domain.dto.CustomizedMultiTargetFormationDTO;
+import com.uavps.system.domain.dto.FixedMultiTargetFormationDTO;
+import com.uavps.system.domain.dto.PlatformUavDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 任务数据对象 uavps_task
+ * 
+ * @author ruoyi
+ * @date 2025-04-15
+ */
+public class UavpsTask extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    public static final String START = "start";
+    public static final String CHANGE = "change";
+    public static final String DISAPPEAR = "disappear";
+    public static final String SHOW = "show";
+
+    /** 业务ID */
+    private Long bizId;
+
+    /** 业务类型(start:开始,change:队形转换,disappear:消失出现) */
+    @Excel(name = "业务类型", readConverterExp = "s=tart:开始,change:队形转换,disappear:消失出现")
+    private String bizType;
+
+    /** 业务类型 */
+    @Excel(name = "业务类型")
+    private String multiTarget;
+
+    /** 固定翼平台无人机数据 */
+    @JsonIgnore
+    private String platformUavStr;
+
+    /** 固定编队目标数据 */
+    @JsonIgnore
+    private String fixedMultiTargetFormationStr;
+
+    /** 自定义编队目标数据 */
+    @JsonIgnore
+    private String customizedMultiTargetFormationStr;
+    /** 固定翼平台无人机数据 */
+    private PlatformUavDTO platformUav;
+
+    /** 固定编队目标数据 */
+    private FixedMultiTargetFormationDTO fixedMultiTargetFormation;
+
+    /** 自定义编队目标数据 */
+    private List<CustomizedMultiTargetFormationDTO> customizedMultiTargetFormation;
+
+    private List<Integer> numbers = new ArrayList<>();
+
+    public void setBizId(Long bizId) 
+    {
+        this.bizId = bizId;
+    }
+
+    public Long getBizId() 
+    {
+        return bizId;
+    }
+    public void setBizType(String bizType) 
+    {
+        this.bizType = bizType;
+    }
+
+    public String getBizType() 
+    {
+        return bizType;
+    }
+    public void setMultiTarget(String multiTarget) 
+    {
+        this.multiTarget = multiTarget;
+    }
+
+    public String getMultiTarget() 
+    {
+        return multiTarget;
+    }
+    public void setPlatformUavStr(String platformUavStr) 
+    {
+        this.platformUavStr = platformUavStr;
+    }
+
+    public String getPlatformUavStr() 
+    {
+        return platformUavStr;
+    }
+    public void setFixedMultiTargetFormationStr(String fixedMultiTargetFormationStr) 
+    {
+        this.fixedMultiTargetFormationStr = fixedMultiTargetFormationStr;
+    }
+
+    public String getFixedMultiTargetFormationStr() 
+    {
+        return fixedMultiTargetFormationStr;
+    }
+    public void setCustomizedMultiTargetFormationStr(String customizedMultiTargetFormationStr) 
+    {
+        this.customizedMultiTargetFormationStr = customizedMultiTargetFormationStr;
+    }
+
+    public String getCustomizedMultiTargetFormationStr() 
+    {
+        return customizedMultiTargetFormationStr;
+    }
+
+    public PlatformUavDTO getPlatformUav() {
+        if (platformUav == null && StringUtils.isNotEmpty(platformUavStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                this.platformUav = mapper.readValue(this.platformUavStr, PlatformUavDTO.class);
+            } catch (Exception e) {
+                logger.error("UavpsTask.getPlatformUav error", e);
+            }
+        }
+        return platformUav;
+    }
+
+    public void setPlatformUav(PlatformUavDTO platformUav) {
+        this.platformUav = platformUav;
+        if (platformUav != null && StringUtils.isEmpty(this.platformUavStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                String json = mapper.writeValueAsString(platformUav);
+                this.platformUavStr = json;
+            } catch (Exception e) {
+                logger.error("UavpsTask.setPlatformUav error", e);
+            }
+        }
+    }
+
+    public FixedMultiTargetFormationDTO getFixedMultiTargetFormation() {
+        if (fixedMultiTargetFormation == null && StringUtils.isNotEmpty(fixedMultiTargetFormationStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                fixedMultiTargetFormation = mapper.readValue(this.fixedMultiTargetFormationStr, FixedMultiTargetFormationDTO.class);
+            } catch (Exception e) {
+                logger.error("UavpsTask.getPlatformUav error", e);
+            }
+        }
+        return fixedMultiTargetFormation;
+    }
+
+    public void setFixedMultiTargetFormation(FixedMultiTargetFormationDTO fixedMultiTargetFormation) {
+        this.fixedMultiTargetFormation = fixedMultiTargetFormation;
+        if (fixedMultiTargetFormation != null && StringUtils.isEmpty(this.fixedMultiTargetFormationStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            String json = null;
+            try {
+                json = mapper.writeValueAsString(fixedMultiTargetFormation);
+            } catch (Exception e) {
+                logger.error("UavpsTask.setPlatformUav error", e);
+            }
+            this.fixedMultiTargetFormationStr = json;
+        }
+    }
+
+    public List<CustomizedMultiTargetFormationDTO> getCustomizedMultiTargetFormation() {
+        if (customizedMultiTargetFormation == null && StringUtils.isNotEmpty(customizedMultiTargetFormationStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                this.customizedMultiTargetFormation = mapper.readValue(customizedMultiTargetFormationStr, new TypeReference<List<CustomizedMultiTargetFormationDTO>>() {});
+            } catch (Exception e) {
+                logger.error("UavpsTask.getCustomizedMultiTargetFormation error", e);
+            }
+        }
+        return customizedMultiTargetFormation;
+    }
+
+    public void setCustomizedMultiTargetFormation(List<CustomizedMultiTargetFormationDTO> customizedMultiTargetFormation) {
+        this.customizedMultiTargetFormation = customizedMultiTargetFormation;
+        if (customizedMultiTargetFormation != null && StringUtils.isEmpty(this.customizedMultiTargetFormationStr)) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                customizedMultiTargetFormationStr = mapper.writeValueAsString(customizedMultiTargetFormation);
+            } catch (Exception e) {
+                logger.error("UavpsTask.setCustomizedMultiTargetFormation error", e);
+            }
+        }
+    }
+
+    public List<Integer> getNumbers() {
+        return numbers;
+    }
+
+    public void setNumbers(List<Integer> numbers) {
+        this.numbers = numbers;
+    }
+
+    @Override
+    public String toString() {
+        return "UavpsTask{" +
+                "bizId=" + bizId +
+                ", bizType='" + bizType + '\'' +
+                ", multiTarget='" + multiTarget + '\'' +
+                ", platformUavStr='" + platformUavStr + '\'' +
+                ", fixedMultiTargetFormationStr='" + fixedMultiTargetFormationStr + '\'' +
+                ", customizedMultiTargetFormationStr='" + customizedMultiTargetFormationStr + '\'' +
+                ", platformUav=" + platformUav +
+                ", fixedMultiTargetFormation=" + fixedMultiTargetFormation +
+                ", customizedMultiTargetFormation=" + customizedMultiTargetFormation +
+                ", numbers=" + numbers +
+                '}';
+    }
+}

+ 4 - 0
uavps-system/src/main/java/com/uavps/system/domain/dto/CustomizedMultiTargetFormationDTO.java

@@ -0,0 +1,4 @@
+package com.uavps.system.domain.dto;
+
+public class CustomizedMultiTargetFormationDTO {
+}

+ 112 - 0
uavps-system/src/main/java/com/uavps/system/domain/dto/FixedMultiTargetFormationDTO.java

@@ -0,0 +1,112 @@
+package com.uavps.system.domain.dto;
+
+import java.math.BigDecimal;
+
+public class FixedMultiTargetFormationDTO {
+    private Integer targetTotal;
+    private BigDecimal longitude;
+    private BigDecimal latitude;
+    private BigDecimal altitude;
+    private BigDecimal eastSpeed;
+    private BigDecimal northSpeed;
+    private BigDecimal skySpeed;
+    private String flightPathType;
+    private String formationShape;
+    private BigDecimal followAircraftDistance;
+
+    public Integer getTargetTotal() {
+        return targetTotal;
+    }
+
+    public void setTargetTotal(Integer targetTotal) {
+        this.targetTotal = targetTotal;
+    }
+
+    public BigDecimal getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(BigDecimal longitude) {
+        this.longitude = longitude;
+    }
+
+    public BigDecimal getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(BigDecimal latitude) {
+        this.latitude = latitude;
+    }
+
+    public BigDecimal getAltitude() {
+        return altitude;
+    }
+
+    public void setAltitude(BigDecimal altitude) {
+        this.altitude = altitude;
+    }
+
+    public BigDecimal getEastSpeed() {
+        return eastSpeed;
+    }
+
+    public void setEastSpeed(BigDecimal eastSpeed) {
+        this.eastSpeed = eastSpeed;
+    }
+
+    public BigDecimal getNorthSpeed() {
+        return northSpeed;
+    }
+
+    public void setNorthSpeed(BigDecimal northSpeed) {
+        this.northSpeed = northSpeed;
+    }
+
+    public BigDecimal getSkySpeed() {
+        return skySpeed;
+    }
+
+    public void setSkySpeed(BigDecimal skySpeed) {
+        this.skySpeed = skySpeed;
+    }
+
+    public String getFlightPathType() {
+        return flightPathType;
+    }
+
+    public void setFlightPathType(String flightPathType) {
+        this.flightPathType = flightPathType;
+    }
+
+    public String getFormationShape() {
+        return formationShape;
+    }
+
+    public void setFormationShape(String formationShape) {
+        this.formationShape = formationShape;
+    }
+
+    public BigDecimal getFollowAircraftDistance() {
+        return followAircraftDistance;
+    }
+
+    public void setFollowAircraftDistance(BigDecimal followAircraftDistance) {
+        this.followAircraftDistance = followAircraftDistance;
+    }
+
+    @Override
+    public String toString() {
+        return "FixedMultiTargetFormationDTO{" +
+                "targetTotal=" + targetTotal +
+                ", longitude=" + longitude +
+                ", latitude=" + latitude +
+                ", altitude=" + altitude +
+                ", eastSpeed=" + eastSpeed +
+                ", northSpeed=" + northSpeed +
+                ", skySpeed=" + skySpeed +
+                ", flightPathType='" + flightPathType + '\'' +
+                ", formationShape='" + formationShape + '\'' +
+                ", followAircraftDistance=" + followAircraftDistance +
+                '}';
+    }
+}

+ 72 - 0
uavps-system/src/main/java/com/uavps/system/domain/dto/PlatformUavDTO.java

@@ -0,0 +1,72 @@
+package com.uavps.system.domain.dto;
+
+import java.math.BigDecimal;
+
+public class PlatformUavDTO {
+    private BigDecimal longitude;
+    private BigDecimal latitude;
+    private BigDecimal altitude;
+    private BigDecimal eastSpeed;
+    private BigDecimal northSpeed;
+    private BigDecimal skySpeed;
+
+    public BigDecimal getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(BigDecimal longitude) {
+        this.longitude = longitude;
+    }
+
+    public BigDecimal getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(BigDecimal latitude) {
+        this.latitude = latitude;
+    }
+
+    public BigDecimal getAltitude() {
+        return altitude;
+    }
+
+    public void setAltitude(BigDecimal altitude) {
+        this.altitude = altitude;
+    }
+
+    public BigDecimal getEastSpeed() {
+        return eastSpeed;
+    }
+
+    public void setEastSpeed(BigDecimal eastSpeed) {
+        this.eastSpeed = eastSpeed;
+    }
+
+    public BigDecimal getNorthSpeed() {
+        return northSpeed;
+    }
+
+    public void setNorthSpeed(BigDecimal northSpeed) {
+        this.northSpeed = northSpeed;
+    }
+
+    public BigDecimal getSkySpeed() {
+        return skySpeed;
+    }
+
+    public void setSkySpeed(BigDecimal skySpeed) {
+        this.skySpeed = skySpeed;
+    }
+
+    @Override
+    public String toString() {
+        return "PlatformUavDTO{" +
+                "longitude=" + longitude +
+                ", latitude=" + latitude +
+                ", altitude=" + altitude +
+                ", eastSpeed=" + eastSpeed +
+                ", northSpeed=" + northSpeed +
+                ", skySpeed=" + skySpeed +
+                '}';
+    }
+}

+ 61 - 0
uavps-system/src/main/java/com/uavps/system/mapper/UavpsTaskMapper.java

@@ -0,0 +1,61 @@
+package com.uavps.system.mapper;
+
+import java.util.List;
+import com.uavps.system.domain.UavpsTask;
+
+/**
+ * 任务数据Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-04-15
+ */
+public interface UavpsTaskMapper 
+{
+    /**
+     * 查询任务数据
+     * 
+     * @param bizId 任务数据主键
+     * @return 任务数据
+     */
+    public UavpsTask selectUavpsTaskByBizId(Long bizId);
+
+    /**
+     * 查询任务数据列表
+     * 
+     * @param uavpsTask 任务数据
+     * @return 任务数据集合
+     */
+    public List<UavpsTask> selectUavpsTaskList(UavpsTask uavpsTask);
+
+    /**
+     * 新增任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    public int insertUavpsTask(UavpsTask uavpsTask);
+
+    /**
+     * 修改任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    public int updateUavpsTask(UavpsTask uavpsTask);
+
+    /**
+     * 删除任务数据
+     * 
+     * @param bizId 任务数据主键
+     * @return 结果
+     */
+    public int deleteUavpsTaskByBizId(Long bizId);
+
+    /**
+     * 批量删除任务数据
+     * 
+     * @param bizIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteUavpsTaskByBizIds(Long[] bizIds);
+}

+ 61 - 0
uavps-system/src/main/java/com/uavps/system/service/IUavpsTaskService.java

@@ -0,0 +1,61 @@
+package com.uavps.system.service;
+
+import java.util.List;
+import com.uavps.system.domain.UavpsTask;
+
+/**
+ * 任务数据Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-04-15
+ */
+public interface IUavpsTaskService 
+{
+    /**
+     * 查询任务数据
+     * 
+     * @param bizId 任务数据主键
+     * @return 任务数据
+     */
+    public UavpsTask selectUavpsTaskByBizId(Long bizId);
+
+    /**
+     * 查询任务数据列表
+     * 
+     * @param uavpsTask 任务数据
+     * @return 任务数据集合
+     */
+    public List<UavpsTask> selectUavpsTaskList(UavpsTask uavpsTask);
+
+    /**
+     * 新增任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    public int insertUavpsTask(UavpsTask uavpsTask);
+
+    /**
+     * 修改任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    public int updateUavpsTask(UavpsTask uavpsTask);
+
+    /**
+     * 批量删除任务数据
+     * 
+     * @param bizIds 需要删除的任务数据主键集合
+     * @return 结果
+     */
+    public int deleteUavpsTaskByBizIds(Long[] bizIds);
+
+    /**
+     * 删除任务数据信息
+     * 
+     * @param bizId 任务数据主键
+     * @return 结果
+     */
+    public int deleteUavpsTaskByBizId(Long bizId);
+}

+ 96 - 0
uavps-system/src/main/java/com/uavps/system/service/impl/UavpsTaskServiceImpl.java

@@ -0,0 +1,96 @@
+package com.uavps.system.service.impl;
+
+import java.util.List;
+import com.uavps.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.uavps.system.mapper.UavpsTaskMapper;
+import com.uavps.system.domain.UavpsTask;
+import com.uavps.system.service.IUavpsTaskService;
+
+/**
+ * 任务数据Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-04-15
+ */
+@Service
+public class UavpsTaskServiceImpl implements IUavpsTaskService 
+{
+    @Autowired
+    private UavpsTaskMapper uavpsTaskMapper;
+
+    /**
+     * 查询任务数据
+     * 
+     * @param bizId 任务数据主键
+     * @return 任务数据
+     */
+    @Override
+    public UavpsTask selectUavpsTaskByBizId(Long bizId)
+    {
+        return uavpsTaskMapper.selectUavpsTaskByBizId(bizId);
+    }
+
+    /**
+     * 查询任务数据列表
+     * 
+     * @param uavpsTask 任务数据
+     * @return 任务数据
+     */
+    @Override
+    public List<UavpsTask> selectUavpsTaskList(UavpsTask uavpsTask)
+    {
+        return uavpsTaskMapper.selectUavpsTaskList(uavpsTask);
+    }
+
+    /**
+     * 新增任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    @Override
+    public int insertUavpsTask(UavpsTask uavpsTask)
+    {
+        uavpsTask.setCreateTime(DateUtils.getNowDate());
+        return uavpsTaskMapper.insertUavpsTask(uavpsTask);
+    }
+
+    /**
+     * 修改任务数据
+     * 
+     * @param uavpsTask 任务数据
+     * @return 结果
+     */
+    @Override
+    public int updateUavpsTask(UavpsTask uavpsTask)
+    {
+        uavpsTask.setUpdateTime(DateUtils.getNowDate());
+        return uavpsTaskMapper.updateUavpsTask(uavpsTask);
+    }
+
+    /**
+     * 批量删除任务数据
+     * 
+     * @param bizIds 需要删除的任务数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteUavpsTaskByBizIds(Long[] bizIds)
+    {
+        return uavpsTaskMapper.deleteUavpsTaskByBizIds(bizIds);
+    }
+
+    /**
+     * 删除任务数据信息
+     * 
+     * @param bizId 任务数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteUavpsTaskByBizId(Long bizId)
+    {
+        return uavpsTaskMapper.deleteUavpsTaskByBizId(bizId);
+    }
+}

+ 89 - 0
uavps-system/src/main/resources/mapper/system/UavpsTaskMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.uavps.system.mapper.UavpsTaskMapper">
+    
+    <resultMap type="UavpsTask" id="UavpsTaskResult">
+        <result property="bizId"    column="biz_id"    />
+        <result property="bizType"    column="biz_type"    />
+        <result property="multiTarget"    column="multiTarget"    />
+        <result property="platformUavStr"    column="platform_uav_str"    />
+        <result property="fixedMultiTargetFormationStr"    column="fixed_multi_target_formation_str"    />
+        <result property="customizedMultiTargetFormationStr"    column="customized_multi_target_formation_str"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectUavpsTaskVo">
+        select biz_id, biz_type, multiTarget, platform_uav_str, fixed_multi_target_formation_str, customized_multi_target_formation_str, create_by, create_time, update_by, update_time from uavps_task
+    </sql>
+
+    <select id="selectUavpsTaskList" parameterType="UavpsTask" resultMap="UavpsTaskResult">
+        <include refid="selectUavpsTaskVo"/>
+        <where>  
+            <if test="bizType != null  and bizType != ''"> and biz_type = #{bizType}</if>
+            <if test="multiTarget != null  and multiTarget != ''"> and multiTarget = #{multiTarget}</if>
+        </where>
+    </select>
+    
+    <select id="selectUavpsTaskByBizId" parameterType="Long" resultMap="UavpsTaskResult">
+        <include refid="selectUavpsTaskVo"/>
+        where biz_id = #{bizId}
+    </select>
+
+    <insert id="insertUavpsTask" parameterType="UavpsTask" useGeneratedKeys="true" keyProperty="bizId">
+        insert into uavps_task
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="bizType != null and bizType != ''">biz_type,</if>
+            <if test="multiTarget != null and multiTarget != ''">multiTarget,</if>
+            <if test="platformUavStr != null">platform_uav_str,</if>
+            <if test="fixedMultiTargetFormationStr != null">fixed_multi_target_formation_str,</if>
+            <if test="customizedMultiTargetFormationStr != null">customized_multi_target_formation_str,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="bizType != null and bizType != ''">#{bizType},</if>
+            <if test="multiTarget != null and multiTarget != ''">#{multiTarget},</if>
+            <if test="platformUavStr != null">#{platformUavStr},</if>
+            <if test="fixedMultiTargetFormationStr != null">#{fixedMultiTargetFormationStr},</if>
+            <if test="customizedMultiTargetFormationStr != null">#{customizedMultiTargetFormationStr},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateUavpsTask" parameterType="UavpsTask">
+        update uavps_task
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="bizType != null and bizType != ''">biz_type = #{bizType},</if>
+            <if test="multiTarget != null and multiTarget != ''">multiTarget = #{multiTarget},</if>
+            <if test="platformUavStr != null">platform_uav_str = #{platformUavStr},</if>
+            <if test="fixedMultiTargetFormationStr != null">fixed_multi_target_formation_str = #{fixedMultiTargetFormationStr},</if>
+            <if test="customizedMultiTargetFormationStr != null">customized_multi_target_formation_str = #{customizedMultiTargetFormationStr},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where biz_id = #{bizId}
+    </update>
+
+    <delete id="deleteUavpsTaskByBizId" parameterType="Long">
+        delete from uavps_task where biz_id = #{bizId}
+    </delete>
+
+    <delete id="deleteUavpsTaskByBizIds" parameterType="String">
+        delete from uavps_task where biz_id in 
+        <foreach item="bizId" collection="array" open="(" separator="," close=")">
+            #{bizId}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
uavps-web/src/api/system/task.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询任务数据列表
+export function listTask(query) {
+  return request({
+    url: '/system/task/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询任务数据详细
+export function getTask(bizId) {
+  return request({
+    url: '/system/task/' + bizId,
+    method: 'get'
+  })
+}
+
+// 新增任务数据
+export function addTask(data) {
+  return request({
+    url: '/system/task',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改任务数据
+export function updateTask(data) {
+  return request({
+    url: '/system/task',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除任务数据
+export function delTask(bizId) {
+  return request({
+    url: '/system/task/' + bizId,
+    method: 'delete'
+  })
+}

+ 299 - 0
uavps-web/src/views/system/task/index.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="业务类型" prop="bizType">
+        <el-select v-model="queryParams.bizType" placeholder="请选择业务类型" clearable>
+          <el-option
+            v-for="dict in dict.type.uavps_target_formation_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="业务类型" prop="multiTarget">
+        <el-input
+          v-model="queryParams.multiTarget"
+          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-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:task:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:task:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:task:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:task:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="业务ID" align="center" prop="bizId" />
+      <el-table-column label="业务类型" align="center" prop="bizType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.uavps_target_formation_type" :value="scope.row.bizType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="业务类型" align="center" prop="multiTarget">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.uavps_target_formation_type" :value="scope.row.multiTarget"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:task:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:task:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改任务数据对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="业务类型" prop="bizType">
+          <el-select v-model="form.bizType" placeholder="请选择业务类型">
+            <el-option
+              v-for="dict in dict.type.uavps_target_formation_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="业务类型" prop="multiTarget">
+          <el-input v-model="form.multiTarget" placeholder="请输入业务类型" />
+        </el-form-item>
+        <el-form-item label="固定翼平台无人机数据" prop="platformUavStr">
+          <el-input v-model="form.platformUavStr" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="固定编队目标数据" prop="fixedMultiTargetFormationStr">
+          <el-input v-model="form.fixedMultiTargetFormationStr" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="自定义编队目标数据" prop="customizedMultiTargetFormationStr">
+          <el-input v-model="form.customizedMultiTargetFormationStr" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listTask, getTask, delTask, addTask, updateTask } from "@/api/system/task";
+
+export default {
+  name: "Task",
+  dicts: ['uavps_target_formation_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 任务数据表格数据
+      taskList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        bizType: null,
+        multiTarget: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        bizType: [
+          { required: true, message: "业务类型不能为空", trigger: "change" }
+        ],
+        multiTarget: [
+          { required: true, message: "业务类型不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询任务数据列表 */
+    getList() {
+      this.loading = true;
+      listTask(this.queryParams).then(response => {
+        this.taskList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        bizId: null,
+        bizType: null,
+        multiTarget: null,
+        platformUavStr: null,
+        fixedMultiTargetFormationStr: null,
+        customizedMultiTargetFormationStr: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.bizId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加任务数据";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const bizId = row.bizId || this.ids
+      getTask(bizId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改任务数据";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.bizId != null) {
+            updateTask(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTask(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const bizIds = row.bizId || this.ids;
+      this.$modal.confirm('是否确认删除任务数据编号为"' + bizIds + '"的数据项?').then(function() {
+        return delTask(bizIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/task/export', {
+        ...this.queryParams
+      }, `task_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>