创建新仓库

This commit is contained in:
2025-07-03 17:39:09 +08:00
commit c781d38c0c
12944 changed files with 807291 additions and 0 deletions

63
src/index.ejs Normal file
View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
charset="utf-8">
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">-->
<!-- <title>electron-vue-admin</title>-->
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
<script>
require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, "\\\\") %>')
</script>
<% } %>
<link rel="stylesheet" href="static/lib/animate.min.css" />
<style src="static/lib/style.css"></style>
<style src="static/lib/ol/ol.css"></style>
</head>
<!--<script src="static/convert/main.js"></script>-->
<script src="static/sdk/3rdparty/flv.min.js"></script>
<script src="static/sdk/YJEarth.min.js"></script>
<!-- <script src="http://43.142.48.85:15000/sdk/YJEarth.min.js"></script> -->
<script src="static/lib/echarts5.4.2.min.js"></script>
<script src="static/lib/gifler.min.js"></script>
<script src="static/sdk/3rdparty/reconnecting-websocket.js"></script>
<!-- <script src="static/lib/ol/ol.js"></script> -->
<script src="static/lib/getName.js"></script>
<script src="static/lib/testFun.js"></script>
<!-- <script src="static/lib/jquery-1.10.2.js"></script> -->
<!--<script src="static/sdk/mainTime.js"></script>-->
<script src="static/main.js"></script>
<script type="text/javascript" src="static/lib/webrtc/adapter-7.4.0.min.js"></script>
<script type="text/javascript" src="static/lib/webrtc/jquery-1.12.2.min.js"></script>
<script type="text/javascript" src="static/lib/webrtc/srs.sdk.js"></script>
<!-- <script src="http://192.168.0.19:8080/YJEarth.min.js"></script>-->
<body style="width: 100vw;overflow: hidden;">
<div id="app"></div>
<!-- Set `__static` path to static files in production -->
<script type="text/javascript" src="static/lib/wang/index.js"></script>
<script type="text/javascript">
</script>
<script>
window.addEventListener("message", (e) => {
console.log("iframe###############", e)
})
// document.domain = 'http://127.0.0.1:8890';
/*if (process && process.env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')*/
</script>
<% if (process.env.NODE_ENV !=='production' ) { %>
<script>
if (process.env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
</script>
<% } %>
<!-- webpack builds are automatically injected -->
</body>
</html>

99
src/main/back/app.js Normal file
View File

@ -0,0 +1,99 @@
import { ipcRenderer } from "electron";
let net = require("net");
const express = require("express");
const path = require("path");
// const bodyParser = require("body-parser");
import { GetHomeDir } from "./config";
let SERVER_PORTS = 55110;
/**
* 检测端口是否被占用
* @param port
* @param cb
*/
function portIsOccupied(port, cb) {
// 创建服务并监听该端口
port = Number(port);
let server = net.createServer().listen(port);
server.on("listening", function() {
// 执行这块代码说明端口未被占用
server.close(); // 关闭服务
console.log("端口【" + port + "】 可用"); // 控制台输出信息
SERVER_PORTS = port;
cb(port);
});
server.on("error", function(err) {
if (err.code === "EADDRINUSE") {
// 端口已经被使用
console.log("端口【" + port + "】 被占用");
portIsOccupied(++port, cb);
}
});
}
let apps;
function createApp() {
apps = express();
//设置跨域访问
apps.all("*", function(req, res, next) {
//设置允许跨域的域名,*代表允许任意域名跨域
res.header("Access-Control-Allow-Origin", "*");
//允许的header类型
res.header("Access-Control-Allow-Headers", "content-type");
//跨域允许的请求方式
res.header("Access-Control-Allow-Methods", "POST,GET");
if (req.url === "/api/v1/file/upload") {
req.setTimeout(1000 * 60 * 2 * 5 * 2);
res.setTimeout(1000 * 60 * 2 * 5 * 2);
}
if (req.method.toLowerCase() === "options") res.sendStatus(200);
//让options尝试请求快速结束
else {
next();
}
});
// app.use(bodyParser.json());
// app.use(bodyParser.urlencoded({ extended: true }));
let prefix =
process.env.NODE_ENV === "development"
? ""
: "resources/app.asar/dist/electron/";
let static_path = ["./", "static"];
let home_dir = GetHomeDir();
static_path.forEach((p) => {
apps.use(
express.static(
path.join(path.join(home_dir, prefix), p) /*{maxAge: 60 * 1000 * 5}*/
)
);
});
}
function start() {
createApp();
portIsOccupied(SERVER_PORTS, (avilablePort) => {
// avilablePort挂载全局
apps.listen(avilablePort);
// console.log("global.sharedObject", global.avilablePort);
global.sharedObject.avilablePort = avilablePort;
// ipcRenderer.invoke("set-global-variable", "avilablePort", avilablePort);
});
}
//获取项目根目录
// function GetHomeDir() {
// let HOME_DIR = process.cwd()
// if (process.env.NODE_ENV === 'production') {
// let arr = process.execPath.replaceAll("\\", "/").split("/")
// arr.pop()
// HOME_DIR = arr.join("/")
// }
// return HOME_DIR
// }
export { apps, start };

Binary file not shown.

View File

@ -0,0 +1,20 @@
// const ffi = require('ffi-napi');
// const ref = require('ref-napi');
// const path = require('path');
//
// // 加载动态库
// var libPath = path.join(__dirname, 'sum.dll'); // Windows
// var lib = ffi.Library('sum.dll', {'Sum': ['int', ['int', 'int']]});
//
// // 函数签名
// var addFunc = lib.Sum;
// addFunc.async = false;
// addFunc.ret = ref.types.int;
//
// // 调用函数
// // Prints 3
// export function testNapi() {
// var result = addFunc(1, 20);
// console.log(result);
// }
//

21
src/main/back/config.js Normal file
View File

@ -0,0 +1,21 @@
//获取项目根目录
function GetHomeDir() {
let HOME_DIR = process.cwd();
console.log("process.env.NODE_ENV", process.env.NODE_ENV);
if (process.env.NODE_ENV === "production") {
let arr = process.execPath.replaceAll("\\", "/").split("/");
arr.pop();
HOME_DIR = arr.join("/");
}
return HOME_DIR;
}
//获取项目根目录
function GetAsar() {
if (process.env.NODE_ENV === "production") {
let arr = process.execPath.replaceAll("\\", "/").split("/");
arr.pop();
HOME_DIR = arr.join("/");
}
return HOME_DIR;
}
export { GetHomeDir, GetAsar };

View File

@ -0,0 +1,83 @@
//obj
// import convert from "fbx2gltf";
/*const obj2gltf = require('obj2gltf');
const fs = require('fs');*/
//g
const childProcess = require('child_process');
const fs = require('fs');
const os = require('os');
const path = require('path');
const rimraf = require('rimraf');
console.log( path.join(process.cwd(), 'convert/FBX2glTF.exe' ))
export function Fbx2glb() {
function convert(srcFile, destFile, opts = []) {
return new Promise((resolve, reject) => {
try {
let binExt = os.type() === 'Windows_NT' ? '.exe' : '';
// let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF' + binExt);
let tool = path.join(process.cwd(), 'convert/FBX2glTF.exe' );
if (!fs.existsSync(tool)) {
throw new Error(`Unsupported OS: ${os.type()}`);
}
let destExt;
if (destFile.endsWith('.glb')) {
destExt = '.glb';
opts.includes('--binary') || opts.push('--binary');
} else if (destFile.endsWith('.gltf')) {
destExt = '.gltf';
} else {
throw new Error(`Unsupported file extension: ${destFile}`);
}
let srcPath = fs.realpathSync(srcFile);
let destDir = fs.realpathSync(path.dirname(destFile));
let destPath = path.join(destDir, path.basename(destFile, destExt));
let args = opts.slice(0);
args.push('--input', srcPath, '--output', destPath);
let child = childProcess.spawn(tool, args);
let output = '';
child.stdout.on('data', (data) => output += data);
child.stderr.on('data', (data) => output += data);
child.on('error', reject);
child.on('close', code => {
// the FBX SDK may create an .fbm dir during conversion; delete!
let fbmCruft = srcPath.replace(/.fbx$/i, '.fbm');
// don't stick a fork in things if this fails, just log a warning
const onError = error =>
error && console.warn(`Failed to delete ${fbmCruft}: ${error}`);
try {
fs.existsSync(fbmCruft) && rimraf(fbmCruft, {}, onError);
} catch (error) {
onError(error);
}
// non-zero exit code is failure
if (code != 0) {
reject(new Error(`Converter output:\n` +
(output.length ? output : "<none>")));
} else {
resolve(destPath + destExt);
}
});
} catch (error) {
reject(error);
}
});
}
this.fbx2glb= (input, output, callBack) =>{
// const convert = require('fbx2gltf');
convert(input, output, ['--khr-materials-unlit']).then(
destPath => {callBack(destPath)},
error => {callBack(error)}
);
}
}

View File

@ -0,0 +1,75 @@
const path = require('path')
const childProcess = require('child_process')
const _3dtilePath = path.join(process.cwd(), '/convert/_3dtile.exe')
const colladaPath = path.join(process.cwd(), '/collada2gltf/COLLADA2GLTF-bin.exe')
export function osgbToglb(input, output, callBack) {
//路径
const exeFilePath = `start ${_3dtilePath} -f osgb -i ${input} -o ${output}`
/*return*/
start(exeFilePath, callBack)
}
export function shapeToglb(input, output, callBack) {
const exeFilePath = `start ${_3dtilePath} -f shape -i ${input} -o ${output} --height height`
/*return*/
start(exeFilePath, callBack)
}
export function objToglb(input, output, callBack) {
const exeFilePath = `start ${_3dtilePath} -f gltf -i ${input} -o ${output}`
/*return*/
start(exeFilePath, callBack)
}
export function b3dmToglb(input, output, callBack) {
const exeFilePath = `start ${_3dtilePath} -f b3dm -i ${input} -o ${output}`
/*return*/
start(exeFilePath, callBack)
}
function start(exeFilePath, callBack) {
console.log(exeFilePath)
try {
// let resMsg = '成功'
let a = childProcess.exec(exeFilePath, {cwd: path.join(process.cwd(), 'convert')})
a.stdout.on('data', (data) => {
})
a.stderr.on('data', (data) => {
console.log("stderr_________________________")
// resMsg = "失败"
})
a.on('close', function (code) {
console.log('out code_______________________' + code)
callBack()
})
// return resMsg
/* childProcess.exec(exeFilePath, (error, stdout, stderr) => {
/!* if (error) {
console.error(error)
process.exit(1)
} else {
$root_home_index.$message.success("转换完成")
}*!/
console.log(stdout, '转换完成')
})*/
} catch (e) {
console.log(e)
}
}
//obj('./asd.obj', './1.glb')
export function daeTogltf(i, o, c) {
const exeFilePath = `start ${colladaPath} -i ${i} -o ${o}`
try {
let a = childProcess.exec(exeFilePath, {cwd: path.join(process.cwd(), 'collada2gltf')})
a.on('close', function (code) {
c()
})
} catch (e) {
console.log(e)
}
}

View File

@ -0,0 +1,32 @@
//obj
const obj2gltf = require('obj2gltf');
const fs = require('fs');
//g
const gltfPipeline = require('gltf-pipeline');
// const fsExtra = require('fs-extra');
//draco
const processGltf = gltfPipeline.processGltf;
export function Format() {
this.obj2gltf=function(name) {
obj2gltf(name+'.obj')
.then(function(gltf) {
const data = Buffer.from(JSON.stringify(gltf));
fs.writeFileSync(name+'.gltf', data);
});
}
this.obj2glb=function (input, output, callBack) {
const options = {
binary : true
}
obj2gltf(input, options)
.then(function(glb) {
fs.writeFileSync(output, glb);
callBack()
});
}
}
// new Format().fbx2glb("untitled-scene")

339
src/main/back/ipcMain.js Normal file
View File

@ -0,0 +1,339 @@
import { BrowserWindow, dialog, ipcMain, app } from "electron";
import {
osgbToglb,
shapeToglb,
b3dmToglb,
objToglb,
daeTogltf,
} from "./convert/main";
import { Format } from "./convert/obj2gltf";
import { Fbx2glb } from "./convert/fbx2gltf";
import { apps } from "./app";
import { Recorder } from "./recorder";
import os from "os";
import { spawn } from "child_process";
import dayjs from "dayjs";
import { UpdateUdpServerPort, sendMsg } from "../back/sandTable/udpServer";
import { closeChild } from "./processGo";
import { GetHomeDir } from "./config";
// import { Message } from "element-ui"
let fs = require("fs");
const ini = require("ini");
let path = require("path");
let express = require("express");
let cwd = path.join(GetHomeDir(), "/ffplay/");
const http = require("http");
let recorder = "";
// 将 ffplayProcesses 移到文件顶部
let ffplayProcesses = new Map();
export default {
Mainfunc: (mainWindow) => {
ipcMain.on("setStaticFile", (event, url) => {
if (fs.existsSync(url)) {
let arr = url.replaceAll("\\", "/").split("/");
arr.pop();
apps.use(express.static(arr.join("/")));
}
});
ipcMain.on("restart", (e) => {
closeChild();
app.relaunch();
app.exit();
});
ipcMain.on("getHead", (event) => {
event.sender.send("headRes", process.env.Head);
});
// ipcMain.on("restart", e => {
// app.relaunch();
// app.exit();
// });
ipcMain.on("open-directory-dialog", (event, option) => {
dialog
.showOpenDialog(BrowserWindow.getFocusedWindow(), {
properties: option.properties,
filters: option.filters,
})
.then((files) => {
let arr = [];
if (!files.canceled) {
files.filePaths.forEach((url) => {
arr.push(url.replace(/\\/g, "/"));
});
}
event.sender.send("selectedItem", arr);
});
});
ipcMain.on("openFFPlay", (e, obj) => {
let cmd = "";
let platform = os.platform();
if (platform === "win32") {
cmd = "ffplay.exe";
} else {
cmd = "ffplay";
}
let title = obj.name;
console.log("obj", obj);
// `${obj.cameraName}-${obj.ip}-${obj.deviceId}`;
console.log(path.join(GetHomeDir(), `/ffplay/${cmd}`));
let child = spawn(
path.join(GetHomeDir(), `/ffplay/${cmd}`),
[
"-window_title",
title,
"-x",
"1300",
"-y",
"730",
"-rtsp_transport",
"tcp",
obj.url,
],
{
cwd,
stdio: "ignore",
// shell: true,
}
).on("exit", (err) => {
console.log("out");
console.log(err);
e.sender.send("openFFPlayOut", err);
});
/* .on("stdout", function(err, m) {
console.log(m);
});*/
console.log("child", child.pid);
child.unref();
});
ipcMain.on("saveFile", (event, { title, filename, filters }) => {
dialog
.showSaveDialog({
title,
defaultPath: filename,
filters,
})
.then((files) => {
let path = "";
if (!files.canceled) {
path = files.filePath.replace(/\\/g, "/");
}
event.sender.send("selectedFileItem", path);
});
});
ipcMain.on("startRecoder", (event) => {
recorder = new Recorder();
recorder.start();
});
ipcMain.on("endRecoder", (event) => {
// 判断是否存在recorder是否有recorder.end方法
if (!recorder) {
console.log("recorder不存在");
return;
}
recorder.end(() => {
let path = dialog.showSaveDialogSync({
title: "保存视频文件",
defaultPath: dayjs().format("YYYYMMDDHHmmss") + "视频录制.mp4",
filters: [{ name: "文件类型", extensions: ["mp4"] }],
});
if (path != undefined) {
recorder.move(path, () => {
recorder = null;
});
} else {
recorder = null;
}
});
});
ipcMain.on("saveNetFile", (event, { title, filename, filters, url }) => {
dialog
.showSaveDialog({
title,
defaultPath: filename,
filters,
})
.then((files) => {
let path = "";
if (!files.canceled) {
path = files.filePath.replace(/\\/g, "/");
function callBack(key) {
console.log("下载完成");
event.sender.send("saveNetFileRes", key);
}
function downloadFile(url, path) {
/*request(
url,
{ headers: { Accept: "application/octet-stream" } },
(err, res, body) => {
if (!err && res.statusCode === 200) {
const filePath = path;
fs.writeFileSync(filePath, body);
console.log(url);
console.log(`文件已保存到: ${filePath}`);
} else {
console.error("下载文件失败:", err);
}
}
);*/
http
.get(url, (response) => {
let contentLength = parseInt(
response.headers["content-length"]
);
let downloadedLength = 0;
response.pipe(fs.createWriteStream(path));
response.on("end", () => {
callBack("success");
// Message.success('下载成功')
// dialog.showMessageBox(null,{type:'info',message:"下载完成"})
});
})
.on("error", (err) => {
console.log("完成");
callBack("error");
});
}
downloadFile(url, path);
}
/* filePaths = path;
webContents.downloadURL(url);*/
//
});
});
ipcMain.on("requireGEMarkerName", (event, obj) => {
/*
* obj= {
dirName: "GEMarker",
dirName1s: "GEMarker1s"
}
* */
let data = {};
for (const objKey in obj) {
let files = fs.readdirSync(
path.join(
global.__static ? global.__static : GetHomeDir() + "/static",
obj[objKey]
)
);
console.log(files);
for (let i = 0; i < files.length; i++) {
files[i] = obj[objKey] + "/" + files[i];
}
data[obj[objKey]] = files;
}
// let files = fs.readdirSync(path.join(global.__static ? global.__static : GetHomeDir() + "/static", dirName))
// data[dirName] = files
event.sender.send("dirFiles", data);
});
ipcMain.on("transformModel", (event, option) => {
//删除文件保存路径的文件或者文件夹保存路径中的tileset.json和tile
let callBack = (msg) => {
event.sender.send("transformModelRes", "模型转换结束", msg);
};
let { fun, input, output } = option;
switch (fun) {
case "osgbToglb":
osgbToglb(input, output, callBack);
break;
case "shapeToglb":
shapeToglb(input, output, callBack);
break;
case "b3dmToglb":
b3dmToglb(input, output, callBack);
break;
case "objToglb":
//
// objToglb(input, output, callBack)
new Format().obj2glb(input, output, callBack);
break;
case "daeTogltf":
daeTogltf(input, output, callBack);
break;
case "Fbx2glb":
new Fbx2glb().fbx2glb(input, output, callBack);
break;
}
// eval(`${fun}('${input}', '${output}')`)
});
ipcMain.on("newDir", (event, option) => {
let dir = "";
option.paths.forEach((item) => {
dir = path.join(dir, item);
});
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
let filePath = path.join(dir, option.name + ".png");
fs.writeFile(filePath, option.buffer, function(err) {
let res = filePath;
if (err) {
res = "失败";
}
event.sender.send("newDirRes", res);
});
});
// 获取ini中的配置
ipcMain.on("getIniConfig", (event, option) => {
console.log(
"1111111111111111111111111111111111111111111111111111111111111"
);
let iniPath = path.join(
GetHomeDir(),
"/yjearth4_0/static/config/config.ini"
);
console.log("iniPath", iniPath);
const iniContent = ini.parse(fs.readFileSync(iniPath, "utf-8"));
for (const section in option) {
let property = option[section];
if (typeof property == "object") {
for (const key in property) {
iniContent[section][key] = property[key];
}
}
}
fs.writeFileSync(iniPath, ini.stringify(iniContent));
event.sender.send("IniConfig", iniContent);
});
ipcMain.on("submitPort", (event, port) => {
UpdateUdpServerPort(port);
event.sender.send("submitPortRes", port);
});
ipcMain.on("setNodes", (event, val) => {
// console.log("接受到数据", name);
let msg = sendMsg(val);
event.sender.send("replayRenderer", msg);
});
// 监听拖入文件
ipcMain.on("files-dropped", (event, filePaths) => {
event.sender.send("DroppedFiles", filePaths);
});
// 处理获取全局变量的请求
ipcMain.handle("get-shared-object", () => {
return global.sharedObject;
});
// 处理更新全局变量的请求(可选)
ipcMain.handle("set-shared-object", (event, key, value) => {
global.sharedObject[key] = value;
return { success: true };
});
ipcMain.on("changeField", (e, val) => {
mainWindow.webContents.send("changeFields", val);
// e.sender.send("changeFields", val);
});
},
};

33
src/main/back/log.js Normal file
View File

@ -0,0 +1,33 @@
const log4js = require("log4js");
const path = require("path");
let p = process.cwd();
if (process.env.NODE_ENV === "production") {
p = process.execPath.replaceAll("\\", "/").split("/");
p.pop();
p = p.join("/");
}
console.log(path.join(p, "logs/access.log"));
log4js.configure({
appenders: {
access: {
type: "dateFile",
filename: path.join(p, "logs/access.log"),
pattern: "-yyyy-MM-dd-hh",
alwaysIncludePattern: true,
layout: {
type: "pattern",
pattern: "[%d{yyyy-MM-dd hh:mm:ss}] %m",
},
},
},
categories: {
default: {
appenders: ["access"],
level: "debug",
},
},
});
const logger = log4js.getLogger();
export { logger };

View File

@ -0,0 +1,82 @@
const { exec, spawn } = require("child_process");
const os = require("os");
const path = require("path");
const fs = require("fs");
let child = null;
/**
* 运行go后端
* @param dbPath 数据库所在路径
*/
function runProcess(
execPath,
dbPath = "C:\\Users\\Administrator\\Desktop\\go"
) {
// let dir = path.join(process.cwd(), 'static/web')
// console.log("dir",dir);
// if (!fs.existsSync(dir)) {
// fs.mkdirSync(path.join(dir, 'dist'), { recursive: true })
// }
// console.log('yjearth4_0接路径', dbPath)
//不用这个exec
let platform = os.platform();
let cmd = "";
if (platform === "win32") {
cmd = "yjearth4" + execPath + ".exe";
}
if (platform === "linux") {
cmd = "yjearth4" + execPath;
}
if (!fs.existsSync(dbPath)) {
fs.mkdirSync(dbPath);
}
let home_path = path.join(GetHomeDir(), "/yjearth4_0/");
console.log(home_path);
let cmd_path = path.join(home_path, cmd);
console.log("cmd_path0", cmd_path);
child = spawn(cmd_path, [dbPath], {
cwd: home_path,
stdio: "ignore",
// shell: true`
})
.on("exit", (err) => {
console.log("out");
console.log(err);
global.sharedObject.hasService = false;
})
.on("stdio", (err, s) => {
console.log(err);
console.log(s);
});
global.sharedObject.hasService = true;
/* .on("stdout", function(err, m) {
console.log(m);
});*/
// console.log('child', child.pid)
// child.unref()
}
//获取项目根目录
function GetHomeDir() {
let HOME_DIR = process.cwd();
if (process.env.NODE_ENV === "production") {
let arr = process.execPath.replaceAll("\\", "/").split("/");
arr.pop();
HOME_DIR = arr.join("/");
}
return HOME_DIR;
}
function closeChild() {
if (child) {
child.kill();
child = null;
}
}
module.exports = { runProcess, closeChild };
// module.exports = runAppInBackground;

113
src/main/back/recorder.js Normal file
View File

@ -0,0 +1,113 @@
import path from "path";
import fs from "fs";
import { GetHomeDir } from "./config";
const os = require("os");
let platform = os.platform();
const arch = os.arch();
const moment = require("moment");
const { spawn } = require("child_process");
const EventEmitter = require("events");
let ffmpegExePath = path.join(GetHomeDir(), "ffplay");
class MyEmitter extends EventEmitter {}
const myEmitter = new MyEmitter();
class Recorder {
constructor(option = {}) {
this.shell = undefined;
this.filename =
moment(parseInt(new Date().getTime())).format("YYYYMMDDHHmmss") + ".mp4";
this.exe = "ffmpeg.exe";
if (platform === "win32") {
this.exe = "ffmpeg.exe";
this.params = "-f gdigrab -r 30 -y -i desktop -pix_fmt yuv420p";
}
if (platform === "linux") {
switch (arch) {
case "x64":
this.exe = "ffmpeg_x86";
break;
case "arm":
this.exe = "ffmpeg_arm";
break;
}
this.params =
"-v verbose -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -c:v libx264 -preset ultrafast -crf 18";
//-s 1920x1080
// ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -c:v libx264 -preset ultrafast -crf 18 output.mp4
}
this.commands = path.join(GetHomeDir(), "/ffplay/" + this.exe);
}
get_path() {
return path.join(ffmpegExePath, this.filename);
}
start() {
this.exec(this.commands, this.params);
}
exec(commands, param) {
let arr = param.split(" ");
arr.push(this.get_path());
console.log("commands, arr", commands, arr);
this.shell = spawn(commands, arr, {
ffmpegExePath,
// stdio: "ignore",
// shell: true
})
.on("exit", (err) => {
console.log("exit", err);
myEmitter.emit("process-exit");
})
.on("data", function(data) {
// console.log(typeof data);
})
.on("data", function(data) {});
this.shell.unref();
}
end(cb) {
if (!this.shell.killed) {
console.log(this.shell);
this.shell.stdin.write("q");
myEmitter.once("process-exit", () => {
cb();
});
} else {
cb();
}
}
move(dst, cb) {
let readStream = fs.createReadStream(this.get_path());
let writeStream = fs.createWriteStream(dst);
readStream.pipe(writeStream);
readStream.on("end", () => {
fs.unlinkSync(this.get_path());
cb();
});
}
}
/*function start() {
config.recorder = new Recorder()
config.recorder.start()
}
function end(cb) {
config.recorder.end(() => {
cb()
})
}
function getRecorder() {
return config.recorder
}
function resetRecorder() {
config.recorder = null
}
exports.Recorder = {
start,
end,
getRecorder,
resetRecorder,
}*/
export { Recorder };

View File

@ -0,0 +1,148 @@
const dgram = require("dgram");
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) {
server.close();
server = null;
}
let port = GetUdpServerPort().port; //获取本地存储的udp端口
server = dgram.createSocket("udp4");
server.on("listening", () => {
const address = server.address();
console.log(`server running ${address.address}:${address.port}`);
});
server.on("message", (msg, remoteInfo) => {
console.log(
`udp server got ${msg} from ${remoteInfo.address}:${remoteInfo.port}`
);
// logger.info(msg.toString())
// server.send('world', remoteInfo.port, remoteInfo.address)
try {
var s = JSON.parse(msg.toString());
let positions = [];
//角度
let angle = 45;
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{
// console.log("内容不正确");
// }
} catch (err) {
console.log(err);
}
});
server.on("error", (err) => {
console.log("server error", err);
});
server.bind(port);
}
function sendMsg(val) {
let msg;
let port = store.get("sandTable_udp_client_port");
let ip = store.get("sandTable_udp_client_host");
let num = val.toString().split("");
let swit = Number(num.pop());
if (swit == 1 || swit == 0) {
let cnt = num.join("");
if (cnt == "FF") {
const message = Buffer.from([0xff, Number(swit)]);
server.send(message, port, ip);
msg = "发送成功";
} else {
let exp = /^[+-]?\d*(\.\d*)?(e[+-]?\d+)?$/;
if (exp.test(cnt)) {
let cntHex = cnt.toString(16);
let switHex = swit.toString(16);
const message = Buffer.from([cntHex, switHex], "hex");
server.send(message, port, ip);
msg = "发送成功";
} else {
msg = "接受失败";
}
}
}
return msg;
}
/*更新udpserver端口*/
function UpdateUdpServerPort(port) {
store.set(sandTable_udp_server_port, port);
//写进本地缓存
//重新启动udpserver
Init();
}
/*获取本地主机端口*/
function GetUdpServerPort() {
//从本地缓存获取
let port = 6000;
let server_port = store.get(sandTable_udp_server_port);
if (!server_port) {
store.set(sandTable_udp_server_port, port);
} else {
port = server_port;
}
let host = getHostIP();
return { port, host };
}
function getHostIP() {
const os = require("os");
const interfaces = os.networkInterfaces();
let hostIP = "";
console.log(interfaces);
for (const networkInterface in interfaces) {
if (networkInterface.indexOf("以太网") > -1) {
const iface = interfaces[networkInterface];
for (let i = 0; i < iface.length; i++) {
const { address, family, internal } = iface[i];
if (family === "IPv4" && !internal) {
hostIP = address;
break;
}
}
if (hostIP) {
break;
}
}
}
return hostIP;
}
export { GetUdpServerPort, UpdateUdpServerPort, Init, sendMsg };

