This commit is contained in:
zyl
2025-11-12 09:31:49 +08:00
51 changed files with 8497 additions and 362 deletions

View File

@ -472,7 +472,7 @@ function windowAllClosed() {
console.log('所有窗口已关闭,执行清理脚本...');
getServer().close(() => {
// 执行批处理文件
const cleanupProcess = exec('D:/project/electron-4.0/electron-4/resources/java/stop.bat', (error, stdout, stderr) => {
const cleanupProcess = exec(stopBatPath.substring(1, 200), (error, stdout, stderr) => {
if (error) {
console.error(`清理脚本执行失败: ${error.message}`);
}
@ -573,6 +573,27 @@ if (!gotTheLock) {
}
console.log(`批处理输出: ${stdout}`);
});
// const batProcess = spawn('cmd.exe', ['/c', startBatPath.substring(1, 200)]);
// // 实时监听标准输出stdout
// batProcess.stdout.on('data', (data) => {
// // data 是 Buffer 类型,转为字符串后输出
// console.log(`批处理输出: ${data.toString().trim()}`);
// });
// // 监听错误输出stderr
// batProcess.stderr.on('data', (data) => {
// console.error(`错误输出: ${data.toString().trim()}`);
// });
// // 监听进程执行出错(如文件不存在、权限问题等)
// batProcess.on('error', (error) => {
// console.error(`执行错误: ${error.message}`);
// });
// // 监听进程退出事件(执行结束后触发)
// batProcess.on('close', (code) => {
// console.log(`批处理执行完毕,退出码: ${code}`);
// });
// Set app user model id for windows
electronApp.setAppUserModelId('com.electron')

View File

@ -34,7 +34,7 @@
}
:root {
--color-sdk-base-rgb: 0, 255, 255;
--color-base1: 0, 255, 255;
--color-sdk-auxiliary: 0, 66, 66;
--color-sdk-auxiliary-public: #ffffff;
--color-sdk-warning-0: #1BF8C3;
@ -44,9 +44,9 @@
--color-sdk-text-head: #FFFFFF;
--color-sdk-text-head-1: #E6F7FF;
--color-sdk-text-head-2: #ADF1FF;
--color-sdk-gradual: rgb(0, 255, 255) 6.25%, rgb(0, 200, 255) 100%;
--color-sdk-bg-gradual: #00ffff33 0%, #00ffff00 100%;
--color-sdk-text-shadow: rgba(20, 118, 255, 1);
--color-sdk-gradual: rgb(var(--color-base1)) 6.25%, var(--color-border1) 100%;
--color-sdk-bg-gradual: rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%;
--color-text-shadow: rgba(20, 118, 255, 1);
}
.cesium-viewer-cesiumWidgetContainer {
@ -88,7 +88,7 @@
width: 70.5px;
height: 6px;
opacity: 1;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 6px, 0 6px);
}
@ -158,8 +158,8 @@
border-radius: 4px;
white-space: nowrap;
border-radius: 4px;
background: rgba(var(--color-sdk-base-rgb), 0.2);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
background: rgba(var(--color-base1), 0.2);
border: 1px solid rgba(var(--color-base1), 0.5);
display: flex;
justify-content: flex-start;
align-items: center;
@ -170,7 +170,7 @@
}
.YJ-custom-base-dialog button:not(button[disabled]):hover {
border-color: rgba(var(--color-sdk-base-rgb), 1) !important;
border-color: rgba(var(--color-base1), 1) !important;
cursor: pointer;
}
@ -224,7 +224,7 @@
line-height: 0px;
color: rgba(255, 255, 255, 1);
text-align: left;
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow);
text-shadow: 0px 0px 9px var(--color-text-shadow);
-webkit-pointer-events: none;
-moz-pointer-events: none;
-ms-pointer-events: none;
@ -244,7 +244,7 @@
line-height: 0px;
color: rgba(255, 255, 255, 1);
text-align: left;
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow)
text-shadow: 0px 0px 9px var(--color-text-shadow)
}
.YJ-custom-base-dialog>.title-box>.close-box {
@ -262,7 +262,7 @@
display: block;
width: 100%;
height: 100%;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
opacity: 0.5;
}
@ -336,7 +336,7 @@
.YJ-custom-base-dialog>.content textarea {
font-size: 16px;
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
border-radius: 5px;
line-height: 32px;
height: 32px;
@ -351,13 +351,13 @@
}
.YJ-custom-base-dialog>.content input[type=checkbox]:read-only {
background-color: rgba(var(--color-sdk-base-rgb), 0.2);
background-color: rgba(var(--color-base1), 0.2);
}
.YJ-custom-base-dialog>.content input:focus-visible,
.YJ-custom-base-dialog>.content textarea:focus-visible {
outline: none;
border-color: rgba(var(--color-sdk-base-rgb), 0.8);
border-color: rgba(var(--color-base1), 0.8);
}
.YJ-custom-base-dialog>.content select:focus-visible {
@ -366,7 +366,7 @@
}
.YJ-custom-base-dialog>.content select {
background-color: rgba(var(--color-sdk-base-rgb), 0.2);
background-color: rgba(var(--color-base1), 0.2);
border: 1px solid rgba(0, 255, 255, 0);
border-radius: 5px;
line-height: 32px;
@ -454,14 +454,14 @@
background-color: #ffffff00;
color: #000;
overflow: hidden;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog>.content .table input {}
.YJ-custom-base-dialog>.content .table .tr {
display: flex;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
border-right: none;
}
@ -545,13 +545,13 @@
.YJ-custom-base-dialog>.content *::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background-color: rgba(var(--color-sdk-base-rgb));
background-color: rgba(var(--color-base1));
}
.YJ-custom-base-dialog>.content *::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 5px;
background-color: rgba(var(--color-sdk-base-rgb), 0.1);
background-color: rgba(var(--color-base1), 0.1);
}
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {}
@ -559,7 +559,7 @@
.YJ-custom-base-dialog>.content .table .tr .th,
.YJ-custom-base-dialog>.content .table .tr .td {
flex: 1;
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-right: 1px solid rgba(var(--color-base1), 0.5);
padding: 5px 10px;
display: flex;
align-items: center;
@ -639,7 +639,7 @@
.YJ-custom-base-dialog>.content .table.camera-table .tr:last-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr:last-child {
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .td span,
@ -692,7 +692,7 @@
height: 6px;
border: 0;
margin-top: 20px;
background: rgba(var(--color-sdk-base-rgb), 0.2);
background: rgba(var(--color-base1), 0.2);
-webkit-appearance: none;
} */
.YJ-custom-base-dialog>.content [type="range"] {
@ -709,7 +709,7 @@
.YJ-custom-base-dialog>.content [type="range"]::-webkit-slider-runnable-track {
height: 6px;
background: rgba(var(--color-sdk-base-rgb), 0.2);
background: rgba(var(--color-base1), 0.2);
}
.YJ-custom-base-dialog>.content [type="range" i]::-webkit-slider-container {
@ -723,10 +723,10 @@
width: 20px;
height: 20px;
border-radius: 50%;
background-color: rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
background-color: rgba(var(--color-base1), 1);
border: 1px solid rgba(var(--color-base1), 1);
margin-top: -7px;
border-image: linear-gradient(rgba(var(--color-sdk-base-rgb), 1), rgba(var(--color-sdk-base-rgb), 1)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
border-image: linear-gradient(rgba(var(--color-base1), 1), rgba(var(--color-base1), 1)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
}
@ -757,11 +757,12 @@
font-weight: 700;
font-family: 'D-Din-Bold';
font-size: 18px; */
font-size: 12px;
font-family: 'ddin';
font-size: 18px;
font-weight: 400;
letter-spacing: 0px;
line-height: 24px;
color: rgba(204, 204, 204, 1);
color: rgb(255, 255, 255);
text-align: left;
vertical-align: top;
}
@ -800,6 +801,15 @@
margin-right: -15px;
}
.YJ-custom-base-dialog>.content .input-number-unit input[type=number] {
padding: 0 16px 0 10px;
}
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-outer-spin-button,
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-inner-spin-button {
margin-left: 5px;
margin-right: -12px;
}
.YJ-custom-base-dialog>.content .input-number-unit-1 input[type=number] {
padding: 0 26px 0 10px;
}
@ -916,11 +926,11 @@
}
.fly-roam>.content .table .table-body .tr.active {
background: rgba(var(--color-sdk-base-rgb), 0.15);
background: rgba(var(--color-base1), 0.15);
}
.fly-roam>.content .table .table-body .tr:last-child {
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
border-left: none;
border-right: none;
}
@ -935,7 +945,7 @@
cursor: no-drop;
}
.YJ-custom-base-dialog>.content .fly-roam .table .table-body .tr:last-child .play:hover {
border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
border-color: rgba(var(--color-base1), 0.5) !important;
} */
.fly-roam>.content .table .action {
@ -1065,7 +1075,7 @@
margin-top: 1px;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
border-radius: 5px;
line-height: 32px;
height: 32px;
@ -1092,7 +1102,7 @@
}
.YJ-custom-base-dialog .ew-color-picker .icon-pen-box:hover .icon-pen {
fill: rgba(var(--color-sdk-base-rgb), 1);
fill: rgba(var(--color-base1), 1);
margin: 0;
}
@ -1154,14 +1164,14 @@
.YJ-custom-base-dialog .ew-color-picker>.yj-pre-collect-color-container>.yj-pre-collect-color.add,
.YJ-custom-base-dialog .ew-color-picker>.yj-pre-collect-color-container>.yj-pre-collect-color.subtract {
border-color: rgba(var(--color-sdk-base-rgb), 0.2);
border-color: rgba(var(--color-base1), 0.2);
background: unset;
line-height: 22px;
}
.YJ-custom-base-dialog .ew-color-picker>.yj-pre-collect-color-container>.yj-pre-collect-color.add:hover,
.YJ-custom-base-dialog .ew-color-picker>.yj-pre-collect-color-container>.yj-pre-collect-color.subtract:hover {
border-color: rgba(var(--color-sdk-base-rgb), 0.4);
border-color: rgba(var(--color-base1), 0.4);
}
.YJ-custom-base-dialog .ew-color-picker>.yj-pre-collect-color-container svg,
@ -1445,13 +1455,13 @@
.DIV-cy-tabs .DIV-cy-tab-top::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background-color: rgba(var(--color-sdk-base-rgb));
background-color: rgba(var(--color-base1));
}
.DIV-cy-tabs .DIV-cy-tab-top::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 5px;
background-color: rgba(var(--color-sdk-base-rgb), 0.1);
background-color: rgba(var(--color-base1), 0.1);
}
.DIV-cy-tabs .DIV-cy-tab-top::after {
@ -1474,11 +1484,11 @@
}
.DIV-cy-tabs .DIV-cy-tab-pane-title .DIV-cy-tab-pane-title-p:hover {
border-bottom-color: rgba(var(--color-sdk-base-rgb));
border-bottom-color: rgba(var(--color-base1));
}
.DIV-cy-tabs .DIV-cy-tab-pane-title .DIV-cy-tab-pane-title-p:hover span {
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow);
text-shadow: 0px 0px 9px var(--color-text-shadow);
}
.DIV-cy-tabs .DIV-cy-tab-pane-title:first-child {
@ -1515,11 +1525,11 @@
}
.DIV-cy-tabs .DIV-cy-tab-pane-title-p.is-active {
border-bottom-color: rgba(var(--color-sdk-base-rgb));
border-bottom-color: rgba(var(--color-base1));
}
.DIV-cy-tabs .DIV-cy-tab-pane-title-p.is-active span {
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow);
text-shadow: 0px 0px 9px var(--color-text-shadow);
}
/* 开关按钮样式 */
@ -1530,8 +1540,8 @@
height: 20px;
padding: 0;
position: relative;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.2);
background-color: rgba(var(--color-sdk-base-rgb), 0.2);
border: 1px solid rgba(var(--color-base1), 0.2);
background-color: rgba(var(--color-base1), 0.2);
border-radius: 20px;
background-clip: content-box;
display: inline-block;
@ -1555,9 +1565,9 @@
.YJ-custom-base-dialog>.content .btn-switch:checked,
.YJ-custom-base-dialog>.foot .btn-switch:checked {
border-color: rgba(var(--color-sdk-base-rgb), 1);
box-shadow: rgba(var(--color-sdk-base-rgb)) 0 0 0 16px inset;
background-color: rgba(var(--color-sdk-base-rgb));
border-color: rgba(var(--color-base1), 1);
box-shadow: rgba(var(--color-base1)) 0 0 0 16px inset;
background-color: rgba(var(--color-base1));
}
.YJ-custom-base-dialog>.content .btn-switch:checked:before,
@ -1709,12 +1719,12 @@
.YJ-custom-base-dialog>.content .cy_datalist input.datalist {
border-color: #00000000;
background-color: rgba(var(--color-sdk-base-rgb), 0.2) !important;
background-color: rgba(var(--color-base1), 0.2) !important;
}
.YJ-custom-base-dialog>.content .cy_datalist dl {
min-width: 100%;
border-color: rgba(var(--color-sdk-base-rgb), 0.5);
border-color: rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog>.content .cy_datalist dl dd {
@ -1727,17 +1737,17 @@
}
.YJ-custom-base-dialog>.content .cy_datalist dl dd:hover {
background-color: rgba(var(--color-sdk-base-rgb), 0.2);
background-color: rgba(var(--color-base1), 0.2);
color: white;
}
.YJ-custom-base-dialog>.content .cy_datalist dl dd.active {
color: rgba(var(--color-sdk-base-rgb)) !important;
/* background-color: rgba(var(--color-sdk-base-rgb), 0.2); */
color: rgba(var(--color-base1)) !important;
/* background-color: rgba(var(--color-base1), 0.2); */
}
.YJ-custom-base-dialog>.content .cy_datalist dl dd.active svg {
fill: rgba(var(--color-sdk-base-rgb))
fill: rgba(var(--color-base1))
}
.YJ-custom-base-dialog>.content .cy_datalist dl dd.active::before {
@ -1745,8 +1755,8 @@
display: inline-block;
width: 8px;
height: 4px;
border-bottom: 2px solid rgba(var(--color-sdk-base-rgb));
border-left: 2px solid rgba(var(--color-sdk-base-rgb));
border-bottom: 2px solid rgba(var(--color-base1));
border-left: 2px solid rgba(var(--color-base1));
transform: rotate(-45deg);
position: absolute;
right: 6px;
@ -1808,7 +1818,7 @@
width: 23px;
height: 26px;
cursor: pointer;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.2);
border: 1px solid rgba(var(--color-base1), 0.2);
display: flex;
align-items: center;
justify-content: center;
@ -1942,13 +1952,13 @@
}
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
border-color: rgba(var(--color-sdk-base-rgb));
border-color: rgba(var(--color-base1));
}
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
color: #fff;
font-size: 16px;
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow);
text-shadow: 0px 0px 9px var(--color-text-shadow);
font-weight: 400;
}
@ -2029,7 +2039,7 @@
.YJ-custom-base-dialog.sun-shine-surface>.content>div .progress {
height: 100%;
width: 0;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
border-radius: 15px;
position: relative;
}
@ -2039,7 +2049,7 @@
height: 16px;
background: white;
/* border: 3px solid #4285f4; */
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
border-radius: 50%;
position: absolute;
right: -8px;
@ -2255,7 +2265,7 @@
}
.YJ-custom-base-dialog.submerge>.content .table-body .tr:last-child {
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog.submerge>.content .table-empty {
@ -2331,7 +2341,7 @@
}
.YJ-custom-base-dialog.view-shed>.content .range-box .range-bg {
background: rgba(var(--color-sdk-base-rgb), 0.2);
background: rgba(var(--color-base1), 0.2);
height: 100%;
width: 100%;
mask: url(../img/range.svg);
@ -2353,7 +2363,7 @@
.YJ-custom-base-dialog.view-shed>.content .range-box .range-bg .range-process {
width: 0;
height: 100%;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.view-shed>.content .range-box .range-node-box {
@ -2399,7 +2409,7 @@
height: 20px;
background: #ffffff;
border-radius: 50%;
border: 2px solid rgba(var(--color-sdk-base-rgb), 1);
border: 2px solid rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.view-shed>.content .range-box .range-node-box .range-node-active-text {
@ -2418,7 +2428,7 @@
.YJ-custom-base-dialog.view-shed>.content .range-box input[type="range"]::-webkit-slider-runnable-track {
height: 6px;
background: rgba(var(--color-sdk-base-rgb), 0);
background: rgba(var(--color-base1), 0);
}
.YJ-custom-base-dialog.view-shed>.content .range-box input[type="range"]::-webkit-slider-thumb {
@ -2427,10 +2437,10 @@
width: 20px;
height: 20px;
border-radius: 50%;
background-color: rgba(var(--color-sdk-base-rgb), 0);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0);
background-color: rgba(var(--color-base1), 0);
border: 1px solid rgba(var(--color-base1), 0);
margin-top: -7px;
border-image: linear-gradient(rgba(var(--color-sdk-base-rgb), 0), rgba(var(--color-sdk-base-rgb), 0)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
border-image: linear-gradient(rgba(var(--color-base1), 0), rgba(var(--color-base1), 0)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
}
/* 通视分析 */
@ -2473,7 +2483,7 @@
}
.el-slider {
--el-slider-main-bg-color: rgba(var(--color-sdk-base-rgb), 1)
--el-slider-main-bg-color: rgba(var(--color-base1), 1)
}
/* 地形可视域分析 */
@ -2704,6 +2714,11 @@
flex: 0 0 160px;
}
.YJ-custom-base-dialog>.content>div .spatial-info-table .table-body .td input[type=number] {
font-family: 'ddin';
font-size: 14px;
}
/* 集结地 */
.YJ-custom-base-dialog.assemble>.content {
width: 600px;
@ -2930,33 +2945,33 @@
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 4px 0px 0px 4px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 4px 0px, 0px, 4px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 0px 4px 4px 0px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) input {
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) input {
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content input.input-text {
background-color: rgba(0, 0, 0, 0.5) !important;
border-radius: unset !important;
border-top: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border-top: 1px solid rgba(var(--color-base1), 0.5) !important;
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist input {
@ -3057,33 +3072,33 @@
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 4px 0px 0px 4px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 4px 0px, 0px, 4px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) .datalist {
background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important;
background-color: rgba(var(--color-base1), 0.1) !important;
border-radius: 0px 4px 4px 0px !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) input {
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) input {
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content input.input-text {
background-color: rgba(0, 0, 0, 0.5) !important;
border-radius: unset !important;
border-top: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
border-top: 1px solid rgba(var(--color-base1), 0.5) !important;
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist input {
@ -3109,19 +3124,19 @@
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.line {
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-base1), 1);
height: 0px;
margin-top: 4px;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.dash-line {
border: 1px dashed rgba(var(--color-sdk-base-rgb), 1);
border: 1px dashed rgba(var(--color-base1), 1);
height: 0px;
margin-top: 4px;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.light-line {
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-base1), 1);
height: 0px;
margin-top: 4px;
box-shadow: 0 0 3px #fff
@ -3138,13 +3153,13 @@
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.flow-dash-line1 {
border: 1px dashed rgba(var(--color-sdk-base-rgb), 1);
border: 1px dashed rgba(var(--color-base1), 1);
height: 0px;
margin-top: 4px;
}
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.flow-dash-line2 {
border: 1px dashed rgba(var(--color-sdk-base-rgb), 1);
border: 1px dashed rgba(var(--color-base1), 1);
height: 0px;
margin-top: 4px;
}
@ -3213,13 +3228,13 @@
.popup-textarea textarea::-webkit-scrollbar-thumb {
border-radius: 5px!important;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
background-color: rgba(var(--color-sdk-base-rgb))!important;
background-color: rgba(var(--color-base1))!important;
}
.popup-textarea textarea::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
border-radius: 5px!important;
background-color: rgba(var(--color-sdk-base-rgb), 0.1)!important;
background-color: rgba(var(--color-base1), 0.1)!important;
}
/* 贴地图片 */
@ -3292,19 +3307,19 @@
.YJ-custom-base-dialog.proj-convert>.content>div .top-line {
top: 5px;
border-radius: 0 4px 0 0;
border-top: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-top: 1px solid rgba(var(--color-base1), 0.5);
border-right: 1px solid rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog.proj-convert>.content>div .bottom-line {
bottom: 5px;
border-radius: 0 0 4px 0;
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
border-right: 1px solid rgba(var(--color-base1), 0.5);
}
.YJ-custom-base-dialog.proj-convert>.content>div .icon-copy-box:hover .icon-copy {
fill: rgba(var(--color-sdk-base-rgb));
fill: rgba(var(--color-base1));
}
/* 高清截图 */
@ -3325,7 +3340,7 @@
.YJ-custom-base-dialog.screenShotHD>.content>div .progress {
width: 200px;
height: 6px;
background: rgba(var(--color-sdk-base-rgb), 0.2);
background: rgba(var(--color-base1), 0.2);
border-radius: 3px;
position: relative;
}
@ -3334,7 +3349,7 @@
width: 0%;
height: 6px;
border-radius: 3px;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.screenShotHD>.content>div .progress>.progress-text {
@ -3369,7 +3384,7 @@
}
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box .range-bg {
background: rgba(var(--color-sdk-base-rgb), 0.2);
background: rgba(var(--color-base1), 0.2);
border-radius: 3px;
height: 100%;
width: 100%;
@ -3390,13 +3405,13 @@
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box .range-bg .range-process {
width: 0;
height: 100%;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box .range-bg .range-process {
width: 0;
height: 100%;
background: rgba(var(--color-sdk-base-rgb), 1);
background: rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box .range-node-box {
@ -3431,7 +3446,7 @@
height: 13px;
background: #ffffff;
border-radius: 50%;
border: 2px solid rgba(var(--color-sdk-base-rgb), 1);
border: 2px solid rgba(var(--color-base1), 1);
}
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box .range-node-box .range-node-active-text {
@ -3450,7 +3465,7 @@
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box input[type="range"]::-webkit-slider-runnable-track {
height: 6px;
background: rgba(var(--color-sdk-base-rgb), 0);
background: rgba(var(--color-base1), 0);
}
.YJ-custom-base-dialog.screenShotHD>.content>div .range-box input[type="range"]::-webkit-slider-thumb {
@ -3459,10 +3474,10 @@
width: 20px;
height: 20px;
border-radius: 50%;
background-color: rgba(var(--color-sdk-base-rgb), 0);
border: 1px solid rgba(var(--color-sdk-base-rgb), 0);
background-color: rgba(var(--color-base1), 0);
border: 1px solid rgba(var(--color-base1), 0);
margin-top: -7px;
border-image: linear-gradient(rgba(var(--color-sdk-base-rgb), 0), rgba(var(--color-sdk-base-rgb), 0)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
border-image: linear-gradient(rgba(var(--color-base1), 0), rgba(var(--color-base1), 0)) 0 fill / 8 20 8 0 / 0px 0px 0 2000px;
}
/* 地图打印 */
@ -3577,7 +3592,7 @@
flex: 0 0 25px;
padding: 0;
border-radius: 5px;
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-base1), 1);
-webkit-appearance: none;
vertical-align: middle;
background: rgba(0, 0, 0, 0.5);
@ -3598,7 +3613,7 @@
.YJ-custom-checkbox-left:checked::after,
.YJ-custom-checkbox-right:checked::after {
content: "✔";
background-color: rgba(var(--color-sdk-base-rgb), 1);
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 25px;
height: 25px;
@ -3613,7 +3628,7 @@
flex: 0 0 14px;
padding: 0;
border-radius: 2px;
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-base1), 1);
-webkit-appearance: none;
vertical-align: middle;
background-color: rgba(0, 0, 0, 0.5);
@ -3633,7 +3648,7 @@
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
content: "✔";
background-color: rgba(var(--color-sdk-base-rgb), 1);
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 12px;
height: 12px;
@ -3727,13 +3742,13 @@
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-content::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background-color: rgba(var(--color-sdk-base-rgb));
background-color: rgba(var(--color-base1));
}
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-content::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 5px;
background-color: rgba(var(--color-sdk-base-rgb), 0.1);
background-color: rgba(var(--color-base1), 0.1);
}
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-content-pane {
@ -3748,8 +3763,8 @@
.billboard-attribute-box .billboard-attribute-box-line {
position: absolute;
width: 0px;
/* border-left: 1px solid rgba(var(--color-sdk-base-rgb), 0.5); */
border-left: 1px solid rgba(var(--color-sdk-base-rgb), 1);
/* border-left: 1px solid rgba(var(--color-base1), 0.5); */
border-left: 1px solid rgba(var(--color-base1), 1);
/* transform: rotate(45deg); */
transform-origin: 0px 0px;
-webkit-pointer-events: none;
@ -3797,7 +3812,7 @@
background-color: #ffffff00;
color: #ffffff;
overflow: hidden;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
}
.billboard-attribute-box .table .table-head .tr {
@ -3808,11 +3823,11 @@
.billboard-attribute-box .table .tr {
display: flex;
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border: 1px solid rgba(var(--color-base1), 0.5);
border-right: none;
}
.billboard-attribute-box .table .tr .th, .billboard-attribute-box .table .tr .td {
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
border-right: 1px solid rgba(var(--color-base1), 0.5);
display: flex;
justify-content: center;
}
@ -3862,8 +3877,8 @@
}
#YJ-custom-message.success {
/* background-color: #f0f9eb; */
/* color: rgb(82, 196, 26); */
/* background-color: #f0f9eb;
color: rgb(82, 196, 26); */
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);

View File

@ -149,6 +149,7 @@ export default {
curve: '曲线标注',
panel: '面标注',
roam: '漫游路径',
untitled: '未命名对象'
},
system: {
systemTitle: '系统面板',

View File

@ -149,6 +149,7 @@ export default {
curve: 'Curve',
panel: 'Panel',
roam: 'roam',
untitled: 'untitled'
},
system: {
systemTitle: 'Settings',

View File

@ -148,6 +148,7 @@ export default {
curve: '曲線標注',
panel: '面標注',
roam: '漫遊路徑',
untitled: '未命名對象'
},
system: {
systemTitle: '系統面板',

View File

@ -415,11 +415,11 @@ img {
.ztree li span.button.chk {
background: none;
}
.ztree li span.button.roots_open, .ztree li span.button.bottom_open {
.ztree li span.button.roots_open, .ztree li span.button.bottom_open, .ztree li span.button.center_open {
background: url(../images/tree/roots-open.png) 0 0 no-repeat;
background-position: center !important;
}
.ztree li span.button.roots_close, .ztree li span.button.bottom_close {
.ztree li span.button.roots_close, .ztree li span.button.bottom_close, .ztree li span.button.center_close{
background: url(../images/tree/roots-close.png) 0 0 no-repeat;
background-position: center !important;
}
@ -626,6 +626,22 @@ img {
}
}
.custom-slider-tooltip {
display: block !important;
opacity: 1 !important;
background: none !important;
border: none !important;
>span:nth-child(1) {
position: relative;
top: -18px;
pointer-events: none;
}
}
.el-slider__runway {
background: rgba(var(--color-base1), 0.2) !important;
}
@media (max-height: 850px) {
#distanceLegendDiv {
.compass {

View File

@ -47,7 +47,6 @@ export const initMapData = async (type, data, cd) => {
entityObject = new YJ.Obj.SectorObject(window.earth, data)
break
case 'model':
console.log('model', data)
entityObject = new YJ.Obj.Model(window.earth, data)
break
case 'military':

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M13.2608 7.8961C14.8148 6.23377 15.3328 4.67532 14.7112 3.63636C14.0896 2.7013 12.6392 2.49351 10.6709 3.11688C10.0493 1.14286 9.1169 0 7.97732 0C6.83774 0 5.90536 1.24675 5.28377 3.32468C3.10821 2.7013 1.55423 3.01299 1.03624 3.94805C0.414655 4.98701 1.03624 6.44156 2.69382 8.1039C1.13984 9.76623 0.621851 11.3247 1.24344 12.3636C1.65783 12.987 2.27942 13.1948 3.31541 13.1948C3.937 13.1948 4.55859 13.0909 5.38737 12.8831C6.00896 14.8571 6.94134 16 8.08092 16C9.2205 16 10.1529 14.7532 10.7745 12.6753C11.4996 12.8831 12.1212 12.987 12.7428 12.987C13.8824 12.987 14.6076 12.6753 15.022 12.0519C15.54 11.013 14.9184 9.45455 13.2608 7.8961ZM10.3601 9.03896L10.1529 9.14286L10.1529 9.35065C10.1529 10.0779 10.0493 10.7013 9.94567 11.3247C9.42768 11.1169 8.80611 10.9091 8.28812 10.5974L8.08092 10.4935L7.87372 10.5974C7.25213 10.9091 6.63055 11.2208 6.11256 11.4286C5.90536 10.9091 5.80176 10.2857 5.80176 9.55844L5.80176 9.35065L5.49097 9.14286C4.97298 8.83117 4.55859 8.41558 4.14419 8.1039C4.55859 7.68831 5.07658 7.27273 5.59457 6.96104L5.80176 6.85714L5.80176 6.64935C5.80176 5.92208 5.90536 5.2987 6.11256 4.67532C6.63055 4.88312 7.25213 5.09091 7.77012 5.4026L7.97732 5.50649L8.18452 5.4026C8.80611 5.09091 9.3241 4.77922 9.94567 4.57143C10.0493 5.19481 10.1529 5.92208 10.2565 6.54545L10.2565 6.75325L10.4637 6.85714C10.9816 7.16883 11.3961 7.58442 11.8104 7.8961C11.3961 8.31169 10.8781 8.72727 10.3601 9.03896ZM13.8824 4.25974C14.1932 4.67532 13.8824 5.81818 12.5356 7.16883C12.1212 6.85714 11.7069 6.44156 11.1889 6.12987C11.0852 5.4026 10.9816 4.77922 10.8781 4.15584C12.5356 3.63636 13.5716 3.84416 13.8824 4.25974ZM7.97732 1.03896C8.49531 1.03896 9.1169 1.76623 9.63489 3.42857C9.1169 3.63636 8.49531 3.94805 7.87372 4.25974C7.35573 3.94805 6.73414 3.74026 6.21615 3.53247C6.73414 1.76623 7.45933 1.03896 7.97732 1.03896ZM1.96863 4.46753C2.17582 4.15584 2.59022 4.05195 3.31541 4.05195C3.7298 4.05195 4.35139 4.15584 5.07658 4.25974C4.86938 4.88312 4.76578 5.50649 4.76578 6.23377C4.24779 6.64935 3.8334 6.96104 3.41901 7.37662C2.07222 6.02597 1.65783 4.98701 1.96863 4.46753ZM2.07222 11.7403C1.76143 11.3247 2.07222 10.1818 3.41901 8.83117C3.8334 9.14286 4.24779 9.55844 4.76578 9.87013C4.86938 10.5974 4.97298 11.2208 5.07658 11.8442C3.41901 12.3636 2.38302 12.1558 2.07222 11.7403ZM7.97732 14.961C7.45933 14.961 6.83774 14.2338 6.31975 12.5714C6.94134 12.3636 7.45933 12.0519 8.08092 11.7403C8.59891 11.9481 9.2205 12.2597 9.73849 12.3636C9.2205 14.2338 8.49531 14.961 7.97732 14.961ZM13.986 11.5325C13.7788 11.9481 12.6392 12.1558 10.8781 11.7403C10.9816 11.1169 11.0852 10.4935 11.1889 9.76623C11.7069 9.45455 12.1212 9.03896 12.5356 8.62338C13.8824 9.97403 14.2968 11.013 13.986 11.5325Z" fill="#00FFFF" ></path></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14.3736 4.48806L13.8526 5.00743C12.7265 4.07541 11.3138 3.56367 9.85529 3.56367C9.14348 3.56367 8.43386 3.6878 7.76455 3.92624L9.20016 2.49229C9.66016 2.72855 10.2641 2.62404 10.6554 2.23206C11.1754 1.71161 11.1754 0.897186 10.6554 0.376734C10.1507 -0.125215 9.33424 -0.127389 8.823 0.381083C8.44474 0.789391 8.34881 1.37735 8.57012 1.85532L6.04769 4.37483L5.53645 3.86419L3.9079 5.49085L4.41914 6.0015L1.84439 8.57325C1.38328 8.34134 0.781581 8.4437 0.389147 8.83457C0.138437 9.08607 0 9.41598 0 9.76224C0 10.1085 0.138437 10.4384 0.397875 10.6975C0.930923 11.1635 1.72448 11.1505 2.21719 10.6616C2.59981 10.2783 2.69682 9.6871 2.47227 9.18515L3.92316 7.73596C3.18627 9.81014 3.57653 12.1108 4.99905 13.8278L4.478 14.3777L6.1338 16L7.76126 14.3733L6.13271 12.7467L5.66181 13.2181C4.24255 11.4368 4.11282 8.92168 5.33587 6.97489L5.53537 7.17416L7.20207 5.54312L6.97206 5.33842C7.8125 4.7864 8.80446 4.49569 9.85529 4.49569C11.0674 4.49569 12.2229 4.90183 13.2094 5.67161L12.7102 6.14197L14.3736 7.76975L16 6.14525L14.3736 4.48806Z" fill="#00FFFF" ></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -27,6 +27,7 @@ import '../public/tree/jquery.ztree.exhide.js'
import '../public/tree/fuzzysearch.js'
import '../public/tree/newFuzzySearch'
import theme from "@/utils/theme";
import { handleInputLimit } from '@/utils/index'
import Pagination from './components/Pagination/index.vue'
import dispatchEventStorage from '@/utils/watchLocalStorage'
@ -94,6 +95,7 @@ const setApp = createApp(App)
// 定义全局方法
// setApp.config.globalProperties.$md5 = md5
setApp.config.globalProperties.$handleInputLimit = handleInputLimit
setApp.component('Pagination', Pagination)
setupStore(setApp)
setupSvgIcon(setApp)

View File

@ -65,3 +65,21 @@ export function getNamefromPath(path) {
return name;
}
export function handleInputLimit(e) {
if (e.data === '-') {
}
else {
e.target.value = e.target.value || 0
const minValue = parseFloat(e.target.min);
const maxValue = parseFloat(e.target.max);
if (!isNaN(maxValue) && e.target.value > maxValue) {
e.target.value = maxValue
e.target.dispatchEvent(new Event('input'))
}
else if (!isNaN(minValue) && e.target.value < minValue) {
e.target.value = minValue
e.target.dispatchEvent(new Event('input'))
}
}
}

View File

@ -545,7 +545,7 @@ const fold = () => {
}, index * itemDelay)
})
// 同步bottom_left的位置和旋转
bottom_left.style.right = '18vw'
bottom_left.style.right = '-35px'
bottom_left.style.transform = 'rotate(270deg)'
} else {
// 折叠状态
@ -558,7 +558,7 @@ const fold = () => {
// 同步bottom_left的位置和旋转
setTimeout(
() => {
bottom_left.style.right = '50%'
bottom_left.style.right = '48.5%'
bottom_left.style.transform = 'rotate(90deg)'
},
(itemCount - 1) * itemDelay
@ -750,9 +750,9 @@ document.addEventListener('click', (e: any) => {
}
.bottom_left {
position: fixed;
right: 13.5vw;
bottom: 1.5em;
position: absolute;
right: -35px;
bottom: 8px;
height: 1.5vw;
width: 1.5vw;
// background: url('../../../assets/images/hongse/shou.png') no-repeat;

View File

@ -10,6 +10,7 @@
<span class="text">光照效果</span>
<svg-icon
class="switchClass"
id="weatherSwitch"
name="switch"
:size="16"
:title="switchStatus ? '关闭光照' : '开启光照'"
@ -24,6 +25,7 @@
<div class="col">
<span class="label">实时光照</span>
<el-switch
id="shineSwitch"
v-model="weatherData.currWeather"
style="
--el-switch-on-color: rgba(var(--color-base1), 1);
@ -172,6 +174,11 @@ import { Decimal } from 'decimal.js'
import { ElMessage } from 'element-plus'
import TimeLine from './timeLIne'
import { before } from 'node:test'
import { set } from 'date-fns'
const props = defineProps({
parentClick: Boolean
})
var sunshine
var timeline
var list = reactive([
@ -243,23 +250,91 @@ var weatherData: any = reactive({
})
onMounted(() => {
timeline = new TimeLine(window.earth, weatherData.speed)
//判断是否在外面开启光照
let myData = null
if (window.sunshine) {
let data = JSON.parse(localStorage.getItem('shineSetting'))
// weatherData.currWeather = data.currWeather
//是否是实时光照
if (!data.currWeather) {
weatherData.time = data.time
}
weatherData.softShadow = data.softShadow
weatherData.darkness = data.darkness
weatherData.speed = data.speed
data.wearther.forEach((item, index) => {
list[index].status = item.status
})
// list = data.wearther
switchStatus.value = true
sunshine = window.sunshine
myData = formatTimeToBeijing()
}
timeline && timeline.clear()
timeline = new TimeLine(window.earth, weatherData.speed, switchStatus.value, myData, initCallback)
window.pauseBut && document.getElementById('timePause').click()
// sunshine = new YJ.Global.efflect.Sunshine(window.earth, { id: 123 })
timeline.moveComplay((item) => {
weatherData.currWeather = false
sunshine.timeBar = item
})
// timeline.setTime(myData)
//如果实时天气打开,时间条移动
if (weatherData.currWeather) {
document.getElementById('timePause')?.click()
}
// timeline.updateTime()
// timeline.setCurrBar()
})
onBeforeUnmount(() => {
sunshine && sunshine.remove()
//关闭弹框时存储数据
let data = {
currWeather: weatherData.currWeather,
softShadow: weatherData.softShadow,
darkness: weatherData.darkness,
speed: weatherData.speed,
time: weatherData.time,
timeerTime: document.getElementById('currentTime').textContent,
wearther: list
}
localStorage.setItem('shineSetting', JSON.stringify(data))
// sunshine && sunshine.remove()
timeline && timeline.clear()
emit('isPause', document.getElementById('timePause').textContent == '播放')
})
var formatTimeToBeijing = () => {
let time = window.earth.viewer.clock.currentTime
// 创建新的JulianDate对象
var julianDT = new Cesium.JulianDate()
// 添加8小时时区偏移转换为北京时间:ml-citation{ref="1,4" data="citationList"}
Cesium.JulianDate.addHours(time, 8, julianDT)
// 转换为公历日期:ml-citation{ref="4,6" data="citationList"}
var gregorianDT = Cesium.JulianDate.toGregorianDate(julianDT)
// 格式化为时分秒字符串,确保两位数显示:ml-citation{ref="4,6" data="citationList"}
var hour = gregorianDT.hour.toString().padStart(2, '0')
var minute = gregorianDT.minute.toString().padStart(2, '0')
var second = gregorianDT.second.toString().padStart(2, '0')
return `${hour}:${minute}:${second}`
}
let currWeatherData = false
//js返回数据
var initCallback = (data) => {
weatherData.currWeather = data
}
var weatherChange = () => {
currWeatherData = true
if (weatherData.currWeather) {
let ss = getCurrentTime()
sunshine && (sunshine.timeBar = ss)
@ -276,6 +351,14 @@ var weatherChange = () => {
timeline.closeChangeDate()
// sunshine && (sunshine.time = weatherData.time)
if (!switchStatus && document.getElementById('timePause').textContent == '播放') {
document.getElementById('timePause').click()
}
} else {
if (!switchStatus && document.getElementById('timePause').textContent == '暂停') {
//如果光照开关关闭,关闭实时光照,停止时间条
document.getElementById('timePause').click()
}
}
}
var getDateTimeString = () => {
@ -337,26 +420,60 @@ var getCurrentTime = () => {
return `${hours}:${minutes}:${seconds}`
}
const emit = defineEmits(['childEvent', 'isPause'])
//监听父组件点击
watch(
() => props.parentClick,
(newVal, oldVal) => {
switchStatus.value = newVal
// 如果点击icon时当前设置页面一打开使用当前数据
if (newVal) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,
speed: weatherData.speed,
time: weatherData.time,
// @ts-ignore
hour: document.getElementById('currentTime').textContent
})
window.sunshine = sunshine
}
}
)
var switchFunc = () => {
switchStatus.value = !switchStatus.value
if (switchStatus.value) {
//开启
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,
speed: weatherData.speed,
time: weatherData.time,
// @ts-ignore
hour: document.getElementById('currentTime').textContent
})
timeline.setSunShine(true)
if (!window.sunshine) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,
speed: weatherData.speed,
time: weatherData.time,
// @ts-ignore
hour: document.getElementById('currentTime').textContent
})
} else {
sunshine = window.sunshine
sunshine.timeBar(document.getElementById('currentTime').textContent)
if (weatherData) {
sunshine.darkness = weatherData.darkness
sunshine.speed = weatherData.speed
sunshine.softShadow = weatherData.softShadow
}
}
// timeline.setSunShine(true)
} else {
//关闭
sunshine && sunshine.remove()
sunshine = null
// let timeData = now.setHours(0, 0, 0, 0) // 设置为当天0点
// timeline.updateTime(timeData)
timeline.setSunShine(false)
// sunshine && sunshine.remove()
// sunshine = null
// delete window.sunshine
// timeline.setSunShine(false)
}
//联动外面的图标
// emit('childEvent', switchStatus.value)
emit('childEvent', weatherData)
}
//雨特效
@ -390,6 +507,7 @@ var clickIcon = (item: any) => {
}
}
var clickTimeIcon = (item: any) => {
weatherData.currWeather = false
if (document.getElementById('timePause').textContent == '播放') {
timelist.forEach((data) => {
if (data.name != item.name) data.status = false

View File

@ -0,0 +1,263 @@
// @ts-nocheck
import { ElMessage } from 'element-plus'
export default class TimeLine {
constructor(sdk, speed) {
this.sdk = { ...sdk };
this.progress = document.getElementById('progress');
this.handle = document.getElementById('handle');
// this.timeline = document.getElementById('timeline');
this.timeline = document.getElementsByClassName('timeline-container')[0];
this.currentTime = document.getElementById('currentTime');
this.timelineCon = document.getElementsByClassName('timeline-container')[0];
this.speed = speed;
this.animationId;
this.startTime = performance.now();
this.manualPosition = null;
// this.manualPosition = this.calculateTimePercentage();
this.isDragging = false;
this.pauseed = true;
this.time = '';
this.sunShine = false;
if (this.pauseed) {
this.pausedTime = this.startTime
}
this.update = this.update.bind(this);
TimeLine.init(this)
}
static init(that) {
for (let i = 0; i <= 24; i++) {
if (i % 6 === 0) {
const label = document.createElement('div');
label.className = 'time-mark';
label.textContent = `${i}:00`;
label.style.left = `${(i / 24) * 100}%`;
document.getElementsByClassName('time-marks')[0].appendChild(label)
const point = document.createElement('div');
point.className = 'time-Point';
document.getElementsByClassName('time-marks')[0].appendChild(point)
}
}
that.setCurrBar()//设置当前时间
that.startTime = performance.now() - ((that.manualPosition || 0) * 86400 * 1000 / that.speed);
that.timeline.addEventListener('mousedown', (e) => {
if (e.srcElement.className === 'handle') {
if (!that.sunShine) {
ElMessage({
message: '请开启光照功能',
type: 'warning'
})
} else {
that.isDragging = true;
}
}
e.preventDefault();
});
that.timeline.addEventListener('mousemove', (e) => {
if (!that.isDragging) return;
const rect = that.timeline.getBoundingClientRect();
let pos = (e.clientX - rect.left) / rect.width;
pos = Math.max(0, Math.min(1, pos));
that.manualPosition = pos;
that.progress.style.width = `${pos * 100}%`;
const seconds = pos * 86400;
that.currentTime.textContent = that.formatTime(seconds);
});
that.update();
document.getElementById('timePause').addEventListener('click', function () {
if (!that.sunShine) {
ElMessage({
message: '请开启光照功能',
type: 'warning'
})
} else {
that.pauseed = !that.pauseed;
if (that.pauseed) {//暂停
that.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放';
that.animationId && cancelAnimationFrame(that.animationId);
that.sdk.viewer.clock.shouldAnimate = false
} else {//播放
let now = performance.now()
const pausedDuration = now - that.pausedTime;
document.getElementById('timePause').textContent = '暂停';
that.manualPosition = null
that.startTime += pausedDuration; // 补偿暂停期间的时间差
if (that.changeDate) {//切换日期后让时间从0开始
if (that.changeDateGrag) {
that.changeDateGrag = undefined
} else {
that.startTime = now
}
that.changeDate = undefined
}
if (document.getElementById('weatherSwitch').style.color === 'rgba(var(--color-base1), 1)') {//判断光照开关是否开启开启则打开cesium阴影
that.sdk.viewer.clock.shouldAnimate = true
}
that.update(); // 重启动画循环
}
}
});
}
setSunShine(v) {
this.sunShine = v
if (this.sunShine) {
document.getElementById('timePause')?.click()
} else {
this.pauseed = true
this.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放';
this.animationId && cancelAnimationFrame(this.animationId);
this.sdk.viewer.clock.shouldAnimate = false
// document.getElementById('timePause')?.click()
}
}
calculateTimePercentage() {
// 获取当前时间
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
const seconds = now.getSeconds();
// 计算当前时间总秒数
const totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
// 24小时总秒数
const totalSecondsInDay = 24 * 3600;
// 计算百分比并保留两位小数
const percentage = (totalSeconds / totalSecondsInDay);
return percentage;
}
moveComplay(func) {
let that = this
// that.timeline.addEventListener('mouseup', () => {
document.addEventListener('mouseup', () => {
if (that.isDragging) {
that.isDragging = false;
if (that.manualPosition !== null) {
// that.sdk.viewer.clock.shouldAnimate = true
that.startTime = performance.now() - (that.manualPosition * 86400 * 1000 / that.speed);
that.manualPosition = null;
that.changeDate && (that.changeDateGrag = true)
if (!that.pauseed) {
that.update()
func(that.time)
} else {
that.pausedTime = performance.now(); // 记录暂停时刻
func(that.currentTime.textContent)
}
}
}
});
}
setCurrBar() {
let pos = this.calculateTimePercentage()
this.manualPosition = pos;
this.progress.style.width = `${pos * 100}%`;
const seconds = pos * 86400;
this.currentTime.textContent = this.formatTime(seconds);
}
formatTime(seconds) {
const hrs = Math.floor(seconds / 3600).toString().padStart(2, '0');
const mins = Math.floor((seconds % 3600) / 60).toString().padStart(2, '0');
const secs = Math.floor(seconds % 60).toString().padStart(2, '0');
return `${hrs}:${mins}:${secs}`;
}
update() {
if (this.manualPosition !== null) return;
if (this.changeDate) {//切换日期后让时间从0开始
this.startTime = performance.now()
}
let elapsed = (performance.now() - this.startTime) * this.speed;
// if (this.elapsed) {
// elapsed = elapsed + this.elapsed
// this.elapsed = undefined
// }
const totalSeconds = elapsed / 1000;//秒
const daySeconds = totalSeconds % 86400;//天
const percentage = daySeconds / 86400;
this.progress.style.width = `${percentage * 100}%`;
this.time = this.formatTime(daySeconds)
this.currentTime.textContent = this.time;
if (!this.pauseed) {
this.animationId && cancelAnimationFrame(this.animationId);
this.animationId = requestAnimationFrame(this.update);
}
}
setSpeed(v) {
let now = performance.now()
if (!this.pauseed) {
const currentProgress = this.manualPosition ??
(performance.now() - this.startTime) * this.speed / (86400 * 1000);
this.speed = v;
this.startTime = performance.now() - (currentProgress * 86400 * 1000 / this.speed);
} else {
let pausedDuration = now - this.pausedTime;
this.startTime += pausedDuration; // 补偿暂停期间的时间差
const currentProgress = this.manualPosition ??
(now - this.startTime) * this.speed / (86400 * 1000);
this.speed = v;
this.startTime = now - (currentProgress * 86400 * 1000 / this.speed);
this.pausedTime = now; // 记录切换speed暂停时刻
// this.speed = v;
}
this.manualPosition = null;
// this.update();
}
setTime(time) {
// 解析传入的时间字符串 "6:40"
const [hours, minutes] = time.split(':').map(Number);
// 设置秒数为0
const seconds = 0;
// 计算传入时间总秒数
const totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
// 24小时总秒数
const totalSecondsInDay = 24 * 3600;
// 计算百分比
const pos = totalSeconds / totalSecondsInDay;
this.manualPosition = pos;
this.progress.style.width = `${pos * 100}%`;
const displaySeconds = pos * 86400;
this.currentTime.textContent = this.formatTime(displaySeconds);
}
closeChangeDate() {
this.changeDate && (this.changeDate = false)
}
updateTime() {
this.manualPosition = null;
this.startTime = performance.now() - ((this.manualPosition || 0) * 86400 * 1000 / this.speed);
this.pauseed && (this.changeDate = true)
this.changeDateGrag = undefined
this.update();
}
clear() {
this.animationId && cancelAnimationFrame(this.animationId);
this.progress.style.width = '0%';
this.currentTime.textContent = '00:00:00';
}
}

View File

@ -1,7 +1,7 @@
// @ts-nocheck
import { ElMessage } from 'element-plus'
export default class TimeLine {
constructor(sdk, speed) {
constructor(sdk, speed, sunShine, timeWords, initCallback) {
this.sdk = { ...sdk };
this.progress = document.getElementById('progress');
this.handle = document.getElementById('handle');
@ -9,6 +9,7 @@ export default class TimeLine {
this.timeline = document.getElementsByClassName('timeline-container')[0];
this.currentTime = document.getElementById('currentTime');
this.timelineCon = document.getElementsByClassName('timeline-container')[0];
this.timeWords = timeWords;
this.speed = speed;
this.animationId;
this.startTime = performance.now();
@ -17,15 +18,15 @@ export default class TimeLine {
this.isDragging = false;
this.pauseed = true;
this.time = '';
this.sunShine = false;
this.sunShine = sunShine || false;
if (this.pauseed) {
this.pausedTime = this.startTime
}
this.update = this.update.bind(this);
TimeLine.init(this)
TimeLine.init(this, initCallback)
}
static init(that) {
static init(that, callback) {
for (let i = 0; i <= 24; i++) {
if (i % 6 === 0) {
@ -40,7 +41,7 @@ export default class TimeLine {
}
}
that.setCurrBar()//设置当前时间
that.setCurrBar(that.timeWords)//设置当前时间
that.startTime = performance.now() - ((that.manualPosition || 0) * 86400 * 1000 / that.speed);
that.timeline.addEventListener('mousedown', (e) => {
@ -73,36 +74,43 @@ export default class TimeLine {
that.update();
document.getElementById('timePause').addEventListener('click', function () {
if (!that.sunShine) {
ElMessage({
message: '请开启光照功能',
type: 'warning'
})
} else {
that.pauseed = !that.pauseed;
if (that.pauseed) {//暂停
that.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放';
that.animationId && cancelAnimationFrame(that.animationId);
that.sdk.viewer.clock.shouldAnimate = false
} else {//播放
let now = performance.now()
const pausedDuration = now - that.pausedTime;
document.getElementById('timePause').textContent = '暂停';
that.manualPosition = null
that.startTime += pausedDuration; // 补偿暂停期间的时间差
if (that.changeDate) {//切换日期后让时间从0开始
if (that.changeDateGrag) {
that.changeDateGrag = undefined
} else {
that.startTime = now
}
that.changeDate = undefined
}
that.sdk.viewer.clock.shouldAnimate = true
that.update(); // 重启动画循环
// if (!that.sunShine) {
// ElMessage({
// message: '请开启光照功能',
// type: 'warning'
// })
// } else {
that.pauseed = !that.pauseed;
if (that.pauseed) {//暂停
that.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放';
that.animationId && cancelAnimationFrame(that.animationId);
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false)
//判断当没有开启光照时,点击停止播放时关闭实时光照按钮
if (document.getElementById('weatherSwitch').style.color == 'rgb(255, 255, 255)') {
callback(false)
}
} else {//播放
let now = performance.now()
const pausedDuration = now - that.pausedTime;
document.getElementById('timePause').textContent = '暂停';
that.manualPosition = null
that.startTime += pausedDuration; // 补偿暂停期间的时间差
if (that.changeDate) {//切换日期后让时间从0开始
if (that.changeDateGrag) {
that.changeDateGrag = undefined
} else {
that.startTime = now
}
that.changeDate = undefined
}
if (document.getElementById('weatherSwitch').style.color === 'rgba(var(--color-base1), 1)') {//判断光照开关是否开启开启则打开cesium阴影
that.sdk.viewer.clock.shouldAnimate = true
}
that.update(); // 重启动画循环
}
// }
});
}
@ -119,20 +127,56 @@ export default class TimeLine {
// document.getElementById('timePause')?.click()
}
}
calculateTimePercentage() {
// 获取当前时间
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
const seconds = now.getSeconds();
// calculateTimePercentage() {
// // 获取当前时间
// const now = new Date();
// const hours = now.getHours();
// const minutes = now.getMinutes();
// const seconds = now.getSeconds();
// 计算当前时间总秒数
const totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
// // 计算当前时间总秒数
// const totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
// // 24小时总秒数
// const totalSecondsInDay = 24 * 3600;
// // 计算百分比并保留两位小数
// const percentage = (totalSeconds / totalSecondsInDay);
// return percentage;
// }
calculateTimePercentage(timeString = null) {
let totalSeconds;
if (timeString) {
// 解析传入的时间字符串 "HH:MM:SS"
const timeParts = timeString.split(':');
const hours = parseInt(timeParts[0]);
const minutes = parseInt(timeParts[1]);
const seconds = parseInt(timeParts[2]);
// 验证时间格式
if (isNaN(hours) || isNaN(minutes) || isNaN(seconds) ||
hours < 0 || hours > 23 ||
minutes < 0 || minutes > 59 ||
seconds < 0 || seconds > 59) {
throw new Error('Invalid time format. Please use "HH:MM:SS" format');
}
totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
} else {
// 获取当前时间
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
const seconds = now.getSeconds();
totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
}
// 24小时总秒数
const totalSecondsInDay = 24 * 3600;
// 计算百分比并保留两位小数
// 计算百分比
const percentage = (totalSeconds / totalSecondsInDay);
return percentage;
}
@ -159,8 +203,8 @@ export default class TimeLine {
}
});
}
setCurrBar() {
let pos = this.calculateTimePercentage()
setCurrBar(time) {
let pos = this.calculateTimePercentage(time)
this.manualPosition = pos;
this.progress.style.width = `${pos * 100}%`;

View File

@ -14,14 +14,22 @@
<div class="weather">
<svg-icon
name="weather"
ref="weatherIcon"
:class="weatherClick ? 'weatherClick' : ''"
:size="40"
@click="clickFun"
@contextmenu.prevent="clickFunRight"
></svg-icon>
</div>
</div>
<setTool ref="setToolRef"></setTool>
<weather ref="weatherRef" v-if="weatherClick"></weather>
<weather
ref="weatherRef"
v-if="weatherClickPop"
@childEvent="handleChildData"
@isPause="isPause"
:parentClick="weatherClick"
></weather>
<!-- <headButton class="headButton"></headButton> -->
</div>
@ -58,6 +66,17 @@ const headImg = computed(() => {
}
})
let weatherIcon = ref(null)
const handleChildData = (data) => {
clickFun(data)
}
//存储子组件播放按钮状态true暂停
const isPause = (data) => {
window.pauseBut = weatherClick && data ? true : false
}
const skinInfo = ref(JSON.parse(localStorage.getItem('systemSetting') || '{}').skinInfo || 'color1')
const { t } = useI18n()
@ -67,7 +86,6 @@ const date = ref({
week: 0
})
window.addEventListener('setItemEvent', (e: any) => {
console.log('e', e)
if (e.key == 'systemSetting') {
let obj = JSON.parse(e.newValue)
skinInfo.value = obj.skinInfo
@ -86,6 +104,7 @@ window.addEventListener('setItemEvent', (e: any) => {
}
})
var weatherClick = ref(false)
var weatherClickPop = ref(false)
const setTime = () => {
let date1 = new Date()
let year: any = date1.getFullYear()
@ -113,10 +132,113 @@ const timer = setInterval(setTime, 1000)
onUnmounted(() => {
clearInterval(timer)
})
var clickFun = () => {
let sunshine
var clickFun = (childData) => {
weatherClick.value = !weatherClick.value
console.log('点击天气', weatherClick.value)
if (weatherClick.value) {
let data = JSON.parse(localStorage.getItem('shineSetting'))
if (!data) {
const now = new Date()
const formattedDate = now.toISOString().slice(0, 10)
data = {
currWeather: true,
softShadow: true,
darkness: 0.4,
speed: 1,
time: formattedDate,
timeerTime: '00:00:00',
wearther: [
// 雨
{
name: '雨',
svg: 'rain',
status: false
},
// 雪
{
name: '雪',
svg: 'snow',
status: false
},
//雾
{
name: '雾',
svg: 'fog',
status: false
},
//星空
{
name: '星空',
svg: 'skystarry',
status: false
}
]
}
}
//光照
if (childData.currWeather === undefined && weatherClickPop.value === false) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,
speed: data.speed,
time: data.currWeather ? new Date().toISOString().slice(0, 10) : data.time,
// @ts-ignore
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
})
window.sunshine = sunshine
sunshine.darkness = data.darkness
sunshine.softShadow = data.softShadow
//天气效果
if ((window as any).checkAuthIsValid) {
data.wearther.forEach((item) => {
if (item.status) {
func[item.svg](item)
}
})
} else {
// ElMessage({
// message: '您没有该功能的权限',
// type: 'warning'
// })
}
} else if (weatherClickPop.value === false) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,
speed: childData.speed,
time: childData.time,
// @ts-ignore
hour: document.getElementById('currentTime').textContent
})
window.sunshine = sunshine
sunshine.darkness = childData.darkness
sunshine.softShadow = childData.softShadow
}
} else {
sunshine && sunshine.remove()
sunshine = null
window.sunshine && window.sunshine.remove()
delete window.sunshine
}
}
var func = {
rain: (item) => {
YJ.Global.efflect.rain(window.earth, item.status)
},
//雪
snow: (item) => {
YJ.Global.efflect.snow(window.earth, item.status)
},
//雾
fog: (item) => {
YJ.Global.efflect.fog(window.earth, item.status)
},
// 星空
skystarry: (item) => {
YJ.Global.efflect.skyStarry(window.earth, item.status)
}
}
var clickFunRight = () => {
weatherClickPop.value = !weatherClickPop.value
}
// onMounted(() => {

View File

@ -43,7 +43,7 @@
<div class="col">
<span class="label">Z值统一增加</span>
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -66,18 +66,18 @@
<div class="td">圆心坐标</div>
<div class="td lng align-center" @dblclick="inputDblclick($event, 1, 'lng')">
<input class="input" @blur="inputBlurCallBack($event, 1, 'lng', 8)" type="number"
v-model="entityOptions.center.lng" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lng'">
v-model="entityOptions.center.lng" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lng'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ entityOptions.center.lng.toFixed(8) }}</span>
</div>
<div class="td lat align-center" @dblclick="inputDblclick($event, 1, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, 1, 'lat', 8)" type="number"
v-model="entityOptions.center.lat" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lat'">
v-model="entityOptions.center.lat" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lat'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ entityOptions.center.lat.toFixed(8) }}</span>
</div>
<div class="td alt align-center" @dblclick="inputDblclick($event, 1, 'alt')">
<input class="input" @blur="inputBlurCallBack($event, 1, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == 1 && activeTd.name == 'alt'">
v-if="activeTd.index == 1 && activeTd.name == 'alt'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ entityOptions.height.toFixed(2) }}</span>
</div>
</div>
@ -98,7 +98,7 @@
<div class="col">
<span class="label">描边宽度</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth" @input="$handleInputLimit">
<span class="unit">px</span>
<span class="arrow"></span>
</div>
@ -132,6 +132,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { inject } from "vue";
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
@ -139,6 +140,7 @@ import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const title = ref('圆')
@ -312,9 +314,10 @@ const nodeEdit = () => {
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
delete params.host
let params2 = {
"id": params.id,

View File

@ -1,5 +1,5 @@
<template>
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 160px)" top="calc(50% - 120px)">
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<template #content>
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
</template>
@ -34,9 +34,9 @@ const confirm = () => {
if(!text.value) {
return
}
baseDialog.value?.close()
let name = text.value
text.value = ''
baseDialog.value?.close()
let Draw = new YJ.Draw.DrawPolyline(window.earth, { number: 2 })
Draw.start(async (a, positions) => {
if (!positions || positions.length < 2) {
@ -78,6 +78,9 @@ const confirm = () => {
cusAddNodes(window.treeObj, params.parentId, [params])
})
}
const closeCallBack = () => {
text.value = ''
}
defineExpose({
open
})

View File

@ -1,5 +1,5 @@
<template>
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 160px)" top="calc(50% - 120px)">
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<template #content>
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
</template>
@ -34,9 +34,9 @@ const confirm = () => {
if(!text.value) {
return
}
baseDialog.value?.close()
let name = text.value
text.value = ''
baseDialog.value?.close()
let Draw = new YJ.Draw.DrawPolyline(window.earth)
Draw.start(async (a, positions) => {
if (!positions || positions.length < 2) {
@ -45,11 +45,11 @@ const confirm = () => {
let id = new YJ.Tools().randomString()
let options: any = await initMapData('standText', {
id: id,
name: name,
text: name,
positions: positions
}, null)
delete options.host
console.log('options', options)
delete options.name
let selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
let parentId
@ -76,6 +76,9 @@ const confirm = () => {
cusAddNodes(window.treeObj, params.parentId, [params])
})
}
const closeCallBack = () => {
text.value = ''
}
defineExpose({
open
})

View File

@ -28,7 +28,7 @@
<div class="col">
<span class="label">动画时长</span>
<div class="input-number input-number-unit-3">
<input class="input blur" type="number" title="" min="500" max="9999999" v-model="entityOptions.spreadTime">
<input class="input blur" type="number" title="" min="500" max="9999999" v-model="entityOptions.spreadTime" @input="$handleInputLimit">
<span class="unit">ms</span>
<span class="arrow"></span>
</div>
@ -66,7 +66,7 @@
<div class="col">
<span class="label">Z值统一增加</span>
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -89,18 +89,18 @@
<div class="td">{{ i + 1 }}</div>
<div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number"
v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'">
v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span>
</div>
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number"
v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'">
v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span>
</div>
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')">
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == i && activeTd.name == 'alt'">
v-if="activeTd.index == i && activeTd.name == 'alt'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ (entityOptions.height).toFixed(2) }}</span>
</div>
</div>
@ -121,7 +121,7 @@
<div class="col">
<span class="label">描边宽度</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth" @input="$handleInputLimit">
<span class="unit">px</span>
<span class="arrow"></span>
</div>
@ -155,12 +155,14 @@
<script setup lang="ts">
import { ref } from 'vue';
import { inject } from "vue";
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import Dialog from '@/components/dialog/baseDialog.vue'
import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
const title = ref('箭头')
@ -334,6 +336,7 @@ const nodeEdit = () => {
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
let params = structuredClone(that.options)
baseDialog.value?.close()

View File

@ -211,7 +211,7 @@
<div class="td" style="width: 60px; flex: 0 60px;min-width: 60px;">{{ index + 1 }}</div>
<div class="td" style="flex: 0 0 280px;">{{ item.name }}</div>
<div class="td"><input class="input" type="number" title="" min="0" max="999999999" v-model="item.cnt"
@blur="changeAttributeGoods(item)">
@blur="changeAttributeGoods(item)" @input="$handleInputLimit">
</div>
</div>
</div>
@ -531,7 +531,7 @@ const _addRr = () => {
ipcRenderer.once('selectedItem', (event, filePaths) => {
if (filePaths.length > 0) {
filePaths.forEach((item) => {
attribute.value.link.content.push({
attribute.value.vr.content.push({
name: '全景图',
url: item
})

View File

@ -13,7 +13,7 @@
<div class="row">
<div class="col">
<span class="label" style="flex: unset">{{ t('dialog.name') }}</span>
<input class="input" type="text" v-model="entityOptions.name" @change="changeName" />
<input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" />
</div>
<div class="col"></div>
</div>
@ -36,6 +36,7 @@
max="180"
v-model="entityOptions.lng"
@change="changLng"
@input="$handleInputLimit"
/>
</div>
</div>
@ -50,6 +51,7 @@
max="90"
v-model="entityOptions.lat"
@change="changLat"
@input="$handleInputLimit"
/>
</div>
</div>
@ -68,6 +70,7 @@
max="999999999"
v-model="entityOptions.alt"
@change="changAlt"
@input="$handleInputLimit"
/>
<span class="unit">m</span>
<span class="arrow"></span>
@ -149,6 +152,7 @@
min="1"
max="99999999"
v-model="entityOptions.near"
@input="$handleInputLimit"
/>
<span class="unit">m</span>
<span class="arrow"></span>
@ -164,6 +168,7 @@
min="1"
max="99999999"
v-model="entityOptions.far"
@input="$handleInputLimit"
/>
<span class="unit">m</span>
<span class="arrow"></span>
@ -206,6 +211,7 @@
max="999999999"
v-model="height"
@change="changHeight"
@input="$handleInputLimit"
/>
<span class="unit">m</span>
<span class="arrow"></span>
@ -384,6 +390,7 @@
min="0.1"
max="99"
v-model="entityOptions.billboardScale"
@input="$handleInputLimit"
/>
<span class="unit"></span>
<span class="arrow"></span>
@ -425,6 +432,7 @@
max="99"
v-model="entityOptions.labelFontSize"
style="width: 70px"
@input="$handleInputLimit"
/>
<span class="unit">px</span>
<span class="arrow"></span>
@ -581,9 +589,9 @@ const coordinateChange = () => {
let position = window.earth.proj.convert(
[
{
x: entityOptions.value.lng,
y: entityOptions.value.lat,
z: entityOptions.value.alt
x: entityOptions.value.lng || 0,
y: entityOptions.value.lat || 0,
z: entityOptions.value.alt || 0
}
],
'EPSG:4326',
@ -598,7 +606,7 @@ const heightModeChange = (val) => {
switch (val) {
case 0:
case '0':
height.value = entityOptions.value.alt
height.value = entityOptions.value.alt || 0
break
case 1:
case '1':
@ -606,10 +614,10 @@ const heightModeChange = (val) => {
window.Cesium.sampleTerrainMostDetailed(window.earth.viewer.scene.terrainProvider, [
window.Cesium.Cartographic.fromDegrees(entityOptions.value.lng, entityOptions.value.lat)
]).then((position) => {
height.value = entityOptions.value.alt - Number(position[0].height.toFixed(2))
height.value = (entityOptions.value.alt || 0) - Number(position[0].height.toFixed(2))
})
} else {
height.value = entityOptions.value.alt
height.value = entityOptions.value.alt || 0
}
break
case 2:
@ -635,14 +643,17 @@ const heightModeChange = (val) => {
}
const changLng = () => {
entityOptions.value.lng = entityOptions.value.lng || 0
projConvert()
coordinateChange()
}
const changLat = () => {
entityOptions.value.lat = entityOptions.value.lat || 0
projConvert()
coordinateChange()
}
const changAlt = () => {
entityOptions.value.alt = entityOptions.value.alt || 0
heightModeChange(heightMode.value)
coordinateChange()
}
@ -707,8 +718,8 @@ const projConvert = () => {
latdnsArr1,
latdnsArr2,
latdnsArr3
lng = entityOptions.value.lng
lat = entityOptions.value.lat
lng = entityOptions.value.lng || 0
lat = entityOptions.value.lat || 0
lngDM = that._proj.degreesToDMS(lng, true)
latDM = that._proj.degreesToDMS(lat, true)
lngdnArr1 = lngDM.split('°')
@ -746,6 +757,7 @@ const translate = () => {
})
}
const confirm = () => {
entityOptions.value.labelText = entityOptions.value.labelText || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)

View File

@ -11,7 +11,7 @@
</div>
<div class="col">
<span class="label">透明度</span>
<input type="range" min="0" max="1" step="0.01" v-model="entityOptions.transparency">
<input type="range" min="0" max="1" step="0.01" v-model="entityOptions.transparency" @input="$handleInputLimit">
</div>
</div>
</div>
@ -20,12 +20,12 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">波纹层数</span>
<div class="input-number input-number-unit">
<input class="input" type="number" title="" min="1" max="10" v-model="entityOptions.count">
<input class="input" type="number" title="" min="1" max="10" v-model="entityOptions.count" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -33,12 +33,12 @@
<div class="row">
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lat">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lat" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">扩散速度</span>
<div class="input-number input-number-unit">
<input class="input" type="number" title="" min="0" max="20" v-model="entityOptions.speed">
<input class="input" type="number" title="" min="0" max="20" v-model="entityOptions.speed" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -64,7 +64,7 @@
<div class="col">
<span class="label">半径</span>
<input class="input" type="number" title="" min="0" max="999999" v-model="item.radius"
@input="changeRadius(index)">
@input="changeRadius">
</div>
<div class="col" style="flex-direction: row-reverse;">
<div class="color" :ref="el => colorRefs[index] = el"></div>
@ -110,7 +110,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { inject } from "vue";
import { inject, getCurrentInstance } from "vue";
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
@ -118,7 +118,7 @@ import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const { proxy } = getCurrentInstance()!
const baseDialog: any = ref(null);
const eventBus: any = inject("bus");
@ -213,7 +213,8 @@ const minusCircle = async (index) => {
})
}
}
const changeRadius = async (index) => {
const changeRadius = async (e) => {
proxy.$handleInputLimit(e)
let newCircle = JSON.parse(JSON.stringify(circle.value))
if (radiusUnit.value == 'km') {
for (let i = 0; i < newCircle.length; i++) {

View File

@ -73,6 +73,7 @@
title=""
min="-9999999"
max="999999999"
@input="$handleInputLimit"
v-model="height"
/>
<span class="unit">m</span>
@ -109,6 +110,7 @@
v-model="item.lng"
min="-180"
max="180"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'lng'"
/>
<span style="pointer-events: none" v-else>{{ item.lng.toFixed(8) }}</span>
@ -121,6 +123,7 @@
v-model="item.lat"
min="-180"
max="180"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'lat'"
/>
<span style="pointer-events: none" v-else>{{ item.lat.toFixed(8) }}</span>
@ -133,6 +136,7 @@
v-model="item.alt"
min="-9999999"
max="999999999"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'alt'"
/>
<span style="pointer-events: none" v-else>{{ item.alt.toFixed(2) }}</span>
@ -157,6 +161,7 @@
title=""
min="1"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.lineWidth"
/>
<span class="unit">px</span>
@ -198,6 +203,7 @@
min="0"
data-min="0.01"
max="999999"
@input="$handleInputLimit"
v-model="entityOptions.extendWidth"
/>
<span class="unit">m</span>
@ -224,6 +230,7 @@
min="0"
max="999999"
step="1"
@input="$handleInputLimit"
v-model="entityOptions.speed"
/>
<span class="arrow"></span>
@ -247,6 +254,7 @@
min="0"
max="4.5"
step="0.1"
@input="$handleInputLimit"
v-model="entityOptions.space"
/>
<span class="unit"></span>
@ -287,6 +295,7 @@
import { ref, getCurrentInstance } from 'vue'
import { inject } from 'vue'
import { TreeApi } from '@/api/tree'
import { useI18n } from 'vue-i18n'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import { getFontList } from './fontSelect'
@ -294,6 +303,7 @@ import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null)
@ -537,9 +547,10 @@ const closeCallback = () => {
eventBus.emit('destroyComponent')
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
delete params.host
let params2 = {
id: params.id,

View File

@ -20,12 +20,12 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">爆炸范围</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="1" max="999999" v-model="entityOptions.size">
<input class="input" type="number" title="" min="1" max="999999" v-model="entityOptions.size" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -34,12 +34,12 @@
<div class="row">
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat">
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">高度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.alt">
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.alt" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>

View File

@ -21,14 +21,14 @@
<div class="col">
<span class="label">飞线数量</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="1" max="99999" v-model="entityOptions.pointNumber">
<input class="input" type="number" title="" min="1" max="99999" v-model="entityOptions.pointNumber" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">飞线宽度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" max="99999" min="1" step="1" v-model="entityOptions.width">
<input class="input" type="number" title="" max="99999" min="1" step="1" v-model="entityOptions.width" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -40,14 +40,14 @@
<div class="col">
<span class="label">飞线高度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="999999" step="1" v-model="entityOptions.height">
<input class="input" type="number" title="" min="0" max="999999" step="1" v-model="entityOptions.height" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">飞线高度差</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" max="99999" min="0" step="1" v-model="entityOptions.heightDifference">
<input class="input" type="number" title="" max="99999" min="0" step="1" v-model="entityOptions.heightDifference" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -58,14 +58,14 @@
<div class="col">
<span class="label">单次运动时长s</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" max="999999999" min="1" step="1" v-model="entityOptions.duration">
<input class="input" type="number" title="" max="999999999" min="1" step="1" v-model="entityOptions.duration" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">轨迹透明度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" max="1" min="0.01" step="0.01" v-model="entityOptions.lineBackAlpha">
<input class="input" type="number" title="" max="1" min="0.01" step="0.01" v-model="entityOptions.lineBackAlpha" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>

View File

@ -26,7 +26,7 @@
<div class="row">
<div class="col">
<span class="label">旋转角度</span>
<input type="range" min="0" max="360" step="0.01" v-model="entityOptions.angle" />
<input type="range" min="0" max="360" step="0.01" v-model="entityOptions.angle" @input="$handleInputLimit"/>
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
<input
style="width: 100px"
@ -35,6 +35,7 @@
min="0"
max="360"
step="0.1"
@input="$handleInputLimit"
v-model="entityOptions.angle"
/>
<span class="unit">°</span>
@ -50,6 +51,7 @@
min="0.001"
max="200"
step="0.001"
@input="$handleInputLimit"
v-model="entityOptions.scale.x"
/>
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
@ -60,6 +62,7 @@
min="0.001"
max="200"
step="0.001"
@input="$handleInputLimit"
v-model="entityOptions.scale.x"
/>
<span class="arrow"></span>
@ -74,6 +77,7 @@
min="0.001"
max="200"
step="0.001"
@input="$handleInputLimit"
v-model="entityOptions.scale.y"
/>
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
@ -84,6 +88,7 @@
min="0.001"
max="200"
step="0.001"
@input="$handleInputLimit"
v-model="entityOptions.scale.y"
/>
<span class="arrow"></span>
@ -120,6 +125,7 @@
title=""
min="1"
max="99"
@input="$handleInputLimit"
v-model="entityOptions.textFontSize"
/>
<span class="unit">px</span>
@ -147,6 +153,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.textNear"
/>
<span class="unit">m</span>
@ -162,6 +169,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.textFar"
/>
<span class="unit">m</span>

View File

@ -20,12 +20,12 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180"
<input class="input" type="number" title="" min="-180" max="180" @input="$handleInputLimit"
v-model="entityOptions.lng">
</div>
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat">
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit">
</div>
</div>
</div>
@ -37,7 +37,7 @@
<input type="range" max="360" min="0" step="1" v-model="entityOptions.angle">
<div class="input-number input-number-unit"
style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="360" step="1"
<input class="input" type="number" title="" min="0" max="360" step="1" @input="$handleInputLimit"
v-model="entityOptions.angle">
<span class="unit">°</span>
<span class="arrow"></span>
@ -47,10 +47,10 @@
<div class="row">
<div class="col">
<span class="label">调整大小</span>
<input type="range" max="100000" min="0" step="0.01" v-model="entityOptions.scale">
<input type="range" :max="100000" :min="0" :step="0.01" v-model="entityOptions.scale">
<div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="100000" step="0.01"
v-model="entityOptions.scale">
<input class="input" type="number" title="" :min="0" :max="100000" :step="0.01"
v-model="entityOptions.scale" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -60,7 +60,7 @@
<span class="label">滚动速度</span>
<input type="range" max="100" min="0" step="1" v-model="entityOptions.speed">
<div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="100" step="1"
<input class="input" type="number" title="" min="0" max="100" step="1" @input="$handleInputLimit"
v-model="entityOptions.speed">
<span class="arrow"></span>
</div>
@ -85,10 +85,13 @@
<script setup lang="ts">
import { ref } from 'vue';
import { inject } from "vue";
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null);
@ -102,7 +105,6 @@ let originalOptions: any
let that: any
const colorRef = ref(null)
const open = async (id: any) => {
console.log('id', id)
that = window.earth.entityMap.get(id)
originalOptions = structuredClone(that.options)
entityOptions.value = that
@ -124,12 +126,14 @@ const open = async (id: any) => {
})
}
const confirm = () => {
entityOptions.value.text = entityOptions.value.text || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
// 删除不必要的属性
delete params.host
delete params.name
delete params.positions
let params2 = {
"id": params.id,
"sourceName": params.text,
@ -143,33 +147,33 @@ const close = () => {
baseDialog.value?.close()
}
const remove = () => {
close()
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
close()
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) {
ElMessage({
message: '删除成功',
type: 'success'
})
that.remove()
(window as any)._entityMap.delete(source_ids[0])
} else {
ElMessage({
message: res.msg || '删除失败',
type: 'error'
})
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
})
.then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) {
ElMessage({
message: '删除成功',
type: 'success'
})
that.remove()
(window as any)._entityMap.delete(source_ids[0])
} else {
ElMessage({
message: res.msg || '删除失败',
type: 'error'
})
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
})
}
const translate = () => {
entityOptions.value.positionEditing = true

View File

@ -30,6 +30,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.labelNear"
/>
<span class="unit">m</span>
@ -45,6 +46,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.labelFar"
/>
<span class="unit">m</span>
@ -73,6 +75,7 @@
title=""
min="1"
max="99"
@input="$handleInputLimit"
v-model="entityOptions.labelFontSize"
/>
<span class="unit">px</span>
@ -126,6 +129,7 @@
title=""
min="1"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.labelLineWidth"
/>
<span class="unit">px</span>
@ -141,6 +145,7 @@
title=""
min="0"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.labelPixelOffset"
/>
<span class="unit">px</span>

View File

@ -2,23 +2,31 @@
<Dialog ref="baseDialog" title="底图属性" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallback">
<template #content>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
<span class="label">名称</span>
<input class="input" v-model="entityOptions.name">
<div class="div-item">
<div class="row">
<div class="col">
<span class="label">名称</span>
<input class="input" v-model="entityOptions.name">
</div>
</div>
</div>
</div>
</div>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
<span class="label">透视</span>
<input type="range" min="0" max="1" step="0.01" v-model="entityOptions.alpha">
<div class="div-item">
<div class="row" style="margin-bottom: 5px;">
<div class="col">
<span class="label">透明度</span>
</div>
</div>
<div class="row">
<div class="col" style="margin-right: 12px;">
<el-slider tooltip-class="custom-slider-tooltip" v-model="entityOptions.alpha" :min="0" :max="1" :step="0.0001" placement="bottom" :format-tooltip="formatTooltip" />
</div>
<div class="col input-number input-number-unit" style="flex: 0 0 80px;margin: 0px;">
<input class="input" type="number" title="" :min="0" :max="100" v-model="alphaPercent" />
<span class="arrow"></span>
</div>
</div>
</div>
</div>
</div>
<span class="custom-divider" style="margin-top: 10px;"></span>
</template>
<template #footer>
<button @click="remove">删除</button>
@ -43,12 +51,23 @@ const text = ref('')
eventBus.on('openStandTextAdd', () => {
baseDialog.value?.open()
})
const formatTooltip = (val: number) => {
return Math.round(val * 10000) / 100
}
const entityOptions: any = ref({});
let originalOptions: any
let that: any
const alphaPercent = computed({
get() {
return Math.round(entityOptions.value.alpha * 10000) / 100;
},
set(value) {
entityOptions.value.alpha = value / 100;
}
});
const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false
entityOptions.value.reset()
eventBus.emit("destroyComponent")
}
@ -85,31 +104,31 @@ const close = () => {
const remove = () => {
close()
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) {
ElMessage({
message: '删除成功',
type: 'success'
})
that.remove()
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) {
ElMessage({
message: '删除成功',
type: 'success'
})
that.remove()
(window as any)._entityMap.delete(source_ids[0])
} else {
ElMessage({
message: res.msg || '删除失败',
type: 'error'
})
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
})
} else {
ElMessage({
message: res.msg || '删除失败',
type: 'error'
})
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
})
}
defineExpose({
open,

View File

@ -32,6 +32,7 @@
title=""
min="-180"
max="180"
@input="$handleInputLimit"
v-model="entityOptions.lng"
/>
</div>
@ -44,6 +45,7 @@
title=""
min="0.1"
max="99999"
@input="$handleInputLimit"
v-model="entityOptions.maximumScale"
/>
<span class="unit"></span>
@ -60,6 +62,7 @@
title=""
min="-90"
max="90"
@input="$handleInputLimit"
v-model="entityOptions.lat"
/>
</div>
@ -72,6 +75,7 @@
title=""
min="1"
max="99999"
@input="$handleInputLimit"
v-model="entityOptions.minimumPixelSize"
/>
<span class="unit">px</span>
@ -89,6 +93,7 @@
title=""
min="-99999"
max="9999999"
@input="$handleInputLimit"
v-model="entityOptions.alt"
/>
<span class="unit">m</span>
@ -133,6 +138,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.rotateX"
/>
<span class="unit">°</span>
@ -160,6 +166,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.rotateY"
/>
<span class="unit">°</span>
@ -187,6 +194,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.rotateZ"
/>
<span class="unit">°</span>
@ -225,6 +233,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
@change="scaleChange"
v-model="entityOptions.scaleX"
/>
@ -254,6 +263,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.scaleX"
/>
<span class="unit">°</span>
@ -281,6 +291,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.scaleY"
/>
<span class="unit">°</span>
@ -308,6 +319,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.scaleZ"
/>
<span class="unit">°</span>
@ -340,6 +352,7 @@
title=""
min="0"
max="360"
@input="$handleInputLimit"
v-model="entityOptions.alt"
/>
<span class="unit">m</span>
@ -386,6 +399,7 @@
title=""
min="1"
max="99"
@input="$handleInputLimit"
v-model="entityOptions.labelFontSize"
/>
<span class="unit">px</span>
@ -413,6 +427,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.labelNear"
/>
<span class="unit">m</span>
@ -428,6 +443,7 @@
title=""
min="1"
max="99999999"
@input="$handleInputLimit"
v-model="entityOptions.labelFar"
/>
<span class="unit">m</span>
@ -462,6 +478,7 @@
title=""
min="1"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.labelLineWidth"
/>
<span class="unit">px</span>
@ -477,6 +494,7 @@
title=""
min="0"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.labelPixelOffset"
/>
<span class="unit">px</span>
@ -514,6 +532,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import Dialog from '@/components/dialog/baseDialog.vue'
import attribute from './attribute.vue'
@ -521,6 +540,7 @@ import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
import { getFontList } from './fontSelect'
const { t } = useI18n()
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
const fontList = ref(getFontList())
@ -713,9 +733,10 @@ const nodeEdit = () => {
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
delete params.attributeType
delete params.attribute.ISC
delete params.attribute.camera

View File

@ -15,18 +15,18 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" />
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" @input="$handleInputLimit" />
</div>
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" />
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit" />
</div>
</div>
<div class="row">
<div class="col">
<span class="label">高度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" v-model="entityOptions.alt">
<input class="input" type="number" title="" v-model="entityOptions.alt" @input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>

View File

@ -43,7 +43,7 @@
<div class="col">
<span class="label">Z值统一增加</span>
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height" @input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -66,15 +66,15 @@
<div class="td">{{ i + 1 }}</div>
<div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number"
v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'">
v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'" @input="$handleInputLimit" />
<span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span>
</div>
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number"
v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'">
v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span>
</div>
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')">
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')" @input="$handleInputLimit">
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == i && activeTd.name == 'alt'">
@ -98,7 +98,7 @@
<div class="col">
<span class="label">描边宽度</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth" @input="$handleInputLimit">
<span class="unit">px</span>
<span class="arrow"></span>
</div>
@ -132,6 +132,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { inject } from "vue";
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
@ -139,6 +140,7 @@ import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const title = ref('面')
@ -310,9 +312,10 @@ const nodeEdit = () => {
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
delete params.host
let params2 = {
"id": params.id,

View File

@ -32,7 +32,7 @@
<div class="col" style="flex: 0 0 60%;">
<span class="label">多面体高度</span>
<div class="input-number input-number-unit-2" style="width: 100px;">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.height">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.height" @input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>

View File

@ -74,6 +74,7 @@
min="-9999999"
max="999999999"
v-model="height"
@input="$handleInputLimit"
/>
<span class="unit">m</span>
<span class="arrow"></span>
@ -109,6 +110,7 @@
v-model="item.lng"
min="-180"
max="180"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'lng'"
/>
<span style="pointer-events: none" v-else>{{ item.lng.toFixed(8) }}</span>
@ -121,6 +123,7 @@
v-model="item.lat"
min="-180"
max="180"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'lat'"
/>
<span style="pointer-events: none" v-else>{{ item.lat.toFixed(8) }}</span>
@ -133,6 +136,7 @@
v-model="item.alt"
min="-9999999"
max="999999999"
@input="$handleInputLimit"
v-if="activeTd.index == i && activeTd.name == 'alt'"
/>
<span style="pointer-events: none" v-else>{{ item.alt.toFixed(2) }}</span>
@ -157,6 +161,7 @@
title=""
min="1"
max="999"
@input="$handleInputLimit"
v-model="entityOptions.lineWidth"
/>
<span class="unit">px</span>
@ -209,6 +214,7 @@
min="0"
data-min="0.01"
max="999999"
@input="$handleInputLimit"
v-model="entityOptions.extendWidth"
/>
<span class="unit">m</span>
@ -235,6 +241,7 @@
min="0"
max="999999"
step="1"
@input="$handleInputLimit"
v-model="entityOptions.speed"
/>
<span class="arrow"></span>
@ -258,6 +265,7 @@
min="0"
max="4.5"
step="0.1"
@input="$handleInputLimit"
v-model="entityOptions.space"
/>
<span class="unit"></span>
@ -294,6 +302,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
@ -301,6 +310,7 @@ import attribute from './attribute.vue'
import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null)
@ -479,6 +489,7 @@ const heightConfirm = () => {
(entityOptions.value.options.positions[i].alt + Number(height.value)).toFixed(2)
)
}
that.positionEditing = false
that.smooth = that.smooth
}
const inputDblclick = async (event, i, anme) => {
@ -542,9 +553,10 @@ const closeCallback = () => {
eventBus.emit('destroyComponent')
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
delete params.host
let params2 = {
id: params.id,

View File

@ -20,7 +20,7 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">扫描半径</span>
@ -38,11 +38,11 @@
<div class="row">
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat">
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">扫描速度</span>
<input class="input" type="number" title="" min="0" max="100" v-model="entityOptions.speed">
<input class="input" type="number" title="" min="0" max="100" v-model="entityOptions.speed" @input="$handleInputLimit">
</div>
</div>
</div>
@ -72,7 +72,7 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { ref, getCurrentInstance } from 'vue';
import { inject } from "vue";
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
@ -82,6 +82,7 @@ import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const { proxy } = getCurrentInstance()!
const baseDialog: any = ref(null);
const eventBus: any = inject("bus");
@ -166,7 +167,8 @@ const remove = () => {
// 用户点击取消,不执行任何操作
})
}
const changeRadius = (val)=>{
const changeRadius = (e)=>{
proxy.$handleInputLimit(e)
if (radiusUnit.value == 'km') {
entityOptions.value.radius = radius.value * 1000
}

View File

@ -17,7 +17,7 @@
<div class="row">
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">扫描半径</span>
@ -36,17 +36,17 @@
<div class="row">
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat">
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit">
</div>
<div class="col">
<span class="label">持续时间</span>
<input class="input" type="number" title="" min="0" max="100" v-model="entityOptions.duration">
<input class="input" type="number" title="" min="0" max="100" v-model="entityOptions.duration" @input="$handleInputLimit">
</div>
</div>
<div class="row">
<div class="col">
<span class="label">高度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.alt">
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.alt" @input="$handleInputLimit">
</div>
<div class="col">
<div class="row">
@ -88,7 +88,7 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { ref, getCurrentInstance } from 'vue';
import { inject } from "vue";
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
@ -98,6 +98,7 @@ import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const { proxy } = getCurrentInstance()!
const baseDialog: any = ref(null);
const eventBus: any = inject("bus");
@ -197,7 +198,8 @@ const remove = () => {
// 用户点击取消,不执行任何操作
})
}
const changeRadius = (val) => {
const changeRadius = (e) => {
proxy.$handleInputLimit(e)
if (radiusUnit.value == 'km') {
entityOptions.value.radius = radius.value * 1000
}

View File

@ -22,7 +22,7 @@
<span class="label">滚动速度</span>
<input type="range" max="100" min="0" step="1" v-model="entityOptions.speed">
<div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="100" step="1" v-model="entityOptions.speed">
<input class="input" type="number" title="" min="0" max="100" step="1" v-model="entityOptions.speed" @input="$handleInputLimit">
<span class="arrow"></span>
</div>
</div>
@ -84,8 +84,8 @@ const open = async (id: any) => {
}
const confirm = () => {
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
// 删除不必要的属性
delete params.host
delete params.name

View File

@ -22,11 +22,13 @@
<script setup lang="ts">
import { ref } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import { useTreeNode } from '../tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null)
@ -52,6 +54,7 @@ const open = async (id: any) => {
await nextTick()
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = {

View File

@ -1,5 +1,5 @@
<template>
<Dialog ref="baseDialog" title="倾斜摄影属性" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallback">
<Dialog ref="baseDialog" title="倾斜摄影属性" left="180px" top="100px" :closeCallback="closeCallback">
<template #content>
<span class="custom-divider"></span>
<div class="div-item">
@ -24,7 +24,7 @@
<div class="col">
<span class="label">精度</span>
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" min="0.1" max="10" step="0.1" v-model="entityOptions.accuracy">
<input class="input" type="number" title="" min="0.1" max="10" step="0.1" v-model="entityOptions.accuracy" @input="$handleInputLimit">
<span class="unit"></span>
<span class="arrow"></span>
</div>
@ -57,11 +57,13 @@
<script setup lang="ts">
import { ref } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import { useTreeNode } from '../tree/hooks/treeNode'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null)
@ -87,6 +89,7 @@ const open = async (id: any) => {
await nextTick()
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.newData)
baseDialog.value?.close()
let params = {

View File

@ -19,7 +19,7 @@
<div class="col">
<span class="label" style="flex: 0 0 70px;">起始点高度</span>
<div class="input-number input-number-unit-1 height-box">
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.height">
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.height" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -27,7 +27,7 @@
<div class="col">
<span class="label">模型倍数</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99999" step="1" v-model="entityOptions.scale">
<input class="input" type="number" title="" min="0" max="99999" step="1" v-model="entityOptions.scale" @input="$handleInputLimit">
<span class="unit"></span>
<span class="arrow"></span>
</div>
@ -37,7 +37,7 @@
<div class="col">
<span class="label" style="flex: 0 0 70px;">运行速度</span>
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" min="0" max="99999999" step="1" v-model="entityOptions.speed">
<input class="input" type="number" title="" min="0" max="99999999" step="1" v-model="entityOptions.speed" @input="$handleInputLimit">
<span class="unit">m/s</span>
<span class="arrow"></span>
</div>
@ -45,7 +45,7 @@
<div class="col">
<span class="label">延迟运动</span>
<div class="input-number input-number-unit-3">
<input class="input" type="number" title="" min="0" max="9999999" v-model="entityOptions.delay">
<input class="input" type="number" title="" min="0" max="9999999" v-model="entityOptions.delay" @input="$handleInputLimit">
<span class="unit">ms</span>
<span class="arrow"></span>
</div>
@ -171,7 +171,7 @@
<div class="col">
<span class="label">字体大小</span>
<div class="input-number input-number-unit-2" style="width: 82px;">
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize">
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize" @input="$handleInputLimit">
<span class="unit">px</span>
<span class="arrow"></span>
</div>
@ -185,7 +185,7 @@
<div class="col">
<span class="label">最近距离</span>
<div class="input-number input-number-unit-1" style="width: 82px;">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelNear">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelNear" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -193,7 +193,7 @@
<div class="col">
<span class="label">最远距离</span>
<div class="input-number input-number-unit-1" style="width: 82px;">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelFar">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelFar" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -217,12 +217,14 @@
<script setup lang="ts">
import { ref } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import { useTreeNode } from '../tree/hooks/treeNode'
import { getFontList } from './fontSelect'
const { t } = useI18n()
const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null)
@ -265,9 +267,10 @@ const open = async (id: any) => {
})
}
const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options)
baseDialog.value?.close()
let params = structuredClone(that.options)
baseDialog.value?.close()
// 删除不必要的属性
delete params.host
delete params.label.text

View File

@ -22,7 +22,7 @@
<span class="label">宽度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" data-min="0.01" min="0.01" max="999999"
v-model="entityOptions.width">
v-model="entityOptions.width" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -31,7 +31,7 @@
<span class="label">拉伸高度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="999999999"
v-model="entityOptions.extrudedHeight">
v-model="entityOptions.extrudedHeight" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>

View File

@ -22,7 +22,7 @@
<span class="label">拉伸高度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="999999999"
v-model="entityOptions.extrudedHeight">
v-model="entityOptions.extrudedHeight" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div>

View File

@ -30,7 +30,7 @@
<span class="label">水面振幅</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="100" step="1"
v-model="entityOptions.amplitude">
v-model="entityOptions.amplitude" @input="$handleInputLimit">
<span class="unit"></span>
<span class="arrow"></span>
</div>
@ -41,7 +41,7 @@
<span class="label">动画速度</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="10" step="0.1"
v-model="entityOptions.animationSpeed">
v-model="entityOptions.animationSpeed" @input="$handleInputLimit">
<span class="unit"></span>
<span class="arrow"></span>
</div>
@ -50,7 +50,7 @@
<span class="label">水面振幅</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="0" max="100" step="1"
v-model="entityOptions.frequency">
v-model="entityOptions.frequency" @input="$handleInputLimit">
<span class="unit"></span>
<span class="arrow"></span>
</div>

View File

@ -429,9 +429,13 @@ export const useRightOperate = () => {
let entityObject = (window as any)._entityMap.get(params.id)
entityObject.resetCustomView()
params.customView = entityObject.customView
let sourceName = params.name
if(node.sourceType == 'standText' || node.sourceType == 'groundText') {
sourceName = params.text
}
let params2 = {
"id": node.id,
"sourceName": params.name,
"sourceName": sourceName,
// "sourceType": node.sourceType,
// "parentId": node.parentId,
// "treeIndex": node.treeIndex,

View File

@ -72,7 +72,9 @@ function leftClick(options) {
// item.previewUrl = res.url;
// });
// });
if (node) {
if (node && (node.sourceType === "point" || node.sourceType === "linkImage" || node.sourceType === "vrImage" || node.sourceType === "line" || node.sourceType === "curve" || node.sourceType === "panel" || node.sourceType === "rectangle"
|| node.sourceType === "circle" || node.sourceType === "ellipse" || node.sourceType === "sector" || node.sourceType === "rendezvous" || node.sourceType === "attackArrow" || node.sourceType === "pincerArrow" || node.sourceType === "straightArrow"
|| node.sourceType === "model" || node.sourceType === "military" || node.sourceType === "wallStereoscopic" || node.sourceType === "entityWall" || node.sourceType === "diffuseScan" || node.sourceType === "radarScan" || node.sourceType === "scanStereoscopic")) {
if (
!options.richTextContent &&
!info.hrefs.length &&

View File

@ -177,7 +177,7 @@
</div>
<div class="search_title" id="search">
<div class="searchUp">
<el-select v-model="select" @change="selectChange" style="width: 4vw" size="small">
<el-select v-model="select" @change="selectChange" style="width: 4vw" size="small" popper-class="custom-dropdown2">
<el-option value="tree" :label="t('tree.layer')"></el-option>
<el-option value="poi" :label="t('tree.location')"></el-option>
</el-select>
@ -783,9 +783,11 @@ defineExpose({
.el-select-dropdown__wrap {
max-height: 260px !important;
width: 380px !important;
}
.custom-dropdown {
margin-top: 75px;
}
.custom-dropdown2 {
width: 380px !important;
}
</style>

12
src/shims-vue.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import type { ComponentCustomProperties } from 'vue'
// 扩展全局属性类型
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
// 声明你的全局方法类型(根据实际方法参数和返回值调整)
$handleInputLimit: (e: Event) => void;
}
}
// 必须导出空对象,否则 TypeScript 会认为这是一个模块声明
export {}