修改
This commit is contained in:
@ -34,6 +34,8 @@
|
||||
"element-plus": "^2.10.4",
|
||||
"express": "^5.1.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"ini": "^5.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.30.1",
|
||||
"pinia": "^3.0.3",
|
||||
|
||||
Binary file not shown.
@ -36,4 +36,4 @@ for %%J in (!TARGET_JARS!) do (
|
||||
:: 清理临时文件
|
||||
del "!TEMP_FILE!" >nul 2>&1
|
||||
echo. && echo 操作完成
|
||||
endlocal && pause
|
||||
endlocal
|
||||
@ -4,10 +4,12 @@ import {electronApp, optimizer, is} from '@electron-toolkit/utils'
|
||||
import icon from '../../resources/earth.png?asset'
|
||||
import {Recorder} from "../preload/recorder";
|
||||
import fs from 'fs'
|
||||
import {exec} from 'child_process'
|
||||
import { exec, spawn } from 'child_process'
|
||||
import dayjs from 'dayjs'
|
||||
import {GetHomeDir} from './config'
|
||||
import {start, getServer} from "./app";
|
||||
import os from "os";
|
||||
import { GetHomeDir } from './config'
|
||||
import { start, getServer } from "./app";
|
||||
const yaml = require("js-yaml");
|
||||
|
||||
|
||||
// 开发环境路径处理 - 确保添加正确的file协议
|
||||
@ -114,13 +116,28 @@ function createWindow(): void {
|
||||
allowRunningInsecureContent: true
|
||||
}
|
||||
})
|
||||
let ymlBatPath = process.env.NODE_ENV === 'development' ? path.resolve(app.getAppPath(), 'resources', 'java', 'app', 'application.yml') : path.join(process.resourcesPath, 'app.asar.unpacked', 'resources', 'java', 'app', 'application.yml')
|
||||
ymlBatPath = process.platform === 'win32' ? ymlBatPath.replace(/^(\w:)/, '/$1') : ymlBatPath
|
||||
ipcMain.on("getIniConfig", (event, option) => {
|
||||
let ymlPath = ymlBatPath.substring(1, 200)
|
||||
console.log("iniPath", ymlPath);
|
||||
|
||||
const ymlContent = yaml.load(fs.readFileSync(ymlPath, 'utf8'));
|
||||
|
||||
if(option) {
|
||||
ymlContent.server.port = option.port
|
||||
fs.writeFileSync(ymlPath, yaml.dump(ymlContent));
|
||||
}
|
||||
|
||||
event.sender.send("YmlConfig", ymlContent);
|
||||
});
|
||||
ipcMain.on("restart", () => {
|
||||
// app.relaunch();
|
||||
// app.quit();
|
||||
// cleanupProcess.kill();
|
||||
// app.relaunch();
|
||||
isRestart = true
|
||||
windowAllClosed()
|
||||
closeAllWindows()
|
||||
});
|
||||
// 监听启动页完成的消息
|
||||
ipcMain.on('splash-completed', () => {
|
||||
@ -259,11 +276,6 @@ function createWindow(): void {
|
||||
|
||||
event.sender.send("dirFiles", data);
|
||||
});
|
||||
ipcMain.on("restart", (e) => {
|
||||
closeChild();
|
||||
app.relaunch();
|
||||
app.exit();
|
||||
});
|
||||
|
||||
let _winMap = new Map();
|
||||
// 监听渲染进程创建新窗口的请求
|
||||
@ -294,6 +306,45 @@ function createWindow(): void {
|
||||
ipcMain.handle('get-_winMap', () => {
|
||||
return _winMap
|
||||
})
|
||||
ipcMain.on("openFFPlay", (e, obj) => {
|
||||
let cmd = "";
|
||||
let platform = os.platform();
|
||||
if (platform === "win32") {
|
||||
cmd = "ffplay.exe";
|
||||
} else {
|
||||
cmd = "ffplay";
|
||||
}
|
||||
let title = obj.name;
|
||||
let child = spawn(
|
||||
path.join(GetHomeDir(), `/ffplay/${cmd}`),
|
||||
[
|
||||
"-window_title",
|
||||
title,
|
||||
"-x",
|
||||
"1300",
|
||||
"-y",
|
||||
"730",
|
||||
"-rtsp_transport",
|
||||
"tcp",
|
||||
obj.url,
|
||||
],
|
||||
{
|
||||
cwd: path.join(GetHomeDir(), "/ffplay/"),
|
||||
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();
|
||||
});
|
||||
// 设置窗口标题和图标
|
||||
mainWindow.webContents.setWindowOpenHandler((details) => {
|
||||
shell.openExternal(details.url)
|
||||
@ -404,7 +455,7 @@ function windowAllClosed() {
|
||||
console.log('所有窗口已关闭,执行清理脚本...');
|
||||
getServer().close(() => {
|
||||
// 执行批处理文件
|
||||
const cleanupProcess = exec(stopBatPath.substring(1, 200), (error, stdout, stderr) => {
|
||||
const cleanupProcess = exec('D:/project/electron-4.0/electron-4/resources/java/stop.bat', (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`清理脚本执行失败: ${error.message}`);
|
||||
}
|
||||
@ -414,17 +465,14 @@ function windowAllClosed() {
|
||||
if (stdout) {
|
||||
console.log(`清理脚本输出: ${stdout}`);
|
||||
}
|
||||
|
||||
// 脚本执行完成后强制退出
|
||||
if (isQuitting) {
|
||||
forceQuit();
|
||||
}
|
||||
});
|
||||
|
||||
// 监听子进程退出事件(确保即使脚本出错也能退出)
|
||||
cleanupProcess.on('exit', (code) => {
|
||||
console.log(`清理脚本退出,代码: ${code}`);
|
||||
if (isQuitting) {
|
||||
forceQuit();
|
||||
}
|
||||
});
|
||||
|
||||
// 超时保护:防止脚本卡住导致应用无法退出
|
||||
@ -434,7 +482,7 @@ function windowAllClosed() {
|
||||
cleanupProcess.kill(); // 终止卡住的脚本
|
||||
forceQuit();
|
||||
}
|
||||
}, 2000); // 2秒超时
|
||||
}, 3000); // 3秒超时
|
||||
})
|
||||
}
|
||||
|
||||
@ -447,19 +495,34 @@ function forceQuit() {
|
||||
// isRestart = false
|
||||
// app.relaunch();
|
||||
// }
|
||||
let child = exec('taskkill /F /T /PID ' + process.pid, (error) => {
|
||||
if (error) console.error('强制终止失败:', error);
|
||||
child.kill();
|
||||
});
|
||||
// let child = exec('taskkill /F /T /PID ' + process.pid, (error) => {
|
||||
// if (error) console.error('强制终止失败:', error);
|
||||
// child.kill();
|
||||
// });
|
||||
if (isRestart) {
|
||||
app.relaunch();
|
||||
}
|
||||
console.log('------退出-------');
|
||||
app.exit();
|
||||
app.quit();
|
||||
} else {
|
||||
// 其他系统
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
function closeAllWindows() {
|
||||
// 1. 获取所有已打开的窗口
|
||||
const allWindows = BrowserWindow.getAllWindows();
|
||||
|
||||
// 2. 遍历关闭每个窗口
|
||||
allWindows.forEach(window => {
|
||||
if (!window.isDestroyed()) { // 避免操作已销毁的窗口(防止报错)
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log('=================================================')
|
||||
global.sharedObject = {
|
||||
hasService: false,
|
||||
|
||||
@ -1,15 +1,6 @@
|
||||
import { title } from "process";
|
||||
|
||||
export default {
|
||||
week: {
|
||||
0: '星期日',
|
||||
1: '星期一',
|
||||
2: '星期二',
|
||||
3: '星期三',
|
||||
4: '星期四',
|
||||
5: '星期五',
|
||||
6: '星期六'
|
||||
},
|
||||
title: '实景三维电子沙盘系统',
|
||||
week: ['星期日', '星期一', '星期二','星期三', '星期四','星期五', '星期六'],
|
||||
tree: {
|
||||
title: '图层指挥舱',
|
||||
// title: "综合信息",
|
||||
@ -20,7 +11,8 @@ export default {
|
||||
search: '搜索',
|
||||
treePlaceholder: '关键词搜索',
|
||||
selectPlaceholder: '请选择',
|
||||
selectNoText: '无数据'
|
||||
selectNoText: '无数据',
|
||||
confirm: '确定'
|
||||
},
|
||||
rightMenu: {
|
||||
addDirectory: '添加文件夹',
|
||||
@ -73,7 +65,7 @@ export default {
|
||||
diffuseScan: "扩散光波",
|
||||
radarScan: "雷达光波",
|
||||
scanStereoscopic: "立体雷达",
|
||||
polyhedronObject: "多边体",
|
||||
polyhedronObject: "多面体",
|
||||
water: "水面",
|
||||
fountain: '喷泉',
|
||||
waterL: '喷射水柱',
|
||||
@ -107,7 +99,6 @@ export default {
|
||||
lopeDistanceMeasures: '坡度',
|
||||
coorMeasure: "坐标",
|
||||
clear: "清除测量",
|
||||
|
||||
},
|
||||
tool: {
|
||||
routePlan: "路径规划",
|
||||
@ -132,7 +123,6 @@ export default {
|
||||
gdbImport: "gdb导入",
|
||||
circleStatistics: "圆形统计",
|
||||
polygonStatistics: "多边形统计",
|
||||
|
||||
},
|
||||
bottomMenu: {
|
||||
groundText: '贴地文字',
|
||||
@ -148,11 +138,11 @@ export default {
|
||||
pincerArrow: '双箭头',
|
||||
rendezvous: '集结地',
|
||||
rectangle: '矩形',
|
||||
unLock: '锁定',
|
||||
Lock: '解锁'
|
||||
unLock: '解锁',
|
||||
Lock: '锁定'
|
||||
},
|
||||
system: {
|
||||
systemTitle: '系统设置',
|
||||
systemTitle: '系统面板',
|
||||
authorize: '授权信息',
|
||||
setting: '系统设置',
|
||||
project: '工程信息',
|
||||
@ -172,10 +162,16 @@ export default {
|
||||
noAuthexpire: '暂未授权',
|
||||
},
|
||||
systemSetting: {
|
||||
setStyle: '风格设置',
|
||||
setCoordinates: '坐标设置',
|
||||
setUnit: '单位设置',
|
||||
setFunction: '功能设置',
|
||||
setLanguage: '语言设置',
|
||||
theme: '主题换肤',
|
||||
defaultView: '设置',
|
||||
defaultViewLabel: '默认视角',
|
||||
defaultData: '添加',
|
||||
defaultDataLabel: '在线数据',
|
||||
intoBack: '进入',
|
||||
management: '后台管理',
|
||||
showCompass: '导航器',
|
||||
@ -226,4 +222,4 @@ export default {
|
||||
title: '图标选择',
|
||||
setting: '默认图标参数设置'
|
||||
}
|
||||
}
|
||||
} as const
|
||||
|
||||
@ -1,11 +1,50 @@
|
||||
export default {
|
||||
login: {
|
||||
signIn: 'Sign In'
|
||||
title: 'Realistic 3D electronic sand table system',
|
||||
week: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
tree: {
|
||||
// title: "Information",
|
||||
title: 'Layer Control',
|
||||
layer: 'layer',
|
||||
location: 'location'
|
||||
},
|
||||
dashboard: {
|
||||
langLable: 'English'
|
||||
btn: {
|
||||
search: 'search',
|
||||
treePlaceholder: 'Please enter a keyword to search',
|
||||
selectPlaceholder: 'select',
|
||||
selectNoText: 'no select',
|
||||
confirm: 'confirm'
|
||||
},
|
||||
rightMenu: {
|
||||
addResource: 'add map data',
|
||||
addDirectory: 'add Directory',
|
||||
pictureLocation: 'add photo data',
|
||||
importPanorama: 'add panoramic data',
|
||||
addBIM: 'add BIM',
|
||||
edit: 'edit Node',
|
||||
del: 'delete Node',
|
||||
setView: 'set View',
|
||||
resetView: 'reset View',
|
||||
layerRaise: 'layer Raise',
|
||||
layerLower: 'layer Lower',
|
||||
layerToTop: 'layer ToTop',
|
||||
layerToBottom: 'layer ToBottom',
|
||||
tilesetClipping: 'tileset Clipping',
|
||||
addTrajectory: 'addTra jectory',
|
||||
addXlsx: 'add Xlsx',
|
||||
showAttr: 'show Attribute',
|
||||
importHeader: 'import Header',
|
||||
resetPerspective: 'reset Perspective',
|
||||
},
|
||||
iconTitle: {
|
||||
reset: 'default view',
|
||||
fullScreen: 'full screen',
|
||||
set: 'setting',
|
||||
shrink: 'shrink',
|
||||
logout: 'logout',
|
||||
locate: 'Satellite positioning',
|
||||
air: 'UAV',
|
||||
excel: 'Excel'
|
||||
},
|
||||
leftMenu: {
|
||||
firstMenu: {
|
||||
measure: 'measure',
|
||||
tool: 'tool',
|
||||
@ -19,318 +58,168 @@ export default {
|
||||
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',
|
||||
effect: {
|
||||
trajectoryMotion: "trackMotion",
|
||||
wallStereoscopic: "elecFence",
|
||||
entityWall: 'entityWall',
|
||||
diffuseScan: "diffused",
|
||||
radarScan: "radar",
|
||||
scanStereoscopic: "scanStereoscopic",
|
||||
polyhedronObject: "polyhedron",
|
||||
water: "water surface",
|
||||
fountain: 'fountain',
|
||||
waterL: 'water column',
|
||||
fire: "fire",
|
||||
explosion: "explosion",
|
||||
smoke: "smoke",
|
||||
nightVision: 'night vision',
|
||||
flyLine: 'flyLine',
|
||||
},
|
||||
analysis: {
|
||||
inundationAnalysis: "inundation",
|
||||
profileAnalysis: "profile",
|
||||
sightAnalysis: "intervisibility analysis",
|
||||
kenAnalysis: "Visual field analysis",
|
||||
circleKen: "round analysis",
|
||||
slopeDirection: "slopeDirection",
|
||||
cutFill: "cutFill",
|
||||
globalContour: "global contour line",
|
||||
contour: "contour line",
|
||||
clearAnalysis: "clear",
|
||||
},
|
||||
measure: {
|
||||
projectionArea: "projectionArea",
|
||||
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',
|
||||
roam: 'roam',
|
||||
annotationAggregation: 'MarkPoint',
|
||||
mouseLocation: 'mouseLocation',
|
||||
mouseOver: 'mouseOver',
|
||||
importImg: 'Panoramic association',
|
||||
gdbImport: 'GDB import',
|
||||
areaMeasure: "areaMeasure",
|
||||
distanceMeasure: "ground contact",
|
||||
heightMeasure: "height",
|
||||
triangleMeasure: "triangle",
|
||||
MeasureAzimuth: 'azimuth measurement',
|
||||
MeasureAngle: "MeasureAngle",
|
||||
lopeDistanceMeasures: 'slope',
|
||||
coorMeasure: "coordinate",
|
||||
clear: "clear",
|
||||
},
|
||||
tool: {
|
||||
routePlan: "routePlan",
|
||||
clearRoute: 'clear route',
|
||||
graffiti: "graffiti",
|
||||
// stopGraffiti: "结束涂鸦",
|
||||
clearGraffiti: "clear graffiti",
|
||||
roam: "roam",
|
||||
coorLocation: "coorLocation",
|
||||
mouseLocation: "mouseLocation",
|
||||
annotationAggregation: "MarkPoint",
|
||||
splitScreen: 'Roller blind comparison',
|
||||
screenShot: 'screenShot',
|
||||
highQuality: 'HDRendering',
|
||||
videoRecord: 'videoRecording',
|
||||
pressModel: "press Model",
|
||||
terrainDig: "terrainDig",
|
||||
tilesetClipping: "tilesetClipping",
|
||||
clearTilesetClipping: "clearTilesetClipping",
|
||||
projConvert: 'Degrees, minutes, and seconds',
|
||||
projectionConvert: 'Projection conversion',
|
||||
peopleRoomLink: 'Human house association',
|
||||
splitScreen: 'Roller blind comparison',
|
||||
|
||||
// 特效库二级菜单
|
||||
fire: 'fire',
|
||||
smoke: 'smoke',
|
||||
explosion: 'explosion',
|
||||
water: 'waterSurface',
|
||||
diffuseScan: 'radar',
|
||||
radarScan: 'diffused',
|
||||
scanStereoscopic: 'scanStereoscopic',
|
||||
wallStereoscopic: 'elecFence',
|
||||
entityWall: 'entityWall',
|
||||
polyhedronObject: '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',
|
||||
flyLine: 'flyLine',
|
||||
|
||||
waterL: 'water column',
|
||||
groundText: 'GroundText',
|
||||
standText: 'StandText',
|
||||
|
||||
// fire: "fire",
|
||||
// water: "waterSurface",
|
||||
// annotationAggregation: "annotationAggregation",
|
||||
// diffuseScan: "radarLightWave",
|
||||
// radarScan: "diffusedLightWave",
|
||||
// wallStereoscopic: "electronicFence",
|
||||
// polyhedronObject: "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',
|
||||
qcontour: 'Global contour'
|
||||
// inundationAnalysis: "inundationAnalysis",
|
||||
// visualFieldAnalysis: "visualFieldAnalysis",
|
||||
// profileAnalysis: "profileAnalysis",
|
||||
}
|
||||
gdbImport: "GDB import",
|
||||
circleStatistics: "goodsSearchCircle",
|
||||
polygonStatistics: "goodsSearch Polygon",
|
||||
},
|
||||
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'
|
||||
groundText: 'Ground Text',
|
||||
standText: '3D Text',
|
||||
point: 'Point',
|
||||
line: 'Line',
|
||||
curve: 'Curve',
|
||||
panel: 'Panel',
|
||||
ellipse: 'Ellipse',
|
||||
sector: 'Sector',
|
||||
circle: 'Circle',
|
||||
attackArrow: 'AttackArrow',
|
||||
pincerArrow: 'PincerArrow',
|
||||
rendezvous: 'Assemble',
|
||||
rectangle: 'Rectangle',
|
||||
unLock: 'UnLock',
|
||||
Lock: 'Lock'
|
||||
},
|
||||
headerTitles: {
|
||||
systemTitle: 'System setting',
|
||||
udp: 'Physical sandbox',
|
||||
ConcurrencyControl: 'Concurrency Control',
|
||||
localIP: 'Local IP',
|
||||
localPort: 'Local Port',
|
||||
weather: 'Weather',
|
||||
week: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
equipment: {
|
||||
title: 'equipment',
|
||||
addEquipment: 'add Equipment',
|
||||
downloadEquipment: 'download Equipment',
|
||||
bulkImport: 'bulk Import'
|
||||
system: {
|
||||
systemTitle: 'Settings',
|
||||
authorize: 'Authorization Information',
|
||||
setting: 'System settings',
|
||||
project: 'Engineering Information',
|
||||
device: 'device management',
|
||||
modelManage: 'Model management',
|
||||
graphLabelManage: 'Military Icon Management',
|
||||
photoManage: 'Icon Management',
|
||||
version: 'Version information'
|
||||
},
|
||||
// 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',
|
||||
authType: 'Authorization status',
|
||||
authTime: 'Authorization time',
|
||||
authCode: 'Authorization 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'
|
||||
authexpire: 'expired',
|
||||
authTempExpire: 'normal',
|
||||
noAuthexpire: 'unauthorized',
|
||||
},
|
||||
systemSetting: {
|
||||
setLanguage: 'Language',
|
||||
theme: 'Thematic',
|
||||
defaultView: 'defaultView',
|
||||
defaultData: 'Add online data',
|
||||
setStyle: 'Style setting',
|
||||
setCoordinates: 'Coordinates setting',
|
||||
setUnit: 'Unit setting',
|
||||
setFunction: 'Function setting',
|
||||
setLanguage: 'Language setting',
|
||||
theme: 'Thematic peel',
|
||||
defaultView: 'setting',
|
||||
defaultViewLabel: 'default view',
|
||||
defaultData: 'add',
|
||||
defaultDataLabel: 'online data',
|
||||
intoBack: 'into',
|
||||
management: 'management',
|
||||
showCompass: 'show compass',
|
||||
showLatitudeLongitudeNetwork: 'show Latitude And Longitude Network',
|
||||
showCompass: 'compass',
|
||||
showLatitudeLongitudeNetwork: 'grid of latitude and longitude',
|
||||
showFangliNet: 'Fangli Net',
|
||||
showDistanceLegend: 'show distanceLegend',
|
||||
showToolBar: 'show infoBar',
|
||||
showFPS: 'show fps',
|
||||
showMapX: 'show mapX',
|
||||
occlusion: 'Point occlusion',
|
||||
showDistanceLegend: 'distanceLegend',
|
||||
showToolBar: 'infoBar',
|
||||
showFPS: 'FPS',
|
||||
showMapX: 'mapX',
|
||||
occlusion: 'point occlusion',
|
||||
coordinateSystem: 'System Coordinate system',
|
||||
sheetIndexStatusSwitch: 'Standard map sheet',
|
||||
switch: 'switch',
|
||||
battery: 'Battery Info',
|
||||
sheetIndexStatusSwitch: 'Standard map sheet',
|
||||
latitude: 'geographic coordinate format',
|
||||
lengthUnit: 'length',
|
||||
areaUnit: 'area',
|
||||
heightUnit: 'height',
|
||||
speedUnit: 'speed',
|
||||
administrativeArea: 'administrativeArea',
|
||||
skinList: {
|
||||
yingguangse: 'Fluorescent',
|
||||
gonganlan: 'Tech Blue',
|
||||
hong: 'Sun Red'
|
||||
}
|
||||
},
|
||||
searchWay: {
|
||||
title: 'search mode',
|
||||
searchWayList: {
|
||||
poi: "Offline search",
|
||||
net: "Online search",
|
||||
},
|
||||
},
|
||||
ConcurrencyControl: 'Concurrency Control',
|
||||
versions: {
|
||||
version_code: "Version number",
|
||||
version_update: "Check for updates",
|
||||
},
|
||||
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'
|
||||
title: "Model",
|
||||
setting: 'default settings'
|
||||
},
|
||||
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'
|
||||
graph: {
|
||||
title: 'Military Icon',
|
||||
setting: 'default settings'
|
||||
},
|
||||
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'
|
||||
photo: {
|
||||
title: 'Icon',
|
||||
setting: 'default settings'
|
||||
}
|
||||
} as const
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
export default {
|
||||
title: '實景三維電子沙盤系統',
|
||||
login: {
|
||||
signIn: '登錄'
|
||||
},
|
||||
@ -127,10 +128,11 @@ export default {
|
||||
pincerArrow: '雙箭頭',
|
||||
rect: '矩形',
|
||||
assemble: '集結地',
|
||||
unLock: '鎖定'
|
||||
unLock: '解鎖',
|
||||
Lock: '鎖定'
|
||||
},
|
||||
headerTitles: {
|
||||
systemTitle: '係統設置',
|
||||
systemTitle: '係統面板',
|
||||
udp: '物理沙盘',
|
||||
ConcurrencyControl: '並發量控制',
|
||||
localIP: '本地IP',
|
||||
|
||||
@ -9,6 +9,7 @@ export const GisApi = {
|
||||
})
|
||||
},
|
||||
|
||||
// 图片定位
|
||||
uploadLocationImage: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/source/uploadLocationImage`,
|
||||
|
||||
19
src/renderer/src/api/systemApi.ts
Normal file
19
src/renderer/src/api/systemApi.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import request from '@/axios/request'
|
||||
|
||||
export const SystemApi = {
|
||||
// 读取系统服务端口配置
|
||||
getSystemService: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/systemService/info`,
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
// 修改系统服务端口配置
|
||||
updateSystemService: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/systemService/updatePort`,
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
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
|
||||
@ -1,348 +0,0 @@
|
||||
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",
|
||||
roam: "roam",
|
||||
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",
|
||||
water: "waterSurface",
|
||||
diffuseScan: "radar",
|
||||
radarScan: "diffused",
|
||||
scanStereoscopic: "scanStereoscopic",
|
||||
wallStereoscopic: "elecFence",
|
||||
entityWall: "entityWall",
|
||||
polyhedronObject: "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",
|
||||
flyLine:"flyLine",
|
||||
|
||||
waterL: "water column",
|
||||
groundText: "GroundText",
|
||||
standText: "StandText",
|
||||
|
||||
// fire: "fire",
|
||||
// water: "waterSurface",
|
||||
// annotationAggregation: "annotationAggregation",
|
||||
// diffuseScan: "radarLightWave",
|
||||
// radarScan: "diffusedLightWave",
|
||||
// wallStereoscopic: "electronicFence",
|
||||
// polyhedronObject: "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",
|
||||
qcontour:'Global 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",
|
||||
weather: "Weather",
|
||||
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",
|
||||
},
|
||||
};
|
||||
@ -1,320 +0,0 @@
|
||||
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: "全景導入",
|
||||
roam: "飛行漫遊",
|
||||
annotationAggregation: "標註點聚合",
|
||||
mouseLocation: "鼠標定位",
|
||||
mouseOver: "結束定位",
|
||||
importImg: "全景關聯",
|
||||
gdbImport: "gdb導入",
|
||||
projConvert: "度分秒",
|
||||
projectionConvert: "投影轉換",
|
||||
peopleRoomLink: "人房關聯",
|
||||
splitScreen: "捲簾對比",
|
||||
// 特效库二级菜单
|
||||
fire: "火焰",
|
||||
smoke: "烟霧",
|
||||
explosion: "爆炸",
|
||||
water: "水面",
|
||||
diffuseScan: "擴散光波",
|
||||
radarScan: "雷達光波",
|
||||
clearTrajectoryMotion: "清除軌跡",
|
||||
scanStereoscopic: "立體雷達",
|
||||
wallStereoscopic: "電子圍墻",
|
||||
entityWall: "物體牆",
|
||||
polyhedronObject: "多邊體",
|
||||
cube: "立方體",
|
||||
trajectoryMotion: "軌跡運動",
|
||||
roadDraw: "道路繪製",
|
||||
lineDraw: "線路繪製",
|
||||
rain: "與",
|
||||
snow: "雪",
|
||||
fog: "霧",
|
||||
nightVision: "夜視",
|
||||
skystarry: "星空",
|
||||
illumination: "光照",
|
||||
light: "光照",
|
||||
heatMap: "熱力圖",
|
||||
fountain: "喷泉",
|
||||
waterL: "喷射水柱",
|
||||
groundText: "貼地文字",
|
||||
standText: "立體文字",
|
||||
flyLine:"飛線",
|
||||
|
||||
// 分析二级菜单
|
||||
inundationAnalysis: "淹沒分析",
|
||||
visualFieldAnalysis: "視域分析",
|
||||
visualFieldAnalysis2: "圆形視域",
|
||||
profileAnalysis: "剖面分析",
|
||||
cutFill: "土方分析",
|
||||
slopeDirection: "坡度坡向",
|
||||
viewShed: "可視域分析",
|
||||
contour: "等高線",
|
||||
qcontour:'全域等高線',
|
||||
},
|
||||
},
|
||||
bottomMenu: {
|
||||
groundText: "貼地文字",
|
||||
standText: "立體文字",
|
||||
point: "點",
|
||||
line: "綫",
|
||||
curve: "曲線",
|
||||
panel: "麵",
|
||||
circle: "圓",
|
||||
ellipse: "橢圓",
|
||||
sector: "扇形",
|
||||
attackArrow: "箭頭",
|
||||
pincerArrow: "雙箭頭",
|
||||
rect: "矩形",
|
||||
assemble: "集結地",
|
||||
unLock: "鎖定",
|
||||
},
|
||||
headerTitles: {
|
||||
systemTitle: "係統設置",
|
||||
udp: "物理沙盘",
|
||||
ConcurrencyControl: "並發量控制",
|
||||
localIP: "本地IP",
|
||||
localPort: "本地端口",
|
||||
weather: "天气",
|
||||
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: "無數據",
|
||||
},
|
||||
};
|
||||
@ -1,330 +0,0 @@
|
||||
// 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: '卷帘对比',
|
||||
|
||||
roam: '飞行漫游',
|
||||
annotationAggregation: '标注点聚合',
|
||||
mouseLocation: '鼠标定位',
|
||||
mouseOver: '结束定位',
|
||||
importImg: '全景关联',
|
||||
gdbImport: 'gdb导入',
|
||||
projConvert: '度分秒',
|
||||
projectionConvert: '投影转换',
|
||||
peopleRoomLink: '人房关联',
|
||||
|
||||
// 特效库二级菜单
|
||||
fire: '火焰',
|
||||
smoke: '烟雾',
|
||||
explosion: '爆炸',
|
||||
water: '水面',
|
||||
diffuseScan: '扩散光波',
|
||||
radarScan: '雷达光波',
|
||||
scanStereoscopic: '立体雷达',
|
||||
wallStereoscopic: '电子围墙',
|
||||
entityWall: '实体墙',
|
||||
polyhedronObject: '多边体',
|
||||
cube: '立方体',
|
||||
trajectoryMotion: '轨迹运动',
|
||||
clearTrajectoryMotion: '清除轨迹',
|
||||
roadDraw: '道路绘制',
|
||||
lineDraw: '线路绘制',
|
||||
rain: '雨',
|
||||
snow: '雪',
|
||||
fog: '雾',
|
||||
nightVision: '夜视',
|
||||
skystarry: '星空',
|
||||
illumination: '光照',
|
||||
light: '光照',
|
||||
heatMap: '热力图',
|
||||
fountain: '喷泉',
|
||||
waterL: '喷射水柱',
|
||||
flyLine: '飞线',
|
||||
// 分析二级菜单
|
||||
inundationAnalysis: '淹没分析',
|
||||
visualFieldAnalysis: '视域分析',
|
||||
visualFieldAnalysis2: '圆形视域',
|
||||
profileAnalysis: '剖面分析',
|
||||
cutFill: '土方分析',
|
||||
slopeDirection: '坡度坡向',
|
||||
contour: '等高线',
|
||||
qcontour: '全局等高线',
|
||||
pictureLocation: '照片定位',
|
||||
importPanorama: '全景导入',
|
||||
clearAnalysis: '清除'
|
||||
}
|
||||
},
|
||||
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: '远程端口',
|
||||
weather: '天气',
|
||||
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: '授权过期',
|
||||
authTempExpire: '授权正常',
|
||||
noAuthexpire: '暂未授权'
|
||||
},
|
||||
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: '无数据'
|
||||
}
|
||||
}
|
||||
@ -5,12 +5,12 @@
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:background="true"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:page-sizes="pageSizes ? pageSizes : [10, 20, 30, 50, 100]"
|
||||
:pager-count="pagerCount"
|
||||
:total="total"
|
||||
:small="isSmall"
|
||||
class="pagination"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:layout='"total, prev, pager, next, jumper" + (pageSizes===false?"":"sizes")'
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
@ -44,6 +44,7 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
pageSizes: {},
|
||||
// 设置最大页码按钮数。 页码按钮的数量,当总页数超过该值时会折叠
|
||||
// 移动端页码按钮的数量端默认值 5
|
||||
pagerCount: {
|
||||
@ -52,7 +53,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:page', 'update:limit', 'pagination'])
|
||||
const emit = defineEmits(['update:page', 'update:limit', 'update:pageSizes', 'pagination'])
|
||||
const currentPage = computed({
|
||||
get() {
|
||||
return props.page
|
||||
@ -71,6 +72,15 @@ const pageSize = computed({
|
||||
emit('update:limit', val)
|
||||
}
|
||||
})
|
||||
const pageSizes = computed({
|
||||
get() {
|
||||
return props.pageSizes
|
||||
},
|
||||
set(val) {
|
||||
// 触发 update:limit 事件,更新 limit 属性,从而更新 pageSize
|
||||
emit('update:pageSizes', val)
|
||||
}
|
||||
})
|
||||
const handleSizeChange = (val) => {
|
||||
// 如果修改后超过最大页面,强制跳转到第 1 页
|
||||
if (currentPage.value * val > props.total) {
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<div class="YJ-custom-base-dialog" :class="className" ref="baseDialog" :id="id" v-if="dialogVisible"
|
||||
v-show="dialogVisible">
|
||||
<div
|
||||
class="YJ-custom-base-dialog"
|
||||
:class="className"
|
||||
ref="baseDialog"
|
||||
:id="id"
|
||||
v-if="dialogVisible"
|
||||
v-show="dialogVisible"
|
||||
>
|
||||
<div class="title-box" ref="titleBox">
|
||||
<span class="title">{{ title }}</span><span class="close-box" @click="close"><span
|
||||
class="close"></span><i>✕</i></span>
|
||||
<span class="title">{{ title }}</span
|
||||
><span class="close-box" @click="close"><span class="close"></span><i>✕</i></span>
|
||||
</div>
|
||||
<div class="content" style="padding: 0 24px 0 24px">
|
||||
<div>
|
||||
@ -77,7 +83,7 @@ const props = defineProps({
|
||||
},
|
||||
closeCallback: {
|
||||
type: Function,
|
||||
default: () => { }
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
|
||||
@ -110,16 +116,16 @@ const open = (data) => {
|
||||
if (!first.value) {
|
||||
first.value = true
|
||||
dialogVisible.value = true
|
||||
}
|
||||
dialogVisible.value = true
|
||||
nextTick(() => {
|
||||
moveDiv()
|
||||
})
|
||||
}
|
||||
dialogVisible.value = true
|
||||
nextTick(() => {
|
||||
// setTimeout(() => {
|
||||
// openPosition()
|
||||
// }, 0)
|
||||
if (baseDialog.value) {
|
||||
if(baseDialog.value) {
|
||||
baseDialog.value.style.width = props.width
|
||||
baseDialog.value.style.height = props.height
|
||||
baseDialog.value.style.top = props.top
|
||||
@ -131,6 +137,7 @@ const open = (data) => {
|
||||
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
first.value = false
|
||||
if (props.clearAnimation) {
|
||||
// 假设mapService是全局可用的
|
||||
window.mapService?.removeAnimation()
|
||||
@ -265,25 +272,20 @@ defineExpose({
|
||||
.YJ-custom-base-dialog {
|
||||
::v-deep .el-tabs {
|
||||
width: 100%;
|
||||
|
||||
.el-tabs__item {
|
||||
padding: 0 8px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-tabs__item:nth-child(2) {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active,
|
||||
.el-tabs__item:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-tabs__active-bar {
|
||||
background-color: rgb(0, 255, 255);
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap:after {
|
||||
background-color: rgba(204, 204, 204, 0.2);
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
>
|
||||
<el-button color="#005c5c" :loading="isUploading">
|
||||
<UploadFilled class="mr-2" />
|
||||
授权导入
|
||||
{{ t("auths.upload") }}
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
@ -19,7 +19,9 @@
|
||||
<script setup lang="ts">
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const eventBus: any = inject('bus')
|
||||
const { t } = useI18n()
|
||||
|
||||
// 组件属性
|
||||
const props = defineProps({
|
||||
|
||||
@ -29,15 +29,6 @@ import '../public/tree/newFuzzySearch'
|
||||
import Pagination from './components/Pagination/index.vue'
|
||||
|
||||
// process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: 'zh-CN',
|
||||
messages: {
|
||||
'zh-CN': zhCN,
|
||||
'zh-TW': zhTW,
|
||||
'zh-EN': zhEN
|
||||
}
|
||||
})
|
||||
|
||||
if (!localStorage.getItem("searchWay")) {
|
||||
localStorage.setItem("searchWay", "poi");
|
||||
@ -64,13 +55,24 @@ if (!localStorage.getItem("AMapKey")) {
|
||||
administrativeArea: false, //行政区划
|
||||
sheetIndexStatusSwitch: false, //标准图幅
|
||||
skinInfo: 'yingguangse', //主题色
|
||||
language: 'zh', //语言
|
||||
language: 'zh-CN', //语言
|
||||
coordinate: 'EPSG:4326', //坐标系
|
||||
positionType: '度'
|
||||
})
|
||||
)
|
||||
: console.log("没有设置系统设置");
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: JSON.parse(localStorage.getItem("systemSetting") || '{}').language || 'zh-CN',
|
||||
messages: {
|
||||
'zh-CN': zhCN,
|
||||
'zh-TW': zhTW,
|
||||
'zh-EN': zhEN
|
||||
}
|
||||
});
|
||||
|
||||
document.title = i18n.global.t('title');
|
||||
|
||||
// 注册全局指令
|
||||
(window as any)._winMap = new Map();
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
<template>
|
||||
<div class="bottomMenuBox zIndex9">
|
||||
<div class="animate__animated bottomMenu">
|
||||
<div
|
||||
class="bottom_box"
|
||||
v-for="(item, i) of bottomMenuList"
|
||||
:key="i"
|
||||
:title="t('bottomMenu.' + item.sourceType)"
|
||||
@click="addMarker(item)"
|
||||
>
|
||||
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)"
|
||||
@click="addMarker(item)">
|
||||
<svg-icon :name="item.sourceType" :size="20" color="rgba(0, 255, 255, 1)"></svg-icon>
|
||||
<div class="span">
|
||||
{{ t('bottomMenu.' + item.sourceType) }}
|
||||
@ -25,10 +20,6 @@ import { addMapSource } from '../../../common/addMapSource'
|
||||
const { t } = useI18n()
|
||||
const eventBus: any = inject('bus')
|
||||
|
||||
const i8n = ref({
|
||||
DrawRect: 'rect',
|
||||
DrawAssemble: 'assemble'
|
||||
})
|
||||
const isFolded: any = ref(false) // 添加折叠状态
|
||||
const initialPositions: any = ref({}) // 保存初始位置
|
||||
const isAnimating: any = ref(false) // 添加动画状态
|
||||
@ -80,7 +71,28 @@ const bottomMenuList = ref([
|
||||
opt: {
|
||||
id: id,
|
||||
name: name,
|
||||
position: position
|
||||
position: position,
|
||||
attribute: {
|
||||
goods: {
|
||||
content: [
|
||||
{
|
||||
id: 1,
|
||||
name: '物资1',
|
||||
cnt: 10
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '物资2',
|
||||
cnt: 10
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '物资3',
|
||||
cnt: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -319,7 +331,7 @@ const bottomMenuList = ref([
|
||||
// {
|
||||
// sourceName: "锁定",
|
||||
// key: "lock",
|
||||
// sourceType: "unLock",
|
||||
// sourceType: "Lock",
|
||||
// className: "public",
|
||||
// },
|
||||
])
|
||||
@ -414,7 +426,7 @@ const addMarker = (item: any) => {
|
||||
transform: scale(0.8);
|
||||
}
|
||||
|
||||
> .span {
|
||||
>.span {
|
||||
color: #fff;
|
||||
font-family: 黑体;
|
||||
font-size: 1rem;
|
||||
|
||||
@ -237,8 +237,8 @@ var expandedKeys: any = ref([])
|
||||
const getExpandedKeys = () => {
|
||||
const nodesMap = treeRef.value?.store?.nodesMap || {}
|
||||
return Object.values(nodesMap)
|
||||
.filter((node) => node.expanded)
|
||||
.map((node) => node.key)
|
||||
.filter((node:any) => node.expanded)
|
||||
.map((node:any) => node.key)
|
||||
}
|
||||
|
||||
// 节点展开/折叠时更新状态
|
||||
|
||||
@ -256,8 +256,8 @@ var expandedKeys: any = ref([])
|
||||
const getExpandedKeys = () => {
|
||||
const nodesMap = treeRef.value?.store?.nodesMap || {}
|
||||
return Object.values(nodesMap)
|
||||
.filter((node) => node.expanded)
|
||||
.map((node) => node.key)
|
||||
.filter((node:any) => node.expanded)
|
||||
.map((node:any) => node.key)
|
||||
}
|
||||
|
||||
// 节点展开/折叠时更新状态
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
:preview-teleported="true"
|
||||
:preview-src-list="modelList.map((item: any) => service + item.iconDataUrl)"
|
||||
style="width: 80px; height: 60px"
|
||||
:src="service + item.iconDataUrl"
|
||||
:src="service + row.iconDataUrl"
|
||||
:initial-index="currentIndex"
|
||||
@click="seeBigPhoto($index)"
|
||||
/>
|
||||
@ -239,8 +239,8 @@ var expandedKeys: any = ref([])
|
||||
const getExpandedKeys = () => {
|
||||
const nodesMap = treeRef.value?.store?.nodesMap || {}
|
||||
return Object.values(nodesMap)
|
||||
.filter((node) => node.expanded)
|
||||
.map((node) => node.key)
|
||||
.filter((node:any) => node.expanded)
|
||||
.map((node:any) => node.key)
|
||||
}
|
||||
|
||||
// 节点展开/折叠时更新状态
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<span class="fankuai"></span>
|
||||
<span class="setting_title">风格设置</span>
|
||||
<span class="setting_title">{{ t('systemSetting.setStyle') }}</span>
|
||||
</div>
|
||||
<div class="seting_content">
|
||||
<!-- 语言设置 -->
|
||||
@ -42,7 +42,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<span class="fankuai"></span>
|
||||
<span class="setting_title">坐标设置</span>
|
||||
<span class="setting_title">{{ t('systemSetting.setCoordinates') }}</span>
|
||||
</div>
|
||||
<div class="seting_content">
|
||||
<!-- 坐标系 -->
|
||||
@ -145,7 +145,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<span class="fankuai"></span>
|
||||
<span class="setting_title">单位设置</span>
|
||||
<span class="setting_title">{{ t('systemSetting.setUnit') }}</span>
|
||||
</div>
|
||||
<div class="seting_content1">
|
||||
<div class="detailSkin1">
|
||||
@ -221,25 +221,25 @@
|
||||
<div>
|
||||
<div>
|
||||
<span class="fankuai"></span>
|
||||
<span class="setting_title">功能设置</span>
|
||||
<span class="setting_title">{{ t('systemSetting.setFunction') }}</span>
|
||||
</div>
|
||||
<div class="seting_switch">
|
||||
<div class="detailSkin2">
|
||||
<span>默认视角:</span>
|
||||
<span>{{ t('systemSetting.defaultViewLabel') }}:</span>
|
||||
<el-button color="#005c5c" @click="setView"
|
||||
><svg-icon name="sitting" :size="12" style="margin-right: 5px"></svg-icon>
|
||||
{{ t('systemSetting.defaultView') }}</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="detailSkin2">
|
||||
<span>在线数据:</span>
|
||||
<span>{{ t('systemSetting.defaultDataLabel') }}:</span>
|
||||
<el-button color="#005c5c" @click="setData"
|
||||
><svg-icon name="add" :size="12" style="margin-right: 5px"></svg-icon
|
||||
>{{ t('systemSetting.defaultData') }}</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="detailSkin2">
|
||||
<span>后台管理:</span>
|
||||
<span>{{ t('systemSetting.management') }}:</span>
|
||||
<el-button color="#005c5c"
|
||||
><svg-icon name="out_login" :size="12" style="margin-right: 5px"></svg-icon
|
||||
>{{ t('systemSetting.intoBack') }}</el-button
|
||||
@ -405,13 +405,11 @@ import { useI18n } from 'vue-i18n'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { inject, onMounted } from 'vue'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { useTreeNode } from '../../../../tree/hooks/treeNode'
|
||||
import { $sendElectronChanel } from '@/utils/communication'
|
||||
|
||||
const eventBus: any = inject('bus')
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
|
||||
const { t } = useI18n()
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
const isHotGroupOpen: any = ref(false)
|
||||
const isHotGroupOpen2: any = ref(false)
|
||||
@ -434,9 +432,9 @@ const systemSetting = ref({
|
||||
positionType: '度'
|
||||
})
|
||||
const options = ref([
|
||||
{ id: 'zh', label: '中文简体' },
|
||||
{ id: 'en', label: 'English' },
|
||||
{ id: 'tw', label: '中文繁體' }
|
||||
{ id: 'zh-CN', label: '中文简体' },
|
||||
{ id: 'zh-EN', label: 'English' },
|
||||
{ id: 'zh-TW', label: '中文繁體' }
|
||||
])
|
||||
const skinList = ref([
|
||||
{ id: 'yingguangse', label: '荧光色' },
|
||||
@ -494,6 +492,8 @@ name_map.value = Array.from(tool.name_map.values())
|
||||
name_map1.value = name_map.value.splice(0, 2)
|
||||
|
||||
const sysChange = async () => {
|
||||
locale.value = systemSetting.value.language
|
||||
document.title = t('title');
|
||||
const obj = {
|
||||
compass: systemSetting.value.showCompass, //罗盘
|
||||
legend: systemSetting.value.showDistanceLegend, //比例尺
|
||||
@ -581,7 +581,7 @@ const toggleGroup = (type: string) => {
|
||||
const management = () => {}
|
||||
const batteryChange = () => {}
|
||||
onMounted(() => {
|
||||
systemSetting.value = JSON.parse(localStorage.getItem('systemSetting'))
|
||||
systemSetting.value = JSON.parse(localStorage.getItem('systemSetting') || '{}')
|
||||
if (systemSetting.value.coordinate) {
|
||||
let data = name_map1.value.filter((item) => item.epsg === systemSetting.value.coordinate)
|
||||
showPosiType.value = data.length
|
||||
|
||||
@ -260,6 +260,7 @@ var switchFunc = () => {
|
||||
id: 123,
|
||||
speed: weatherData.speed,
|
||||
time: weatherData.time,
|
||||
// @ts-ignore
|
||||
hour: document.getElementById('currentTime').textContent
|
||||
})
|
||||
timeline.setSunShine(true)
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// @ts-nocheck
|
||||
import { ElMessage } from 'element-plus'
|
||||
export default class TimeLine {
|
||||
constructor(sdk, speed) {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<span>{{ date.hms }}</span>
|
||||
<div class="ymd_week">
|
||||
<span>{{ date.ymd }}</span>
|
||||
<span>{{ t(`week.${date.week}`) }}</span>
|
||||
<span>{{ t(`week.4`) }}</span>
|
||||
</div>
|
||||
<div class="weather">
|
||||
<svg-icon name="weather" :size="40" @click="clickFun"></svg-icon>
|
||||
|
||||
@ -328,8 +328,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -337,6 +337,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
@ -345,6 +346,7 @@ const remove = () => {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<Dialog ref="baseDialog" title="贴地文字" left="calc(50% - 160px)" top="calc(50% - 120px)">
|
||||
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 160px)" top="calc(50% - 120px)">
|
||||
<template #content>
|
||||
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button @click="confirm">确定</button>
|
||||
<button @click="confirm">{{ t('btn.confirm') }}</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
@ -16,6 +16,8 @@ import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { initMapData } from '../../../common/initMapData'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
|
||||
const { cusAddNodes } = useTreeNode()
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<Dialog ref="baseDialog" title="立体文字" left="calc(50% - 160px)" top="calc(50% - 120px)">
|
||||
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 160px)" top="calc(50% - 120px)">
|
||||
<template #content>
|
||||
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button @click="confirm">确定</button>
|
||||
<button @click="confirm">{{ t('btn.confirm') }}</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
@ -16,7 +16,9 @@ import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { initMapData } from '../../../common/initMapData'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { cusAddNodes } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
|
||||
@ -161,7 +161,7 @@ import attribute from './attribute.vue'
|
||||
import labelStyle from './labelStyle.vue'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const title = ref('箭头')
|
||||
const baseDialog: any = ref(null);
|
||||
@ -362,8 +362,33 @@ watch(
|
||||
);
|
||||
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
@ -65,8 +65,8 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">编辑内容</span>
|
||||
<input class="input" type="text" v-model="cameraName" style="width: 100px" />
|
||||
<button class="select btn" @click="cameraSelect">搜索</button>
|
||||
<input class="input" type="text" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;" />
|
||||
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@ -82,28 +82,29 @@
|
||||
<div class="th">密码</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-body" style="display: none">
|
||||
<div class="tr">
|
||||
<div class="table-body" v-if="cameraList && cameraList.length > 0">
|
||||
<div class="tr" v-for="(item, index) in cameraList">
|
||||
<div class="td">
|
||||
<input type="checkbox" value="2" />
|
||||
<input type="checkbox" :value="item.deviceId" v-model="item.checked"
|
||||
@change="changeAttributeCamera(item)" />
|
||||
<span>绑定</span>
|
||||
</div>
|
||||
<div class="td">设备名称</div>
|
||||
<div class="td">设备类型</div>
|
||||
<div class="td">设备IP</div>
|
||||
<div class="td">设备端口</div>
|
||||
<div class="td">用户名</div>
|
||||
<div class="td">密码</div>
|
||||
<div class="td">{{ item.cameraName }}</div>
|
||||
<div class="td" style="width: 80px; flex: 0 80px; min-width: 80px">{{ item.type }}</div>
|
||||
<div class="td" style="width: 126px; flex: 0 126px; min-width: 126px">{{ item.ip }}</div>
|
||||
<div class="td" style="width: 80px; flex: 0 80px; min-width: 80px">{{ item.port }}</div>
|
||||
<div class="td" style="width: 80px; flex: 0 80px; min-width: 80px">{{ item.userName }}</div>
|
||||
<div class="td">{{ item.password }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-empty">
|
||||
<div class="table-empty" v-else>
|
||||
<div class="empty-img"></div>
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="" row>
|
||||
<ul class="pagination"></ul>
|
||||
<div class="row">
|
||||
<Pagination :total="cameraParams.total" v-model:page="cameraParams.page" v-model:limit="cameraParams.pageSize" :pageSizes="false" @pagination="cameraSelect" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="attribute-content attribute-content-isc" v-show="attributeType === 'isc'">
|
||||
@ -187,6 +188,40 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="attribute-content attribute-content-goods" v-show="attributeType === 'goods'">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">编辑内容</span>
|
||||
<input class="input goods-select-input" type="text" style="width: 180px;margin-right: 10px;"
|
||||
v-model="goodsKeywords">
|
||||
<button class="select btn" @click="goodsFilter">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table goods-table">
|
||||
<div class="table-head">
|
||||
<div class="tr">
|
||||
<div class="th" style="width: 60px; flex: 0 60px;min-width: 60px;">序号</div>
|
||||
<div class="th" style="flex: 0 0 280px;">名称</div>
|
||||
<div class="th">数量</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-body" v-if="goodsList && goodsList.length > 0">
|
||||
<div class="tr" v-for="(item, index) in goodsList">
|
||||
<div class="td" style="width: 60px; flex: 0 60px;min-width: 60px;">{{ index + 1 }}</div>
|
||||
<div class="td" style="flex: 0 0 280px;">{{ item.name }}</div>
|
||||
<div class="td"><input class="input" type="number" title="" min="0" max="999999999" v-model="item.cnt"
|
||||
@blur="changeAttributeGoods(item)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-empty" v-else>
|
||||
<div class="empty-img"></div>
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -202,6 +237,14 @@ if (window && window.process && window.process.type === 'renderer') {
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
const attributeType = ref('richText')
|
||||
const goodsKeywords = ref('')
|
||||
const cameraParams = ref({
|
||||
keyWord: '',
|
||||
pageSize: 5,
|
||||
page: 1,
|
||||
total: 0
|
||||
})
|
||||
const cameraList = ref()
|
||||
|
||||
const props = defineProps({
|
||||
entityOptions: {
|
||||
@ -211,12 +254,139 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const attribute = ref(props.entityOptions.options.attribute)
|
||||
if(!props.entityOptions.options.richTextContent)
|
||||
{
|
||||
if (!props.entityOptions.options.richTextContent) {
|
||||
props.entityOptions.options.richTextContent = ''
|
||||
}
|
||||
const richTextContent = ref(props.entityOptions.options.richTextContent)
|
||||
|
||||
const allGoodsList: any = ref([])
|
||||
const goodsList: any = ref([])
|
||||
const goodsFilter = () => {
|
||||
if (allGoodsList.value.length) {
|
||||
goodsList.value = allGoodsList.value.filter(function (item) {
|
||||
item.cnt = 0
|
||||
return (item.name.indexOf(goodsKeywords.value) !== -1);
|
||||
});
|
||||
for (let i = props.entityOptions.attributeGoods.length - 1; i >= 0; i--) {
|
||||
for (let m = 0; m < goodsList.value.length; m++) {
|
||||
if ('id' in goodsList.value[m]) {
|
||||
if (goodsList.value[m].id === props.entityOptions.attributeGoods[i].id) {
|
||||
goodsList.value[m].name = props.entityOptions.attributeGoods[i].name
|
||||
goodsList.value[m].cnt = props.entityOptions.attributeGoods[i].cnt
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const goodsSelect = (page) => {
|
||||
allGoodsList.value = [
|
||||
// {
|
||||
// id: '1',
|
||||
// name: '物资1'
|
||||
// },
|
||||
// {
|
||||
// id: '2',
|
||||
// name: '物资2'
|
||||
// },
|
||||
// {
|
||||
// id: '3',
|
||||
// name: '物资3'
|
||||
// },
|
||||
// {
|
||||
// id: '4',
|
||||
// name: '物资4'
|
||||
// },
|
||||
// {
|
||||
// id: '5',
|
||||
// name: '物资5'
|
||||
// },
|
||||
// {
|
||||
// id: '6',
|
||||
// name: '物资6'
|
||||
// },
|
||||
// {
|
||||
// id: '7',
|
||||
// name: '物资7'
|
||||
// }
|
||||
]
|
||||
for (let i = props.entityOptions.attributeGoods.length - 1; i >= 0; i--) {
|
||||
let flag = false
|
||||
for (let m = 0; m < allGoodsList.value.length; m++) {
|
||||
if ('id' in allGoodsList.value[m]) {
|
||||
if (allGoodsList.value[m].id === props.entityOptions.attributeGoods[i].id) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
props.entityOptions.attributeGoods.splice(i, 1)
|
||||
}
|
||||
}
|
||||
goodsFilter()
|
||||
console.log('props.entityOptions.attributeGoods', props.entityOptions.attributeGoods)
|
||||
}
|
||||
const cameraSelect = ({ page, limit }) => {
|
||||
if (!props.entityOptions.attributeSelect) {
|
||||
return
|
||||
}
|
||||
else {
|
||||
let flag = false
|
||||
for (let i = 0; i < props.entityOptions.attributeSelect.length; i++) {
|
||||
if (props.entityOptions.attributeSelect[i].key === 'camera') {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
return
|
||||
}
|
||||
}
|
||||
cameraParams.value.page = page
|
||||
cameraParams.value.pageSize = limit
|
||||
let url = ""
|
||||
const params:any = {
|
||||
cameraName: cameraParams.value.keyWord,
|
||||
page: cameraParams.value.page,
|
||||
pageSize: cameraParams.value.pageSize
|
||||
};
|
||||
const queryString = new URLSearchParams(params).toString();
|
||||
url = `http://localhost:8891/yjearth4.0/api/v1/cameraData/list?${queryString}`
|
||||
fetch(url, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
"token": 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzYwOTQyMzU2fQ.TKwa0hMzsSl9bD4-iItoay2VDTQZf2zt0Lu0qgiRaUM',
|
||||
"Authorization": "Bearer " + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzYwOTQyMzU2fQ.TKwa0hMzsSl9bD4-iItoay2VDTQZf2zt0Lu0qgiRaUM',
|
||||
}
|
||||
}).then((response) => {
|
||||
if (response.status === 200) {
|
||||
response.json().then((data) => {
|
||||
if (data.code === 200 || data.code === 0) {
|
||||
if (data.data) {
|
||||
cameraParams.value.total = data.data.total
|
||||
if (data.data.list && data.data.list.length > 0) {
|
||||
cameraList.value = data.data.list
|
||||
for (let i = 0; i < cameraList.value.length; i++) {
|
||||
cameraList.value[i].checked = false
|
||||
for (let j = 0; j < props.entityOptions.attributeCamera.length; j++) {
|
||||
if (cameraList.value[i].deviceId == props.entityOptions.attributeCamera[j].deviceId) {
|
||||
cameraList.value[i].checked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.error(data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let attributeSelect = ref([
|
||||
{
|
||||
name: '富文本',
|
||||
@ -232,11 +402,11 @@ let attributeSelect = ref([
|
||||
|
||||
if (props.entityOptions.type === 'BillboardObject') {
|
||||
attributeSelect.value.push(
|
||||
// {
|
||||
// name: 'IP摄像头',
|
||||
// value: 'IP摄像头',
|
||||
// key: 'camera'
|
||||
// },
|
||||
{
|
||||
name: 'IP摄像头',
|
||||
value: 'IP摄像头',
|
||||
key: 'camera'
|
||||
},
|
||||
// {
|
||||
// name: 'ISC摄像头',
|
||||
// value: 'ISC摄像头',
|
||||
@ -252,17 +422,17 @@ if (props.entityOptions.type === 'BillboardObject') {
|
||||
value: '全景图',
|
||||
key: 'vr'
|
||||
},
|
||||
// {
|
||||
// name: '物资',
|
||||
// value: '物资',
|
||||
// key: 'goods'
|
||||
// },
|
||||
{
|
||||
name: '物资',
|
||||
value: '物资',
|
||||
key: 'goods'
|
||||
},
|
||||
)
|
||||
goodsSelect(1) // 物资
|
||||
cameraSelect({page: cameraParams.value.page, limit: cameraParams.value.pageSize }) // ip摄像头
|
||||
}
|
||||
|
||||
|
||||
|
||||
const cameraName = ref('')
|
||||
const addlinkInput = ref('')
|
||||
const addvrInput = ref('')
|
||||
const linkEditActive: any = ref({})
|
||||
@ -374,7 +544,6 @@ const linkConfirmEdit = (index: string | number) => {
|
||||
const linkCancelEdit = () => {
|
||||
linkEditActive.value = {}
|
||||
}
|
||||
const cameraSelect = () => { }
|
||||
const _addRr = () => {
|
||||
if (addvrInput.value) {
|
||||
let link = {
|
||||
@ -432,8 +601,63 @@ const vrConfirmEdit = (index: string | number) => {
|
||||
const vrCancelEdit = () => {
|
||||
vrEditActive.value = {}
|
||||
}
|
||||
const goodsFilter = () => { }
|
||||
|
||||
const attributeChange = () => { }
|
||||
|
||||
const changeAttributeGoods = (item) => {
|
||||
let flag = false
|
||||
for (let m = props.entityOptions.attributeGoods.length - 1; m >= 0; m--) {
|
||||
if ('id' in item) {
|
||||
if (item.id === props.entityOptions.attributeGoods[m].id) {
|
||||
flag = true
|
||||
if (item.cnt) {
|
||||
props.entityOptions.attributeGoods[m].cnt = item.cnt
|
||||
}
|
||||
else {
|
||||
props.entityOptions.attributeGoods.splice(m, 1)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
if (!item.cnt) {
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
cnt: item.cnt,
|
||||
}
|
||||
props.entityOptions.attributeGoods.push({ ...data })
|
||||
}
|
||||
}
|
||||
const changeAttributeCamera = (e) => {
|
||||
console.log(e)
|
||||
props.entityOptions.attributeCamera = [{ ...e }]
|
||||
for (let i = 0; i < cameraList.value.length; i++) {
|
||||
if (cameraList.value[i].deviceId !== e.deviceId) {
|
||||
cameraList.value[i].checked = false
|
||||
}
|
||||
}
|
||||
// if (e.checked) {
|
||||
// // 只选中一个
|
||||
// props.entityOptions.attributeCamera = [{...e}]
|
||||
// for (let i = 0; i < cameraList.value.length; i++) {
|
||||
// if (cameraList.value[i].deviceId !== e.deviceId) {
|
||||
// cameraList.value[i].checked = false
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// let newArray = that.attributeCamera.filter((item) => {
|
||||
// if ('deviceId' in data.data.list[i]) {
|
||||
// return item.deviceId !== data.data.list[i].deviceId
|
||||
// }
|
||||
// })
|
||||
// that.attributeCamera = newArray
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -783,8 +783,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -792,6 +792,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -280,8 +280,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -289,6 +289,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -554,8 +554,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -563,6 +563,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
@ -571,6 +572,7 @@ const remove = () => {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -66,9 +66,9 @@ import { ref } from 'vue'
|
||||
import { inject } from 'vue'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
@ -120,8 +120,33 @@ const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
|
||||
@ -88,7 +88,7 @@ import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
@ -144,8 +144,33 @@ const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
|
||||
@ -180,8 +180,7 @@
|
||||
<template #footer>
|
||||
<button @click="nodeEdit">
|
||||
<svg class="icon-edit">
|
||||
<use xlink:href="#yj-icon-edit"></use></svg
|
||||
>编辑
|
||||
<use xlink:href="#yj-icon-edit"></use></svg>编辑
|
||||
</button>
|
||||
<button @click="returnX"><svg-icon name="xaxis" :size="12"></svg-icon> X轴翻转</button>
|
||||
<button @click="returnY"><svg-icon name="yaxis" :size="12"></svg-icon>Y轴翻转</button>
|
||||
@ -202,7 +201,7 @@ import labelStyle from './labelStyle.vue'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
import { getFontList } from './fontSelect'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const fontList = ref(getFontList())
|
||||
|
||||
@ -373,8 +372,33 @@ const close = () => {
|
||||
}
|
||||
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
|
||||
//-----------------方法-----------------------
|
||||
|
||||
@ -150,15 +150,16 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
entityOptions.value.remove()
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -35,7 +35,7 @@ import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
@ -83,8 +83,33 @@ const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
|
||||
@ -501,8 +501,7 @@
|
||||
</button>
|
||||
<button style="margin-left: 10px" v-if="moveFlag" @click="translate">
|
||||
<svg class="icon-py">
|
||||
<use xlink:href="#yj-icon-py"></use></svg
|
||||
>结束平移
|
||||
<use xlink:href="#yj-icon-py"></use></svg>结束平移
|
||||
</button>
|
||||
</div>
|
||||
<button @click="remove">删除</button>
|
||||
@ -522,7 +521,7 @@ import labelStyle from './labelStyle.vue'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
import { getFontList } from './fontSelect'
|
||||
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||
|
||||
const fontList = ref(getFontList())
|
||||
|
||||
@ -738,8 +737,33 @@ const close = () => {
|
||||
}
|
||||
|
||||
const remove = () => {
|
||||
that.remove()
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
|
||||
//-----------------方法-----------------------
|
||||
|
||||
@ -297,8 +297,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -306,6 +306,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -335,8 +335,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -344,6 +344,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -195,8 +195,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -204,6 +204,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -561,8 +561,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -570,6 +570,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -145,15 +145,16 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
entityOptions.value.remove()
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -175,15 +175,16 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
entityOptions.value.remove()
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -109,8 +109,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -118,6 +118,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -79,8 +79,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -88,6 +88,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -141,8 +141,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -150,6 +150,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -291,8 +291,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -300,6 +300,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -44,7 +44,7 @@ let originalOptions: any
|
||||
let that: any
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
entityOptions.value.reset()
|
||||
entityOptions.value.reset && entityOptions.value.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
const getKeys = () => {
|
||||
|
||||
@ -198,15 +198,16 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
entityOptions.value.remove()
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -176,15 +176,16 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
entityOptions.value.remove()
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -132,8 +132,8 @@ const remove = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -141,6 +141,7 @@ const remove = () => {
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
|
||||
@ -1,110 +0,0 @@
|
||||
<template>
|
||||
<Dialog
|
||||
ref="baseDialog"
|
||||
title=""
|
||||
left="calc(50% - 160px)"
|
||||
top="calc(50% - 120px)"
|
||||
:closeCallback="closeCallback"
|
||||
>
|
||||
<template #content>
|
||||
<div class="my_weather" id="my_weather">
|
||||
<div class="move_pop" id="move_pop">
|
||||
<!-- <span>{{ $t("headerTitles.weather") }}</span> -->
|
||||
<span></span>
|
||||
<span class="close" @click.capture="onClose">✖</span>
|
||||
</div>
|
||||
<div class="weather_content">
|
||||
<div class="weather_content_hear">
|
||||
<span class="xian"></span>
|
||||
<span class="text">天气效果</span>
|
||||
<span class="text_two">可叠加以下天气类型</span>
|
||||
</div>
|
||||
<div class="weather_content_body">
|
||||
<div class="item_icon" v-for="item in list">
|
||||
<template v-if="item.hasOwnProperty('svg')">
|
||||
<svg-icon
|
||||
:name="item.svg"
|
||||
:size="16"
|
||||
:color="!item.status ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 255, 255, 1)'"
|
||||
></svg-icon>
|
||||
</template>
|
||||
<div>
|
||||
<span :class="['icon_text', !item.status ? '' : 'active']">{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { inject } from 'vue'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
const text = ref('')
|
||||
eventBus.on('openWeather', () => {
|
||||
baseDialog.value?.open()
|
||||
})
|
||||
|
||||
const entityOptions: any = ref({})
|
||||
let originalOptions: any
|
||||
let that: any
|
||||
|
||||
var list = reactive([
|
||||
// 雨
|
||||
{
|
||||
// fun: this.toDo,
|
||||
name: '雨',
|
||||
svg: 'rain',
|
||||
status: false
|
||||
},
|
||||
// 雪
|
||||
{
|
||||
// fun: this.toDo,
|
||||
name: '雪',
|
||||
svg: 'snow',
|
||||
status: false
|
||||
},
|
||||
//雾
|
||||
{
|
||||
// fun: this.toDo,
|
||||
name: '雾',
|
||||
svg: 'fog',
|
||||
status: false
|
||||
},
|
||||
//星空
|
||||
{
|
||||
// fun: this.toDo,
|
||||
name: '星空',
|
||||
svg: 'skystarry',
|
||||
status: false
|
||||
}
|
||||
])
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.oldData = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
const open = async (id: any) => {
|
||||
that = window.earth.entityMap.get(id)
|
||||
originalOptions = structuredClone(that.newData)
|
||||
entityOptions.value = that
|
||||
baseDialog.value?.open()
|
||||
await nextTick()
|
||||
}
|
||||
const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -353,9 +353,13 @@ export const useRightOperate = () => {
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
console.log('source_ids-----------', source_ids)
|
||||
source_ids.forEach(item => {
|
||||
let entity = (window as any)._entityMap.get(item)
|
||||
entity?.remove?.();
|
||||
if(entity) {
|
||||
entity.remove();
|
||||
(window as any)._entityMap.delete(entity.options.id)
|
||||
}
|
||||
// let node = window.treeObj.getNodeByParam("id", item, null);
|
||||
eventBus.emit("destroyComponent", item);
|
||||
});
|
||||
|
||||
@ -23,6 +23,7 @@ let option = {
|
||||
},
|
||||
}
|
||||
function leftClick(options) {
|
||||
const { ipcRenderer } = require('electron')
|
||||
console.log('leftClick', options)
|
||||
let id = options.id;
|
||||
let node = window.treeObj.getNodeByParam("id", id, null);
|
||||
@ -93,31 +94,31 @@ function leftClick(options) {
|
||||
) {
|
||||
tankuang(id, node, info);
|
||||
}
|
||||
// if (info.camera && info.camera.length) {
|
||||
// if (index == 0) {
|
||||
// ElMessage.success("摄像头打开中请稍后");
|
||||
// //测试
|
||||
// /* {
|
||||
// $root_home.$sendElectronChanel("openFFPlay", {
|
||||
// url: "WeChat_20230316160037.mp4" //res.data.flvUrl
|
||||
// });
|
||||
// }*/
|
||||
// cameraDataList(
|
||||
// {
|
||||
// page: 1,
|
||||
// pageSize: 9999,
|
||||
// },
|
||||
// (res) => {
|
||||
// let areaLists = res.list;
|
||||
// areaLists.forEach((element) => {
|
||||
// info.camera.forEach((item) => {
|
||||
// if (element.ID == item.ID) {
|
||||
// item.deviceId = element.deviceId;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// info.camera.forEach((element) => {
|
||||
// index++;
|
||||
console.log('info.camera', info.camera)
|
||||
if (info.camera && info.camera.length) {
|
||||
if (index == 0) {
|
||||
ElMessage.success("摄像头打开中请稍后");
|
||||
info.camera.forEach((item) => {
|
||||
index++;
|
||||
ipcRenderer.send("openFFPlay", {
|
||||
url: item.rtspUrl, //
|
||||
cameraName: item.cameraName, //
|
||||
ip: item.ip, //
|
||||
name: node.sourceName,
|
||||
deviceId: item.deviceId, //
|
||||
});
|
||||
ipcRenderer.once(
|
||||
"openFFPlayOut",
|
||||
(e, err) => {
|
||||
index--;
|
||||
if (err) {
|
||||
ElMessage({
|
||||
message: "设备错误,打开失败!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
// getById({ deviceId: element.deviceId }, (res) => {
|
||||
// console.log(res);
|
||||
// if (res) {
|
||||
@ -151,14 +152,12 @@ function leftClick(options) {
|
||||
// // });
|
||||
// // });
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// );
|
||||
// } else {
|
||||
// ElMessage.info("该摄像头已打开或未绑定");
|
||||
// }
|
||||
// //if (info.type == "vr")
|
||||
// }
|
||||
});
|
||||
} else {
|
||||
ElMessage.info("该摄像头已打开或未绑定");
|
||||
}
|
||||
//if (info.type == "vr")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import { initMapData } from '../../../../common/initMapData'
|
||||
export const useTree = () => {
|
||||
const rightMenuRef: any = ref() //右键菜单的实例
|
||||
const treeObj = ref() //树形的实例
|
||||
const { getSelectedNodes, showRightMenu, cusSelectNode, getSameLevel, cusNodeIcon, nodeType } = useTreeNode() //树上一系列的方法hooks
|
||||
const { getSelectedNodes, showRightMenu, cusUpdateNode, cusSelectNode, getSameLevel, cusNodeIcon, nodeType } = useTreeNode() //树上一系列的方法hooks
|
||||
const nodes: any = ref([])
|
||||
/**
|
||||
* 用于捕获zTree上鼠标按键按下后的事件回调函数
|
||||
@ -72,7 +72,7 @@ export const useTree = () => {
|
||||
const onDblClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
let entityObject
|
||||
|
||||
if(treeNode.sourceType == 'Feature') {
|
||||
if (treeNode.sourceType == 'Feature') {
|
||||
const getEntityObject = (n) => {
|
||||
if (n) {
|
||||
let t = window.earth.entityMap.get(n.id)
|
||||
@ -246,41 +246,6 @@ export const useTree = () => {
|
||||
|
||||
// if(treeNode.sourceType == 'directory') {}
|
||||
|
||||
let params = JSON.parse(treeNode.params)
|
||||
let entityObject
|
||||
if (treeNode.sourceType == 'pressModel') {
|
||||
let params = JSON.parse(treeNode.params)
|
||||
let id = treeNode.id + '_' + params.modelId
|
||||
let data = (window as any).pressModelMap.get(id)
|
||||
data.isShow = treeNode.isShow
|
||||
entityObject = (window as any).pressModelEntities.get(treeNode.id)
|
||||
|
||||
if (!entityObject && treeNode.isShow) {
|
||||
const entity = (window as any)._entityMap.get(params.modelId).entity
|
||||
entityObject = new YJ.Analysis.Flat(window.earth, entity, {
|
||||
positions: params.positions,
|
||||
height: params.height,
|
||||
name: treeNode.sourceName
|
||||
})
|
||||
(window as any).pressModelEntities.set(treeNode.id, entityObject)
|
||||
}
|
||||
|
||||
} else if (treeNode.sourceType != 'directory') {
|
||||
entityObject = (window as any)._entityMap.get(params.id)
|
||||
}
|
||||
if (entityObject) {
|
||||
entityObject.show = treeNode.isShow;
|
||||
(treeNode.sourceType != 'pressModel') && (params.show = treeNode.isShow)
|
||||
let params2 = {
|
||||
"id": treeNode.id,
|
||||
"params": params,
|
||||
"isShow": treeNode.isShow ? 1 : 0,
|
||||
}
|
||||
TreeApi.updateDirectoryInfo(params2)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 如果当前节点有父节点,检查所有子节点状态
|
||||
if (parentNode) {
|
||||
@ -315,19 +280,60 @@ export const useTree = () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let ids = [
|
||||
{
|
||||
id: treeNode.id,
|
||||
isShow: treeNode.isShow ? 1 : 0
|
||||
}
|
||||
]
|
||||
if (treeNode.sourceType === 'directory') {
|
||||
if (treeNode.children && treeNode.children.length > 0) {
|
||||
treeNode.children.forEach((item) => {
|
||||
ids.push({ id: item.id, isShow: item.isShow ? 1 : 0 })
|
||||
// 更新节点状态修改地图资源状态
|
||||
function sourceStatus(node) {
|
||||
ids.push({ id: node.id, isShow: node.isShow ? 1 : 0 })
|
||||
if (node.sourceType === 'directory') {
|
||||
if (node.children && node.children.length > 0) {
|
||||
node.children.forEach((item) => {
|
||||
sourceStatus(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
else {
|
||||
let params = JSON.parse(node.params)
|
||||
let entityObject
|
||||
if (node.sourceType == 'pressModel') {
|
||||
let id = node.id + '_' + params.modelId
|
||||
let data = (window as any).pressModelMap.get(id)
|
||||
data.isShow = node.isShow
|
||||
entityObject = (window as any).pressModelEntities.get(node.id)
|
||||
if (!entityObject && node.isShow) {
|
||||
const entity = (window as any)._entityMap.get(params.modelId).entity
|
||||
entityObject = new YJ.Analysis.Flat(window.earth, entity, {
|
||||
positions: params.positions,
|
||||
height: params.height,
|
||||
name: node.sourceName
|
||||
})
|
||||
(window as any).pressModelEntities.set(node.id, entityObject)
|
||||
}
|
||||
|
||||
} else {
|
||||
entityObject = (window as any)._entityMap.get(params.id)
|
||||
}
|
||||
if (entityObject) {
|
||||
entityObject.show = node.isShow;
|
||||
params.show = node.isShow
|
||||
let params2 = {
|
||||
"id": node.id,
|
||||
"params": params,
|
||||
"sourceName":node.sourceName,
|
||||
"isShow": node.isShow ? 1 : 0,
|
||||
}
|
||||
cusUpdateNode({ id: node.id, sourceName: node.sourceName, params: JSON.stringify(params) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceStatus(treeNode)
|
||||
|
||||
const res = await TreeApi.updateTreeShow(ids)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
@ -527,7 +533,7 @@ export const useTree = () => {
|
||||
// 初始化树的方法
|
||||
const initTree = async (selector: string = '#treeDemo') => {
|
||||
let keycode = localStorage.getItem("AMapKey");
|
||||
window._AMapSecurityConfig = {
|
||||
(window as any)._AMapSecurityConfig = {
|
||||
securityJsCode:
|
||||
(keycode && keycode.split("|")[1]) ||
|
||||
"c3d17927c47eb753b61b26de4f533cbe",
|
||||
@ -576,11 +582,11 @@ export const useTree = () => {
|
||||
}
|
||||
}
|
||||
zNodes.value = res.data
|
||||
treeObj.value = $.fn.zTree.init($(selector), setting, zNodes.value)
|
||||
window.treeObj = treeObj.value
|
||||
window.AllNodes = treeObj.value.getNodes()
|
||||
treeObj.value = $.fn.zTree.init($(selector), setting, zNodes.value);
|
||||
window.treeObj = treeObj.value;
|
||||
window.AllNodes = treeObj.value.getNodes();
|
||||
|
||||
window.newFuzzySearch(
|
||||
(window as any).newFuzzySearch(
|
||||
`treeDemo`,
|
||||
"#keyword",
|
||||
["bim", "sonShp", "gdbShp"],
|
||||
|
||||
@ -75,6 +75,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
import { debounce } from '@/utils'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useTree } from './hooks/tree'
|
||||
@ -123,8 +124,8 @@ const treeMouseOver = () => {
|
||||
}
|
||||
|
||||
const selectChange = (val) => {
|
||||
let input = document.getElementById('keyword')
|
||||
treeSearchCb('')
|
||||
let input = document.getElementById('keyword');
|
||||
(window as any).treeSearchCb('')
|
||||
if (val == 'poi') {
|
||||
searchKey.value = ''
|
||||
// input.value = ''
|
||||
@ -134,8 +135,8 @@ const selectChange = (val) => {
|
||||
value.value = ''
|
||||
// input.value = ''
|
||||
}
|
||||
if (window.searchPlaceEntity) {
|
||||
window.searchPlaceEntity.remove()
|
||||
if ((window as any).searchPlaceEntity) {
|
||||
(window as any).searchPlaceEntity.remove()
|
||||
}
|
||||
}
|
||||
const clearResult = () => {
|
||||
@ -158,16 +159,16 @@ const clearResult = () => {
|
||||
let string = searchKey.value.trim()
|
||||
if (string == '') {
|
||||
let arr = []
|
||||
if (window.searchPlaceMap) {
|
||||
arr = Array.from(window.searchPlaceMap)
|
||||
if ((window as any).searchPlaceMap) {
|
||||
arr = Array.from((window as any).searchPlaceMap)
|
||||
}
|
||||
if (arr.length) {
|
||||
window.searchPlaceMap.get(arr[0][0]).remove()
|
||||
window.searchPlaceMap.clear()
|
||||
(window as any).searchPlaceMap.get(arr[0][0]).remove()
|
||||
(window as any).searchPlaceMap.clear()
|
||||
}
|
||||
poiOptions.value = []
|
||||
value.value = ''
|
||||
window.treeSearchCb('')
|
||||
value.value = '';
|
||||
(window as any).treeSearchCb('')
|
||||
}
|
||||
}
|
||||
const cancel = () => {
|
||||
@ -176,6 +177,7 @@ const cancel = () => {
|
||||
|
||||
var mapModule
|
||||
var key =
|
||||
// @ts-ignore
|
||||
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
|
||||
'd88fcc689d1aa99866b2d0d83fd36677'
|
||||
var isOnline = false
|
||||
@ -208,7 +210,7 @@ const searchPlace = debounce(function () {
|
||||
value.value = ''
|
||||
let way = localStorage.getItem('searchWay')
|
||||
if (way == 'net') {
|
||||
treeSearchCb()
|
||||
(window as any).treeSearchCb()
|
||||
loading.value = true
|
||||
const doSearch = () => {
|
||||
mapModule.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete'], () => {
|
||||
@ -293,8 +295,8 @@ const searchPlace = debounce(function () {
|
||||
}
|
||||
} else {
|
||||
poiOptions.value = []
|
||||
value.value = ''
|
||||
treeSearchCb(searchKey.value)
|
||||
value.value = '';
|
||||
(window as any).treeSearchCb(searchKey.value)
|
||||
}
|
||||
}, 500)
|
||||
|
||||
|
||||
@ -490,7 +490,7 @@ eventBus.on('defineClickAddLinkCb', (fun) => {
|
||||
})
|
||||
|
||||
const sysChange = async () => {
|
||||
let systemSetting = JSON.parse(localStorage.getItem('systemSetting'))
|
||||
let systemSetting = JSON.parse(localStorage.getItem('systemSetting')||'{}')
|
||||
const obj = {
|
||||
compass: systemSetting.showCompass, //罗盘
|
||||
legend: systemSetting.showDistanceLegend, //比例尺
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { validateURL } from '@/utils/validate'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { setIP,getIP } from '@/utils/index'
|
||||
import { setIP, getIP } from '@/utils/index'
|
||||
import { SystemApi } from '@/api/systemApi'
|
||||
const { ipcRenderer } = require('electron')
|
||||
export const useSetUp = () => {
|
||||
const serviceDialog = ref(false) // 服务设置对话框
|
||||
const servVal = ref('单机') // 服务类型选择值
|
||||
@ -15,14 +17,19 @@ export const useSetUp = () => {
|
||||
const selectedService = ref('接口服务')
|
||||
const serviceOptions: any = ref([{ name: '接口服务' }, { name: '北斗串口' }])
|
||||
|
||||
let serveUrl:any = getIP()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let serveUrl: any = getIP()
|
||||
let isOk = validateURL(serveUrl)
|
||||
let serverMode = localStorage.getItem('serverMode')
|
||||
if(isOk) {
|
||||
if (isOk) {
|
||||
const parsedUrl = new URL(serveUrl);
|
||||
const host = parsedUrl.host;
|
||||
const ipPort = host.split(':');
|
||||
if(serverMode === 'false') {
|
||||
if (serverMode === 'false') {
|
||||
servVal.value = '网络'
|
||||
ip.value = ipPort[0]
|
||||
port.value = ipPort[1]
|
||||
@ -66,17 +73,22 @@ export const useSetUp = () => {
|
||||
}
|
||||
} else {
|
||||
//单机走这里
|
||||
try {
|
||||
ipcRenderer.send('getIniConfig', { port: Number(localport.value) })
|
||||
ipcRenderer.once('YmlConfig', (e, iniContent) => {
|
||||
localStorage.setItem('serverMode', 'true')
|
||||
setIP('http://127.0.0.1:' + localport.value)
|
||||
serviceDialog.value = false
|
||||
ipcRenderer.send('restart')
|
||||
});
|
||||
} catch (error: any) {
|
||||
ElMessage.error(error)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const initialize = () => {
|
||||
if(localStorage.getItem('ip')) {}
|
||||
else {
|
||||
if (serverMode==='false') {
|
||||
setIP('http://127.0.0.1:' + localport.value)
|
||||
} else {
|
||||
|
||||
if (serverMode === 'false') {
|
||||
let url = prototype.value + '://' + ip.value + ':' + port.value
|
||||
let isOk = validateURL(url)
|
||||
if (isOk) {
|
||||
@ -84,7 +96,13 @@ export const useSetUp = () => {
|
||||
} else {
|
||||
ElMessage.error('url不合法')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ipcRenderer.send('getIniConfig')
|
||||
ipcRenderer.once('YmlConfig', (e, iniContent) => {
|
||||
localStorage.setItem('serverMode', 'true')
|
||||
setIP('http://127.0.0.1:' + iniContent.server.port)
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user