Compare commits

15 Commits
main ... zh

250 changed files with 17566 additions and 17449 deletions

53
.idea/workspace.xml generated
View File

@ -5,50 +5,10 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="84ab0b82-0020-4fff-b2b2-e16882dec538" name="Changes" comment=""> <list default="true" id="84ab0b82-0020-4fff-b2b2-e16882dec538" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/src/renderer/icons/svg/firstMenu/leftMenuBg(2).svg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/renderer/icons/svg/firstMenu/leftMenuBg2222.svg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/builder-debug.yml" beforeDir="false" afterPath="$PROJECT_DIR$/build/builder-debug.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/builder-effective-config.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/build/builder-effective-config.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/便携式应急指挥电子沙盘系统北斗定位+ Setup 4.0.0.exe.blockmap" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/config/app_config.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/app_config.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/0.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/0.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/1.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/1.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/head--gonganlan.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/head--gonganlan.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/head--hong.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/head--hong.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/head--yingguangse.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/head--yingguangse.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/logo--gonganlan.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/logo--gonganlan.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/logo--hong.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/logo--hong.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/imgs/logo--yingguangse.png" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/imgs/logo--yingguangse.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/main.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/dist/electron/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/main.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/renderer.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/renderer.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/static/sdk/YJEarth.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/static/sdk/YJEarth.min.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dist/electron/static/sdk/custom/css/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/dist/electron/static/sdk/custom/css/index.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/installer.nsh" beforeDir="false" afterPath="$PROJECT_DIR$/installer.nsh" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/index.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_en.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_en.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_tw.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_tw.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_zh.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/assets/i18n/lang/local_zh.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/LeftMenu/firstMenu.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/LeftMenu/firstMenu.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/LeftMenu/secondMenuFun.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/LeftMenu/secondMenuFun.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/Tree/components/rightMenuOption.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/Tree/components/rightMenuOption.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/renderer/components/Tree/components/rightMenuOption.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/Tree/components/rightMenuOption.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/Tree/entityClick.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/Tree/entityClick.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/yjearth4_0/static/log/2025-11-27.log" beforeDir="false" afterPath="$PROJECT_DIR$/yjearth4_0/static/log/2025-11-27.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/Tree/treeNode.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/Tree/treeNode.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/dialog/junbiao.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/dialog/junbiao.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/setTool/setTool.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/setTool/setTool.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/weather/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/components/myHeaderAll/weather/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/icons/svg/firstMenu/junbiao3d.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/icons/svg/firstMenu/junbiao3d.svg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/views/dashboard/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/views/dashboard/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/renderer/views/login/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/renderer/views/login/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/static/sdk/YJEarth.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/sdk/YJEarth.min.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/static/sdk/custom/css/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/static/sdk/custom/css/index.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/yjearth4_0/a.json" beforeDir="false" afterPath="$PROJECT_DIR$/yjearth4_0/a.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/yjearth4_0/static/temp/database.ydb" beforeDir="false" afterPath="$PROJECT_DIR$/yjearth4_0/static/temp/database.ydb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/yjearth4_0/yjearth4" beforeDir="false" afterPath="$PROJECT_DIR$/yjearth4_0/yjearth4" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -61,6 +21,9 @@
<component name="MarkdownSettingsMigration"> <component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" /> <option name="stateVersion" value="1" />
</component> </component>
<component name="PackageJsonUpdateNotifier">
<dismissed value="$PROJECT_DIR$/package.json" />
</component>
<component name="ProblemsViewState"> <component name="ProblemsViewState">
<option name="selectedTabId" value="QODANA_PROBLEMS_VIEW_TAB" /> <option name="selectedTabId" value="QODANA_PROBLEMS_VIEW_TAB" />
</component> </component>
@ -157,6 +120,14 @@
<workItem from="1752724078704" duration="45000" /> <workItem from="1752724078704" duration="45000" />
<workItem from="1754720685670" duration="359000" /> <workItem from="1754720685670" duration="359000" />
<workItem from="1754893244968" duration="60000" /> <workItem from="1754893244968" duration="60000" />
<workItem from="1761796876451" duration="719000" />
<workItem from="1762145694194" duration="740000" />
<workItem from="1762148475123" duration="5333000" />
<workItem from="1763626030320" duration="789000" />
<workItem from="1763953632621" duration="2998000" />
<workItem from="1763966160059" duration="1205000" />
<workItem from="1764042902512" duration="811000" />
<workItem from="1764221556416" duration="1487000" />
</task> </task>
<servers /> <servers />
</component> </component>

View File

@ -1,217 +0,0 @@
x64:
firstOrDefaultFilePatterns:
- '!**/node_modules'
- '!build{,/**/*}'
- '!build{,/**/*}'
- dist/electron/**/*
- package.json
- '!**/*.{iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts,pdb}'
- '!**/._*'
- '!**/electron-builder.{yaml,yml,json,json5,toml}'
- '!**/{.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore,.idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci,.yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log,appveyor.yml,.travis.yml,circle.yml,.nyc_output}'
- '!.yarn{,/**/*}'
- '!.editorconfig'
- '!.yarnrc.yml'
nodeModuleFilePatterns:
- '**/*'
- dist/electron/**/*
nsis:
script: |-
!include "E:\code\4.0\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
!addincludedir "E:\code\4.0\node_modules\app-builder-lib\templates\nsis\include"
!macro _isUpdated _a _b _t _f
${StdUtils.TestParameter} $R9 "updated"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isUpdated `"" isUpdated ""`
!macro _isForceRun _a _b _t _f
${StdUtils.TestParameter} $R9 "force-run"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForceRun `"" isForceRun ""`
!macro _isKeepShortcuts _a _b _t _f
${StdUtils.TestParameter} $R9 "keep-shortcuts"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isKeepShortcuts `"" isKeepShortcuts ""`
!macro _isNoDesktopShortcut _a _b _t _f
${StdUtils.TestParameter} $R9 "no-desktop-shortcut"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isNoDesktopShortcut `"" isNoDesktopShortcut ""`
!macro _isDeleteAppData _a _b _t _f
${StdUtils.TestParameter} $R9 "delete-app-data"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isDeleteAppData `"" isDeleteAppData ""`
!macro _isForAllUsers _a _b _t _f
${StdUtils.TestParameter} $R9 "allusers"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForAllUsers `"" isForAllUsers ""`
!macro _isForCurrentUser _a _b _t _f
${StdUtils.TestParameter} $R9 "currentuser"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForCurrentUser `"" isForCurrentUser ""`
!macro addLangs
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "Vietnamese"
!macroend
!addincludedir "E:\code\4.0\build"
!include "E:\code\4.0\installer.nsh"
!include "C:\Users\Administrator\AppData\Local\Temp\t-takdpJ\0-messages.nsh"
!include "C:\Users\Administrator\AppData\Local\Temp\t-takdpJ\1-messages.nsh"
!addplugindir /x86-unicode "C:\Users\Administrator\AppData\Local\electron-builder\Cache\nsis\nsis-resources-3.4.1\plugins\x86-unicode"
Var newStartMenuLink
Var oldStartMenuLink
Var newDesktopLink
Var oldDesktopLink
Var oldShortcutName
Var oldMenuDirectory
!include "common.nsh"
!include "MUI2.nsh"
!include "multiUser.nsh"
!include "allowOnlyOneInstallerInstance.nsh"
!ifdef INSTALL_MODE_PER_ALL_USERS
!ifdef BUILD_UNINSTALLER
RequestExecutionLevel user
!else
RequestExecutionLevel admin
!endif
!else
RequestExecutionLevel user
!endif
!ifdef BUILD_UNINSTALLER
SilentInstall silent
!else
Var appExe
Var launchLink
!endif
!ifdef ONE_CLICK
!include "oneClick.nsh"
!else
!include "assistedInstaller.nsh"
!endif
!insertmacro addLangs
!ifmacrodef customHeader
!insertmacro customHeader
!endif
Function .onInit
SetOutPath $INSTDIR
${LogSet} on
!ifmacrodef preInit
!insertmacro preInit
!endif
!ifdef DISPLAY_LANG_SELECTOR
!insertmacro MUI_LANGDLL_DISPLAY
!endif
!ifdef BUILD_UNINSTALLER
WriteUninstaller "${UNINSTALLER_OUT_FILE}"
!insertmacro quitSuccess
!else
!insertmacro check64BitAndSetRegView
!ifdef ONE_CLICK
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
!else
${IfNot} ${UAC_IsInnerInstance}
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
${EndIf}
!endif
!insertmacro initMultiUser
!ifmacrodef customInit
!insertmacro customInit
!endif
!ifmacrodef addLicenseFiles
InitPluginsDir
!insertmacro addLicenseFiles
!endif
!endif
FunctionEnd
!ifndef BUILD_UNINSTALLER
!include "installUtil.nsh"
!endif
Section "install"
!ifndef BUILD_UNINSTALLER
# If we're running a silent upgrade of a per-machine installation, elevate so extracting the new app will succeed.
# For a non-silent install, the elevation will be triggered when the install mode is selected in the UI,
# but that won't be executed when silent.
!ifndef INSTALL_MODE_PER_ALL_USERS
!ifndef ONE_CLICK
${if} $hasPerMachineInstallation == "1" # set in onInit by initMultiUser
${andIf} ${Silent}
${ifNot} ${UAC_IsAdmin}
ShowWindow $HWNDPARENT ${SW_HIDE}
!insertmacro UAC_RunElevated
${Switch} $0
${Case} 0
${Break}
${Case} 1223 ;user aborted
${Break}
${Default}
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0"
${Break}
${EndSwitch}
Quit
${else}
!insertmacro setInstallModePerAllUsers
${endIf}
${endIf}
!endif
!endif
!include "installSection.nsh"
!endif
SectionEnd
!ifdef BUILD_UNINSTALLER
!include "uninstaller.nsh"
!endif

View File

@ -1,46 +0,0 @@
directories:
output: build
buildResources: build
extraFiles:
- from: ./collada2gltf/
to: ./collada2gltf
- from: ./convert/
to: ./convert
- from: ./yjearth4_0/
to: ./yjearth4_0
- from: ./ffplay/
to: ./ffplay
- from: ./build/icons/
to: ./icons
productName: 实景三维电子沙盘系统
appId: org.dzsp_yingjizhihuijunyong_offline_Y_save
files:
- filter:
- dist/electron/**/*
dmg:
contents:
- x: 410
'y': 150
type: link
path: /Applications
- x: 130
'y': 150
type: file
mac:
icon: build/icons/icon.icns
win:
icon: build/icons/81.ico
linux:
target: deb
icon: build/icons/81.png
desktop:
Icon: /opt/实景三维电子沙盘系统/icons/81.png
executableArgs:
- '--no-sandbox'
nsis:
include: installer.nsh
oneClick: false
perMachine: true
allowToChangeInstallationDirectory: true
language: '2052'
electronVersion: 13.6.9

View File

@ -1,5 +1,5 @@
let name = 'dzsp_yingjizhihuijunyong_offline_Y_save'; //dzsp_yingjizhihuibeidou_offline_Y_save //dzsp_shijingjiangjin_offline_Y_save // dzsp_shijinghaidong_offline_Y_save //cc dzsp_yingjizhihuijunyong_offline_Y_save,dzsp_yingjizhihui_offline_Y_save,dzsp_shijing_offline_Y_save,dzsp_mudanyuan_offline_Y_save'dzsp_wujingqinwu_offline_Y_save','dzsp_jilingongan_offline_Y_save' let name = 'dzsp_yingjizhihuijunyong_offline_Y_save'; //dzsp_yingjizhihuibeidou_offline_Y_save //dzsp_shijingjiangjin_offline_Y_save // dzsp_shijinghaidong_offline_Y_save //cc dzsp_yingjizhihuijunyong_offline_Y_save,dzsp_yingjizhihui_offline_Y_save,dzsp_shijing_offline_Y_save,dzsp_mudanyuan_offline_Y_save'dzsp_wujingqinwu_offline_Y_save','dzsp_jilingongan_offline_Y_save','dzsp_shijingjianchuang_offline_Y_save'
let productName = '实景三维电子沙盘系统'; //便携式应急指挥电子沙盘系统北斗定位+ //实景三维无人机智能巡检系统 // 海东市自然灾害风险普查可视化分析平台 //便携式应急指挥电子沙盘系统 //便携式应急指挥电子沙盘系统(军用版) //新版4.0//"实景三维电子沙盘系统";//"作战目标数字孪生仿真系统", "实景三维电子沙盘系统" ’牡丹园智慧景区管理系统‘,"武警勤务指挥电子沙盘系统”,"吉林省公安厅三维模型展示平台" let productName = '实景三维电子沙盘系统'; //便携式应急指挥电子沙盘系统北斗定位+ //实景三维无人机智能巡检系统 // 海东市自然灾害风险普查可视化分析平台 //便携式应急指挥电子沙盘系统 //便携式应急指挥电子沙盘系统(军用版) //新版4.0//"实景三维电子沙盘系统";//"作战目标数字孪生仿真系统", "实景三维电子沙盘系统" ’牡丹园智慧景区管理系统‘,"武警勤务指挥电子沙盘系统”,"吉林省公安厅三维模型展示平台", "建创实景三维电子沙盘系统"
let productName_tw = '实景三维电子沙盘系统'; let productName_tw = '实景三维电子沙盘系统';
let productName_en = 'Realistic 3D electronic sand table system'; let productName_en = 'Realistic 3D electronic sand table system';
let obj = { let obj = {

5563
dist/electron/main.js vendored

File diff suppressed because one or more lines are too long

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

23872
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -86,8 +86,8 @@ export default {
"1300", "1300",
"-y", "-y",
"730", "730",
"-rtsp_transport", // "-rtsp_transport",
"tcp", // "tcp",
obj.url, obj.url,
], ],
{ {
@ -99,6 +99,9 @@ export default {
console.log("out"); console.log("out");
console.log(err); console.log(err);
e.sender.send("openFFPlayOut", err); e.sender.send("openFFPlayOut", err);
if(obj.id) {
e.sender.send("openFFPlayOut_"+obj.id, err, obj.id);
}
}); });
/* .on("stdout", function(err, m) { /* .on("stdout", function(err, m) {
@ -134,11 +137,13 @@ export default {
return; return;
} }
recorder.end(() => { recorder.end(() => {
console.log('xxxxx')
let path = dialog.showSaveDialogSync({ let path = dialog.showSaveDialogSync({
title: "保存视频文件", title: "保存视频文件",
defaultPath: dayjs().format("YYYYMMDDHHmmss") + "视频录制.mp4", defaultPath: dayjs().format("YYYYMMDDHHmmss") + "视频录制.mp4",
filters: [{ name: "文件类型", extensions: ["mp4"] }], filters: [{ name: "文件类型", extensions: ["mp4"] }],
}); });
console.log('path', path)
if (path != undefined) { if (path != undefined) {
recorder.move(path, () => { recorder.move(path, () => {
recorder = null; recorder = null;
@ -313,7 +318,7 @@ export default {
event.sender.send("submitPortRes", port); event.sender.send("submitPortRes", port);
}); });
ipcMain.on("setNodes", (event, val) => { ipcMain.on("setNodes", (event, val) => {
// console.log("接受到数据", name); console.log("接受到数据", val);
let msg = sendMsg(val); let msg = sendMsg(val);
event.sender.send("replayRenderer", msg); event.sender.send("replayRenderer", msg);
}); });

View File

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

View File

@ -27,6 +27,7 @@ class Recorder {
this.exe = "ffmpeg_x86"; this.exe = "ffmpeg_x86";
break; break;
case "arm": case "arm":
case "arm64":
this.exe = "ffmpeg_arm"; this.exe = "ffmpeg_arm";
break; break;
} }
@ -59,14 +60,19 @@ class Recorder {
}) })
.on("data", function(data) { .on("data", function(data) {
// console.log(typeof data); // console.log(typeof data);
}) });
.on("data", function(data) {});
this.shell.stdout.on('data', (data) => {
});
this.shell.stderr.on('data', (data) => {
});
this.shell.unref(); this.shell.unref();
} }
end(cb) { end(cb) {
if (!this.shell.killed) { if (!this.shell.killed) {
console.log(this.shell); console.log(this.shell);
this.shell.stdin.write("q"); this.shell.stdin.write("q\n");
myEmitter.once("process-exit", () => { myEmitter.once("process-exit", () => {
cb(); cb();
}); });

View File

@ -1,9 +1,10 @@
import {ipcRenderer} from "electron";
const dgram = require("dgram"); const dgram = require("dgram");
import { getmainWindow } from "../../index"; import { getmainWindow } from "../../index";
let server; let server;
let Store = require("electron-store"); let Store = require("electron-store");
let store = new Store(); let store = new Store();
import { logger } from "../log";
let sandTable_udp_server_port = "sandTable_udp_server_port"; let sandTable_udp_server_port = "sandTable_udp_server_port";
function Init() { function Init() {
if (server) { if (server) {
@ -12,9 +13,15 @@ function Init() {
} }
let port = GetUdpServerPort().port; //获取本地存储的udp端口 let port = GetUdpServerPort().port; //获取本地存储的udp端口
server = dgram.createSocket("udp4"); server = dgram.createSocket("udp4");
console.log("udp的port",port)
console.log("udp的server",server)
server.on("listening", () => { server.on("listening", () => {
const address = server.address(); const address = server.address();
console.log(`server running ${address.address}:${address.port}`); console.log(`server running ${address.address}:${address.port}`);
getmainWindow().webContents.send('udpServerSuccess',"udp服务创建成功")
}); });
server.on("message", (msg, remoteInfo) => { server.on("message", (msg, remoteInfo) => {
@ -23,11 +30,15 @@ function Init() {
); );
// logger.info(msg.toString()) // logger.info(msg.toString())
// server.send('world', remoteInfo.port, remoteInfo.address) // server.send('world', remoteInfo.port, remoteInfo.address)
// ['json','string']
let ModeIndex=1
try { try {
var s = JSON.parse(msg.toString());
let positions = []; let positions = [];
var str = msg.toString();
//角度 //角度
let angle = 45; let angle = 45;
if(ModeIndex==0){
let s=JSON.parse(str)
if (typeof s == "string") s = JSON.parse(s); if (typeof s == "string") s = JSON.parse(s);
console.log(s); console.log(s);
@ -42,7 +53,8 @@ function Init() {
if (arr.length > 2) position.alt = arr[2]; if (arr.length > 2) position.alt = arr[2];
if (arr.length > 3) angle = arr[3]; if (arr.length > 3) angle = arr[3];
positions.push(position); positions.push(position);
} else { } else
{
let coordinates = let coordinates =
s.Placemark.Polygon.outerBoundaryIs.LinearRing.coordinates; s.Placemark.Polygon.outerBoundaryIs.LinearRing.coordinates;
const parseCoordinates = (coords) => { const parseCoordinates = (coords) => {
@ -58,6 +70,29 @@ function Init() {
positions, positions,
angle angle
); );
}else if(ModeIndex==1){
// 点位码 001K
/* let key=str.slice(0,-1)
// 反馈指令的后缀 K或G
let status=str.split(key)[1]
getmainWindow().webContents.send(
sandTable_udp_server_port+"_str",
key,
status
);*/
// 点位码 A001g #
let key=str.slice(0,-3)
// 反馈指令的后缀 g #或k #
let status=str.split(key)[1];
getmainWindow().webContents.send(
sandTable_udp_server_port+"_str",
key,
status
);
}
// }else{ // }else{
// console.log("内容不正确"); // console.log("内容不正确");
@ -68,13 +103,19 @@ function Init() {
}); });
server.on("error", (err) => { server.on("error", (err) => {
console.log("server error", err); console.log("server error", err);
getmainWindow().webContents.send('udpServerError',"udp服务创建失败尝试更换端口")
}); });
console.log("port ",port)
server.bind(port); server.bind(port);
// sendMsg("AFFG")
sendMsg("A000g #")
} }
function sendMsg(val) { function sendMsg(val) {
let msg; let msg;
let port = store.get("sandTable_udp_client_port"); let port = store.get("sandTable_udp_client_port")||60000;
let ip = store.get("sandTable_udp_client_host"); let ip = store.get("sandTable_udp_client_host");
server.send(val, port, ip);
return
let num = val.toString().split(""); let num = val.toString().split("");
let swit = Number(num.pop()); let swit = Number(num.pop());
if (swit == 1 || swit == 0) { if (swit == 1 || swit == 0) {
@ -89,6 +130,7 @@ function sendMsg(val) {
let cntHex = cnt.toString(16); let cntHex = cnt.toString(16);
let switHex = swit.toString(16); let switHex = swit.toString(16);
const message = Buffer.from([cntHex, switHex], "hex"); const message = Buffer.from([cntHex, switHex], "hex");
console.log("message",message)
server.send(message, port, ip); server.send(message, port, ip);
msg = "发送成功"; msg = "发送成功";
} else { } else {
@ -117,6 +159,7 @@ function GetUdpServerPort() {
port = server_port; port = server_port;
} }
let host = getHostIP(); let host = getHostIP();
console.log("GetUdpServerPort",port)
return { port, host }; return { port, host };
} }
function getHostIP() { function getHostIP() {

View File

@ -138,7 +138,7 @@ function createWindow() {
// 创建启动页窗口 // 创建启动页窗口
// createSplashWindow(); // createSplashWindow();
start(); start();
Init();
let prefix = execPath; let prefix = execPath;
console.log("process.env.NODE_ENV +++", process.env.NODE_ENV); console.log("process.env.NODE_ENV +++", process.env.NODE_ENV);
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
@ -176,6 +176,7 @@ function createWindow() {
}, },
}); });
mainWindow.loadURL(winURL); mainWindow.loadURL(winURL);
Init();
mainWindow.center(); mainWindow.center();
mainWindow.maximize(); mainWindow.maximize();
setIpc.Mainfunc(mainWindow); setIpc.Mainfunc(mainWindow);