18
src/main/dbPath.js Normal file
View File

@ -0,0 +1,18 @@
let os = require("os");
let Store = require("electron-store");
let path = new Store().path;
let arr = [];
if (os.platform() == "win32") {
arr = path.split("\\");
}
if (os.platform() == "linux") {
arr = path.split("/");
}
arr[arr.length - 1] = "";
let db_path = arr.join("/");
let exePathStr = process.execPath.replaceAll("\\", "/");
let exePaths = exePathStr.split("/");
exePaths[exePaths.length - 2];
module.exports = { db_path, execPath: exePaths[exePaths.length - 2] };

29
src/main/index.dev.js Normal file
View File

@ -0,0 +1,29 @@
/**
* This file is used specifically and only for development. It installs
* `electron-debug` & `vue-devtools`. There shouldn't be any need to
* modify this file, but it can be used to extend your development
* environment.
*/
/* eslint-disable */
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
// process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
// Set environment for development
process.env.NODE_ENV = 'development'
// Install `electron-debug` with `devtron`
require('electron-debug')({showDevTools: true})
// Install `vue-devtools`
require('electron').app.on('ready', () => {
/*let installExtension = require('electron-devtools-installer')
installExtension.default(installExtension.VUEJS_DEVTOOLS)
.then(() => {
})
.catch(err => {
console.log('Unable to install `vue-devtools`: \n', err)
})*/
})
// Require `main` process to boot app
require('./index')

