Compare commits
No commits in common. "dc1f060aa20c8ca753f1d92c78c5a2b2ae15ad50" and "b9bf191c8b1896f2702a450d12583da0d8282cbe" have entirely different histories.
dc1f060aa2
...
b9bf191c8b
10
README.md
10
README.md
@ -93,15 +93,7 @@ redis-server.exe --service-uninstall
|
|||||||
# 启动前端
|
# 启动前端
|
||||||
## 1. 在frontend目录中执行
|
## 1. 在frontend目录中执行
|
||||||
```
|
```
|
||||||
npm install
|
#npm install
|
||||||
|
|
||||||
npm install --save-dev cross-env
|
|
||||||
|
|
||||||
npx update-browserslist-db@latest
|
|
||||||
|
|
||||||
在 package.json
|
|
||||||
"serve": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
|
|
||||||
|
|
||||||
```
|
```
|
||||||
## 2. 拷贝resource目录中的dt-sdk到node-modules目录
|
## 2. 拷贝resource目录中的dt-sdk到node-modules目录
|
||||||
## 3. 编译前端代码
|
## 3. 编译前端代码
|
||||||
|
|||||||
@ -12,11 +12,6 @@
|
|||||||
<artifactId>skyeye-service-manager</artifactId>
|
<artifactId>skyeye-service-manager</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
|
||||||
<artifactId>fastjson2</artifactId>
|
|
||||||
<version>2.0.60</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- 扩展工具包 -->
|
<!-- 扩展工具包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zhangy</groupId>
|
<groupId>com.zhangy</groupId>
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@MapperScan("com.zhangy.skyeye.**.mapper")
|
@MapperScan("com.zhangy.skyeye.**.mapper")
|
||||||
@SpringBootApplication(scanBasePackages = "com.zhangy.**")
|
@SpringBootApplication(scanBasePackages = "com.zhangy.**")
|
||||||
public class SEApplication {
|
public class LdApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(SEApplication.class, args);
|
SpringApplication.run(LdApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,11 +55,6 @@ public class JmJobController {
|
|||||||
return jobService.selectList(param);
|
return jobService.selectList(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/execJobs")
|
|
||||||
public Object selectExecJobs(@Valid @RequestBody JmJobQueryDTO param) {
|
|
||||||
return jobService.selectExecJobs(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询详情
|
* 查询详情
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -23,11 +23,6 @@ public interface JmJobMapper {
|
|||||||
*/
|
*/
|
||||||
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询执行中的job
|
|
||||||
*/
|
|
||||||
List<JmJobDTO> selectExecJobs(JmJobQueryDTO param);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按主键查询
|
* 按主键查询
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
package com.zhangy.skyeye.jm.service;
|
package com.zhangy.skyeye.jm.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.zhangy.skyeye.jm.consts.JmJobModeEnum;
|
||||||
import com.zhangy.skyeye.jm.dto.JmJobDTO;
|
import com.zhangy.skyeye.jm.dto.JmJobDTO;
|
||||||
|
import com.zhangy.skyeye.jm.dto.JmJobKtyDTO;
|
||||||
|
import com.zhangy.skyeye.jm.dto.JmJobPageDTO;
|
||||||
import com.zhangy.skyeye.jm.dto.JmJobQueryDTO;
|
import com.zhangy.skyeye.jm.dto.JmJobQueryDTO;
|
||||||
|
import com.zhangy.skyeye.jm.entity.JmJob;
|
||||||
import com.zhangy.skyeye.jm.entity.JmJobExec;
|
import com.zhangy.skyeye.jm.entity.JmJobExec;
|
||||||
|
import com.zhangy.skyeye.jm.entity.JmJobPayload;
|
||||||
|
import com.zhangy.skyeye.jm.entity.JmJobUav;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.zhangy.skyeye.jm.service;
|
package com.zhangy.skyeye.jm.service;
|
||||||
|
|
||||||
import com.zhangy.skyeye.jm.entity.JmJobPayload;
|
import com.zhangy.skyeye.jm.entity.JmJobPayload;
|
||||||
|
import com.zhangy.skyeye.jm.entity.JmJobUav;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -22,11 +22,6 @@ public interface JmJobService {
|
|||||||
*/
|
*/
|
||||||
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
List<JmJobDTO> selectList(JmJobQueryDTO param);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查找正在执行的job
|
|
||||||
*/
|
|
||||||
List<JmJobDTO> selectExecJobs(JmJobQueryDTO param);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按主键查询
|
* 按主键查询
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -2,10 +2,13 @@ package com.zhangy.skyeye.jm.service.impl;
|
|||||||
|
|
||||||
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
||||||
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
||||||
|
import com.zhangy.skyeye.jm.dto.JmJobDTO;
|
||||||
import com.zhangy.skyeye.jm.entity.JmAirline;
|
import com.zhangy.skyeye.jm.entity.JmAirline;
|
||||||
import com.zhangy.skyeye.jm.entity.JmAirlineExec;
|
import com.zhangy.skyeye.jm.entity.JmAirlineExec;
|
||||||
import com.zhangy.skyeye.jm.mapper.JmAirlineExecMapper;
|
import com.zhangy.skyeye.jm.mapper.JmAirlineExecMapper;
|
||||||
|
import com.zhangy.skyeye.jm.mapper.JmAirlineMapper;
|
||||||
import com.zhangy.skyeye.jm.service.JmAirlineExecService;
|
import com.zhangy.skyeye.jm.service.JmAirlineExecService;
|
||||||
|
import com.zhangy.skyeye.jm.service.JmAirlineService;
|
||||||
import com.zhangy.skyeye.publics.consts.ExecStatusEnum;
|
import com.zhangy.skyeye.publics.consts.ExecStatusEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -19,6 +22,8 @@ public class JmAirlineExecServiceImpl implements JmAirlineExecService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmAirlineExecMapper airlineExecMapper;
|
private JmAirlineExecMapper airlineExecMapper;
|
||||||
|
@Autowired
|
||||||
|
private JmAirlineMapper jmAirlineMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JmAirline> selectByJobExec(Long... jobId) {
|
public List<JmAirline> selectByJobExec(Long... jobId) {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.zhangy.skyeye.jm.service.impl;
|
package com.zhangy.skyeye.jm.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
||||||
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
||||||
import com.zhangy.skyeye.device.consts.PayloadTypeEnum;
|
import com.zhangy.skyeye.device.consts.PayloadTypeEnum;
|
||||||
@ -19,17 +18,14 @@ import com.zhangy.skyeye.py.service.IPyAirlineService;
|
|||||||
import com.zhangy.skyeye.sar.consts.SarImageModeEnum;
|
import com.zhangy.skyeye.sar.consts.SarImageModeEnum;
|
||||||
import com.zhangy.skyeye.sar.dto.SarFlightPlanDTO;
|
import com.zhangy.skyeye.sar.dto.SarFlightPlanDTO;
|
||||||
import com.zhangy.skyeye.sar.util.SpotlightPlanner;
|
import com.zhangy.skyeye.sar.util.SpotlightPlanner;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 航线规划
|
* 航线规划
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
|
||||||
@Service
|
@Service
|
||||||
public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
||||||
|
|
||||||
@ -42,8 +38,6 @@ public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<Long, List<JmAirline>> plan(JmJobModeEnum jobMode, SarImageModeEnum imageMode, Integer targetType,
|
public Map<Long, List<JmAirline>> plan(JmJobModeEnum jobMode, SarImageModeEnum imageMode, Integer targetType,
|
||||||
List<JmJobUav> uavList, List<List<JmJobPoint>> pointList) {
|
List<JmJobUav> uavList, List<List<JmJobPoint>> pointList) {
|
||||||
log.info("航线规划参数:{}||{}||{}||{}|{}", jobMode, imageMode, targetType,
|
|
||||||
JSON.toJSONString(uavList), JSON.toJSONString(pointList));
|
|
||||||
checkParam(jobMode, imageMode, targetType);
|
checkParam(jobMode, imageMode, targetType);
|
||||||
// 非航线模式需要调算法生成航线,需要从缓存取sar坐标
|
// 非航线模式需要调算法生成航线,需要从缓存取sar坐标
|
||||||
Map<Long, List<JmAirline>> airlineGroup = null;
|
Map<Long, List<JmAirline>> airlineGroup = null;
|
||||||
@ -62,6 +56,8 @@ public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
|||||||
*
|
*
|
||||||
* @param jobMode
|
* @param jobMode
|
||||||
* @param imageMode
|
* @param imageMode
|
||||||
|
* @param uavList
|
||||||
|
* @param pointList
|
||||||
*/
|
*/
|
||||||
private void checkParam(JmJobModeEnum jobMode, SarImageModeEnum imageMode, Integer targetType) {
|
private void checkParam(JmJobModeEnum jobMode, SarImageModeEnum imageMode, Integer targetType) {
|
||||||
if (imageMode == SarImageModeEnum.JS) {
|
if (imageMode == SarImageModeEnum.JS) {
|
||||||
@ -113,6 +109,7 @@ public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
|||||||
*
|
*
|
||||||
* @param uav 无人机
|
* @param uav 无人机
|
||||||
* @param home 起飞点
|
* @param home 起飞点
|
||||||
|
* @param point 目标点
|
||||||
* @return 航线
|
* @return 航线
|
||||||
*/
|
*/
|
||||||
public JmAirline planJs(JmJobUav uav, JmJobPoint home, JmJobPoint target) {
|
public JmAirline planJs(JmJobUav uav, JmJobPoint home, JmJobPoint target) {
|
||||||
@ -165,79 +162,54 @@ public class JmAirlinePlanServiceImpl implements JmAirlinePlanService {
|
|||||||
* 转为航线算法参数
|
* 转为航线算法参数
|
||||||
*/
|
*/
|
||||||
private PyAirlineParamDTO toKtkxParam(List<List<JmJobPoint>> pointList, List<JmJobUav> uavList) {
|
private PyAirlineParamDTO toKtkxParam(List<List<JmJobPoint>> pointList, List<JmJobUav> uavList) {
|
||||||
log.info("开始转换 PyAirlineParamDTO,pointList 大小: {}, uavList 大小: {}",
|
List<PyAirlineTargetDTO> pyPointList = new ArrayList<>();
|
||||||
pointList.size(), uavList.size());
|
|
||||||
// 所有无人机共享相同的目标点集(扁平化所有区域的点)
|
|
||||||
List<JmJobPoint> allPoints = pointList.stream()
|
|
||||||
.flatMap(List::stream)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
// 转换为 Python 需要的 double[][] 坐标格式(经度在前,纬度在后)
|
|
||||||
double[][] coords = allPoints.stream()
|
|
||||||
.map(p -> new double[]{p.getLongitude(), p.getLatitude()})
|
|
||||||
.toArray(double[][]::new);
|
|
||||||
log.info("提取到 {} 个目标点坐标", coords.length);
|
|
||||||
|
|
||||||
List<PyAirlineTargetDTO> pyTargets = new ArrayList<>();
|
|
||||||
List<PyAirlineUavDTO> pyUavList = new ArrayList<>();
|
List<PyAirlineUavDTO> pyUavList = new ArrayList<>();
|
||||||
for (int i = 0; i < uavList.size(); i++) {
|
for (int i = 0; i < uavList.size(); i++) {
|
||||||
JmJobUav uav = uavList.get(i);
|
JmJobUav u = uavList.get(i);
|
||||||
// 1. 为当前无人机创建目标(共享坐标,但 target id 不同)
|
// 区域
|
||||||
pyTargets.add(new PyAirlineTargetDTO(i, coords));
|
List<JmJobPoint> points = pointList.get(i);
|
||||||
// 2. 获取 SAR 载荷(必须存在,否则抛异常)
|
double[][] coords = points.stream()
|
||||||
JmJobPayload sarPayload = findSarPayload(uav);
|
.map(point -> new double[] { point.getLongitude(), point.getLatitude() })
|
||||||
String sarIp = sarPayload.getIp(); // 已在 findSarPayload 中设置
|
.toArray(double[][]::new);
|
||||||
// 3. 获取载荷最新状态(用于起始位置)
|
pyPointList.add(new PyAirlineTargetDTO(i, coords));
|
||||||
JmSarStatusDTO status = payloadService.getLastStatus(sarIp);
|
|
||||||
if (status == null) {
|
|
||||||
throw ServiceException.errorLog("无法获取 SAR载荷的最新状态");
|
|
||||||
}
|
|
||||||
// 4. 如果起飞高度为空,则使用载荷当前高度
|
|
||||||
if (uav.getStartAltitude() == null) {
|
|
||||||
uav.setStartAltitude((double) status.getAltitude());
|
|
||||||
log.info("无人机 {} 起飞高度为空,已使用载荷当前高度: {}", uav.getUavId(), uav.getStartAltitude());
|
|
||||||
}
|
|
||||||
// 5. 构建 Python UAV DTO
|
|
||||||
PyAirlineUavDTO pyUav = BeanUtil.copyProperties(uav, PyAirlineUavDTO.class);
|
|
||||||
pyUav.setId(uav.getUavId());
|
|
||||||
pyUav.setStartCoord(new double[]{status.getLongitude(), status.getLatitude()});
|
|
||||||
pyUav.setEndCoord(new double[]{status.getLongitude(), status.getLatitude()}); // 目前起终点相同
|
|
||||||
pyUav.setConstraint(uav.getHeight());
|
|
||||||
// 6. 构建 Payload DTO
|
|
||||||
PyAirlinePayloadDTO payloadDto = BeanUtil.copyProperties(sarPayload, PyAirlinePayloadDTO.class);
|
|
||||||
payloadDto.setType(PayloadTypeEnum.SAR.getCode());
|
|
||||||
pyUav.setPayload(payloadDto);
|
|
||||||
pyUavList.add(pyUav);
|
|
||||||
}
|
|
||||||
// 转换为数组(Python 端需要数组格式)
|
|
||||||
PyAirlineTargetDTO[] targetListArray = pyTargets.toArray(new PyAirlineTargetDTO[0]);
|
|
||||||
PyAirlineUavDTO[] uavListArray = pyUavList.toArray(new PyAirlineUavDTO[0]);
|
|
||||||
PyAirlineParamDTO param = new PyAirlineParamDTO();
|
|
||||||
param.setTargets(targetListArray);
|
|
||||||
param.setUavs(uavListArray);
|
|
||||||
log.info("转换完成,生成 PyAirlineParamDTO:{} 个目标组,{} 架无人机",
|
|
||||||
targetListArray.length, uavListArray.length);
|
|
||||||
return param;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
// 载荷
|
||||||
* 从无人机载荷列表中查找 SAR 类型载荷,并设置 IP
|
JmJobPayload sar = u.getPayloadList()
|
||||||
* @param uav 无人机对象
|
.stream()
|
||||||
* @return SAR 载荷
|
.filter(jp -> {
|
||||||
* @throws ServiceException 如果没有找到 SAR 载荷
|
Long payloadId = jp.getPayloadId();
|
||||||
*/
|
SkyeyePayload p = payloadService.getOne(payloadId);
|
||||||
private JmJobPayload findSarPayload(JmJobUav uav) {
|
if (p != null && p.getType().equals(PayloadTypeEnum.SAR.getCode())) {
|
||||||
return uav.getPayloadList().stream()
|
jp.setIp(p.getIp());
|
||||||
.filter(payload -> {
|
|
||||||
Long payloadId = payload.getPayloadId();
|
|
||||||
SkyeyePayload skyeyePayload = payloadService.getOne(payloadId);
|
|
||||||
if (skyeyePayload != null && PayloadTypeEnum.SAR.getCode().equals(skyeyePayload.getType())) {
|
|
||||||
payload.setIp(skyeyePayload.getIp());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElseThrow(() -> ServiceException.errorLog(
|
.orElseThrow( () -> ServiceException.errorLog("存在无人机缺少sar类型载荷"));
|
||||||
"存在无人机缺少sar类型载荷"));
|
|
||||||
|
PyAirlineUavDTO uav = BeanUtil.copyProperties(u, PyAirlineUavDTO.class);
|
||||||
|
JmSarStatusDTO statusDTO = payloadService.getLastStatus(sar.getIp());
|
||||||
|
double startLon = statusDTO.getLongitude();
|
||||||
|
double startLat = statusDTO.getLatitude();
|
||||||
|
if (u.getStartAltitude() == null) {
|
||||||
|
u.setStartAltitude((double) statusDTO.getAltitude());
|
||||||
|
}
|
||||||
|
uav.setId(u.getUavId());
|
||||||
|
uav.setStartCoord(new double[] {startLon, startLat});
|
||||||
|
uav.setEndCoord(new double[] {startLon, startLat});
|
||||||
|
uav.setConstraint(u.getHeight());
|
||||||
|
PyAirlinePayloadDTO payload = BeanUtil.copyProperties(sar, PyAirlinePayloadDTO.class);
|
||||||
|
payload.setType(PayloadTypeEnum.SAR.getCode());
|
||||||
|
uav.setPayload(payload);
|
||||||
|
pyUavList.add(uav);
|
||||||
|
}
|
||||||
|
PyAirlineUavDTO[] uavs = pyUavList.toArray(new PyAirlineUavDTO[pyUavList.size()]);
|
||||||
|
PyAirlineTargetDTO[] targets = pyPointList.toArray(new PyAirlineTargetDTO[pyPointList.size()]);
|
||||||
|
|
||||||
|
PyAirlineParamDTO param = new PyAirlineParamDTO();
|
||||||
|
param.setTargets(targets);
|
||||||
|
param.setUavs(uavs);
|
||||||
|
return param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import com.zhangy.skyeye.jm.entity.JmImage;
|
|||||||
import com.zhangy.skyeye.jm.entity.JmImageItem;
|
import com.zhangy.skyeye.jm.entity.JmImageItem;
|
||||||
import com.zhangy.skyeye.jm.entity.JmJobPayload;
|
import com.zhangy.skyeye.jm.entity.JmJobPayload;
|
||||||
import com.zhangy.skyeye.jm.mapper.JmImageMapper;
|
import com.zhangy.skyeye.jm.mapper.JmImageMapper;
|
||||||
import com.zhangy.skyeye.jm.mapper.JmJobPayloadMapper;
|
|
||||||
import com.zhangy.skyeye.jm.service.*;
|
import com.zhangy.skyeye.jm.service.*;
|
||||||
import com.zhangy.skyeye.publics.consts.FileStoreTypeEnum;
|
import com.zhangy.skyeye.publics.consts.FileStoreTypeEnum;
|
||||||
import com.zhangy.skyeye.publics.consts.FileTypeEnum;
|
import com.zhangy.skyeye.publics.consts.FileTypeEnum;
|
||||||
@ -50,7 +49,7 @@ public class JmImageServiceImpl implements JmImageService {
|
|||||||
private IPyImageService detectService;
|
private IPyImageService detectService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmJobPayloadMapper jobPayloadMapper;
|
private JmJobPayloadService jobPayloadService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysFileService fileService;
|
private ISysFileService fileService;
|
||||||
@ -224,7 +223,7 @@ public class JmImageServiceImpl implements JmImageService {
|
|||||||
jobExecId = jobExecDTO.getExecId();
|
jobExecId = jobExecDTO.getExecId();
|
||||||
fileType = FileTypeEnum.SAR_IMAGE_HIGH;
|
fileType = FileTypeEnum.SAR_IMAGE_HIGH;
|
||||||
srcFileType = FileTypeEnum.SAR_IMAGE_HIGH_SRC;
|
srcFileType = FileTypeEnum.SAR_IMAGE_HIGH_SRC;
|
||||||
JmJobPayload sar = jobPayloadMapper.selectSar(jobId, uavId);
|
JmJobPayload sar = jobPayloadService.selectSar(jobId, uavId);
|
||||||
if (sar == null) {
|
if (sar == null) {
|
||||||
throw ServiceException.noLog("找不到该任务的SAR载荷");
|
throw ServiceException.noLog("找不到该任务的SAR载荷");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,9 @@ package com.zhangy.skyeye.jm.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
import com.zhangy.skyeye.common.extend.exception.ServiceException;
|
||||||
|
import com.zhangy.skyeye.common.extend.util.FileUtil;
|
||||||
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
import com.zhangy.skyeye.common.extend.util.ObjectUtil;
|
||||||
|
import com.zhangy.skyeye.device.service.IPayloadService;
|
||||||
import com.zhangy.skyeye.jm.dto.JmJobDTO;
|
import com.zhangy.skyeye.jm.dto.JmJobDTO;
|
||||||
import com.zhangy.skyeye.jm.dto.JmJobQueryDTO;
|
import com.zhangy.skyeye.jm.dto.JmJobQueryDTO;
|
||||||
import com.zhangy.skyeye.jm.entity.JmAirlineExec;
|
import com.zhangy.skyeye.jm.entity.JmAirlineExec;
|
||||||
@ -11,11 +13,10 @@ import com.zhangy.skyeye.jm.entity.JmJobPoint;
|
|||||||
import com.zhangy.skyeye.jm.entity.JmJobUav;
|
import com.zhangy.skyeye.jm.entity.JmJobUav;
|
||||||
import com.zhangy.skyeye.jm.event.JmJobStatusInitEvent;
|
import com.zhangy.skyeye.jm.event.JmJobStatusInitEvent;
|
||||||
import com.zhangy.skyeye.jm.mapper.JmJobExecMapper;
|
import com.zhangy.skyeye.jm.mapper.JmJobExecMapper;
|
||||||
import com.zhangy.skyeye.jm.service.JmAirlineExecService;
|
import com.zhangy.skyeye.jm.service.*;
|
||||||
import com.zhangy.skyeye.jm.service.JmJobExecService;
|
|
||||||
import com.zhangy.skyeye.jm.service.JmJobPointService;
|
|
||||||
import com.zhangy.skyeye.jm.service.JmJobUavService;
|
|
||||||
import com.zhangy.skyeye.publics.consts.ExecStatusEnum;
|
import com.zhangy.skyeye.publics.consts.ExecStatusEnum;
|
||||||
|
import com.zhangy.skyeye.publics.consts.FileTypeEnum;
|
||||||
|
import com.zhangy.skyeye.publics.service.SysFileTypeService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
@ -31,6 +32,8 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class JmJobExecServiceImpl implements JmJobExecService {
|
public class JmJobExecServiceImpl implements JmJobExecService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JmJobStatusService jobStatusService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmJobExecMapper jobExecMapper;
|
private JmJobExecMapper jobExecMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -39,9 +42,16 @@ public class JmJobExecServiceImpl implements JmJobExecService {
|
|||||||
private JmJobPointService jobPointService;
|
private JmJobPointService jobPointService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmJobUavService jobUavService;
|
private JmJobUavService jobUavService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPayloadService payloadService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationEventPublisher eventPublisher;
|
private ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysFileTypeService fileTypeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initExecutingJobs() {
|
public void initExecutingJobs() {
|
||||||
List<JmJobDTO> executingJobs = this.selectWorking();
|
List<JmJobDTO> executingJobs = this.selectWorking();
|
||||||
@ -173,6 +183,7 @@ public class JmJobExecServiceImpl implements JmJobExecService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void deleteByJobConf(Long... jobConfId) {
|
public void deleteByJobConf(Long... jobConfId) {
|
||||||
|
Long[] jobExecIds = jobExecMapper.selectByConf(jobConfId).stream().map(e -> e.getId()).toArray(Long[]::new);
|
||||||
jmAirlineExecService.deleteByJob(jobConfId);
|
jmAirlineExecService.deleteByJob(jobConfId);
|
||||||
jobExecMapper.deleteByConf(jobConfId);
|
jobExecMapper.deleteByConf(jobConfId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,9 +38,9 @@ public class JmJobPayloadServiceImpl implements JmJobPayloadService {
|
|||||||
if (ObjectUtil.isEmpty(jobExecList)) {
|
if (ObjectUtil.isEmpty(jobExecList)) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
Long[] jobExecIds = jobExecList.stream().map(JmJobDTO::getExecId).distinct().toArray(Long[]::new);
|
Long[] jobExecIds = jobExecList.stream().map(j -> j.getExecId()).distinct().toArray(Long[]::new);
|
||||||
// jobExecList 按照时间倒序排列,若有一个任务配置对应多个任务执行时,取第一个元素为最新的执行数据
|
// jobExecList 按照时间倒序排列,若有一个任务配置对应多个任务执行时,取第一个元素为最新的执行数据
|
||||||
Map<Long, Long> jobConfExecIdMap = jobExecList.stream().collect(Collectors.toMap(JmJobDTO::getConfId, JmJobDTO::getExecId, (a, b) -> a));
|
Map<Long, Long> jobConfExecIdMap = jobExecList.stream().collect(Collectors.toMap(j -> j.getConfId(), j -> j.getExecId(), (a, b) -> a));
|
||||||
// 图片jobId不应该用confId
|
// 图片jobId不应该用confId
|
||||||
Map<Long, Map<Long, List<JmImage>>> imageGroup = sarImageService.selectByJob(FileTypeEnum.SAR_IMAGE_LOW, jobExecIds)
|
Map<Long, Map<Long, List<JmImage>>> imageGroup = sarImageService.selectByJob(FileTypeEnum.SAR_IMAGE_LOW, jobExecIds)
|
||||||
.stream()
|
.stream()
|
||||||
@ -86,16 +86,15 @@ public class JmJobPayloadServiceImpl implements JmJobPayloadService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JmJobPayload> selectByUav(Long jobId, Long uavId) {
|
public List<JmJobPayload> selectByUav(Long jobId, Long uavId) {
|
||||||
// 没用到
|
Map<Long, List<JmImage>> imageGroup = sarImageService.selectByUav(FileTypeEnum.SAR_IMAGE_LOW, jobId, uavId)
|
||||||
// Map<Long, List<JmImage>> imageGroup = sarImageService.selectByUav(FileTypeEnum.SAR_IMAGE_LOW, jobId, uavId)
|
.stream()
|
||||||
// .stream()
|
.collect(Collectors.groupingBy(JmImage::getPayloadId));
|
||||||
// .collect(Collectors.groupingBy(JmImage::getPayloadId));
|
List<JmJobPayload> list = jobPayloadMapper.selectByUav(jobId, uavId);
|
||||||
// List<JmJobPayload> list = jobPayloadMapper.selectByUav(jobId, uavId);
|
list.forEach(e -> {
|
||||||
// list.forEach(e -> {
|
Long payloadId = e.getPayloadId();
|
||||||
// Long payloadId = e.getPayloadId();
|
e.setImageList(imageGroup.containsKey(payloadId) ? imageGroup.get(payloadId) : Collections.EMPTY_LIST);
|
||||||
// e.setImageList(imageGroup.containsKey(payloadId) ? imageGroup.get(payloadId) : Collections.EMPTY_LIST);
|
});
|
||||||
// });
|
return list;
|
||||||
return jobPayloadMapper.selectByUav(jobId, uavId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package com.zhangy.skyeye.jm.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhangy.skyeye.common.extend.enums.EnumUtil;
|
import com.zhangy.skyeye.common.extend.enums.EnumUtil;
|
||||||
@ -37,6 +36,10 @@ import com.zhangy.skyeye.sar.enums.SarIMUStatusEnum;
|
|||||||
import com.zhangy.skyeye.sar.service.ISarControlService;
|
import com.zhangy.skyeye.sar.service.ISarControlService;
|
||||||
import com.zhangy.skyeye.sar.service.ISarMtiPointService;
|
import com.zhangy.skyeye.sar.service.ISarMtiPointService;
|
||||||
import com.zhangy.skyeye.sar.service.ISarMtiTrailService;
|
import com.zhangy.skyeye.sar.service.ISarMtiTrailService;
|
||||||
|
//import com.zhangy.skyeye.smp.dto.SmpSubscriptResDTO;
|
||||||
|
//import com.zhangy.skyeye.smp.dto.SmpWayPointDTO;
|
||||||
|
//import com.zhangy.skyeye.smp.service.ISmpSubscriptService;
|
||||||
|
//import com.zhangy.skyeye.smp.service.ISmpWayPointService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -66,20 +69,33 @@ public class JmJobServiceImpl implements JmJobService {
|
|||||||
private JmJobStatusService jobStatusService;
|
private JmJobStatusService jobStatusService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmJobExecService jmJobExecService;
|
private JmJobExecService jmJobExecService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private ISmpWayPointService smpWayPointService;
|
||||||
|
// @Autowired
|
||||||
|
// private ISmpSubscriptService smpSubscriptService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarControlService sarControlService;
|
private ISarControlService sarControlService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarMtiPointService sarMtiPointService;
|
private ISarMtiPointService sarMtiPointService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarMtiTrailService sarMtiTrailService;
|
private ISarMtiTrailService sarMtiTrailService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPayloadService payloadService;
|
private IPayloadService payloadService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUavService uavService;
|
private IUavService uavService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysFileTypeService fileTypeService;
|
private SysFileTypeService fileTypeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPyAirlineService ktkxService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QuartzService quartzService;
|
private QuartzService quartzService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private JmAirlinePlanService jmAirlinePlanService;
|
private JmAirlinePlanService jmAirlinePlanService;
|
||||||
|
|
||||||
@ -97,13 +113,6 @@ public class JmJobServiceImpl implements JmJobService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<JmJobDTO> selectExecJobs(JmJobQueryDTO param) {
|
|
||||||
List<JmJobDTO> list = jobMapper.selectExecJobs(param);
|
|
||||||
loadDetail(param.getUavId(), list);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadDetail(Long uavId, List<JmJobDTO> list) {
|
private void loadDetail(Long uavId, List<JmJobDTO> list) {
|
||||||
if (ObjectUtil.isEmpty(list)) {
|
if (ObjectUtil.isEmpty(list)) {
|
||||||
return;
|
return;
|
||||||
@ -148,7 +157,6 @@ public class JmJobServiceImpl implements JmJobService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public JmJobDTO save(JmJobModeEnum jobMode, JmJobDTO e) {
|
public JmJobDTO save(JmJobModeEnum jobMode, JmJobDTO e) {
|
||||||
log.info("保存任务参数:{}||{}", JSON.toJSONString(jobMode), JSON.toJSONString(e));
|
|
||||||
SarImageModeEnum imageMode = EnumUtil.parseEx(SarImageModeEnum.class, e.getImageMode());
|
SarImageModeEnum imageMode = EnumUtil.parseEx(SarImageModeEnum.class, e.getImageMode());
|
||||||
// 非航线模式需要调算法生成航线,需要从缓存取sar坐标
|
// 非航线模式需要调算法生成航线,需要从缓存取sar坐标
|
||||||
Map<Long, List<JmAirline>> airlineGroup = jmAirlinePlanService.plan(jobMode, imageMode, e.getTargetType(),
|
Map<Long, List<JmAirline>> airlineGroup = jmAirlinePlanService.plan(jobMode, imageMode, e.getTargetType(),
|
||||||
@ -359,7 +367,6 @@ public class JmJobServiceImpl implements JmJobService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 起飞 kmz
|
* 起飞 kmz
|
||||||
*
|
|
||||||
* @param job
|
* @param job
|
||||||
*/
|
*/
|
||||||
private void startKmz(JmJobDTO job) {
|
private void startKmz(JmJobDTO job) {
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import lombok.Setter;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.alibaba.fastjson2.*;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
@ -38,9 +37,6 @@ public class PyAirlineServiceImpl implements IPyAirlineService {
|
|||||||
@Value("${skyeye.py.ktkxUrl}")
|
@Value("${skyeye.py.ktkxUrl}")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Value("${skyeye.java.ktkxUrl}")
|
|
||||||
private String javaUrl;
|
|
||||||
|
|
||||||
// 判断是否为空,并剔除无需执行任务的无人机
|
// 判断是否为空,并剔除无需执行任务的无人机
|
||||||
private boolean checkEmpty(Map<Long, PyAirlineDTO[]> uavMap) {
|
private boolean checkEmpty(Map<Long, PyAirlineDTO[]> uavMap) {
|
||||||
if (uavMap == null || uavMap.size() == 0) {
|
if (uavMap == null || uavMap.size() == 0) {
|
||||||
@ -76,17 +72,7 @@ public class PyAirlineServiceImpl implements IPyAirlineService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, List<JmAirline>> getAirline(PyAirlineParamDTO param) {
|
public Map<Long, List<JmAirline>> getAirline(PyAirlineParamDTO param) {
|
||||||
log.info("请求航线规划算法服务参数:{}", JSON.toJSONString(param));
|
HttpResponse<String> httpResponse = null;
|
||||||
// HttpResponse<String> post;
|
|
||||||
// try {
|
|
||||||
// post = HttpUtil.post(javaUrl, null, param);
|
|
||||||
// } catch (IOException e) {
|
|
||||||
// throw new RuntimeException(e);
|
|
||||||
// }
|
|
||||||
// PyAirlineResponse pyAirlineResponse;
|
|
||||||
// pyAirlineResponse = JsonUtil.parse(post.body(), PyAirlineResponse.class);
|
|
||||||
// log.info("请求航线规划算法服务响应:{}",JSON.toJSONString(pyAirlineResponse));
|
|
||||||
HttpResponse<String> httpResponse;
|
|
||||||
try {
|
try {
|
||||||
httpResponse = HttpUtil.post(url, null, param);
|
httpResponse = HttpUtil.post(url, null, param);
|
||||||
} catch (ConnectException ex) {
|
} catch (ConnectException ex) {
|
||||||
@ -96,19 +82,17 @@ public class PyAirlineServiceImpl implements IPyAirlineService {
|
|||||||
}
|
}
|
||||||
PyAirlineResponse response;
|
PyAirlineResponse response;
|
||||||
response = JsonUtil.parse(httpResponse.body(), PyAirlineResponse.class);
|
response = JsonUtil.parse(httpResponse.body(), PyAirlineResponse.class);
|
||||||
log.info("请求航线规划算法服务响应:{}", JSON.toJSONString(response));
|
|
||||||
int responseCode = httpResponse.statusCode();
|
int responseCode = httpResponse.statusCode();
|
||||||
if (responseCode >= 400) {
|
if (responseCode >= 400) {
|
||||||
log.warn("调用航线规划算法错误[{}]:{},参数:{}", responseCode, response.getMessage(), JsonUtil.toString(param));
|
log.warn("调用航线规划算法错误["+ responseCode + "]:" + response.getMessage() + ",参数:" + JsonUtil.toString(param));
|
||||||
throw ServiceException.noLog("调用航线规划算法错误["+ responseCode + "]:" + response.getMessage());
|
throw ServiceException.noLog("调用航线规划算法错误["+ responseCode + "]:" + response.getMessage());
|
||||||
}
|
}
|
||||||
Map<Long, PyAirlineDTO[]> uavMap = response.getData();
|
Map<Long, PyAirlineDTO[]> uavMap = response.getData();
|
||||||
log.info("航线规划算法结果:{}", JSON.toJSONString(uavMap));
|
|
||||||
if (checkEmpty(uavMap)) {
|
if (checkEmpty(uavMap)) {
|
||||||
if ("success".endsWith(response.getMessage())) {
|
if ("success".endsWith(response.getMessage())) {
|
||||||
throw ServiceException.noLog("无法生成航线,可能飞行区域超过25平方公里");
|
throw ServiceException.noLog("无法生成航线,可能飞行区域超过25平方公里");
|
||||||
}
|
}
|
||||||
log.warn("调用航线规划算法未返回数据[{}]:{},参数:{}", responseCode, response.getMessage(), JsonUtil.toString(param));
|
log.warn("调用航线规划算法未返回数据["+ responseCode + "]:" + response.getMessage() + ",参数:" + JsonUtil.toString(param));
|
||||||
throw ServiceException.noLog("调用航线规划算法未返回数据["+ responseCode + "]:" + response.getMessage());
|
throw ServiceException.noLog("调用航线规划算法未返回数据["+ responseCode + "]:" + response.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
package com.zhangy.skyeye.sar.context;
|
|
||||||
|
|
||||||
import com.zhangy.skyeye.jm.dto.JmAirlineStatusDTO;
|
|
||||||
import com.zhangy.skyeye.jm.dto.JmUavStatusDTO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @PROJECT_NAME: skyeyesystem
|
|
||||||
* @DESCRIPTION: SAR 回传相关任务上下文提供者 用于打破 SarBackWsServiceImpl 对 JmJobStatusService 的直接依赖
|
|
||||||
* @AUTHOR: GuanCheng Long
|
|
||||||
* @DATE: 2026/1/21 1:10
|
|
||||||
*/
|
|
||||||
public interface SarTaskContextProvider {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据载荷 IP 获取当前无人机状态
|
|
||||||
*/
|
|
||||||
JmUavStatusDTO getCurrentUav(String payloadIp);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据载荷 IP 获取当前航线状态
|
|
||||||
*/
|
|
||||||
JmAirlineStatusDTO getCurrentAirline(String payloadIp);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前任务执行 ID
|
|
||||||
*/
|
|
||||||
Long getCurrentJobExecId(String payloadIp);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前任务配置 ID
|
|
||||||
*/
|
|
||||||
Long getCurrentJobId(String payloadIp);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
package com.zhangy.skyeye.sar.context;
|
|
||||||
|
|
||||||
import com.zhangy.skyeye.jm.dto.JmAirlineStatusDTO;
|
|
||||||
import com.zhangy.skyeye.jm.dto.JmUavStatusDTO;
|
|
||||||
import com.zhangy.skyeye.redis.utils.RedisUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @PROJECT_NAME: skyeyesystem
|
|
||||||
* @DESCRIPTION: SAR 任务上下文提供者实现(基于 Redis 缓存,避免循环依赖)
|
|
||||||
* - JmJobStatusServiceImpl 在更新状态时,主动把 JmUavStatusDTO 推送到 Redis
|
|
||||||
* - 此类只从 Redis 读取,不注入 JmJobStatusService
|
|
||||||
* @AUTHOR: GuanCheng Long
|
|
||||||
* @DATE: 2026/1/21 1:10
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class SarTaskContextProviderImpl implements SarTaskContextProvider {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisUtil redisUtil;
|
|
||||||
|
|
||||||
// Redis 键前缀
|
|
||||||
private static final String UAV_STATUS_KEY_PREFIX = "sar:context:uav:";
|
|
||||||
|
|
||||||
// 缓存过期时间(秒)
|
|
||||||
private static final long CACHE_EXPIRE_SECONDS = 600; // 10 分钟
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JmUavStatusDTO getCurrentUav(String payloadIp) {
|
|
||||||
if (payloadIp == null || payloadIp.trim().isEmpty()) {
|
|
||||||
log.warn("获取 uav 状态失败:payloadIp 为空");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String key = UAV_STATUS_KEY_PREFIX + payloadIp;
|
|
||||||
Object obj = redisUtil.get(key);
|
|
||||||
|
|
||||||
if (obj instanceof JmUavStatusDTO) {
|
|
||||||
return (JmUavStatusDTO) obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.debug("Redis 中未找到 IP={} 的 uav 状态", payloadIp);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JmAirlineStatusDTO getCurrentAirline(String payloadIp) {
|
|
||||||
JmUavStatusDTO uav = getCurrentUav(payloadIp);
|
|
||||||
if (uav == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return uav.getCurrAirline();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long getCurrentJobExecId(String payloadIp) {
|
|
||||||
JmUavStatusDTO uav = getCurrentUav(payloadIp);
|
|
||||||
return uav != null ? uav.getJobExecId() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long getCurrentJobId(String payloadIp) {
|
|
||||||
JmAirlineStatusDTO airline = getCurrentAirline(payloadIp);
|
|
||||||
return airline != null ? airline.getJobId() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新/刷新缓存(供 JmJobStatusServiceImpl 调用)
|
|
||||||
* 在状态更新成功后调用此方法
|
|
||||||
*/
|
|
||||||
public void updateUavStatus(String payloadIp, JmUavStatusDTO uavStatus) {
|
|
||||||
if (payloadIp == null || uavStatus == null) {
|
|
||||||
log.warn("更新 uav 状态失败:参数为空,ip={}, status={}", payloadIp, uavStatus);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String key = UAV_STATUS_KEY_PREFIX + payloadIp;
|
|
||||||
try {
|
|
||||||
// 设置值 + 过期时间
|
|
||||||
redisUtil.set(key, uavStatus, CACHE_EXPIRE_SECONDS);
|
|
||||||
log.debug("已更新 Redis 缓存:key={}, jobExecId={}", key, uavStatus.getJobExecId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("更新 SAR uav 状态缓存失败,ip={}", payloadIp, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清理某个 IP 的缓存(任务结束或异常时调用)
|
|
||||||
*/
|
|
||||||
public void clearUavStatus(String payloadIp) {
|
|
||||||
if (payloadIp == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String key = UAV_STATUS_KEY_PREFIX + payloadIp;
|
|
||||||
redisUtil.del(key);
|
|
||||||
log.debug("SAR uav 缓存已标记清理(或自然过期):{}", key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -3,11 +3,13 @@ package com.zhangy.skyeye.sar.service.impl;
|
|||||||
import com.zhangy.skyeye.jm.dto.JmAirlineStatusDTO;
|
import com.zhangy.skyeye.jm.dto.JmAirlineStatusDTO;
|
||||||
import com.zhangy.skyeye.jm.dto.JmUavStatusDTO;
|
import com.zhangy.skyeye.jm.dto.JmUavStatusDTO;
|
||||||
import com.zhangy.skyeye.jm.entity.JmImage;
|
import com.zhangy.skyeye.jm.entity.JmImage;
|
||||||
|
import com.zhangy.skyeye.jm.service.JmJobStatusService;
|
||||||
import com.zhangy.skyeye.publics.consts.WebSocketKey;
|
import com.zhangy.skyeye.publics.consts.WebSocketKey;
|
||||||
import com.zhangy.skyeye.sar.context.SarTaskContextProvider;
|
import com.zhangy.skyeye.publics.service.SysFileTypeService;
|
||||||
import com.zhangy.skyeye.sar.dto.JmSarWaveWsDTO;
|
import com.zhangy.skyeye.sar.dto.JmSarWaveWsDTO;
|
||||||
import com.zhangy.skyeye.sar.dto.SarBackWaveFrameDTO;
|
import com.zhangy.skyeye.sar.dto.SarBackWaveFrameDTO;
|
||||||
import com.zhangy.skyeye.sar.service.ISarBackWsService;
|
import com.zhangy.skyeye.sar.service.ISarBackWsService;
|
||||||
|
import com.zhangy.skyeye.sar.service.SarWsAsyncService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
||||||
@ -31,7 +33,13 @@ public class SarBackWsServiceImpl implements ISarBackWsService {
|
|||||||
private SimpMessagingTemplate simpMessageingTemplate;
|
private SimpMessagingTemplate simpMessageingTemplate;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarTaskContextProvider taskContextProvider;
|
private SysFileTypeService sysFileTypeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JmJobStatusService jobStatusService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarWsAsyncService sarWsAsyncService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendWave(String payloadIp, SarBackWaveFrameDTO frame, byte[] frameData) {
|
public void sendWave(String payloadIp, SarBackWaveFrameDTO frame, byte[] frameData) {
|
||||||
@ -55,14 +63,12 @@ public class SarBackWsServiceImpl implements ISarBackWsService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private JmSarWaveWsDTO loadJobDetail(String payloadIp, JmSarWaveWsDTO ws, byte[] frameData) {
|
private JmSarWaveWsDTO loadJobDetail(String payloadIp, JmSarWaveWsDTO ws, byte[] frameData) {
|
||||||
JmUavStatusDTO uav = taskContextProvider.getCurrentUav(payloadIp);
|
JmUavStatusDTO uav = jobStatusService.getCurrUav(payloadIp);
|
||||||
if (uav == null) { // 如果没有执行中的任务则忽略
|
if (uav == null) { // 如果没有执行中的任务则忽略
|
||||||
log.debug("IP={} 无正在执行的任务,忽略波形推送", payloadIp);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
JmAirlineStatusDTO airlineStatusVo = uav.getCurrAirline();
|
JmAirlineStatusDTO airlineStatusVo = uav.getCurrAirline();
|
||||||
if (airlineStatusVo == null) {
|
if (airlineStatusVo == null) {
|
||||||
log.debug("IP={} 无当前航线,忽略波形推送", payloadIp);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
long jobConfId = airlineStatusVo.getJobId();
|
long jobConfId = airlineStatusVo.getJobId();
|
||||||
|
|||||||
@ -84,8 +84,6 @@ skyeye:
|
|||||||
py:
|
py:
|
||||||
ktkxUrl: http://127.0.0.1:18090/ktkx/UavPlanning/SAR
|
ktkxUrl: http://127.0.0.1:18090/ktkx/UavPlanning/SAR
|
||||||
detectUrl: http://127.0.0.1:18091/ktkx/detect/cpu/SARCoord
|
detectUrl: http://127.0.0.1:18091/ktkx/detect/cpu/SARCoord
|
||||||
java:
|
|
||||||
ktkxUrl: http://127.0.0.1:9117/ktkx/UavPlanning/SAR
|
|
||||||
weather:
|
weather:
|
||||||
cityCode: 101120201
|
cityCode: 101120201
|
||||||
|
|
||||||
@ -93,5 +91,5 @@ logging:
|
|||||||
file:
|
file:
|
||||||
name: "logs/"
|
name: "logs/"
|
||||||
level:
|
level:
|
||||||
com.zhangy: info
|
com.zhangy: debug
|
||||||
org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler: OFF
|
org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler: OFF
|
||||||
@ -35,22 +35,7 @@
|
|||||||
|
|
||||||
<select id="selectList" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
<select id="selectList" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
||||||
<include refid="selectSql"/>
|
<include refid="selectSql"/>
|
||||||
where j.status != 1
|
where 1 = 1
|
||||||
<if test="type != null and type == 1">
|
|
||||||
and j.status in ('1', '3')
|
|
||||||
</if>
|
|
||||||
<if test="uavId != null">
|
|
||||||
and exists (select 1 from jm_job_uav ju where j.id = ju.job_id and ju.uav_id = #{uavId})
|
|
||||||
</if>
|
|
||||||
<if test="payloadId != null">
|
|
||||||
and exists (select 1 from jm_job_payload jp where j.id = jp.job_id and jp.payload_id = #{payloadId})
|
|
||||||
</if>
|
|
||||||
order by j.create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectExecJobs" resultType="com.zhangy.skyeye.jm.dto.JmJobDTO">
|
|
||||||
<include refid="selectSql"/>
|
|
||||||
where j.status = '1'
|
|
||||||
<if test="type != null and type == 1">
|
<if test="type != null and type == 1">
|
||||||
and j.status in ('1', '3')
|
and j.status in ('1', '3')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -12,6 +12,6 @@ window.config = {
|
|||||||
arcgisUrl: 'http://61.48.133.44:14001/map/arcgisMap',
|
arcgisUrl: 'http://61.48.133.44:14001/map/arcgisMap',
|
||||||
minMapLevel: 1,
|
minMapLevel: 1,
|
||||||
maxMapLevel: 16,
|
maxMapLevel: 16,
|
||||||
defaultLocation: [116.40531500114789, 39.86340233391189],
|
defaultLocation: [115.91531500114789, 40.35940233391189],
|
||||||
tdtToken: '316ac2812387c2cbff7a6f2f4e7f5bdc'
|
tdtToken: '316ac2812387c2cbff7a6f2f4e7f5bdc'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,12 +22,10 @@ export const addTaskFast = params =>
|
|||||||
req('post', '/sar/job/save', params)
|
req('post', '/sar/job/save', params)
|
||||||
// 预览任务
|
// 预览任务
|
||||||
export const previewTaskFast = params =>
|
export const previewTaskFast = params =>
|
||||||
req('post', '/jm/plan/airline', params)
|
req('post', 'ktkx/UavPlanning/SAR', params)
|
||||||
// 编辑任务
|
// 编辑任务
|
||||||
export const editTaskFast = params =>
|
export const editTaskFast = params =>
|
||||||
req('post', '/sar/job/save', params)
|
req('post', '/sar/job/save', params)
|
||||||
export const getExecJobs = params =>
|
|
||||||
req('post', '/sar/job/execJobs', params)
|
|
||||||
// 新增任务
|
// 新增任务
|
||||||
export const addTaskAirline = params =>
|
export const addTaskAirline = params =>
|
||||||
req('post', '/sar/job/save2', params)
|
req('post', '/sar/job/save2', params)
|
||||||
@ -43,9 +41,6 @@ export const deleteTaskItem = params =>
|
|||||||
// 查询任务详情
|
// 查询任务详情
|
||||||
export const getTaskItemDetail = params =>
|
export const getTaskItemDetail = params =>
|
||||||
req('get', '/sar/job/detail', params)
|
req('get', '/sar/job/detail', params)
|
||||||
// 查询任务编辑详情
|
|
||||||
export const getTaskEditItemDetail = params =>
|
|
||||||
req('get', '/sar/job/info', params)
|
|
||||||
// 查询无人机列表
|
// 查询无人机列表
|
||||||
export const getUavListData = params =>
|
export const getUavListData = params =>
|
||||||
req('post', '/skyeye/uav/list', params)
|
req('post', '/skyeye/uav/list', params)
|
||||||
@ -79,7 +74,3 @@ export const deletePictureItem = params =>
|
|||||||
// ai识别
|
// ai识别
|
||||||
export const pictureAiCheck = params =>
|
export const pictureAiCheck = params =>
|
||||||
req('post', '/sar/image/identify', params)
|
req('post', '/sar/image/identify', params)
|
||||||
|
|
||||||
// 开机
|
|
||||||
export const changePayloadRadarOpenState = params =>
|
|
||||||
req('post', '/sar/control/send', params)
|
|
||||||
|
|||||||
@ -40,18 +40,3 @@ export const getWeatherInfo = params => req('get', '/weather/info', params)
|
|||||||
// 获取字典接口
|
// 获取字典接口
|
||||||
export const getAllDictType = params =>
|
export const getAllDictType = params =>
|
||||||
req('get', '/dict/list', params)
|
req('get', '/dict/list', params)
|
||||||
|
|
||||||
|
|
||||||
// #region 新增user表接口
|
|
||||||
export const userList = params =>
|
|
||||||
req('post', '/user/list', params)
|
|
||||||
// 删除
|
|
||||||
export const userRemove = params =>
|
|
||||||
req('post', '/user/remove', params)
|
|
||||||
// 保存信息
|
|
||||||
export const userSave = params =>
|
|
||||||
req('post', '/user/save', params)
|
|
||||||
// 更新
|
|
||||||
export const userUpdate = params =>
|
|
||||||
req('post', '/user/update', params)
|
|
||||||
//#endregion
|
|
||||||
|
|||||||
@ -11,12 +11,11 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cesium-split {
|
#cesium-split {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: #ffffff;
|
background-color: red;
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
@ -34,12 +33,10 @@
|
|||||||
::v-deep .dt-card__content {
|
::v-deep .dt-card__content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-content {
|
.timeline-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.timeline-contain {
|
.timeline-contain {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ export default {
|
|||||||
// console.log('刷新自己取', localStorage.getItem('userId'), localStorage.getItem('username'))
|
// console.log('刷新自己取', localStorage.getItem('userId'), localStorage.getItem('username'))
|
||||||
// }
|
// }
|
||||||
if (this.username !== 'admin') {
|
if (this.username !== 'admin') {
|
||||||
this.menus[3].show = false
|
// this.menus[3].show = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -52,7 +52,5 @@ const getters = {
|
|||||||
jobModeOptions: state => state.dict.jobModeOptions,
|
jobModeOptions: state => state.dict.jobModeOptions,
|
||||||
polarization: state => state.dict.polarization,
|
polarization: state => state.dict.polarization,
|
||||||
polarizationOptions: state => state.dict.polarizationOptions,
|
polarizationOptions: state => state.dict.polarizationOptions,
|
||||||
sarImageMode: state => state.dict.sarImageMode,
|
|
||||||
sarImageModeOptions: state => state.dict.sarImageModeOptions,
|
|
||||||
}
|
}
|
||||||
export default getters
|
export default getters
|
||||||
|
|||||||
@ -15,7 +15,7 @@ const state = {
|
|||||||
duringPlay: false,
|
duringPlay: false,
|
||||||
menuExpand: false, // 侧边工具栏是否展开
|
menuExpand: false, // 侧边工具栏是否展开
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
menusChose: '1'
|
menusChose: '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
|||||||
@ -29,8 +29,6 @@ const state = {
|
|||||||
],
|
],
|
||||||
polarization: {},
|
polarization: {},
|
||||||
polarizationOptions: {},
|
polarizationOptions: {},
|
||||||
sarImageMode: {},
|
|
||||||
sarImageModeOptions: []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -92,12 +90,7 @@ const mutations = {
|
|||||||
SET_POLARIZATION_OPTIONS: (state, info) => {
|
SET_POLARIZATION_OPTIONS: (state, info) => {
|
||||||
state.polarizationOptions = info
|
state.polarizationOptions = info
|
||||||
},
|
},
|
||||||
SET_SAR_IMAGE_MODE: (state, info) => {
|
|
||||||
state.sarImageMode = info
|
|
||||||
},
|
|
||||||
SET_SAR_IMAGE_MODE_OPTIONS: (state, info) => {
|
|
||||||
state.sarImageModeOptions = info
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
const actions = {
|
const actions = {
|
||||||
getDict({ commit }) {
|
getDict({ commit }) {
|
||||||
@ -125,8 +118,6 @@ const actions = {
|
|||||||
let jobModeOptions = []
|
let jobModeOptions = []
|
||||||
let polarization = {}
|
let polarization = {}
|
||||||
let polarizationOptions = []
|
let polarizationOptions = []
|
||||||
let sarImageMode = {}
|
|
||||||
let sarImageModeOptions = []
|
|
||||||
|
|
||||||
res.data.data.forEach(item => {
|
res.data.data.forEach(item => {
|
||||||
switch (item.dictType) {
|
switch (item.dictType) {
|
||||||
@ -169,15 +160,9 @@ const actions = {
|
|||||||
polarization[item.dictValue] = item.dictLabel
|
polarization[item.dictValue] = item.dictLabel
|
||||||
polarizationOptions.push({label: item.dictLabel, value: item.dictValue})
|
polarizationOptions.push({label: item.dictLabel, value: item.dictValue})
|
||||||
break
|
break
|
||||||
case 'sar_image_mode':
|
|
||||||
sarImageMode[item.dictValue] = item.dictLabel
|
|
||||||
sarImageModeOptions.push({ label: item.dictLabel, value: item.dictValue })
|
|
||||||
break
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
commit('SET_SAR_IMAGE_MODE', sarImageMode)
|
|
||||||
commit('SET_SAR_IMAGE_MODE_OPTIONS', sarImageModeOptions)
|
|
||||||
// 适配机场类型
|
// 适配机场类型
|
||||||
commit('SET_IMU_STATUS', imuStatus)
|
commit('SET_IMU_STATUS', imuStatus)
|
||||||
commit('SET_IMU_STATUS_OPTIONS', imuStatusOptions)
|
commit('SET_IMU_STATUS_OPTIONS', imuStatusOptions)
|
||||||
@ -207,7 +192,6 @@ const actions = {
|
|||||||
// 极化方式
|
// 极化方式
|
||||||
commit('SET_POLARIZATION', polarization)
|
commit('SET_POLARIZATION', polarization)
|
||||||
commit('SET_POLARIZATION_OPTIONS', polarizationOptions)
|
commit('SET_POLARIZATION_OPTIONS', polarizationOptions)
|
||||||
commit('SET_POLARIZATION_OPTIONS', sarImageModeOptions)
|
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.message)
|
this.$message.error(res.data.message)
|
||||||
|
|||||||
@ -1506,7 +1506,6 @@ input[type="number"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.query-form {
|
.query-form {
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
|||||||
@ -35,11 +35,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
visibleLocale: false,
|
visibleLocale: false,
|
||||||
deviceData: [
|
deviceData: [
|
||||||
// {
|
{
|
||||||
// name: '无人机1',
|
name: '无人机1',
|
||||||
// num: 'M3127',
|
num: 'M3127',
|
||||||
// location: '112.3423242,45.2312324'
|
location: '112.3423242,45.2312324'
|
||||||
// }
|
}
|
||||||
],
|
],
|
||||||
device: {
|
device: {
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -148,21 +148,6 @@ export default {
|
|||||||
addDevice() {
|
addDevice() {
|
||||||
this.device.visible = true
|
this.device.visible = true
|
||||||
this.device.title = `新增${this.deviceMap[this.queryForm.type]}`
|
this.device.title = `新增${this.deviceMap[this.queryForm.type]}`
|
||||||
if (this.queryForm.type === 'uav') {
|
|
||||||
this.device.form = {
|
|
||||||
id: '',
|
|
||||||
name1: '',
|
|
||||||
code: '',
|
|
||||||
ip1: ''
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.device.form = {
|
|
||||||
id: '',
|
|
||||||
name2: '',
|
|
||||||
type: '',
|
|
||||||
ip2: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
editDevice(row) {
|
editDevice(row) {
|
||||||
this.device.visible = true
|
this.device.visible = true
|
||||||
@ -188,7 +173,7 @@ export default {
|
|||||||
this.device.visible = false
|
this.device.visible = false
|
||||||
},
|
},
|
||||||
async submitDevice() {
|
async submitDevice() {
|
||||||
const valid = await this.$refs.form.validate()
|
const valid = await this.$refs.form.validate(valid)
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
const form = {}
|
const form = {}
|
||||||
if (this.queryForm.type === 'uav') {
|
if (this.queryForm.type === 'uav') {
|
||||||
|
|||||||
@ -305,8 +305,3 @@
|
|||||||
top: $--icon-mode-larger-card-top;
|
top: $--icon-mode-larger-card-top;
|
||||||
transition: 0.2s ease-in-out;
|
transition: 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-icon-plus {
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -25,7 +25,10 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-select v-model="queryForm.type" popper-class="select-light">
|
<el-select
|
||||||
|
v-model="queryForm.type"
|
||||||
|
popper-class="select-light"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deviceTypes"
|
v-for="item in deviceTypes"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -75,13 +78,7 @@
|
|||||||
></i>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<el-table
|
<el-table v-if="isShowTable" :data="deviceData" stripe style="width: 100%">
|
||||||
v-if="isShowTable"
|
|
||||||
:data="deviceData"
|
|
||||||
stripe
|
|
||||||
style="width: 100%"
|
|
||||||
height="100%"
|
|
||||||
>
|
|
||||||
<template v-if="queryForm.type === 'payload'">
|
<template v-if="queryForm.type === 'payload'">
|
||||||
<el-table-column prop="name" label="雷达名称"> </el-table-column>
|
<el-table-column prop="name" label="雷达名称"> </el-table-column>
|
||||||
<el-table-column prop="type" label="雷达类型"> </el-table-column>
|
<el-table-column prop="type" label="雷达类型"> </el-table-column>
|
||||||
|
|||||||
@ -29,17 +29,16 @@ export default {
|
|||||||
uploadPictureInfo: {
|
uploadPictureInfo: {
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
pictureData: [
|
pictureData: [{
|
||||||
// {
|
id: 1,
|
||||||
// id: 1,
|
jobName: '任务1',
|
||||||
// jobName: '任务1',
|
createTime: '2012-02-18 12:00:00'
|
||||||
// createTime: '2012-02-18 12:00:00'
|
},
|
||||||
// },
|
{
|
||||||
// {
|
id: 2,
|
||||||
// id: 2,
|
jobName: '任务2',
|
||||||
// jobName: '任务2',
|
createTime: '2012-02-18 12:00:00'
|
||||||
// createTime: '2012-02-18 12:00:00'
|
}
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
page: {
|
page: {
|
||||||
size: 20,
|
size: 20,
|
||||||
@ -124,7 +123,7 @@ export default {
|
|||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log('图片分页', res.data.data)
|
console.log('图片分页', res.data.data)
|
||||||
let data = res.data.data.records
|
let data = res.data.data.records
|
||||||
this.pictureData = data
|
// this.pictureData = data
|
||||||
this.page.total = res.data.data.total
|
this.page.total = res.data.data.total
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.message)
|
this.$message.error(res.data.message)
|
||||||
|
|||||||
@ -44,13 +44,13 @@
|
|||||||
<div class="pic-time">拍摄时间:{{ item.createTime }}</div>
|
<div class="pic-time">拍摄时间:{{ item.createTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pic-command">
|
<div class="pic-command">
|
||||||
<el-tooltip effect="dark" content="修改名称" placement="top">
|
<el-tooltip effect="dark" content="修改名称" placement="left">
|
||||||
<i
|
<i
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
@click.stop="editPictureName(item)"
|
@click.stop="editPictureName(item)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="删除" placement="top">
|
<el-tooltip effect="dark" content="删除" placement="right">
|
||||||
<i
|
<i
|
||||||
class="el-icon-close delete-task"
|
class="el-icon-close delete-task"
|
||||||
@click.stop="deletePicture(item)"
|
@click.stop="deletePicture(item)"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -125,7 +125,7 @@
|
|||||||
.task-execute {
|
.task-execute {
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 85px;
|
width: 90px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -171,12 +171,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-part {
|
.right-part {
|
||||||
width: 60px;
|
width: 40px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 5px;
|
|
||||||
|
|
||||||
>i {
|
>i {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -543,12 +543,4 @@
|
|||||||
::v-deep .right-content {
|
::v-deep .right-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep input {
|
|
||||||
background-color: #00000052;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep select {
|
|
||||||
background-color: #00000052;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,12 +10,12 @@
|
|||||||
title="任务列表"
|
title="任务列表"
|
||||||
:visible.sync="taskList.visible"
|
:visible.sync="taskList.visible"
|
||||||
:scroll="false"
|
:scroll="false"
|
||||||
:showClose="false"
|
:showClose="true"
|
||||||
:showDivider="false"
|
:showDivider="false"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<span class="remote-header">
|
<span class="remote-header">
|
||||||
<i class="ri-function-add-line"></i>
|
<i class="ri-task-line"></i>
|
||||||
任务列表
|
任务列表
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -25,11 +25,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="taskList.data.length" class="task-list__content">
|
<div v-if="taskList.data.length" class="task-list__content">
|
||||||
<div
|
<div v-for="item in taskList.data" :key="item.id" class="task-item">
|
||||||
v-for="(item, index) in taskList.data"
|
|
||||||
:key="item.id"
|
|
||||||
class="task-item"
|
|
||||||
>
|
|
||||||
<div class="left-part">
|
<div class="left-part">
|
||||||
<!-- <div class="task-progress-bar" :style="'width: ' + item.uavCompletion +'%;'"></div>-->
|
<!-- <div class="task-progress-bar" :style="'width: ' + item.uavCompletion +'%;'"></div>-->
|
||||||
<div class="execute-info" @click="openTaskLineDetail(item)">
|
<div class="execute-info" @click="openTaskLineDetail(item)">
|
||||||
@ -40,10 +36,7 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="task-execute">{{ item.name }}</span>
|
<span class="task-execute">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="task-info" :style="{color:dealStatusColor(item.statusName)}">
|
||||||
class="task-info"
|
|
||||||
:style="{ color: dealStatusColor(item.statusName) }"
|
|
||||||
>
|
|
||||||
{{ item.statusName }}
|
{{ item.statusName }}
|
||||||
<!-- <i class="el-icon-camera"></i>-->
|
<!-- <i class="el-icon-camera"></i>-->
|
||||||
<!-- <span class="task-name">{{ item.name }}</span>-->
|
<!-- <span class="task-name">{{ item.name }}</span>-->
|
||||||
@ -54,67 +47,27 @@
|
|||||||
<div class="task-time">{{ item.beginTime }}</div>
|
<div class="task-time">{{ item.beginTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-part">
|
<div class="right-part">
|
||||||
<el-tooltip
|
<!-- <i class="el-icon-edit-outline edit-task" @click.stop="editTask(item)"></i>-->
|
||||||
effect="dark"
|
<!-- <el-tooltip-->
|
||||||
:content="item.check ? '隐藏' : '显示'"
|
<!-- effect="dark"-->
|
||||||
placement="top"
|
<!-- content="重新执行"-->
|
||||||
>
|
<!-- placement="right"-->
|
||||||
<i
|
<!-- >-->
|
||||||
:class="item.check ? 'ri-eye-off-line' : 'ri-eye-line'"
|
<!-- <i class="ri-repeat-line" @click.stop="reRunTask(item)"></i>-->
|
||||||
@click.stop="toggleTaskSceneShow(item, index)"
|
|
||||||
></i>
|
<!-- </el-tooltip>-->
|
||||||
</el-tooltip>
|
<el-tooltip effect="dark" content="修改名称" placement="right">
|
||||||
<el-tooltip
|
|
||||||
v-if="item.status === 0"
|
|
||||||
effect="dark"
|
|
||||||
content="执行"
|
|
||||||
placement="top"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
class="ri-arrow-up-circle-line"
|
|
||||||
@click.stop="makeTaskUavFly(item, index)"
|
|
||||||
></i>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip
|
|
||||||
effect="dark"
|
|
||||||
content="重新执行"
|
|
||||||
placement="top"
|
|
||||||
v-if="item.status === 2"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
class="ri-restart-line"
|
|
||||||
@click.stop="reRunTask(item, index)"
|
|
||||||
></i>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-dropdown
|
|
||||||
@command="handleCommand($event, item)"
|
|
||||||
placement="bottom"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
<span class="el-dropdown-link">
|
|
||||||
<i class="ri-more-fill"></i>
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item command="edit">修改名称</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="copy">复制</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="remove">删除</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
<!-- <el-tooltip effect="dark" content="修改名称" placement="top">
|
|
||||||
<i
|
<i
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
@click.stop="editTaskName(item)"
|
@click.stop="editTaskName(item)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="复制" placement="top">
|
<el-tooltip effect="dark" content="删除" placement="right">
|
||||||
<i class="ri-file-copy-2-line" @click.stop="copyTask(item)"></i>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip effect="dark" content="删除" placement="top">
|
|
||||||
<i
|
<i
|
||||||
class="el-icon-close delete-task"
|
class="el-icon-close delete-task"
|
||||||
@click.stop="deleteTask(item)"
|
@click.stop="deleteTask(item)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip> -->
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -151,7 +104,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="mode" label="飞行模式">
|
<el-form-item prop="mode" label="飞行模式">
|
||||||
<el-select
|
<el-select
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="duringDraw || airlineCreateInfo.during"
|
:disabled="duringDraw || airlineCreateInfo.during"
|
||||||
@change="onModeChange"
|
@change="onModeChange"
|
||||||
@ -172,14 +124,12 @@
|
|||||||
>
|
>
|
||||||
<div class="form-item-command">
|
<div class="form-item-command">
|
||||||
<el-select
|
<el-select
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="duringDraw"
|
:disabled="duringDraw"
|
||||||
v-model="form.targetChoose"
|
v-model="form.targetChoose"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in drawOptions"
|
v-for="item in drawOptions"
|
||||||
:disabled="getDrawTargetDisabled(item)"
|
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@ -219,7 +169,6 @@
|
|||||||
>
|
>
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<el-select
|
<el-select
|
||||||
popper-class="form-light"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
@change="
|
@change="
|
||||||
(value) => handleSelfDirectionChange(value, item, index)
|
(value) => handleSelfDirectionChange(value, item, index)
|
||||||
@ -290,11 +239,7 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<el-form-item prop="uav" label="无人机">
|
<el-form-item prop="uav" label="无人机">
|
||||||
<el-select
|
<el-select size="small" v-model="form.uav">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.uav"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in uavOptions"
|
v-for="item in uavOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -319,11 +264,7 @@
|
|||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item prop="loader" label="载荷">
|
<el-form-item prop="loader" label="载荷">
|
||||||
<el-select
|
<el-select size="small" v-model="form.loader">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.loader"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in loaderOptions"
|
v-for="item in loaderOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -364,29 +305,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="ratio" label="分辨率">
|
<el-form-item prop="ratio" label="分辨率">
|
||||||
<el-select
|
<el-select
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
size="small"
|
||||||
@change="calculateLimit"
|
@change="calculateLimit"
|
||||||
v-model="form.ratio"
|
v-model="form.ratio"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in sarResolutionOptions"
|
v-for="item in sarResolutionOptions"
|
||||||
:disabled="getRatioDisabled(item)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="成像模式" prop="imageMode">
|
|
||||||
<el-select
|
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.imageMode"
|
|
||||||
@change="onImageModeChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in sarImageModeOptions"
|
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@ -436,11 +360,7 @@
|
|||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="自动聚焦">
|
<el-form-item label="自动聚焦">
|
||||||
<el-select
|
<el-select size="small" v-model="form.autoFocus">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.autoFocus"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in focusOptions"
|
v-for="item in focusOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -450,11 +370,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="运动补偿">
|
<el-form-item label="运动补偿">
|
||||||
<el-select
|
<el-select size="small" v-model="form.moto">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.moto"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in motoOptions"
|
v-for="item in motoOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -472,18 +388,13 @@
|
|||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图像位数">
|
<el-form-item label="图像位数">
|
||||||
<el-select
|
<el-select size="small" v-model="form.imageBit">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.imageBit"
|
|
||||||
>
|
|
||||||
<el-option label="8bit" :value="0"></el-option>
|
<el-option label="8bit" :value="0"></el-option>
|
||||||
<el-option label="16bit" :value="1"></el-option>
|
<el-option label="16bit" :value="1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="侧视方向" v-if="form.mode !== '3'">
|
<el-form-item label="侧视方向" v-if="form.mode !== '3'">
|
||||||
<el-select
|
<el-select
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
size="small"
|
||||||
@change="handleDirectionChange"
|
@change="handleDirectionChange"
|
||||||
v-model="form.direction"
|
v-model="form.direction"
|
||||||
@ -497,11 +408,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="极化方式">
|
<el-form-item label="极化方式">
|
||||||
<el-select
|
<el-select size="small" v-model="form.polarization">
|
||||||
popper-class="form-light"
|
|
||||||
size="small"
|
|
||||||
v-model="form.polarization"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in polarizationOptions"
|
v-for="item in polarizationOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
|||||||
@ -107,9 +107,11 @@ export default class LineTarget {
|
|||||||
DT.Cesium.Cartesian3.multiplyByScalar(endToStartDirection, distanceOne + distanceTwo, flyToStart)
|
DT.Cesium.Cartesian3.multiplyByScalar(endToStartDirection, distanceOne + distanceTwo, flyToStart)
|
||||||
DT.Cesium.Cartesian3.add(openToStart, this.positions[0], openToStart)
|
DT.Cesium.Cartesian3.add(openToStart, this.positions[0], openToStart)
|
||||||
DT.Cesium.Cartesian3.add(flyToStart, this.positions[0], flyToStart)
|
DT.Cesium.Cartesian3.add(flyToStart, this.positions[0], flyToStart)
|
||||||
|
// console.log('开机点', openToStart)
|
||||||
|
|
||||||
// let cat1 = DT.Cesium.Cartographic.fromCartesian(openToStart)
|
// let cat1 = DT.Cesium.Cartographic.fromCartesian(openToStart)
|
||||||
// let cat2 = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
// let cat2 = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
||||||
|
// console.log('开机点高度', cat1.height , cat2.height)
|
||||||
// 求关机点
|
// 求关机点
|
||||||
let startToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
let startToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
||||||
DT.Cesium.Cartesian3.subtract(this.positions[1], this.positions[0], startToEndDirection)
|
DT.Cesium.Cartesian3.subtract(this.positions[1], this.positions[0], startToEndDirection)
|
||||||
@ -120,6 +122,7 @@ export default class LineTarget {
|
|||||||
DT.Cesium.Cartesian3.multiplyByScalar(startToEndDirection, distanceOne + distanceTwo, flyToEnd)
|
DT.Cesium.Cartesian3.multiplyByScalar(startToEndDirection, distanceOne + distanceTwo, flyToEnd)
|
||||||
DT.Cesium.Cartesian3.add(openToEnd, this.positions[1], openToEnd)
|
DT.Cesium.Cartesian3.add(openToEnd, this.positions[1], openToEnd)
|
||||||
DT.Cesium.Cartesian3.add(flyToEnd, this.positions[1], flyToEnd)
|
DT.Cesium.Cartesian3.add(flyToEnd, this.positions[1], flyToEnd)
|
||||||
|
// console.log('关机点', openToEnd)
|
||||||
|
|
||||||
// 求成像区域中心经度,成像区域中心维度
|
// 求成像区域中心经度,成像区域中心维度
|
||||||
let boundaryLonLat = []
|
let boundaryLonLat = []
|
||||||
@ -151,6 +154,7 @@ export default class LineTarget {
|
|||||||
let center = [lon / 4, lat / 4] // 中心点坐标
|
let center = [lon / 4, lat / 4] // 中心点坐标
|
||||||
|
|
||||||
let center2 = [(centerLonLat[0].longitude + centerLonLat[1].longitude) / 2, (centerLonLat[0].latitude + centerLonLat[1].latitude) / 2] // 中心点坐标
|
let center2 = [(centerLonLat[0].longitude + centerLonLat[1].longitude) / 2, (centerLonLat[0].latitude + centerLonLat[1].latitude) / 2] // 中心点坐标
|
||||||
|
// console.log('中心区域', center)
|
||||||
|
|
||||||
let areaEndCenter = DT.Cesium.Cartesian3.fromDegrees(
|
let areaEndCenter = DT.Cesium.Cartesian3.fromDegrees(
|
||||||
(boundaryLonLat[0].longitude + boundaryLonLat[1].longitude) / 2,
|
(boundaryLonLat[0].longitude + boundaryLonLat[1].longitude) / 2,
|
||||||
@ -176,6 +180,7 @@ export default class LineTarget {
|
|||||||
let groundOpenToStart2 = new DT.Cesium.Cartesian3() // 开机点
|
let groundOpenToStart2 = new DT.Cesium.Cartesian3() // 开机点
|
||||||
DT.Cesium.Cartesian3.multiplyByScalar(groundEndToStartDirection2, distanceTwo, groundOpenToStart2)
|
DT.Cesium.Cartesian3.multiplyByScalar(groundEndToStartDirection2, distanceTwo, groundOpenToStart2)
|
||||||
DT.Cesium.Cartesian3.add(groundOpenToStart2, areaStartCenter2, groundOpenToStart2)
|
DT.Cesium.Cartesian3.add(groundOpenToStart2, areaStartCenter2, groundOpenToStart2)
|
||||||
|
// console.log('地面开机', groundOpenToStart)
|
||||||
|
|
||||||
// 求地面关机点
|
// 求地面关机点
|
||||||
// let groundStartToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
// let groundStartToEndDirection = new DT.Cesium.Cartesian3(1, 0, 0)
|
||||||
@ -184,15 +189,20 @@ export default class LineTarget {
|
|||||||
// let groundOpenToEnd = new DT.Cesium.Cartesian3() // 开机点
|
// let groundOpenToEnd = new DT.Cesium.Cartesian3() // 开机点
|
||||||
// DT.Cesium.Cartesian3.multiplyByScalar(groundStartToEndDirection, distanceTwo, groundOpenToEnd)
|
// DT.Cesium.Cartesian3.multiplyByScalar(groundStartToEndDirection, distanceTwo, groundOpenToEnd)
|
||||||
// DT.Cesium.Cartesian3.add(groundOpenToEnd, areaEndCenter, groundOpenToEnd)
|
// DT.Cesium.Cartesian3.add(groundOpenToEnd, areaEndCenter, groundOpenToEnd)
|
||||||
|
// console.log('地面关机', groundOpenToEnd)
|
||||||
// 成像区域幅宽和方位长度
|
// 成像区域幅宽和方位长度
|
||||||
let width = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.crossPositions[1])
|
let width = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.crossPositions[1])
|
||||||
let width2 = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.centerPositions[0]) * 2
|
let width2 = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[0], this.wave.centerPositions[0]) * 2
|
||||||
let length = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[1], this.wave.crossPositions[2])
|
let length = DT.Cesium.Cartesian3.distance(this.wave.crossPositions[1], this.wave.crossPositions[2])
|
||||||
|
// console.log('幅宽', width, length)
|
||||||
// 轴向角度
|
// 轴向角度
|
||||||
let point1 = turf.point([centerLonLat[0].longitude, centerLonLat[0].latitude]);
|
let point1 = turf.point([centerLonLat[0].longitude, centerLonLat[0].latitude]);
|
||||||
let point2 = turf.point([centerLonLat[1].longitude, centerLonLat[1].latitude]);
|
let point2 = turf.point([centerLonLat[1].longitude, centerLonLat[1].latitude]);
|
||||||
let bearing = turf.bearing(point1, point2) + 180
|
let bearing = turf.bearing(point1, point2) + 180
|
||||||
|
// console.log('角度12', bearing)
|
||||||
|
// console.log('高度123', this.viewer.cesiumViewer.terrainProvider)
|
||||||
// DT.Cesium.sampleTerrainMostDetailed(this.viewer.cesiumViewer.terrainProvider, [DT.Cesium.Cartographic.fromDegrees(center[0], center[1])]).then(res => {
|
// DT.Cesium.sampleTerrainMostDetailed(this.viewer.cesiumViewer.terrainProvider, [DT.Cesium.Cartographic.fromDegrees(center[0], center[1])]).then(res => {
|
||||||
|
// console.log('海拔', res)
|
||||||
// })
|
// })
|
||||||
let startCat = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
let startCat = DT.Cesium.Cartographic.fromCartesian(flyToStart)
|
||||||
let endCat = DT.Cesium.Cartographic.fromCartesian(flyToEnd)
|
let endCat = DT.Cesium.Cartographic.fromCartesian(flyToEnd)
|
||||||
@ -230,6 +240,9 @@ export default class LineTarget {
|
|||||||
boundaryLonLat: boundaryLonLat,
|
boundaryLonLat: boundaryLonLat,
|
||||||
direction: this.rotation > 0 ? 1 : -1,
|
direction: this.rotation > 0 ? 1 : -1,
|
||||||
}
|
}
|
||||||
|
console.log('下视角', this.rotation)
|
||||||
|
console.log('擦地角', 90 - Math.abs(this.rotation))
|
||||||
|
console.log('最后参数', info)
|
||||||
if (this.showTemp) {
|
if (this.showTemp) {
|
||||||
this.tempCollection.forEach(temp => {
|
this.tempCollection.forEach(temp => {
|
||||||
viewer.entities.remove(temp)
|
viewer.entities.remove(temp)
|
||||||
@ -472,19 +485,6 @@ export default class LineTarget {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restoreTarget(info) {
|
|
||||||
let startPosition = DT.Cesium.Cartesian3.fromDegrees(info.flightStartLon, info.flightStartLat, info.flightStartHeight)
|
|
||||||
let endPosition = DT.Cesium.Cartesian3.fromDegrees(info.flightEndLon, info.flightEndLat, info.flightEndHeight)
|
|
||||||
this.positions = [startPosition, endPosition]
|
|
||||||
this.createMark(startPosition, true)
|
|
||||||
this.createMark(endPosition, false)
|
|
||||||
this.createPolyline()
|
|
||||||
this.addUav()
|
|
||||||
this.addWave()
|
|
||||||
this.addMoveHandler()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
createMark(position, start = true) {
|
createMark(position, start = true) {
|
||||||
let cat = DT.Cesium.Cartographic.fromCartesian(position)
|
let cat = DT.Cesium.Cartographic.fromCartesian(position)
|
||||||
let lon = Math.round(DT.Cesium.Math.toDegrees(cat.longitude) * 10000000000000) / 10000000000000
|
let lon = Math.round(DT.Cesium.Math.toDegrees(cat.longitude) * 10000000000000) / 10000000000000
|
||||||
@ -573,6 +573,7 @@ export default class LineTarget {
|
|||||||
shadows: DT.Cesium.ShadowMode.DISABLED
|
shadows: DT.Cesium.ShadowMode.DISABLED
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
console.log('加载的无人机', this.uavEntity)
|
||||||
}
|
}
|
||||||
changeWaveAngle(value) {
|
changeWaveAngle(value) {
|
||||||
this.angle = value
|
this.angle = value
|
||||||
@ -632,6 +633,9 @@ export default class LineTarget {
|
|||||||
if (this.rotation < 0) {
|
if (this.rotation < 0) {
|
||||||
modifyAngle = 0 - modifyAngle
|
modifyAngle = 0 - modifyAngle
|
||||||
}
|
}
|
||||||
|
console.log('旋转角度和波束半角', this.rotation, this.angle)
|
||||||
|
console.log('距离', distanceOne, distanceTwo, distanceThree, angleOne)
|
||||||
|
console.log('修正角度', modifyAngle)
|
||||||
this.wave = new LineWave({color: DT.Cesium.Color.RED,viewer: this.viewer, startPosition: this.positions[0], endPosition: this.positions[1], angle: this.angle - Math.abs(modifyAngle/2), rotation: this.rotation- modifyAngle/2, offsetAngle: modifyAngle/2 })
|
this.wave = new LineWave({color: DT.Cesium.Color.RED,viewer: this.viewer, startPosition: this.positions[0], endPosition: this.positions[1], angle: this.angle - Math.abs(modifyAngle/2), rotation: this.rotation- modifyAngle/2, offsetAngle: modifyAngle/2 })
|
||||||
this.viewer.primitives.add(this.wave.primitive)
|
this.viewer.primitives.add(this.wave.primitive)
|
||||||
this.viewer.entities.add(this.wave.crossLine)
|
this.viewer.entities.add(this.wave.crossLine)
|
||||||
@ -770,6 +774,7 @@ export default class LineTarget {
|
|||||||
let result = new DT.Cesium.Cartesian3()
|
let result = new DT.Cesium.Cartesian3()
|
||||||
DT.Cesium.Cartesian3.lerp(cartesian, this.viewer.cesiumViewer.camera.positionWC, ratio, result)
|
DT.Cesium.Cartesian3.lerp(cartesian, this.viewer.cesiumViewer.camera.positionWC, ratio, result)
|
||||||
// let cat = DT.Cesium.Cartographic.fromCartesian(result)
|
// let cat = DT.Cesium.Cartographic.fromCartesian(result)
|
||||||
|
// console.log('拾取的位置相机', cat.height )
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,6 +836,10 @@ export class LineWave {
|
|||||||
this.bottomHorizontalLength = Math.tan(halfAngleRadians) * this.length
|
this.bottomHorizontalLength = Math.tan(halfAngleRadians) * this.length
|
||||||
this.bottomVerticalLength = this.lineLength
|
this.bottomVerticalLength = this.lineLength
|
||||||
this.offsetAngle = options.offsetAngle ? options.offsetAngle : 0
|
this.offsetAngle = options.offsetAngle ? options.offsetAngle : 0
|
||||||
|
console.log('角度是啥', this.angle)
|
||||||
|
console.log('旋转是啥', this.rotation)
|
||||||
|
console.log('修正是啥', this.offsetAngle)
|
||||||
|
console.log('旋转+修正是啥', this.offsetAngle + this.rotation)
|
||||||
this.createWave()
|
this.createWave()
|
||||||
this.createEdge()
|
this.createEdge()
|
||||||
}
|
}
|
||||||
@ -885,7 +894,9 @@ export class LineWave {
|
|||||||
|
|
||||||
|
|
||||||
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
||||||
|
console.log('角度', this.rotation)
|
||||||
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
||||||
|
console.log('四元数', rotationQuaternion)
|
||||||
let combineQuaternion = new DT.Cesium.Quaternion()
|
let combineQuaternion = new DT.Cesium.Quaternion()
|
||||||
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
||||||
let rotation = DT.Cesium.Matrix4.fromTranslationQuaternionRotationScale(this.middlePosition, combineQuaternion, DT.Cesium.Cartesian3.ONE)
|
let rotation = DT.Cesium.Matrix4.fromTranslationQuaternionRotationScale(this.middlePosition, combineQuaternion, DT.Cesium.Cartesian3.ONE)
|
||||||
@ -927,6 +938,7 @@ export class LineWave {
|
|||||||
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
let que = DT.Tool.calculateQuaternionFromV1ToV2(this.startPosition, this.endPosition)
|
||||||
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
let rotationQuaternion = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, this.rotation * Math.PI / 180)
|
||||||
let rotationQuaternionCenter = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, (this.rotation + this.offsetAngle) * Math.PI / 180)
|
let rotationQuaternionCenter = DT.Cesium.Quaternion.fromAxisAngle(DT.Cesium.Cartesian3.UNIT_X, (this.rotation + this.offsetAngle) * Math.PI / 180)
|
||||||
|
// console.log('四元数计算角度', this.rotation + this.offsetAngle)
|
||||||
let combineQuaternion = new DT.Cesium.Quaternion()
|
let combineQuaternion = new DT.Cesium.Quaternion()
|
||||||
let combineQuaternionCenter = new DT.Cesium.Quaternion()
|
let combineQuaternionCenter = new DT.Cesium.Quaternion()
|
||||||
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
DT.Cesium.Quaternion.multiply(que, rotationQuaternion, combineQuaternion)
|
||||||
@ -989,6 +1001,7 @@ export class LineWave {
|
|||||||
DT.Cesium.Cartesian3.clone(start, ray.origin);
|
DT.Cesium.Cartesian3.clone(start, ray.origin);
|
||||||
DT.Cesium.Cartesian3.subtract(end, start, ray.direction);
|
DT.Cesium.Cartesian3.subtract(end, start, ray.direction);
|
||||||
let position = this.viewer.cesiumViewer.scene.globe.pick(ray, this.viewer.cesiumViewer.scene)
|
let position = this.viewer.cesiumViewer.scene.globe.pick(ray, this.viewer.cesiumViewer.scene)
|
||||||
|
console.log('交点', position)
|
||||||
return position
|
return position
|
||||||
}
|
}
|
||||||
findCrossPoint(start, end) {
|
findCrossPoint(start, end) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import {
|
|||||||
getTaskItemDetail,
|
getTaskItemDetail,
|
||||||
getTaskListData,
|
getTaskListData,
|
||||||
getUavListData,
|
getUavListData,
|
||||||
reRunTask, stopTaskFly, getExecJobs
|
reRunTask, stopTaskFly
|
||||||
} from '@/api/task'
|
} from '@/api/task'
|
||||||
import UavTarget from './uavTarget'
|
import UavTarget from './uavTarget'
|
||||||
import PicturesUpload from '../pictures-upload/index.vue'
|
import PicturesUpload from '../pictures-upload/index.vue'
|
||||||
@ -73,15 +73,15 @@ export default {
|
|||||||
visible: true,
|
visible: true,
|
||||||
activeTabId: 1,
|
activeTabId: 1,
|
||||||
data: [
|
data: [
|
||||||
// {
|
{
|
||||||
// signal: 50,
|
signal: 50,
|
||||||
// nickName: '无人机1',
|
nickName: '无人机1',
|
||||||
// battery: 80,
|
battery: 80,
|
||||||
// flyHeight: 80,
|
flyHeight: 80,
|
||||||
// lon: 115.76,
|
lon: 115.76,
|
||||||
// lat: 40.38,
|
lat: 40.38,
|
||||||
// id: 2
|
id: 2
|
||||||
// }
|
}
|
||||||
],
|
],
|
||||||
typeDict: {
|
typeDict: {
|
||||||
1: '无人机',
|
1: '无人机',
|
||||||
@ -91,14 +91,12 @@ export default {
|
|||||||
},
|
},
|
||||||
taskList: {
|
taskList: {
|
||||||
visible: true,
|
visible: true,
|
||||||
data: [
|
data: [{
|
||||||
// {
|
status: 1,
|
||||||
// status: 1,
|
name: '巡查任务',
|
||||||
// name: '巡查任务',
|
statusName: '巡查中',
|
||||||
// statusName: '巡查中',
|
beginTime: '2026-01-23 12:14:45'
|
||||||
// beginTime: '2026-01-23 12:14:45'
|
}]
|
||||||
// }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
weatherInfo2: {
|
weatherInfo2: {
|
||||||
visible: true,
|
visible: true,
|
||||||
@ -533,7 +531,6 @@ export default {
|
|||||||
socketInstance = null
|
socketInstance = null
|
||||||
stompClientInstance = null
|
stompClientInstance = null
|
||||||
}
|
}
|
||||||
viewer.entities.removeAll()
|
|
||||||
// if (broadcastChannel) {
|
// if (broadcastChannel) {
|
||||||
// this.closeBroadcastChannel()
|
// this.closeBroadcastChannel()
|
||||||
// }
|
// }
|
||||||
@ -576,431 +573,431 @@ export default {
|
|||||||
return '#336dff'
|
return '#336dff'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// startTest() {
|
startTest() {
|
||||||
// let testHeight = 1000
|
let testHeight = 1000
|
||||||
// window.detectType = {
|
window.detectType = {
|
||||||
// 1: '车'
|
1: '车'
|
||||||
// }
|
}
|
||||||
// let task = [
|
let task = [
|
||||||
// {
|
{
|
||||||
// id: 1,
|
id: 1,
|
||||||
// name: '测试任务',
|
name: '测试任务',
|
||||||
// status: 1,
|
status: 1,
|
||||||
// statusName: '执行中',
|
statusName: '执行中',
|
||||||
// check: true,
|
check: true,
|
||||||
// beginTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
beginTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
// pointList: [
|
pointList: [
|
||||||
// [
|
[
|
||||||
// {
|
{
|
||||||
// longitude: 115.915457,
|
longitude: 115.915457,
|
||||||
// latitude: 40.359459,
|
latitude: 40.359459,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.915457,
|
longitude: 115.915457,
|
||||||
// latitude: 40.358999,
|
latitude: 40.358999,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.915874,
|
longitude: 115.915874,
|
||||||
// latitude: 40.358999,
|
latitude: 40.358999,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.915874,
|
longitude: 115.915874,
|
||||||
// latitude: 40.359459,
|
latitude: 40.359459,
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// {
|
{
|
||||||
// longitude: 115.915457,
|
longitude: 115.915457,
|
||||||
// latitude: 40.355459
|
latitude: 40.355459
|
||||||
// },
|
},
|
||||||
// ]
|
]
|
||||||
// ],
|
],
|
||||||
// uavList: [
|
uavList: [
|
||||||
// {
|
{
|
||||||
// jobId: 1,
|
jobId: 1,
|
||||||
// uavId: 2,
|
uavId: 2,
|
||||||
// uavName: '无人机1',
|
uavName: '无人机1',
|
||||||
// airlineList: [
|
airlineList: [
|
||||||
// {
|
{
|
||||||
// startLon: 115.917609,
|
startLon: 115.917609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// endLon: 115.917609,
|
endLon: 115.917609,
|
||||||
// endLat: 40.357843,
|
endLat: 40.357843,
|
||||||
// endHeight: testHeight,
|
endHeight: testHeight,
|
||||||
// id: 1
|
id: 1
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// startLon: 115.919609,
|
startLon: 115.919609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// endLon: 115.919609,
|
endLon: 115.919609,
|
||||||
// endLat: 40.357843,
|
endLat: 40.357843,
|
||||||
// endHeight: testHeight,
|
endHeight: testHeight,
|
||||||
// id: 2
|
id: 2
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// trailList: [
|
trailList: [
|
||||||
// {
|
{
|
||||||
// longitude: 115.917609,
|
longitude: 115.917609,
|
||||||
// latitude: 40.359843,
|
latitude: 40.359843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.918609,
|
longitude: 115.918609,
|
||||||
// latitude: 40.359843,
|
latitude: 40.359843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.919609,
|
longitude: 115.919609,
|
||||||
// latitude: 40.357843,
|
latitude: 40.357843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// startLon: 115.917609,
|
startLon: 115.917609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// payloadList: [
|
payloadList: [
|
||||||
// {
|
{
|
||||||
// payloadId: 1,
|
payloadId: 1,
|
||||||
// payloadName: 'sar',
|
payloadName: 'sar',
|
||||||
// imageList: [
|
imageList: [
|
||||||
// {
|
{
|
||||||
// left1Lon: 115.917609,
|
left1Lon: 115.917609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.917609,
|
left2Lon: 115.917609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.918609,
|
right2Lon: 115.918609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.918609,
|
right1Lon: 115.918609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// fileId: 1,
|
fileId: 1,
|
||||||
// id: 1,
|
id: 1,
|
||||||
// relativePath: '1.png',
|
relativePath: '1.png',
|
||||||
// itemList: [
|
itemList: [
|
||||||
// {
|
{
|
||||||
// id: 2,
|
id: 2,
|
||||||
// left1Lon: 115.917609,
|
left1Lon: 115.917609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.917609,
|
left2Lon: 115.917609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.918609,
|
right2Lon: 115.918609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.918609,
|
right1Lon: 115.918609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// id: 4,
|
id: 4,
|
||||||
// left1Lon: 115.916609,
|
left1Lon: 115.916609,
|
||||||
// left1Lat: 40.359143,
|
left1Lat: 40.359143,
|
||||||
// left2Lon: 115.916609,
|
left2Lon: 115.916609,
|
||||||
// left2Lat: 40.358943,
|
left2Lat: 40.358943,
|
||||||
// right2Lon: 115.918509,
|
right2Lon: 115.918509,
|
||||||
// right2Lat: 40.358943,
|
right2Lat: 40.358943,
|
||||||
// right1Lon: 115.918509,
|
right1Lon: 115.918509,
|
||||||
// right1Lat: 40.359143,
|
right1Lat: 40.359143,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// left1Lon: 115.919609,
|
left1Lon: 115.919609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.919609,
|
left2Lon: 115.919609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.920609,
|
right2Lon: 115.920609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.920609,
|
right1Lon: 115.920609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// fileId: 2,
|
fileId: 2,
|
||||||
// relativePath: '1.png',
|
relativePath: '1.png',
|
||||||
// itemList: [
|
itemList: [
|
||||||
// {
|
{
|
||||||
// id: 5,
|
id: 5,
|
||||||
// left1Lon: 115.919609,
|
left1Lon: 115.919609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.919609,
|
left2Lon: 115.919609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.920609,
|
right2Lon: 115.920609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.920609,
|
right1Lon: 115.920609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// id: 6,
|
id: 6,
|
||||||
// left1Lon: 115.918609,
|
left1Lon: 115.918609,
|
||||||
// left1Lat: 40.359143,
|
left1Lat: 40.359143,
|
||||||
// left2Lon: 115.918609,
|
left2Lon: 115.918609,
|
||||||
// left2Lat: 40.358943,
|
left2Lat: 40.358943,
|
||||||
// right2Lon: 115.920509,
|
right2Lon: 115.920509,
|
||||||
// right2Lat: 40.358943,
|
right2Lat: 40.358943,
|
||||||
// right1Lon: 115.920509,
|
right1Lon: 115.920509,
|
||||||
// right1Lat: 40.359143,
|
right1Lat: 40.359143,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// id: 2,
|
id: 2,
|
||||||
// name: '测试任务2',
|
name: '测试任务2',
|
||||||
// status: 2,
|
status: 2,
|
||||||
// check: false,
|
check: false,
|
||||||
// statusName: '已完成',
|
statusName: '已完成',
|
||||||
// beginTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
beginTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
// pointList: [
|
pointList: [
|
||||||
// [
|
[
|
||||||
// {
|
{
|
||||||
// longitude: 115.905457,
|
longitude: 115.905457,
|
||||||
// latitude: 40.359459
|
latitude: 40.359459
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.905457,
|
longitude: 115.905457,
|
||||||
// latitude: 40.358999
|
latitude: 40.358999
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.905874,
|
longitude: 115.905874,
|
||||||
// latitude: 40.358999
|
latitude: 40.358999
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.905874,
|
longitude: 115.905874,
|
||||||
// latitude: 40.359459
|
latitude: 40.359459
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// {
|
{
|
||||||
// longitude: 115.905457,
|
longitude: 115.905457,
|
||||||
// latitude: 40.355459
|
latitude: 40.355459
|
||||||
// },
|
},
|
||||||
// ]
|
]
|
||||||
// ],
|
],
|
||||||
// uavList: [
|
uavList: [
|
||||||
// {
|
{
|
||||||
// jobId: 2,
|
jobId: 2,
|
||||||
// uavId: 3,
|
uavId: 3,
|
||||||
|
|
||||||
// uavName: '无人机1',
|
uavName: '无人机1',
|
||||||
// airlineList: [
|
airlineList: [
|
||||||
// {
|
{
|
||||||
// startLon: 115.907609,
|
startLon: 115.907609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// endLon: 115.917609,
|
endLon: 115.917609,
|
||||||
// endLat: 40.357843,
|
endLat: 40.357843,
|
||||||
// endHeight: testHeight,
|
endHeight: testHeight,
|
||||||
// id: 1
|
id: 1
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// startLon: 115.909609,
|
startLon: 115.909609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// endLon: 115.919609,
|
endLon: 115.919609,
|
||||||
// endLat: 40.357843,
|
endLat: 40.357843,
|
||||||
// endHeight: testHeight,
|
endHeight: testHeight,
|
||||||
// id: 2
|
id: 2
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// trailList: [
|
trailList: [
|
||||||
// {
|
{
|
||||||
// longitude: 115.907609,
|
longitude: 115.907609,
|
||||||
// latitude: 40.359843,
|
latitude: 40.359843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.906609,
|
longitude: 115.906609,
|
||||||
// latitude: 40.359843,
|
latitude: 40.359843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// longitude: 115.905609,
|
longitude: 115.905609,
|
||||||
// latitude: 40.357843,
|
latitude: 40.357843,
|
||||||
// height: testHeight
|
height: testHeight
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// startLon: 115.907609,
|
startLon: 115.907609,
|
||||||
// startLat: 40.359843,
|
startLat: 40.359843,
|
||||||
// startHeight: testHeight,
|
startHeight: testHeight,
|
||||||
// payloadList: [
|
payloadList: [
|
||||||
// {
|
{
|
||||||
// payloadId: 1,
|
payloadId: 1,
|
||||||
// payloadName: 'sar',
|
payloadName: 'sar',
|
||||||
// imageList: [
|
imageList: [
|
||||||
// {
|
{
|
||||||
// left1Lon: 115.907609,
|
left1Lon: 115.907609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.907609,
|
left2Lon: 115.907609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.908609,
|
right2Lon: 115.908609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.908609,
|
right1Lon: 115.908609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// fileId: 1,
|
fileId: 1,
|
||||||
// relativePath: '1.png',
|
relativePath: '1.png',
|
||||||
// itemList: [
|
itemList: [
|
||||||
// {
|
{
|
||||||
// id: 1,
|
id: 1,
|
||||||
// left1Lon: 115.917609,
|
left1Lon: 115.917609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.917609,
|
left2Lon: 115.917609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.918609,
|
right2Lon: 115.918609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.918609,
|
right1Lon: 115.918609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// id: 2,
|
id: 2,
|
||||||
// left1Lon: 115.916609,
|
left1Lon: 115.916609,
|
||||||
// left1Lat: 40.359143,
|
left1Lat: 40.359143,
|
||||||
// left2Lon: 115.916609,
|
left2Lon: 115.916609,
|
||||||
// left2Lat: 40.358943,
|
left2Lat: 40.358943,
|
||||||
// right2Lon: 115.918509,
|
right2Lon: 115.918509,
|
||||||
// right2Lat: 40.358943,
|
right2Lat: 40.358943,
|
||||||
// right1Lon: 115.918509,
|
right1Lon: 115.918509,
|
||||||
// right1Lat: 40.359143,
|
right1Lat: 40.359143,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// left1Lon: 115.909609,
|
left1Lon: 115.909609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.909609,
|
left2Lon: 115.909609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.910609,
|
right2Lon: 115.910609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.910609,
|
right1Lon: 115.910609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// fileId: 2,
|
fileId: 2,
|
||||||
// relativePath: '1.png',
|
relativePath: '1.png',
|
||||||
// itemList: [
|
itemList: [
|
||||||
// {
|
{
|
||||||
// id: 1,
|
id: 1,
|
||||||
// left1Lon: 115.909609,
|
left1Lon: 115.909609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.909609,
|
left2Lon: 115.909609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.910609,
|
right2Lon: 115.910609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.910609,
|
right1Lon: 115.910609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// id: 2,
|
id: 2,
|
||||||
// left1Lon: 115.908609,
|
left1Lon: 115.908609,
|
||||||
// left1Lat: 40.359143,
|
left1Lat: 40.359143,
|
||||||
// left2Lon: 115.908609,
|
left2Lon: 115.908609,
|
||||||
// left2Lat: 40.358943,
|
left2Lat: 40.358943,
|
||||||
// right2Lon: 115.910509,
|
right2Lon: 115.910509,
|
||||||
// right2Lat: 40.358943,
|
right2Lat: 40.358943,
|
||||||
// right1Lon: 115.910509,
|
right1Lon: 115.910509,
|
||||||
// right1Lat: 40.359143,
|
right1Lat: 40.359143,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// this.taskList.data = task
|
this.taskList.data = task
|
||||||
// task.forEach(item => {
|
task.forEach(item => {
|
||||||
// // 测试
|
// 测试
|
||||||
// if (item.status === 1) {
|
if (item.status === 1) {
|
||||||
// this.addUavToScene(item)
|
this.addUavToScene(item)
|
||||||
// this.addTaskPlanArea(item.pointList, item.id)
|
this.addTaskPlanArea(item.pointList, item.id)
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
|
|
||||||
// let initPosition = [115.919609, 40.357843, testHeight]
|
let initPosition = [115.919609, 40.357843, testHeight]
|
||||||
// // 测试推送
|
// 测试推送
|
||||||
// setInterval(() => {
|
setInterval(() => {
|
||||||
// initPosition[0] += 0.001
|
initPosition[0] += 0.001
|
||||||
// initPosition[1] += 0.001
|
initPosition[1] += 0.001
|
||||||
// let body = [{
|
let body = [{
|
||||||
// jobId: 1,
|
jobId: 1,
|
||||||
// uavId: 2,
|
uavId: 2,
|
||||||
// longitude: initPosition[0],
|
longitude: initPosition[0],
|
||||||
// latitude: initPosition[1],
|
latitude: initPosition[1],
|
||||||
// height: initPosition[2],
|
height: initPosition[2],
|
||||||
// payloadList: [
|
payloadList: [
|
||||||
// {
|
{
|
||||||
// longitude: initPosition[0],
|
longitude: initPosition[0],
|
||||||
// latitude: initPosition[1],
|
latitude: initPosition[1],
|
||||||
// altitude: initPosition[2],
|
altitude: initPosition[2],
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }]
|
}]
|
||||||
// this.handleWebsocketStatus({ body: JSON.stringify(body) })
|
this.handleWebsocketStatus({ body: JSON.stringify(body) })
|
||||||
|
|
||||||
// }, 4000)
|
}, 4000)
|
||||||
|
|
||||||
// let initPic = {
|
let initPic = {
|
||||||
// left1Lon: 115.917609,
|
left1Lon: 115.917609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.917609,
|
left2Lon: 115.917609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.918609,
|
right2Lon: 115.918609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.918609,
|
right1Lon: 115.918609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// fileId: 4,
|
fileId: 4,
|
||||||
// id: 1,
|
id: 1,
|
||||||
// jobId: 1,
|
jobId: 1,
|
||||||
// payloadId: 1,
|
payloadId: 1,
|
||||||
// uavId: 2,
|
uavId: 2,
|
||||||
// relativePath: '1.png',
|
relativePath: '1.png',
|
||||||
// itemList: [
|
itemList: [
|
||||||
// {
|
{
|
||||||
// id: 9,
|
id: 9,
|
||||||
// left1Lon: 115.917609,
|
left1Lon: 115.917609,
|
||||||
// left1Lat: 40.359843,
|
left1Lat: 40.359843,
|
||||||
// left2Lon: 115.917609,
|
left2Lon: 115.917609,
|
||||||
// left2Lat: 40.358843,
|
left2Lat: 40.358843,
|
||||||
// right2Lon: 115.918609,
|
right2Lon: 115.918609,
|
||||||
// right2Lat: 40.358843,
|
right2Lat: 40.358843,
|
||||||
// right1Lon: 115.918609,
|
right1Lon: 115.918609,
|
||||||
// right1Lat: 40.359843,
|
right1Lat: 40.359843,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// },
|
},
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// setInterval(() => {
|
setInterval(() => {
|
||||||
// initPic.left1Lon += 0.001
|
initPic.left1Lon += 0.001
|
||||||
// initPic.left1Lat += 0.001
|
initPic.left1Lat += 0.001
|
||||||
// initPic.left2Lon += 0.001
|
initPic.left2Lon += 0.001
|
||||||
// initPic.left2Lat += 0.001
|
initPic.left2Lat += 0.001
|
||||||
// initPic.right2Lon += 0.001
|
initPic.right2Lon += 0.001
|
||||||
// initPic.right2Lat += 0.001
|
initPic.right2Lat += 0.001
|
||||||
// initPic.right1Lon += 0.001
|
initPic.right1Lon += 0.001
|
||||||
// initPic.right1Lat += 0.001
|
initPic.right1Lat += 0.001
|
||||||
// initPic.fileId += 1
|
initPic.fileId += 1
|
||||||
// initPic.itemList.forEach(item => {
|
initPic.itemList.forEach(item => {
|
||||||
// item.left1Lon += 0.001
|
item.left1Lon += 0.001
|
||||||
// item.left1Lat += 0.001
|
item.left1Lat += 0.001
|
||||||
// item.left2Lon += 0.001
|
item.left2Lon += 0.001
|
||||||
// item.left2Lat += 0.001
|
item.left2Lat += 0.001
|
||||||
// item.right2Lon += 0.001
|
item.right2Lon += 0.001
|
||||||
// item.right2Lat += 0.001
|
item.right2Lat += 0.001
|
||||||
// item.right1Lon += 0.001
|
item.right1Lon += 0.001
|
||||||
// item.right1Lat += 0.001
|
item.right1Lat += 0.001
|
||||||
// item.id += 1
|
item.id += 1
|
||||||
// })
|
})
|
||||||
// this.handleWebsocketImage({ body: JSON.stringify(initPic) })
|
this.handleWebsocketImage({ body: JSON.stringify(initPic) })
|
||||||
// }, 6000)
|
}, 6000)
|
||||||
// },
|
},
|
||||||
// 工具栏操作
|
// 工具栏操作
|
||||||
toggleTools(tool) {
|
toggleTools(tool) {
|
||||||
tool.active = !tool.active
|
tool.active = !tool.active
|
||||||
@ -1072,14 +1069,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getTaskList() {
|
getTaskList() {
|
||||||
getExecJobs({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => {
|
getTaskListData({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log('任务列表', res.data.data)
|
console.log('任务列表', res.data.data)
|
||||||
let data = res.data.data
|
let data = res.data.data
|
||||||
let list = []
|
let list = []
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
// item.check = item.status === 1 || item.status === 3
|
item.check = item.status === 1 || item.status === 3
|
||||||
item.check = false
|
|
||||||
item.statusName = this.jobStatus[item.status + '']
|
item.statusName = this.jobStatus[item.status + '']
|
||||||
// TODO 临时设置
|
// TODO 临时设置
|
||||||
item.uavList.forEach(child => {
|
item.uavList.forEach(child => {
|
||||||
@ -1102,8 +1098,8 @@ export default {
|
|||||||
// item.pointList = [item.pointList]
|
// item.pointList = [item.pointList]
|
||||||
if (item.status === 1 || item.status === 3) {
|
if (item.status === 1 || item.status === 3) {
|
||||||
// this.addJobLine(item, false)
|
// this.addJobLine(item, false)
|
||||||
// this.addUavToScene(item)
|
this.addUavToScene(item)
|
||||||
// this.addTaskPlanArea(item.pointList, item.id, item.name)
|
this.addTaskPlanArea(item.pointList, item.id, item.name)
|
||||||
}
|
}
|
||||||
// 测试
|
// 测试
|
||||||
// this.addUavToScene(item)
|
// this.addUavToScene(item)
|
||||||
@ -3045,8 +3041,6 @@ export default {
|
|||||||
//#region 航线详情
|
//#region 航线详情
|
||||||
openTaskLineDetail(info) {
|
openTaskLineDetail(info) {
|
||||||
this.taskLineDetail.visible = false
|
this.taskLineDetail.visible = false
|
||||||
console.log(taskListResource, 555);
|
|
||||||
|
|
||||||
let find = taskListResource.find(item => item.id === info.id)
|
let find = taskListResource.find(item => item.id === info.id)
|
||||||
|
|
||||||
console.log('信息', find)
|
console.log('信息', find)
|
||||||
|
|||||||
@ -196,8 +196,8 @@
|
|||||||
width: 40px;
|
width: 40px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
padding: 0 8px;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
>i {
|
>i {
|
||||||
|
|||||||
@ -84,10 +84,7 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="task-execute">{{ item.name }}</span>
|
<span class="task-execute">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="task-info" :style="{color:dealStatusColor(item.statusName)}">
|
||||||
class="task-info"
|
|
||||||
:style="{ color: dealStatusColor(item.statusName) }"
|
|
||||||
>
|
|
||||||
{{ item.statusName }}
|
{{ item.statusName }}
|
||||||
</div>
|
</div>
|
||||||
<div class="task-time">{{ item.beginTime }}</div>
|
<div class="task-time">{{ item.beginTime }}</div>
|
||||||
@ -96,28 +93,28 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="item.check ? '隐藏' : '显示'"
|
:content="item.check ? '隐藏' : '显示'"
|
||||||
placement="top"
|
placement="right"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
:class="item.check ? 'ri-eye-off-line' : 'ri-eye-line'"
|
:class="item.check ? 'ri-eye-off-line' : 'ri-eye-line'"
|
||||||
@click.stop="toggleTaskSceneShow(item, index)"
|
@click.stop="toggleTaskSceneShow(item, index)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<!-- <el-tooltip
|
<el-tooltip
|
||||||
v-if="item.status === 0"
|
v-if="item.status === 0"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="执行"
|
content="执行"
|
||||||
placement="top"
|
placement="right"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
class="ri-arrow-up-circle-line"
|
class="ri-flight-takeoff-line"
|
||||||
@click.stop="makeTaskUavFly(item, index)"
|
@click.stop="makeTaskUavFly(item, index)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip> -->
|
</el-tooltip>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="结束任务"
|
content="结束任务"
|
||||||
placement="top"
|
placement="right"
|
||||||
v-if="item.status === 1"
|
v-if="item.status === 1"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
@ -125,17 +122,19 @@
|
|||||||
@click.stop="stopTask(item, index)"
|
@click.stop="stopTask(item, index)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<!-- <el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="重新执行"
|
content="重新执行"
|
||||||
placement="top"
|
placement="right"
|
||||||
v-if="item.status === 2"
|
v-if="item.status === 2"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
class="ri-restart-line"
|
class="ri-repeat-line"
|
||||||
@click.stop="reRunTask(item, index)"
|
@click.stop="reRunTask(item, index)"
|
||||||
></i>
|
></i>
|
||||||
</el-tooltip> -->
|
</el-tooltip>
|
||||||
|
<!-- <i class="el-icon-edit-outline edit-task" @click.stop="editTask(item)"></i>-->
|
||||||
|
<!-- <i class="el-icon-close delete-task" @click.stop="deleteTask(item)"></i>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -16,10 +16,7 @@ export default class UavTarget {
|
|||||||
this.startAltitude = options.startAltitude
|
this.startAltitude = options.startAltitude
|
||||||
|
|
||||||
this.addPlanLine(options.airlineList)
|
this.addPlanLine(options.airlineList)
|
||||||
console.log(options, '飞机数据');
|
|
||||||
if (options.startLon) {
|
|
||||||
this.addUav(options)
|
this.addUav(options)
|
||||||
}
|
|
||||||
this.addUavLoader(options.payloadList)
|
this.addUavLoader(options.payloadList)
|
||||||
}
|
}
|
||||||
addUav(info) {
|
addUav(info) {
|
||||||
@ -35,37 +32,36 @@ export default class UavTarget {
|
|||||||
}
|
}
|
||||||
let currentPosition = this.positions[this.positions.length - 1].clone()
|
let currentPosition = this.positions[this.positions.length - 1].clone()
|
||||||
let id = `${this.jobId}~${this.uavId}-uav`
|
let id = `${this.jobId}~${this.uavId}-uav`
|
||||||
|
|
||||||
this.uavEntity = this.viewer.entities.add({
|
this.uavEntity = this.viewer.entities.add({
|
||||||
id,
|
id,
|
||||||
position: currentPosition,
|
position: currentPosition,
|
||||||
label: {
|
// label: {
|
||||||
text: info.uavName,
|
// text: info.uavName,
|
||||||
font: '14px sans-serif',
|
// font: '14px sans-serif',
|
||||||
fillColor: DT.Cesium.Color.WHITE,
|
// fillColor: DT.Cesium.Color.WHITE,
|
||||||
horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
|
// horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
|
||||||
verticalOrigin: DT.Cesium.VerticalOrigin.CENTER,
|
// verticalOrigin: DT.Cesium.VerticalOrigin.CENTER,
|
||||||
disableDepthTestDistance: 10000,
|
// disableDepthTestDistance: 10000,
|
||||||
pixelOffset: new DT.Cesium.Cartesian2(10, 0),
|
// pixelOffset: new DT.Cesium.Cartesian2(10, 0),
|
||||||
showBackground: true,
|
// showBackground: true,
|
||||||
scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8),
|
// scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8),
|
||||||
distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000),
|
// distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000),
|
||||||
backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(0,0,0,0.7)'),
|
// backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(0,0,0,0.7)'),
|
||||||
style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
|
// style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
|
||||||
},
|
// },
|
||||||
model: {
|
// model: {
|
||||||
uri: process.env.BASE_URL + 'model/uav.gltf',
|
// uri: process.env.BASE_URL + 'model/uav.gltf',
|
||||||
// scale: 1,
|
// // scale: 1,
|
||||||
minimumPixelSize: 32,
|
// minimumPixelSize: 32,
|
||||||
maximumScale: 128,
|
// maximumScale: 128,
|
||||||
},
|
// },
|
||||||
polyline: {
|
polyline: {
|
||||||
positions: new DT.Cesium.CallbackProperty(function () {
|
positions: new DT.Cesium.CallbackProperty(function () {
|
||||||
return that.positions
|
return that.positions
|
||||||
}, false),
|
}, false),
|
||||||
width: 8,
|
width: 2,
|
||||||
zIndex: 600,
|
zIndex: 6,
|
||||||
material: DT.Cesium.Color.BLACK,
|
material: DT.Cesium.Color.CYAN,
|
||||||
depthFailMaterial: DT.Cesium.Color.CYAN,
|
depthFailMaterial: DT.Cesium.Color.CYAN,
|
||||||
arcType: DT.Cesium.ArcType.NONE
|
arcType: DT.Cesium.ArcType.NONE
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,8 +5,7 @@ import {
|
|||||||
import PicturesUpload from '../pictures-upload/index.vue'
|
import PicturesUpload from '../pictures-upload/index.vue'
|
||||||
import RightSlide from '@/components/RightSlide.vue'
|
import RightSlide from '@/components/RightSlide.vue'
|
||||||
import LeftSlide from '@/components/LeftSlide.vue'
|
import LeftSlide from '@/components/LeftSlide.vue'
|
||||||
import { userRemove, userList, userUpdate, userSave } from '@/api/user'
|
|
||||||
import md5 from 'js-md5'
|
|
||||||
let taskListResource = []
|
let taskListResource = []
|
||||||
export default {
|
export default {
|
||||||
name: 'TwinSituation',
|
name: 'TwinSituation',
|
||||||
@ -20,42 +19,27 @@ export default {
|
|||||||
LeftSlide,
|
LeftSlide,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const cfPsdRule = (rule, value, callback) => {
|
|
||||||
if (value === '' || typeof value === 'undefined') {
|
|
||||||
callback(new Error('请再次输入密码'))
|
|
||||||
} else if (value !== this.user.form.password) {
|
|
||||||
callback(new Error('两次输入密码不一致!'))
|
|
||||||
} else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
visibleLocale: false,
|
visibleLocale: false,
|
||||||
userData: [
|
deviceData: [
|
||||||
// {
|
{
|
||||||
// name: '无人机1',
|
name: '无人机1',
|
||||||
// num: 'M3127',
|
num: 'M3127',
|
||||||
// location: '112.3423242,45.2312324'
|
location: '112.3423242,45.2312324'
|
||||||
// }
|
}
|
||||||
],
|
],
|
||||||
user: {
|
device: {
|
||||||
visible: false,
|
visible: false,
|
||||||
form: {
|
form: {},
|
||||||
id: '',
|
|
||||||
account: '',
|
|
||||||
password: '',
|
|
||||||
confirmPassword: ''
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
account: [
|
deviceName: [
|
||||||
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
{ required: true, message: '请输入设备名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
password: [
|
num: [
|
||||||
{ required: true, message: '请输入用户密码', trigger: 'blur' }
|
{ required: true, message: '请输入设备编号', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
confirmPassword: [
|
location: [
|
||||||
{ required: true, message: '请再次输入密码', trigger: 'blur' },
|
{ required: true, message: '请输入设备位置', trigger: 'blur' }
|
||||||
{ required: true, validator: cfPsdRule, trigger: 'blur' },
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -80,74 +64,41 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.userPage()
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
userPage() {
|
addDevice() {
|
||||||
userList().then(res => {
|
this.device.visible = true
|
||||||
this.userData = res.data.data
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
addUser() {
|
editDevice(form) {
|
||||||
this.user.form = {
|
this.device.visible = true
|
||||||
id: '',
|
this.device.form = form
|
||||||
account: '',
|
|
||||||
password: '',
|
|
||||||
confirmPassword: ''
|
|
||||||
}
|
|
||||||
this.user.visible = true
|
|
||||||
},
|
},
|
||||||
editUser(form) {
|
detailDevice() {
|
||||||
this.user.visible = true
|
this.device.visible = true
|
||||||
this.user.form.account = form.account
|
this.device.form = form
|
||||||
this.user.form.id = form.id
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$refs.form.resetFields()
|
this.$refs.form.resetFields()
|
||||||
this.user.visible = false
|
this.device.visible = false
|
||||||
this.user.form = {
|
|
||||||
id: '',
|
|
||||||
account: '',
|
|
||||||
password: '',
|
|
||||||
confirmPassword: ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async submitUser() {
|
submitDevice() {
|
||||||
const valid = await this.$refs.form.validate()
|
this.$refs.form.validate((valid) => {
|
||||||
if (!valid) return
|
console.log(valid, 3333333);
|
||||||
delete this.user.form.confirmPassword
|
|
||||||
const form = { ...this.user.form }
|
|
||||||
form.password = md5(form.password)
|
|
||||||
if (form.id) {
|
|
||||||
userUpdate(this.user.form).then(res => {
|
|
||||||
this.$message.success('更新用户成功')
|
|
||||||
this.userPage()
|
|
||||||
this.close()
|
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
userSave(form).then(res => {
|
|
||||||
this.$message.success('新增用户成功')
|
|
||||||
this.userPage()
|
|
||||||
this.close()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async deleteUser(row) {
|
async deleteDevice() {
|
||||||
const bool = await this.$confirm('确认要永久删除该用户吗?', '提示', {
|
const bool = await this.$confirm('确认要永久删除该设备吗?', '提示', {
|
||||||
customClass: 'confirm-light',
|
customClass: 'confirm-light',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
if (!bool) return
|
console.log(bool, 333);
|
||||||
userRemove([row.id]).then(res => {
|
|
||||||
this.$message.success('删除用户成功')
|
|
||||||
this.userPage()
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//#region 无人机详情代码
|
//#region 无人机详情代码
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>.user-name {
|
>.device-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 110px;
|
width: 110px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -175,7 +175,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-location {
|
.device-location {
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -190,14 +190,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-lock {
|
.device-lock {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #ffff00;
|
color: #ffff00;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-status {
|
.device-status {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -280,7 +280,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uav-item .user-name {
|
.uav-item .device-name {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,8 +305,3 @@
|
|||||||
top: $--icon-mode-larger-card-top;
|
top: $--icon-mode-larger-card-top;
|
||||||
transition: 0.2s ease-in-out;
|
transition: 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-icon-plus {
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -2,13 +2,15 @@
|
|||||||
<!-- 资源列表 -->
|
<!-- 资源列表 -->
|
||||||
<dt-card
|
<dt-card
|
||||||
class="resource-list card-light"
|
class="resource-list card-light"
|
||||||
|
icon="iconfont icon-left_icon_remote"
|
||||||
|
title="可用资源"
|
||||||
:visible.sync="visibleLocale"
|
:visible.sync="visibleLocale"
|
||||||
:scroll="false"
|
:scroll="false"
|
||||||
:showClose="false"
|
:showClose="false"
|
||||||
:showDivider="false"
|
:showDivider="false"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<!-- <el-form
|
<el-form
|
||||||
class="query-form"
|
class="query-form"
|
||||||
:model="queryForm"
|
:model="queryForm"
|
||||||
inline
|
inline
|
||||||
@ -22,21 +24,35 @@
|
|||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="设备类型">
|
||||||
|
<el-select
|
||||||
|
v-model="queryForm.name"
|
||||||
|
placeholder="请输入设备类型"
|
||||||
|
popper-class="select-light"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in deviceTypes"
|
||||||
|
:key="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
<el-form-item class="query-btn">
|
<el-form-item class="query-btn">
|
||||||
<el-button>查询</el-button>
|
<el-button>查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:command>
|
<template v-slot:command>
|
||||||
<el-button size="mini" icon="el-icon-plus" @click="addUser"
|
<el-button size="mini" icon="el-icon-plus" @click="addDevice"
|
||||||
>新增用户</el-button
|
>新增用户</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<el-table :data="userData" style="width: 100%" height="100%">
|
<el-table :data="deviceData" style="width: 100%">
|
||||||
<el-table-column prop="id" label="ID"> </el-table-column>
|
<el-table-column prop="name" label="用户名称"> </el-table-column>
|
||||||
<el-table-column prop="account" label="用户名称"> </el-table-column>
|
<el-table-column prop="num" label="手机号"> </el-table-column>
|
||||||
<!-- <el-table-column prop="updateTime" label="更新时间"> </el-table-column> -->
|
<el-table-column prop="location" label="邮箱"> </el-table-column>
|
||||||
<!-- <el-table-column prop="location" label="账号状态"> </el-table-column> -->
|
|
||||||
<el-table-column label="操作" width="200">
|
<el-table-column label="操作" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -44,22 +60,29 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
size="mini"
|
size="mini"
|
||||||
circle
|
circle
|
||||||
@click="editUser(scope.row)"
|
@click="editDevice(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
icon="ri-file-line"
|
||||||
|
size="mini"
|
||||||
|
circle
|
||||||
|
@click="detailDevice(scope.row)"
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
size="mini"
|
size="mini"
|
||||||
circle
|
circle
|
||||||
@click="deleteUser(scope.row)"
|
@click="deleteDevice(scope.row)"
|
||||||
></el-button>
|
></el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<dt-dialog
|
<dt-dialog
|
||||||
class="dialog-light"
|
class="dialog-light"
|
||||||
:title="user.form.id ? '编辑用户' : '新增用户'"
|
:title="device.form.deviceId ? '编辑用户' : '新增用户'"
|
||||||
:visible.sync="user.visible"
|
:visible.sync="device.visible"
|
||||||
top="20vh"
|
top="20vh"
|
||||||
width="22%"
|
width="22%"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -68,48 +91,43 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="user.form"
|
:model="device.form"
|
||||||
:rules="user.rules"
|
:rules="device.rules"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
label-width="110px"
|
label-width="110px"
|
||||||
class="change-password-form"
|
class="change-password-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户名称" prop="account">
|
<el-form-item label="用户名称" prop="deviceName">
|
||||||
<el-input
|
<el-input
|
||||||
name="account"
|
v-model="device.form.deviceName"
|
||||||
autocomplete="account"
|
|
||||||
v-model="user.form.account"
|
|
||||||
placeholder="请输入用户名称"
|
placeholder="请输入用户名称"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
|
show-password
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="用户密码" prop="password">
|
<el-form-item label="手机号" prop="num">
|
||||||
<el-input
|
<el-input
|
||||||
name="password"
|
v-model="device.form.num"
|
||||||
autocomplete="new-password"
|
placeholder="请输入用户手机号"
|
||||||
v-model="user.form.password"
|
|
||||||
placeholder="请输入用户密码"
|
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
show-password
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="确认密码" prop="confirmPassword">
|
<el-form-item label="邮箱" prop="location">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="user.form.confirmPassword"
|
v-model="device.form.location"
|
||||||
placeholder="请再次输入密码"
|
placeholder="请输入用户邮箱"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
show-password
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns" slot="footer">
|
<div class="btns" slot="footer">
|
||||||
<el-button @click="close" size="mini">取 消</el-button>
|
<el-button @click="close" size="mini">取 消</el-button>
|
||||||
<el-button type="primary" size="mini" @click="submitUser"
|
<el-button type="primary" size="mini" @click="submitDevice"
|
||||||
>确 定</el-button
|
>确 定</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -477,7 +477,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
menusChose: {
|
menusChose: {
|
||||||
handler: function (nv) {
|
handler: function (nv) {
|
||||||
window.localStorage.setItem('menusChose', nv)
|
console.log(nv, 33333333333);
|
||||||
switch (nv) {
|
switch (nv) {
|
||||||
case '1':
|
case '1':
|
||||||
this.menus.situation.active = true
|
this.menus.situation.active = true
|
||||||
@ -516,6 +516,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
immediate: true
|
||||||
},
|
},
|
||||||
// viewMode(nv) {
|
// viewMode(nv) {
|
||||||
// this.sendMessageByBroadcastChannel({ type: 'viewMode', form: 'home', value: nv })
|
// this.sendMessageByBroadcastChannel({ type: 'viewMode', form: 'home', value: nv })
|
||||||
@ -537,8 +538,6 @@ export default {
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const menusChose = window.localStorage.getItem('menusChose')
|
|
||||||
this.SET_MENUS_CHOSE(menusChose)
|
|
||||||
// this.init()
|
// this.init()
|
||||||
// this.getResourceData()
|
// this.getResourceData()
|
||||||
// 获取字典
|
// 获取字典
|
||||||
@ -626,7 +625,7 @@ export default {
|
|||||||
'SET_MAP_TYPE',
|
'SET_MAP_TYPE',
|
||||||
'SET_SPLIT_VISIBLE',
|
'SET_SPLIT_VISIBLE',
|
||||||
]),
|
]),
|
||||||
...mapMutations('app', ['SET_THEME', 'SET_MENUS_CHOSE']),
|
...mapMutations('app', ['SET_THEME']),
|
||||||
...mapActions('dict', ['getDict']),
|
...mapActions('dict', ['getDict']),
|
||||||
// 工具栏操作
|
// 工具栏操作
|
||||||
toggleTools(tool) {
|
toggleTools(tool) {
|
||||||
@ -682,7 +681,7 @@ export default {
|
|||||||
this.sceneComplete = true
|
this.sceneComplete = true
|
||||||
// this.addHandler()
|
// this.addHandler()
|
||||||
// this.$refs.tools.handleMapChange('sat')
|
// this.$refs.tools.handleMapChange('sat')
|
||||||
let position = DT.Cesium.Cartesian3.fromDegrees(window.config.defaultLocation[0], window.config.defaultLocation[1], 400000)
|
let position = DT.Cesium.Cartesian3.fromDegrees(window.config.defaultLocation[0], window.config.defaultLocation[1], 1000)
|
||||||
viewer.cesiumViewer.scene.camera.flyTo({
|
viewer.cesiumViewer.scene.camera.flyTo({
|
||||||
destination: position,
|
destination: position,
|
||||||
duration: 1
|
duration: 1
|
||||||
|
|||||||
@ -197,7 +197,6 @@ export default {
|
|||||||
path: this.redirect || '/',
|
path: this.redirect || '/',
|
||||||
query: this.otherQuery,
|
query: this.otherQuery,
|
||||||
})
|
})
|
||||||
window.localStorage.setItem('menusChose', '1')
|
|
||||||
console.log(this.$router, 'this.$router')
|
console.log(this.$router, 'this.$router')
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,15 +1,9 @@
|
|||||||
${AnsiColor.BRIGHT_BLUE}
|
${AnsiColor.BRIGHT_BLUE}
|
||||||
______ _ __ __ _____
|
_____ _ _ ____ ____ _____
|
||||||
|___ /| | / / \ \ | ____|
|
|_ _(_) / \ _ __ ___ ___ / ___| _ __ __ _ ___ ___ | _ \_ _|
|
||||||
/ / | |__ __ _ _ __ __ _| | _ | | _ _ | |__ ___
|
| | | | / _ \ | '_ ` _ \ / _ \ \___ \| '_ \ / _` |/ __/ _ \_____| | | || |
|
||||||
/ / | '_ \ / _` | '_ \ / _` | | | | | | | | | ||___ \/ __|
|
| | | |/ ___ \| | | | | | (_) | ___) | |_) | (_| | (_| __/_____| |_| || |
|
||||||
/ /__ | | | | (_| | | | | (_| | | | |__| | | |_| | ___) \__ \
|
|_| |_/_/ \_\_| |_| |_|\___/ |____/| .__/ \__,_|\___\___| |____/ |_|
|
||||||
/_____|_| |_|\__,_|_| |_|\__, |_| \____/ \__,_||____/|___/
|
|
||||||
| |
|
|
||||||
|_|
|
|
||||||
|
|
||||||
S K Y · E Y E R A D A R S Y S T E M
|
|
||||||
|
|
||||||
|_|
|
|_|
|
||||||
${AnsiColor.BRIGHT_GREEN}
|
${AnsiColor.BRIGHT_GREEN}
|
||||||
Spring Boot Version: ${spring-boot.version}
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user