View File

@ -767,7 +767,7 @@ export function queryPOI(
cb cb
) { ) {
request_get("/api/v1/poi/query", data).then((res) => { request_get("/api/v1/poi/query", data).then((res) => {
requestCallback(res, cb); requestCallback(res, cb, false);
}); });
} }
@ -1185,3 +1185,55 @@ export function selectUavConfig(data) {
data, data,
}); });
} }
/**
* 获取header列表
* @return {*}
*/
export function getHeaderList(data) {
return request_get("/api/v1/header/list",data);
}
/**
* 添加header图片
* @return {*}
*/
export function addHeader(data) {
return request({
url: "/api/v1/header/add",
method: "post",
data
});
}
/**
* 选择header图片
* @return {*}
*/
export function selectHeader(data) {
return request({
url: "/api/v1/header/select",
method: "post",
data
});
}
/**
* 删除header图片
* @return {*}
*/
export function deleteHeader(data) {
return request({
url: "/api/v1/header/del",
method: "post",
data
});
}
// 查询物资列表
export function getGoodsList(
data = {
page: 1,
page_size: 5,
}
) {
return request_get("/api/v1/goods/list", data);
}

View File

@ -50,7 +50,8 @@ module.exports = {
// 工具二级菜单 // 工具二级菜单
BIMEdit: "BIMEdit", BIMEdit: "BIMEdit",
goodsSearch: "goodsSearch", goodsSearch: "goodsSearch",
goodsSearchPolygon: "goodsSearchPolygon", goodsSearchPolygon: "goodsSearch Polygon",
tacticalCalculation: "tactical Calculation",
goodsSearchCircle: "goodsSearchCircle", goodsSearchCircle: "goodsSearchCircle",
rangeQuery: "rangeQuery", rangeQuery: "rangeQuery",
// floodSimulation: "floodSimulation", // floodSimulation: "floodSimulation",
@ -165,7 +166,13 @@ module.exports = {
ConcurrencyControl: "Concurrency Control", ConcurrencyControl: "Concurrency Control",
localIP: "Local IP", localIP: "Local IP",
localPort: "Local Port", localPort: "Local Port",
remoteIP: "Remote IP",
allOpen: "allOpen",
allClose: "allClose",
remotePort: "Remote Port",
weather: "Weather", weather: "Weather",
Permitconnection: 'Permit connection',
save: 'save',
week: [ week: [
"Sunday", "Sunday",
"Monday", "Monday",
@ -181,6 +188,13 @@ module.exports = {
downloadEquipment: "download Equipment", downloadEquipment: "download Equipment",
bulkImport: "bulk Import", bulkImport: "bulk Import",
}, },
// 头部管理
Header: {
title: "Header Setting",
add: "add",
confirm: "confirm",
delete: "delete",
},
// 0827 // 0827
isc: { isc: {
title: "ISCPlatform", title: "ISCPlatform",

View File

@ -42,7 +42,8 @@ module.exports = {
BIMEdit: "BIM編輯", BIMEdit: "BIM編輯",
goodsSearch: "物资統計", goodsSearch: "物资統計",
goodsSearchCircle: "圓形統計", goodsSearchCircle: "圓形統計",
goodsSearchPolgon: "多邊形統計", goodsSearchPolygon: "多邊形統計",
tacticalCalculation: "戰術計算",
rangeQuery: "範圍查詢", rangeQuery: "範圍查詢",
floodSimulation: "淹沒模擬", floodSimulation: "淹沒模擬",
clearQuery: "清除查詢", clearQuery: "清除查詢",
@ -135,11 +136,17 @@ module.exports = {
}, },
headerTitles: { headerTitles: {
systemTitle: "係統面板", systemTitle: "係統面板",
udp: "物理沙", udp: "物理沙",
ConcurrencyControl: "並發量控制", ConcurrencyControl: "並發量控制",
localIP: "本地IP", localIP: "本地IP",
localPort: "本地端口", localPort: "本地端口",
remoteIP: "遠程IP",
allOpen: "全開",
allClose: "全關",
remotePort: "遠程端口",
weather: "天气", weather: "天气",
Permitconnection: '允许连接',
save: '保存',
week: [ week: [
"星期日", "星期日",
"星期一", "星期一",
@ -155,6 +162,13 @@ module.exports = {
downloadEquipment: "下載模板", downloadEquipment: "下載模板",
bulkImport: "批量導入", bulkImport: "批量導入",
}, },
// 头部管理
Header: {
title: "頭部設置",
add: "添加",
confirm: "確認",
delete: "刪除",
},
// 0827 // 0827
isc: { isc: {
title: "ISC平台", title: "ISC平台",

View File

@ -45,7 +45,8 @@ module.exports = {
// 工具二级菜单 // 工具二级菜单
BIMEdit: "BIM编辑", BIMEdit: "BIM编辑",
goodsSearch: "物资统计", goodsSearch: "物资统计",
goodsSearchPolgon: "多边形统计", goodsSearchPolygon: "多边形统计",
tacticalCalculation: "战术计算",
goodsSearchCircle: "圆形统计", goodsSearchCircle: "圆形统计",
rangeQuery: "范围查询", rangeQuery: "范围查询",
floodSimulation: "淹没模拟", floodSimulation: "淹没模拟",
@ -144,8 +145,12 @@ module.exports = {
localIP: "本地IP", localIP: "本地IP",
localPort: "本地端口", localPort: "本地端口",
remoteIP: "远程IP", remoteIP: "远程IP",
allOpen: "全开",
allClose: "全关",
remotePort: "远程端口", remotePort: "远程端口",
weather: "天气", weather: "天气",
Permitconnection: '允许连接',
save: '保存',
week: [ week: [
"星期日", "星期日",
"星期一", "星期一",
@ -161,6 +166,13 @@ module.exports = {
downloadEquipment: "下载模板", downloadEquipment: "下载模板",
bulkImport: "批量导入", bulkImport: "批量导入",
}, },
// 头部管理
Header: {
title: "头部设置",
add: "添加",
confirm: "确认",
delete: "删除",
},
// 无人机 // 无人机
air: { air: {
title: "无人机管理", title: "无人机管理",

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -264,6 +264,17 @@ img {
.YJ-custom-checkbox-right { .YJ-custom-checkbox-right {
top: 6.5vw !important; top: 6.5vw !important;
} }
#distanceLegendDiv .compass {
top: calc(6.25vw + 25px);
}
#distanceLegendDiv .navigation-controls {
top: calc(6.25vw + 148px);
}
#custom-menu ul:nth-child(2){
/* display: none; */
}
/* 提示 */ /* 提示 */
/* .el-message--info { /* .el-message--info {
background: rgba(0, 0, 0, 0.5) !important; background: rgba(0, 0, 0, 0.5) !important;

View File

@ -141,7 +141,7 @@ export default {
break break
}*/ }*/
let menusHeight = this.menuList.length * 65 + "px"; let menusHeight = this.menuList.length * 65 + "px";
let height = this.menuList.length * 65 + 30 + "px"; let height = this.menuList.length * 65 + 40 + "px";
$(".leftBox")[0].style.height = height; $(".leftBox")[0].style.height = height;
$(".left .menus")[0].style.height = menusHeight; $(".left .menus")[0].style.height = menusHeight;
@ -268,7 +268,7 @@ export default {
/* bottom: 10vh; /* bottom: 10vh;
padding: 35px 10px 15px 0;*/ padding: 35px 10px 15px 0;*/
height: 350px; height: 350px;
margin-top: 20px; margin-top: 25px;
//align-self: center; //align-self: center;
padding: 0 8px 0 5px; padding: 0 8px 0 5px;

View File

@ -615,9 +615,15 @@ export default {
}, },
// 多边形统计 // 多边形统计
{ {
fun: this.goodsSearchPolgon, fun: this.goodsSearchPolygon,
name: "goodsSearchPolgon", name: "goodsSearchPolygon",
svg: "goodsSearchPolgon", svg: "goodsSearchPolygon",
},
// 战术计算
{
fun: this.tacticalCalculation,
name: "tacticalCalculation",
svg: "tacticalCalculation",
}, },
// 分屏 // 分屏
], ],

View File

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

View File

@ -80,7 +80,7 @@ const secondMenuFun = {
methods: { methods: {
// 海东1021 // 海东1021
// 物资搜索 // 物资搜索
goodsSearchPolgon() { goodsSearchPolygon() {
if (window.checkAuthIsValid) { if (window.checkAuthIsValid) {
let draw = new YJ.Draw.DrawPolygon(window.Earth1); let draw = new YJ.Draw.DrawPolygon(window.Earth1);
draw.start((err, params) => { draw.start((err, params) => {

View File

@ -763,9 +763,9 @@ export default {
}, },
// 多边形统计 // 多边形统计
{ {
fun: this.goodsSearchPolgon, fun: this.goodsSearchPolygon,
name: "goodsSearchPolgon", name: "goodsSearchPolygon",
svg: "goodsSearchPolgon", svg: "goodsSearchPolygon",
// 是否移入 // 是否移入
isMoveIn: false, isMoveIn: false,

View File

@ -7,13 +7,13 @@
<el-input v-model="addForm.cameraName" /> <el-input v-model="addForm.cameraName" />
</el-form-item> </el-form-item>
<el-form-item label="设备IP" prop="ip"> <el-form-item label="设备IP" prop="ip">
<el-input v-model="addForm.ip"></el-input> <el-input v-model="addForm.ip" placeholder="192.168.110.29"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备端口" prop="port"> <el-form-item label="设备端口" prop="port">
<el-input v-model="addForm.port"></el-input> <el-input v-model="addForm.port" placeholder="554"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户名" prop="userName"> <el-form-item label="用户名" prop="userName">
<el-input v-model="addForm.userName"></el-input> <el-input v-model="addForm.userName" placeholder="admin"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="密码" prop="passWord"> <el-form-item label="密码" prop="passWord">
<el-input v-model="addForm.passWord"></el-input> <el-input v-model="addForm.passWord"></el-input>
@ -175,6 +175,8 @@ import {
} from "../../../api"; } from "../../../api";
import { debounce } from "../../../utils"; import { debounce } from "../../../utils";
import fs from "fs"; import fs from "fs";
const os = require("os");
const arch = os.arch();
export default { export default {
name: "equipment", name: "equipment",
@ -203,9 +205,9 @@ export default {
pEditDialogVisible: false, pEditDialogVisible: false,
editForm: {}, editForm: {},
addForm: { addForm: {
ip: "192.168.110.29", ip: "",
port: "554", port: "",
userName: "admin", userName: "",
channel: "1", channel: "1",
}, },
peopleDataList: [], peopleDataList: [],
@ -217,8 +219,10 @@ export default {
download() { download() {
let serve = localStorage.getItem("service"); let serve = localStorage.getItem("service");
let p = "xlsx"; let p = "xlsx";
let filename = '模板'
if (process.platform == "linux") { if (process.platform == "linux") {
p = "et"; // p = "et";
filename = '模板.xlsx'
}else{ }else{
p = "xlsx"; p = "xlsx";
} }
@ -227,7 +231,7 @@ export default {
serve + "/static/excel/%E8%AE%BE%E5%A4%87%E6%A8%A1%E6%9D%BF." + p; serve + "/static/excel/%E8%AE%BE%E5%A4%87%E6%A8%A1%E6%9D%BF." + p;
this.$sendElectronChanel("saveNetFile", { this.$sendElectronChanel("saveNetFile", {
title: "保存文件", title: "保存文件",
filename: "模板", filename: filename,
filters: [{ name: "保存文件", extensions: [p] }], filters: [{ name: "保存文件", extensions: [p] }],
url, url,
}); });
@ -271,6 +275,9 @@ export default {
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
}); });
if(this.peopleDataList.length==1 && this.page.page>1) {
this.page.page--
}
this.getList(); this.getList();
} }
}) })
@ -377,9 +384,9 @@ export default {
show() { show() {
// this.getAreaList(); // this.getAreaList();
this.addForm = { this.addForm = {
ip: "192.168.110.29", ip: "",
port: "554", port: "",
userName: "admin", userName: "",
channel: "1", channel: "1",
}; };
this.pDialogVisible = true; this.pDialogVisible = true;

View File

@ -172,7 +172,7 @@ export default {
pEditDialogVisible: false, pEditDialogVisible: false,
editForm: {}, editForm: {},
addForm: { addForm: {
ip: "192.168.110.29", ip: "",
port: "554", port: "554",
userName: "admin", userName: "admin",
channel: "1", channel: "1",
@ -342,7 +342,7 @@ export default {
show() { show() {
// this.getAreaList(); // this.getAreaList();
this.addForm = { this.addForm = {
ip: "192.168.110.29", ip: "",
port: "554", port: "554",
userName: "admin", userName: "admin",
channel: "1", channel: "1",

View File

@ -35,7 +35,7 @@
:class="[(TSTYOBJ.clock.status==TSTYOBJ.timeStatus.PLAY&&TSTYOBJ.store.editorMode==TSTYOBJ.editorMode.PLAYING)?'disabledBtn':'','multiple']" :class="[(TSTYOBJ.clock.status==TSTYOBJ.timeStatus.PLAY&&TSTYOBJ.store.editorMode==TSTYOBJ.editorMode.PLAYING)?'disabledBtn':'','multiple']"
@click="openMultiple"> @click="openMultiple">
<!--新增25--> <!--新增25-->
倍数×{{ TSTYOBJ.store.multiplier }} 倍数11×{{ TSTYOBJ.store.multiplier }}
</div> </div>
</div> </div>
<div class="layoutBoxs"> <div class="layoutBoxs">

View File

@ -419,6 +419,7 @@ const rightMenuOption = {
let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id"); let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id");
paths.forEach((item) => { paths.forEach((item) => {
item = item.replace(/\\/g, "/");
let name = getNamefromPath(item); let name = getNamefromPath(item);
let source_type = "layer"; let source_type = "layer";
@ -499,7 +500,6 @@ const rightMenuOption = {
node.source_path = res.data[key].url; node.source_path = res.data[key].url;
} }
source_type = node.source_type; source_type = node.source_type;
cusAddNodes(this.$parent.treeObj, p_id, [node]);
if (source_type == "shp") { if (source_type == "shp") {
renderShp(node); renderShp(node);
} else if (source_type == "mif") { } else if (source_type == "mif") {
@ -524,6 +524,7 @@ const rightMenuOption = {
} else { } else {
renderTerrain(node); renderTerrain(node);
} }
cusAddNodes(this.$parent.treeObj, p_id, [node]);
}, },
(err) => { (err) => {
console.log(err); console.log(err);
@ -572,6 +573,8 @@ const rightMenuOption = {
entity.source.remove(); entity.source.remove();
else entity.remove(); else entity.remove();
} }
window._entityMap.delete(item);
window.udp_pointMap.delete(item);
}); });
//删除的id集合中如果存在已打开的编辑框的id则关闭编辑框 //删除的id集合中如果存在已打开的编辑框的id则关闭编辑框
if ( if (
@ -634,10 +637,10 @@ const rightMenuOption = {
window.treeObj.selectNode(node); window.treeObj.selectNode(node);
} }
let editNode = _entityMap.get(this.rightClickTreeNode.source_id); let editNode = _entityMap.get(this.rightClickTreeNode.source_id);
console.log( /* console.log(
"this.rightClickTreeNode.source_type", "this.rightClickTreeNode.source_type",
this.rightClickTreeNode.source_type this.rightClickTreeNode.source_type
); );*/
if (!this.rightClickTreeNode.source_type == "roam" && !editNode) { if (!this.rightClickTreeNode.source_type == "roam" && !editNode) {
this.$message.warning("请勾选资源"); this.$message.warning("请勾选资源");
@ -759,7 +762,7 @@ const rightMenuOption = {
$root_home_index.$refs.modelg.open("rightMenuChange"); $root_home_index.$refs.modelg.open("rightMenuChange");
$recvChanel("selectModelChangeg", (data) => { $recvChanel("selectModelChangeg", (data) => {
editNode.changeModelUrl(data.model_url); editNode.changeModelUrl(data.model_url);
$offChanel("selectModelChange"); $offChanel("selectModelChangeg");
}); });
}; };
} }
@ -767,6 +770,16 @@ const rightMenuOption = {
//编辑框的确认回调 //编辑框的确认回调
//关闭回调是Dialog.closecallBack //关闭回调是Dialog.closecallBack
editNode.Dialog.confirmCallBack = (v) => { editNode.Dialog.confirmCallBack = (v) => {
if(v.instruct){
let index=Array.from(udp_pointMap.values()).findIndex((item, index, arr) => {
// 条件:匹配 item当前遍历的对象的某个/多个属性
return item.source_id === this.rightClickTreeNode.source_id;
})
if(index>-1){
udp_pointMap.delete(Array.from(udp_pointMap.keys())[index])
}
udp_pointMap.set(v.instruct,{source_id:v.id})
}
console.log("vvvvvvvvvvvvvv1111", v); console.log("vvvvvvvvvvvvvv1111", v);
this.$offChanel("selectedImg"); this.$offChanel("selectedImg");
if (v.hasOwnProperty("text") && typeof v.text == "string") if (v.hasOwnProperty("text") && typeof v.text == "string")
@ -790,10 +803,12 @@ const rightMenuOption = {
this.rightClickTreeNode.source_type this.rightClickTreeNode.source_type
) )
) { ) {
if(v.center) {
v.center.lng = v.lng; v.center.lng = v.lng;
v.center.lat = v.lat; v.center.lat = v.lat;
v.center.alt = v.alt; v.center.alt = v.alt;
} }
}
const obj = { const obj = {
detail: JSON.stringify(v), detail: JSON.stringify(v),
@ -1015,7 +1030,7 @@ const rightMenuOption = {
resetView() { resetView() {
this.updateView(false); this.updateView(false);
}, },
updateView(flag) { async updateView(flag) {
let doUpdateInfo = true; let doUpdateInfo = true;
let node = getSelectedNode(this.$parent.treeObj); let node = getSelectedNode(this.$parent.treeObj);
let detail = JSON.parse(JSON.stringify(node.detail)); let detail = JSON.parse(JSON.stringify(node.detail));
@ -1024,8 +1039,8 @@ const rightMenuOption = {
detail = JSON.parse(detail); detail = JSON.parse(detail);
} }
if (flag) { if (flag) {
_entityMap.get(node.source_id).setCustomView(); await _entityMap.get(node.source_id).setCustomView();
detail.customView = _entityMap.get(node.source_id).options.customView; detail.customView = await _entityMap.get(node.source_id).options.customView;
} else { } else {
if ( if (
detail.hasOwnProperty("customView") && detail.hasOwnProperty("customView") &&
@ -1316,6 +1331,10 @@ const rightMenuOption = {
formData.append("source_id", this.rightClickTreeNode.source_id); formData.append("source_id", this.rightClickTreeNode.source_id);
importTablehead(formData).then((res) => { importTablehead(formData).then((res) => {
if (res.code == 0) { if (res.code == 0) {
let entityObject = window.Earth1.entityMap.get(this.rightClickTreeNode.source_id);
if(entityObject && entityObject.type === 'vector') {
entityObject.options.head_tables = res.data.list;
}
this.rightClickTreeNode.head_tables = JSON.stringify( this.rightClickTreeNode.head_tables = JSON.stringify(
res.data.list res.data.list
); );

View File

@ -74,6 +74,11 @@ function leftClick(nodes) {
? node.detail.attribute.vr.content ? node.detail.attribute.vr.content
: [] : []
: [], : [],
rtmp: node.detail.attribute
? node.detail.attribute.rtmp
? node.detail.attribute.rtmp.content
: []
: [],
goods: node.detail.attribute goods: node.detail.attribute
? node.detail.attribute.goods ? node.detail.attribute.goods
? node.detail.attribute.goods.content ? node.detail.attribute.goods.content
@ -98,10 +103,11 @@ function leftClick(nodes) {
console.log("info", info); console.log("info", info);
if ( if (
!node.detail.richTextContent && !node.detail.richTextContent &&
!info.hrefs.length && (!info.hrefs || !info.hrefs.length) &&
!info.vr.length && (!info.vr || !info.vr.length) &&
!info.goods.length && (!info.rtmp || !info.rtmp.length) &&
!info.camera.length (!info.goods || !info.goods.length) &&
(!info.camera || !info.camera.length)
) { ) {
// $root_home.$message.info("该标注标绘无属性信息"); // $root_home.$message.info("该标注标绘无属性信息");
$root_home.$message({ $root_home.$message({
@ -183,6 +189,41 @@ function leftClick(nodes) {
} }
//if (info.type == "vr") //if (info.type == "vr")
} }
if (info.rtmp && info.rtmp.length) {
let isExistent = false
let isNoExistent = false
for(let i=0;i<info.rtmp.length;i++) {
if(!window._winMap.has(info.rtmp[i].id)) {
isNoExistent = true
window._winMap.set(info.rtmp[i].id, info.rtmp[i].id);
$root_home.$sendElectronChanel("openFFPlay", {
id: info.rtmp[i].id,
url: info.rtmp[i].url,
name: info.rtmp[i].name,
});
$root_home.$recvElectronChanel(
"openFFPlayOut_"+info.rtmp[i].id,
(e, err, id) => {
if (err) {
$root_home.$message.error("视频流错误,打开失败!");
}
if(id) {
window._winMap.delete(id);
}
}
);
}
else {
isExistent = true
}
}
if(isNoExistent) {
$root_home.$message.success("视频流打开中请稍后");
}
if(isExistent) {
$root_home.$message.info("视频已打开");
}
}
} }
} }
} }

View File

@ -32,7 +32,7 @@
<el-select ref="select1" @change="locationChange" v-model="value" size="small" <el-select ref="select1" @change="locationChange" v-model="value" size="small"
:placeholder="$t('btn.selectPlaceholder')" :no-data-text="$t('btn.selectNoText')"> :placeholder="$t('btn.selectPlaceholder')" :no-data-text="$t('btn.selectNoText')">
<el-option v-for="(item, index) in poiOptions" :key="item.search_key + index" :label="item.search_key" <el-option v-for="(item, index) in poiOptions" :key="item.search_key + index" :label="item.search_key"
:value="item.address"> :value="index">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -150,6 +150,7 @@ export default {
// } // }
// }); // });
filePaths.forEach((item) => { filePaths.forEach((item) => {
item = item.replace(/\\/g, "/");
// 使用正则表达式进行不区分大小写的匹配 // 使用正则表达式进行不区分大小写的匹配
if (/\.(png|jpg|jpeg)$/i.test(item)) { if (/\.(png|jpg|jpeg)$/i.test(item)) {
this.picturePaths.push(item); this.picturePaths.push(item);
@ -304,7 +305,7 @@ export default {
let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id"); let p_id = getKeyOfSelectedNode(this.$parent.treeObj, "source_id");
filePaths.forEach((item) => { filePaths.forEach((item) => {
console.log('item', item); console.log('item', item);
let name = this.getLastPathComponent(item, ['clt', 'json', 'pak', 'kml', 'kmz', 'shp', 'geojson', 'geoJson', 'czml', 'jct', 'mif', 'tab', 'csv']); let name = this.getLastPathComponent(item, ['clt', 'json', 'pak', 'kml', 'kmz', 'shp', 'geojson', 'geoJson', 'czml', 'jct', 'mif', 'tab', 'csv', 'mbtiles']);
console.log("name", name); console.log("name", name);
let source_type = "layer"; let source_type = "layer";
if (item.endsWith(".clt") || item.endsWith(".json")) { if (item.endsWith(".clt") || item.endsWith(".json")) {
@ -448,7 +449,8 @@ export default {
this.$changeComponentShow(".rightMenu", false); this.$changeComponentShow(".rightMenu", false);
}, },
locationChange() { locationChange() {
let item = this.poiOptions.find((item) => item.address == this.value); // let item = this.poiOptions.find((item) => item.address == this.value);
let item = this.poiOptions[this.value];
let id = new YJ.Tools().randomString(); let id = new YJ.Tools().randomString();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.select1.blur(); this.$refs.select1.blur();
@ -521,7 +523,7 @@ export default {
let string = $("#keyword") let string = $("#keyword")
.val() .val()
.trim(); .trim();
if (string == "") { if (string === "") {
let arr = []; let arr = [];
if (window.searchPlaceMap) { if (window.searchPlaceMap) {
arr = Array.from(window.searchPlaceMap); arr = Array.from(window.searchPlaceMap);
@ -532,10 +534,10 @@ export default {
} }
this.poiOptions = []; this.poiOptions = [];
this.value = ""; this.value = "";
window.treeSearchCb(); // window.treeSearchCb();
} }
}, },
searchPlace: debounce(function () { searchPlace: debounce(function (e) {
if (this.select == "poi") { if (this.select == "poi") {
this.poiOptions = []; this.poiOptions = [];
this.value = ""; this.value = "";
@ -549,6 +551,8 @@ export default {
() => { () => {
this.placeSearch = new AMap.PlaceSearch(); this.placeSearch = new AMap.PlaceSearch();
try { try {
let string = $("#keyword").val().trim();
if (string || e.type !== 'change') {
this.placeSearch.search( this.placeSearch.search(
$("#keyword").val().trim(), $("#keyword").val().trim(),
(status, result) => { (status, result) => {
@ -584,6 +588,10 @@ export default {
} }
} }
); );
}
else {
this.loading = false;
}
} catch (e) { } catch (e) {
this.loading = false; this.loading = false;
} }
@ -608,11 +616,20 @@ export default {
queryPOI({ key: string }, (res) => { queryPOI({ key: string }, (res) => {
this.poiOptions = res.list; this.poiOptions = res.list;
if (this.poiOptions.length) { if (this.poiOptions.length) {
this.$message.success("操作成功");
this.$refs.select1.toggleMenu(); this.$refs.select1.toggleMenu();
} }
else {
this.$message.warning("搜索无数据");
}
this.loading = false; this.loading = false;
}); });
else this.$message.warning("请输入搜索关键字"); else {
if (e.type === 'change') {
return
}
this.$message.warning("请输入搜索关键字");
}
} }
} else { } else {
this.poiOptions = []; this.poiOptions = [];
@ -681,10 +698,23 @@ export default {
if (typeof node.detail == "string") { if (typeof node.detail == "string") {
obj = JSON.parse(node.detail); obj = JSON.parse(node.detail);
} }
console.log('pressModelMap', obj); // console.log('pressModelMap', obj);
pressModelMap.set(node.source_id + "_" + obj.model_id, node); pressModelMap.set(node.source_id + "_" + obj.model_id, node);
} }
// 找出所有的点标注detail中instruct的值不为空的存入udp_pointMap
if (node.source_type == 'point') {
let obj = JSON.parse(JSON.stringify(node.detail));
if (typeof node.detail == "string") {
obj = JSON.parse(node.detail);
}
let key = obj.instruct
if (key) {
udp_pointMap.set(key, { source_id: node.source_id })
}
}
}); });
//给node设置树形如icon是否允许添加子节点以及右键菜单 //给node设置树形如icon是否允许添加子节点以及右键菜单
data.forEach((node) => { data.forEach((node) => {
@ -720,7 +750,7 @@ export default {
window.newFuzzySearch( window.newFuzzySearch(
`treeDemo`, `treeDemo`,
"#keyword", "#keyword",
["bim", "sonShp", "gdbShp"], ["sonShp", "gdbShp"],
true, true,
"#queryButton" "#queryButton"
); /**/ ); /**/

View File

@ -180,7 +180,7 @@ function renderTerrain(node) {
}; };
try { try {
tileset.source.tileset.czmObject.xbsjStyle = JSON.stringify(a); tileset.source.tileset.czmObject.xbsjStyle = JSON.stringify(a);
} catch (e) {} } catch (e) { }
} }
window._entityMap.set(node.source_id, tileset); window._entityMap.set(node.source_id, tileset);
} }
@ -242,6 +242,19 @@ function renderGDSLImagery(node) {
}); });
window._entityMap.set(node.source_id, GDSLImagery); window._entityMap.set(node.source_id, GDSLImagery);
} }
function renderGDWXImagery(node) {
let alpha = 1;
if (node.detail) {
alpha = node.detail.alpha;
}
let GDWXImagery = new YJ.Obj.GDWXImagery(window.Earth1, {
id: node.source_id,
show: node.is_show == 1 ? true : false,
name: node.source_name,
alpha: alpha,
});
window._entityMap.set(node.source_id, GDWXImagery);
}
function renderTileset(node) { function renderTileset(node) {
let Terrain = new YJ.Terrain.Arcgis({ let Terrain = new YJ.Terrain.Arcgis({
@ -255,7 +268,7 @@ function renderShp(node, ifFly = true) {
// if (node.detail != "") node.detail.field = node.detail.fieldName || "id"; // if (node.detail != "") node.detail.field = node.detail.fieldName || "id";
let head_tables; let head_tables;
if (node.head_tables) { if (node.head_tables) {
head_tables == "" ? node.head_tables : JSON.parse(node.head_tables); head_tables = JSON.parse(node.head_tables);
} }
let vectorParams = { let vectorParams = {
id: node.source_id, id: node.source_id,
@ -368,10 +381,10 @@ function renderGeojson(node, ifFly = true) {
let geoParams = { let geoParams = {
id: node.source_id, id: node.source_id,
url: node.source_path, url: node.source_path,
customView: node.detail.customView,
host: getIP(), //需要那个host 怎么拿过来 host: getIP(), //需要那个host 怎么拿过来
}; };
let GeoJson = new YJ.Obj.GeoJson(window.Earth1, geoParams); let GeoJson = new YJ.Obj.GeoJson(window.Earth1, geoParams);
console.log(GeoJson);
GeoJson.on().then((res) => { GeoJson.on().then((res) => {
window._entityMap.set(node.source_id, GeoJson); window._entityMap.set(node.source_id, GeoJson);
if (ifFly) GeoJson.flyTo(); if (ifFly) GeoJson.flyTo();
@ -649,7 +662,7 @@ function renderScanStereoscopic(node) {
let nodecopy = JSON.parse(JSON.stringify(node)); let nodecopy = JSON.parse(JSON.stringify(node));
if (typeof nodecopy.detail == "string") if (typeof nodecopy.detail == "string")
nodecopy.detail = JSON.parse(nodecopy.detail); nodecopy.detail = JSON.parse(nodecopy.detail);
console.log("nodecopy", nodecopy); // console.log("nodecopy", nodecopy);
let option = { let option = {
...nodecopy.detail, ...nodecopy.detail,
id: nodecopy.source_id, id: nodecopy.source_id,
@ -863,6 +876,9 @@ function renderGroundImage(DbOption) {
option.positions = DbOption.detail.position; option.positions = DbOption.detail.position;
// option.url = // option.url =
// "file:///C:/Users/YC/Documents/WeChat%20Files/wxid_yq9vyoyz6j1p22/FileStorage/File/2024-09/%E5%86%9B%E6%A0%87%E5%AE%8C%E6%95%B4svg/1%E3%80%81%E5%8D%95%E4%BD%8D%E4%B8%8E%E4%BA%BA%E5%91%98/1%E3%80%81%E5%86%9B%E5%85%B5%E7%A7%8Dsvg/%E6%B5%8B%E7%BB%98%E5%AF%BC%E8%88%AA.svg"; // "file:///C:/Users/YC/Documents/WeChat%20Files/wxid_yq9vyoyz6j1p22/FileStorage/File/2024-09/%E5%86%9B%E6%A0%87%E5%AE%8C%E6%95%B4svg/1%E3%80%81%E5%8D%95%E4%BD%8D%E4%B8%8E%E4%BA%BA%E5%91%98/1%E3%80%81%E5%86%9B%E5%85%B5%E7%A7%8Dsvg/%E6%B5%8B%E7%BB%98%E5%AF%BC%E8%88%AA.svg";
if (option.host && option.host.indexOf('localhost') !== -1) {
option.host = localStorage.getItem("service");
}
let svg = new YJ.Obj.GroundSvg(window.Earth1, option); let svg = new YJ.Obj.GroundSvg(window.Earth1, option);
console.log("DbOption", DbOption); console.log("DbOption", DbOption);
if (DbOption.is_load) { if (DbOption.is_load) {
@ -935,7 +951,7 @@ function renderPath(node) {
if (typeof nodecopy.detail == "string") if (typeof nodecopy.detail == "string")
nodecopy.detail = JSON.parse(nodecopy.detail); nodecopy.detail = JSON.parse(nodecopy.detail);
// nodecopy.detail.model.show = Boolean(node.is_show); // nodecopy.detail.model.show = Boolean(node.is_show);
console.log("nodecopy", nodecopy); // console.log("nodecopy", nodecopy);
let option = { let option = {
...nodecopy.detail, ...nodecopy.detail,
earth: window.Earth1.earth, earth: window.Earth1.earth,
@ -1037,7 +1053,7 @@ function bindPath(hasModel, option, nodecopy, Path) {
window._entityMap.set(nodecopy.detail.id || nodecopy.id, Path); window._entityMap.set(nodecopy.detail.id || nodecopy.id, Path);
} }
function renderTrajectory(node) {} function renderTrajectory(node) { }
function renderXLSX(node, ifFly = true) { function renderXLSX(node, ifFly = true) {
// console.log("renderXLSX时", node); // console.log("renderXLSX时", node);
@ -1072,7 +1088,7 @@ function renderPressModel(node) {
} }
//地形开挖 //地形开挖
function renderTerrainDig(node) {} function renderTerrainDig(node) { }
// 水流 // 水流
function renderSpout(node) { function renderSpout(node) {
@ -1321,6 +1337,7 @@ export {
renderCzml, renderCzml,
renderTerrain, renderTerrain,
renderGDSLImagery, renderGDSLImagery,
renderGDWXImagery,
renderGDLWImagery, renderGDLWImagery,
renderArcgisBLUEImagery, renderArcgisBLUEImagery,
renderArcgisWXImagery, renderArcgisWXImagery,

View File

@ -12,6 +12,7 @@ import {
renderGlb, renderGlb,
renderTerrain, renderTerrain,
renderGDSLImagery, renderGDSLImagery,
renderGDWXImagery,
renderKml, renderKml,
renderGDLWImagery, renderGDLWImagery,
renderArcgisBLUEImagery, renderArcgisBLUEImagery,
@ -841,13 +842,13 @@ const nodeType = {
rightMenus: ["del", "setView", "resetView"], rightMenus: ["del", "setView", "resetView"],
render: renderGeojson, render: renderGeojson,
detailFun: get_detail_geojson, detailFun: get_detail_geojson,
allowChildren: true, allowChildren: false,
}, },
czml: { czml: {
rightMenus: ["del", "setView", "resetView"], rightMenus: ["del", "setView", "resetView"],
render: renderCzml, render: renderCzml,
detailFun: get_detail_czml, detailFun: get_detail_czml,
allowChildren: true, allowChildren: false,
}, },
ArcgisWXImagery: { ArcgisWXImagery: {
render: renderArcgisWXImagery, render: renderArcgisWXImagery,
@ -897,6 +898,18 @@ const nodeType = {
], ],
detailFun: get_detail_null, detailFun: get_detail_null,
}, },
GDWXImagery: {
render: renderGDWXImagery,
rightMenus: [
"edit",
"del",
"layerRaise",
"layerLower",
"layerToTop",
"layerToBottom",
],
detailFun: get_detail_null,
},
Terrain: { Terrain: {
render: renderTileset, render: renderTileset,
rightMenus: ["edit", "del"], rightMenus: ["edit", "del"],
@ -952,13 +965,13 @@ const nodeType = {
], ],
render: renderShp, render: renderShp,
detailFun: get_detail_shp, detailFun: get_detail_shp,
allowChildren: true, allowChildren: false,
}, },
gdb: { gdb: {
rightMenus: ["edit", "del", "setView", "resetView", "showAttr"], rightMenus: ["edit", "del", "setView", "resetView", "showAttr"],
render: renderShp, render: renderShp,
detailFun: get_detail_shp, detailFun: get_detail_shp,
allowChildren: true, allowChildren: false,
}, },
// gdbShp: { // gdbShp: {
// rightMenus: [/*"showAttr"*/], // rightMenus: [/*"showAttr"*/],
@ -979,7 +992,10 @@ const nodeType = {
allowChildren: false, allowChildren: false,
}, },
Feature: { Feature: {
rightMenus: ["setView", "resetView", "showAttr"], rightMenus: [
// "setView", "resetView",
"showAttr"
],
render: renderShp, render: renderShp,
detailFun: get_detail_shp, detailFun: get_detail_shp,
allowChildren: false, allowChildren: false,
@ -988,7 +1004,7 @@ const nodeType = {
rightMenus: ["edit", "del", "setView", "resetView", "showAttr"], rightMenus: ["edit", "del", "setView", "resetView", "showAttr"],
render: renderShp, render: renderShp,
detailFun: get_detail_kml, detailFun: get_detail_kml,
allowChildren: true, allowChildren: false,
}, },
groundText: { groundText: {
rightMenus: [ rightMenus: [
@ -1151,6 +1167,7 @@ let cusNodeIcon = (node) => {
"GDLWImagery", "GDLWImagery",
"ArcgisBLUEImagery", "ArcgisBLUEImagery",
"ArcgisWXImagery", "ArcgisWXImagery",
"GDWXImagery",
].includes(type) ].includes(type)
? "layer" ? "layer"
: type; : type;
@ -1163,15 +1180,17 @@ let cusNodeIcon = (node) => {
* 渲染节点 * 渲染节点
* @param node * @param node
*/ */
let cusRenderNode = (node, isFlyTo = true) => { let cusRenderNode = (node, isFlyTo = true, isSelect = true) => {
if (!_entityMap.has(node.source_id)) { if (!_entityMap.has(node.source_id)) {
let res = localStorage.getItem("defaultView"); let res = localStorage.getItem("defaultView");
console.log("++++++++++++", node); console.log("++++++++++++", node);
// if(node.is_show) // if(node.is_show)
nodeType[node.source_type].render(node, isFlyTo, () => {}); nodeType[node.source_type].render(node, isFlyTo, () => {});
console.log("cusRenderNode1111111111111111111111111", node); console.log("cusRenderNode1111111111111111111111111", node);
if(isSelect) {
YJ.Global.splitScreen.setActiveId([node.source_id]); YJ.Global.splitScreen.setActiveId([node.source_id]);
} }
}
}; };
let cusRenderNode2d = (node) => { let cusRenderNode2d = (node) => {
if (nodeType[node.source_type].hasOwnProperty("render2d")) if (nodeType[node.source_type].hasOwnProperty("render2d"))

View File

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

View File

@ -211,8 +211,8 @@ export default {
source_id, source_id,
source_name: option.source_name, source_name: option.source_name,
source_type: option.source_type, source_type: option.source_type,
// p_id: findParentId(this.treeObj), p_id: findParentId(this.treeObj),
p_id:biaohui_id, // p_id:biaohui_id,
}; };
let draw let draw
if (option.source_type == "curve") { if (option.source_type == "curve") {
@ -262,7 +262,7 @@ export default {
if ([0, 200].includes(res.code)) { if ([0, 200].includes(res.code)) {
cusRenderNode(DbOption); cusRenderNode(DbOption);
// DbOption.p_id // DbOption.p_id
cusAddNodes(this.treeObj,biaohui_id, [node]); cusAddNodes(this.treeObj, DbOption.p_id, [node]);
} }
}); });
} }
@ -284,7 +284,7 @@ export default {
}, },
// 贴地文字 // 贴地文字
groundText() { groundText() {
let biaohui_id = "标绘图层"; // let biaohui_id = "标绘图层";
let that = this; let that = this;
this.$sendChanel("textTetlie", "贴地文字"); this.$sendChanel("textTetlie", "贴地文字");
this.$changeComponentShow(".textModelBox", true); this.$changeComponentShow(".textModelBox", true);
@ -307,7 +307,7 @@ export default {
source_id, source_id,
source_name: data.text, source_name: data.text,
source_type: "groundText", source_type: "groundText",
p_id: biaohui_id, p_id: findParentId(that.treeObj),
}; };
let detailOption = JSON.parse(JSON.stringify(option)); let detailOption = JSON.parse(JSON.stringify(option));
@ -321,7 +321,7 @@ export default {
addSource(node).then((res) => { addSource(node).then((res) => {
if ([0, 200].includes(res.code)) { if ([0, 200].includes(res.code)) {
// cusRenderNode(DbOption) // cusRenderNode(DbOption)
cusAddNodes(that.treeObj,biaohui_id, [node]); cusAddNodes(that.treeObj,DbOption.p_id, [node]);
} }
}); });
} }
@ -331,7 +331,7 @@ export default {
}, },
// 立体文字 // 立体文字
standText() { standText() {
let biaohui_id = "标绘图层"; // let biaohui_id = "标绘图层";
let that = this; let that = this;
this.$sendChanel("textTetlie", "立体文字"); this.$sendChanel("textTetlie", "立体文字");
this.$changeComponentShow(".textModelBox", true); this.$changeComponentShow(".textModelBox", true);
@ -353,7 +353,7 @@ export default {
source_id, source_id,
source_name: data.text, source_name: data.text,
source_type: "standText", source_type: "standText",
p_id: biaohui_id, p_id: findParentId(that.treeObj),
}; };
let detailOption = JSON.parse(JSON.stringify(option)); let detailOption = JSON.parse(JSON.stringify(option));
let node = getNodeData(DbOption, detailOption); let node = getNodeData(DbOption, detailOption);
@ -361,7 +361,7 @@ export default {
addSource(node).then((res) => { addSource(node).then((res) => {
if ([0, 200].includes(res.code)) { if ([0, 200].includes(res.code)) {
// cusRenderNode(DbOption) // cusRenderNode(DbOption)
cusAddNodes(that.treeObj, biaohui_id, [node]); cusAddNodes(that.treeObj, DbOption.p_id, [node]);
} }
}); });
} }
@ -381,7 +381,7 @@ export default {
source_id, source_id,
source_name: "扇形", source_name: "扇形",
source_type: "sector", source_type: "sector",
p_id: biaohui_id, p_id: findParentId(this.treeObj),
}; };
console.log("params", params); console.log("params", params);
@ -399,7 +399,7 @@ export default {
addSource(node).then((res) => { addSource(node).then((res) => {
if ([0, 200].includes(res.code)) { if ([0, 200].includes(res.code)) {
cusRenderNode(DbOption) cusRenderNode(DbOption)
cusAddNodes(this.treeObj, biaohui_id, [node]); cusAddNodes(this.treeObj, DbOption.p_id, [node]);
} }
}); });
} }
@ -417,7 +417,7 @@ export default {
source_id, source_id,
source_name: "椭圆", source_name: "椭圆",
source_type: "ellipse", source_type: "ellipse",
p_id: biaohui_id, p_id: findParentId(this.treeObj),
}; };
let option = { let option = {
id: source_id, id: source_id,
@ -432,7 +432,7 @@ export default {
addSource(node).then((res) => { addSource(node).then((res) => {
if ([0, 200].includes(res.code)) { if ([0, 200].includes(res.code)) {
cusRenderNode(DbOption) cusRenderNode(DbOption)
cusAddNodes(this.treeObj, biaohui_id, [node]); cusAddNodes(this.treeObj, DbOption.p_id, [node]);
} }
}); });
} }

View File

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

View File

@ -0,0 +1,772 @@
<template>
<div class="tactical">
<div class="box YJ-custom-base-dialog" v-draggable>
<div class="boxHeader nav">
<!-- <span></span> -->
<span class="label">战术计算</span>
<div class="close-box" @click="close">
<span class="close"></span>
<i>x</i>
</div>
</div>
<div class="boxBody content">
<el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane label="堵击计算" name="0">
<el-form label-width="100px" class="demo-form-inline">
<el-form-item label="我方距堵击点">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入我方距堵击点" min="0" max="99999999"
v-model="blockade.weDistance" @input="checkBlockadeWeDistance" />
<span class="unit">km</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="敌方距堵击点">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入敌方距堵击点" min="0" max="99999999"
v-model="blockade.enemyDistance" @input="checkBlockadeEnemyDistance" />
<span class="unit">km</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="敌方平均速度">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入敌方平均速度" min="0" max="99999999"
v-model="blockade.enemySpeed" @input="checkBlockadeEnemySpeed" />
<span class="unit">km/h</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;margin: 5px 0 10px 0;">
<el-button @click="blockadeCalculate">计算</el-button>
</el-form-item>
</el-form>
<span class="custom-divider"></span>
<div class="bottom">
<div>
<span>追击速度</span>
<span v-show="!blockade.speed">_</span>
<span v-show="blockade.speed">≥ <span class="data">{{ blockade.speed }}</span>km/h</span>
</div>
<div>
<span>所需追击时间</span>
<span v-show="blockade.time === null">_</span>
<span v-show="blockade.time !== null">
<span v-show="blockade.formatTime.integerPart >= 1"><span class="data">{{ blockade.formatTime.integerPart
}}</span>h</span>
<span
v-show="blockade.formatTime.fractionalPart > 0 || (blockade.formatTime.integerPart === 0 && blockade.formatTime.fractionalPart === 0)"><span
class="data">{{ Math.round(blockade.formatTime.fractionalPart * 60) }}</span>min</span>
</span>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="追击计算" name="1">
<el-form label-width="100px" class="demo-form-inline">
<el-form-item label="与敌人的距离">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入与敌人距离" min="0" max="99999999"
v-model="pursuit.distance" @input="checkPursuitDistance" />
<span class="unit">km</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="敌运动速度">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入敌运动速度" min="0" max="99999999"
v-model="pursuit.enemySpeed" @input="checkPursuitEnemySpeed" />
<span class="unit">km/h</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="追击速度">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入追击速度" min="0" max="99999999"
v-model="pursuit.speed" @input="checkPursuitSpeed" />
<span class="unit">km/h</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;margin: 5px 0 10px 0;">
<el-button @click="pursuitCalculate">计算</el-button>
</el-form-item>
</el-form>
<span class="custom-divider"></span>
<div class="bottom">
<div>
<span>追上敌方的时间</span>
<span v-show="pursuit.time == null">_</span>
<span v-show="pursuit.time !== null">
<span v-show="pursuit.formatTime.integerPart >= 1"><span class="data">{{ pursuit.formatTime.integerPart
}}</span>h</span>
<span
v-show="pursuit.formatTime.fractionalPart > 0 || (pursuit.formatTime.integerPart === 0 && pursuit.formatTime.fractionalPart === 0)"><span
class="data">{{ Math.round(pursuit.formatTime.fractionalPart * 60) }}</span>min</span>
</span>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="遭遇计算" name="2">
<el-form label-width="90px" class="demo-form-inline">
<el-form-item label="敌我间距离">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入敌我间距离" min="0" max="99999999"
v-model="encounter.distance" @input="checkEncounterDistance" />
<span class="unit">km</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="我运动时速">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入我运动时速" min="0" max="99999999"
v-model="encounter.weSpeed" @input="checkEncounterWeSpeed" />
<span class="unit">km/h</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="敌运动速度">
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" placeholder="请输入敌运动速度" min="0" max="99999999"
v-model="encounter.enemySpeed" @input="checkEncounterEnemySpeed" />
<span class="unit">km/h</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;margin: 5px 0 10px 0;">
<el-button @click="encounterCalculate">计算</el-button>
</el-form-item>
</el-form>
<span class="custom-divider"></span>
<div class="bottom">
<div>
<span>与敌遭遇的时间</span>
<span v-show="encounter.time === null">_</span>
<span v-show="encounter.time !== null">
<span v-show="encounter.formatTime.integerPart >= 1"><span
class="data">{{ encounter.formatTime.integerPart }}</span>h</span>
<span
v-show="encounter.formatTime.fractionalPart > 0 || (encounter.formatTime.integerPart === 0 && encounter.formatTime.fractionalPart === 0)"><span
class="data">{{ Math.round(encounter.formatTime.fractionalPart * 60) }}</span>min</span>
</span>
</div>
<div>
<span>与敌遭遇的距离</span>
<span v-show="!encounter.meetingDistance && encounter.meetingDistance !== 0">_</span>
<span v-show="encounter.meetingDistance || encounter.meetingDistance === 0"> <span class="data">{{
encounter.meetingDistance }}</span>km</span>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="潜渡计算" name="3">
<el-form label-width="140px" class="demo-form-inline">
<el-form-item label="河宽或潜渡路线长度">
<div class="input-number input-number-unit-1" style="width: 190px;">
<input class="input" type="number" title="" placeholder="请输入河宽或潜渡路线长度" min="0" max="99999999"
v-model="dive.distance" @input="checkDiveDistance" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="潜渡中坦克间距">
<div class="input-number input-number-unit-3" style="width: 190px;">
<input class="input" type="number" title="" placeholder="请输入潜渡中坦克间距" min="0" max="99999999"
v-model="dive.spacing" @input="checkDiveSpacing" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="潜渡坦克数量">
<div class="input-number input-number-unit-3" style="width: 190px;">
<input class="input" type="number" title="" placeholder="请输入潜渡坦克数量" min="1" max="99999999"
v-model="dive.tank" @input="checkDiveTank" />
<span class="unit"></span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="潜渡路线数量">
<div class="input-number input-number-unit-3" style="width: 190px;">
<input class="input" type="number" title="" placeholder="请输入潜渡路线数量" min="1" max="99999999"
v-model="dive.route" @input="checkDiveRoute" />
<span class="unit"></span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item label="潜渡速度">
<div class="input-number input-number-unit-3" style="width: 190px;">
<input class="input" type="number" title="" placeholder="请输入潜渡速度" min="0" max="99999999"
v-model="dive.speed" @input="checkDiveSpeed" />
<span class="unit">m/min</span>
<span class="arrow"></span>
</div>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;margin: 5px 0 10px 0;">
<el-button @click="diveCalculate">计算</el-button>
</el-form-item>
</el-form>
<span class="custom-divider"></span>
<div class="bottom">
<div>
<span>潜渡时间</span>
<span v-show="dive.time === null">_</span>
<span v-show="dive.time !== null">
<span v-show="dive.formatTime.integerPart >= 1"><span class="data">{{ dive.formatTime.integerPart
}}</span>h</span>
<span
v-show="dive.formatTime.fractionalPart > 0 || (dive.formatTime.integerPart === 0 && dive.formatTime.fractionalPart === 0)"><span
class="data">{{ Math.round(dive.formatTime.fractionalPart * 60) }}</span>min</span>
</span>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
export default {
name: "tactical",
data() {
return {
labelPosition: "top",
activeName: '0',
form: {
text: "",
},
title: "",
blockade: {
time: null,
speed: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
},
pursuit: {
time: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
},
encounter: {
time: null,
meetingDistance: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
},
dive: {
time: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
}
};
},
methods: {
close() {
this.$changeComponentShow(".tactical", false);
this.activeName = '0'
this.blockade = {
time: null,
speed: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
}
this.pursuit = {
time: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
}
this.encounter = {
time: null,
meetingDistance: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
}
this.dive = {
time: null,
formatTime: {
integerPart: null,
fractionalPart: null,
},
}
},
cancel() {
this.$changeComponentShow(".tactical", false);
this.$sendChanel("tacticalContent", null);
this.form = {
text: "",
};
},
isOnlyWhitespace(str) {
// 使用正则表达式匹配一个或多个空白字符
const regex = /^\s+$/;
return regex.test(str);
},
textareaInput() {
let textArray = this.form.text.split('\n')
for (let i = 0; i < textArray.length; i++) {
if (textArray[i].length > 80) {
textArray[i] = textArray[i].slice(0, 80 - textArray[i].length)
this.$message.warning("行超过80个字符,请按回车Enter继续输入")
}
}
if (textArray.length > 70) {
textArray.splice(70 - textArray.length)
this.$message.warning("超过最大输入字符")
}
this.form.text = textArray.join('\n')
},
confirm() {
//this.form.text去除空格
// this.form.text = this.form.text.replace(/\s+/g, "");
let bool = this.isOnlyWhitespace(this.form.text)
if (this.form.text.length == 0 || bool) {
this.$message.warning("请输入内容");
return;
}
this.$sendChanel("tacticalContent", this.form);
this.$changeComponentShow(".tactical", false);
this.form = {
text: "",
};
},
blockadeCalculate() {
let num = Number(this.blockade.weDistance)
let num2 = Number(this.blockade.enemyDistance)
let num3 = Number(this.blockade.enemySpeed)
if (!num || !num2 || !num3) {
// this.$message.warning("请输入完整信息");
this.blockade.time = null
this.blockade.speed = null
this.blockade.formatTime = {
integerPart: null,
fractionalPart: null,
}
return;
}
let num4 = num2 / num3
this.blockade.time = Math.round((num4) * 100) / 100; // 四舍五入保留两位小数
this.blockade.speed = Math.round((num / this.blockade.time) * 100) / 100
this.blockade.formatTime = this.splitNumber(this.blockade.time)
},
pursuitCalculate() {
if (!this.pursuit.distance || !this.pursuit.enemySpeed || !this.pursuit.speed) {
this.pursuit.time = null
this.pursuit.formatTime = {
integerPart: null,
fractionalPart: null,
}
return;
}
let num = Number(this.pursuit.distance)
let num2 = Number(this.pursuit.enemySpeed)
let num3 = Number(this.pursuit.speed)
// 如果初始距离为0已经追上
if (num === 0) {
this.pursuit.time = 0
this.pursuit.formatTime = {
integerPart: 0,
fractionalPart: 0,
}
}
else {
const relativeSpeed = num3 - num2;
// 如果相对速度小于等于0无法追上
if (relativeSpeed <= 0) {
this.pursuit.time = null
this.pursuit.formatTime = {
integerPart: null,
fractionalPart: null,
}
this.$message.warning("追击速度小于等于敌运动速度,无法追上敌人");
}
else {
this.pursuit.time = Math.round((num / relativeSpeed) * 100) / 100
this.pursuit.formatTime = this.splitNumber(this.pursuit.time)
}
}
},
encounterCalculate() {
if (!this.encounter.distance || !this.encounter.weSpeed || !this.encounter.enemySpeed) {
this.encounter.time = null
this.encounter.meetingDistance = null
this.encounter.formatTime = {
integerPart: null,
fractionalPart: null,
}
return;
}
let num = Number(this.encounter.distance)
let num2 = Number(this.encounter.weSpeed)
let num3 = Number(this.encounter.enemySpeed)
if(num2 == 0 && num3 == 0) {
this.$message.warning("敌我双方运动时速皆为0不会遭遇");
return
}
const relativeSpeed = num2 + num3;
this.encounter.time = Math.round((num / relativeSpeed) * 100) / 100;
this.encounter.meetingDistance = Math.round((num2 * this.encounter.time) * 100) / 100
this.encounter.formatTime = this.splitNumber(this.encounter.time)
},
diveCalculate() {
let distance = Number(this.dive.distance)
let spacing = Number(this.dive.spacing)
let tank = Number(this.dive.tank)
let route = Number(this.dive.route)
let speed = Number(this.dive.speed)
if (!distance || this.dive.spacing === null || !tank || !route || !speed) {
this.dive.time = null
this.dive.formatTime = {
integerPart: null,
fractionalPart: null,
}
return;
}
// let time = ((distance + ((tank / route) * spacing)) / speed)
let num = Math.ceil(tank / route) //路径上坦克最多数量
let actualDistance = distance
if (num > 1) {
actualDistance = distance + ((num - 1) * spacing)
}
let time = actualDistance / speed
this.dive.time = Math.round(time * 100) / 100
this.dive.time = this.dive.time / 60
this.dive.formatTime = this.splitNumber(this.dive.time)
},
splitNumber(num) {
let data = {}
// 处理非数字情况
if (typeof num !== 'number' || isNaN(num)) {
return {};
}
// 处理整数情况
if (Number.isInteger(num)) {
data = {
integerPart: num,
fractionalPart: 0
};
}
else {
// 将数字转换为字符串处理
const numStr = num.toString();
const parts = numStr.split('.');
// 整数部分
const integerPart = parseFloat(parts[0]);
// 小数部分(保留原始精度)
const fractionalPart = parseFloat('0.' + parts[1]);
data = { integerPart, fractionalPart };
}
return data
},
checkBlockadeWeDistance(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.blockade.weDistance = 0.01
}
},
checkBlockadeEnemyDistance(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.blockade.enemyDistance = 0.01
}
},
checkBlockadeEnemySpeed(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.blockade.enemySpeed = 0.01
}
},
checkPursuitDistance(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.pursuit.distance = 0.01
}
},
checkPursuitEnemySpeed(e) {
let value = Number(e.target.value)
if (value < 0) {
this.pursuit.enemySpeed = 0
}
},
checkPursuitSpeed(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.pursuit.speed = 0.01
}
},
checkEncounterDistance(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.encounter.distance = 0.01
}
},
checkEncounterWeSpeed(e) {
let value = Number(e.target.value)
if (value < 0) {
this.encounter.weSpeed = 0
}
},
checkEncounterEnemySpeed(e) {
let value = Number(e.target.value)
if (value < 0) {
this.encounter.enemySpeed = 0
}
},
checkDiveDistance(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.dive.distance = 0.01
}
},
checkDiveSpacing(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.dive.spacing = 0.01
}
},
checkDiveTank(e) {
let value = Number(e.target.value)
if (value < 1) {
this.dive.tank = 1
}
},
checkDiveRoute(e) {
let value = Number(e.target.value)
if (value < 1) {
this.dive.route = 1
}
},
checkDiveSpeed(e) {
let value = Number(e.target.value)
if (value < 0.01) {
this.dive.speed = 0.01
}
},
},
mounted() {
},
};
</script>
<style lang="scss">
.tactical {
user-select: none;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
.box {
width: auto;
display: flex;
flex-direction: column;
position: absolute;
left: 50%;
top: 45%;
transform: translate(-50%, -150px);
color: var(--color-sdk-auxiliary-public);
font-size: 14px;
// z-index: 999999;
background: linear-gradient(0deg, var(--color-sdk-bg-gradual)),
rgba(0, 0, 0, 0.6);
border: 1.5px solid;
border-image: linear-gradient(to bottom, var(--color-sdk-gradual)) 1;
text-align: left;
font-family: "sy-boldface";
.boxHeader {
display: flex;
justify-content: space-between;
font-size: 18px;
line-height: 46px;
padding: 5px 16px 5px 16px;
height: 46px;
.label {
font-family: "Ali-mother-counts-bold";
font-size: 18px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
text-align: left;
text-shadow: 0px 0px 9px rgb(20 118 255);
}
.close-box {
position: absolute;
top: -1px;
right: 0;
height: 30px;
cursor: pointer;
width: 30px;
border-radius: 0 0 0 90%;
overflow: hidden;
.close {
display: block;
width: 100%;
height: 100%;
background: rgba(var(--color-sdk-base-rgb), 1);
opacity: 0.5;
}
i {
font-style: normal;
font-size: 18px;
font-weight: 900;
position: absolute;
top: -13px;
left: 11px;
}
}
}
.boxBody {
flex: auto;
flex-direction: column;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 20px 20px 20px;
width: 432px;
.el-tabs {
width: 100%;
.el-tabs__header {
margin-bottom: 10px;
}
.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__nav-wrap:after {
height: 1PX;
background-color: rgba(204, 204, 204, 0.2);
}
.el-tabs__nav-wrap {
.el-tabs__nav-scroll {
.el-tabs__active-bar {
display: none !important;
}
.is-active {
border-bottom: 1px solid rgb(0, 255, 255);
}
}
}
}
.el-form-item__label {
padding-right: 10px;
}
.input-number {
width: 180px;
input::placeholder {
font-size: 12px;
font-weight: 400;
letter-spacing: 0px;
line-height: 24px;
color: rgba(255, 255, 255, 1);
text-align: left;
vertical-align: top;
}
.unit {
top: 10px;
}
.arrow {
top: 13px;
}
}
.el-form--label-top .el-form-item__label {
padding: 0;
}
.el-form-item__label {
color: #fff;
}
.el-textarea__inner {
max-height: 500px;
// overflow: hidden; /* 禁用滚动条 */
resize: none;
/* 禁止用户手动调整文本框的尺寸 */
background-color: transparent;
color: #fff;
border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
}
.el-textarea__inner::scrollbar-width {
display: none;
}
.el-button {
background: rgba(var(--color-sdk-base-rgb), 0.2);
border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
color: #ffffff;
padding: 8px 16px;
}
.el-button:hover {
border-color: rgba(var(--color-sdk-base-rgb), 1) !important;
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 15px;
.data {
font-size: 16px;
font-weight: 700;
}
}
}
}
}</style>

View File

@ -1,7 +1,9 @@
<template> <template>
<div class="header_top"> <div class="header_top">
<!-- <svg-icon icon-class="Head" :class-name="['headItem']"></svg-icon> --> <!-- <svg-icon icon-class="Head" :class-name="['headItem']"></svg-icon> -->
<img style="width:100%;" :src="require('@/assets/images/shijingjun/' + skinInfo + '/head.png')" alt="" /> <img v-if="!headImage" class="header_img" alt="" />
<img v-else-if="headImage === 'default'" class="header_img" :src="require('@/assets/images/shijingjun/' + skinInfo + '/head.png')" alt="" />
<img v-else class="header_img" :src="headImage" alt="" />
<div class="dateTime"> <div class="dateTime">
<span>{{ date.ymd }}</span> <span>{{ date.ymd }}</span>
<span>{{ $t("headerTitles.week")[date.week] }}</span> <span>{{ $t("headerTitles.week")[date.week] }}</span>
@ -42,11 +44,13 @@ export default {
ymd: "2023/11/20", ymd: "2023/11/20",
week: "1", week: "1",
}, },
flag: false,
showSystem: false, //设置框 showSystem: false, //设置框
head: "", head: null,
skinInfo: JSON.parse(localStorage.getItem("systemSetting")).skinInfo, skinInfo: JSON.parse(localStorage.getItem("systemSetting")).skinInfo,
appVersion: localStorage.getItem("appVersion"), appVersion: localStorage.getItem("appVersion"),
batteryInfo: "", batteryInfo: "",
headImage: ''
}; };
}, },
beforeMount() { beforeMount() {
@ -55,6 +59,10 @@ export default {
// //
// this.head = res; // this.head = res;
// }); // });
let header = localStorage.getItem("header")
if (header) {
this.head = JSON.parse(header)
}
}, },
mounted() { mounted() {
// this.setTime() // this.setTime()
@ -68,8 +76,45 @@ export default {
if (e.key == "systemSetting") { if (e.key == "systemSetting") {
let obj = JSON.parse(e.newValue); let obj = JSON.parse(e.newValue);
that.skinInfo = obj.skinInfo; that.skinInfo = obj.skinInfo;
if(this.head) {
switch (that.skinInfo) {
case 'yingguangse':
that.headImage = that.head.header1
break;
case 'gonganlan':
that.headImage = that.head.header2
break;
case 'hong':
that.headImage = that.head.header3
break;
}
}
else {
that.headImage = 'default'
}
} }
}); });
this.$recvChanel("header", () => {
let header = localStorage.getItem("header")
that.head = JSON.parse(header)
if (that.head) {
switch (that.skinInfo) {
case 'yingguangse':
that.headImage = that.head.header1
break;
case 'gonganlan':
that.headImage = that.head.header2
break;
case 'hong':
that.headImage = that.head.header3
break;
}
}
else {
that.headImage = 'default'
}
})
this.$recvChanel("batteryInfo", (data) => { this.$recvChanel("batteryInfo", (data) => {
if (data.isShow) { if (data.isShow) {
this.batteryInfo = data.title; this.batteryInfo = data.title;
@ -126,6 +171,13 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
z-index: 19; z-index: 19;
.header_img {
width:100%;
height: 100%;
}
.header_img:not([src]){
opacity:0;
}
.dateTime { .dateTime {
position: absolute; position: absolute;

View File

@ -191,16 +191,38 @@ export default {
); */ ); */
}, },
graphLabelClick(data, event) { graphLabelClick(data, event) {
console.log(data)
// if (this.selectedGraphLabelType == data.type_id) {
// this.graphTableData = [];
// this.$nextTick(() => {
// this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
// });
// this.selectedGraphLabelType = null;
// } else {
// this.selectedGraphLabelType = data.type_id;
// this.graphTableData = data.children || [];
// }
if (this.selectedGraphLabelType == data.type_id) { if (this.selectedGraphLabelType == data.type_id) {
this.graphTableData = []; this.graphTableData = [];
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.myTree && this.$refs.myTree.setCurrentKey(null); this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
}); });
this.selectedGraphLabelType = null; this.selectedGraphLabelType = null
} else {
this.selectedGraphLabelType = data.type_id;
this.graphTableData = data.children || [];
} }
else {
this.graphTableData = [...data.children];
this.graphTableSelectData = data.children;
let junbiaos = [];
this.selectedGraphLabelType = data.type_id;
this.JByuanshishuju.forEach((item) => {
if (item.p_id == data.type_id && item.children)
junbiaos = junbiaos.concat(item.children);
});
this.graphTableData.push(...junbiaos);
}
}, },
tongbu() { tongbu() {
tongbus((res) => { tongbus((res) => {
@ -425,7 +447,7 @@ export default {
} }
})*/ })*/
}) })
.catch(() => {}); .catch(() => { });
}, },
//获取军标类型列表 //获取军标类型列表
@ -433,12 +455,15 @@ export default {
this.graphLabelDataMaps.clear(); this.graphLabelDataMaps.clear();
this.graphLabelTypeList = []; this.graphLabelTypeList = [];
this.graphTableData = []; this.graphTableData = [];
this.graphTableSelectData = [];
this.JByuanshishuju = [];
getGraphLabelType2((res) => { getGraphLabelType2((res) => {
console.log("", res); console.log("", res);
setTimeout(() => { setTimeout(() => {
this.junbiaoLoading = false; this.junbiaoLoading = false;
}, 1500); }, 1500);
if (res.list.length) { if (res.list.length) {
this.JByuanshishuju = res.list;
console.log("this.graphLabelDataMaps", this.graphLabelDataMaps); console.log("this.graphLabelDataMaps", this.graphLabelDataMaps);
res.list.forEach((item) => { res.list.forEach((item) => {
item.sonNode = []; item.sonNode = [];
@ -496,7 +521,7 @@ export default {
} }
}); });
}, },
io(dataArr, value) {}, io(dataArr, value) { },
editGraphLabelTypes() { editGraphLabelTypes() {
console.log(123); console.log(123);
@ -563,10 +588,10 @@ export default {
} }
})*/ })*/
}) })
.catch(() => {}); .catch(() => { });
} }
}, },
delGraphLabel(jun_biao_id) { delGraphLabel(jun_biao_id, p_id) {
console.log(this.graphLabelTypeList); console.log(this.graphLabelTypeList);
let msg = "确定删除?"; let msg = "确定删除?";
this.$confirm(msg, "警告", { this.$confirm(msg, "警告", {
@ -578,13 +603,26 @@ export default {
delGraphLabels({ jun_biao_id }, (res) => { delGraphLabels({ jun_biao_id }, (res) => {
//刷新当前页 //刷新当前页
// this.pageModelList(); // this.pageModelList();
this.getGraphLabelTypeList(); // this.getGraphLabelTypeList();
this.graphTableData = this.graphTableData.filter( this.graphTableData = this.graphTableData.filter(
(item) => item.jun_biao_id !== jun_biao_id (item) => {
return item.jun_biao_id !== jun_biao_id
}
); );
if(p_id) {
setProperty(
this.graphLabelTypeList,
"sonNode",
"type_id",
p_id,
"children",
this.graphTableData,
"assign"
);
}
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
editGraphLabel(row) { editGraphLabel(row) {
// editGraphLabel() // editGraphLabel()
@ -661,7 +699,7 @@ export default {
this.getRoleList(); this.getRoleList();
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
handleRoleSizeChange(val) { handleRoleSizeChange(val) {
this.roleListPageSize = val; this.roleListPageSize = val;
@ -735,7 +773,7 @@ export default {
this.getUserList(depart_id); this.getUserList(depart_id);
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
//获取部门列表 //获取部门列表
@ -945,7 +983,7 @@ export default {
this.getModelTypeList(); this.getModelTypeList();
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
preview(row) { preview(row) {
this.$changeComponentShow("#scene", true); this.$changeComponentShow("#scene", true);
@ -1222,8 +1260,8 @@ export default {
"type_id", "type_id",
obj.p_id, obj.p_id,
"children", "children",
_that.graphTableData, obj,
"assign" "append"
); );
}); });
}); });
@ -1272,7 +1310,7 @@ export default {
});*/ });*/
}); });
}, },
coordinateChange() {}, coordinateChange() { },
sysChange() { sysChange() {
this.$store.dispatch("changeSystem", this.systemSetting); this.$store.dispatch("changeSystem", this.systemSetting);
@ -1352,9 +1390,9 @@ export default {
console.log("服务接入提交确认"); console.log("服务接入提交确认");
}, },
// 海康平台确认 // 海康平台确认
onSubmitInfo() {}, onSubmitInfo() { },
//主题信息提交 //主题信息提交
onThemeSubmit() {}, onThemeSubmit() { },
copy(e) { copy(e) {
console.log("111111111111"); console.log("111111111111");
console.log(copyContent(e.target.textContent)); console.log(copyContent(e.target.textContent));
@ -1378,7 +1416,7 @@ export default {
if (!paths.length) { if (!paths.length) {
return; return;
} }
importPOI({ path: paths[0] }, (res) => {}); importPOI({ path: paths[0] }, (res) => { });
}); });
}, },
importLuWang() { importLuWang() {
@ -1396,7 +1434,7 @@ export default {
if (!paths.length) { if (!paths.length) {
return; return;
} }
importLuWang({ filePath: paths[0] }, (res) => {}); importLuWang({ filePath: paths[0] }, (res) => { });
}); });
}, },
// 工程导入(接口) // 工程导入(接口)

View File

@ -38,7 +38,8 @@
accept=".lic" :on-success="onSuccess"> accept=".lic" :on-success="onSuccess">
<el-button size="small" type="primary">{{ <el-button size="small" type="primary">{{
$t("headerTitles.auths.upload") $t("headerTitles.auths.upload")
}}</el-button> }}
</el-button>
</el-upload> </el-upload>
<!--<button class="btn" @click="onFileSubmit">{{ $t('headerTitles.confirm') }}</button>--> <!--<button class="btn" @click="onFileSubmit">{{ $t('headerTitles.confirm') }}</button>-->
</div> </div>
@ -128,12 +129,18 @@
</el-select> </el-select>
</div> --> </div> -->
<div style="display:flex;"> <div style="display:flex;">
<el-button size="mini" type="primary" @click="setView">{{ $t("headerTitles.systemSetting.defaultView") <el-button size="mini" type="primary" @click="setView">{{
}}</el-button> $t("headerTitles.systemSetting.defaultView")
<el-button size="mini" type="primary" @click="setData">{{ $t("headerTitles.systemSetting.defaultData") }}
}}</el-button> </el-button>
<el-button size="mini" type="primary" @click="management">{{ $t("headerTitles.systemSetting.management") <el-button size="mini" type="primary" @click="setData">{{
}}</el-button> $t("headerTitles.systemSetting.defaultData")
}}
</el-button>
<el-button size="mini" type="primary" @click="management">{{
$t("headerTitles.systemSetting.management")
}}
</el-button>
</div> </div>
</div> </div>
<div class="cc"> <div class="cc">
@ -169,7 +176,8 @@
<div class="center"> <div class="center">
<span>{{ $t("headerTitles.systemSetting.sheetIndexStatusSwitch") }}</span> <span>{{ $t("headerTitles.systemSetting.sheetIndexStatusSwitch") }}</span>
<el-switch style="margin-left: -17px;" @change="sysChange" <el-switch style="margin-left: -17px;" @change="sysChange"
v-model="systemSetting.sheetIndexStatusSwitch" active-color="#13ce66" inactive-color="#ff4949"> v-model="systemSetting.sheetIndexStatusSwitch" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch> </el-switch>
</div> </div>
<div class="center"> <div class="center">
@ -211,6 +219,85 @@
</button>--> </button>-->
</div> </div>
</el-tab-pane> </el-tab-pane>
<!-- 头部设置 -->
<el-tab-pane :label="$t('headerTitles.Header.title')" class="headerTab">
<el-dialog :visible.sync="headerAddDialogVisible" :modal="false" :title="$t('headerTitles.Header.add')"
width="100%" style="width: 680px; height: 420px;" center :before-close="headerAddClose">
<div style="display: flex;align-items: center;margin: 10px 0;">
<span style="width: 50px;">名称</span>
<el-input style="width: calc(100% - 78px);" v-model="headerParams.name"
placeholder="请输入名称"></el-input>
</div>
<el-row>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[0].id) }}</p>
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 1 }">
<img style="object-fit: contain;" v-if="headerParams.url1" :src="headerParams.url1" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
</el-col>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[1].id) }}</p>
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 2 }">
<img style="object-fit: contain;" v-if="headerParams.url2" :src="headerParams.url2" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
</el-col>
<el-col :span="8">
<p>{{ $t('headerTitles.systemSetting.skinList.' + skinList[2].id) }}</p>
<el-upload class="header-uploader" action="" accept=".png, .jpeg, .jpg" :show-file-list="false"
:http-request="headerUploadRequest"
:data="{ index: 3 }">
<img style="object-fit: contain;" v-if="headerParams.url3" :src="headerParams.url3" class="header">
<i v-else class="el-icon-plus header-uploader-icon"></i>
</el-upload>
</el-col>
</el-row>
<div style="text-align: right; margin-top: 20px;">
<el-button type="primary" size="small" @click="headerAddConfirm">
{{ $t("headerTitles.Header.confirm") }}
</el-button>
</div>
</el-dialog>
<div>
<div style="margin-bottom: 10px;">
<el-button type="primary" size="small" @click="headerAddDialogVisible = true">
{{ $t("headerTitles.Header.add") }}
</el-button>
</div>
<el-table :data="headerDataList" style="width: 100%" max-height="250">
<el-table-column
label=""
align="center"
width="50">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.selected" @change="headerSelectChange(scope.row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="name" label="图片名称" width="250" align="center">
</el-table-column>
<el-table-column align="center" label="缩略图">
<template slot-scope="scope">
<img :src="scope.row.header1" alt="" style="width: 100%;height: 50px;object-fit: contain;">
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="text" danger @click="deleteHeaderImg(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination style="display: flex;justify-content: center" @size-change="handleSizeChangeHeader"
@current-change="hadleCurrentChangeHeader" :current-page="paginationHeader.page"
:page-sizes="[5, 10, 20, 30, 40]"
:page-size="paginationHeader.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="paginationHeader.total"/>
</div>
</el-tab-pane>
<!-- 卫星状态 --> <!-- 卫星状态 -->
<!-- <el-tab-pane :label="$t('headerTitles.Satellite')"> <!-- <el-tab-pane :label="$t('headerTitles.Satellite')">
<div class="auth_info custom_scroll_bar content_h"> <div class="auth_info custom_scroll_bar content_h">
@ -254,7 +341,8 @@
</div> </div>
<div> <div>
<el-button @click="importpoi" size="mini" type="primary" class="btn_public">{{ <el-button @click="importpoi" size="mini" type="primary" class="btn_public">{{
$t("headerTitles.Engineerings.importPOI") }} $t("headerTitles.Engineerings.importPOI")
}}
</el-button> </el-button>
</div> </div>
<div> <div>
@ -277,21 +365,23 @@
<!-- 设备管理 --> <!-- 设备管理 -->
<el-tab-pane :label="$t('headerTitles.equipment.title')"> <el-tab-pane :label="$t('headerTitles.equipment.title')">
<equipment /> <equipment/>
</el-tab-pane> </el-tab-pane>
<!-- 无人机配置 v-if="false" --> <!-- 无人机配置 v-if="false" -->
<el-tab-pane v-if="false" :label="$t('headerTitles.air.title')"> <el-tab-pane v-if="false" :label="$t('headerTitles.air.title')">
<Air /> <Air/>
</el-tab-pane> </el-tab-pane>
<!-- 模型管理 --> <!-- 模型管理 -->
<el-tab-pane :label="$t('headerTitles.model.title')"> <el-tab-pane :label="$t('headerTitles.model.title')">
<!-- <model></model> --> <!-- <model></model> -->
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone"> <div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('model')" type="warning" size="small">{{ <el-button @click="createLib('model')" type="warning" size="small">{{
$t("headerTitles.model.createModelLibrary") }} $t("headerTitles.model.createModelLibrary")
}}
</el-button> </el-button>
<el-button @click="selectLib('model')" type="primary" size="small">{{ <el-button @click="selectLib('model')" type="primary" size="small">{{
$t("headerTitles.model.selectModelLibrary") }} $t("headerTitles.model.selectModelLibrary")
}}
</el-button> </el-button>
<el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small"> <el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.addModelType") }} {{ $t("headerTitles.model.addModelType") }}
@ -303,10 +393,12 @@
{{ $t("headerTitles.model.importModel") }} {{ $t("headerTitles.model.importModel") }}
</el-button> </el-button>
<el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{ <el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.editModel") }} $t("headerTitles.model.editModel")
}}
</el-button> </el-button>
<el-button @click="delModelTypes()" type="warning" size="small">{{ <el-button @click="delModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.deleteModel") }} $t("headerTitles.model.deleteModel")
}}
</el-button> </el-button>
</div> </div>
<div class="modelList"> <div class="modelList">
@ -343,7 +435,7 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
无模型类型,<br />请先添加模型类型 无模型类型,<br/>请先添加模型类型
</template> </template>
</div> </div>
</template> </template>
@ -389,10 +481,12 @@
<el-tab-pane v-if="false" label="三维军标"> <el-tab-pane v-if="false" label="三维军标">
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone"> <div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('model')" type="warning" size="small">{{ <el-button @click="createLib('model')" type="warning" size="small">{{
$t("headerTitles.model.createModelLibrary") }} $t("headerTitles.model.createModelLibrary")
}}
</el-button> </el-button>
<el-button @click="selectLib('model')" type="primary" size="small">{{ <el-button @click="selectLib('model')" type="primary" size="small">{{
$t("headerTitles.model.selectModelLibrary") }} $t("headerTitles.model.selectModelLibrary")
}}
</el-button> </el-button>
<el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small"> <el-button @click="addModelType" :disabled="importModelEnable()" type="success" size="small">
{{ $t("headerTitles.model.addModelType") }} {{ $t("headerTitles.model.addModelType") }}
@ -404,10 +498,12 @@
{{ $t("headerTitles.model.importModel") }} {{ $t("headerTitles.model.importModel") }}
</el-button> </el-button>
<el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{ <el-button style="margin-left: 10px" @click="editModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.editModel") }} $t("headerTitles.model.editModel")
}}
</el-button> </el-button>
<el-button @click="delModelTypes()" type="warning" size="small">{{ <el-button @click="delModelTypes()" type="warning" size="small">{{
$t("headerTitles.model.deleteModel") }} $t("headerTitles.model.deleteModel")
}}
</el-button> </el-button>
</div> </div>
<div class="modelList"> <div class="modelList">
@ -444,7 +540,7 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
无模型类型,<br />请先添加模型类型 无模型类型,<br/>请先添加模型类型
</template> </template>
</div> </div>
</template> </template>
@ -492,10 +588,12 @@
<el-tab-pane :label="$t('headerTitles.graphLabel.title')"> <el-tab-pane :label="$t('headerTitles.graphLabel.title')">
<div class="modelBtn custom_scroll_bar" v-if="isStandAlone"> <div class="modelBtn custom_scroll_bar" v-if="isStandAlone">
<el-button @click="createLib('graphLabel')" type="warning" size="small">{{ <el-button @click="createLib('graphLabel')" type="warning" size="small">{{
$t("headerTitles.graphLabel.createGraphLabelLibrary") }} $t("headerTitles.graphLabel.createGraphLabelLibrary")
}}
</el-button> </el-button>
<el-button @click="selectLib('junbiao')" type="primary" size="small">{{ <el-button @click="selectLib('junbiao')" type="primary" size="small">{{
$t("headerTitles.graphLabel.selectGraphLabelLibrary") }} $t("headerTitles.graphLabel.selectGraphLabelLibrary")
}}
</el-button> </el-button>
<el-button @click="addGraphLabelType" :disabled="importGraphLabelEnable()" type="success" size="small"> <el-button @click="addGraphLabelType" :disabled="importGraphLabelEnable()" type="success" size="small">
{{ $t("headerTitles.graphLabel.addGraphLabelType") }} {{ $t("headerTitles.graphLabel.addGraphLabelType") }}
@ -507,9 +605,11 @@
{{ $t("headerTitles.graphLabel.importGraphLabel") }} {{ $t("headerTitles.graphLabel.importGraphLabel") }}
</el-button> </el-button>
<el-button style="margin-left: 10px" @click="editGraphLabelTypes" type="warning" size="small">{{ <el-button style="margin-left: 10px" @click="editGraphLabelTypes" type="warning" size="small">{{
$t("headerTitles.graphLabel.edit") }} $t("headerTitles.graphLabel.edit")
}}
</el-button> </el-button>
<el-button @click="delGraphLabelTypes" type="warning" size="small">{{ $t("headerTitles.graphLabel.delete") <el-button @click="delGraphLabelTypes" type="warning" size="small">{{
$t("headerTitles.graphLabel.delete")
}} }}
</el-button> </el-button>
</div> </div>
@ -539,7 +639,7 @@
</el-tree> </el-tree>
</template> </template>
<template v-else> <template v-else>
无军标类型,<br />请先添加军标类型 无军标类型,<br/>请先添加军标类型
</template> </template>
</div> </div>
</template> </template>
@ -580,8 +680,10 @@
<el-table-column prop="type" label="操作" align="center"> <el-table-column prop="type" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editGraphLabel(scope.row)">{{ <el-button type="primary" size="mini" @click="editGraphLabel(scope.row)">{{
$t("headerTitles.graphLabel.edit") }}</el-button> $t("headerTitles.graphLabel.edit")
<el-button @click="delGraphLabel(scope.row.jun_biao_id)" type="danger" size="mini"> }}
</el-button>
<el-button @click="delGraphLabel(scope.row.jun_biao_id, scope.row.p_id)" type="danger" size="mini">
{{ $t("headerTitles.graphLabel.delete") }} {{ $t("headerTitles.graphLabel.delete") }}
</el-button> </el-button>
</template> </template>
@ -598,14 +700,15 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<!-- 物理沙盘 --> <!-- 物理沙盘 -->
<el-tab-pane v-if="false" :label="$t('headerTitles.udp')"> <!-- v-if="false"-->
<el-tab-pane :label="$t('headerTitles.udp')">
<div class="udp_auth"> <div class="udp_auth">
<div> <div>
<span class="fankuai"></span> <span class="fankuai"></span>
<span style="display: inline-block;margin-left: 5px;">UDP</span> <span style="display: inline-block;margin-left: 5px;">UDP</span>
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="color:#fff"> 允许连接 </span> <span style="color:#fff"> {{ $t('headerTitles.Permitconnection') }} </span>
<el-switch @change="change_sandTable_udp_client_status" v-model="sandTable_udp_client_status"></el-switch> <el-switch @change="change_sandTable_udp_client_status" v-model="sandTable_udp_client_status"></el-switch>
</div> </div>
<div> <div>
@ -626,7 +729,7 @@
</div> </div>
<div> <div>
<el-button size="mini" type="primary" @click="submitPort">保存</el-button> <el-button size="mini" type="primary" @click="submitPort">{{ $t("headerTitles.save") }}</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -647,9 +750,16 @@
</div> </div>
<div> <div>
<el-button size="mini" type="primary" @click="submitClient">保存</el-button> <el-button size="mini" type="primary" @click="submitClient">{{ $t("headerTitles.save") }}</el-button>
</div> </div>
</div> </div>
</div>
<div class="">
<!-- <el-button size="small" @click="sendGlobalMsg('AFFK','A')">{{ $t("headerTitles.allOpen") }}</el-button>
<el-button size="small" @click="sendGlobalMsg('AFFG','B')">{{ $t("headerTitles.allClose") }}</el-button>-->
<el-button size="small" @click="sendGlobalMsg('A000k #','k #')">{{ $t("headerTitles.allOpen") }}</el-button>
<el-button size="small" @click="sendGlobalMsg('A000g #','g #')">{{ $t("headerTitles.allClose") }}</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -699,21 +809,24 @@
</template> </template>
<script> <script>
import { setMove } from "./js/moveDiv"; import {setMove} from "./js/moveDiv";
import utilTools from "./js/utilTools"; import utilTools from "./js/utilTools";
import setAgreement from "./components/setAgreementInfo/setAgreement.vue"; import setAgreement from "./components/setAgreementInfo/setAgreement.vue";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
import { calcWidth } from "@/utils"; import {calcWidth} from "@/utils";
import { validateCommonText } from "@/utils/validate"; import {validateCommonText} from "@/utils/validate";
import equipment from "../../PLTraffic/components/manager/equipment/equipment"; import equipment from "../../PLTraffic/components/manager/equipment/equipment";
import Air from "./components/air/index.vue" import Air from "./components/air/index.vue"
import {Header} from "element-ui";
import {getHeaderList, addHeader, selectHeader, deleteHeader} from "@/api/gisAPI";
import {ipcRenderer} from "electron";
// import model from "./components/modelType/index.vue" // import model from "./components/modelType/index.vue"
// import {baseURL} from "../../../utils/request"; // import {baseURL} from "../../../utils/request";
export default { export default {
name: "systemPopup", name: "systemPopup",
mixins: [utilTools], mixins: [utilTools],
components: { setAgreement, equipment, Air }, components: {setAgreement, equipment, Air},
computed: { computed: {
...mapGetters(["system", "modelLibPath", "graphLabelLibPath"]), ...mapGetters(["system", "modelLibPath", "graphLabelLibPath"]),
}, },
@ -735,8 +848,8 @@ export default {
isStandAlone: window.isStandAlone, isStandAlone: window.isStandAlone,
rulesRole: { rulesRole: {
role_name: [ role_name: [
{ required: true, message: "请输入名称", trigger: "blur" }, {required: true, message: "请输入名称", trigger: "blur"},
{ min: 1, message: "长度大于 1 个字符", trigger: "blur" }, {min: 1, message: "长度大于 1 个字符", trigger: "blur"},
], ],
}, },
formRole: { formRole: {
@ -746,25 +859,25 @@ export default {
rules: { rules: {
username: [ username: [
{ required: true, message: "请输入用户名", trigger: "blur" }, {required: true, message: "请输入用户名", trigger: "blur"},
{ min: 5, message: "长度大于 5 个字符", trigger: "blur" }, {min: 5, message: "长度大于 5 个字符", trigger: "blur"},
{ validator: validateCommonText, trigger: "blur" }, {validator: validateCommonText, trigger: "blur"},
], ],
nick_name: [ nick_name: [
{ required: true, message: "请输入昵称", trigger: "blur" }, {required: true, message: "请输入昵称", trigger: "blur"},
{ min: 5, message: "长度大于 5 个字符", trigger: "blur" }, {min: 5, message: "长度大于 5 个字符", trigger: "blur"},
], ],
password: [ password: [
{ required: true, message: "请输入密码", trigger: "blur" }, {required: true, message: "请输入密码", trigger: "blur"},
{ min: 6, message: "长度大于 6 个字符", trigger: "blur" }, {min: 6, message: "长度大于 6 个字符", trigger: "blur"},
], ],
password2: [ password2: [
{ required: true, message: "请再次输入密码", trigger: "blur" }, {required: true, message: "请再次输入密码", trigger: "blur"},
{ validator: validatePass2, trigger: "blur" }, {validator: validatePass2, trigger: "blur"},
], ],
depart_id: [ depart_id: [
{ required: true, message: "请输入部门", trigger: "blur" }, {required: true, message: "请输入部门", trigger: "blur"},
{ min: 6, message: "长度大于 6 个字符", trigger: "blur" }, {min: 6, message: "长度大于 6 个字符", trigger: "blur"},
], ],
}, },
dialogFormVisible: false, dialogFormVisible: false,
@ -793,9 +906,9 @@ export default {
hikangInfo1: "", hikangInfo1: "",
hikangInfo2: "", hikangInfo2: "",
optionList: [ optionList: [
{ id: 1, label: "选择1" }, {id: 1, label: "选择1"},
{ id: 2, label: "选择2" }, {id: 2, label: "选择2"},
{ id: 3, label: "选择3" }, {id: 3, label: "选择3"},
], ],
hikang_checked: false, hikang_checked: false,
// ****** // ******
@ -816,15 +929,15 @@ export default {
}, },
skinList: [ skinList: [
{ id: "yingguangse", label: "荧光色" }, {id: "yingguangse", label: "荧光色"},
{ id: "gonganlan", label: "科技蓝" }, {id: "gonganlan", label: "科技蓝"},
{ id: "hong", label: "烈日红" }, {id: "hong", label: "烈日红"},
], ],
options: [ options: [
{ id: "zh", label: "中文简体" }, {id: "zh", label: "中文简体"},
{ id: "en", label: "English" }, {id: "en", label: "English"},
{ id: "tw", label: "中文繁體" }, {id: "tw", label: "中文繁體"},
], ],
// ***** // *****
select_id: 1, //选中服务接入 select_id: 1, //选中服务接入
@ -888,9 +1001,26 @@ export default {
}, },
], ],
searchWay: "poi", searchWay: "poi",
paginationHeader: {
page: 1,
pageSize: 5,
total: 0,
},
headerDataList: [],
headerAddDialogVisible: false,
headerParams: {
name: "",
header1: "",
header2: "",
header3: "",
url1: "",
url2: "",
url3: "",
}
}; };
}, },
mounted() { mounted() {
this.getHeaderList();
this.searchWay = localStorage.getItem("searchWay") || "poi"; this.searchWay = localStorage.getItem("searchWay") || "poi";
//用户修改角色后,重新请求用户列表 //用户修改角色后,重新请求用户列表
this.$recvChanel("getUserList", (props) => { this.$recvChanel("getUserList", (props) => {
@ -951,7 +1081,7 @@ export default {
calcsWidth(row) { calcsWidth(row) {
return calcWidth(row); return calcWidth(row);
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({row, rowIndex}) {
if (rowIndex === 1) { if (rowIndex === 1) {
return "warning-row"; return "warning-row";
} else if (rowIndex === 3) { } else if (rowIndex === 3) {
@ -959,6 +1089,153 @@ export default {
} }
return ""; return "";
}, },
getHeaderList() {
getHeaderList({
page: this.paginationHeader.page,
page_size: this.paginationHeader.pageSize,
}).then(res => {
if (res.code == 0 || res.code == 200) {
this.headerDataList = res.data.list
this.paginationHeader.total = res.data.total
}
})
},
headerSelectChange(row) {
for (let i = 0; i < this.headerDataList.length; i++) {
if (this.headerDataList[i].selected) {
this.headerDataList[i].selected = false
}
}
row.selected = true
selectHeader({
id: row.id
}).then(res => {
if (res.code == 0 || res.code == 200) {
this.$message.success("设置成功");
localStorage.setItem("header", JSON.stringify(row))
this.$sendChanel("header")
}
})
},
deleteHeaderImg(row) {
this.$confirm("确定删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
deleteHeader({
id: row.id
}).then(async res => {
if (res.code == 0 || res.code == 200) {
let header = JSON.parse(localStorage.getItem("header"))
this.$message.success("删除成功");
if (this.headerDataList.length == 1 && this.paginationHeader.page > 1) {
this.paginationHeader.page--
}
if (row.id == header.id) {
localStorage.removeItem("header")
// 显示第一个
await getHeaderList({
page: 1,
page_size: 1,
}).then(res => {
if (res.code == 0 || res.code == 200) {
if (res.data.list && res.data.list[0]) {
this.headerSelectChange(res.data.list[0])
setTimeout(() => {
this.getHeaderList();
}, 500);
} else {
this.getHeaderList();
localStorage.removeItem("header")
this.$sendChanel("header")
}
}
})
} else {
this.getHeaderList();
}
}
})
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
handleSizeChangeHeader(value) {
this.paginationHeader.pageSize = value;
this.getHeaderList();
},
hadleCurrentChangeHeader(value) {
this.paginationHeader.page = value;
this.getHeaderList();
},
headerUploadRequest(data) {
let fileObj = data.file
this.headerParams[`header${data.data.index}`] = fileObj;
this.headerParams[`url${data.data.index}`] = URL.createObjectURL(fileObj);
// console.log(this.headerParams.url1)
},
headerAddClose() {
this.headerAddDialogVisible = false;
this.headerParams = {
name: "",
header1: "",
header2: "",
header3: "",
url1: "",
url2: "",
url3: "",
}
},
headerAddConfirm() {
if (!this.headerParams.name) {
this.$message.warning("请输入名称");
return;
}
if (!this.headerParams.header1 || !this.headerParams.header2 || !this.headerParams.header3) {
this.$message.warning("请上传对应图片");
return;
}
let formData = new FormData()
formData.append('name', this.headerParams.name)
formData.append('header1', this.headerParams.header1)
formData.append('header2', this.headerParams.header2)
formData.append('header3', this.headerParams.header3)
addHeader(formData).then(res => {
if (res.code == 0 || res.code == 200) {
this.$message.success("添加成功");
this.headerAddDialogVisible = false;
this.headerParams = {
name: "",
header1: "",
header2: "",
header3: "",
url1: "",
url2: "",
url3: "",
}
this.getHeaderList();
}
})
},
sendGlobalMsg(cmd,flag){
let sandTable_udp_client_status = localStorage.getItem('sandTable_udp_client_status')
if (JSON.parse(sandTable_udp_client_status)) {
ipcRenderer.send('setNodes', cmd);
ipcRenderer.on("replayRenderer", (event, data) => {
Array.from(udp_pointMap.keys()).forEach(key=>{
let obj=udp_pointMap.get(key)
obj.command=flag
udp_pointMap.set(key,obj)
})
});
}
}
}, },
}; };
</script> </script>
@ -978,7 +1255,7 @@ export default {
}*/ }*/
.graphList { .graphList {
.el-tree-node.is-current { .el-tree-node.is-current {
&>.el-tree-node__content { & > .el-tree-node__content {
background-color: rgba(230, 242, 255, 0.93) !important; background-color: rgba(230, 242, 255, 0.93) !important;
} }
} }
@ -1023,7 +1300,7 @@ export default {
display: grid; display: grid;
place-items: center; place-items: center;
>span { > span {
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: 20px;
@ -1077,7 +1354,7 @@ export default {
} }
.content_h { .content_h {
>span { > span {
cursor: pointer; cursor: pointer;
} }
} }
@ -1135,16 +1412,16 @@ export default {
font-weight: bolder; font-weight: bolder;
} }
>div { > div {
margin: 20px 0 0; margin: 20px 0 0;
width: 100%; width: 100%;
>span { > span {
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
} }
&>span:first-child { & > span:first-child {
//width: 90px; //width: 90px;
color: #0ff; color: #0ff;
font-size: 18px; font-size: 18px;
@ -1152,7 +1429,7 @@ export default {
display: inline-block; display: inline-block;
} }
&>span:nth-child(2) { & > span:nth-child(2) {
display: inline-block; display: inline-block;
padding: 2px 10px; padding: 2px 10px;
border-radius: 5px; border-radius: 5px;
@ -1168,7 +1445,7 @@ export default {
justify-content: center; justify-content: center;
color: #fff; color: #fff;
>span { > span {
padding: 4px 10px; padding: 4px 10px;
height: 30px; height: 30px;
background: rgba(0, 255, 255, 0.4); background: rgba(0, 255, 255, 0.4);
@ -1198,7 +1475,7 @@ export default {
border: none !important; border: none !important;
} }
>span { > span {
width: 90px; width: 90px;
color: #0ff; color: #0ff;
font-size: 18px; font-size: 18px;
@ -1237,7 +1514,7 @@ export default {
.cc1 { .cc1 {
width: 40%; width: 40%;
>div { > div {
margin: 10px 0 0; margin: 10px 0 0;
.detailSkin { .detailSkin {
@ -1245,22 +1522,22 @@ export default {
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
>span { > span {
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
} }
&>span:first-child { & > span:first-child {
//width: 90px; //width: 90px;
color: #0ff; color: #0ff;
font-size: 18px; font-size: 18px;
font-weight: bolder; font-weight: bolder;
display: inline-block; display: inline-block;
width: 108px; width: 116px;
text-align: right; text-align: right;
} }
&>span:nth-child(2) { & > span:nth-child(2) {
display: inline-block; display: inline-block;
padding: 2px 10px; padding: 2px 10px;
border-radius: 5px; border-radius: 5px;
@ -1281,15 +1558,15 @@ export default {
} }
>div { > div {
margin: 20px 0 0; margin: 20px 0 0;
>span { > span {
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
} }
&>span:first-child { & > span:first-child {
//width: 90px; //width: 90px;
color: #0ff; color: #0ff;
font-size: 18px; font-size: 18px;
@ -1298,7 +1575,7 @@ export default {
text-align: right; text-align: right;
} }
&>span:nth-child(2) { & > span:nth-child(2) {
display: inline-block; display: inline-block;
padding: 2px 10px; padding: 2px 10px;
border-radius: 5px; border-radius: 5px;
@ -1314,7 +1591,7 @@ export default {
height: 17vw; height: 17vw;
padding: 0 20px; padding: 0 20px;
>div:first-child { > div:first-child {
height: 20%; height: 20%;
width: 100%; width: 100%;
color: #0ff; color: #0ff;
@ -1325,7 +1602,7 @@ export default {
align-items: center; align-items: center;
} }
>div:last-child { > div:last-child {
height: 80%; height: 80%;
width: 100%; width: 100%;
display: flex; display: flex;
@ -1336,14 +1613,14 @@ export default {
justify-content: space-around; justify-content: space-around;
margin-bottom: 30px; margin-bottom: 30px;
>div { > div {
width: 40%; width: 40%;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 8px; padding: 8px;
} }
>div:last-child { > div:last-child {
width: 50%; width: 50%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1370,13 +1647,13 @@ export default {
justify-content: center; justify-content: center;
//align-items: center; //align-items: center;
&>div { & > div {
font-size: 18px; font-size: 18px;
color: #0ff; color: #0ff;
font-weight: bolder; font-weight: bolder;
margin-bottom: 5px; margin-bottom: 5px;
>span { > span {
margin-right: 10px; margin-right: 10px;
} }
@ -1386,7 +1663,7 @@ export default {
} }
} }
>button { > button {
margin-top: 20px; margin-top: 20px;
} }
} }
@ -1448,11 +1725,45 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&>span { & > span {
padding-left: 90px; padding-left: 90px;
font-size: 14px; font-size: 14px;
} }
} }
.headerTab {
.el-checkbox__inner {
width: 18px;
height: 18px;
}
.el-checkbox__inner::after {
height: 10px;
left: 6px;
}
.el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
.header,
.header-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
}
.el-upload:hover {
border-color: #409eff;
}
}
} }
.modelList, .modelList,

View File

@ -155,6 +155,7 @@ export default {
this.flag = key this.flag = key
}, },
init(obj, selected, hasGEMarker1 = true,isUrl) { init(obj, selected, hasGEMarker1 = true,isUrl) {
console.log('============================================',obj)
let selectedd let selectedd
if (isUrl) { if (isUrl) {
this.getList(new URL(selected)) this.getList(new URL(selected))

View File

@ -157,8 +157,14 @@ export default {
this.$prompt("请输入名称", "提示", { this.$prompt("请输入名称", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, inputValidator: (value) => {
// inputErrorMessage: "邮箱格式不正确" // 可选:同时限制不能为空
if (!value.trim()) {
return '输入内容不能为空!';
}
// 验证通过返回 true或不返回内容
return true;
}
}) })
.then(({value}) => { .then(({value}) => {
/* const newChild = { id: id++, label: 'testtest', children: [] }; /* const newChild = { id: id++, label: 'testtest', children: [] };
@ -167,7 +173,7 @@ export default {
} }
data.children.push(newChild); data.children.push(newChild);
*/ */
console.log(this.$parent); console.log("value",value);
addDirectory( addDirectory(
(res) => { (res) => {
// console.log(res); // console.log(res);

View File

@ -72,7 +72,7 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
submit() { submit() {
if (this.form.name==""){ if (this.form.name=="" ||(this.form.name.trim()=='')){
this.$message.warning("请输入名称") this.$message.warning("请输入名称")
return return
} }
@ -83,6 +83,7 @@ export default {
this.form.plan_create_time = new TSTY.Util().timeToStamp( this.form.plan_create_time = new TSTY.Util().timeToStamp(
this.form.plan_create_time this.form.plan_create_time
); );
console.log("新疆")
addPlan(this.form, (res) => { addPlan(this.form, (res) => {
res.create_time_format = new TSTY.Util().parseTime( res.create_time_format = new TSTY.Util().parseTime(
res.create_time, res.create_time,

View File

@ -26,7 +26,7 @@
/> />
</div> </div>
<div> <div>
<span class="label">仿真时间</span> <span class="label">创建时间</span>
<el-date-picker <el-date-picker
class="datepicker" class="datepicker"
v-model="value2" v-model="value2"
@ -259,11 +259,12 @@ export default {
let params = JSON.parse(JSON.stringify(this.searchForm)); let params = JSON.parse(JSON.stringify(this.searchForm));
params.startTime == 0 && delete params.startTime; params.startTime == 0 && delete params.startTime;
params.endTime == 0 && delete params.endTime; params.endTime == 0 && delete params.endTime;
this.getList(params,()=>{ console.log(params)
setTimeout(() => { // this.getList(params,()=>{
this.searching = false; // setTimeout(() => {
}, 500); // this.searching = false;
}) // }, 500);
// })
/* planList(params, (res) => { /* planList(params, (res) => {
// if() // if()
this.formatTime(res.list); this.formatTime(res.list);

View File

@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="110" height="615" viewBox="0 0 110 615">
<defs>
<style>
.cls-1, .cls-2 {
fill-rule: evenodd;
}
.cls-1 {
opacity: 0.5;
}
.cls-2 {
fill: aqua;
}
</style>
</defs>
<path id="bg" class="cls-1" d="M5.777,1h96.477l7.111,27.415V588.474L103.234,610.7H4.972L0,588.474V28.415Z"/>
<path id="形状_1" data-name="形状 1" class="cls-2" d="M27.359,610.951H5l-5-22.7V26.932l0.019-.088L5.811,0.572H30.528V2.235H7.152L1.668,27.112V588.07l4.675,21.217H27.359v1.664Zm77.643,0H82.645v-1.664h21.016l4.674-21.217V27.112L102.851,2.235H79.475V0.572h24.718L110,26.932V588.25l-0.019.089Zm-4.107-6.332H77.307v-1.331H99.761L104,588.216V27.185L98.924,6.643H10.679L6.006,27.185V561.959H4.671V27.185H4.688L9.617,5.313H99.9l5.432,21.872-0.008,561.193ZM33.472,0h1.891L33.981,2.734H32.074Zm4.29,0h1.891L38.271,2.734H36.364Zm4.29,0h1.892L42.561,2.734H40.654Zm4.29,0h1.892L46.852,2.734H44.944Zm4.29,0h1.891L51.142,2.734H49.234Zm4.29,0h1.892L55.432,2.734H53.525Zm4.29,0H61.1L59.722,2.734H57.815ZM63.5,0h1.891L64.012,2.734H62.1Zm4.29,0h1.891L68.3,2.734H66.395Zm4.29,0h1.892L72.592,2.734H70.685Zm4.29,0h1.892L76.882,2.734H74.975ZM48.862,16V15.9H38.812V11.647h9.95V16h0.1v0h0.1v-4.55H38.613V16.1H48.961V16h-0.1ZM81.5,16V15.9H71.451V11.647H81.4V16h0.1v0h0.1v-4.55H71.251V16.1H81.6V16H81.5Zm-21.759.254H49.592V11.294H59.741v4.958Zm10.879,0H60.472V11.294H70.62v4.958Zm21.759,0H82.23V11.294H92.379v4.958ZM20.3,29.308A10.544,10.544,0,1,1,30.873,18.764,10.57,10.57,0,0,1,20.3,29.308Zm0-20.138a9.595,9.595,0,1,0,9.621,9.595A9.619,9.619,0,0,0,20.3,9.17Zm0,16.44a6.845,6.845,0,1,1,6.864-6.845A6.862,6.862,0,0,1,20.3,25.609Zm0-13.216a6.371,6.371,0,1,0,6.388,6.371A6.387,6.387,0,0,0,20.3,12.394Zm4.263,4.852a2.736,2.736,0,1,1-2.736-2.729A2.733,2.733,0,0,1,24.563,17.245Zm-5.68,7.149a1.649,1.649,0,1,1,1.654-1.65A1.654,1.654,0,0,1,18.884,24.394Zm0-2.824a1.175,1.175,0,1,0,1.178,1.175A1.178,1.178,0,0,0,18.884,21.57ZM16.608,604.192a7.5,7.5,0,1,1,7.519-7.5A7.517,7.517,0,0,1,16.608,604.192Zm0-14.321a6.823,6.823,0,1,0,6.842,6.823A6.841,6.841,0,0,0,16.608,589.871Zm0,11.691a4.868,4.868,0,1,1,4.881-4.868A4.881,4.881,0,0,1,16.608,601.562Zm0-9.4a4.531,4.531,0,1,0,4.543,4.53A4.542,4.542,0,0,0,16.608,592.164Zm3.032,3.45a1.946,1.946,0,1,1-1.946-1.941A1.944,1.944,0,0,1,19.64,595.614ZM15.6,600.7a1.173,1.173,0,1,1,1.176-1.173A1.176,1.176,0,0,1,15.6,600.7Zm0-2.009a0.836,0.836,0,1,0,.838.836A0.838,0.838,0,0,0,15.6,598.689ZM10.619,586.03h2.238l3.552-3.382,3.868,3.382H22.6L16.408,580.6Zm5.79-9.49-5.79,5.425h2.238l3.552-3.381,3.868,3.381H22.6l-6.189-5.425m0-4.065-5.79,5.426h2.238l3.552-3.382,3.868,3.382H22.6l-6.189-5.426m0-4.064-5.79,5.426h2.238l3.552-3.383,3.868,3.383H22.6l-6.189-5.426m0-4.065-5.79,5.426h2.238l3.552-3.382,3.868,3.382H22.6l-6.189-5.426m12.586,42.485v1.5l2.278,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.278,1.952-2.278,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.474,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.278,1.952-2.278,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.474,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.277,1.952-2.277,2.165V614l3.654-3.719Zm3.475,0v1.5l2.278,1.952-2.278,2.165V614l3.654-3.719Zm3.475,0v1.5l2.278,1.952-2.278,2.165V614l3.654-3.719Z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

View File

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

View File

@ -87,8 +87,8 @@ window.newFuzzySearch = function(
if (contrast) { if (contrast) {
if ((item.source_name || "").indexOf(contrast) > -1) { if ((item.source_name || "").indexOf(contrast) > -1) {
console.log("source_name包含关键字"); console.log("source_name包含关键字");
console.log(item); // console.log(item);
console.log(item.source_name); // console.log(item.source_name);
item.oldname = item.source_name; item.oldname = item.source_name;
item.highlight = true; item.highlight = true;

View File

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

View File

@ -249,6 +249,16 @@
</template> </template>
<template v-else> --> <template v-else> -->
<div id="goodSearchEchart"></div> <div id="goodSearchEchart"></div>
<div style="height: 60px;position: relative;">
<el-button class="export-btn" style="
background: rgba(var(--color-sdk-base-rgb), 0.2);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
color: #ffffff;
position: absolute;
right: 20px;
bottom: 20px;
">导出Excel</el-button>
</div>
<!-- </template> --> <!-- </template> -->
</div> </div>
</div> </div>
@ -256,6 +266,8 @@
<excelSet ref="excelSet" class="excelSetBox absolute zIndex99"></excelSet> <excelSet ref="excelSet" class="excelSetBox absolute zIndex99"></excelSet>
<!-- tufu_select --> <!-- tufu_select -->
<tufuSelect style="top: 115px;right: 50px;" class="tufuSelect absolute zIndex99"></tufuSelect> <tufuSelect style="top: 115px;right: 50px;" class="tufuSelect absolute zIndex99"></tufuSelect>
<!-- 战术计算 -->
<tactical class="tacticalBox absolute"></tactical>
<!-- modelSet --> <!-- modelSet -->
<ModelSet class="ModelSetBox absolute"></ModelSet> <ModelSet class="ModelSetBox absolute"></ModelSet>
</div> </div>
@ -263,7 +275,7 @@
<script> <script>
// 新增态势0910 // 新增态势0910
import { remote } from "electron"; import {ipcRenderer, remote} from "electron";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import Tree from "@/components/Tree/index"; import Tree from "@/components/Tree/index";
import bottomMenu from "@/components/bottomMenus/bottomMenu.vue"; import bottomMenu from "@/components/bottomMenus/bottomMenu.vue";
@ -304,6 +316,7 @@ import adddirectory from "../../components/dialog/adddirectory.vue";
import excelSet from "@/components/dialog/excelSet.vue"; import excelSet from "@/components/dialog/excelSet.vue";
import eventEditor from "@/components/TS/eventEditor/index.vue"; import eventEditor from "@/components/TS/eventEditor/index.vue";
import tufuSelect from "@/components/dialog/tufu_select.vue"; import tufuSelect from "@/components/dialog/tufu_select.vue";
import tactical from "@/components/dialog/tactical.vue";
import { import {
getSelectedNode, getSelectedNode,
getNodeData, getNodeData,
@ -316,6 +329,7 @@ import { obj } from "@/api/dataFromApi";
import { getIP } from "../../utils"; import { getIP } from "../../utils";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { cusNodeIcon } from "../../components/Tree/treeNode"; import { cusNodeIcon } from "../../components/Tree/treeNode";
// import richTextEditor from "@/components/editor/richTextEditor.vue"; // import richTextEditor from "@/components/editor/richTextEditor.vue";
let handleLogin = (that) => { let handleLogin = (that) => {
// 需要登录就去掉“/dashboard” // 需要登录就去掉“/dashboard”
@ -375,6 +389,7 @@ export default {
// WangEditor // WangEditor
excelSet, excelSet,
tufuSelect, tufuSelect,
tactical,
ModelSet, ModelSet,
modelg modelg
}, },
@ -481,6 +496,12 @@ export default {
// window.Clock = new TSTY.clock(); // window.Clock = new TSTY.clock();
}, },
mounted() { mounted() {
ipcRenderer.on("udpServerError",(e,msg)=>{
this.$message.error(msg);
})
ipcRenderer.on("udpServerSuccess",(e,msg)=>{
this.$message.success(msg);
})
// new Notification("这是标题", { // new Notification("这是标题", {
// body: "这是正文", // body: "这是正文",
// icon: // icon:
@ -689,28 +710,30 @@ export default {
}, },
closeSituationEdit() { closeSituationEdit() {
// 新增态势0906 // 新增态势0906
if (window.Earth1) {
window.draw && window.draw.end(); window.draw && window.draw.end();
Array.from(ts_Map.values()).forEach((entity) => entity.remove()); Array.from(ts_Map.values()).forEach((entity) => entity.remove());
ts_Map.clear(); ts_Map.clear();
// setTimeout(() => {
if (window.Earth1) {
window.Earth1.destroy(); window.Earth1.destroy();
window.Earth1 = null; window.Earth1 = null;
} }
this.$refs.Deduction.stop();
this.editSituation = !this.editSituation; this.editSituation = !this.editSituation;
this.eventsList = false; this.eventsList = false;
this.showList = !this.showList; this.showList = !this.showList;
//新增态势0824 // //新增态势0824
this.showElementBtn = ""; this.showElementBtn = "";
this.showCabinBtn = "";
this.showCabin = "";
this.showElement = ""; this.showElement = "";
//
// this.eventBox = false;
this.eventBox = false;
this.$refs.Deduction.stop();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.situation.getList(); this.$refs.situation.getList();
}); });
// }, 10);
}, },
getRowKey(row) { getRowKey(row) {
// 需要为每一行设置一个唯一标识这里假设每行的id是唯一的 // 需要为每一行设置一个唯一标识这里假设每行的id是唯一的
@ -958,7 +981,7 @@ export default {
window.Earth1.tabHide = ["属性信息"]; window.Earth1.tabHide = ["属性信息"];
} }
}); });
}, }
}, },
}; };
</script> </script>
@ -1104,16 +1127,19 @@ export default {
.adddirectoryBox, .adddirectoryBox,
.excelSetBox, .excelSetBox,
.tufuSelect, .tufuSelect,
.tacticalBox,
.ModelSetBox, .ModelSetBox,
.modelBoxg{ .modelBoxg {
display: none; display: none;
} }
.selectImgBox{
.selectImgBox {
z-index: 9999999; z-index: 9999999;
} }
.ModelSetBox{ .ModelSetBox{
z-index: 10000; z-index: 10000;
} }
.scene { .scene {
//width: 5vw; //width: 5vw;
//height: 5vw; //height: 5vw;

View File

@ -217,7 +217,7 @@ import { ipcRenderer, remote } from "electron";
import { isvalidUsername } from "@/utils/validate"; import { isvalidUsername } from "@/utils/validate";
import { getIP, setIP, setLocal, getLocal } from "../../utils"; import { getIP, setIP, setLocal, getLocal } from "../../utils";
import { validateURL } from "../../utils/validate"; import { validateURL } from "../../utils/validate";
import { checkAuth, service_progress } from "@/api/gisAPI"; import { checkAuth, service_progress, getHeaderList, selectHeader } from "@/api/gisAPI";
import { login } from "@/api/air.js"; import { login } from "@/api/air.js";
import { getGpsList, updateGps } from "../../api/gisAPI"; import { getGpsList, updateGps } from "../../api/gisAPI";
import websocket from "../../utils/websocket"; import websocket from "../../utils/websocket";
@ -507,6 +507,21 @@ export default {
//监听服务数据 //监听服务数据
getPort() { getPort() {
console.log("监听服务数据"); console.log("监听服务数据");
ipcRenderer.on("sandTable_udp_server_port_str", (event, key, status) => {
let sandTable_udp_client_status = localStorage.getItem('sandTable_udp_client_status')
if (JSON.parse(sandTable_udp_client_status)) {
// 如果status为“K”那么双击的时候就发出关灯指令
let val = udp_pointMap.get(key)
// val.command = (status == 'G' ? "B" : "A")
val.command = (status == 'g #' ? "g #" : "k #")
if (val) {
_entityMap.get(val.source_id).flyTo()
}
udp_pointMap.set(key, val)
console.log("sandTable_udp_server_port_str", val)
}
})
ipcRenderer.on("sandTable_udp_server_port", (event, positions, angle) => { ipcRenderer.on("sandTable_udp_server_port", (event, positions, angle) => {
console.log("监听服务数据", positions, angle); console.log("监听服务数据", positions, angle);
if (positions.length > 0) { if (positions.length > 0) {
@ -573,6 +588,7 @@ export default {
.then(() => { .then(() => {
this.$message.success("登录成功"); this.$message.success("登录成功");
setLocal("username", JSON.stringify(this.loginForm.username)); setLocal("username", JSON.stringify(this.loginForm.username));
this.getHeader()
this.rememberPassword(); this.rememberPassword();
// 无人机 // 无人机
setTimeout(() => { setTimeout(() => {
@ -689,6 +705,46 @@ export default {
}); });
}); });
}, },
// 获取Header图片
getHeader() {
try {
getHeaderList({
page: 1,
pageSize: 99999,
}).then(res => {
if (res.code == 0 || res.code == 200) {
let headerList = res.data.list
let flag = false
for (let i = 0; i < headerList.length; i++) {
if (headerList[i].selected) {
flag = true
localStorage.setItem("header", JSON.stringify(headerList[i]))
this.$sendChanel("header", headerList[i])
break
}
}
if (!flag && headerList && headerList.length > 0) {
localStorage.setItem("header", JSON.stringify(headerList[0]))
this.$sendChanel("header")
selectHeader({
id: headerList[0].id
}).then(res => {
if (res.code == 0 || res.code == 200) {
}
})
}
}
else {
localStorage.setItem("header", JSON.stringify({}))
this.$sendChanel("header")
}
})
} catch (error) {
localStorage.setItem("header", JSON.stringify({}))
this.$sendChanel("header")
}
},
}, },
}; };
</script> </script>

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