334
src/main/index.js Normal file
View File

@ -0,0 +1,334 @@
import { app, BrowserWindow, dialog, globalShortcut, Menu } from "electron";
import config from "../../config";
import { runProcess, closeChild } from "./back/processGo";
import { start } from "./back/app";
import { db_path, execPath } from "./dbPath";
import setIpc from "./back/ipcMain";
import testNapi from "./back/awesomeProject3/test";
import * as path from "path";
import { Init } from "./back/sandTable/udpServer";
import { killProcessByName } from "./tool";
import { GetHomeDir } from "./back/config";
const os = require("os");
let sharedObject = {};
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
/**
* Set `__static` path to static files in production
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
*/
if (process.env.NODE_ENV !== "development") {
global.__static = require("path")
.join(__dirname, "/static")
.replace(/\\/g, "\\\\");
}
let mainWindow;
let splashWindow; // 添加启动页窗口变量
const winURL =
process.env.NODE_ENV === "development"
? `http://localhost:` + config.AppConfig.PORT
: `file://${__dirname}/index.html`;
// const splashURL =
// process.env.NODE_ENV === "development"
// ? `http://localhost:${config.AppConfig.PORT}/static/qidong.html`
// : `file://${__dirname}/static/qidong.html`;
const isDev = !app.isPackaged;
// 标准版本
let icon =
process.env.NODE_ENV === "development"
? path.join(GetHomeDir(), "static/logo_ico/81.ico")
: path.join(
GetHomeDir(),
"resources/app.asar/" + "dist/electron/static/logo_ico/81.png"
);
function reExeName() {
let platform = os.platform();
const fs = require("fs");
let cmd = "";
if (platform === "win32") {
cmd = "yjearth4.exe";
}
if (platform === "linux") {
cmd = "yjearth4";
}
let newcmd = "";
if (platform === "win32") {
newcmd = "yjearth4" + execPath + ".exe";
}
if (platform === "linux") {
newcmd = "yjearth4" + execPath;
}
// 文件当前路径和新路径
const oldPath = path.join(GetHomeDir() + "/yjearth4_0/", cmd);
const newPath = path.join(GetHomeDir() + "/yjearth4_0/", newcmd);
console.log("oldPath", newPath);
// 检查文件是否存在
fs.access(oldPath, fs.constants.F_OK, (err) => {
if (err) {
console.error(`${oldPath} does not exist.`);
return;
}
// 重命名文件
fs.rename(oldPath, newPath, (err) => {
if (err) {
console.error(`Error renaming ${oldPath} to ${newPath}: ${err}`);
return;
}
// spawn.
console.log(`File renamed from ${oldPath} to ${newPath}`);
});
});
}
function createSplashWindow() {
splashWindow = new BrowserWindow({
width: 896,
height: 510,
transparent: true,
frame: false,
alwaysOnTop: true,
icon: icon,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
webSecurity: false,
devTools: false,
},
});
splashWindow.loadURL(splashURL);
// 当启动页窗口关闭时,确保主窗口显示
splashWindow.on("closed", () => {
splashWindow = null;
});
splashWindow.webContents.on("did-finish-load", () => {
splashWindow.show();
});
// 添加IPC监听器用于接收从启动页发来的完成消息
const { ipcMain } = require("electron");
// 监听启动页完成的消息
ipcMain.on("splash-completed", () => {
// 启动页进度条已完成,可以关闭启动页并显示主窗口
setTimeout(() => {
if (mainWindow && !mainWindow.isDestroyed()) {
mainWindow.maximize(); // 先最大化
mainWindow.show(); // 再显示
mainWindow.focus();
// 通知登录页面可以开始播放视频
setTimeout(() => {
mainWindow.webContents.send("start-login-video");
}, 200); // 给一点时间让窗口完全显示
}
if (splashWindow && !splashWindow.isDestroyed()) {
splashWindow.close();
}
}, 500);
});
}
function createWindow() {
// 创建启动页窗口
// createSplashWindow();
start();
Init();
let prefix = execPath;
console.log("process.env.NODE_ENV +++", process.env.NODE_ENV);
if (process.env.NODE_ENV === "production") {
reExeName();
} else {
prefix = "";
}
killProcessByName(prefix);
setTimeout(() => {
runProcess(prefix, db_path);
/**
* Initial window options
*/
mainWindow = new BrowserWindow({
minWidth: 1500,
minHeight: 860,
useContentSize: true,
simpleFullscreen: true,
resizable: true,
frame: config.IsUseSysTitle,
icon: icon,
show: true, // 隐藏主窗口
webPreferences: {
// preload: preload, // 加载预加载脚本
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
webSecurity: false,
// 如果是开发模式可以使用devTools
// devTools: process.env.NODE_ENV === 'development',
devTools: true,
// 在macos中启用橡皮动画
scrollBounce: process.platform === "darwin",
// webGL: true,
},
});
mainWindow.loadURL(winURL);
mainWindow.center();
mainWindow.maximize();
setIpc.Mainfunc(mainWindow);
// 创建一个隐藏的无边框窗口,将其父窗口设置为当前登录窗口
mainWindow.webContents.on("did-finish-load", () => {
mainWindow.show(); // 再显示
mainWindow.focus(); // 让窗口获得焦点
// 禁用回车键
// mainWindow.webContents.executeJavaScript(`
// document.addEventListener('keydown', (event) => {
// if (event.key === 'Enter') {
// event.preventDefault();
// return false;
// }
// }, true);
// `);
// 监听文件拖入
mainWindow.webContents.executeJavaScript(`
const { ipcRenderer } = require('electron');
window.addEventListener('dragover', (event) => {
event.preventDefault();
event.dataTransfer.dropEffect = 'copy'; // 显示复制效果
});
window.addEventListener('drop', (event) => {
event.preventDefault();
const files = event.dataTransfer.files;
if (files.length > 0) {
ipcRenderer.send('files-dropped', Array.from(files).map(file => file.path));
}
});
`);
});
// 错误处理(可选)
mainWindow.webContents.on("did-fail-load", () => {
// 这里可以显示错误页面
});
mainWindow.on("closed", () => {
mainWindow = null;
});
mainWindow.on("close", (e) => {
e.preventDefault();
dialog
.showMessageBox(mainWindow, {
type: "warning",
title: "提示",
message: "是否确认退出系统?",
buttons: ["cancel", "ok"],
})
.then((res) => {
if (res.response) {
mainWindow = null;
closeChild();
app.exit();
}
});
});
Menu.setApplicationMenu(null);
if (process.env.NODE_ENV === "development")
mainWindow.webContents.openDevTools({
mode: "undocked",
});
globalShortcut.register("CommandOrControl+f5", () => {
// mainWindow.webContents.send("reload-page");
mainWindow.reload();
// 等待页面加载完成后发送播放视频的消息
mainWindow.webContents.once("did-finish-load", () => {
// 增加延迟时间,确保页面完全加载
setTimeout(() => {
if (mainWindow && !mainWindow.isDestroyed()) {
console.log("发送播放视频消息");
mainWindow.webContents.send("start-login-video");
}
}, 500);
});
});
console.log(mainWindow.WebPreferences);
let flg = true;
globalShortcut.register("CommandOrControl+f12", () => {
mainWindow.openDevTools(flg);
flg = !flg;
});
}, 1000);
// console.log("+++",global.sharedObject);
// global.sharedObject={
// hasService:false,
// avilablePort:null
// }
// start();
// runProcess(db_path);
}
function getmainWindow() {
return mainWindow;
}
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
app.quit();
} else {
app.on("ready", createWindow);
if (app.isReady()) {
}
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit();
}
});
// app.commandLine.appendSwitch('wm-window-animations-disabled');
app.on("activate", () => {
if (mainWindow === null) {
createWindow();
}
});
app.on("second-instance", (event, commandLine, workingDirectory) => {
// 当运行第二个实例时,将会聚焦到myWindow这个窗口
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
});
app.on("before-quit", () => {
closeChild();
});
// testNapi()
global.sharedObject = {
hasService: false,
};
}
export { getmainWindow };
/**
* Auto Updater
*
* Uncomment the following code below and install `electron-updater` to
* support auto updating. Code Signing with a valid certificate is required.
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating
*/
/*
import { autoUpdater } from 'electron-updater'
autoUpdater.on('update-downloaded', () => {
autoUpdater.quitAndInstall()
})
app.on('ready', () => {
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates()
})
*/

