添加关照、全局等高线、修改图层问题

This commit is contained in:
2025-07-17 18:54:05 +08:00
parent c781d38c0c
commit b274b62671
4594 changed files with 791769 additions and 4921 deletions

View File

@ -428,3 +428,19 @@ export function getLatest(data) {
params: data,
});
}
// 合并大图
export function mergeImages(params) {
return request({
url: `/dj/project/createTask/${params.gateway}/${params.flightId}`,
method: "post",
});
}
// 获取合并大图
export function getMergeImages(params) {
return request({
url: `/dj/project/queryTask/${params.taskId}`,
method: "get",
});
}

View File

@ -22,6 +22,7 @@ export function getLiveCapacity() {
});
}
// 开启直播 http://192.168.110.26:6789/manage/api/v1/live/streams/start
// {
// url: "rtmp://192.168.110.26:1935/live/1731915415055";
@ -160,3 +161,4 @@ export function stopStream() {
data,
});
}

View File

@ -31,19 +31,8 @@ export function addSource(data) {
if (!data.tree_index) {
let nodes = window.treeObj.getSelectedNodes();
console.log("nodes", nodes);
// 获取最大tree_index的辅助函数
const getMaxTreeIndex = (items) => {
let maxIndex = 0;
if (items && items.length > 0) {
items.forEach((item) => {
if (item.tree_index > maxIndex) {
maxIndex = item.tree_index;
}
});
}
return maxIndex;
};
const getMaxTreeIndex = (items = []) => items.reduce((max, item) => Math.max(max, item.tree_index || 0), 0);
if (nodes.length > 0) {
// 检查当前节点是否有子节点
@ -59,18 +48,29 @@ export function addSource(data) {
data.tree_index = getMaxTreeIndex(parentNode.children) + 1;
} else {
// 没有父节点,获取根节点列表
data.tree_index = window.treeObj.getNodes().length + 1;
let nodes = window.treeObj.getNodes();
if (nodes.length > 0) {
data.tree_index = getMaxTreeIndex(nodes) + 1;
}else{
data.tree_index = nodes.length+ 1;
}
}
}
} else {
// 没有选中节点,获取根节点列表
// 获取根节点列表,处理可能为undefined的情况
const nodes = window.treeObj.getNodes() || [];
data.tree_index = nodes.length + 1;
console.log("nodes", nodes);
let max
if (nodes.length > 0) {
max = getMaxTreeIndex(nodes)
}else{
max = nodes.length
}
data.tree_index = max + 1;
}
}
console.log("addSource", data);
return request({
url: "/api/v1/source/add",
method: "post",

View File

@ -109,6 +109,7 @@ module.exports = {
heatMap: "heatMap",
importPanorama: "panorama",
fountain: "fountain",
flyLine:"flyLine",
waterL: "water column",
groundText: "GroundText",
@ -136,6 +137,7 @@ module.exports = {
cutFill: "cutFill",
slopeDirection: "slopeDirection",
contour: "contour",
qcontour:'Global contour',
// inundationAnalysis: "inundationAnalysis",
// visualFieldAnalysis: "visualFieldAnalysis",
// profileAnalysis: "profileAnalysis",
@ -163,6 +165,7 @@ module.exports = {
ConcurrencyControl: "Concurrency Control",
localIP: "Local IP",
localPort: "Local Port",
weather: "Weather",
week: [
"Sunday",
"Monday",

View File

@ -103,6 +103,7 @@ module.exports = {
waterL: "喷射水柱",
groundText: "貼地文字",
standText: "立體文字",
flyLine:"飛線",
// 分析二级菜单
inundationAnalysis: "淹沒分析",
@ -113,6 +114,7 @@ module.exports = {
slopeDirection: "坡度坡向",
viewShed: "可視域分析",
contour: "等高線",
qcontour:'全域等高線',
},
},
bottomMenu: {
@ -137,6 +139,7 @@ module.exports = {
ConcurrencyControl: "並發量控制",
localIP: "本地IP",
localPort: "本地端口",
weather: "天气",
week: [
"星期日",
"星期一",

View File

@ -105,6 +105,7 @@ module.exports = {
heatMap: "热力图",
fountain: "喷泉",
waterL: "喷射水柱",
flyLine:"飞线",
// 分析二级菜单
inundationAnalysis: "淹没分析",
visualFieldAnalysis: "视域分析",
@ -113,6 +114,7 @@ module.exports = {
cutFill: "土方分析",
slopeDirection: "坡度坡向",
contour: "等高线",
qcontour:'全局等高线',
pictureLocation: "照片定位",
importPanorama: "全景导入",
},
@ -143,6 +145,7 @@ module.exports = {
localPort: "本地端口",
remoteIP: "远程IP",
remotePort: "远程端口",
weather: "天气",
week: [
"星期日",
"星期一",

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -181,38 +181,45 @@ export default {
status: false,
},
// 雨
{
fun: this.toDo,
name: "rain",
svg: "rain",
status: false,
},
// {
// fun: this.toDo,
// name: "rain",
// svg: "rain",
// status: false,
// },
// 雪
{
fun: this.toDo,
name: "snow",
svg: "snow",
status: false,
},
// {
// fun: this.toDo,
// name: "snow",
// svg: "snow",
// status: false,
// },
//雾
{
fun: this.toDo,
name: "fog",
svg: "fog",
status: false,
},
// {
// fun: this.toDo,
// name: "fog",
// svg: "fog",
// status: false,
// },
//光照
{
fun: this.toDo,
name: "illumination",
svg: "illumination",
status: false,
},
// {
// fun: this.toDo,
// name: "illumination",
// svg: "illumination",
// status: false,
// },
//星空
// {
// fun: this.toDo,
// name: "skystarry",
// svg: "skystarry",
// status: false,
// },
// 飞线
{
fun: this.toDo,
name: "skystarry",
svg: "skystarry",
name: "flyLine",
svg: "flyLine",
status: false,
},
@ -304,8 +311,14 @@ export default {
// status: false,
// },
//等高线
//全局等高线
{
fun: this.toDo,
name: "qcontour",
svg: "qcontour",
},
//等高线
{
fun: this.toDo,
name: "contour",
svg: "contour",

View File

@ -15,7 +15,10 @@ import {
addSituation,
} from "@/api/gisAPI";
import { getNamefromPath, getIP } from "../../utils";
import { processBase64Images,combineBase64Images } from "../../utils/HighDefinitionScreenshot"
import {
processBase64Images,
combineBase64Images,
} from "../../utils/HighDefinitionScreenshot";
import {
$changeComponentShow,
$recvElectronChanel,
@ -40,6 +43,7 @@ import {
renderSpout,
renderEllipse,
renderSector,
renderFlyLine,
} from "../Tree/renderNode";
import { shpTotalDict } from "../../api/shpTotalDict";
import e from "express";
@ -998,6 +1002,8 @@ const secondMenuFun = {
this.$recvChanel("selectModel", (data) => {
this.$changeComponentShow(".modelSelectBox", false);
let url = data.model_id + ".glb";
console.log("urlurlurlurlurlurl", url);
let draw = new YJ.Draw.DrawPolyline(window.Earth1);
draw.start((err, positions) => {
if (positions.length < 2) {
@ -1154,26 +1160,27 @@ const secondMenuFun = {
},
//清除剖切
clearTilesetClipping() {
if (window.checkAuthIsValid) {
let selectedNode = getSelectedNode(this.treeObj);
if (
!selectedNode ||
!(
selectedNode.source_type === "tileset" ||
selectedNode.source_type === "bim"
)
) {
return;
}
let tileset = _entityMap.get(selectedNode.source_id + "pouqie");
tileset.destroy();
_entityMap.delete(selectedNode.source_id + "pouqie");
} else {
this.$message({
message: "您没有该功能的权限",
type: "warning",
});
}
// if (window.checkAuthIsValid) {
// let selectedNode = getSelectedNode(this.treeObj);
// if (
// !selectedNode ||
// !(
// selectedNode.source_type === "tileset" ||
// selectedNode.source_type === "bim"
// )
// ) {
// return;
// }
// let tileset = _entityMap.get(selectedNode.source_id + "pouqie");
// tileset.destroy();
// _entityMap.delete(selectedNode.source_id + "pouqie");
// } else {
// this.$message({
// message: "您没有该功能的权限",
// type: "warning",
// });
// }
YJ.Analysis.ClearSection();
},
//飞行漫游
path() {
@ -1285,8 +1292,9 @@ const secondMenuFun = {
// 光照
illumination(item) {
item.status = !item.status;
YJ.Global.efflect.illumination(window.Earth1, item.status);
// item.status = !item.status;
// YJ.Global.efflect.illumination(window.Earth1, item.status);
let layer2 = new YJ.Global.efflect.Sunshine(window.Earth1, { id: 123 });
},
//投影面积
@ -1355,13 +1363,17 @@ const secondMenuFun = {
if (window.multiViewportMode) {
processBase64Images(res, res2, (mergedBase64) => {
this.downloadScreen(mergedBase64);
window.multiViewportMode = false;
});
} else {
let doms = document.querySelectorAll(".cesium-widget");
let leftWidth = doms[0].offsetWidth;
let rightWidth = doms[1].offsetWidth;
combineBase64Images(res2,leftWidth, res, rightWidth)
.then((result) => this.downloadScreen(result))
combineBase64Images(res2, leftWidth, res, rightWidth)
.then((result) => {
this.downloadScreen(result)
window.splitScreen = false;
})
.catch((err) => console.error("拼接失败:", err));
}
} else {
@ -1372,7 +1384,7 @@ const secondMenuFun = {
this.downloadScreen(res);
}
},
// 截图下载
downloadScreen(res) {
let base64 = res.replace(/^data:image\/\w+;base64,/, "");
@ -1389,7 +1401,9 @@ const secondMenuFun = {
});
});
},
HDScreenHD() {
HDScreenHD(item, list) {
let splitScreen = list[5].list.find((item) => item.name == "splitScreen");
splitScreen.status = false;
YJ.Global.ScreenShotHD(window.Earth1);
},
//路径规划
@ -1456,7 +1470,7 @@ const secondMenuFun = {
let time = 3;
this.$changeComponentShow("#secondMenu", false);
// const onKeyDown = (e) => {
// if (e.keyCode === 27) {
// item.status = !item.status;
// $sendElectronChanel("endRecoder");
@ -1818,6 +1832,37 @@ const secondMenuFun = {
YJ.Global.splitScreen.off(window.Earth1);
}
},
// 飞线
flyLine() {
// let layer2 = new YJ.Obj.FlowLine(window.Earth1, {id: Math.random(),})
// console.log('layer2',layer2)
let Draw = new YJ.Draw.DrawPolygon(window.Earth1);
Draw.start((err, positions) => {
let source_id = this.$md5(new Date().getTime() + "飞线");
let option = {
id: source_id,
positions,
};
let DbOption = {
source_id,
source_name: "飞线",
source_type: "flyLine",
p_id: findParentId(this.treeObj),
};
let detailOption = JSON.parse(JSON.stringify(option));
let node = getNodeData(DbOption, detailOption);
renderFlyLine(node);
addSource(node).then((res) => {
if ([0, 200].includes(res.code)) {
cusAddNodes(this.treeObj, DbOption.p_id, [node]);
}
});
});
},
// 全局等高线
qcontour() {
YJ.Global.Contour(window.Earth1);
},
},
};
export default secondMenuFun;

View File

@ -1,7 +1,7 @@
<template>
<div class="left_second" id="secondMenu" style="color: #fff" ref="secondMenu">
<!--二级菜单背景图-->
<!-- <svg-icon :class-name="['left_second_menu_bg']" icon-class="secondMenuBg"></svg-icon> -->
<svg-icon :class-name="['left_second_menu_bg']" icon-class="secondMenuBg"></svg-icon>
<!--菜单列表-->
<div class="menus_box">
<div v-for="item in currentItem" @click.right="item.rightfun(item)" @click="item.fun(item)" class="menus_item"
@ -760,7 +760,6 @@ export default {
svg: "goodsSearchCircle",
//
isMoveIn: false,
af
},
//
{

View File

@ -191,8 +191,6 @@ const test = {
});
},
map2d() {
window.multiViewportMode = true;
window.splitScreen = false
console.log('window.splitScreen',window.splitScreen,'window.multiViewportMode',window.multiViewportMode);
// 判断window.menuList是否存在
if (window.checkAuthIsValid) {
@ -201,7 +199,6 @@ const test = {
tool.forEach((item) => {
if (item.name == "splitScreen") {
if (item.status == true) {
item.status = false;
this.halfEarth = false;
}
@ -212,8 +209,11 @@ const test = {
if (this.halfEarth) {
YJ.Global.multiViewportMode.on(window.Earth1);
window.multiViewportMode = true;
window.splitScreen = false
} else {
YJ.Global.multiViewportMode.off(window.Earth1);
window.multiViewportMode = false;
}
} else {
this.$message({

View File

@ -170,6 +170,24 @@ const rightMenuOption = {
layerToBottom() {
this.layerIndex("layerToBottom");
},
getLastPathComponent(path, extensionsToRemove = []) {
// 处理路径分隔符
const normalizedPath = path.replace(/\\/g, '/');
const lastComponent = normalizedPath.split('/').pop();
// 如果没有提供需要移除的后缀列表,直接返回原始名称
if (extensionsToRemove.length === 0) return lastComponent;
// 检查是否匹配任何需要移除的后缀
for (const ext of extensionsToRemove) {
const extWithDot = ext.startsWith('.') ? ext : `.${ext}`;
if (lastComponent.endsWith(extWithDot)) {
return lastComponent.slice(0, -extWithDot.length);
}
}
return lastComponent;
},
//添加bim
addBIM(path) {
let draw = new YJ.Draw.DrawPoint(window.Earth1);
@ -178,7 +196,7 @@ const rightMenuOption = {
if (err) throw err;
// this.openDirectoryDialog(option, paths => {
let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id");
let name = getNamefromPath(path);
let name = this.getLastPathComponent(path);
let source_type = "tileset";
let params = {
source_name: name,
@ -852,8 +870,8 @@ const rightMenuOption = {
this.$recvChanel("linkFileData", (list) => {
list.forEach((item) => {
arr.push({
name: "链接" + (arr.length + 1),
url: item.url,
name: "链接",
url: item.url,
});
});
editNode.attributeLink = arr;
@ -887,7 +905,7 @@ const rightMenuOption = {
}
paths.forEach((item) => {
arr.push({
name: "链接" + (arr.length + 1),
name: "链接" ,
url: item,
});
});
@ -910,7 +928,7 @@ const rightMenuOption = {
this.$removeChanel("panoramaFileData");
list.forEach((item) => {
arr.push({
name: "全景" + (arr.length + 1),
name: "全景" ,
url: item.url,
});
});
@ -942,7 +960,7 @@ const rightMenuOption = {
}
paths.forEach((item) => {
arr.push({
name: "全景" + (arr.length + 1),
name: "全景" ,
url: item,
});
});

View File

@ -138,12 +138,20 @@ export default {
// filePaths数组中包含图片类型(区分大小写)和其他类型区分开
this.picturePaths = [];
this.otherPaths = [];
// filePaths.forEach((item) => {
// if (item.endsWith(".png") || item.endsWith(".jpg") || item.endsWith(".jpeg") || item.endsWith(".PNG") || item.endsWith(".JPG") || item.endsWith(".JPEG")) {
// this.picturePaths.push(item);
// } else if (item.endsWith(".kml") || item.endsWith(".kmz") || item.endsWith(".czml") || item.endsWith(".geojson") || item.endsWith(".shp") || item.endsWith(".tab") || item.endsWith(".csv") || item.endsWith(".mif") || item.endsWith(".clt") || item.endsWith(".pak") || item.endsWith(".jct") || item.endsWith(".terrain") || item.endsWith(".bim") || item.endsWith(".json")) {
// this.otherPaths.push(item);
// } else {
// this.$message.error("不支持的文件类型!");
// }
// });
filePaths.forEach((item) => {
// 转换为小写
item = item.toLowerCase();
if (item.endsWith(".png") || item.endsWith(".jpg") || item.endsWith(".jpeg")) {
// 使用正则表达式进行不区分大小写的匹配
if (/\.(png|jpg|jpeg)$/i.test(item)) {
this.picturePaths.push(item);
} else if (item.endsWith(".kml") || item.endsWith(".kmz") || item.endsWith(".czml") || item.endsWith(".geojson") || item.endsWith(".shp") || item.endsWith(".tab") || item.endsWith(".csv") || item.endsWith(".mif") || item.endsWith(".clt") || item.endsWith(".pak") || item.endsWith(".jct") || item.endsWith(".terrain") || item.endsWith(".bim") || item.endsWith(".json")) {
} else if (/\.(kml|kmz|czml|geojson|shp|tab|csv|mif|clt|pak|jct|terrain|bim|json|mbtiles)$/i.test(item)) {
this.otherPaths.push(item);
} else {
this.$message.error("不支持的文件类型!");
@ -265,15 +273,36 @@ export default {
cusAddNodes(this.$parent.treeObj, DbOption.p_id, [item]);
});
}
).catch((err) => {
this.$message.error("导入失败!", err);
});
)
// .catch((err) => {
// this.$message.error("导入失败!", err);
// });
},
getLastPathComponent(path, extensionsToRemove = []) {
// 处理路径分隔符
const normalizedPath = path.replace(/\\/g, '/');
const lastComponent = normalizedPath.split('/').pop();
// 如果没有提供需要移除的后缀列表,直接返回原始名称
if (extensionsToRemove.length === 0) return lastComponent;
// 检查是否匹配任何需要移除的后缀
for (const ext of extensionsToRemove) {
const extWithDot = ext.startsWith('.') ? ext : `.${ext}`;
if (lastComponent.endsWith(extWithDot)) {
return lastComponent.slice(0, -extWithDot.length);
}
}
return lastComponent;
},
// 添加资源
addResource(filePaths) {
let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id");
filePaths.forEach((item) => {
let name = getNamefromPath2(item);
console.log('item', item);
let name = this.getLastPathComponent(item,['clt','json','pak','kml','kmz','shp','geojson','geoJson', 'czml','jct','mif','tab','csv']);
console.log("name", name);
let source_type = "layer";
if (item.endsWith(".clt") || item.endsWith(".json")) {
@ -512,74 +541,70 @@ export default {
if (way == "net") {
treeSearchCb("");
this.loading = true;
this.loadAmp((err = "") => {
// console.log("isOnline", this.isOnline);
if (err) {
this.$message.error("无网络连接,请检查网络");
} else {
this.mapModule.plugin(
["AMap.PlaceSearch", "AMap.AutoComplete"],
() => {
// var auto = new AMap.AutoComplete(autoOptions);
let placeSearch = new AMap.PlaceSearch(); //构造地点查询类
var autoComplete = new AMap.AutoComplete();
try {
placeSearch.search(
$("#keyword")
.val()
.trim(),
(status, result) => {
// console.log("高德地图----------", status, result);
if (result.info && result.info === "OK") {
let arr = [];
result.poiList.pois.forEach((item, index) => {
const location = YJ.CoordTransform.GCJ02ToWGS84(
item.location.lng,
item.location.lat
);
arr.push({
address: item.name,
search_key: item.name,
search_type: item.id,
lat: location[1],
lng: location[0],
});
const doSearch = () => {
this.mapModule.plugin(
["AMap.PlaceSearch", "AMap.AutoComplete"],
() => {
this.placeSearch = new AMap.PlaceSearch();
try {
this.placeSearch.search(
$("#keyword").val().trim(),
(status, result) => {
if (result.info && result.info === "OK") {
let arr = [];
result.poiList.pois.forEach((item) => {
const location = YJ.CoordTransform.GCJ02ToWGS84(
item.location.lng,
item.location.lat
);
arr.push({
address: item.name,
search_key: item.name,
search_type: item.id,
lat: location[1],
lng: location[0],
});
this.poiOptions = arr;
if (this.poiOptions.length) {
this.loading = false;
this.$refs.select1.toggleMenu();
// $("#selectorBox input").focus();
}
} else if (status == "error" || result === 'INVALID_PARAMS') {
this.$message.error("请填写正确的搜索关键字");
this.loading = false;
} else if (status == "error") {
this.$message.error("网络异常");
this.loading = false;
} else {
this.$message.warning("没有搜索结果");
});
this.poiOptions = arr;
if (this.poiOptions.length) {
this.loading = false;
this.$refs.select1.toggleMenu();
}
//
} else if (status == "error" || result === 'INVALID_PARAMS') {
this.$message.error("请填写正确的搜索关键字");
this.loading = false;
} else if (status == "error") {
this.$message.error("网络异常");
this.loading = false;
} else {
this.$message.warning("没有搜索结果");
this.loading = false;
}
);
} catch (e) {
this.loading = false;
// console.log(e);
}
}
);
} catch (e) {
this.loading = false;
}
);
}
});
}
);
};
if (!this.mapModule) {
this.loadAmp((err) => {
if (err) {
this.$message.error("无网络连接,请检查网络");
this.loading = false;
} else {
doSearch();
}
});
} else {
doSearch();
}
} else if (way == "poi") {
let string = $("#keyword")
.val()
.trim();
let string = $("#keyword").val().trim();
if (string)
queryPOI({ key: string }, (res) => {
this.poiOptions = res.list;
// console.log("poiOptions", this.poiOptions);
if (this.poiOptions.length) {
this.$refs.select1.toggleMenu();
}
@ -592,7 +617,7 @@ export default {
this.value = "";
treeSearchCb();
}
}, 300),
}, 500),
loadAmp(cb = () => { }) {
// console.log("loadAmp", AMapLoader);
AMapLoader.reset();

View File

@ -8,14 +8,14 @@ import {
} from "./entityClick";
import { getIP } from "../../utils";
import { getAddress } from "../../utils/request";
import { addPicture } from "../../api/gisAPI";
import { addPicture,updateInfo } from "../../api/gisAPI";
import {
$changeComponentShow,
$recvChanel,
$sendElectronChanel,
$recvElectronChanel,
} from "../../utils/communication";
import { nodeType } from "./treeNode";
import { nodeType,cusUpdateNode } from "./treeNode";
import md5 from "js-md5";
let staticPort = $root_home.$remote.getGlobal("sharedObject").avilablePort;
@ -849,21 +849,31 @@ function renderGroundImage(DbOption) {
option.positions = DbOption.detail.position;
// option.url =
// "file:///C:/Users/YC/Documents/WeChat%20Files/wxid_yq9vyoyz6j1p22/FileStorage/File/2024-09/%E5%86%9B%E6%A0%87%E5%AE%8C%E6%95%B4svg/1%E3%80%81%E5%8D%95%E4%BD%8D%E4%B8%8E%E4%BA%BA%E5%91%98/1%E3%80%81%E5%86%9B%E5%85%B5%E7%A7%8Dsvg/%E6%B5%8B%E7%BB%98%E5%AF%BC%E8%88%AA.svg";
let a = new YJ.Obj.GroundSvg(window.Earth1, option);
let svg = new YJ.Obj.GroundSvg(window.Earth1, option);
console.log("DbOption", DbOption);
if (DbOption.is_load) {
a.load(() => {
a.drag(true);
svg.load(() => {
svg.drag(true,(v)=>{
console.log("vsvg",v);
let obj = {
source_id: DbOption.source_id,
source_name: DbOption.source_name,
detail: JSON.stringify(v),
}
updateInfo(obj,()=>{
cusUpdateNode(obj);
})
});
});
}
a.onClick = () => {
svg.onClick = () => {
leftClick(DbOption);
};
//鼠标右键点击事件
// a.onRightClick = () => {
// rightClick(DbOption)
// }
window._entityMap.set(option.id, a);
window._entityMap.set(option.id, svg);
}
// 模型
async function renderGlb(node) {
@ -1216,6 +1226,33 @@ function renderPicture(node) {
return entity;
}
// 飞线
function renderFlyLine(node) {
console.log("renderEllipse", node);
let nodecopy = JSON.parse(JSON.stringify(node));
if (typeof nodecopy.detail == "string")
nodecopy.detail = JSON.parse(nodecopy.detail);
let option = {
...nodecopy.detail,
id: nodecopy.source_id,
name: nodecopy.source_name,
};
let FlowLine = new YJ.Obj.FlowLine(window.Earth1, option);
//鼠标右键点击事件
FlowLine.onRightClick = () => {
rightClick(nodecopy);
};
//鼠标左键点击事件
FlowLine.onClick = () => {
console.log(123);
leftClick(nodecopy);
};
// cb()
window._entityMap.set(node.source_id, FlowLine);
}
export {
renderPicture,
renderTileset,
@ -1258,4 +1295,5 @@ export {
renderCurve,
renderEllipse,
renderSector,
renderFlyLine
};

View File

@ -39,6 +39,7 @@ import {
renderCurve,
renderEllipse,
renderSector,
renderFlyLine
} from "./renderNode";
import { leftClick, rightClick } from "./entityClick";
import { addPoint } from "@/api/gisAPI";
@ -97,9 +98,9 @@ let get_detail_text = (DetailOption) => {
// hrefs: ""
// },
// near: 2000,
// far: 100000,
// far: 100000,s
speed: 0,
position: DetailOption.position,
positions: DetailOption.positions,
};
return detail;
};
@ -132,7 +133,7 @@ let get_detail_ellipse = (DetailOption) => {
center: DetailOption.center,
semiMajorAxis: DetailOption.semiMajorAxis,
semiMinorAxis: DetailOption.semiMinorAxis,
color: "#ff0000AF",
color: "rgba(255,0,0,0.5)",
};
return detail;
};
@ -148,7 +149,7 @@ let get_detail_sector = (DetailOption) => {
center: DetailOption.center,
startAngle: DetailOption.startAngle,
endAngle: DetailOption.endAngle,
color: "#ff0000AF",
color: 'rgba(255,0,0,0.5)',
};
return detail;
};
@ -168,8 +169,8 @@ let get_detail_line = (DetailOption) => {
// polyline: {
positions: DetailOption.position,
color: "#ff0000AF",
width: 5,
color: "rgba(255,0,0,1)",
width: 3,
type: 0,
close: false,
smooth: false,
@ -243,7 +244,26 @@ let get_detail_panel = (DetailOption) => {
recurrenceSetValue(detail, DetailOption);
return detail;
};
let get_detail_rendezvous = (DetailOption) => {
let detail = {
id: DetailOption.id,
info: {
type: "richText",
text: "",
hrefs: "",
},
// polygon: {
positions: DetailOption.position,
color: 'rgba(255,0,0,0.5)',
width: 5,
type: 0,
// },
show: true,
};
recurrenceSetValue(detail, DetailOption);
return detail;
};
let get_detail_circle = (DetailOption) => {
let detail = {
id: DetailOption.id,
@ -254,7 +274,7 @@ let get_detail_circle = (DetailOption) => {
},
// circle: {
center: DetailOption.center,
color: "#ff0000AF",
color: 'rgba(255,0,0,0.5)',
radius: 5,
// }
};
@ -271,7 +291,7 @@ let get_detail_attackArrow = (DetailOption) => {
hrefs: "",
},
// arrow: {
color: "#ff0000AF",
color: "rgba(255,0,0,0.5)",
positions: DetailOption.position,
// }
};
@ -288,7 +308,7 @@ let get_detail_pincerArrow = (DetailOption) => {
hrefs: "",
},
// arrow: {
color: "#ff0000AF",
color: "rgba(255,0,0,0.5)",
positions: DetailOption.position,
// }
};
@ -376,6 +396,13 @@ let get_detail_tileset = (DetailOption) => {
};
// return DetailOption
};
let get_detail_flyLine = (DetailOption) => {
return {
id: DetailOption.source_id,
positions: DetailOption.positions,
// rotation: [0, 0, 0]
};
};
let get_detail_glb = (DetailOption) => {
return {
id: DetailOption.source_id,
@ -485,7 +512,7 @@ let get_detail_wallStereoscopic = (DetailOption) => {
text: "",
hrefs: "",
},
color: DetailOption.color,
color: 'rgba(255,0,0,1)',
extrudedHeight: DetailOption.extrudedHeight,
height: DetailOption.height,
duration: 3000,
@ -502,7 +529,7 @@ let get_detail_entityWall = (DetailOption) => {
color: DetailOption.color,
cornerType: DetailOption.cornerType,
extrudedHeight: DetailOption.extrudedHeight,
height: DetailOption.height,
height: DetailOption.height,
width: DetailOption.width,
};
};
@ -595,7 +622,7 @@ const nodeType = {
rightMenus: ["edit", "del", "setView", "resetView"],
render: renderBaseMarker,
render2d: renderBaseMarker2d,
detailFun: get_detail_panel,
detailFun: get_detail_rendezvous,
allowChildren: false,
},
circle: {
@ -980,6 +1007,18 @@ const nodeType = {
detailFun: get_detail_sector,
allowChildren: false,
},
// 飞线
flyLine:{
rightMenus: [
"edit",
"del",
// "setView",
// "resetView" /*"setView", "resetView"*/,
],
render: renderFlyLine,
detailFun: get_detail_flyLine,
allowChildren: false,
}
// renderStandText
};
@ -994,6 +1033,7 @@ const nodeType = {
* @return {{tree_index: number, rich_text: string, layer_index: number, source_type: string, source_id: string, detail: string, source_path: string, source_name: string, is_show: number, p_id: string}}
*/
let getNodeData = (DbOption = { source_type: "point" }, DetailOption = {}) => {
console.log("DbOptionDbOptionDbOption", );
if (!DbOption.source_id)
DbOption.source_id = $root_home.$md5(
new Date().getTime() + dbStruct.source_name
@ -1002,6 +1042,7 @@ let getNodeData = (DbOption = { source_type: "point" }, DetailOption = {}) => {
{ source_type: DbOption.source_type, source_id: DbOption.source_id },
DetailOption
);
console.log('detail',detail);
DbOption.detail = detail;
let Node = setDbStruct(DbOption);
console.log("getNodeData", Node);
@ -1029,6 +1070,8 @@ function recurrenceSetValue(detail, DetailOption) {
* @return {string}
*/
function setDetail({ source_type, source_id }, DetailOption) {
console.log("DetailOption", DetailOption);
DetailOption.id = source_id;
/* let jsStr = "(get_detail_" + source_type + "(DetailOption))";

View File

@ -528,8 +528,11 @@ const tree = {
* @param treeNode
*/
onDblClick(event, treeId, treeNode) {
console.log("双击文件夹");
console.log("双击文件夹",treeNode);
let entity = window._entityMap.get(treeNode.source_id);
// if (!entity) {
// this.$message.warning("无资源数据");
// }
//飞行漫游
if (treeNode.source_type === "roam") {
this.$message("单击鼠标右键可结束当前漫游");

View File

@ -311,7 +311,7 @@ export default {
if (this.title == "创建新航线") {
routerAdd({
filename: this.form.value1,
remark: this.info.remark,
// remark: this.info.remark,
flag: this.gateWay.gateway,
globalPointHeight: this.form.value2,
}).then((res) => {

View File

@ -127,6 +127,17 @@
<img src="../../images/shanchu.png" alt="" />
</span>
</el-tooltip>
<!-- 计划库 -->
<el-tooltip class="item" content="合并" effect="dark">
<span style="display: inline-block;cursor: pointer;" @click="hebing(scope.row)">
合并
</span>
</el-tooltip>
<el-tooltip class="item" content="获取大图" effect="dark">
<span style="display: inline-block;cursor: pointer;" @click="getFileByflightId(scope.row)">
获取大图
</span>
</el-tooltip>
</div>
</template>
</el-table-column>
@ -224,6 +235,8 @@ import {
flightTaskUndoNew,
delMissionsNew,
returnHomeNew,
mergeImages,
getMergeImages
} from "@/api/air.js";
import { getLocal, parseTime } from "@/utils/index.js";
import {
@ -364,6 +377,38 @@ export default {
},
methods: {
// 合并大图
hebing(item) {
mergeImages({
gateway: item.gateway,
flightId: item.flightId
}).then((res) => {
console.log(res);
})
},
// 获取大图
getFileByflightId(item) {
getMergeImages({ taskId: 'c01cc33b-bf50-4d02-9e80-3b52d3d720b6' }).then(res => {
console.log(res);
this.$message.info(res.msg)
if (res.data) {
let { bounds, tiles } = res.data
this.AddXyz([bounds[0],bounds[1]],tiles[0])
}
})
},
AddXyz(center,url) {
let viewer = window.Earth1.viewer
var osmProvider = new Cesium.UrlTemplateImageryProvider({
url: url
});
viewer.imageryLayers.addImageryProvider(osmProvider);
// viewer.camera.setView({
// destination: Cesium.Cartesian3.fromDegrees(center[0], center[1].lat, 600)
// });
},
allApi() {
this.getAirRouteList();
this.getQuestRecordList();

View File

@ -3,6 +3,8 @@
<div class="head_title">
远程控制 {{ setDroneStatus(1) }}
{{ setDroneStatus(2) }}
<!-- <button @click="openRedTemp()">开启红温</button> -->
<div class="rihgt_close">
<div>
<img src="./icons/close1.png" alt="" srcset="" />
@ -1046,6 +1048,25 @@ export default {
{ immediate: true } // 立即执行一次
);
},
// openRedTemp(){
// let gateway = JSON.parse(getLocal("airGateway")).gateway;
// let obj = {
// params: {
// payload_index: this.Drone.cameraIndex,
// mode:2
// },
// gateway,
// method: "ir_metering_mode_set",
// };
// hasDataFlight(obj).then((res) => {
// if (res.code == 200) {
// this.$message.success(res);
// // this.AuthorityGrab = true;
// }
// });
// }
},
};
</script>

View File

@ -285,15 +285,16 @@ export default {
this.$changeComponentShow(".textModelBox", true);
this.$recvChanel("textModelContent", (data) => {
let selectedNode = getSelectedNode(that.treeObj);
let draw = new YJ.Draw.DrawPoint(window.Earth1);
let draw = new YJ.Draw.DrawPolyline(window.Earth1,{number:2});
if (data == null) {
this.$offChanel('textModelContent')
return;
}
draw.start((err, params) => {
console.log("params", params);
if (params != undefined) {
let option = {
position: params,
positions: params,
text: data.text,
};
let source_id = that.$md5(new Date().getTime() + data.text);

View File

@ -160,7 +160,7 @@ export default {
}, index * itemDelay);
});
// bottom_left
bottom_left.style.right = '24vw';
bottom_left.style.right = '18vw';
bottom_left.style.transform = 'rotate(270deg)';
} else {
//
@ -193,7 +193,7 @@ export default {
}
} else {
let selectedNode = getSelectedNode(this.treeObj);
if (selectedNode) {
// if (selectedNode) {
if (option.source_type == "groundText") {
this.groundText();
} else if (option.source_type == "standText") {
@ -201,9 +201,9 @@ export default {
} else {
this.draw(option);
}
} else {
this.$message.warning("请在图层指挥舱中选中对应图层添加");
}
// } else {
// this.$message.warning("");
// }
}
},
//

View File

@ -58,7 +58,7 @@ export default {
close() {
this.$changeComponentShow(".adddirectory", false);
},
submit() {
submit: _.debounce(function () {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.add();
@ -66,10 +66,10 @@ export default {
return false;
}
});
},
}, 500),
add() {
console.log(window.treeObj);
let p_id = getKeyOfSelectedNode(window.treeObj, "source_id");
let fnone = getSelectedNode(window.treeObj);
let option = {
source_name: this.form.source_name,
source_id: this.$md5(new Date().getTime() + "图层"),
@ -85,7 +85,19 @@ export default {
max_tree_index = item.tree_index;
}
});
node.tree_index = max_tree_index + 1;
if (fnone) {
if (fnone.children && fnone.children.length > 0) {
let max_tree_index = 0;
fnone.children.forEach(item => {
if (item.tree_index > max_tree_index) {
max_tree_index = item.tree_index;
}
});
node.tree_index = max_tree_index + 1;
}
} else {
node.tree_index = max_tree_index + 1;
}
// node.tree_index = tree_index;
addSource(node).then((res) => {
cusAddNodes(

View File

@ -14,12 +14,12 @@
</div>
<div class="name">
<span>经度</span>
<el-input type="number" size="small" class="public" @input="(val) => lngNum(val)" v-model="lng" :max="180"
<el-input size="small" class="public" @input="(val) => lngNum(val)" v-model="lng" :max="180"
:min="-180" />
</div>
<div class="name">
<span>纬度</span>
<el-input type="number" size="small" class="public" @input="(val) => latNum(val)" v-model="lat" :max="90"
<el-input size="small" class="public" @input="(val) => latNum(val)" v-model="lat" :max="90"
:min="-90" />
</div>
<div class="name">
@ -42,11 +42,11 @@
</div>
<div class="name">
<span>x</span>
<input type="number" class="public" v-model="x" />
<el-input size="small" class="public" v-model="x" />
</div>
<div class="name">
<span>y</span>
<input type="number" class="public" v-model="y" />
<el-input size="small" class="public" v-model="y" />
</div>
<div class="name">
<span>定位</span>

View File

@ -6,9 +6,13 @@
<span>{{ date.ymd }}</span>
<span>{{ $t("headerTitles.week")[date.week] }}</span>
<span>{{ batteryInfo }}</span>
<div @click="openWeather">
<svg-icon style="width: 20px;height: 20px;cursor: pointer;" icon-class="weather" ></svg-icon>
</div>
</div>
<setTool ref="setTool"></setTool>
<systemPopup ref="systemPopup" v-if="showSystem"></systemPopup>
<weather ref="weather"></weather>
<!-- <headButton class="headButton"></headButton> -->
</div>
</template>
@ -20,12 +24,14 @@ import setTool from "./setTool/setTool.vue";
import systemPopup from "./systemPopup/systemPopup.vue";
// btn
// import headButton from "./headButton/buttonMenu.vue";
import weather from "./weather/index.vue";
export default {
name: "index",
components: {
setTool,
systemPopup,
weather
// headButton
},
@ -73,6 +79,9 @@ export default {
});
},
methods: {
openWeather(){
this.$changeComponentShow(".my_weather", true);
},
setTime() {
let date = new Date();
let year = date.getFullYear();

View File

@ -2,15 +2,17 @@
<div class="header_top">
<!-- <svg-icon icon-class="Head" :class-name="['headItem']"></svg-icon> -->
<!-- <div :style="{
background: `url('../../assets/images/shijing/${skinInfo}/head.png') no-repeat`,
// background: `url('../../assets/images/new.png') no-repeat`,
bankgroundSize: '100% 100%',
// background: `url('../....//assets/images/shijing/${skinInfo}/head.png')`,
background: `url('../....//assets/images/shijing/${skinInfo}/head.png')`,
width: '100%',
height: '96px'
}"></div> -->
<div class="head_box">
<!-- <span class="head_title">{{ $t("title.name") }}</span> -->
<!-- <img width="100%" height="100%" :src="require('@/assets/images/jiangjin/' + skinInfo + '/head.png')" alt="" /> -->
<span class="head_title">实景三维电子沙盘系统</span>
<img width="100%" height="100%" :src="require('@/assets/images/jiangjin/' + skinInfo + '/head.png')" alt="" />
<img width="100%" height="100%" :src="require('@/assets/images/new.png')" alt="" />
</div>
<div class="dateTime">
<span>{{ date.hms }}</span>

View File

@ -0,0 +1,437 @@
<template>
<div class="model">
<div class="model-btn">
<el-button @click="createLib('model')" type="warning" size="small">
{{ $t("headerTitles.model.createModelLibrary") }}
</el-button>
<el-button @click="selectLib('model')" type="primary" size="small">
{{ $t("headerTitles.model.selectModelLibrary") }}
</el-button>
<el-button @click="addModelTypeF" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.addModelType") }}
</el-button>
<el-tooltip class="item" effect="dark" content="选中了类型为其上级,未选中则为根目录" placement="right">
<i class="el-icon-question" style="color: #b6e4ff" title="7"></i>
</el-tooltip>
<el-button @click="addModelF" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.importModel") }}
</el-button>
<el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">
{{ $t("headerTitles.model.editModel") }}
</el-button>
<el-button @click="delModelTypes()" type="warning" size="small">
{{ $t("headerTitles.model.deleteModel") }}
</el-button>
</div>
<div class="model-content">
<div class="model-tree">
<div class="modelType " style="position: relative;">
<template v-if="modelLoading">
<div class="parentBox">
<div class="containerBox">
<div class="canvasBox">
<div class="spinnerSexBox p1"></div>
<div class="spinnerSexBox p2"></div>
<div class="spinnerSexBox p3"></div>
<div class="spinnerSexBox p4"></div>
</div>
</div>
</div>
</template>
<template v-else>
<div style="font-size: 16px;margin-left: 4px;margin-top: 4px">
类型列表
</div>
<div class="typeBox custom_scroll_bar">
<template v-if="modelTypeList.length > 0">
<el-tree :data="modelTypeList" :props="modelLabelProps" :expand-on-click-node="false"
ref="myTree" node-key="type_id" highlight-current accordion
@node-click="modelLabelClick">
</el-tree>
</template>
<template v-else>
无军标类型<br />请先添加军标类型
</template>
</div>
</template>
</div>
</div>
<div class="model-table">
<el-table border :data="modelTableData" style="width: 95%" :row-class-name="tableRowClassName">
<el-table-column type="index" label="序号" width="35" align="center">
</el-table-column>
<el-table-column prop="model_name" label="名称" :width="calcsWidth({ label: '名称' })" align="center">
</el-table-column>
<el-table-column label="缩略图" width="110" align="center">
<template slot-scope="scope">
<el-image style="width: 40px; height: 40px"
:src="scope.row.poster_url + '?' + Math.random()"
:preview-src-list="[scope.row.poster_url]">
</el-image>
</template>
</el-table-column>
<el-table-column prop="type" label="操作" align="center">
<template slot-scope="scope">
<el-button @click="preview(scope.row)" type="warning" size="mini">
{{ $t("headerTitles.model.preview") }}
</el-button>
<el-button @click="updatePoster1(scope.row)" type="warning" size="mini">
{{ $t("headerTitles.model.updatePoster") }}
</el-button>
<el-button @click="delModel(scope.row.model_id)" type="danger" size="mini">
{{ $t("headerTitles.model.deleteModel") }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="model-url">
</div>
</div>
</template>
<script>
import { addModel, createModel, importModel, getModelType, addModelType, editModelType, delModelType, updatePoster, delModel } from '../../../../../api/gisAPI';
import { calcWidth } from "@/utils";
export default {
name: 'model',
data() {
return {
modelLoading: false,
selectedModelType: '',
modelTypeList: [],
modelTableData: [],
modelLabelProps: {
id: "type_id",
children: "sonNode",
label: "type_name",
}
};
},
mounted() {
this.getModelTypeList()
},
methods: {
getModelTypeList() {
getModelType((res) => {
console.log("", res);
this.modelTypeList = res.list;
setTimeout(() => {
this.modelLoading = false;
});
this.selectedModelType = res.list.length ? res.list[0].type_id : "";
this.modelTableData = res.list.length ? res.list[0].children : [];
});
},
// 创建模型库
createLib() {
let option = {
title: "创建模型库",
filename: "YJEarth.model",
filters: [{ name: "保存库文件", extensions: ["model"] }],
};
this.$sendElectronChanel("saveFile", option);
this.$recvElectronChanel("selectedFileItem", (e, path) => {
console.log(path);
if (path) {
let index = path.lastIndexOf("/");
let model_lib_path = path.slice(0, index);
let model_lib_name = path.slice(index + 1);
createModel({ model_lib_name, model_lib_path }, (res) => {
this.initModelData(path);
});
}
});
},
// 创建模型
initModelData(path) {
this.modelLoading = true;
importModel({ model_lib_path: path }, (res) => {
this.$store.dispatch("changeModelLibPath", path);
this.getModelTypeList();
});
},
// 模型库选择
selectLib() {
let option = {
properties: ["openFile"],
filters: [
{
name: '模型库', //、底图
extensions: ['model'],
},
],
};
this.$sendElectronChanel("open-directory-dialog", option);
this.$recvElectronChanel("selectedItem", (e, path) => {
if (path.length) this.initModelData(path[0]);
});
},
// 模型类型选择
addModelF() {
// 需获取模型列表后,并选中一项后
if (this.selectedModelType) {
let option = {
properties: ["openFile", "multiSelections"],
filters: [
{
name: "人工模型",
extensions: ["glb", "gltf"],
},
],
};
this.$sendElectronChanel("open-directory-dialog", option);
this.$recvElectronChanel("selectedItem", (e, paths) => {
if (paths.length) {
addModel(
{ model_paths: paths, p_id: this.selectedModelType },
(res) => {
this.getModelTypeList();
}
);
}
});
} else this.$message.warning("请选择一项类型");
},
addModelTypeF() {
this.$prompt("请输入模型类型", "添加模型类型", {
confirmButtonText: "确定",
inputPattern: /^[^\s]+$/,
inputErrorMessage: "请输入非空字符串",
cancelButtonText: "取消",
}).then(({ value }) => {
addModelType({ type_name: value }, (res) => {
this.modelTypeList.push({
type_name: value,
type_id: res.type_id,
children: [],
});
});
}).catch(() => {
/*this.$message({
type: 'info',
message: '取消输入'
});*/
});
},
//删除模型类型
delModelTypes() {
if (!this.selectedModel) {
this.$message.warning("请选择模型节点!");
return;
}
let type_id = this.selectedModel.type_id;
this.$confirm("此操作会删除该类型及其对应的模型,是否继续?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
delModelType({ type_id }, (res) => {
this.modelTypeList = this.modelTypeList.filter(
(item) => item.type_id !== type_id
);
this.modelTableData = [];
});
}).catch(() => { });
},
// 模型类型编辑
//编辑模型类型
editModelTypes() {
if (!this.selectedModel) {
this.$message.warning("请选择模型节点!");
return;
}
let type_id = this.selectedModel.type_id,
type_name = this.selectedModel.type_name;
this.$prompt("请输入模型类型", "修改模型类型", {
confirmButtonText: "确定",
cancelButtonText: "取消",
inputValue: type_name,
}).then(({ value }) => {
editModelType({ type_name: value, type_id }, (res) => {
this.modelTypeList.forEach((item) => {
if (item.type_id == type_id) {
item.type_name = value;
}
});
});
}).catch(() => {
/*this.$message({
type: 'info',
message: '取消输入'
});*/
});
},
// 树节点点击事件
modelLabelClick(data, event) {
if (this.selectedGraphLabelType == data.type_id) {
this.graphTableData = [];
this.$nextTick(() => {
this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
});
this.selectedGraphLabelType = null;
} else {
this.selectedGraphLabelType = data.type_id;
this.graphTableData = data.children || [];
}
},
// 预览
preview(row) {
this.$changeComponentShow("#scene", true);
this.$sendChanel("openView3d", row);
},
// 更新图片
updatePoster1(row, flag = false, path = "") {
let that = this;
console.log("row++++++++++++++++++++++");
console.log(path);
console.log(row);
let cb = (c) => {
let formData = new FormData();
formData.append("model_id", row.model_id);
formData.append("file", c);
updatePoster(formData)
.then((res) => {
if ([0, 200].includes(res.code)) {
that.$message({
type: "success",
message: "更新成功",
});
row.poster_url = "";
console.log("row.poster_url", res.data.url);
this.$nextTick(() => {
row.poster_url = res.data.url + "?" + Math.random();
});
this.$sendChanel("updatePosterComplete", res);
}
})
.catch((err) => {
console.log(err);
this.$sendChanel("updatePosterComplete", err);
});
};
if (!flag) {
let option = {
properties: ["openFile"],
filters: [
{
name: "图片",
extensions: ["png", "jpg", "jpeg"],
},
],
};
this.$sendElectronChanel("open-directory-dialog", option);
this.$recvElectronChanel("selectedItem", (e, paths) => {
if (paths.length) {
console.log(paths[0]);
// 取出路径中的文件名
let name = getNamefromPath(paths[0]);
// 读取文件
fs.readFile(paths[0], (err, data) => {
const blob = new Blob([data], {
type: "image/png, image/jpeg, image/jpg",
});
var file = new File([blob], `${name}` + ".png");
cb(file);
});
// cb(paths[0]);
}
});
} else {
cb(path);
}
},
delModelF(model_id) {
let msg = "确定删除?";
this.$confirm(msg, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
delModel({ model_id }, (res) => {
//刷新当前页
this.modelTableData = this.modelTableData.filter(
(item) => item.model_id !== model_id
);
this.getModelTypeList();
});
}).catch(() => { });
},
importModelEnable() {
return ["", null, "null"].includes(this.modelLibPath);
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex === 1) {
return "warning-row";
} else if (rowIndex === 3) {
return "success-row";
}
return "";
},
calcsWidth(row) {
return calcWidth(row);
},
},
};
</script>
<style lang="scss">
.model-content {
display: flex;
.model-table{
flex: 1;
}
}
.model-btn{
margin-bottom: 10px;
}
.modelList {
display: flex;
.modelType {
background: #fff;
width: 150px;
.typeBox {
margin-top: 5px;
height: 250px;
overflow-y: auto;
.typeItem {
padding: 3px 0 3px 10px;
color: #0c0d0e;
display: flex;
align-items: center;
justify-content: space-between;
.label {
width: 70%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btns {
cursor: pointer;
}
}
}
.selectedModelTypeCss {
background: rgba(230, 242, 255, 0.93);
.label {
color: #409eff !important;
}
}
}
}
</style>

View File

@ -279,12 +279,13 @@
<el-tab-pane :label="$t('headerTitles.equipment.title')">
<equipment />
</el-tab-pane>
<!-- 无人机配置 -->
<!-- 无人机配置 v-if="false" -->
<el-tab-pane v-if="false" :label="$t('headerTitles.air.title')">
<Air />
</el-tab-pane>
<!-- 模型管理 -->
<el-tab-pane :label="$t('headerTitles.model.title')">
<!-- <model></model> -->
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('model')" type="warning" size="small">{{
$t("headerTitles.model.createModelLibrary") }}
@ -486,124 +487,6 @@
</template>
</div>
</el-tab-pane>
<!-- <el-tab-pane :label="$t('headerTitles.graphLabel.title')">
<div class="modelBtn">
<el-button @click="createModel" type="warning" size="small">{{
$t('headerTitles.model.createModelLibrary')
}}
</el-button>
<el-button @click="selectModel" type="primary" size="small">{{
$t('headerTitles.model.selectModelLibrary')
}}
</el-button>
<el-button @click="addModel" :disabled="importModelEnable()" type="success" size="small">
{{ $t('headerTitles.model.importModel') }}
</el-button>
<el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small">
{{ $t('headerTitles.model.addModelType') }}
</el-button>
</div>
<div class="modelList">
<div class="modelType ">
<div style="font-size: 16px;margin-left: 4px;margin-top: 4px">类型列表:</div>
<div class="typeBox custom_scroll_bar">
<template v-if="modelTypeList.length">
<template v-for="item in modelTypeList">
<div :class="[selectedModelType==item.type_id?'selectedModelTypeCss':'','typeItem']"
@click="selectedModelType=item.type_id">
<div class="label" :title="item.type_name">{{ item.type_name }}</div>
<div class="btns">
<i class="el-icon-edit" style="color: #409eff" @click="editModelTypes(item)"></i>
<i class="el-icon-delete" style="color:#f00;" @click="delModelTypes(item)"></i>
</div>
</div>
</template>
</template>
<template v-else>
无模型类型,<br>请先添加模型类型
</template>
</div>
</div>
<el-table
border
:data="modelTableData"
style="width: 100%"
:row-class-name="tableRowClassName">
<el-table-column
type="index"
label="序号"
width="35"
align="center"
>
</el-table-column>
<el-table-column
prop="model_name"
label="名称"
:width="calcsWidth({label:'名称'})"
align="center"
>
</el-table-column>
&lt;!&ndash; <el-table-column
prop="model_type"
label="类型"
width="60"
align="center"
>
</el-table-column>&ndash;&gt;
<el-table-column
label="缩略图"
width="110"
align="center">
<template slot-scope="scope">
&lt;!&ndash; :title="scope.row.poster_url"&ndash;&gt;
&lt;!&ndash; <img :src="scope.row.poster_url">&ndash;&gt;
<el-image
style="width: 40px; height: 40px"
:src="scope.row.poster_url"
:preview-src-list="[scope.row.poster_url]">
</el-image>
</template>
</el-table-column>
<el-table-column
prop="type"
label="操作"
align="center"
>
<template slot-scope="scope">
<el-button @click="updatePoster(scope.row)" type="warning" size="mini">
{{ $t('headerTitles.model.updatePoster') }}
</el-button>
<el-button type="primary" size="mini">{{ $t('headerTitles.model.updateModel') }}</el-button>
<el-button @click="delModel(scope.row.model_id)" type="danger" size="mini">
{{ $t('headerTitles.model.deleteModel') }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="modelLibPath ">
&lt;!&ndash; <el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
style="align-self: center;"
:current-page="modelListPage"
:page-sizes="[5,10,20,30]"
:page-size="modelListPageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="modelTotal">
</el-pagination>&ndash;&gt;
&lt;!&ndash; </div>&ndash;&gt;
<span class="oneLine" :title="modelLibPath">
模型库地址:{{ modelLibPath }}
</span>
</el-tab-pane> -->
<!-- 军标管理 -->
<!-- v-if="false" 标准版本 -->
<el-tab-pane :label="$t('headerTitles.graphLabel.title')">
@ -651,26 +534,8 @@
</div>
<div class="typeBox custom_scroll_bar">
<template v-if="graphLabelTypeList.length > 0">
<!-- <template v-for="item in graphLabelTypeList">
<div :class="[selectedGraphLabelType==item.type_id?'selectedModelTypeCss':'','typeItem']"
@click="selectedGraphLabelType=item.type_id">
<div class="label" :title="item.type_name">{{ item.type_name }}</div>
<div class="btns">
<i class="el-icon-edit" style="color: #409eff" @click="editGraphLabelTypes(item)"></i>
<i class="el-icon-delete" style="color:#f00;" @click="delGraphLabelTypes(item)"></i>
</div>
</div>
</template>-->
<el-tree :data="graphLabelTypeList" :props="graphLabelProps" :expand-on-click-node="false"
ref="myTree" node-key="type_id" highlight-current accordion @node-click="graphLabelClick">
<!-- <span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span style=" position: absolute;right: 5px;">
<i class="el-icon-edit" style="color: #409eff" @click="() =>editGraphLabelTypes(data)"></i>
<i class="el-icon-delete" style="color:#f00;" @click="() =>delGraphLabelTypes(data)"></i>
</span>
</span>-->
</el-tree>
</template>
<template v-else>
@ -842,6 +707,7 @@ import { calcWidth } from "@/utils";
import { validateCommonText } from "@/utils/validate";
import equipment from "../../PLTraffic/components/manager/equipment/equipment";
import Air from "./components/air/index.vue"
// import model from "./components/modelType/index.vue"
// import {baseURL} from "../../../utils/request";
export default {

View File

@ -0,0 +1,178 @@
<template>
<div class="my_weather" id="my_weather">
<div class="move_pop" id="move_pop">
<!-- <span>{{ $t("headerTitles.weather") }}</span> -->
<span></span>
<span class="close" @click.capture="onClose"></span>
</div>
<div class="weather_content">
<div class="weather_content_hear">
<span class="xian"></span>
<span class="text">天气效果</span>
<span class="text_two">可叠加以下天气类型</span>
</div>
<div class="weather_content_body">
<div class="item_icon" v-for="item in list" @click="item.fun(item)">
<template v-if="item.hasOwnProperty('svg')">
<svg-icon :class-name="['second_menu_icon']" :icon-class="item.svg"></svg-icon>
</template>
<div>
<span :class="['icon_text', !item.status ? '' : 'active']" >{{ $t(`leftMenu.secondMenu.${item.name}`) }}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { setMove } from "../systemPopup/js/moveDiv.js";
import secondMenuFun from "../../LeftMenu/secondMenuFun.js";
export default {
name: "weather",
mixins: [secondMenuFun],
components: {
},
data() {
return {
list: [
// //夜视
// {
// fun: this.toDo,
// name: "nightVision",
// svg: "nightVision",
// status: false,
// },
// 雨
{
fun: this.toDo,
name: "rain",
svg: "rain",
status: false,
},
// 雪
{
fun: this.toDo,
name: "snow",
svg: "snow",
status: false,
},
//雾
{
fun: this.toDo,
name: "fog",
svg: "fog",
status: false,
},
//光照
{
fun: this.toDo,
name: "illumination",
svg: "illumination",
status: false,
},
//星空
{
fun: this.toDo,
name: "skystarry",
svg: "skystarry",
status: false,
},
],
}
},
beforeMount() {
},
mounted() {
setMove("move_pop", "my_weather");
},
methods: {
onClose(){
this.$changeComponentShow(".my_weather", false);
},
toDo(item) {
if (window.checkAuthIsValid) {
if (!item.hasOwnProperty("status"))
this.$changeComponentShow(".left_second", false);
this[item.name](item, this.menuList);
} else {
this.$message({
message: "您没有该功能的权限",
type: "warning",
});
}
},
},
};
</script>
<style lang="scss">
.my_weather {
display: none;
position: fixed;
top: 100px;
left: 280px;
width: 300px;
height: 300px;
z-index: 19;
background: linear-gradient(180deg, rgba(0, 255, 255, 0) 0%, rgba(0, 255, 255, 0.2) 100%), rgba(0, 0, 0, 0.6);
padding: 10px;
border: 1.5px solid aqua;
.move_pop {
position: relative;
color: #fff;
text-align: center;
height: 30px;
line-height: 30px;
.close {
position: absolute;
top: 0;
right: 10px;
cursor: pointer;
}
}
.weather_content_hear {
display: flex;
align-items: center;
margin-bottom: 20px;
span {
margin-right: 10px;
}
.xian {
display: inline-block;
height: 20px;
width: 2px;
background-color: aqua;
}
.text {
color: #fff;
font-family: 'alimamashuheiti';
}
.text_two {
color: rgba(173, 241, 255, 1);
font-size: 12px;
}
}
.weather_content_body {
display: flex;
color: #fff;
justify-content: space-around;
text-align: center;
.item_icon {
width: 32px;
height: 32px;
}
.active {
color: #f00 !important;
}
}
}
</style>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -127,7 +127,7 @@
<fightingDataStyle ref="fightingDataStyle" class="fightingDataStyleBox absolute zIndex99"></fightingDataStyle>
<DTH ref="dth" :host="host" :token="token" class="zIndex99"></DTH>
<!-- 标准版本 无人机 -->
<flyer v-if="flyerDiv" class="flyer"></flyer>
<!-- <flyer v-if="flyerDiv" class="flyer"></flyer> -->
<!-- <flyer2 v-if="flyerDiv2" class="flyer"></flyer2> -->
<!--态势部分-->
<div v-show="!showBigData && !noSituation" class="titles">
@ -287,7 +287,7 @@ import rolePermission from "@/components/myHeaderAll/systemPopup/components/perm
import gant from "../../components/gantt-next/gant.vue";
import modelTransform from "./modelTransform";
import DTH from "@/components/DTH/index";
import flyer from "@/components/UAV2/index";
// import flyer from "@/components/UAV2/index";
// import flyer2 from "@/components/UAV3/index";
import situationList from "@/components/situationList/index.vue";
import deduction from "@/components/TS/deduction.vue";
@ -338,7 +338,7 @@ export default {
deduction,
situationList,
eventEditor,
flyer,
// flyer,
// flyer2,
DTH,
gant,

View File

@ -269,13 +269,16 @@ import DTH from "@/components/DTH/index";
// import flyer from "@/components/UAV2/index";
// import flyer2 from "@/components/UAV3/index";
import situationList from "@/components/situationList/index.vue";
import Deduction from "@/components/newTL/Deduction.vue";
import Deduction from "@/components/TS/deduction.vue";
import cabin from "@/components/situationEdit/cabin.vue";
import elements from "@/components/situationEdit/element.vue";
import nodeType from "@/components/treeNode";
import newEvent from "@/components/Events/newEvent.vue";
import adddirectory from "../../components/dialog/adddirectory.vue";
// import excelSet from "@/components/dialog/excelSet.vue";
import excelSet from "@/components/dialog/excelSet.vue";
import eventEditor from "@/components/TS/eventEditor/index.vue";
import tufuSelect from "@/components/dialog/tufu_select.vue";
import {
getSelectedNode,
getNodeData,
@ -314,6 +317,7 @@ export default {
cabin,
Deduction,
situationList,
eventEditor,
// flyer,
// flyer2,
DTH,
@ -344,7 +348,8 @@ export default {
// richTextEditor
// New,
// WangEditor
// excelSet
excelSet,
tufuSelect
},
data() {
@ -371,8 +376,8 @@ export default {
dialogTableVisible: false,
gisData: [],
multipleSelection: [],
tasks: Store.tasks, //
scales: Store.scales,
// tasks: Store.tasks, //
// scales: Store.scales,
host: localStorage.getItem("service"),
token: getToken(),
skinInfo: JSON.parse(localStorage.getItem("systemSetting")).skinInfo,
@ -441,8 +446,8 @@ export default {
// if (!(this.$store.getters.token))
// handleLogin(this)
//
window.Store = new TSTY.store();
window.Clock = new TSTY.clock();
// window.Store = new TSTY.store();
// window.Clock = new TSTY.clock();
},
mounted() {
// new Notification("", {
@ -748,25 +753,47 @@ export default {
window.currentPlan = plan;
eventList({ plan_id: plan.ID || plan.plan_id }, (res) => {
console.log("eventList", res);
// obj.tasks = res.list;
let arr = [];
res.list.forEach((item) => {
arr.push(window.Store.databaseToTimeline(item));
this.eventLists = res.list
this.eventsList = true;
window.TSTYOBJ = window.TSTY.init({
startTimestamp: plan.plan_create_time,
tasks: this.eventLists,
scales: { preMainIndex: 2 }
});
obj.tasks = arr;
obj.startTimestamp = plan.plan_create_time;
window.Store.initData(obj);
// window.Clock = new TSTY.clock();
this.scales = Store.scales;
this.tasks = Store.tasks;
this.action = window.TSTYOBJ.initAction()
this.TSTYOBJ = window.TSTYOBJ
this.$nextTick(() => {
TSTYOBJ.store.init()
TSTYOBJ.renderLine(this.$nextTick)
TSTYOBJ.renderLabel({ left: 0 })
TSTYOBJ.store.updateTimeLineRightRest()
})
this.showList = !this.showList;
this.editSituation = !this.editSituation;
this.createEarth("earthContainers");
this.eventsList = true;
this.$nextTick(() => {
window.Store.setFullWidth();
});
/*
console.log("eventList", res);
// obj.tasks = res.list;
let arr = [];
res.list.forEach((item) => {
arr.push(window.Store.databaseToTimeline(item));
});
obj.tasks = arr;
obj.startTimestamp = plan.plan_create_time;
window.Store.initData(obj);
// window.Clock = new TSTY.clock();
this.scales = Store.scales;
this.tasks = Store.tasks;
this.showList = !this.showList;
this.editSituation = !this.editSituation;
this.createEarth("earthContainers");
this.eventsList = true;
this.$nextTick(() => {
window.Store.setFullWidth();
});*/
});
},
removeEarth1() {