物理沙盘

This commit is contained in:
zh
2025-11-14 09:42:30 +08:00
parent ce3c39031d
commit 4731610cdf
59 changed files with 1042 additions and 5644 deletions

View File

@ -134,11 +134,13 @@ export default {
return;
}
recorder.end(() => {
console.log('xxxxx')
let path = dialog.showSaveDialogSync({
title: "保存视频文件",
defaultPath: dayjs().format("YYYYMMDDHHmmss") + "视频录制.mp4",
filters: [{ name: "文件类型", extensions: ["mp4"] }],
});
console.log('path', path)
if (path != undefined) {
recorder.move(path, () => {
recorder = null;
@ -313,7 +315,7 @@ export default {
event.sender.send("submitPortRes", port);
});
ipcMain.on("setNodes", (event, val) => {
// console.log("接受到数据", name);
console.log("接受到数据", val);
let msg = sendMsg(val);
event.sender.send("replayRenderer", msg);
});

View File

@ -45,7 +45,7 @@ function runProcess(
})
.on("exit", (err) => {
console.log("out");
console.log(err);
console.log('err', err);
global.sharedObject.hasService = false;
})
.on("stdio", (err, s) => {

View File

@ -60,14 +60,19 @@ class Recorder {
})
.on("data", function(data) {
// console.log(typeof data);
})
.on("data", function(data) {});
});
this.shell.stdout.on('data', (data) => {
});
this.shell.stderr.on('data', (data) => {
});
this.shell.unref();
}
end(cb) {
if (!this.shell.killed) {
console.log(this.shell);
this.shell.stdin.write("q");
this.shell.stdin.write("q\n");
myEmitter.once("process-exit", () => {
cb();
});

View File

@ -3,7 +3,6 @@ import { getmainWindow } from "../../index";
let server;
let Store = require("electron-store");
let store = new Store();
import { logger } from "../log";
let sandTable_udp_server_port = "sandTable_udp_server_port";
function Init() {
if (server) {
@ -23,41 +22,60 @@ function Init() {
);
// logger.info(msg.toString())
// server.send('world', remoteInfo.port, remoteInfo.address)
// ['json','string']
let ModeIndex=1
try {
var s = JSON.parse(msg.toString());
let positions = [];
var str = msg.toString();
//角度
let angle = 45;
if (typeof s == "string") s = JSON.parse(s);
console.log(s);
if(ModeIndex==0){
let s=JSON.parse(str)
if (typeof s == "string") s = JSON.parse(s);
console.log(s);
// if(s.hasOwnProperty("Placemark")){
if (s.Placemark.hasOwnProperty("Point")) {
let arr = s.Placemark.Point.coordinates.split(",");
let position = {
lng: Number(arr[0]),
lat: Number(arr[1]),
alt: Number(arr[2]) || 0,
};
if (arr.length > 2) position.alt = arr[2];
if (arr.length > 3) angle = arr[3];
positions.push(position);
} else
{
let coordinates =
s.Placemark.Polygon.outerBoundaryIs.LinearRing.coordinates;
const parseCoordinates = (coords) => {
return coords.split(" ").map((pair) => {
const [lng, lat] = pair.split(",").map(Number);
return { lng, lat };
});
};
positions = parseCoordinates(coordinates);
}
getmainWindow().webContents.send(
sandTable_udp_server_port,
positions,
angle
);
}else if(ModeIndex==1){
// 点位码
let key=str.slice(0,-1)
// 反馈指令的后缀 K或G
let status=str.split(key)[1]
getmainWindow().webContents.send(
sandTable_udp_server_port+"_str",
key,
status
);
// if(s.hasOwnProperty("Placemark")){
if (s.Placemark.hasOwnProperty("Point")) {
let arr = s.Placemark.Point.coordinates.split(",");
let position = {
lng: Number(arr[0]),
lat: Number(arr[1]),
alt: Number(arr[2]) || 0,
};
if (arr.length > 2) position.alt = arr[2];
if (arr.length > 3) angle = arr[3];
positions.push(position);
} else {
let coordinates =
s.Placemark.Polygon.outerBoundaryIs.LinearRing.coordinates;
const parseCoordinates = (coords) => {
return coords.split(" ").map((pair) => {
const [lng, lat] = pair.split(",").map(Number);
return { lng, lat };
});
};
positions = parseCoordinates(coordinates);
}
getmainWindow().webContents.send(
sandTable_udp_server_port,
positions,
angle
);
// }else{
// console.log("内容不正确");
@ -69,12 +87,16 @@ function Init() {
server.on("error", (err) => {
console.log("server error", err);
});
console.log("port",port)
server.bind(port);
sendMsg("AFFG")
}
function sendMsg(val) {
let msg;
let port = store.get("sandTable_udp_client_port");
let port = store.get("sandTable_udp_client_port")||60000;
let ip = store.get("sandTable_udp_client_host");
server.send(val, port, ip);
return
let num = val.toString().split("");
let swit = Number(num.pop());
if (swit == 1 || swit == 0) {
@ -89,6 +111,7 @@ function sendMsg(val) {
let cntHex = cnt.toString(16);
let switHex = swit.toString(16);
const message = Buffer.from([cntHex, switHex], "hex");
console.log("message",message)
server.send(message, port, ip);
msg = "发送成功";
} else {
@ -117,6 +140,7 @@ function GetUdpServerPort() {
port = server_port;
}
let host = getHostIP();
console.log("GetUdpServerPort",port)
return { port, host };
}
function getHostIP() {

View File

@ -767,7 +767,7 @@ export function queryPOI(
cb
) {
request_get("/api/v1/poi/query", data).then((res) => {
requestCallback(res, cb);
requestCallback(res, cb, false);
});
}
@ -1227,3 +1227,13 @@ export function deleteHeader(data) {
data
});
}
// 查询物资列表
export function getGoodsList(
data = {
page: 1,
page_size: 5,
}
) {
return request_get("/api/v1/goods/list", data);
}

View File

@ -166,7 +166,13 @@ module.exports = {
ConcurrencyControl: "Concurrency Control",
localIP: "Local IP",
localPort: "Local Port",
remoteIP: "Remote IP",
allOpen: "allOpen",
allClose: "allClose",
remotePort: "Remote Port",
weather: "Weather",
Permitconnection: 'Permit connection',
save: 'save',
week: [
"Sunday",
"Monday",

View File

@ -136,11 +136,17 @@ module.exports = {
},
headerTitles: {
systemTitle: "係統面板",
udp: "物理沙",
udp: "物理沙",
ConcurrencyControl: "並發量控制",
localIP: "本地IP",
localPort: "本地端口",
remoteIP: "遠程IP",
allOpen: "全開",
allClose: "全關",
remotePort: "遠程端口",
weather: "天气",
Permitconnection: '允许连接',
save: '保存',
week: [
"星期日",
"星期一",

View File

@ -145,8 +145,12 @@ module.exports = {
localIP: "本地IP",
localPort: "本地端口",
remoteIP: "远程IP",
allOpen: "全开",
allClose: "全关",
remotePort: "远程端口",
weather: "天气",
Permitconnection: '允许连接',
save: '保存',
week: [
"星期日",
"星期一",

View File

@ -620,11 +620,11 @@ export default {
svg: "goodsSearchPolygon",
},
// 战术计算
// {
// fun: this.tacticalCalculation,
// name: "tacticalCalculation",
// svg: "tacticalCalculation",
// },
{
fun: this.tacticalCalculation,
name: "tacticalCalculation",
svg: "tacticalCalculation",
},
// 分屏
],
key: "tool",

View File

@ -13,6 +13,7 @@ import {
queryRoute,
addPicture,
addSituation,
getGoodsList
} from "@/api/gisAPI";
import { getNamefromPath, getIP } from "../../utils";
import {
@ -46,6 +47,9 @@ import {
renderFlyLine,
} from "../Tree/renderNode";
import { shpTotalDict } from "../../api/shpTotalDict";
import { format } from "date-fns";
const FileSaver = require('file-saver')
const XLSX = require('xlsx')
const secondMenuFun = {
data() {
return {
@ -140,9 +144,6 @@ const secondMenuFun = {
}
});
console.log("x,y");
console.log(x);
console.log(y);
let notZeroX = [];
let notZeroY = [];
for (let i = 0; i < y.length; i++) {
@ -151,8 +152,6 @@ const secondMenuFun = {
notZeroY.push(y[i]);
}
}
console.log(notZeroX);
console.log(notZeroY);
x = notZeroX;
y = notZeroY;
if (!x.length) $root_home_index.goodSearchDialog = false;
@ -292,6 +291,52 @@ const secondMenuFun = {
option.xAxis.data = x;
option.series[0].data = y;
myChart.setOption(option);
let goodSearchDom = document.getElementsByClassName("goodSearch")[0];
if (goodSearchDom) {
let btn = goodSearchDom.getElementsByClassName("export-btn")[0];
btn.onclick = async () => {
let excelData = [
['序号', 'ID', '名称', '经度', '纬度', '高度'],
]
let params = {
page: 1,
page_size: 999999,
}
let res = await getGoodsList(params)
if ([0, 200].includes(res.code)) {
res.data.list
for (let j = 0; j < res.data.list.length; j++) {
excelData[0].push(res.data.list[j].name)
}
for (let i = 0; i < nodes.length; i++) {
let item = [i + 1, nodes[i].detail.id, nodes[i].detail.label.text, nodes[i].detail.positions.lng, nodes[i].detail.positions.lat, nodes[i].detail.positions.alt]
// excelData.push()
for (let j = 0; j < res.data.list.length; j++) {
let cnt = 0
if(nodes[i].detail.attribute && nodes[i].detail.attribute.goods) {
for (let k = 0; k < nodes[i].detail.attribute.goods.content.length; k++) {
if (nodes[i].detail.attribute.goods.content[k].ID == res.data.list[j].ID) {
cnt = nodes[i].detail.attribute.goods.content[k].cnt
break
}
}
}
item.push(cnt)
}
excelData.push([...item])
}
const worksheet = XLSX.utils.aoa_to_sheet(excelData)
const workbook = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')
const excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' })
const data = new Blob([excelBuffer], { type: 'application/octet-stream' })
const date = new Date();
const formattedDate = format(date, "yyyyMMddHHmmssSSS");
FileSaver.saveAs(data, `物资统计_${formattedDate}.xlsx`)
}
}
}
});
} else {
this.$message.warning("该区域没有物资");
@ -894,7 +939,7 @@ const secondMenuFun = {
editTs(item) {
this.$sendChanel("initTasks", item);
},
tsOnclick(item) {},
tsOnclick(item) { },
newTs(item) {
this.$prompt("请输入态势方案名称", "提示", {
confirmButtonText: "确定",
@ -1192,9 +1237,9 @@ const secondMenuFun = {
{},
{
clickSavePath: (data) => {
console.log(1232,data);
console.log(1232, data);
let is_show = data.repeat == "Infinity" ? true : false;
let source_name = data.name;
let source_name = data.name;
let source_id = this.$md5(new Date().getTime() + "漫游路径");
let DbOption = {
source_id,
@ -1416,7 +1461,7 @@ const secondMenuFun = {
window.clicknum = 0;
let host = new URL(getIP()).host;
let routePlanning = new YJ.Obj.RoutePlanning(window.Earth1, {
gps: false,
gps: true,
host,
});
routePlanning.Dialog.queryCallBack = async (v) => {
@ -1471,6 +1516,10 @@ const secondMenuFun = {
},
//视频录制
videoRecording(item) {
window.endRecoder = () => {
console.log('结束')
$sendElectronChanel("endRecoder");
}
item.status = !item.status;
let time = 3;
this.$changeComponentShow("#secondMenu", false);
@ -1507,6 +1556,7 @@ const secondMenuFun = {
func();
timer = setInterval(func, 1000);
} else {
console.log('结束')
$sendElectronChanel("endRecoder");
// document.removeEventListener("keydown", onKeyDown);
}
@ -1843,7 +1893,7 @@ const secondMenuFun = {
// console.log('layer2',layer2)
let Draw = new YJ.Draw.DrawPolygon(window.Earth1);
Draw.start((err, positions) => {
if(!positions || positions.length < 3) {
if (!positions || positions.length < 3) {
return
}
let source_id = this.$md5(new Date().getTime() + "飞线");

View File

@ -175,6 +175,8 @@ import {
} from "../../../api";
import { debounce } from "../../../utils";
import fs from "fs";
const os = require("os");
const arch = os.arch();
export default {
name: "equipment",
@ -217,8 +219,10 @@ export default {
download() {
let serve = localStorage.getItem("service");
let p = "xlsx";
let filename = '模板'
if (process.platform == "linux") {
p = "et";
// p = "et";
filename = '模板.xlsx'
}else{
p = "xlsx";
}
@ -227,7 +231,7 @@ export default {
serve + "/static/excel/%E8%AE%BE%E5%A4%87%E6%A8%A1%E6%9D%BF." + p;
this.$sendElectronChanel("saveNetFile", {
title: "保存文件",
filename: "模板",
filename: filename,
filters: [{ name: "保存文件", extensions: [p] }],
url,
});

View File

@ -500,7 +500,6 @@ const rightMenuOption = {
node.source_path = res.data[key].url;
}
source_type = node.source_type;
cusAddNodes(this.$parent.treeObj, p_id, [node]);
if (source_type == "shp") {
renderShp(node);
} else if (source_type == "mif") {
@ -525,6 +524,7 @@ const rightMenuOption = {
} else {
renderTerrain(node);
}
cusAddNodes(this.$parent.treeObj, p_id, [node]);
},
(err) => {
console.log(err);
@ -573,6 +573,8 @@ const rightMenuOption = {
entity.source.remove();
else entity.remove();
}
window._entityMap.delete(item);
window.udp_pointMap.delete(item);
});
//删除的id集合中如果存在已打开的编辑框的id则关闭编辑框
if (
@ -672,7 +674,7 @@ const rightMenuOption = {
// 更新节点的勾选状态
this.$parent.treeObj.checkNode(node, data, isShow);
// 触发check事件来更新数据库
let source_ids = [node.source_id];
if (isShow) {
@ -768,6 +770,9 @@ const rightMenuOption = {
//编辑框的确认回调
//关闭回调是Dialog.closecallBack
editNode.Dialog.confirmCallBack = (v) => {
if(v.instruct){
udp_pointMap.set(v.instruct,{source_id:v.id})
}
console.log("vvvvvvvvvvvvvv1111", v);
this.$offChanel("selectedImg");
if (v.hasOwnProperty("text") && typeof v.text == "string")
@ -791,9 +796,11 @@ const rightMenuOption = {
this.rightClickTreeNode.source_type
)
) {
v.center.lng = v.lng;
v.center.lat = v.lat;
v.center.alt = v.alt;
if(v.center) {
v.center.lng = v.lng;
v.center.lat = v.lat;
v.center.alt = v.alt;
}
}
const obj = {
@ -1022,7 +1029,7 @@ const rightMenuOption = {
let detail = JSON.parse(JSON.stringify(node.detail));
// console.log("detail111111111111111111", );
if (typeof detail==='string') {
detail = JSON.parse(detail);
detail = JSON.parse(detail);
}
if (flag) {
await _entityMap.get(node.source_id).setCustomView();
@ -1317,6 +1324,10 @@ const rightMenuOption = {
formData.append("source_id", this.rightClickTreeNode.source_id);
importTablehead(formData).then((res) => {
if (res.code == 0) {
let entityObject = window.Earth1.entityMap.get(this.rightClickTreeNode.source_id);
if(entityObject && entityObject.type === 'vector') {
entityObject.options.head_tables = res.data.list;
}
this.rightClickTreeNode.head_tables = JSON.stringify(
res.data.list
);
@ -1388,7 +1399,7 @@ const rightMenuOption = {
window._entityMap.set(node.source_id, tileset);
if (!flag)
tileset.flyTo();
});*/
this.$message.success("操作成功");

View File

@ -25,14 +25,14 @@
<input v-bind="searchKey" style="width: 50px;" id="keyword" type="text"
:placeholder="$t('btn.treePlaceholder')" @input="clearResult" @change="searchPlace" />
<el-button type="primary" plain id="queryButton" size="small" @click="searchPlace" :loading="loading">{{
$t("btn.search") }}
$t("btn.search") }}
</el-button>
</div>
<div id="selectorBox">
<el-select ref="select1" @change="locationChange" v-model="value" size="small"
:placeholder="$t('btn.selectPlaceholder')" :no-data-text="$t('btn.selectNoText')">
<el-option v-for="(item, index) in poiOptions" :key="item.search_key + index" :label="item.search_key"
:value="item.address">
:value="index">
</el-option>
</el-select>
</div>
@ -170,7 +170,7 @@ export default {
}
},
methods: {
//
//
cancel() {
YJ.Global.splitScreen.setActiveId([]);
},
@ -442,14 +442,15 @@ export default {
window.searchPlaceEntity.remove();
}
},
//
//
//鼠标移出关闭二级菜单
treeMouseOver() {
this.$changeComponentShow(".rightMenu", false);
},
locationChange() {
let item = this.poiOptions.find((item) => item.address == this.value);
// let item = this.poiOptions.find((item) => item.address == this.value);
let item = this.poiOptions[this.value];
let id = new YJ.Tools().randomString();
this.$nextTick(() => {
this.$refs.select1.blur();
@ -522,7 +523,7 @@ export default {
let string = $("#keyword")
.val()
.trim();
if (string == "") {
if (string === "") {
let arr = [];
if (window.searchPlaceMap) {
arr = Array.from(window.searchPlaceMap);
@ -533,10 +534,10 @@ export default {
}
this.poiOptions = [];
this.value = "";
window.treeSearchCb();
// window.treeSearchCb();
}
},
searchPlace: debounce(function () {
searchPlace: debounce(function (e) {
if (this.select == "poi") {
this.poiOptions = [];
this.value = "";
@ -550,41 +551,47 @@ export default {
() => {
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],
let string = $("#keyword").val().trim();
if (string || e.type !== 'change') {
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.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;
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;
}
}
);
);
}
else {
this.loading = false;
}
} catch (e) {
this.loading = false;
}
@ -609,11 +616,20 @@ export default {
queryPOI({ key: string }, (res) => {
this.poiOptions = res.list;
if (this.poiOptions.length) {
this.$message.success("操作成功");
this.$refs.select1.toggleMenu();
}
else {
this.$message.warning("搜索无数据");
}
this.loading = false;
});
else this.$message.warning("请输入搜索关键字");
else {
if (e.type === 'change') {
return
}
this.$message.warning("请输入搜索关键字");
}
}
} else {
this.poiOptions = [];
@ -682,10 +698,23 @@ export default {
if (typeof node.detail == "string") {
obj = JSON.parse(node.detail);
}
console.log('pressModelMap', obj);
// console.log('pressModelMap', obj);
pressModelMap.set(node.source_id + "_" + obj.model_id, node);
}
// 找出所有的点标注detail中instruct的值不为空的存入udp_pointMap
if (node.source_type == 'point') {
let obj = JSON.parse(JSON.stringify(node.detail));
if (typeof node.detail == "string") {
obj = JSON.parse(node.detail);
}
let key = obj.instruct
if (key) {
udp_pointMap.set(key, { source_id: node.source_id })
}
}
});
//给node设置树形如icon是否允许添加子节点以及右键菜单
data.forEach((node) => {
@ -770,28 +799,28 @@ export default {
// this.$changeComponentShow(".textModelBox", true);
// this.$recvChanel("textModelContent", (data) => {
// console.log(data.text);
let that = this;
let source_id = that.$md5(new Date().getTime() + "文本框");
let textBox = {
id: source_id,
position: position,
text: '',
show: true,
};
let DbOption = {
source_id,
source_name: '文本框',
source_type: "textBox",
p_id: findParentId(that.treeObj),
};
let detailOption = JSON.parse(JSON.stringify(textBox));
let node = getNodeData(DbOption, detailOption);
renderTextBox(node);
addSource(node).then((res) => {
if ([0, 200].includes(res.code)) {
cusAddNodes(that.$parent.treeObj, DbOption.p_id, [node]);
}
});
let that = this;
let source_id = that.$md5(new Date().getTime() + "文本框");
let textBox = {
id: source_id,
position: position,
text: '',
show: true,
};
let DbOption = {
source_id,
source_name: '文本框',
source_type: "textBox",
p_id: findParentId(that.treeObj),
};
let detailOption = JSON.parse(JSON.stringify(textBox));
let node = getNodeData(DbOption, detailOption);
renderTextBox(node);
addSource(node).then((res) => {
if ([0, 200].includes(res.code)) {
cusAddNodes(that.$parent.treeObj, DbOption.p_id, [node]);
}
});
// })
},

View File

@ -180,7 +180,7 @@ function renderTerrain(node) {
};
try {
tileset.source.tileset.czmObject.xbsjStyle = JSON.stringify(a);
} catch (e) {}
} catch (e) { }
}
window._entityMap.set(node.source_id, tileset);
}
@ -381,10 +381,10 @@ function renderGeojson(node, ifFly = true) {
let geoParams = {
id: node.source_id,
url: node.source_path,
customView: node.detail.customView,
host: getIP(), //需要那个host 怎么拿过来
};
let GeoJson = new YJ.Obj.GeoJson(window.Earth1, geoParams);
console.log(GeoJson);
GeoJson.on().then((res) => {
window._entityMap.set(node.source_id, GeoJson);
if (ifFly) GeoJson.flyTo();
@ -662,7 +662,7 @@ function renderScanStereoscopic(node) {
let nodecopy = JSON.parse(JSON.stringify(node));
if (typeof nodecopy.detail == "string")
nodecopy.detail = JSON.parse(nodecopy.detail);
console.log("nodecopy", nodecopy);
// console.log("nodecopy", nodecopy);
let option = {
...nodecopy.detail,
id: nodecopy.source_id,
@ -876,6 +876,9 @@ 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";
if (option.host && option.host.indexOf('localhost') !== -1) {
option.host = localStorage.getItem("service");
}
let svg = new YJ.Obj.GroundSvg(window.Earth1, option);
console.log("DbOption", DbOption);
if (DbOption.is_load) {
@ -948,7 +951,7 @@ function renderPath(node) {
if (typeof nodecopy.detail == "string")
nodecopy.detail = JSON.parse(nodecopy.detail);
// nodecopy.detail.model.show = Boolean(node.is_show);
console.log("nodecopy", nodecopy);
// console.log("nodecopy", nodecopy);
let option = {
...nodecopy.detail,
earth: window.Earth1.earth,
@ -1050,7 +1053,7 @@ function bindPath(hasModel, option, nodecopy, Path) {
window._entityMap.set(nodecopy.detail.id || nodecopy.id, Path);
}
function renderTrajectory(node) {}
function renderTrajectory(node) { }
function renderXLSX(node, ifFly = true) {
// console.log("renderXLSX时", node);
@ -1085,7 +1088,7 @@ function renderPressModel(node) {
}
//地形开挖
function renderTerrainDig(node) {}
function renderTerrainDig(node) { }
// 水流
function renderSpout(node) {
@ -1291,7 +1294,7 @@ function renderTextBox(node) {
name: nodecopy.source_name,
};
// console.log('option',option);
let TextBox = new YJ.Obj.TextBox(window.Earth1, option, (e) => {
console.log("ssssssssssssssssssssssss");
let obj = {

View File

@ -842,13 +842,13 @@ const nodeType = {
rightMenus: ["del", "setView", "resetView"],
render: renderGeojson,
detailFun: get_detail_geojson,
allowChildren: true,
allowChildren: false,
},
czml: {
rightMenus: ["del", "setView", "resetView"],
render: renderCzml,
detailFun: get_detail_czml,
allowChildren: true,
allowChildren: false,
},
ArcgisWXImagery: {
render: renderArcgisWXImagery,
@ -965,13 +965,13 @@ const nodeType = {
],
render: renderShp,
detailFun: get_detail_shp,
allowChildren: true,
allowChildren: false,
},
gdb: {
rightMenus: ["edit", "del", "setView", "resetView", "showAttr"],
render: renderShp,
detailFun: get_detail_shp,
allowChildren: true,
allowChildren: false,
},
// gdbShp: {
// rightMenus: [/*"showAttr"*/],
@ -1004,7 +1004,7 @@ const nodeType = {
rightMenus: ["edit", "del", "setView", "resetView", "showAttr"],
render: renderShp,
detailFun: get_detail_kml,
allowChildren: true,
allowChildren: false,
},
groundText: {
rightMenus: [

View File

@ -130,7 +130,7 @@ const tree = {
* @returns {function(*, *): *}
*/
keysort(key) {
return function(a, b) {
return function (a, b) {
return a[key] - b[key];
};
},
@ -540,13 +540,7 @@ const tree = {
this.treeObj.selectNode(item, true);
});
}
//物理沙盘-传输对方数据
// if (nodes[0].source_type === 'point') {
// ipcRenderer.send('setNodes', '110');
// ipcRenderer.on("replayRenderer", (event, data) => {
// this.$message.success(data)
// });
// }
if (!isCtrl || !isShift) {
let source_ids = [];
console.log("treeNode", treeNode);
@ -577,6 +571,28 @@ const tree = {
// if (!entity) {
// this.$message.warning("无资源数据");
// }
//物理沙盘-传输对方数据
if (treeNode.source_type === 'point') {
let sandTable_udp_client_status = localStorage.getItem('sandTable_udp_client_status')
if (JSON.parse(sandTable_udp_client_status)) {
let key = treeNode.detail.instruct
if (key) {
let obj = udp_pointMap.get(key)
if (obj && (obj.source_id == treeNode.source_id)) {
let cmd
cmd = ['B', undefined].includes(obj.command) ? "A" : "B"
ipcRenderer.send('setNodes', cmd + key);
ipcRenderer.on("replayRenderer", (event, data) => {
// this.$message.success(data)
obj.command = cmd
udp_pointMap.set(key, obj)
});
}
}
}
}
//飞行漫游
if (treeNode.source_type === "roam") {
this.$message("单击鼠标右键可结束当前漫游");
@ -685,7 +701,7 @@ const tree = {
let entity = window._entityMap.get(node.source_id);
if (p_entity && status == true) {
p_entity.show = status;
}else if(entity){
} else if (entity) {
entity.show = status;
}
}
@ -721,53 +737,64 @@ const tree = {
}
});
};
// YJ.Global.splitScreen.setActiveId([]);
let hidden_p_ids = []
let show_p_ids = []
let parentNode = treeNode.getParentNode();
// 如果当前节点有父节点,检查所有子节点状态
if (parentNode) {
checkChildNodes(parentNode);
}
//调用接口更改数据库is_show的值
if (treeNode.is_show) {
source_ids.push(...show_p_ids)
showSource({ source_ids }, (data) => {
console.log(data);
sourceStatus(source_ids, treeNode.is_show);
});
} else {
source_ids.push(...hidden_p_ids)
hideSource({ source_ids }, (data) => {
console.log(data);
sourceStatus(source_ids, treeNode.is_show);
});
}
// YJ.Global.splitScreen.setActiveId([]);
let parentNode = treeNode.getParentNode();
// 如果当前节点有父节点,检查所有子节点状态
if (parentNode) {
checkChildNodes(parentNode);
}
// 检查子节点状态,更新父节点
function checkChildNodes(parentNode) {
let children = parentNode.children;
if (!children || children.length === 0) return;
// 检查子节点状态,更新父节点
function checkChildNodes(parentNode) {
let children = parentNode.children;
if (!children || children.length === 0) return;
// 检查是否所有子节点都未被选中
let allUnchecked = true;
for (let i = 0; i < children.length; i++) {
let childNode = children[i];
// 如果有任何一个子节点被选中,则父节点不应被取消
if (childNode.is_show) {
allUnchecked = false;
break;
// 检查是否所有子节点都未被选中
let allUnchecked = true;
for (let i = 0; i < children.length; i++) {
let childNode = children[i];
// 如果有任何一个子节点被选中,则父节点不应被取消
if (childNode.is_show) {
allUnchecked = false;
break;
}
}
}
// 如果所有子节点都未被选中,且父节点当前是选中状态,则取消父节点选择
if (allUnchecked && parentNode.is_show) {
window.treeObj.checkNode(parentNode, false, true);
console.log('allUnchecked', allUnchecked)
// 如果所有子节点都未被选中,且父节点当前是选中状态,则取消父节点选择
if (allUnchecked && parentNode.is_show && parentNode.source_type != "tileset") {
window.treeObj.checkNode(parentNode, false, true);
hidden_p_ids.push(parentNode.source_id)
}
else {
show_p_ids.push(parentNode.source_id)
}
// 递归检查上一级父节点
let grandParent = parentNode.getParentNode();
if (grandParent) {
checkChildNodes(grandParent);
}
}
}
},
},

View File

@ -170,6 +170,7 @@ export default {
// }
this.graphTableData = [...data.children];
if (data.sonNode.length) {
let junbiaos = [];
this.selectedGraphLabelType = data.type_id;
@ -177,9 +178,7 @@ export default {
if (item.p_id == data.type_id && item.children)
junbiaos = junbiaos.concat(item.children);
});
this.graphTableData = junbiaos;
} else {
this.graphTableData = data.children;
this.graphTableData.push(...junbiaos);
}
},
getGraphLabelTypeList() {

View File

@ -2,7 +2,7 @@
<div class="header_top">
<!-- <svg-icon icon-class="Head" :class-name="['headItem']"></svg-icon> -->
<img v-if="!headImage" class="header_img" alt="" />
<img v-else-if="headImage === 'default'" class="header_img" :src="require('@/assets/images/jianchuang/' + skinInfo + '/head.png')" alt="" />
<img v-else-if="headImage === 'default'" class="header_img" :src="require('@/assets/images/shijingjun/' + skinInfo + '/head.png')" alt="" />
<img v-else class="header_img" :src="headImage" alt="" />
<div class="dateTime">
<span>{{ date.ymd }}</span>

View File

@ -191,15 +191,29 @@ export default {
); */
},
graphLabelClick(data, event) {
if (this.selectedGraphLabelType == data.type_id) {
this.graphTableData = [];
this.$nextTick(() => {
this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
});
this.selectedGraphLabelType = null;
} else {
console.log(data)
// 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 || [];
// }
this.graphTableData = [...data.children];
this.graphTableSelectData = data.children;
if (data.sonNode.length) {
let junbiaos = [];
this.selectedGraphLabelType = data.type_id;
this.graphTableData = data.children || [];
this.JByuanshishuju.forEach((item) => {
if (item.p_id == data.type_id && item.children)
junbiaos = junbiaos.concat(item.children);
});
this.graphTableData.push(...junbiaos);
}
},
tongbu() {
@ -433,12 +447,15 @@ export default {
this.graphLabelDataMaps.clear();
this.graphLabelTypeList = [];
this.graphTableData = [];
this.graphTableSelectData = [];
this.JByuanshishuju = [];
getGraphLabelType2((res) => {
console.log("", res);
setTimeout(() => {
this.junbiaoLoading = false;
}, 1500);
if (res.list.length) {
this.JByuanshishuju = res.list;
console.log("this.graphLabelDataMaps", this.graphLabelDataMaps);
res.list.forEach((item) => {
item.sonNode = [];
@ -1222,7 +1239,7 @@ export default {
"type_id",
obj.p_id,
"children",
_that.graphTableData,
[..._that.graphTableSelectData, obj],
"assign"
);
});

View File

@ -13,8 +13,8 @@
<div>
<span>{{ $t("headerTitles.auths.authCode") }}</span>
<span @click="copy" style="cursor: pointer;" title="点击可复制">{{
authInfo.license_code
}}</span>
authInfo.license_code
}}</span>
</div>
<div>
<span>{{ $t("headerTitles.auths.authTime") }}</span>
@ -30,15 +30,16 @@
<div>
<span>{{ $t("headerTitles.auths.authType") }}</span>
<span>{{
authInfo.auth_type == "" ? "暂无授权" : authInfo.auth_type
}}</span>
authInfo.auth_type == "" ? "暂无授权" : authInfo.auth_type
}}</span>
</div>
<el-upload class="upload-demo" :headers="headers" :action="uploadUrl()" :show-file-list="false"
accept=".lic" :on-success="onSuccess">
accept=".lic" :on-success="onSuccess">
<el-button size="small" type="primary">{{
$t("headerTitles.auths.upload")
}}</el-button>
$t("headerTitles.auths.upload")
}}
</el-button>
</el-upload>
<!--<button class="btn" @click="onFileSubmit">{{ $t('headerTitles.confirm') }}</button>-->
</div>
@ -67,8 +68,8 @@
<div>
<div class="detailSkin ">
<span>{{
$t("headerTitles.systemSetting.setLanguage")
}}</span>
$t("headerTitles.systemSetting.setLanguage")
}}</span>
<el-select v-model="systemSetting.language" @change="sysChange" placeholder="请选择">
<el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.id">
</el-option>
@ -106,7 +107,7 @@
<span>{{ $t("headerTitles.ConcurrencyControl") }}</span>
<el-select v-model="concurrentcode" @change="concurrentWorkloadChange" placeholder="请选择">
<el-option v-for="(item, index) in concurrentWorkloadList" :key="index" :label="item.value"
:value="item.value">
:value="item.value">
</el-option>
</el-select>
</div>
@ -122,18 +123,24 @@
</div>
</div>
<!-- <div>
<span>{{ $t("headerTitles.systemSetting.coordinateSystem") }}</span>
<span>{{ $t("headerTitles.systemSetting.coordinateSystem") }}</span>
<el-select size="small" v-model="value" placeholder="请选择">
<el-option v-for="item in name_map" :key="item" :label="item" :value="item"></el-option>
</el-select>
</div> -->
<div style="display:flex;">
<el-button size="mini" type="primary" @click="setView">{{ $t("headerTitles.systemSetting.defaultView")
}}</el-button>
<el-button size="mini" type="primary" @click="setData">{{ $t("headerTitles.systemSetting.defaultData")
}}</el-button>
<el-button size="mini" type="primary" @click="management">{{ $t("headerTitles.systemSetting.management")
}}</el-button>
<el-button size="mini" type="primary" @click="setView">{{
$t("headerTitles.systemSetting.defaultView")
}}
</el-button>
<el-button size="mini" type="primary" @click="setData">{{
$t("headerTitles.systemSetting.defaultData")
}}
</el-button>
<el-button size="mini" type="primary" @click="management">{{
$t("headerTitles.systemSetting.management")
}}
</el-button>
</div>
</div>
<div class="cc">
@ -141,42 +148,43 @@
<!-- 罗盘 -->
<span>{{ $t("headerTitles.systemSetting.showCompass") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showCompass" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<!-- 比例尺 -->
<span>{{ $t("headerTitles.systemSetting.showDistanceLegend") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showDistanceLegend" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<span>{{ $t("headerTitles.systemSetting.showToolBar") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showToolBar" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<span>{{ $t("headerTitles.systemSetting.showFPS") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showFps" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
<!-- 图幅 -->
<div class="center">
<span>{{ $t("headerTitles.systemSetting.sheetIndexStatusSwitch") }}</span>
<el-switch style="margin-left: -17px;" @change="sysChange"
v-model="systemSetting.sheetIndexStatusSwitch" active-color="#13ce66" inactive-color="#ff4949">
v-model="systemSetting.sheetIndexStatusSwitch" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<!-- 点遮挡 -->
<span>{{ $t("headerTitles.systemSetting.occlusion") }}</span>
<el-switch style="margin-left: -17px;" @change="sysChange" v-model="systemSetting.occlusion"
active-color="#13ce66" inactive-color="#ff4949">
active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</div>
</div>
@ -185,21 +193,21 @@
<!-- 鹰眼图 -->
<span>{{ $t("headerTitles.systemSetting.showMapX") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showMapX" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<!-- 经纬网 -->
<span>{{ $t("headerTitles.systemSetting.showLatitudeLongitudeNetwork") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showLatitudeLongitudeNetwork"
active-color="#13ce66" inactive-color="#ff4949">
active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</div>
<div class="center">
<!-- 方里网 -->
<span>{{ $t("headerTitles.systemSetting.showFangliNet") }}</span>
<el-switch @change="sysChange" v-model="systemSetting.showFangliNet" active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949">
</el-switch>
</div>
@ -212,34 +220,38 @@
</div>
</el-tab-pane>
<!-- 头部设置 -->
<el-tab-pane :label="$t('headerTitles.Header.title')" class="headerTab">
<!-- <el-tab-pane :label="$t('headerTitles.Header.title')" class="headerTab">
<el-dialog :visible.sync="headerAddDialogVisible" :modal="false" :title="$t('headerTitles.Header.add')"
width="100%" style="width: 680px; height: 420px;" center :before-close="headerAddClose">
width="100%" style="width: 680px; height: 420px;" center :before-close="headerAddClose">
<div style="display: flex;align-items: center;margin: 10px 0;">
<span style="width: 50px;">名称</span>
<el-input style="width: calc(100% - 78px);" v-model="headerParams.name" placeholder="请输入名称"></el-input>
<el-input style="width: calc(100% - 78px);" v-model="headerParams.name"
placeholder="请输入名称"></el-input>
</div>
<el-row>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[0].id) }}</p>
<el-upload class="header-uploader" action="" accept =".png, .jpeg, .jpg" :show-file-list="false" :http-request="headerUploadRequest"
:data="{ index: 1 }">
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 1 }">
<img style="object-fit: contain;" v-if="headerParams.url1" :src="headerParams.url1" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
</el-col>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[1].id) }}</p>
<el-upload class="header-uploader" action="" accept =".png, .jpeg, .jpg" :show-file-list="false" :http-request="headerUploadRequest"
:data="{ index: 2 }">
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 2 }">
<img style="object-fit: contain;" v-if="headerParams.url2" :src="headerParams.url2" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
</el-col>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[2].id) }}</p>
<el-upload class="header-uploader" action="" accept =".png, .jpeg, .jpg" :show-file-list="false" :http-request="headerUploadRequest"
:data="{ index: 3 }">
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 3 }">
<img style="object-fit: contain;" v-if="headerParams.url3" :src="headerParams.url3" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
@ -259,9 +271,9 @@
</div>
<el-table :data="headerDataList" style="width: 100%" max-height="250">
<el-table-column
label=""
align="center"
width="50">
label=""
align="center"
width="50">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.selected" @change="headerSelectChange(scope.row)"></el-checkbox>
</template>
@ -280,10 +292,12 @@
</el-table-column>
</el-table>
<el-pagination style="display: flex;justify-content: center" @size-change="handleSizeChangeHeader"
@current-change="hadleCurrentChangeHeader" :current-page="paginationHeader.page" :page-sizes="[5, 10, 20, 30, 40]"
:page-size="paginationHeader.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="paginationHeader.total" />
@current-change="hadleCurrentChangeHeader" :current-page="paginationHeader.page"
:page-sizes="[5, 10, 20, 30, 40]"
:page-size="paginationHeader.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="paginationHeader.total"/>
</div>
</el-tab-pane>
</el-tab-pane> -->
<!-- 卫星状态 -->
<!-- <el-tab-pane :label="$t('headerTitles.Satellite')">
<div class="auth_info custom_scroll_bar content_h">
@ -327,7 +341,8 @@
</div>
<div>
<el-button @click="importpoi" size="mini" type="primary" class="btn_public">{{
$t("headerTitles.Engineerings.importPOI") }}
$t("headerTitles.Engineerings.importPOI")
}}
</el-button>
</div>
<div>
@ -350,21 +365,23 @@
<!-- 设备管理 -->
<el-tab-pane :label="$t('headerTitles.equipment.title')">
<equipment />
<equipment/>
</el-tab-pane>
<!-- 无人机配置 v-if="false" -->
<el-tab-pane v-if="false" :label="$t('headerTitles.air.title')">
<Air />
<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") }}
$t("headerTitles.model.createModelLibrary")
}}
</el-button>
<el-button @click="selectLib('model')" type="primary" size="small">{{
$t("headerTitles.model.selectModelLibrary") }}
$t("headerTitles.model.selectModelLibrary")
}}
</el-button>
<el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.addModelType") }}
@ -376,10 +393,12 @@
{{ $t("headerTitles.model.importModel") }}
</el-button>
<el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.editModel") }}
$t("headerTitles.model.editModel")
}}
</el-button>
<el-button @click="delModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.deleteModel") }}
$t("headerTitles.model.deleteModel")
}}
</el-button>
</div>
<div class="modelList">
@ -416,7 +435,7 @@
</template>
</template>
<template v-else>
无模型类型,<br />请先添加模型类型
无模型类型,<br/>请先添加模型类型
</template>
</div>
</template>
@ -430,7 +449,7 @@
<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]">
:preview-src-list="[scope.row.poster_url]">
</el-image>
</template>
</el-table-column>
@ -462,10 +481,12 @@
<el-tab-pane v-if="false" label="三维军标">
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('model')" type="warning" size="small">{{
$t("headerTitles.model.createModelLibrary") }}
$t("headerTitles.model.createModelLibrary")
}}
</el-button>
<el-button @click="selectLib('model')" type="primary" size="small">{{
$t("headerTitles.model.selectModelLibrary") }}
$t("headerTitles.model.selectModelLibrary")
}}
</el-button>
<el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.addModelType") }}
@ -477,10 +498,12 @@
{{ $t("headerTitles.model.importModel") }}
</el-button>
<el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.editModel") }}
$t("headerTitles.model.editModel")
}}
</el-button>
<el-button @click="delModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.deleteModel") }}
$t("headerTitles.model.deleteModel")
}}
</el-button>
</div>
<div class="modelList">
@ -517,7 +540,7 @@
</template>
</template>
<template v-else>
无模型类型,<br />请先添加模型类型
无模型类型,<br/>请先添加模型类型
</template>
</div>
</template>
@ -532,7 +555,7 @@
<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]">
:preview-src-list="[scope.row.poster_url]">
</el-image>
</template>
</el-table-column>
@ -565,10 +588,12 @@
<el-tab-pane :label="$t('headerTitles.graphLabel.title')">
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('graphLabel')" type="warning" size="small">{{
$t("headerTitles.graphLabel.createGraphLabelLibrary") }}
$t("headerTitles.graphLabel.createGraphLabelLibrary")
}}
</el-button>
<el-button @click="selectLib('junbiao')" type="primary" size="small">{{
$t("headerTitles.graphLabel.selectGraphLabelLibrary") }}
$t("headerTitles.graphLabel.selectGraphLabelLibrary")
}}
</el-button>
<el-button @click="addGraphLabelType" :disabled="importGraphLabelEnable()" type="success" size="small">
{{ $t("headerTitles.graphLabel.addGraphLabelType") }}
@ -580,9 +605,11 @@
{{ $t("headerTitles.graphLabel.importGraphLabel") }}
</el-button>
<el-button style="margin-left: 10px" @click="editGraphLabelTypes" type="warning" size="small">{{
$t("headerTitles.graphLabel.edit") }}
$t("headerTitles.graphLabel.edit")
}}
</el-button>
<el-button @click="delGraphLabelTypes" type="warning" size="small">{{ $t("headerTitles.graphLabel.delete")
<el-button @click="delGraphLabelTypes" type="warning" size="small">{{
$t("headerTitles.graphLabel.delete")
}}
</el-button>
</div>
@ -608,18 +635,18 @@
<div class="typeBox custom_scroll_bar">
<template v-if="graphLabelTypeList.length > 0">
<el-tree :data="graphLabelTypeList" :props="graphLabelProps" :expand-on-click-node="false"
ref="myTree" node-key="type_id" highlight-current accordion @node-click="graphLabelClick">
ref="myTree" node-key="type_id" highlight-current accordion @node-click="graphLabelClick">
</el-tree>
</template>
<template v-else>
无军标类型,<br />请先添加军标类型
无军标类型,<br/>请先添加军标类型
</template>
</div>
</template>
</div>
<el-table border :data="graphTableData" style="width: 100%" @row-click="rowClick" @row-dblclick="dblClick"
:row-class-name="tableRowClassName">
:row-class-name="tableRowClassName">
<template v-if="junbiaoLoading">
<div class="canvasBox">
<div class="spinnerSexBox p1"></div>
@ -645,7 +672,7 @@
<!-- :title="scope.row.poster_url"-->
<!-- <img :src="scope.row.poster_url">-->
<el-image style="width: 40px; height: 40px" :src="scope.row.url"
:preview-src-list="[scope.row.url]">
:preview-src-list="[scope.row.url]">
</el-image>
</template>
</el-table-column>
@ -653,7 +680,9 @@
<el-table-column prop="type" label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="editGraphLabel(scope.row)">{{
$t("headerTitles.graphLabel.edit") }}</el-button>
$t("headerTitles.graphLabel.edit")
}}
</el-button>
<el-button @click="delGraphLabel(scope.row.jun_biao_id)" type="danger" size="mini">
{{ $t("headerTitles.graphLabel.delete") }}
</el-button>
@ -671,14 +700,15 @@
</div>
</el-tab-pane>
<!-- 物理沙盘 -->
<el-tab-pane v-if="false" :label="$t('headerTitles.udp')">
<!-- v-if="false"-->
<!-- <el-tab-pane :label="$t('headerTitles.udp')">
<div class="udp_auth">
<div>
<span class="fankuai"></span>
<span style="display: inline-block;margin-left: 5px;">UDP</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color:#fff"> 允许连接 </span>
<span style="color:#fff"> {{ $t('headerTitles.Permitconnection') }} </span>
<el-switch @change="change_sandTable_udp_client_status" v-model="sandTable_udp_client_status"></el-switch>
</div>
<div>
@ -699,7 +729,7 @@
</div>
<div>
<el-button size="mini" type="primary" @click="submitPort">保存</el-button>
<el-button size="mini" type="primary" @click="submitPort">{{ $t("headerTitles.save") }}</el-button>
</div>
</div>
</div>
@ -720,13 +750,18 @@
</div>
<div>
<el-button size="mini" type="primary" @click="submitClient">保存</el-button>
<el-button size="mini" type="primary" @click="submitClient">{{ $t("headerTitles.save") }}</el-button>
</div>
</div>
</div>
<div class="">
<el-button size="small" @click="sendGlobalMsg('AFFK','A')">{{ $t("headerTitles.allOpen") }}</el-button>
<el-button size="small" @click="sendGlobalMsg('AFFG','B')">{{ $t("headerTitles.allClose") }}</el-button>
</div>
</div>
</div>
</el-tab-pane>
</el-tab-pane> -->
<!-- 版本信息 -->
<el-tab-pane :label="$t('headerTitles.Version')">
<div class="auth_info content_h">
@ -772,23 +807,24 @@
</template>
<script>
import { setMove } from "./js/moveDiv";
import {setMove} from "./js/moveDiv";
import utilTools from "./js/utilTools";
import setAgreement from "./components/setAgreementInfo/setAgreement.vue";
import { mapGetters } from "vuex";
import { calcWidth } from "@/utils";
import { validateCommonText } from "@/utils/validate";
import {mapGetters} from "vuex";
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 { Header } from "element-ui";
import { getHeaderList, addHeader, selectHeader, deleteHeader } from "@/api/gisAPI";
import {Header} from "element-ui";
import {getHeaderList, addHeader, selectHeader, deleteHeader} from "@/api/gisAPI";
import {ipcRenderer} from "electron";
// import model from "./components/modelType/index.vue"
// import {baseURL} from "../../../utils/request";
export default {
name: "systemPopup",
mixins: [utilTools],
components: { setAgreement, equipment, Air },
components: {setAgreement, equipment, Air},
computed: {
...mapGetters(["system", "modelLibPath", "graphLabelLibPath"]),
},
@ -810,8 +846,8 @@ export default {
isStandAlone: window.isStandAlone,
rulesRole: {
role_name: [
{ required: true, message: "请输入名称", trigger: "blur" },
{ min: 1, message: "长度大于 1 个字符", trigger: "blur" },
{required: true, message: "请输入名称", trigger: "blur"},
{min: 1, message: "长度大于 1 个字符", trigger: "blur"},
],
},
formRole: {
@ -821,25 +857,25 @@ export default {
rules: {
username: [
{ required: true, message: "请输入用户名", trigger: "blur" },
{ min: 5, message: "长度大于 5 个字符", trigger: "blur" },
{ validator: validateCommonText, trigger: "blur" },
{required: true, message: "请输入用户名", trigger: "blur"},
{min: 5, message: "长度大于 5 个字符", trigger: "blur"},
{validator: validateCommonText, trigger: "blur"},
],
nick_name: [
{ required: true, message: "请输入昵称", trigger: "blur" },
{ min: 5, message: "长度大于 5 个字符", trigger: "blur" },
{required: true, message: "请输入昵称", trigger: "blur"},
{min: 5, message: "长度大于 5 个字符", trigger: "blur"},
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, message: "长度大于 6 个字符", trigger: "blur" },
{required: true, message: "请输入密码", trigger: "blur"},
{min: 6, message: "长度大于 6 个字符", trigger: "blur"},
],
password2: [
{ required: true, message: "请再次输入密码", trigger: "blur" },
{ validator: validatePass2, trigger: "blur" },
{required: true, message: "请再次输入密码", trigger: "blur"},
{validator: validatePass2, trigger: "blur"},
],
depart_id: [
{ required: true, message: "请输入部门", trigger: "blur" },
{ min: 6, message: "长度大于 6 个字符", trigger: "blur" },
{required: true, message: "请输入部门", trigger: "blur"},
{min: 6, message: "长度大于 6 个字符", trigger: "blur"},
],
},
dialogFormVisible: false,
@ -868,9 +904,9 @@ export default {
hikangInfo1: "",
hikangInfo2: "",
optionList: [
{ id: 1, label: "选择1" },
{ id: 2, label: "选择2" },
{ id: 3, label: "选择3" },
{id: 1, label: "选择1"},
{id: 2, label: "选择2"},
{id: 3, label: "选择3"},
],
hikang_checked: false,
// ******
@ -891,15 +927,15 @@ export default {
},
skinList: [
{ id: "yingguangse", label: "荧光色" },
{ id: "gonganlan", label: "科技蓝" },
{ id: "hong", label: "烈日红" },
{id: "yingguangse", label: "荧光色"},
{id: "gonganlan", label: "科技蓝"},
{id: "hong", label: "烈日红"},
],
options: [
{ id: "zh", label: "中文简体" },
{ id: "en", label: "English" },
{ id: "tw", label: "中文繁體" },
{id: "zh", label: "中文简体"},
{id: "en", label: "English"},
{id: "tw", label: "中文繁體"},
],
// *****
select_id: 1, //选中服务接入
@ -1043,7 +1079,7 @@ export default {
calcsWidth(row) {
return calcWidth(row);
},
tableRowClassName({ row, rowIndex }) {
tableRowClassName({row, rowIndex}) {
if (rowIndex === 1) {
return "warning-row";
} else if (rowIndex === 3) {
@ -1085,50 +1121,48 @@ export default {
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
deleteHeader({
id: row.id
}).then(async res => {
if (res.code == 0 || res.code == 200) {
let header = JSON.parse(localStorage.getItem("header"))
this.$message.success("删除成功");
if(this.headerDataList.length==1 && this.paginationHeader.page>1) {
this.paginationHeader.page--
}
if (row.id == header.id) {
localStorage.removeItem("header")
// 显示第一个
await getHeaderList({
page: 1,
page_size: 1,
}).then(res => {
if (res.code == 0 || res.code == 200) {
if(res.data.list && res.data.list[0]) {
this.headerSelectChange(res.data.list[0])
setTimeout(() => {
.then(async () => {
deleteHeader({
id: row.id
}).then(async res => {
if (res.code == 0 || res.code == 200) {
let header = JSON.parse(localStorage.getItem("header"))
this.$message.success("删除成功");
if (this.headerDataList.length == 1 && this.paginationHeader.page > 1) {
this.paginationHeader.page--
}
if (row.id == header.id) {
localStorage.removeItem("header")
// 显示第一个
await getHeaderList({
page: 1,
page_size: 1,
}).then(res => {
if (res.code == 0 || res.code == 200) {
if (res.data.list && res.data.list[0]) {
this.headerSelectChange(res.data.list[0])
setTimeout(() => {
this.getHeaderList();
}, 500);
} else {
this.getHeaderList();
}, 500);
localStorage.removeItem("header")
this.$sendChanel("header")
}
}
else {
this.getHeaderList();
localStorage.removeItem("header")
this.$sendChanel("header")
}
}
})
})
} else {
this.getHeaderList();
}
}
else {
this.getHeaderList();
}
}
})
})
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
});
},
handleSizeChangeHeader(value) {
this.paginationHeader.pageSize = value;
@ -1186,6 +1220,19 @@ export default {
this.getHeaderList();
}
})
},
sendGlobalMsg(cmd,flag){
let sandTable_udp_client_status = localStorage.getItem('sandTable_udp_client_status')
if (JSON.parse(sandTable_udp_client_status)) {
ipcRenderer.send('setNodes', cmd);
ipcRenderer.on("replayRenderer", (event, data) => {
Array.from(udp_pointMap.keys()).forEach(key=>{
let obj=udp_pointMap.get(key)
obj.command=flag
udp_pointMap.set(key,obj)
})
});
}
}
},
};
@ -1206,7 +1253,7 @@ export default {
}*/
.graphList {
.el-tree-node.is-current {
&>.el-tree-node__content {
& > .el-tree-node__content {
background-color: rgba(230, 242, 255, 0.93) !important;
}
}
@ -1251,7 +1298,7 @@ export default {
display: grid;
place-items: center;
>span {
> span {
color: #fff;
font-weight: bold;
font-size: 20px;
@ -1305,7 +1352,7 @@ export default {
}
.content_h {
>span {
> span {
cursor: pointer;
}
}
@ -1363,16 +1410,16 @@ export default {
font-weight: bolder;
}
>div {
> div {
margin: 20px 0 0;
width: 100%;
>span {
> span {
font-size: 16px;
color: #fff;
}
&>span:first-child {
& > span:first-child {
//width: 90px;
color: #0ff;
font-size: 18px;
@ -1380,7 +1427,7 @@ export default {
display: inline-block;
}
&>span:nth-child(2) {
& > span:nth-child(2) {
display: inline-block;
padding: 2px 10px;
border-radius: 5px;
@ -1396,7 +1443,7 @@ export default {
justify-content: center;
color: #fff;
>span {
> span {
padding: 4px 10px;
height: 30px;
background: rgba(0, 255, 255, 0.4);
@ -1426,7 +1473,7 @@ export default {
border: none !important;
}
>span {
> span {
width: 90px;
color: #0ff;
font-size: 18px;
@ -1465,7 +1512,7 @@ export default {
.cc1 {
width: 40%;
>div {
> div {
margin: 10px 0 0;
.detailSkin {
@ -1473,22 +1520,22 @@ export default {
align-items: center;
justify-content: space-around;
>span {
> span {
font-size: 16px;
color: #fff;
}
&>span:first-child {
& > span:first-child {
//width: 90px;
color: #0ff;
font-size: 18px;
font-weight: bolder;
display: inline-block;
width: 108px;
width: 116px;
text-align: right;
}
&>span:nth-child(2) {
& > span:nth-child(2) {
display: inline-block;
padding: 2px 10px;
border-radius: 5px;
@ -1509,15 +1556,15 @@ export default {
}
>div {
> div {
margin: 20px 0 0;
>span {
> span {
font-size: 16px;
color: #fff;
}
&>span:first-child {
& > span:first-child {
//width: 90px;
color: #0ff;
font-size: 18px;
@ -1526,7 +1573,7 @@ export default {
text-align: right;
}
&>span:nth-child(2) {
& > span:nth-child(2) {
display: inline-block;
padding: 2px 10px;
border-radius: 5px;
@ -1542,7 +1589,7 @@ export default {
height: 17vw;
padding: 0 20px;
>div:first-child {
> div:first-child {
height: 20%;
width: 100%;
color: #0ff;
@ -1553,7 +1600,7 @@ export default {
align-items: center;
}
>div:last-child {
> div:last-child {
height: 80%;
width: 100%;
display: flex;
@ -1564,14 +1611,14 @@ export default {
justify-content: space-around;
margin-bottom: 30px;
>div {
> div {
width: 40%;
display: flex;
align-items: center;
padding: 8px;
}
>div:last-child {
> div:last-child {
width: 50%;
display: flex;
justify-content: space-between;
@ -1598,13 +1645,13 @@ export default {
justify-content: center;
//align-items: center;
&>div {
& > div {
font-size: 18px;
color: #0ff;
font-weight: bolder;
margin-bottom: 5px;
>span {
> span {
margin-right: 10px;
}
@ -1614,7 +1661,7 @@ export default {
}
}
>button {
> button {
margin-top: 20px;
}
}
@ -1676,7 +1723,7 @@ export default {
display: flex;
flex-direction: column;
&>span {
& > span {
padding-left: 90px;
font-size: 14px;
}
@ -1687,10 +1734,12 @@ export default {
width: 18px;
height: 18px;
}
.el-checkbox__inner::after {
height: 10px;
left: 6px;
}
.el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;

View File

@ -134,6 +134,7 @@ window._entityMap = new Map();
window.right_entityMap = new Map();
window._echartsMap = new Map();
window._winMap = new Map();
window.udp_pointMap = new Map();
window.$AIRLINE_MAP = new Map();
window.$POINT_MAP = new Map();
window.$PATH = null;

View File

@ -10,7 +10,7 @@ console.log("process.env.APP_VERSION", process.env.APP_VERSION);
// 创建axios实例
const request = axios.create({
// baseURL: getIP() + "/yjearth4.0", // api的base_url
timeout: 15000, // 请求超时时间
timeout: 30000, // 请求超时时间
});
console.log(request);
const request_get = (url, params) => {

View File

@ -95,7 +95,7 @@
<div class="transformDrawerItem">
<span>源文件路径</span>
<el-input size="medium" v-model="input" :placeholder="item.placeholder ? item.placeholder : '请输入文件路径'
">
">
<template slot="append">
<el-button @click="openDialog(item)">
<i class="el-icon-more"></i>
@ -107,7 +107,7 @@
<div class="transformDrawerItem">
<span>存放路径</span>
<el-input size="medium" v-model="output" :placeholder="item.outplaceholder ? item.outplaceholder : '请输入文件路径'
">
">
<template slot="append">
<el-button @click="openSaveDialog(item)">
<i class="el-icon-more"></i>
@ -143,26 +143,26 @@
<!--右侧元素指挥舱-->
<!--新增态势0827-->
<div v-if="editSituation" :class="[
'cabinBox',
'animate__animated',
typeof showCabin == 'boolean'
? showCabin
? 'animate__zoomOutRight'
: 'animate__zoomInRight'
: '',
]">
'cabinBox',
'animate__animated',
typeof showCabin == 'boolean'
? showCabin
? 'animate__zoomOutRight'
: 'animate__zoomInRight'
: '',
]">
<cabin @changeShow="changeShow('showCabin', 'showCabinBtn')" ref="cabin"></cabin>
</div>
<div v-if="editSituation && typeof showCabinBtn == 'boolean'" :class="[
'cabinShowBtn',
'cabinShowBtn',
'animate__animated',
typeof showCabinBtn == 'boolean'
? showCabinBtn
? 'animate__lightSpeedInRight'
: 'animate__lightSpeedOutRight'
: '',
]">
'cabinShowBtn',
'cabinShowBtn',
'animate__animated',
typeof showCabinBtn == 'boolean'
? showCabinBtn
? 'animate__lightSpeedInRight'
: 'animate__lightSpeedOutRight'
: '',
]">
<div class="switch-node-outer">
<div class="switch-node-inner" @click="changeShow('showCabinBtn', 'showCabin')">
展开指挥舱
@ -177,26 +177,26 @@
<eventEditor class="eventEditor"></eventEditor>
<!--元素列表框-->
<div :class="[
'elementBox',
'animate__animated',
typeof showElement == 'boolean'
? showElement
? 'animate__zoomOutLeft'
: 'animate__zoomInLeft'
: '',
]" v-if="editSituation">
'elementBox',
'animate__animated',
typeof showElement == 'boolean'
? showElement
? 'animate__zoomOutLeft'
: 'animate__zoomInLeft'
: '',
]" v-if="editSituation">
<elements @changeShow="changeShow('showElement', 'showElementBtn')" v-if="!showList"></elements>
</div>
<!--新增态势0822 -->
<div v-if="editSituation && typeof showElementBtn == 'boolean'" style="left: 0%;" :class="[
'elementShowBtn',
'animate__animated',
typeof showElementBtn == 'boolean'
? showElementBtn
? 'animate__lightSpeedInLeft'
: 'animate__lightSpeedOutLeft'
: '',
]">
'elementShowBtn',
'animate__animated',
typeof showElementBtn == 'boolean'
? showElementBtn
? 'animate__lightSpeedInLeft'
: 'animate__lightSpeedOutLeft'
: '',
]">
<div class="switch-node-outer">
<div class="switch-node-inner" @click="changeShow('showElementBtn', 'showElement')">
展开军标标绘
@ -249,6 +249,16 @@
</template>
<template v-else> -->
<div id="goodSearchEchart"></div>
<!-- <div style="height: 60px;position: relative;">
<el-button class="export-btn" style="
background: rgba(var(--color-sdk-base-rgb), 0.2);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
color: #ffffff;
position: absolute;
right: 20px;
bottom: 20px;
">导出Excel</el-button>
</div> -->
<!-- </template> -->
</div>
</div>
@ -319,6 +329,7 @@ import { obj } from "@/api/dataFromApi";
import { getIP } from "../../utils";
import { getToken } from "@/utils/auth";
import { cusNodeIcon } from "../../components/Tree/treeNode";
// import richTextEditor from "@/components/editor/richTextEditor.vue";
let handleLogin = (that) => {
// 需要登录就去掉“/dashboard”
@ -962,7 +973,7 @@ export default {
window.Earth1.tabHide = ["属性信息"];
}
});
},
}
},
};
</script>
@ -1110,15 +1121,18 @@ export default {
.tufuSelect,
.tacticalBox,
.ModelSetBox,
.modelBoxg{
.modelBoxg {
display: none;
}
.selectImgBox{
.selectImgBox {
z-index: 9999999;
}
.ModelSetBox{
}
.ModelSetBox {
z-index: 10000;
}
.scene {
//width: 5vw;
//height: 5vw;

View File

@ -150,9 +150,9 @@
<div class="tab">
<template v-for="item in serviceOptions">
<span :class="[
'tab-item',
selectedService == item.name ? 'activeService' : '',
]" @click="selectedService = item.name">{{ item.name }}</span>
'tab-item',
selectedService == item.name ? 'activeService' : '',
]" @click="selectedService = item.name">{{ item.name }}</span>
</template>
</div>
<div class="tabPanel">
@ -507,6 +507,20 @@ export default {
//监听服务数据
getPort() {
console.log("监听服务数据");
ipcRenderer.on("sandTable_udp_server_port_str", (event, key, status) => {
let sandTable_udp_client_status = localStorage.getItem('sandTable_udp_client_status')
if (JSON.parse(sandTable_udp_client_status)) {
// 如果status为“K”那么双击的时候就发出关灯指令
let val = udp_pointMap.get(key)
val.command = (status == 'G' ? "B" : "A")
if (val) {
_entityMap.get(val.source_id).flyTo()
}
udp_pointMap.set(key, val)
console.log("sandTable_udp_server_port_str", val)
}
})
ipcRenderer.on("sandTable_udp_server_port", (event, positions, angle) => {
console.log("监听服务数据", positions, angle);
if (positions.length > 0) {
@ -518,7 +532,7 @@ export default {
roll: 0,
},
};
if (positions.length === 1) {
flyToOptions.position = positions[0];
flyToOptions.position.alt = Number(flyToOptions.position.alt) - 500
@ -709,7 +723,7 @@ export default {
break
}
}
if(!flag && headerList && headerList.length>0) {
if (!flag && headerList && headerList.length > 0) {
localStorage.setItem("header", JSON.stringify(headerList[0]))
this.$sendChanel("header")
selectHeader({