7
src/main/preload.js Normal file
View File

@ -0,0 +1,7 @@
const { contextBridge, ipcRenderer } = require("electron");
console.log("preload.js");
contextBridge.exposeInMainWorld("electronAPI", {
getSharedObject: () => ipcRenderer.invoke("get-shared-object"), // 获取全局变量
setSharedObject: (key, value) =>
ipcRenderer.invoke("set-shared-object", key, value), // 更新全局变量(可选)
});

65
src/main/tool.js Normal file
View File

@ -0,0 +1,65 @@
const { exec } = require("child_process");
const os = require("os");
function killProcessByName(processName) {
let command;
switch (os.platform()) {
case "win32":
processName = "yjearth4" + processName + ".exe";
// Windows 系统下使用 tasklist 和 taskkill 命令
command = `tasklist | findstr "${processName}"`;
exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`执行 tasklist 命令时出错: ${error}`);
return;
}
const lines = stdout.split("\n");
for (const line of lines) {
if (line.includes(processName)) {
const fields = line.split(/\s+/);
const pid = fields[1];
exec(`taskkill /F /PID ${pid}`, (err) => {
if (err) {
console.error(`杀死进程时出错: ${err}`);
return;
}
console.log(
`已在 Windows 系统杀死进程 ${processName} (PID: ${pid})`
);
});
}
}
});
break;
case "linux":
// Linux 系统下使用 ps 和 kill 命令
command = `ps -ef | grep "yjearth4${processName}"`;
exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`执行 ps 命令时出错: ${error}`);
return;
}
const lines = stdout.split("\n");
for (const line of lines) {
if (line.includes(processName)) {
const fields = line.split(/\s+/);
const pid = fields[1];
exec(`kill -9 ${pid}`, (err) => {
if (err) {
console.error(`杀死进程时出错: ${err}`);
return;
}
console.log(
`已在 Linux 系统杀死进程 ${processName} (PID: ${pid})`
);
});
}
}
});
break;
default:
console.error(`不支持的操作系统: ${os.platform()}`);
}
}
export { killProcessByName };

36
src/renderer/App.vue Normal file
View File

@ -0,0 +1,36 @@
c<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: "App",
};
</script>
<style lang="scss">
@import "./styles/index.scss"; // 全局自定义的css样式
#app {
height: 100vh;
}
// .el-select-dropdown.el-popper {
// background: rgba(0, 0, 0, 0.5);
// border: 1px solid rgba(0, 255, 255, 0.5);
// backdrop-filter: blur(2px);
// span {
// color: rgba(255, 255, 255, 1);
// }
// .hover {
// background: rgba(0, 255, 255, 0.2);
// }
// }
// .el-popper .popper__arrow,
// .el-popper .popper__arrow::after {
// display: none !important;
// }</style>

View File

