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