@ -0,0 +1,524 @@
import { get, request } from "@/api/request";
import { Message } from "element-ui";
//获取指挥舱列表
export function list(cb, param = {}) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return get("/source/list", param).then((res) => {
CallBack({ res }, cb, false);
});
}
//删除资源
export function sourceDel(param = { ids: [] }, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/source/del", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
export function sourceUpdateIndex(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/source/update/tree_index",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//显示资源
export function tsourceShow(param = { source_ids: [] }, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/source/show", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//隐藏资源
export function tsourceHide(param = { source_ids: [] }, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/source/hide", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加文件夹
export function addDirectory(
cb,
param = { p_id: 0, name: "", tree_index: "" }
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/directory/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// xiugai文件夹http://192.168.110.4:8894/yjearth4.0/api/v1/ts/directory/update
export function editDirectory(
param = { p_id: 0, name: "", tree_index: "" },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/directory/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
// 添加点标注
export function addPoint(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/point/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} // 添加线标注
export function addPolyline(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/polyline/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加面标注
export function addPolygon(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/polygon/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加圆标注
export function addCircle(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/circle/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加攻击箭头
export function addAttackarrow(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/attackarrow/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加钳形箭头
export function addPincerarrow(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/pincerarrow/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} // 添加人工模型
export function addModel(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/model/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加火焰
export function addFire(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/fire/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加喷泉
export function addFountain(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/fountain/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 添加烟雾
export function addSmoke(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/smoke/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} // 添加水流
export function addWaterflow(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/waterflow/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//添加贴地图像
export function addGroundImage(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/ground_image/add",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//添加贴地图像
export function addStand_text(
param = { p_id: 0, name: "", tree_index: "", detail: {} },
cb
) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/stand_text/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 事件列表
//http://192.168.110.4:8894/yjearth4.0/api/v1/ts/events/list
export function eventList(param = {}, cb) {
return get("/events/list", param).then((res) => {
CallBack({ res }, cb, false);
});
}
// 添加事件
export function addEvent(param, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/events/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 删除事件
export function eventDel(param = { id: 0 }, cb) {
return request({ url: "/events/del", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 更新事件http://192.168.110.4:8894/yjearth4.0/api/v1/ts/events/update
export function eventUpdate(param = { id: 0 }, cb) {
typeof param.detail === "object" &&
(param.detail = JSON.stringify(param.detail));
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/events/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//方案列表
export function planList(param = {}, cb) {
return get("/plan/list", param).then((res) => {
CallBack({ res }, cb, false);
});
}
//添加方案
export function addPlan(param = {}, cb) {
console.log("param", param);
return request({ url: "/plan/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//删除方案
export function delPlan(param = {}, cb) {
return request({ url: "/plan/del", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//数据
export function tilesetList(param = {}, cb) {
return get("/tileset/list", param).then((res) => {
CallBack({ res }, cb, false);
});
}
// 更新layer——index
export function layerOrder(param = [], cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/order", method: "post", data: param }).then((res) => {
CallBack({ res }, cb);
});
}
//数据
export function tilesetAdd(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/tileset/add", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//更新模型
export function tilesetUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/update-info", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//更新图像
export function layerUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/update-info", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
// 新增26
// 修改http://192.168.110.4:8894/yjearth4.0/api/v1/ts/attackarrow/update
export function attackarrowUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/attackarrow/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//修改圆标注http://192.168.110.4:8894/yjearth4.0/api/v1/ts/circle/update
export function circleUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/circle/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//修改文件夹http://192.168.110.4:8894/yjearth4.0/api/v1/ts/directory/update
export function directoryUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/directory/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//修改火焰http://192.168.110.4:8894/yjearth4.0/api/v1/ts/fire/update
export function fireUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/fire/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//修改喷泉http://192.168.110.4:8894/yjearth4.0/api/v1/ts/fountain/update
export function fountainUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/fountain/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//修改贴地图像http://192.168.110.4:8894/yjearth4.0/api/v1/ts/ground_image/update
export function ground_imageUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/ground_image/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//修改模型http://192.168.110.4:8894/yjearth4.0/api/v1/ts/model/update
export function modelUpdate(param = {}, cb) {
// param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/model/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
}
//修改钳形箭头http://192.168.110.4:8894/yjearth4.0/api/v1/ts/pincerarrow/update
export function pincerarrowUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/pincerarrow/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
} //修改点http://192.168.110.4:8894/yjearth4.0/api/v1/ts/point/update
export function pointUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return (request({
url: "/point/update",
method: "post",
data: param,
}).param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID);
then((res) => {
CallBack({ res }, cb);
});
} //修改多边形http://192.168.110.4:8894/yjearth4.0/api/v1/ts/polygon/update
export function polygonUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/polygon/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} //修改多边形http://192.168.110.4:8894/yjearth4.0/api/v1/ts/polyline/update
export function polylineUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/polyline/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} //修改烟雾http://192.168.110.4:8894/yjearth4.0/api/v1/ts/smoke/update
export function smokeUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({ url: "/smoke/update", method: "post", data: param }).then(
(res) => {
CallBack({ res }, cb);
}
);
} //修改烟雾http://192.168.110.4:8894/yjearth4.0/api/v1/ts/stand_text/update
export function stand_textUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/stand_text/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
//修改喷水http://192.168.110.4:8894/yjearth4.0/api/v1/ts/waterflow/update
export function waterflowUpdate(param = {}, cb) {
param.plan_id = window.currentPlan.plan_id || window.currentPlan.ID;
return request({
url: "/waterflow/update",
method: "post",
data: param,
}).then((res) => {
CallBack({ res }, cb);
});
}
let CallBack = ({ res }, cb, notice = true) => {
if (res.status == 200) {
//请求完成判断请求返回code
if (res.data.code == 0) {
if (notice) Message.success("操作成功");
cb(res.data.data);
} else {
//提示
Message.error(res.data.message || "操作失败");
}
} else Message.error("接口请求失败,错误码:" + res.status);
};
//获取军标列表junbiao_2d/type/list
export function junbiao_2d_list(cb, param = {}) {
return get("/junbiao_2d/type/list", param, false).then((res) => {
CallBack({ res }, cb, false);
});
}
export function model_list(cb, param = {}) {
return get("/model/type/list", param, false).then((res) => {
CallBack({ res }, cb, false);
});
}
export function previewList(cb,param = {}, ) {
return get("/preview/list", param,false).then(( res) => {
CallBack({ res }, cb,false);
});
}

430
src/renderer/api/air.js Normal file
View File

@ -0,0 +1,430 @@
import { request } from "../utils/requset2.js";
// 开关空调
export function airConditionerModeSwitch(data) {
return request({
url: "/dj/remote/debug/airConditionerModeSwitch",
method: "post",
data,
});
}
// 生成航线文件
export function waypoint(data) {
return request({
url: "/dj/router/waypoint",
method: "post",
data,
});
}
// 创建任务 /dj/task/create
export function taskCreate(data) {
return request({
url: "/dj/missions/create",
method: "post",
data,
});
}
// 下发任务 /dj/flightTaskPrepare
export function flightTaskPrepare(data) {
return request({
url: "/dj/flightTaskPrepare",
method: "post",
data,
});
}
// 执行任务
export function flightTaskExecute(data) {
return request({
url: "/dj/flightTaskExecute",
method: "post",
data,
});
}
// 取消任务
export function flightTaskUndo(data) {
return request({
url: "/dj/flightTaskUndo",
method: "post",
data,
});
}
// 恢复航线
export function flightTaskRecovery(data) {
return request({
url: "/dj/flightTaskRecovery",
method: "post",
data,
});
}
// 恢复航线
export function flightTaskPause(data) {
return request({
url: "/dj/flightTaskPause",
method: "post",
data,
});
}
// 一键返航
export function returnHome(data) {
return request({
url: "/dj/returnHome",
method: "post",
data,
});
}
// 无参飞行指令
export function noDataFlight(data) {
return request({
url: "/dj/cmdFly/noDataFlight",
method: "post",
data,
});
}
// 有参飞行指令
export function hasDataFlight(data) {
return request({
url: "/dj/cmdFly/hasDataFlight",
method: "post",
data,
});
}
// 开启指令
export function drcModeEnte(data) {
return request({
url: "/dj/cmdFly/drcModeEnter",
method: "post",
data,
});
}
// 查询航线文件信息列表
export function listPaths(query) {
return request({
url: "/system/paths/list",
method: "get",
params: query,
});
}
// 删除航线文件信息
export function delPaths(id) {
return request({
url: "/system/paths/" + id,
method: "delete",
});
}
// 查询任务列表
export function listTasks(query) {
return request({
url: "/system/tasks/list",
method: "get",
params: query,
});
}
// 查询无人机任务列表
export function listMissions(query) {
return request({
url: "/system/missions/list",
method: "get",
params: query,
});
}
// 删除无人机任务
export function delMissions(id) {
return request({
url: "/system/missions/" + id,
method: "delete",
});
}
// 远程调试
export function remoteDebug(data) {
return request({
url: "/dj/remote/debug/service",
method: "post",
data,
});
}
// 增强图传
export function sdrWorkmodeSwitch(data) {
return request({
url: "/dj/remote/debug/sdrWorkmodeSwitch",
method: "post",
data,
});
}
// 查询视频设备列表
export function listInfo(query) {
return request({
url: "/system/info/list",
method: "get",
params: query,
});
}
// 登录
export function login(data) {
return request({
url: "/login",
headers: {
isToken: false,
repeatSubmit: false,
},
method: "post",
data: data,
});
}
// 获取文件
export function getFileByflightId(data) {
return request({
url: "/dj/getFileByflightId",
method: "post",
data,
});
}
// 机场列表
export function droneList(data) {
return request({
url: "/system/drone/list",
method: "get",
data,
});
}
// 监听网关
export function gatewaysAdd(data) {
return request({
url: "/dj/gateways/add",
method: "post",
data,
});
}
// 关闭网关
export function gatewaysRemove(data) {
return request({
url: "/dj/gateways/remove",
method: "delete",
data,
});
}
// 添加航线
export function routerAdd(data) {
return request({
url: "/dj/router/add",
method: "post",
data,
});
}
// 复制航线 /dj/router/copy/{id}
export function routerCopy(id) {
return request({
url: "/dj/router/copy/" + id,
method: "post",
});
}
// 重命名文件
export function routerRename(data) {
return request({
url: "/dj/router/rename",
method: "post",
data,
});
}
// 获取文件
export function takeoffList(data) {
return request({
url: "/system/takeoff/list",
method: "get",
data,
});
}
// 切换直播流
export function liveChange(data) {
return request({
url: "/dj/live/change",
method: "post",
data,
});
}
// 设置清晰度 /dj/live/quality
export function liveChangeQuality(data) {
return request({
url: "/dj/live/quality",
method: "post",
data,
});
}
// 开启直播
export function liveStart(data) {
return request({
url: "/dj/live/start",
method: "post",
data,
});
}
// 关闭直播
export function liveStop(data) {
return request({
url: "/dj/live/stop",
method: "post",
data,
});
}
// 静音模式开关
export function propertySet(data) {
return request({
url: "/property/set",
method: "post",
data,
});
}
// 直播相机切换
export function cameraChange(data) {
return request({
url: "/dj/live/camera/change",
method: "post",
data,
});
}
// 新建计划
export function taskAdd(data) {
return request({
url: "/dj/task/add",
method: "post",
data,
});
}
// 计划列表
export function taskList(data) {
return request({
url: "/dj/task/list",
method: "get",
params: data,
});
}
// 新暂停
export function flightTaskPauseNew(data) {
return request({
url: "/dj/task/flightTaskPause",
method: "post",
data,
});
}
// 新恢复
export function flightTaskRecoveryNew(data) {
return request({
url: "/dj/task/flightTaskRecovery",
method: "post",
data,
});
}
// 取消任务
export function flightTaskUndoNew(data) {
return request({
url: "/dj/task/flightTaskUndo",
method: "post",
data,
});
}
// 一键返航 post
export function returnHomeNew(data) {
return request({
url: "/dj/task/returnHome",
method: "post",
data,
});
}
// 删除
export function delMissionsNew(id) {
return request({
url: "/system/new/missions/" + id,
method: "delete",
});
}
// drc飞行控制 /dj/cmdFly/droneControl
export function droneControl(data) {
return request({
url: "/dj/cmdFly/droneControl",
method: "post",
data,
});
}
// drc急停 /dj/cmdFly/droneEmergencyStop
export function droneEmergencyStop(data) {
return request({
url: "/dj/cmdFly/droneEmergencyStop",
method: "post",
data,
});
}
// 取消返航 /dj/returnHomeCancel
export function returnHomeCancel(data) {
return request({
url: "/dj/returnHomeCancel",
method: "post",
data,
});
}
// 导入航线
export function returnImport(data) {
return request({
url: "/dj/router/import",
method: "post",
data,
headers: {
"Content-Type": "multipart/form-data",
},
});
}
// DRC心跳
export function heartBeat(data) {
return request({
url: "/dj/cmdFly/heartBeat",
method: "post",
data,
});
}
// AI识别
export function aiInfo(data) {
return request({
url: "/minio/ai/info",
method: "get",
params: data,
});
}
// 当前最新任务
export function getLatest(data) {
return request({
url: "/dj/task/getLatest",
method: "get",
params: data,
});
}

162
src/renderer/api/air2.js Normal file
View File

@ -0,0 +1,162 @@
import { request } from "../utils/requset3.js";
export function login2(data) {
return request({
url: "/manage/api/v1/login",
method: "post",
data: data,
});
}
//http://192.168.110.26:6789/manage/api/v1/devices/e3dea0f5-37f2-4d79-ae58-490af3228069/devices/bound?&page=1&page_size=50&domain=0
export function getDevicesList(id, params) {
return request({
url: "/manage/api/v1/devices/" + id + "/devices/bound",
method: "get",
params,
});
}
// 192.168.110.26:6789/manage/api/v1/live/capacity
export function getLiveCapacity() {
return request({
url: "/manage/api/v1/live/capacity",
method: "get",
});
}
// 开启直播 http://192.168.110.26:6789/manage/api/v1/live/streams/start
// {
// url: "rtmp://192.168.110.26:1935/live/1731915415055";
// url_type: 1;
// video_id: "1581F5FHC249900DLV0C/66-0-0/wide-0";
// video_quality: 1;
// }
export function liveStart(data) {
return request({
url: "/manage/api/v1/live/streams/start",
method: "post",
data,
});
}
// http://192.168.110.26:6789/manage/api/v1/live/streams/stop
// {
// "video_id": "1581F5FHC249900DLV0C/66-0-0/wide-0"
// }
export function liveStop(data) {
return request({
url: "/manage/api/v1/live/streams/stop",
method: "post",
data,
});
}
// http://192.168.110.26:6789/manage/api/v1/live/streams/update
// {
// "video_id": "1581F5FHC249900DLV0C/66-0-0/wide-0",
// "video_quality": 1
// }
export function liveChangeQuality(data) {
return request({
url: "/manage/api/v1/live/streams/update",
method: "post",
data,
});
}
//http://192.168.110.26:6789/media/api/v1/files/e3dea0f5-37f2-4d79-ae58-490af3228069/files?page=1&page_size=50
export function getFilesList(id, params) {
return request({
url: "/media/api/v1/files/" + id + "/files",
method: "get",
params,
});
}
//http://192.168.110.26:6789/media/api/v1/files/e3dea0f5-37f2-4d79-ae58-490af3228069/file/f5b2e75b-22ca-4dbc-8e35-8a8ed80b7c26/url
export async function getFilesUrl(workspaceId, id) {
return await request({
url: "/media/api/v1/files/" + workspaceId + "/file/" + id + "/url",
method: "get",
responseType: "blob",
timeout: 1000000,
});
}
export async function getFileUrl(workspaceId, id) {
return await request({
url: "/media/api/v1/files/" + workspaceId + "/file/" + id + "/view",
method: "get",
});
}
// http://192.168.110.26:6789/wayline/api/v1/workspaces/e3dea0f5-37f2-4d79-ae58-490af3228069/waylines/file/upload
export function uploadFile(workspaceId) {
return request({
url: "/wayline/api/v1/workspaces/" + workspaceId + "/waylines/file/upload",
method: "post",
data,
});
}
// 航线列表
// http://192.168.110.26:6789/wayline/api/v1/workspaces/e3dea0f5-37f2-4d79-ae58-490af3228069/waylines?order_by=update_time%20desc&page=1&page_size=10
export function getWaylinesList(workspaceId, params) {
return request({
url: "/wayline/api/v1/workspaces/" + workspaceId + "/waylines",
method: "get",
params,
});
}
// 航线删除
// http://192.168.110.26:6789/wayline/api/v1/workspaces/e3dea0f5-37f2-4d79-ae58-490af3228069/waylines/6a614fc3-06d8-474e-a2de-3a65b81803d9
export function waylineDel(workspaceId, id) {
return request({
url: "/wayline/api/v1/workspaces/" + workspaceId + "/waylines/" + id,
method: "delete",
});
}
// 航线下载
// http://192.168.110.26:6789/wayline/api/v1/workspaces/e3dea0f5-37f2-4d79-ae58-490af3228069/waylines/7388e1f1-f674-46bb-8479-6f2ef9fd014f/url
export function waylineUrl(workspaceId, id) {
return request({
url:
"/wayline/api/v1/workspaces/" + workspaceId + "/waylines/" + id + "/url",
method: "get",
responseType: "blob",
});
}
// /dj/router/waypoint
// http://192.168.110.26:6789/dj/router/waypoint
export function createWaypoint(data) {
return request({
url: "/dj/router/waypoint",
method: "post",
data,
});
}
// /dj/router/waypoint/update
export function updateWaypoint(data) {
return request({
url: "/dj/router/waypoint/update",
method: "post",
data,
});
}
// 播放视频
export function startStream() {
return request({
url: "/manage/api/v1/live/streams/start",
method: "post",
data,
});
}
//停止播放
export function stopStream() {
return request({
url: "/manage/api/v1/live/streams/stop",
method: "post",
data,
});
}

View File

@ -0,0 +1,56 @@
import { eventList } from "@/api/aboutCabin";
let tasks = [];
let startTimestamp = 1715063400000;
let endTimestamp = 0;
/*if (tasks.length === 0) {
for (let i = 0; i < 50; i++) {
let obj = {
task_id: i,
task_text: "事件" + (i + 1),
task_index: i,
task_type: "point",
task_parent: 0,
task_property: {},
task_events: [],
task_startTime: startTimestamp + (i + 1) * 8000,
task_endTime:
startTimestamp + (i + 1) * 10000 + parseInt(Math.random() * 10) * 1000,
startFun: () => {
console.log("startFun");
},
endFun: () => {
console.log("endFun");
}
};
obj.task_durationTime = obj.task_endTime - obj.task_startTime;
if (obj.task_endTime > endTimestamp) {
endTimestamp = obj.task_endTime;
}
tasks.push(obj);
}
}*/
// eventList()
export const obj = {
startTimestamp,
tasks,
endTimestamp,
multiplier: 1,
defaultProps: {
task_text: "name",
task_startTime: "start_time",
task_durationTime: "duration",
task_endTime: "end_time"
},
/*columns: [
{ name: "name", label: "名称", width: "100%" },
{ name: "start_time", label: "开始时间", width: "120px", align: "center" },
{ name: "duration", label: "持续时间", width: "70px", align: "center" }
],*/
scales: {
preMainIndex: 1,
scaleHeight: 30
}
};

View File

@ -0,0 +1,118 @@
import { request } from "../utils/requset2.js";
// 获取文件列表
export function getFiles(data) {
return request({
url: "/minio/file",
method: "get",
data,
params: data,
});
}
// 获取ai文件列表
export function getAiFiles(data) {
return request({
url: "/minio/ai/file",
method: "get",
data,
params: data,
});
}
// 获取文件信息
export function getInfo(data) {
return request({
url: "/minio/info",
method: "get",
data,
params: data,
timeout: 30000,
});
}
// 获取ai文件信息
export function getAiInfo(data) {
return request({
url: "/minio/ai/info",
method: "get",
data,
params: data,
timeout: 30000,
});
}
// 下载文件
export function fileDownload(params, onProgress) {
return request({
url: "/minio/download",
method: "post",
params,
responseType: "blob",
timeout: 0,
// header: {
// "Content-Length": Buffer.byteLength(JSON.stringify(params)),
// },
onDownloadProgress: (progressEvent) => {
if (onProgress && typeof onProgress === "function") {
const { loaded, total } = progressEvent;
console.log("progressEvent", progressEvent);
const percentage = Math.round((loaded / total) * 100); // 计算百分比
onProgress(percentage); // 调用传入的 onProgress 回调函数
}
},
});
}
// 删除文件
export function deleteFile(data) {
return request({
url: "/minio/deleteBatch",
method: "delete",
data,
timeout: 0,
});
}
// 删除ai文件
export function deleteAiFile(data) {
return request({
url: "/minio/ai/deleteBatch",
method: "delete",
data,
timeout: 0,
});
}
// 批量下载文件或目录
export function downloadBatch(data, onProgress) {
return request({
url: "/minio/downloadBatch",
method: "post",
responseType: "blob",
data,
timeout: 0,
onDownloadProgress: (progressEvent) => {
if (onProgress && typeof onProgress === "function") {
const { loaded, total } = progressEvent;
console.log("progressEvent", progressEvent);
const percentage = Math.round((loaded / total) * 100); // 计算百分比
onProgress(percentage); // 调用传入的 onProgress 回调函数
}
},
});
}
// 获取某个目录下面的所有文件的URL列表
export function getUrlList(data) {
return request({
url: "/minio/urlList",
method: "post",
data,
params: data,
timeout: 0,
});
}
// 获取某个目录下面的所有文件的URL列表
export function getAiUrlList(data) {
return request({
url: "/minio/ai/urlList",
method: "post",
data,
params: data,
timeout: 0,
});
}

1187
src/renderer/api/gisAPI.js Normal file

File diff suppressed because it is too large Load Diff

31
src/renderer/api/login.js Normal file
View File

@ -0,0 +1,31 @@
import { request, SET_TOKEN_REQ } from "@/utils/request";
export function login(username, password) {
return /*new Promise()*/ request({
url: "/api/v1/user/sign-in",
method: "post",
data: {
username,
password,
},
});
}
// export function getInfo(token) {
// return request({
// url: "/user/info",
// method: "get",
// params: { token },
// });
// }
export function logout() {
return request({
url: "/api/v1/user/logout",
method: "post",
});
}
export function SET_TOKENS() {
SET_TOKEN_REQ();
}

View File

@ -0,0 +1,60 @@
import { getToken } from "@/utils/auth";
import { getAddress } from "../utils/request";
import axios from "axios";
let baseUrl = new URL(`/yjearth4.0/api/v1`, getAddress()); //`/yjearth4.0/api/v1`;
/*console.log("localStorage", localStorage);
// let baseUrl = "http://192.168.110.23:8080/yjearth4.0/api/v1";
console.log("baseUrl", baseUrl);
// let baseUrl = "http://192.168.110.4:8894/yjearth4.0/api/v1";
// let Authorization =
// "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImUxNmQ0MjU2LTE1ZmYtNDgzMi1hMmIwLWQ0ZjVjYjdlMzcwNCJ9.dCIEf5pUTxHeF8mCXN_zr0oNMXUuGFWB08B4N3JYBWVqXhSzNH65yyJ2FHeesG9OUfG-0pkyv7L0P0myIXma_A";
let post = (url, param, isTs = true) => {
let pre = baseUrl + (isTs ? "/ts" : "");
url = pre + url;
return superagent.post(url).set("Authorization", Authorization).send(param);
};
let Authorization = getToken();
let superagent_get = (url, param, isTs = true) => {
let pre = baseUrl + (isTs ? "/ts" : "");
url = pre + url;
return superagent.get(url).set("Authorization", Authorization).query(param);
};
export { post, get };*/
const request = axios.create({
// baseURL: getIP() + "/yjearth4.0", // api的base_url
timeout: 15000, // 请求超时时间
});
let get = (url, param, isTs = true) => {
let pre = baseUrl + (isTs ? "/ts" : "");
url = pre + url;
return request.get(url, { params: param });
};
request.interceptors.request.use(
(config) => {
console.log("????????????????", config);
if (!config.url.startsWith("http://"))
config.url = new URL(
`/yjearth4.0/api/v1/ts` + config.url,
getAddress()
).href;
let token = getToken();
if (token) {
config.headers["Authorization"] = token; // 让每个请求携带自定义token 请根据实际情况自行修改
config.headers["token"] = token; // 让每个请求携带自定义token 请根据实际情况自行修改
}
return config;
},
(error) => {
// Do something with request error
console.log(error); // for debug
Promise.reject(error);
}
);
export { request, get };

View File

@ -0,0 +1,24 @@
export const shpTotalDict = {
shlwz_jzzp: '救灾帐篷',
mb: '棉被',
mymdy: '棉衣、棉大衣',
mjb: '毛巾被',
mt: '毛毯',
dgnsd: '睡袋',
zdc: '折叠床',
jycs: '简易厕所',
xpct: '橡皮船(艇)',
cfz: '冲锋舟',
jsc: '救生船',
jsy: '救生衣',
jsq: '救生圈',
bzd: '编织袋',
md: '麻袋',
csb: '抽水泵',
fdj: '发电机',
yjd: '应急灯',
jzzp: '救灾帐篷',
jzyb: '救灾衣被',
jygj: '救援工具'
};

View File

@ -0,0 +1,9 @@
import { request } from "@/utils/request";
export function getList(params) {
return request({
url: "/table/list",
method: "get",
params
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -0,0 +1,19 @@
import Vue from "vue";
// 使用插件
import VueI18n from "vue-i18n";
import * as vx from "vuex";
import systemSetting from "@/store/modules/systemSetting";
Vue.use(VueI18n);
const i18n = {
locale: systemSetting.state.lang || "zh", // 语言标识,第一次登录默认是中文
messages: {
zh: require("./lang/local_zh"), // 中文
en: require("./lang/local_en"), // 英语
tw: require("./lang/local_tw"), // 台湾
// ... //要多少语言就自己添加多少
},
};
export default i18n;
// module.exports = messages

View File

@ -0,0 +1,345 @@
let obj = require("../../../../../config/app_config");
module.exports = {
title: {
name: obj.productName_en, //"实景三维数字孪生系统"
},
login: {
signIn: "Sign In",
},
dashboard: {
langLable: "English",
},
leftMenu: {
firstMenu: {
measure: "measure",
tool: "tool",
effect: "effect",
bigData: "bigData",
modelLibrary: "modelLibrary",
situation: "situationLibrary",
onlinePictureSource: "onlinePictureSource",
analysis: "analysis",
militaryMark: "militaryMark",
ersanwei: "two and three-dimensional",
junbiao3d: "3D military logo",
},
secondMenu: {
//模型库
imports: "import",
// 测量二级菜单
projectionArea: "projectionArea",
areaMeasure: "areaMeasure",
distanceMeasure: "Ground contact",
heightMeasure: "height",
triangleMeasure: "triangle",
lopeDistanceMeasures: "slope",
projectionDistanceMeasure: "Projection distance",
MeasureAzimuth: "Azimuth measurement",
MeasureAngle: "MeasureAngle",
coorMeasure: "coordinate",
clearMeasure: "clear",
clear: "clear",
// projectionArea: "projectionArea",
// distanceMeasure: "distanceMeasure",
// heightMeasure: "heightMeasure",
// triangleMeasure: "triangleMeasure",
// coorMeasure: "coordinateMeasure",
// clearMeasure: "clearMeasure",
clearPlanning: "clearPlanning",
// 工具二级菜单
BIMEdit: "BIMEdit",
goodsSearch: "goodsSearch",
goodsSearchPolygon: "goodsSearchPolygon",
goodsSearchCircle: "goodsSearchCircle",
rangeQuery: "rangeQuery",
// floodSimulation: "floodSimulation",
destoryRecord: "destoryRecord",
floodSimulation: "flood",
clearQuery: "clearQuery",
graffiti: "graffiti",
clearGraffiti: "clearGraffiti",
HDScreen: "HDScreen",
HDScreenHD: "HDScreenHD",
areaScreen: "areaScreen",
coorLocation: "coorLocation",
perspective: "perspective",
Intervisibility: "View Analysis",
tilesetClipping: "tilesetClipping",
transform: "transform model",
videoRecording: "videoRecording",
clearTilesetClipping: "clearTileset",
pressModel: "press Model",
terrainDig: "terrainDig",
pictureLocation: "pictureLocation",
path: "path",
annotationAggregation: "MarkPoint",
mouseLocation: "mouseLocation",
mouseOver: "mouseOver",
importImg: "Panoramic association",
gdbImport: "GDB import",
projConvert: "Degrees, minutes, and seconds",
projectionConvert: "Projection conversion",
peopleRoomLink: "Human house association",
splitScreen: "Roller blind comparison",
// 特效库二级菜单
fire: "fire",
smoke: "smoke",
explosion: "explosion",
waterSurface: "waterSurface",
radarLightWave: "radar",
diffusedLightWave: "diffused",
scanStereoscopic: "scanStereoscopic",
electronicFence: "elecFence",
entityWall: "entityWall",
multilateralBody: "multilateral",
clearTrajectoryMotion: "clearTrajectoryMotion",
cube: "cube",
trajectoryMotion: "trackMotion",
roadDraw: "roadDraw",
lineDraw: "lineDraw",
rain: "rain",
snow: "snow",
fog: "fog",
nightVision: "night Vision",
skystarry: "Starry sky",
illumination: "Illumination",
light: "light",
heatMap: "heatMap",
importPanorama: "panorama",
fountain: "fountain",
waterL: "water column",
groundText: "GroundText",
standText: "StandText",
// fire: "fire",
// waterSurface: "waterSurface",
// annotationAggregation: "annotationAggregation",
// radarLightWave: "radarLightWave",
// diffusedLightWave: "diffusedLightWave",
// electronicFence: "electronicFence",
// multilateralBody: "multilateralBody",
// cube: "cube",
// trajectoryMotion: "trajectoryMotion",
// roadDraw: "roadDraw",
// lineDraw: "lineDraw",
// rain: "rain",
// snow: "snow",
// 分析二级菜单
inundationAnalysis: "inundation",
visualFieldAnalysis: "viewshed analysis",
visualFieldAnalysis2: "round analysis",
profileAnalysis: "profile",
cutFill: "cutFill",
slopeDirection: "slopeDirection",
contour: "contour",
// inundationAnalysis: "inundationAnalysis",
// visualFieldAnalysis: "visualFieldAnalysis",
// profileAnalysis: "profileAnalysis",
},
},
bottomMenu: {
groundText: "Ground text",
standText: "3D text",
point: "point",
line: "line",
curve: "curve",
panel: "panel",
ellipse: "ellipse",
sector: "sector",
circle: "circle",
attackArrow: "attackArrow",
pincerArrow: "pincerArrow",
rect: "rect",
assemble: "assemble",
unLock: "unLock",
},
headerTitles: {
systemTitle: "System setting",
udp: "Physical sandbox",
ConcurrencyControl: "Concurrency Control",
localIP: "Local IP",
localPort: "Local Port",
week: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
equipment: {
title: "equipment",
addEquipment: "add Equipment",
downloadEquipment: "download Equipment",
bulkImport: "bulk Import",
},
// 0827
isc: {
title: "ISCPlatform",
url: "url",
setInfo: "setInfo",
updateEquipment: "updateEquipment",
},
iconTitle: {
reset: "default view",
fullScreen: "full screen",
set: "setting",
shrink: "shrink",
logout: "logout",
locate: "Satellite positioning",
air: "UAV",
excel: "Excel",
},
auth: "Authorization",
Engineering: "Engineering",
Hikang: "Hikang platform",
Version: "Version",
Theme: "System Setting",
Service: "Service access",
Satellite: "Satellite",
searchWay: {
title: "search mode",
searchWayList: {
poi: "Offline search",
net: "Online search",
},
},
confirm: "confirm",
auths: {
authTime: "Auth time",
authType: "Auth status",
authCode: "Auth code",
upload: "import",
authexpire: "auth expire",
},
service: {
offline: "Offline",
official: "Official",
customize: "customize",
agreements: {
Agreement: "Agreement",
setAgreement: "Protocol setting",
port: "port",
location: "location",
},
},
Engineerings: {
import: "Road import",
importProject: "Project import",
cover: "cover",
increase: "increase",
derive: "Project derive",
importPOI: "importPOI",
},
Hikangs: {
enable: "enable",
},
versions: {
version_code: "Version number",
version_update: "Check for updates",
},
systemSetting: {
setLanguage: "Language",
theme: "Thematic",
defaultView: "defaultView",
defaultData: "Add online data",
management: "management",
showCompass: "show compass",
showLatitudeLongitudeNetwork: "show Latitude And Longitude Network",
showFangliNet: "Fangli Net",
showDistanceLegend: "show distanceLegend",
showToolBar: "show infoBar",
showFPS: "show fps",
showMapX: "show mapX",
occlusion: "Point occlusion",
coordinateSystem: "System Coordinate system",
switch: "switch",
battery: "Battery Info",
sheetIndexStatusSwitch: "Standard map sheet",
skinList: {
yingguangse: "Fluorescent",
gonganlan: "Tech Blue",
hong: "Sun Red",
},
},
model: {
title: "model",
createModelLibrary: "create Model Library",
selectModelLibrary: "select Model Library",
addModelType: "add Model Type",
importModel: "import Model",
updatePoster: "update Poster",
preview: "preview",
updateModel: "update Model",
deleteModel: "delete Model",
editModel: "editModel",
},
graphLabel: {
title: "graph Label",
edit: "edit",
delete: "delete",
importGraph: "import graph",
addLine: "add line",
addPanel: "add panel",
addCircle: "add circle",
createGraphLabelLibrary: "create GraphLabel Library",
selectGraphLabelLibrary: "select GraphLabel Library",
addGraphLabelType: "add GraphLabel Type",
importGraphLabel: "import GraphLabel",
},
user: {
title: "title",
deleteUser: "delete user",
createUser: "create user",
importUser: "import user",
role: "Permissions management",
deleteRole: "delete role",
createRole: "create role",
depart: "depart",
createDepart: "create depart",
deleteDepart: "delete depart",
editDepart: "edit depart",
},
terrain: {
terrainSetting: "Terrain setting",
},
},
rightMenu: {
addResource: "add map data",
addDirectory: "add Directory",
pictureLocation: "add photo data",
importPanorama: "add panoramic data",
edit: "edit Node",
del: "delete Node",
setView: "set View",
resetView: "reset View",
layerRaise: "layer Raise",
layerLower: "layer Lower",
layerToTop: "layer ToTop",
layerToBottom: "layer ToBottom",
addTrajectory: "addTra jectory",
addXlsx: "add Xlsx",
resetPerspective: "reset Perspective",
showAttr: "show Attribute",
importHeader: "import Header",
},
tree: {
// title: "Information",
title: "Layer Control",
layer: "layer",
location: "location",
},
btn: {
search: "search",
treePlaceholder: "Please enter a keyword to search",
selectPlaceholder: "select",
selectNoText: "no select",
},
};

View File

@ -0,0 +1,317 @@
let obj = require("../../../../../config/app_config");
module.exports = {
title: {
name: obj.productName_tw, //"实景三维数字孪生系统"
},
login: {
signIn: "登錄",
},
leftMenu: {
firstMenu: {
measure: "測量庫",
tool: "工具庫",
effect: "特效庫",
bigData: "大數據",
situation: "方案庫",
modelLibrary: "模型庫",
onlinePictureSource: "在線圖源",
analysis: "分析庫",
militaryMark: "軍標庫",
ersanwei: "二三維",
junbiao3d: "三維軍標",
},
secondMenu: {
//模型库
imports: "導入",
// 测量二级菜单
projectionArea: "投影面積",
areaMeasure: "貼地面積",
distanceMeasure: "貼地距離",
heightMeasure: "垂直高度",
triangleMeasure: "空間三角",
coorMeasure: "坐標",
MeasureAngle: "夹角",
lopeDistanceMeasures: "坡度",
MeasureAzimuth: "方位角",
projectionDistanceMeasure: "投影距離",
clearMeasure: "清除測量",
clear: "清除",
// 工具二级菜单
BIMEdit: "BIM編輯",
goodsSearch: "物资統計",
goodsSearchCircle: "圓形統計",
goodsSearchPolgon: "多邊形統計",
rangeQuery: "範圍查詢",
floodSimulation: "淹沒模擬",
clearQuery: "清除查詢",
destoryRecord: "結束錄製",
graffiti: "塗鴉",
clearGraffiti: "清除塗鴉",
HDScreen: "屏幕截圖",
HDScreenHD: "高清出图",
areaScreen: "範圍截圖",
coorLocation: "坐標定位",
perspective: "透視",
Intervisibility: "視線分析",
tilesetClipping: "剖切",
transform: "模型轉換",
videoRecording: "視頻錄製",
routePlan: "路徑規劃",
clearPlanning: "清除路徑規劃",
clearTilesetClipping: "清除剖切",
pressModel: "模型壓平",
terrainDig: "地形開挖",
pictureLocation: "照片定位",
importPanorama: "全景導入",
path: "飛行漫遊",
annotationAggregation: "標註點聚合",
mouseLocation: "鼠標定位",
mouseOver: "結束定位",
importImg: "全景關聯",
gdbImport: "gdb導入",
projConvert: "度分秒",
projectionConvert: "投影轉換",
peopleRoomLink: "人房關聯",
splitScreen: "捲簾對比",
// 特效库二级菜单
fire: "火焰",
smoke: "烟霧",
explosion: "爆炸",
waterSurface: "水面",
radarLightWave: "擴散光波",
diffusedLightWave: "雷達光波",
clearTrajectoryMotion: "清除軌跡",
scanStereoscopic: "立體雷達",
electronicFence: "電子圍墻",
entityWall: "物體牆",
multilateralBody: "多邊體",
cube: "立方體",
trajectoryMotion: "軌跡運動",
roadDraw: "道路繪製",
lineDraw: "線路繪製",
rain: "與",
snow: "雪",
fog: "霧",
nightVision: "夜視",
skystarry: "星空",
illumination: "光照",
light: "光照",
heatMap: "熱力圖",
fountain: "喷泉",
waterL: "喷射水柱",
groundText: "貼地文字",
standText: "立體文字",
// 分析二级菜单
inundationAnalysis: "淹沒分析",
visualFieldAnalysis: "視域分析",
visualFieldAnalysis2: "圆形視域",
profileAnalysis: "剖面分析",
cutFill: "土方分析",
slopeDirection: "坡度坡向",
viewShed: "可視域分析",
contour: "等高線",
},
},
bottomMenu: {
groundText: "貼地文字",
standText: "立體文字",
point: "點",
line: "綫",
curve: "曲線",
panel: "麵",
circle: "圓",
ellipse: "橢圓",
sector: "扇形",
attackArrow: "箭頭",
pincerArrow: "雙箭頭",
rect: "矩形",
assemble: "集結地",
unLock: "鎖定",
},
headerTitles: {
systemTitle: "係統設置",
udp: "物理沙盘",
ConcurrencyControl: "並發量控制",
localIP: "本地IP",
localPort: "本地端口",
week: [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
],
equipment: {
title: "設備管理",
addEquipment: "添加設備",
downloadEquipment: "下載模板",
bulkImport: "批量導入",
},
// 0827
isc: {
title: "ISC平台",
url: "平台地址",
setInfo: "設置平台信息",
updateEquipment: "更新平台設備",
},
iconTitle: {
reset: "默认视角",
fullScreen: "全屏",
set: "設置",
shrink: "退出全屏",
locate: "北鬥定位",
logout: "退出登錄",
air: "無人機",
excel: "Excel",
},
auth: "授權信息",
Engineering: "工程信息",
Hikang: "海康平臺",
Version: "版本信息",
Theme: "係統設置",
Service: "服务接入",
Satellite: "衛星定位",
searchWay: {
title: "搜索方式",
searchWayList: {
poi: "离線搜索",
net: "在線搜索",
},
},
confirm: "確認",
auths: {
authTime: "授權時間",
authType: "授權狀態",
authCode: "授權碼",
upload: "導入",
authexpire: "授權過期",
},
service: {
offline: "離綫服務",
official: "官方服務",
customize: "自定義",
agreements: {
Agreement: "協議",
setAgreement: "協議設置",
port: "端口",
location: "地址",
},
},
Engineerings: {
import: "路網導入",
cover: "覆蓋",
increase: "增加",
importProject: "工程導入",
derive: "工程導齣",
importPOI: "導入POI",
},
Hikangs: {
enable: "啓用",
},
versions: {
version_code: "版本號",
version_update: "檢查更新",
},
systemSetting: {
setLanguage: "語言設置",
theme: "主題换膚",
defaultView: "設置默認視角",
defaultData: "添加在線數據",
management: "後臺管理",
showCompass: "導航器",
showLatitudeLongitudeNetwork: "經緯網",
showFangliNet: "方裡網",
showDistanceLegend: "比例尺",
showToolBar: "信息欄",
showFPS: "刷新率",
showMapX: "鷹眼圖",
occlusion: "地形遮擋",
coordinateSystem: "系統坐標系",
switch: "切換",
battery: "電池資訊",
sheetIndexStatusSwitch: "標準圖幅",
skinList: {
yingguangse: "熒光色",
gonganlan: "科技藍",
hong: "烈日紅",
},
},
model: {
title: "模型管理",
createModelLibrary: "創建模型庫",
selectModelLibrary: "選擇模型庫",
addModelType: "添加模型類型",
importModel: "導入模型",
updatePoster: "更換縮略圖",
preview: "預覽",
updateModel: "更換模型",
deleteModel: "刪除",
editModel: "編輯",
},
graphLabel: {
title: "軍標管理",
createGraphLabelLibrary: "創建軍標庫",
selectGraphLabelLibrary: "選擇軍標庫",
addGraphLabelType: "添加軍標類型",
importGraphLabel: "導入軍標",
edit: "編輯",
delete: "刪除",
importGraph: "導入軍標",
addLine: "添加線",
addPanel: "添加面",
addCircle: "添加圓",
},
user: {
title: "用戶管理",
deleteUser: "刪除",
createUser: "創建用戶",
importUser: "導入用戶",
role: "权限管理",
deleteRole: "刪除",
createRole: "創建角色",
depart: "部門管理",
createDepart: "創建部門",
deleteDepart: "創建部門",
editDepart: "修改部門",
},
terrain: {
terrainSetting: "地形設置",
},
},
rightMenu: {
addDirectory: "添加資料夾",
addResource: "添加地圖數據",
pictureLocation: "帶定位照片",
importPanorama: "帶定位全景",
edit: "編輯節點",
del: "刪除節點",
setView: "設置視角",
resetView: "重置視角",
layerRaise: "圖層上移",
layerLower: "圖層下移",
layerToTop: "圖層置頂",
layerToBottom: "圖層置底",
addTrajectory: "軌跡運動",
addXlsx: "添加作戰數據",
resetPerspective: "重置透視",
showAttr: "查看屬性",
importHeader: "導入表头",
},
tree: {
// title: "綜合資訊",
title: "圖層指揮艙",
layer: "圖層",
location: "地點",
},
btn: {
search: "搜索",
treePlaceholder: "請輸入關鍵詞進行搜索",
selectPlaceholder: "請選擇",
selectNoText: "無數據",
},
};

View File

@ -0,0 +1,332 @@
// productName
let obj = require("../../../../../config/app_config");
console.log(obj);
module.exports = {
title: {
name: obj.productName, //"实景三维数字孪生系统"
},
login: {
signIn: "登录",
},
dashboard: {
langLable: "中文简体",
},
leftMenu: {
firstMenu: {
measure: "测量库",
tool: "工具库",
effect: "特效库",
bigData: "大数据",
modelLibrary: "模型库",
situation: "方案库",
onlinePictureSource: "在线图源",
analysis: "分析库",
militaryMark: "军标库",
ersanwei: "二三维",
junbiao3d: "三维军标",
},
secondMenu: {
//模型库
imports: "导入",
// 测量二级菜单
projectionArea: "投影面积",
areaMeasure: "贴地面积",
distanceMeasure: "贴地距离",
heightMeasure: "垂直高度",
triangleMeasure: "空间三角",
coorMeasure: "坐标",
MeasureAngle: "夹角",
clearMeasure: "清除测量",
MeasureAzimuth: "方位角",
lopeDistanceMeasures: "坡度",
projectionDistanceMeasure: "投影距离",
clear: "清除",
// 工具二级菜单
BIMEdit: "BIM编辑",
goodsSearch: "物资统计",
goodsSearchPolgon: "多边形统计",
goodsSearchCircle: "圆形统计",
rangeQuery: "范围查询",
floodSimulation: "淹没模拟",
clearQuery: "清除查询",
destoryRecord: "结束录制",
graffiti: "涂鸦",
stopGraffiti: "结束涂鸦",
clearGraffiti: "清除涂鸦",
HDScreen: "屏幕截图",
HDScreenHD: "高清出图",
areaScreen: "范围截图",
coorLocation: "坐标定位",
perspective: "透视",
Intervisibility: "视线分析",
transform: "模型转换",
videoRecording: "视频录制",
routePlan: "路径规划",
tilesetClipping: "剖切",
clearTilesetClipping: "清除剖切",
pressModel: "模型压平",
terrainDig: "地形开挖",
splitScreen: "卷帘对比",
path: "飞行漫游",
annotationAggregation: "标注点聚合",
mouseLocation: "鼠标定位",
mouseOver: "结束定位",
importImg: "全景关联",
gdbImport: "gdb导入",
projConvert: "度分秒",
projectionConvert: "投影转换",
peopleRoomLink: "人房关联",
// 特效库二级菜单
fire: "火焰",
smoke: "烟雾",
explosion: "爆炸",
waterSurface: "水面",
radarLightWave: "扩散光波",
diffusedLightWave: "雷达光波",
scanStereoscopic: "立体雷达",
electronicFence: "电子围墙",
entityWall: "实体墙",
multilateralBody: "多边体",
cube: "立方体",
trajectoryMotion: "轨迹运动",
clearTrajectoryMotion: "清除轨迹",
roadDraw: "道路绘制",
lineDraw: "线路绘制",
rain: "雨",
snow: "雪",
fog: "雾",
nightVision: "夜视",
skystarry: "星空",
illumination: "光照",
light: "光照",
heatMap: "热力图",
fountain: "喷泉",
waterL: "喷射水柱",
// 分析二级菜单
inundationAnalysis: "淹没分析",
visualFieldAnalysis: "视域分析",
visualFieldAnalysis2: "圆形视域",
profileAnalysis: "剖面分析",
cutFill: "土方分析",
slopeDirection: "坡度坡向",
contour: "等高线",
pictureLocation: "照片定位",
importPanorama: "全景导入",
},
},
bottomMenu: {
groundText: "贴地文字",
standText: "立体文字",
point: "点",
line: "线",
curve: "曲线",
panel: "面",
ellipse: "椭圆",
sector: "扇形",
circle: "圆",
attackArrow: "箭头",
pincerArrow: "双箭头",
assemble: "集结地",
rect: "矩形",
unLock: "锁定",
Lock: "解锁",
},
headerTitles: {
//顶部抬头以及系统设置页面文字汉语翻译
systemTitle: "系统设置",
udp: "物理沙盘",
ConcurrencyControl: "并发量控制",
localIP: "本地IP",
localPort: "本地端口",
remoteIP: "远程IP",
remotePort: "远程端口",
week: [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
],
equipment: {
title: "设备管理",
addEquipment: "添加设备",
downloadEquipment: "下载模板",
bulkImport: "批量导入",
},
// 无人机
air: {
title: "无人机管理",
addAir: "添加无人机",
downloadAir: "下载模板",
},
// 0827
isc: {
title: "ISC平台",
url: "平台地址",
setInfo: "设置平台信息",
updateEquipment: "更新平台设备",
},
iconTitle: {
reset: "默认视角",
fullScreen: "全屏",
set: "设置",
shrink: "退出全屏",
logout: "退出登录",
locate: "北斗定位",
air: "无人机",
excel: "Excel",
},
auth: "授权信息",
Engineering: "工程信息",
Hikang: "海康平台",
Version: "版本信息",
Theme: "系统设置",
Satellite: "卫星定位",
searchWay: {
title: "搜索方式",
searchWayList: {
poi: "离线搜索",
net: "在线搜索",
},
},
Service: "服务接入",
confirm: "确认",
auths: {
authType: "授权状态",
authTime: "授权时间",
authCode: "授权码",
upload: "授权导入",
authexpire: "授权过期",
},
service: {
offline: "离线服务",
official: "官方服务",
customize: "自定义",
agreements: {
Agreement: "协议",
setAgreement: "协议设置",
port: "端口",
location: "地址",
},
},
Engineerings: {
import: "路网导入",
cover: "覆盖",
increase: "增加",
importProject: "工程覆盖导入",
consolidated: "工程合并导入",
derive: "工程导出",
importPOI: "POI导入",
},
Hikangs: {
enable: "启用",
},
versions: {
version_code: "版本号",
version_update: "检查更新",
},
systemSetting: {
setLanguage: "语言设置",
theme: "主题换肤",
defaultView: "设置默认视角",
defaultData: "添加在线数据",
management: "后台管理",
showCompass: "导航器",
showLatitudeLongitudeNetwork: "经纬网",
showFangliNet: "方里网",
showDistanceLegend: "比例尺",
showToolBar: "信息栏",
showFPS: "刷新率",
showMapX: "鹰眼图",
occlusion: "地形遮挡",
coordinateSystem: "系统坐标系",
sheetIndexStatusSwitch: "标准图幅",
switch: "切换",
battery: "电池信息",
skinList: {
yingguangse: "荧光色",
gonganlan: "科技蓝",
hong: "烈日红",
},
},
model: {
title: "模型管理",
createModelLibrary: "创建模型库",
selectModelLibrary: "选择模型库",
addModelType: "添加模型类型",
importModel: "导入模型",
updatePoster: "更换缩略图",
preview: "预览",
updateModel: "更换模型",
deleteModel: "删除",
editModel: "编辑",
},
graphLabel: {
title: "军标管理",
createGraphLabelLibrary: "创建军标库",
selectGraphLabelLibrary: "选择军标库",
addGraphLabelType: "添加军标类型",
importGraphLabel: "导入军标",
edit: "编辑",
delete: "删除",
importGraph: "导入军标",
addLine: "添加线",
addPanel: "添加面",
addCircle: "添加圆",
},
user: {
title: "用户管理",
deleteUser: "删除",
createUser: "创建用户",
importUser: "导入用户",
role: "权限管理",
deleteRole: "删除",
createRole: "创建角色",
depart: "部门管理",
createDepart: "创建部门",
deleteDepart: "删除部门",
editDepart: "修改部门",
},
terrain: {
terrainSetting: "地形设置",
},
},
rightMenu: {
addDirectory: "添加文件夹",
addResource: "添加地图数据",
pictureLocation: "带定位照片",
importPanorama: "带定位全景",
addBIM: "添加BIM",
edit: "编辑节点",
del: "删除节点",
setView: "设置视角",
resetView: "重置视角",
layerRaise: "图层上移",
layerLower: "图层下移",
layerToTop: "图层置顶",
layerToBottom: "图层置底",
tilesetClipping: "剖切",
addTrajectory: "轨迹运动",
addXlsx: "添加作战数据",
showAttr: "查看属性",
importHeader: "导入表头",
resetPerspective: "重置透视",
},
tree: {
title: "图层指挥舱",
// title: "综合信息",
layer: "图层",
location: "地点",
},
btn: {
search: "搜索",
treePlaceholder: "关键词搜索",
selectPlaceholder: "请选择",
selectNoText: "无数据",
},
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Some files were not shown because too many files have changed in this diff Show More