This commit is contained in:
zyl
2025-11-14 18:56:33 +08:00
44 changed files with 2488 additions and 1253 deletions

Binary file not shown.

View File

@ -78,6 +78,8 @@ stopBatPath = process.platform === 'win32' ? stopBatPath.replace(/^(\w:)/, '/$1'
let isRestart = false
let mainWindow;
let isSeverInit = false
let isAppInit = false
function createWindow(): void {
// Create the browser window.
@ -150,6 +152,10 @@ function createWindow(): void {
// 监听启动页完成的消息
ipcMain.on('splash-completed', () => {
// 启动页进度条已完成,可以关闭启动页并显示主窗口
if(isSeverInit) {
mainWindow.webContents.send('program-init')
}
isAppInit = true
setTimeout(() => {
splashWindow.destroy()
mainWindow.maximize() // 先最大化
@ -562,38 +568,53 @@ if (!gotTheLock) {
// buttons: ['确定']
// })
// 执行批处理文件
exec(startBatPath.substring(1, 200), (error, stdout, stderr) => {
if (error) {
console.error(`执行错误: ${error.message}`);
return;
// exec(startBatPath.substring(1, 200), (error, stdout, stderr) => {
// if (error) {
// console.error(`执行错误: ${error.message}`);
// return;
// }
// if (stderr) {
// console.error(`错误输出: ${stderr}`);
// return;
// }
// console.log(`批处理输出: ${stdout}`);
// });
const batProcess = spawn('cmd.exe', ['/c', startBatPath.substring(1, 200)]);
// 实时监听标准输出stdout
batProcess.stdout.on('data', (data) => {
// data 是 Buffer 类型,转为字符串后输出
let string = data.toString().trim()
// console.log(`批处理输出: ${string}`);
// 临时处理:应用启动失败或项目文档地址出现时,认为服务初始化完成;后续需后端配合
if(string.indexOf('APPLICATION FAILED TO START') !== -1 || string.indexOf('项目文档地址') !== -1) {
if(!isSeverInit) {
isSeverInit = true
if(isAppInit) {
mainWindow.webContents.send('program-init')
}
}
}
if (stderr) {
console.error(`错误输出: ${stderr}`);
return;
}
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()}`);
// });
ipcMain.on('judgment-isSeverInit', (event) => {
event.returnValue = isSeverInit
})
// // 监听进程执行出错(如文件不存在、权限问题等
// batProcess.on('error', (error) => {
// console.error(`执行错误: ${error.message}`);
// });
// 监听错误输出stderr
batProcess.stderr.on('data', () => {
// console.error(`错误输出: ${data.toString().trim()}`);
});
// // 监听进程退出事件(执行结束后触发)
// batProcess.on('close', (code) => {
// console.log(`批处理执行完毕,退出码: ${code}`);
// });
// 监听进程执行出错
batProcess.on('error', () => {
// console.error(`执行错误: ${error.message}`);
});
// 监听进程退出事件(执行结束后触发)
batProcess.on('close', (code) => {
console.log(`批处理执行完毕,退出码: ${code}`);
});
// Set app user model id for windows
electronApp.setAppUserModelId('com.electron')

File diff suppressed because one or more lines are too long

View File

@ -161,7 +161,7 @@
background: rgba(var(--color-base1), 0.2);
border: 1px solid rgba(var(--color-base1), 0.5);
display: flex;
justify-content: flex-start;
justify-content: center;
align-items: center;
padding: 5px 16px 4px 16px;
color: #ffffff;
@ -448,6 +448,7 @@
.YJ-custom-base-dialog>.content .table {
background-color: #ffffff00;
color: #000;
font-size: 12px;
}
.YJ-custom-base-dialog>.content .table {
@ -475,9 +476,6 @@
border-top: none;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr,
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr {}
.YJ-custom-base-dialog>.content .table .table-empty {
display: flex;
align-items: center;
@ -554,8 +552,6 @@
background-color: rgba(var(--color-base1), 0.1);
}
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {}
.YJ-custom-base-dialog>.content .table .tr .th,
.YJ-custom-base-dialog>.content .table .tr .td {
flex: 1;
@ -573,40 +569,7 @@
justify-content: center;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(1) {
width: 164px;
flex: 0 0 164px;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(2) {
width: 226px;
flex: 0 0 226px;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(3) {
flex: 0 0 150px;
width: 150px;
justify-content: center;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td .input-group .input,
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td .input-group .input {
border-radius: 5px 0 0 5px;
}
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .td:nth-child(1) {
flex: 0 0 60px;
}
.YJ-custom-base-dialog>.content .table .tr .td .link-edit {
min-height: 32px;
@ -621,68 +584,6 @@
border-right: none;
}
.YJ-custom-base-dialog>.content .table.camera-table {
overflow-x: auto;
}
.YJ-custom-base-dialog>.content .table.isc-table {
overflow: hidden;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr {
display: inline-flex;
}
.YJ-custom-base-dialog>.content .table.isc-table .tr {
display: flex;
}
.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-base1), 0.5);
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .td span,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td span {
white-space: nowrap;
margin-left: 10px;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .td input[type=checkbox],
.YJ-custom-base-dialog>.content .table.isc-table .tr .td input[type=checkbox] {
cursor: pointer;
}
.YJ-custom-base-dialog>.content .table.camera-table .table-body,
.YJ-custom-base-dialog>.content .table.isc-table .table-body {
display: inline-flex;
flex-direction: column;
height: 186px;
width: auto;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .th,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td {
flex: 0 100px;
width: 100px;
min-width: 100px;
}
.YJ-custom-base-dialog>.content .table.isc-table .tr .th,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td {
flex: 1;
width: auto;
min-width: auto;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td:first-child {
flex: 0 74px;
min-width: 74px;
}
.YJ-custom-base-dialog>.content select>option {
color: #000;
}
@ -1215,9 +1116,9 @@
line-height: 28px;
}
.YJ-custom-base-dialog .ew-color-picker .ew-color-dropbtngroup button.ew-color-clear {
/* .YJ-custom-base-dialog .ew-color-picker .ew-color-dropbtngroup button.ew-color-clear {
margin-right: 8px;
}
} */
.YJ-custom-base-dialog .ew-color-picker-box {
border-width: 4px;
@ -1779,58 +1680,6 @@
top: 10px;
}
/* 点标注 */
.YJ-custom-base-dialog.billboard-object>.content {
width: 590px;
}
.YJ-custom-base-dialog.billboard-object>.content button.primary {
padding: 6px 14px;
}
.YJ-custom-base-dialog.billboard-object>.content>div .row .col {
margin: 0 10px;
}
.YJ-custom-base-dialog.billboard-object>.content>div .row .col:first-child {
margin-left: 0;
}
.YJ-custom-base-dialog.billboard-object>.content>div .row .col:last-child {
margin-right: 0;
}
.YJ-custom-base-dialog.billboard-object>.content>div .row .label {
flex: 0 0 56px;
white-space: nowrap;
}
.YJ-custom-base-dialog.billboard-object>.content .DIV-cy-tab-content-pane .input-select {
width: 100px;
}
.YJ-custom-base-dialog.billboard-object>.content .DIV-cy-tab-content-pane h4 {
font-size: 16px;
margin-bottom: 10px;
}
.YJ-custom-base-dialog.billboard-object>.content div .image-box {
width: 23px;
height: 26px;
cursor: pointer;
border: 1px solid rgba(var(--color-base1), 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.YJ-custom-base-dialog.billboard-object>.content div .image {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
/* 富文本 */
.richText-box {
position: absolute;
@ -3612,7 +3461,7 @@
.YJ-custom-checkbox-left:checked::after,
.YJ-custom-checkbox-right:checked::after {
content: "";
content: "\2714";
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 25px;
@ -3647,7 +3496,7 @@
}
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
content: "";
content: "\2714";
background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1);
width: 12px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -157,10 +157,10 @@
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if(node.check_Child_State>0 || node.isShow) {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg></span>`);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" 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="M15.0313 8.00141C15.0313 7.91703 15.0168 7.84625 15.0125 7.83828C15.0097 7.79609 14.9957 7.72016 14.9821 7.67984C14.9783 7.67 14.9741 7.65969 14.9699 7.64937C14.9629 7.62641 14.9549 7.60391 14.9465 7.58609C13.6494 4.74969 10.858 2.84375 8.00004 2.84375C5.14254 2.84375 2.35114 4.74828 1.0602 7.56922C1.04473 7.60016 1.03395 7.62922 1.02692 7.655C1.02367 7.66277 1.02055 7.67058 1.01754 7.67844C0.991761 7.75297 0.991292 7.805 0.993636 7.79187C0.981448 7.84672 0.970667 7.95547 0.970667 7.95547C0.967386 7.98875 0.967386 8.01453 0.971136 8.04781C0.971136 8.04781 0.981917 8.1425 0.987073 8.16219C0.988948 8.18891 0.995511 8.22828 1.00348 8.26438L1.00301 8.26438C1.00957 8.29484 1.01942 8.32438 1.03207 8.35344C1.0391 8.37594 1.0466 8.39703 1.05364 8.4125C2.35207 11.2498 5.14348 13.1562 8.00004 13.1562C10.8585 13.1562 13.6499 11.2513 14.9319 8.44391C14.9521 8.40734 14.9647 8.37313 14.9736 8.34266C14.9774 8.33375 14.9807 8.32531 14.9835 8.31734C15.006 8.25172 15.0107 8.19547 15.0088 8.19547L15.0083 8.19594C15.0172 8.15047 15.0313 8.0825 15.0313 8.00141ZM8.00004 10.3438C6.7077 10.3438 5.65629 9.29234 5.65629 8C5.65629 6.70766 6.7077 5.65625 8.00004 5.65625C9.29239 5.65625 10.3438 6.70766 10.3438 8C10.3438 9.29234 9.29239 10.3438 8.00004 10.3438Z" fill="rgba(var(--color-base1), 1)" ></path></svg></span>`);
}
else {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M0.92193 7.40555C2.05765 9.88822 4.50054 11.5342 7.00003 11.5342C7.89745 11.5342 8.78626 11.3152 9.61067 10.9247L7.5603 8.96332C7.38107 9.01459 7.19567 9.05069 7.00003 9.05069C5.86923 9.05069 4.94925 8.1307 4.94925 6.9999C4.94925 6.83543 4.97386 6.67752 5.01036 6.52412L2.6495 4.2658C1.93994 4.91385 1.34398 5.71324 0.928082 6.62256C0.914547 6.64963 0.905113 6.67506 0.898961 6.69803C0.895873 6.70471 0.893139 6.71155 0.890758 6.71854C0.868199 6.78334 0.867789 6.82723 0.86984 6.81738C0.859586 6.86537 0.849332 6.96094 0.849332 6.96094C0.846461 6.98965 0.846871 7.01262 0.850152 7.04133C0.850152 7.04133 0.859176 7.21401 0.863688 7.23123M13.1524 7.00113C13.1524 6.9269 13.1397 6.86537 13.136 6.8584C13.1335 6.82108 13.1212 6.75463 13.1093 6.71977C13.106 6.71115 13.1023 6.70213 13.0986 6.69311C13.0925 6.67301 13.0855 6.65332 13.0781 6.63774C11.9432 4.15547 9.50075 2.48818 7.00003 2.48818C6.10343 2.48818 5.21544 2.70556 4.39226 3.09439L6.42704 5.041C6.60997 4.98686 6.79987 4.94912 7.00003 4.94912C8.13083 4.94912 9.05081 5.8691 9.05081 6.9999C9.05081 7.16889 9.02456 7.3309 8.9856 7.48799L11.351 9.75041C12.0593 9.10196 12.6528 8.3042 13.0658 7.39981C13.0835 7.36781 13.0945 7.33213 13.1023 7.30588C13.1056 7.29809 13.1085 7.28783 13.1109 7.28045C13.1306 7.22303 13.1347 7.17217 13.1331 7.17217C13.1331 7.17217 13.1331 7.17176 13.1327 7.17176C13.1401 7.13238 13.1524 7.0725 13.1524 7.00113ZM11.5117 11.9218C11.5052 11.9218 11.4987 11.9216 11.4922 11.9213C11.4857 11.921 11.4792 11.9206 11.4727 11.92C11.4662 11.9193 11.4597 11.9186 11.4533 11.9177C11.4468 11.9167 11.4404 11.9157 11.434 11.9144C11.4276 11.9132 11.4212 11.9118 11.4149 11.9103C11.4085 11.9087 11.4023 11.907 11.396 11.9052C11.3897 11.9034 11.3835 11.9014 11.3774 11.8993C11.3712 11.8971 11.3651 11.8948 11.359 11.8924C11.353 11.89 11.347 11.8874 11.3411 11.8847C11.3351 11.882 11.3293 11.8791 11.3235 11.8761C11.3177 11.8731 11.312 11.87 11.3063 11.8668C11.3007 11.8635 11.2951 11.8601 11.2896 11.8566C11.2842 11.853 11.2788 11.8494 11.2735 11.8456C11.2682 11.8418 11.2629 11.8379 11.2578 11.8338C11.2527 11.8298 11.2477 11.8256 11.2428 11.8213C11.2379 11.8171 11.233 11.8127 11.2283 11.8082L1.79474 2.78472C1.63109 2.62804 1.62535 2.36841 1.78162 2.20476C1.9383 2.04111 2.19793 2.03537 2.36157 2.19164L11.7952 11.2151C11.9584 11.3718 11.9646 11.6314 11.8079 11.795C11.8031 11.8 11.7982 11.8049 11.7932 11.8097C11.7882 11.8144 11.7831 11.819 11.7779 11.8235C11.7726 11.828 11.7673 11.8324 11.7618 11.8366C11.7564 11.8408 11.7508 11.8449 11.7451 11.8488C11.7395 11.8527 11.7337 11.8565 11.7278 11.8602C11.722 11.8638 11.716 11.8673 11.71 11.8707C11.704 11.874 11.6979 11.8772 11.6917 11.8802C11.6855 11.8833 11.6792 11.8861 11.6728 11.8889C11.6665 11.8916 11.6601 11.8941 11.6536 11.8965C11.6472 11.8989 11.6406 11.9011 11.634 11.9032C11.6275 11.9052 11.6208 11.9071 11.6141 11.9088C11.6075 11.9106 11.6007 11.9121 11.594 11.9135C11.5872 11.9149 11.5804 11.9161 11.5736 11.9171C11.5668 11.9182 11.5599 11.919 11.5531 11.9197C11.5462 11.9204 11.5393 11.9209 11.5324 11.9213C11.5255 11.9216 11.5187 11.9218 11.5117 11.9218Z"></path></svg></span>`);
}
}
},
@ -519,10 +519,10 @@
}
obj.attr('class', view.makeChkClass(setting, node));
if(node.check_Child_State>0 || node.isShow) {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg>`)
obj.html(`<svg style="pointer-events: none;" 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="M15.0313 8.00141C15.0313 7.91703 15.0168 7.84625 15.0125 7.83828C15.0097 7.79609 14.9957 7.72016 14.9821 7.67984C14.9783 7.67 14.9741 7.65969 14.9699 7.64937C14.9629 7.62641 14.9549 7.60391 14.9465 7.58609C13.6494 4.74969 10.858 2.84375 8.00004 2.84375C5.14254 2.84375 2.35114 4.74828 1.0602 7.56922C1.04473 7.60016 1.03395 7.62922 1.02692 7.655C1.02367 7.66277 1.02055 7.67058 1.01754 7.67844C0.991761 7.75297 0.991292 7.805 0.993636 7.79187C0.981448 7.84672 0.970667 7.95547 0.970667 7.95547C0.967386 7.98875 0.967386 8.01453 0.971136 8.04781C0.971136 8.04781 0.981917 8.1425 0.987073 8.16219C0.988948 8.18891 0.995511 8.22828 1.00348 8.26438L1.00301 8.26438C1.00957 8.29484 1.01942 8.32438 1.03207 8.35344C1.0391 8.37594 1.0466 8.39703 1.05364 8.4125C2.35207 11.2498 5.14348 13.1562 8.00004 13.1562C10.8585 13.1562 13.6499 11.2513 14.9319 8.44391C14.9521 8.40734 14.9647 8.37313 14.9736 8.34266C14.9774 8.33375 14.9807 8.32531 14.9835 8.31734C15.006 8.25172 15.0107 8.19547 15.0088 8.19547L15.0083 8.19594C15.0172 8.15047 15.0313 8.0825 15.0313 8.00141ZM8.00004 10.3438C6.7077 10.3438 5.65629 9.29234 5.65629 8C5.65629 6.70766 6.7077 5.65625 8.00004 5.65625C9.29239 5.65625 10.3438 6.70766 10.3438 8C10.3438 9.29234 9.29239 10.3438 8.00004 10.3438Z" fill="rgba(var(--color-base1), 1)" ></path></svg>`)
}
else {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`)
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M0.92193 7.40555C2.05765 9.88822 4.50054 11.5342 7.00003 11.5342C7.89745 11.5342 8.78626 11.3152 9.61067 10.9247L7.5603 8.96332C7.38107 9.01459 7.19567 9.05069 7.00003 9.05069C5.86923 9.05069 4.94925 8.1307 4.94925 6.9999C4.94925 6.83543 4.97386 6.67752 5.01036 6.52412L2.6495 4.2658C1.93994 4.91385 1.34398 5.71324 0.928082 6.62256C0.914547 6.64963 0.905113 6.67506 0.898961 6.69803C0.895873 6.70471 0.893139 6.71155 0.890758 6.71854C0.868199 6.78334 0.867789 6.82723 0.86984 6.81738C0.859586 6.86537 0.849332 6.96094 0.849332 6.96094C0.846461 6.98965 0.846871 7.01262 0.850152 7.04133C0.850152 7.04133 0.859176 7.21401 0.863688 7.23123M13.1524 7.00113C13.1524 6.9269 13.1397 6.86537 13.136 6.8584C13.1335 6.82108 13.1212 6.75463 13.1093 6.71977C13.106 6.71115 13.1023 6.70213 13.0986 6.69311C13.0925 6.67301 13.0855 6.65332 13.0781 6.63774C11.9432 4.15547 9.50075 2.48818 7.00003 2.48818C6.10343 2.48818 5.21544 2.70556 4.39226 3.09439L6.42704 5.041C6.60997 4.98686 6.79987 4.94912 7.00003 4.94912C8.13083 4.94912 9.05081 5.8691 9.05081 6.9999C9.05081 7.16889 9.02456 7.3309 8.9856 7.48799L11.351 9.75041C12.0593 9.10196 12.6528 8.3042 13.0658 7.39981C13.0835 7.36781 13.0945 7.33213 13.1023 7.30588C13.1056 7.29809 13.1085 7.28783 13.1109 7.28045C13.1306 7.22303 13.1347 7.17217 13.1331 7.17217C13.1331 7.17217 13.1331 7.17176 13.1327 7.17176C13.1401 7.13238 13.1524 7.0725 13.1524 7.00113ZM11.5117 11.9218C11.5052 11.9218 11.4987 11.9216 11.4922 11.9213C11.4857 11.921 11.4792 11.9206 11.4727 11.92C11.4662 11.9193 11.4597 11.9186 11.4533 11.9177C11.4468 11.9167 11.4404 11.9157 11.434 11.9144C11.4276 11.9132 11.4212 11.9118 11.4149 11.9103C11.4085 11.9087 11.4023 11.907 11.396 11.9052C11.3897 11.9034 11.3835 11.9014 11.3774 11.8993C11.3712 11.8971 11.3651 11.8948 11.359 11.8924C11.353 11.89 11.347 11.8874 11.3411 11.8847C11.3351 11.882 11.3293 11.8791 11.3235 11.8761C11.3177 11.8731 11.312 11.87 11.3063 11.8668C11.3007 11.8635 11.2951 11.8601 11.2896 11.8566C11.2842 11.853 11.2788 11.8494 11.2735 11.8456C11.2682 11.8418 11.2629 11.8379 11.2578 11.8338C11.2527 11.8298 11.2477 11.8256 11.2428 11.8213C11.2379 11.8171 11.233 11.8127 11.2283 11.8082L1.79474 2.78472C1.63109 2.62804 1.62535 2.36841 1.78162 2.20476C1.9383 2.04111 2.19793 2.03537 2.36157 2.19164L11.7952 11.2151C11.9584 11.3718 11.9646 11.6314 11.8079 11.795C11.8031 11.8 11.7982 11.8049 11.7932 11.8097C11.7882 11.8144 11.7831 11.819 11.7779 11.8235C11.7726 11.828 11.7673 11.8324 11.7618 11.8366C11.7564 11.8408 11.7508 11.8449 11.7451 11.8488C11.7395 11.8527 11.7337 11.8565 11.7278 11.8602C11.722 11.8638 11.716 11.8673 11.71 11.8707C11.704 11.874 11.6979 11.8772 11.6917 11.8802C11.6855 11.8833 11.6792 11.8861 11.6728 11.8889C11.6665 11.8916 11.6601 11.8941 11.6536 11.8965C11.6472 11.8989 11.6406 11.9011 11.634 11.9032C11.6275 11.9052 11.6208 11.9071 11.6141 11.9088C11.6075 11.9106 11.6007 11.9121 11.594 11.9135C11.5872 11.9149 11.5804 11.9161 11.5736 11.9171C11.5668 11.9182 11.5599 11.919 11.5531 11.9197C11.5462 11.9204 11.5393 11.9209 11.5324 11.9213C11.5255 11.9216 11.5187 11.9218 11.5117 11.9218Z"></path></svg></span>`)
}
},
setParentNodeCheckBox: function (setting, node, value, srcNode) {

View File

@ -33,7 +33,6 @@ export default {
addTrajectory: '轨迹运动',
addXlsx: '添加作战数据',
showAttr: '查看属性',
importHeader: '导入表头',
resetPerspective: '重置透视',
addEvent: '添加态势事件',
},
@ -155,7 +154,7 @@ export default {
systemTitle: '系统面板',
authorize: '授权信息',
setting: '系统设置',
project: '工程信息',
project: '工程管理',
device: '设备管理',
materials: '物资管理',
modelManage: '模型管理',
@ -236,13 +235,90 @@ export default {
title: '图标选择',
setting: '默认图标参数设置'
},
vector: {
: '导入表头',
: '下载字典模板',
: '导出',
},
general: {
: '颜色',
: '经度',
: '纬度',
: '海拔高度',
: '高度',
: '视野缩放',
: '最近距离',
: '最远距离',
: '属性信息',
: '空间信息',
: '标注风格',
: '内容类型',
: '富文本',
: '链接',
IP摄像头: 'IP摄像头',
ISC摄像头: 'ISC摄像头',
: '传感器',
: '全景图',
: '物资',
: '编辑内容',
: '打开文本编辑器',
: '添加链接',
: '名称',
: '操作',
: '编辑',
: '删除',
: '确认',
: '取消',
: '暂无数据',
: '搜索',
: '设备名称',
: '设备类型',
IP: '设备IP',
: '设备端口',
: '用户名',
: '密码',
: '绑定',
: '序号',
: '数量',
: '高度模式',
: '相对地表',
: '依附地表',
: '依附模型',
: '小数格式',
: '度分格式',
: '度分秒格式',
: '度',
: '分',
: '秒',
: '更新高程',
: '平移',
: '旋转',
: '关闭',
: '确定',
: '显隐',
: '图标',
times: '倍',
: '黑体',
: '思源黑体',
: '庞门正道标题体',
: '数黑体',
text: {
color: '字体颜色',
size: '字体大小',
font: '字体类型',
style: '字体样式',
bold: '加粗',
italic: '斜体',
underline: '下划线',
strikethrough: '删除线',
letterSpacing: '字体间距',
},
outline: {
color: '轮廓颜色',
width: '轮廓宽度',
}
},
dialog: {
name: '名称',
color: '颜色',
longitude: '经度',
latitude: '纬度',
altitude: '海拔高度',
height: '高度',
point: {
title: '点属性',
WGS84: 'WGS84坐标',
@ -250,6 +326,15 @@ export default {
XAxis: 'X轴',
YAxis: 'Y轴',
ZAxis: 'Z轴',
icon: {
show: '图标显示',
current: '当前图标',
multiple: '图标倍数',
default: '默认图标',
},
text: {
show: '文字显示',
},
},
}
} as const

View File

@ -32,7 +32,6 @@ export default {
addTrajectory: 'addTra jectory',
addXlsx: 'add Xlsx',
showAttr: 'show Attribute',
importHeader: 'import Header',
resetPerspective: 'reset Perspective',
addEvent: 'add Event',
@ -235,13 +234,91 @@ export default {
title: 'Icon',
setting: 'default settings'
},
vector: {
: 'Import Header',
: 'Download Header Template',
: 'Export',
},
general: {
: 'Color',
: 'Longitude',
: 'Latitude',
: 'Altitude',
: 'Height',
: 'Field of view zoom',
: 'Shortest distance',
: 'Farthest distance',
: 'Attribute',
: 'Spatial info',
: 'Mark style',
: 'Content type',
: 'Rich text',
: 'Link',
IP摄像头: 'IP Camera',
ISC摄像头: 'ISC Camera',
: 'Sensor',
: 'Panorama photo',
: 'Materials',
: 'Edit content',
: 'Open the editor',
: 'Add Link',
: 'Name',
: 'Actions',
: 'Edit',
: 'Delete',
: 'Confirm',
: 'Cancel',
: 'No Data',
: 'Search',
: 'Device Name',
: 'Device Type',
IP: 'Device IP',
: 'Device Port',
: 'User Name',
: 'Password',
: 'Bind',
: 'No.',
: 'Quantity',
: 'Height mode',
: 'Relative to the surface',
: 'Adhere to the surface',
: 'Adhere to the model',
: 'Decimal',
: 'degree-minute',
: 'degree-minute-second',
: 'degree',
: 'minute',
: 'second',
: 'Update Altitude',
: 'Translate',
: 'Rotate',
: 'Close',
: 'Confirm',
: 'Icon settings',
: 'show',
: 'Icon',
times: 'times',
: 'SimHei',
: 'SourceHanSansTi',
: 'PMZDBTTi',
: 'AlimamaShuHeiTi',
text: {
color: 'Text color',
size: 'Text size',
font: 'Text font',
style: 'Text style',
bold: 'Bold',
italic: 'Italic',
underline: 'Underline',
strikethrough: 'Strikethrough',
letterSpacing: 'Letter spacing',
},
outline: {
color: 'Outline color',
width: 'Outline width',
}
},
dialog: {
name: 'Name',
color: 'Color',
longitude: 'Longitude',
latitude: 'Latitude',
altitude: 'Altitude',
height: 'Height',
point: {
title: 'Edit node',
WGS84: 'WGS84 coordinates',
@ -249,6 +326,15 @@ export default {
XAxis: 'X-axis',
YAxis: 'Y-axis',
ZAxis: 'Z-axis',
icon: {
show: 'Icon show',
current: 'Current icon',
multiple: 'Icon scale',
default: 'Default icon',
},
text: {
show: 'Text show',
},
},
}
} as const

View File

@ -32,7 +32,6 @@ export default {
addTrajectory: '軌跡運動',
addXlsx: '添加作戰數據',
showAttr: '查看屬性',
importHeader: '導入表头',
resetPerspective: '重置透視',
addEvent: '添加態勢事件',
},
@ -154,7 +153,7 @@ export default {
systemTitle: '系統面板',
authorize: '授權信息',
setting: '系統設置',
project: '工程信息',
project: '工程管理',
device: '設備管理',
modelManage: '模型管理',
graphLabelManage: '軍標管理',
@ -234,13 +233,90 @@ export default {
title: '圖標選擇',
setting: '默認圖標參數設置'
},
vector: {
: '導入表頭',
: '下載字典模板',
: '導出',
},
general: {
: '顏色',
: '經度',
: '緯度',
: '海拔高度',
: '高度',
: '視野縮放',
: '最近距離',
: '最遠距離',
: '屬性信息',
: '空間信息',
: '標注風格',
: '內容類型',
: '富文本',
: '鏈接',
IP摄像头: 'IP攝像頭',
ISC摄像头: 'ISC攝像頭',
: '傳感器',
: '全景圖',
: '物資',
: '編輯內容',
: '打開文本編輯器',
: '添加鏈接',
: '名稱',
: '操作',
: '編輯',
: '刪除',
: '確認',
: '取消',
: '暫無數據',
: '搜索',
: '設備名稱',
: '設備類型',
IP: '設備IP',
: '設備端口',
: '用戶名',
: '密碼',
: '綁定',
: '序號',
: '數量',
: '高度模式',
: '相對地表',
: '依附地表',
: '依附模型',
: '小數格式',
: '度分格式',
: '度分秒格式',
: '度',
: '分',
: '秒',
: '更新高程',
: '平移',
: '旋轉',
: '關閉',
: '確定',
: '顯隱',
: '圖標',
times: '倍',
: '黑體',
: '思源黑體',
: '龐門正道標題體',
: '數黑體',
text: {
color: '字體顔色',
size: '字體大小',
font: '字體類型',
style: '字體樣式',
bold: '加粗',
italic: '斜體',
underline: '下劃線',
strikethrough: '刪除線',
letterSpacing: '字體間距',
},
outline: {
color: '輪廓顔色',
width: '輪廓寬度',
}
},
dialog: {
name: '名稱',
color: '顏色',
longitude: '經度',
latitude: '緯度',
altitude: '海拔高度',
height: '高度',
point: {
title: '點屬性',
WGS84: 'WGS84座標',
@ -248,6 +324,15 @@ export default {
XAxis: 'X軸',
YAxis: 'Y軸',
ZAxis: 'Z軸',
icon: {
show: '圖標顯示',
current: '當前圖標',
multiple: '圖標倍數',
default: '默認圖標',
},
text: {
show: '文字顯示',
},
},
}
} as const

View File

@ -515,51 +515,32 @@ img {
}
.el-popper.is-customized {
padding: 2px 6px;
background: rgba(0, 0, 0, 0.6);
padding: 6px 8px;
background: linear-gradient(rgba(var(--color-base1), 0.5), rgba(var(--color-base1), 0.5)), rgba(0, 0, 0, 1);
pointer-events: none;
line-height: 14px;
}
.el-popper.is-customized::before {
content: " ";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
border-radius: var(--el-popper-border-radius);
background: rgba(var(--color-base1), 0.2);
z-index: -1;
}
.el-popper.is-customized>.el-popper__arrow::before {
background: #ff000000 !important;
.el-popper.is-customized[data-popper-placement="bottom"] .el-popper__arrow::before {
margin: 0;
right: 0;
width: 0;
height: 0;
border: 5px solid rgba(var(--color-base1), 0.2) !important;
border-bottom-color: transparent !important;
border-right-color: transparent !important;
}
.el-popper.is-customized>.el-popper__arrow::after {
box-sizing: border-box;
content: " ";
width: 10px;
height: 10px;
position: absolute;
transform: rotate(45deg);
z-index: -2;
background: #ff000000;
background: linear-gradient(rgba(var(--color-base1), 0.5), rgba(var(--color-base1), 0.5)), rgba(0, 0, 0, 1) !important;
clip-path: polygon(0 0, 0 100%, 100% 0) !important;
}
.el-popper.is-customized[data-popper-placement="top"] .el-popper__arrow::before {
margin: 0;
right: 0;
width: 0;
height: 0;
border: 5px solid rgba(0, 0, 0, 0.6);
border-bottom-color: transparent !important;
border-right-color: transparent !important;
width: 10px;
height: 10px;
background: linear-gradient(rgba(var(--color-base1), 0.5), rgba(var(--color-base1), 0.5)), rgba(0, 0, 0, 1) !important;
clip-path: polygon(0 0, 0 100%, 100% 0) !important;
transform: rotate(-135deg);
}
#app {
.distance-legend {
background-color: rgba(0, 0, 0, 0);

View File

@ -1,5 +1,5 @@
import {leftClick, rightClick} from '../../src/views/components/tree/entityClick'
import {renderVector} from '../views/components/tree/components/hooks/renderVector'
import { leftClick, rightClick } from '../../src/views/components/tree/entityClick'
import { renderVector } from '../views/components/tree/components/hooks/renderVector'
export const initMapData = async (type, data, cd) => {
let entityObject
@ -15,7 +15,9 @@ export const initMapData = async (type, data, cd) => {
case 'point':
case 'linkImage':
case 'vrImage':
console.log(data, 'dataccccc')
entityObject = new YJ.Obj.BillboardObject(window.earth, data)
console.log('entityObject', entityObject)
// entityObject.options.billboard.defaultImage = ''
break
case 'line':

View File

@ -10,7 +10,7 @@
:total="total"
:small="isSmall"
class="pagination"
:layout='"total, prev, pager, next, jumper" + (pageSizes===false?"":"sizes")'
:layout='"total, prev, pager, next, jumper" + (pageSizes===false?"":", sizes")'
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
@ -94,9 +94,40 @@ const handleCurrentChange = (val) => {
emit('pagination', { page: val, limit: pageSize.value })
}
</script>
<style lang="css" scoped>
<style lang="scss" scoped>
.pagination {
float: right;
margin-top: 15px;
margin-top: 5px !important;
::v-deep .el-pagination__jump {
.el-input__wrapper {
padding: 0;
box-shadow: none !important;
background: none;
border: none !important
}
}
::v-deep .el-pagination__sizes {
.el-select__wrapper {
min-height: 32px;
}
}
::v-deep .el-pager {
li:hover {
color: rgba(var(--color-base1), 1) !important;
}
.is-active {
color: rgba(var(--color-base1), 1) !important;
}
.more {
color: rgba(var(--color-base1), 1) !important;
}
}
::v-deep .btn-prev, ::v-deep .btn-next {
color: #ffffff !important;
}
::v-deep .btn-prev:hover, ::v-deep .btn-next:hover {
color: rgba(var(--color-base1), 1) !important;
}
}
</style>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -202,7 +202,7 @@ const routeImport = () => {
filters: [
{
name: '路网', //、底图
extensions: ['pbf']
extensions: ['PBFL']
}
]
}
@ -229,7 +229,7 @@ const poiImport = () => {
filters: [
{
name: 'poi', //、底图
extensions: ['poi']
extensions: ['POIL']
}
]
}
@ -244,7 +244,6 @@ const poiImport = () => {
poiList.splice(0, poiList.length, ...list.data)
//只有一个poi时默认启用
if (poiList.length == 1) {
let formData = new FormData()
formData.append('id', poiList[0].id)
PoiApi.enablePoi(formData).then((res) => {
@ -312,7 +311,7 @@ const enablePoieData = (row) => {
.catch(() => {})
}
const delRouteData = (row) => {
ElMessageBox.confirm(`是否删除${row.name}数据?`, '提示', {
ElMessageBox.confirm(`是否删除${row.name}路网数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -419,35 +418,43 @@ const handleError = (error: Error) => {
}
//工程合并导入
const mergeProject = () => {
let option = {
properties: ['openFile'],
filters: [
{
name: '路网', //、底图
extensions: ['zip']
ElMessageBox.confirm(`项目已存在,继续导入将合并项目,是否执行?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let option = {
properties: ['openFile'],
filters: [
{
name: '路网', //、底图
extensions: ['zip']
}
]
}
]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, path) => {
if (path.length) {
let formData = new FormData()
formData.append('path', path[0])
PoiApi.importProjectConfig(formData).then((res) => {
if (res.code === 200) {
setTimeout(() => {
ElMessage({
message: '载入成功将在2s后自动重启',
type: 'success'
})
}, 1000)
setTimeout(() => {
$sendElectronChanel('restart')
}, 3000)
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, path) => {
if (path.length) {
let formData = new FormData()
formData.append('path', path[0])
PoiApi.importProjectConfig(formData).then((res) => {
if (res.code === 200) {
setTimeout(() => {
ElMessage({
message: '载入成功将在2s后自动重启',
type: 'success'
})
}, 1000)
setTimeout(() => {
$sendElectronChanel('restart')
}, 3000)
}
})
}
})
}
})
})
.catch(() => {})
}
//工程导入(单机)
@ -455,50 +462,58 @@ const mergeProject = () => {
let importWin = false
const importProject = () => {
if (!importWin) {
importWin = true
let option = {
properties: ['openFile'],
filters: [{ name: '工程包', extensions: ['zip'] }]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => {
if (paths.length > 0) {
// let loadingInstance = this.$openLoading('拼命导入中...')
importWin = false
let arr = getElectronPath().replaceAll('\\', '/').split('/')
console.log(arr, 'arrarr')
arr.pop()
// let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth'
unzip_file(paths[0], arr.join('/'))
.then((res) => {
// loadingInstance.close()
// ElMessage({
// message: '导入成功',
// type: 'success'
// })
setTimeout(() => {
ElMessage({
message: '载入成功将在2s后自动重启',
type: 'success'
ElMessageBox.confirm(`项目已存在,继续导入将覆盖原有内容,是否执行?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
if (!importWin) {
importWin = true
let option = {
properties: ['openFile'],
filters: [{ name: '工程包', extensions: ['zip'] }]
}
$sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => {
if (paths.length > 0) {
// let loadingInstance = this.$openLoading('拼命导入中...')
importWin = false
let arr = getElectronPath().replaceAll('\\', '/').split('/')
console.log(arr, 'arrarr')
arr.pop()
// let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth'
unzip_file(paths[0], arr.join('/'))
.then((res) => {
// loadingInstance.close()
// ElMessage({
// message: '导入成功',
// type: 'success'
// })
setTimeout(() => {
ElMessage({
message: '载入成功将在2s后自动重启',
type: 'success'
})
}, 1000)
setTimeout(() => {
$sendElectronChanel('restart')
}, 3000)
})
}, 1000)
setTimeout(() => {
$sendElectronChanel('restart')
}, 3000)
})
.catch((err) => {
console.log(err)
ElMessage({
message: err,
type: 'warning'
})
})
} else {
importWin = false
.catch((err) => {
console.log(err)
ElMessage({
message: err,
type: 'warning'
})
})
} else {
importWin = false
}
})
}
})
}
.catch(() => {})
}
// import Store from 'electron-store'

View File

@ -234,6 +234,7 @@ const attachUpload = async () => {
deviceApi.uploadSingle(params).then((res) => {
console.log(res, 'res')
ElMessage.success('导入成功')
getTableList()
})
}
})

View File

@ -1,27 +1,38 @@
<template>
<div class="model-management-container">
<div class="equipment_title" style="margin-bottom: 10px">
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择军标库</span>
</el-button>
<div>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择军标库</span>
</el-button>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="createModelDB"
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="createModelDB"
>
<template #icon>
<svg-icon name="addDevice" />
</template>
<span>创建军标库</span>
</el-button>
</div>
<el-input
v-model="photoName"
style="max-width: 150px"
placeholder="请输入图标名称进行搜索"
class="input-with-select"
:suffix-icon="Search"
>
<template #icon>
<svg-icon name="addDevice" />
</template>
<span>创建军标库</span>
</el-button>
</el-input>
</div>
<el-row :gutter="20">
<!-- 左侧分类树 -->
@ -47,6 +58,7 @@
@node-drag-over="handleDragOver"
@node-drag-end="handleDragEnd"
@node-drop="handleDrop"
:filter-node-method="filterNode"
>
<template #default="{ node, data }">
<!-- <span> {{ node.label }}</span> -->
@ -134,6 +146,7 @@
<script lang="ts" setup>
import { ref, reactive, onMounted } from 'vue'
import { Search } from '@element-plus/icons-vue'
import type { TableColumnCtx } from 'element-plus'
import contextMenuCom from './contentMenu.vue'
import Sortable from 'sortablejs'
@ -187,6 +200,18 @@ const treeRef = ref()
// @ts-ignore
var sortableInstance: any = reactive(null)
//搜索
var photoName = ref(null)
watch(photoName, (val) => {
if (treeRef.value && treeRef.value !== '') {
treeRef.value!.filter(val)
}
})
const filterNode: any = (value, data) => {
if (!value) return true
return data.label.includes(value)
}
//--------------添加模型类型----------------
var dialogVisible: any = ref(false)
var dialogTitle: any = ref('添加军标类型')
@ -237,8 +262,8 @@ var expandedKeys: any = ref([])
const getExpandedKeys = () => {
const nodesMap = treeRef.value?.store?.nodesMap || {}
return Object.values(nodesMap)
.filter((node:any) => node.expanded)
.map((node:any) => node.key)
.filter((node: any) => node.expanded)
.map((node: any) => node.key)
}
// 节点展开/折叠时更新状态
@ -302,10 +327,12 @@ const handleFileChange = (e: Event) => {
}
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
let option = {
title: '创建军标库',
filename: 'YJEarth.junbiao',
filters: [{ name: '保存库文件', extensions: ['junbiao'] }]
// filename: 'YJEarth.junbiao',
filename: '军标库_' + date,
filters: [{ name: '保存库文件', extensions: ['MP'] }]
}
$sendElectronChanel('saveFile', option)
$recvElectronChanel('selectedFileItem', (e, path) => {
@ -330,7 +357,7 @@ const importModelDB = () => {
filters: [
{
name: '军标库', //、底图
extensions: ['junbiao']
extensions: ['MP']
}
]
}
@ -676,11 +703,15 @@ const getNamefromPath = (path) => {
}
const handleDelete = (row: any) => {
ElMessageBox.confirm('是否删除数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
ElMessageBox.confirm(
'删除军标将在系统中永久消失,且军标库和添加到场景展示区的数据也将删除,您确定要执行删除操作吗?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('militaryId', row.id)
@ -851,7 +882,13 @@ onMounted(() => {
--el-input-focus-border-color: rgba(var(--color-base1), 0.5) !important;
}
::v-deep .el-input__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important;
/* background-color: rgba(0, 0, 0, 0.5) !important; */
background-color: unset !important;
}
.equipment_title {
display: flex;
justify-content: space-between;
margin: 0px -10px 10px -10px;
}
::v-deep .el-dialog__title {
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow) !important;
@ -872,11 +909,7 @@ onMounted(() => {
--el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important;
background:
linear-gradient(
180deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.2) 100%
),
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
rgba(0, 0, 0, 0.6) !important;
.el-message-box__btns {
.el-button {

View File

@ -160,7 +160,7 @@ var delFun = (row) => {
.then(() => {
// let formData = new FormData()
// formData.append('id', row.id)
MaterialApi.del({ id: row.id }).then((res) => {
MaterialApi.del([row.id]).then((res) => {
if (res.code === 200) {
ElMessage.success('删除成功')
getTableList()

View File

@ -1,27 +1,36 @@
<template>
<div class="model-management-container">
<div class="equipment_title" style="margin-bottom: 10px">
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择模型库</span>
</el-button>
<div class="equipment_title">
<div>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择模型库</span>
</el-button>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="createModelDB"
>
<template #icon>
<svg-icon name="addDevice" />
</template>
<span>创建模型库</span>
</el-button>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="createModelDB"
>
<template #icon>
<svg-icon name="addDevice" />
</template>
<span>创建模型库</span>
</el-button>
</div>
<el-input
v-model="photoName"
style="max-width: 150px"
placeholder="请输入模型名称进行搜索"
class="input-with-select"
:suffix-icon="Search"
/>
</div>
<el-row :gutter="20">
<!-- 左侧分类树 -->
@ -47,6 +56,7 @@
@node-drag-over="handleDragOver"
@node-drag-end="handleDragEnd"
@node-drop="handleDrop"
:filter-node-method="filterNode"
>
<template #default="{ node, data }">
<!-- <span> {{ node.label }}</span> -->
@ -142,6 +152,7 @@
<script lang="ts" setup>
import { ref, reactive, onMounted, nextTick } from 'vue'
import { Search } from '@element-plus/icons-vue'
import type { TableColumnCtx } from 'element-plus'
import contextMenuCom from './contentMenu.vue'
import Sortable from 'sortablejs'
@ -207,6 +218,19 @@ const closeDialog = () => {
modelType.value = ''
dialogVisible.value = false
}
//搜索
var photoName = ref(null)
watch(photoName, (val) => {
if (treeRef.value && treeRef.value !== '') {
treeRef.value!.filter(val)
}
})
const filterNode: any = (value, data) => {
if (!value) return true
return data.label.includes(value)
}
//@ts-ignore
const addType = () => {
if (!modelType.value) {
@ -256,8 +280,8 @@ var expandedKeys: any = ref([])
const getExpandedKeys = () => {
const nodesMap = treeRef.value?.store?.nodesMap || {}
return Object.values(nodesMap)
.filter((node:any) => node.expanded)
.map((node:any) => node.key)
.filter((node: any) => node.expanded)
.map((node: any) => node.key)
}
// 节点展开/折叠时更新状态
@ -327,15 +351,20 @@ const handleFileChange = (e: Event) => {
// 此处可添加文件验证或预处理逻辑
}
}
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
console.log(date, 'datedatedatedate')
let option = {
title: '创建模型库',
filename: 'YJEarth.model',
filters: [{ name: '保存库文件', extensions: ['model'] }]
// filename: 'YJEarth.model',
filename: '模型库_' + date,
filters: [{ name: '保存库文件', extensions: ['ML'] }]
}
$sendElectronChanel('saveFile', option)
$recvElectronChanel('selectedFileItem', (e, path) => {
console.log(path, 'klklkllllk')
if (path) {
let index = path.lastIndexOf('/')
let model_lib_path = path.slice(0, index)
@ -357,7 +386,7 @@ const importModelDB = () => {
filters: [
{
name: '模型库', //、底图
extensions: ['model']
extensions: ['ML']
}
]
}
@ -705,11 +734,15 @@ const getNamefromPath = (path) => {
}
const handleDelete = (row: ModelItem) => {
ElMessageBox.confirm('是否删除数据?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
ElMessageBox.confirm(
'删除模型将在系统中永久消失,且模型库和添加到场景展示区的数据也将删除,您确定要执行删除操作吗?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('modelId', row.id)
@ -881,7 +914,8 @@ onMounted(() => {
--el-input-focus-border-color: rgba(var(--color-base1), 0.5) !important;
}
::v-deep .el-input__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important;
/* background-color: rgba(0, 0, 0, 0.5) !important; */
background-color: unset !important;
}
::v-deep .el-dialog__title {
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow) !important;
@ -896,4 +930,9 @@ onMounted(() => {
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
letter-spacing: 1px;
}
.equipment_title {
display: flex;
justify-content: space-between;
margin: 0px -10px 10px -10px;
}
</style>

View File

@ -24,7 +24,14 @@
<span>创建图标库</span>
</el-button>
</div>
<el-input
v-model="photoName"
style="max-width: 150px"
placeholder="请输入图标名称进行搜索"
class="input-with-select"
:suffix-icon="Search"
>
</el-input>
<!-- <div class="typeBut">
<span
v-for="(item, index) in butList"
@ -59,6 +66,7 @@
@node-drag-over="handleDragOver"
@node-drag-end="handleDragEnd"
@node-drop="handleDrop"
:filter-node-method="filterNode"
>
<template #default="{ node, data }">
<!-- <span> {{ node.label }}</span> -->
@ -175,6 +183,7 @@
</template>
<script lang="ts" setup>
import { Search } from '@element-plus/icons-vue'
import { ref, reactive, onMounted, nextTick } from 'vue'
import type { TableColumnCtx } from 'element-plus'
import contextMenuCom from './contentMenu.vue'
@ -239,8 +248,20 @@ var expandedKeys: any = ref([])
const getExpandedKeys = () => {
const nodesMap = treeRef.value?.store?.nodesMap || {}
return Object.values(nodesMap)
.filter((node:any) => node.expanded)
.map((node:any) => node.key)
.filter((node: any) => node.expanded)
.map((node: any) => node.key)
}
var photoName = ref(null)
watch(photoName, (val) => {
if (treeRef.value && treeRef.value !== '') {
treeRef.value!.filter(val)
}
})
const filterNode: any = (value, data) => {
if (!value) return true
return data.label.includes(value)
}
// 节点展开/折叠时更新状态
@ -387,10 +408,12 @@ const handleFileChange = (e: Event) => {
}
//创建模型库
const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0]
let option = {
title: '创建图标库',
filename: 'YJEarth.tubiao',
filters: [{ name: '保存库文件', extensions: ['tubiao'] }]
// filename: 'YJEarth.tubiao',
filename: '图标库_' + date,
filters: [{ name: '保存库文件', extensions: ['TL'] }]
}
$sendElectronChanel('saveFile', option)
$recvElectronChanel('selectedFileItem', (e, path) => {
@ -415,7 +438,7 @@ const importModelDB = () => {
filters: [
{
name: '图标库', //、底图
extensions: ['tubiao']
extensions: ['TL']
}
]
}
@ -781,11 +804,15 @@ const getNamefromPath = (path) => {
}
const handleDelete = (row: any) => {
ElMessageBox.confirm('是否删除数据?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
ElMessageBox.confirm(
'删除图标将在系统中永久消失,且图标库和添加到场景展示区的数据也将删除,您确定要执行删除操作吗?',
'警告',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
let formData = new FormData()
formData.append('iconId', row.id)
@ -986,7 +1013,8 @@ onMounted(() => {
--el-input-focus-border-color: rgba(var(--color-base1), 0.5) !important;
}
::v-deep .el-input__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important;
/* background-color: rgba(0, 0, 0, 0.5) !important; */
background-color: unset !important;
}
::v-deep .el-dialog__title {
text-shadow: 0px 0px 9px var(--color-sdk-text-shadow) !important;
@ -1028,6 +1056,7 @@ onMounted(() => {
.equipment_title {
display: flex;
justify-content: space-between;
margin: 0px -10px 10px -10px;
}
::v-deep .typeList {
width: 100%;

View File

@ -36,6 +36,7 @@
</template>
<script setup lang="ts">
//@ts-nocheck
import { useI18n } from 'vue-i18n'
import setTool from './components/setTool/setTool.vue'
import weather from './components/weather/index.vue'

View File

@ -1,48 +1,103 @@
<template>
<div class="leftSideSecond">
<svg class="leftSideSecond_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="244" height="310.1533203125" viewBox="0 0 244 310.1533203125" fill="none" preserveAspectRatio="none">
<svg
class="leftSideSecond_bg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="244"
height="310.1533203125"
viewBox="0 0 244 310.1533203125"
fill="none"
preserveAspectRatio="none"
>
<foreignObject x="-5" y="-4.8466796875" width="254" height="320">
<div xmlns="http://www.w3.org/1999/xhtml"
style="backdrop-filter:blur(5px);clip-path:url(#bgblur_244_310_10_clip_path);height:100%;width:100%"></div>
<div
xmlns="http://www.w3.org/1999/xhtml"
style="
backdrop-filter: blur(5px);
clip-path: url(#bgblur_244_310_10_clip_path);
height: 100%;
width: 100%;
"
></div>
</foreignObject>
<path fill="#000000" fill-opacity="0.5"
d="M232.01 310.153L244 297.278L244 0.15332L0 0.15332L0 310.153L232.01 310.153Z" />
<path fill="url(#linear_fill_730_213_1)"
d="M232.01 310.153L244 297.278L244 0.15332L0 0.15332L0 310.153L232.01 310.153Z" />
<path
fill="#000000"
fill-opacity="0.5"
d="M232.01 310.153L244 297.278L244 0.15332L0 0.15332L0 310.153L232.01 310.153Z"
/>
<path
fill="url(#linear_fill_730_213_1)"
d="M232.01 310.153L244 297.278L244 0.15332L0 0.15332L0 310.153L232.01 310.153Z"
/>
<foreignObject x="-5" y="-5" width="32" height="32">
<div xmlns="http://www.w3.org/1999/xhtml"
style="backdrop-filter:blur(5px);clip-path:url(#bgblur_22_22_10_clip_path);height:100%;width:100%"></div>
<div
xmlns="http://www.w3.org/1999/xhtml"
style="
backdrop-filter: blur(5px);
clip-path: url(#bgblur_22_22_10_clip_path);
height: 100%;
width: 100%;
"
></div>
</foreignObject>
<foreignObject x="202" y="271.1533203125" width="47" height="43.99951171875">
<div xmlns="http://www.w3.org/1999/xhtml"
style="backdrop-filter:blur(5px);clip-path:url(#bgblur_37_33.99951171875_10_clip_path);height:100%;width:100%">
</div>
<div
xmlns="http://www.w3.org/1999/xhtml"
style="
backdrop-filter: blur(5px);
clip-path: url(#bgblur_37_33.99951171875_10_clip_path);
height: 100%;
width: 100%;
"
></div>
</foreignObject>
<path fill-rule="evenodd" fill="url(#linear_border_2035_2214_0)"
d="M232.01 310.153L0 310.153L0 0.15332L244 0.15332L244 297.278L232.01 310.153ZM242.5 296.688L242.5 1.65332L1.5 1.65332L1.5 308.653L231.357 308.653L242.5 296.688Z" />
<path
fill-rule="evenodd"
fill="url(#linear_border_2035_2214_0)"
d="M232.01 310.153L0 310.153L0 0.15332L244 0.15332L244 297.278L232.01 310.153ZM242.5 296.688L242.5 1.65332L1.5 1.65332L1.5 308.653L231.357 308.653L242.5 296.688Z"
/>
<path d="M0 0L0 22L22 0L0 0Z" fill="rgb(var(--color-base1))" fill-opacity="0.2" />
<defs>
<clipPath id="bgblur_22_22_10_clip_path" transform="translate(5 5)">
<path d="M0 0L0 22L22 0L0 0Z" />
</clipPath>
</defs>
<path d="M244 276.153L244 297.304L232 310.153L207 310.153L244 276.153Z" fill="rgb(var(--color-base1))"
fill-opacity="0.2" />
<path
d="M244 276.153L244 297.304L232 310.153L207 310.153L244 276.153Z"
fill="rgb(var(--color-base1))"
fill-opacity="0.2"
/>
<defs>
<clipPath id="bgblur_37_33.99951171875_10_clip_path" transform="translate(-202 -271.1533203125)">
<clipPath
id="bgblur_37_33.99951171875_10_clip_path"
transform="translate(-202 -271.1533203125)"
>
<path d="M244 276.153L244 297.304L232 310.153L207 310.153L244 276.153Z" />
</clipPath>
</defs>
<path d="M12 3L3 3L3 12L12 3Z" stroke="rgba(var(--color-base2), 1)" stroke-width="1" />
<defs>
<linearGradient id="linear_fill_730_213_1" x1="127.20458984375" y1="310.1533203125" x2="127.203857421875"
y2="0.1533203125" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_fill_730_213_1"
x1="127.20458984375"
y1="310.1533203125"
x2="127.203857421875"
y2="0.1533203125"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.3" />
<stop offset="1" stop-color="rgb(var(--color-base2))" stop-opacity="0" />
</linearGradient>
<linearGradient xmlns="http://www.w3.org/2000/svg" id="linear_border_2035_2214_0" x1="0" y1="-10.0346360206604"
x2="211.1868896484375" y2="231.8046417236328" gradientUnits="userSpaceOnUse">
<linearGradient
xmlns="http://www.w3.org/2000/svg"
id="linear_border_2035_2214_0"
x1="0"
y1="-10.0346360206604"
x2="211.1868896484375"
y2="231.8046417236328"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
@ -55,8 +110,8 @@
style="color: rgb(255, 0, 0)" alt="" /> -->
<svg-icon :name="value" :size="20" color="rgba(var(--color-base2), 1)"></svg-icon>
<span :style="{ color: !clickChange[value] ? 'var(--color-text)' : 'rgb(255,0,0)' }">{{
t(`${obj.key}.${value}`)
}}</span>
t(`${obj.key}.${value}`)
}}</span>
</div>
</template>
</div>
@ -128,6 +183,9 @@ const handleKeyDown = (e) => {
clickChange.mouseLocation = false
new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
// window.removeEventListener('keydown', handleKeyDown)
let dom = document.getElementById('earthContainer')
dom?.classList.remove('custom-cursor')
dom?.classList.add('default-cursor')
}
//视频录制
@ -619,7 +677,20 @@ const methodMap = {
//鼠标定位
mouseLocation() {
clickChange.mouseLocation = !clickChange.mouseLocation
new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
let dom = document.getElementById('earthContainer')
if (clickChange.mouseLocation) {
ElMessage({
message: '按下键盘ESC键可快速退出',
type: 'warning'
})
dom?.classList.remove('default-cursor')
dom?.classList.add('custom-cursor')
} else {
dom?.classList.remove('custom-cursor')
dom?.classList.add('default-cursor')
}
// if (clickChange.mouseLocation) {
// window.addEventListener('keydown', handleKeyDown)
@ -653,7 +724,7 @@ const methodMap = {
filters: [{ name: '保存图片', extensions: ['jpg'] }]
})
$recvElectronChanel('selectedFileItem', (e, path) => {
fs.writeFile(path, dataBuffer, (res) => { })
fs.writeFile(path, dataBuffer, (res) => {})
})
}
@ -787,11 +858,11 @@ const methodMap = {
TreeApi.addOtherSource(paramsData)
paramsData.isShow = true
paramsData.params = JSON.stringify(paramsData.params)
; (window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData)
; (window as any).pressModelEntities.set(id, flat)
;(window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData)
;(window as any).pressModelEntities.set(id, flat)
cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
// //鼠标右键点击事件
flat.onRightClick = () => { }
flat.onRightClick = () => {}
// _entityMap.set(node.source_id, flat)
} else {
// this.$message.warning('至少三个点')
@ -922,7 +993,7 @@ const methodMap = {
DbOption.params = JSON.stringify(DbOption.params)
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
let entityObject = renderVector(DbOption, true)
; (window as any)._entityMap.set(id, entityObject)
;(window as any)._entityMap.set(id, entityObject)
// }
// })
}
@ -961,6 +1032,52 @@ defineExpose({
initList
})
</script>
<style>
@keyframes rotate-bg {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.custom-cursor {
cursor:
url('@/assets/img/mouse.png') 16 16,
auto;
}
.default-cursor {
cursor: default;
}
/* .el-loading-parent--relative {
position: unset !important;
} */
.timer .el-loading-spinner .el-loading-text {
width: 166px !important;
height: 166px !important;
position: relative;
background: unset !important;
z-index: 2;
/* background: url('@/assets/img/timerBg.png') !important;
animation: rotate-bg 5s infinite linear; */
/* 旋转动画 */
/* animation: rotateBackground 10s linear infinite; */
}
.timer .el-loading-spinner .el-loading-text::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('@/assets/img/timerBg.png');
background-size: cover;
background-position: center;
animation: rotate-bg 10s linear infinite;
z-index: -1;
}
</style>
<style lang="scss" scoped>
.leftSideSecond {
display: none;
@ -970,7 +1087,7 @@ defineExpose({
// background-size: 100% 100%;
padding: 13px 6px 13px 6px;
>.leftSideSecond_bg {
> .leftSideSecond_bg {
width: 100%;
height: 100%;
position: absolute;

View File

@ -45,7 +45,7 @@
@change="precisionChange"
/>
<span class="arrow"></span> -->
<el-slider
<!-- <el-slider
v-model="precision"
:min="0"
:max="360"
@ -53,14 +53,51 @@
@change="precisionInput"
/>
<span class="firstTip">0</span>
<span class="endTip">360</span>
<span class="endTip">360</span> -->
</div>
</div>
<div class="row">
<div class="col">
<el-slider
v-model="precision"
:min="0"
:max="maxNum"
placement="bottom"
@change="precisionInput"
:show-tooltip="false"
popper-class="custom-tooltip"
@input="updateDataAttr"
/>
<!-- <span class="firstTip">0</span>
<span class="endTip">360</span> -->
<div class="input-number input-number-unit" style="margin-left: 10px">
<input
class="input"
id="precision"
type="number"
title=""
min="1"
max="360"
v-model="maxNum"
@input="precisionMaxInput"
/>
<span class="arrow"></span>
</div>
</div>
</div>
<div class="row" style="margin-top: 30px">
<div class="col">
<span class="label">绘制区域</span>
<button class="draw-btn" @click="draw">
<svg class="icon-draw"><use xlink:href="#yj-icon-draw"></use></svg>开始绘制
</button>
</div>
</div>
</div>
</template>
<template #footer>
<!-- <template #footer>
<button @click="draw">绘制</button>
</template>
</template> -->
</Dialog>
</template>
@ -72,7 +109,7 @@ import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
const viewPointHeight: any = ref(1.8)
const precision: any = ref(20)
const precision: any = ref(0)
var visibility: any = reactive([])
eventBus.on('circleViewShedDialog', () => {
@ -88,10 +125,12 @@ const open = () => {
viewPointHeight: viewPointHeight.value,
precision: precision.value
})
updateDataAttr()
}
const closeCallBack = (e) => {
viewPointHeight.value = 1.8
precision.value = 20
precision.value = 0
maxNum.value = 100
YJ.Measure.SetMeasureStatus(false)
}
onBeforeUnmount(() => {
@ -116,21 +155,55 @@ const precisionInput = () => {
// } else if (precision.value > dom.max * 1) {
// precision.value = dom.max * 1
// }
console.log(precision, 'eeeeee')
visibility.precisions = precision.value
}
const precisionChange = () => {
console.log(precision, 'yyyy')
}
const precisionChange = () => {}
const draw = (e) => {
visibility.draw()
// visibility.create(this)
// !window.analysisArr && (window.analysisArr = [])
// window.analysisArr.push(visibility)
}
//滑块
var maxNum: any = ref(100)
const updateDataAttr = async () => {
await nextTick()
const sliderButton = document.querySelector('.el-slider__button-wrapper')
if (sliderButton) {
sliderButton.setAttribute('data-value', precision.value.toString())
}
}
const precisionMaxInput = () => {
let dom: any = document.getElementById('precision')
if (maxNum.value < dom.min * 1) {
maxNum.value = dom.min * 1
} else if (maxNum.value > dom.max * 1) {
maxNum.value = dom.max * 1
}
// cutFill.heights = maxNum.value
}
defineExpose({
open
})
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
::v-deep .el-slider__button-wrapper::before {
content: attr(data-value);
position: absolute;
width: 30px;
height: 25px;
line-height: 25px;
border-radius: 4px;
text-align: center;
bottom: -15px;
left: 50%;
transform: translateX(-50%);
background: unset;
color: white;
font-size: 12px;
z-index: 10;
}
</style>

View File

@ -9,7 +9,76 @@
:closeCallback="closeCallBack"
>
<template #content>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
<span class="label" style="flex: unset">{{ t('systemSetting.coordinateSystem') }}</span>
<el-select style="width: 175px" v-model="coordinate" @change="sysChange">
<div
class="group-header"
:class="isHotGroupOpen ? 'arrowActive' : ''"
@click="toggleGroup('hot')"
>
地理坐标系
<svg-icon
v-if="isHotGroupOpen"
name="arrow2"
:size="10"
color="rgba(0, 255, 255, 1)"
style="margin-left: 10px"
></svg-icon>
<svg-icon
v-else
name="arrow1"
:size="10"
color="rgba(255, 255, 255, 1)"
style="margin-left: 10px"
></svg-icon>
</div>
<div v-show="isHotGroupOpen">
<el-option
v-for="item in name_map1"
:key="item.epsg"
:label="item.name"
:value="item.epsg"
></el-option>
</div>
<div
class="group-header"
:class="isHotGroupOpen2 ? 'arrowActive' : ''"
@click="toggleGroup('ty')"
>
投影坐标系
<svg-icon
v-if="isHotGroupOpen2"
name="arrow2"
:size="10"
color="rgba(0, 255, 255, 1)"
style="margin-left: 10px"
></svg-icon>
<svg-icon
v-else
name="arrow1"
:size="10"
color="rgba(255, 255, 255, 1)"
style="margin-left: 10px"
></svg-icon>
</div>
<div v-show="isHotGroupOpen2">
<el-option
v-for="item in name_map2"
:key="item.epsg"
:label="item.name"
:value="item.epsg"
></el-option>
</div>
</el-select>
</div>
<div class="col"></div>
</div>
</div>
<el-tabs v-if="showPosiType" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="小数格式" name="first">
<span class="custom-divider"></span>
<div class="div-item">
@ -45,6 +114,7 @@
<div class="col"></div>
</div>
</div>
<span class="custom-divider"></span>
</el-tab-pane>
<el-tab-pane label="度分格式" name="second">
<span class="custom-divider"></span>
@ -77,6 +147,7 @@
<div class="col"></div>
</div>
</div>
<span class="custom-divider"></span>
</el-tab-pane>
<el-tab-pane label="度分秒格式" name="third">
<span class="custom-divider"></span>
@ -113,8 +184,46 @@
<div class="col"></div>
</div>
</div>
<span class="custom-divider"></span>
</el-tab-pane>
</el-tabs>
<div v-if="!showPosiType" class="other">
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col" style="flex: 0 0 58%">
<span class="label">X</span>
<input
class="input"
type="number"
placeholder="请输入坐标点X数值"
v-model="longitude"
/>
</div>
<div class="col"></div>
</div>
<div class="row">
<div class="col" style="flex: 0 0 58%">
<span class="label">Y</span>
<input
class="input"
type="number"
placeholder="请输入坐标点Y数值"
v-model="latitude"
/>
</div>
<div class="col"></div>
</div>
<div class="row">
<div class="col">
<span class="label">定位</span>
<button @click="flyto"><svg-icon name="location" :size="12" />跳转</button>
</div>
<div class="col"></div>
</div>
</div>
<span class="custom-divider"></span>
</div>
</template>
<template #footer>
<button @click="draw">保存</button>
@ -126,9 +235,18 @@
<script setup lang="ts">
import { ref, onBeforeUnmount } from 'vue'
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import Dialog from '@/components/dialog/baseDialog.vue'
import { addMapSource } from '../../../common/addMapSource'
import { initMapData } from '@/common/initMapData'
import { sysChange as utilsSysChange } from '@/utils/sysChange'
const { ipcRenderer } = require('electron')
const availablePort = ref(55110)
ipcRenderer.invoke('get-available-port').then((port) => {
availablePort.value = port
})
const { t } = useI18n()
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@ -145,6 +263,58 @@ var lngSec = ref(null)
var latSec = ref(null)
var id = ref(null)
var coordinate: any = ref('EPSG:4326')
var isHotGroupOpen: any = ref(true)
var isHotGroupOpen2: any = ref(false)
var showPosiType: any = ref(true)
var name_map1: any = ref([])
var name_map2: any = ref([
{
epsg: 'EPSG:32601',
name: 'WGS84 通用横轴墨卡托投影'
},
{
epsg: 'EPSG:4534',
name: '2000 坐标 3 度不带代号'
},
{
epsg: 'EPSG:4513',
name: '2000 坐标 3 度带代号'
},
{
epsg: 'EPSG:4502',
name: '2000 坐标 6 度不带代号'
},
{
epsg: 'EPSG:4491',
name: '2000 坐标 6 度带代号'
}
])
//系统坐标系
let tool = new YJ.Tools(window.earth)
let mapData = Array.from(tool.name_map.values())
name_map1.value = mapData.splice(0, 2)
const sysChange = async () => {
//系统
if (coordinate.value) {
let data = name_map1.value.filter((item) => item.epsg === coordinate.value)
showPosiType.value = data.length
}
longitude.value = null
latitude.value = null
lngMin.value = null
latMin.value = null
lngSec.value = null
latSec.value = null
}
const toggleGroup = (type: string) => {
if (type === 'hot') isHotGroupOpen.value = !isHotGroupOpen.value
if (type === 'ty') isHotGroupOpen2.value = !isHotGroupOpen2.value
}
eventBus.on('coorLocationDialog', () => {
id.value = new YJ.Tools().randomString()
baseDialog.value?.open()
@ -171,6 +341,11 @@ const closeCallBack = (e) => {
lngSec.value = null
latSec.value = null
activeName.value = 'first'
coordinate.value = 'EPSG:4326'
isHotGroupOpen.value = true
isHotGroupOpen2.value = false
showPosiType.value = true
}
onBeforeUnmount(() => {
closeCallBack('')
@ -236,87 +411,103 @@ const turnToPosition = async () => {
}
return position
}
const getPosition = async () => {
if (showPosiType.value) {
pointPosi = await turnToPosition()
} else {
let posi
switch (coordinate.value) {
case 'EPSG:32601':
posi = new YJ.Tools().mercatorToWGS84(longitude.value, latitude.value)
break
case 'EPSG:4534':
posi = new YJ.Tools().convertCGCStoWGS84(longitude.value, latitude.value, 120)
break
case 'EPSG:4513':
posi = new YJ.Tools().convertCGCSToWGS84WithZone(longitude.value, latitude.value)
break
case 'EPSG:4502':
posi = new YJ.Tools().convertCGCS2000_6ToWGS84(longitude.value, latitude.value, 120)
break
case 'EPSG:4491':
posi = new YJ.Tools().convertCGCS2000_6ToWGS84WithZone(longitude.value, latitude.value)
break
default:
break
}
pointPosi = {
lng: posi[0],
lat: posi[1],
alt: 0
}
}
}
const flyto = async (e) => {
let position = await turnToPosition()
await getPosition()
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
ElMessage({
message: '请正确填写坐标信息!',
type: 'warning'
})
return
}
new YJ.Global.flyTo(window.earth, {
position: { lng: position.lng, lat: position.lat, alt: position.alt + 100 }
position: { lng: pointPosi.lng, lat: pointPosi.lat, alt: pointPosi.alt + 100 }
})
let name = '点标注'
let params = {
type: 'point',
id: id.value,
sourceName: name,
opt: {
id: id.value,
name: name,
position: position
position: pointPosi,
name: name,
billboard: {
show: true,
image:
YJ.Global.getBillboardDefaultUrl() ||
'http://localhost:' + availablePort.value + '/' + 'GEMarker1/A-ablu-blank.png'
}
}
if (!window.earth.entityMap.get(id.value)) {
await initMapData('point', params, null)
if (window.earth.entityMap.get(id.value)) {
window.earth.entityMap.get(id.value).remove()
}
// switch (activeName.value) {
// case 'first':
// new YJ.Global.flyTo(window.earth, {
// position: { lng: longitude.value, lat: latitude.value, alt: 100 }
// })
// break
// case 'second':
// // @ts-ignore (define in dts)
// var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
// // @ts-ignore (define in dts)
// var lat = Math.abs(latitude.value) + Math.abs(latMin.value) / 60
// // @ts-ignore (define in dts)
// lng = longitude.value < 0 ? -lng : lng
// // @ts-ignore (define in dts)
// lat = latitude.value < 0 ? -lat : lat
// var position = { lng, lat, alt: 100 }
// new YJ.Global.flyTo(window.earth, {
// position: position
// })
// break
// case 'third':
// var lng =
// // @ts-ignore (define in dts)
// Math.abs(longitude.value) + Math.abs(lngMin.value) / 60 + Math.abs(lngSec.value) / 3600
// var lat =
// // @ts-ignore (define in dts)
// Math.abs(latitude.value) + Math.abs(latMin.value) / 60 + Math.abs(latSec.value) / 3600
// // @ts-ignore (define in dts)
// lng = longitude.value < 0 ? -lng : lng
// // @ts-ignore (define in dts)
// lat = latitude.value < 0 ? -lat : lat
// var position = { lng, lat, alt: 100 }
// new YJ.Global.flyTo(window.earth, {
// position: position
// })
// break
// }
await initMapData('point', params, null)
}
var pointPosi:any = {}
const draw = async (e) => {
let position = await turnToPosition()
if (!position) {
return
if (!pointPosi.lng) {
await getPosition()
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
ElMessage({
message: '请正确填写坐标信息!',
type: 'error'
})
return
}
}
let name = '点标注'
await addMapSource({
addMapSource({
type: 'point',
id: id.value,
sourceName: name,
opt: {
id: id.value,
name: name,
position: position
position: pointPosi,
billboard: {
show: true,
image:
YJ.Global.getBillboardDefaultUrl() ||
'http://localhost:' + availablePort.value + '/' + 'GEMarker1/A-ablu-blank.png'
}
}
})
baseDialog.value?.close()
}
const close = (e) => {
window.earth.entityMap.get(id.value)?.remove()
baseDialog.value?.close()
}
defineExpose({

View File

@ -12,18 +12,18 @@
<div class="div-item">
<div class="row">
<div class="col">
<span class="label" style="flex: 0 0 70px">绘制分析区域</span>
<span class="label" style="flex: 0 0 70px">土方分析区域</span>
<button class="draw-btn" @click="draw">
<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>开始绘制
<svg class="icon-edit"><use xlink:href="#yj-icon-draw"></use></svg>开始绘制
</button>
</div>
</div>
</div>
<span class="custom-divider"></span>
<!-- <span class="custom-divider"></span> -->
<div class="div-item">
<div class="row">
<div class="col">
<span class="label">基准高度</span>
<span class="label">高度</span>
<div class="input-number input-number-unit-1">
<input
class="input"
@ -54,13 +54,34 @@
/>
<span class="arrow"></span>
</div> -->
<el-slider v-model="precision" :min="0" :max="360" @change="precisionInput" />
<span class="firstTip">0</span>
<span class="endTip">360</span>
<el-slider
v-model="precision"
:min="0"
:max="maxNum"
@change="precisionInput"
:show-tooltip="false"
popper-class="custom-tooltip"
@input="updateDataAttr"
/>
<!-- <span class="firstTip">0</span>
<span class="endTip">360</span> -->
<div class="input-number input-number-unit" style="margin-left: 10px">
<input
class="input"
id="precision"
type="number"
title=""
min="1"
max="1250"
v-model="maxNum"
@input="precisionMaxInput"
/>
<span class="arrow"></span>
</div>
</div>
</div>
</div>
<span class="custom-divider"></span>
<span class="custom-divider" style="margin-top: 10px"></span>
<div class="div-item">
<div class="row">
<div class="col">
@ -126,6 +147,17 @@ var cutVolume: any = ref(0)
var cutFill: any = reactive([])
var maxNum: any = ref(1250)
//tooltip
const updateDataAttr = async () => {
await nextTick()
const sliderButton = document.querySelector('.el-slider__button-wrapper')
if (sliderButton) {
sliderButton.setAttribute('data-value', precision.value.toString())
}
}
eventBus.on('cutFillDialog', () => {
baseDialog.value?.open()
cutFill = new YJ.Analysis.CutFillAnalysis(window.earth, {
@ -139,6 +171,7 @@ const open = () => {
height: height.value,
precision: precision.value
})
updateDataAttr() //解决默认打开时没有值
}
const heightInput = () => {
let dom: any = document.getElementById('height')
@ -149,6 +182,15 @@ const heightInput = () => {
}
cutFill.heights = height.value
}
const precisionMaxInput = () => {
let dom: any = document.getElementById('precision')
if (maxNum.value < dom.min * 1) {
maxNum.value = dom.min * 1
} else if (maxNum.value > dom.max * 1) {
maxNum.value = dom.max * 1
}
// cutFill.heights = height.value
}
const precisionInput = () => {
// let dom = document.getElementById('precision')
// if (precision.value < dom.min * 1) {
@ -196,4 +238,24 @@ defineExpose({
})
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
::v-deep .content {
width: 600px !important;
}
::v-deep .el-slider__button-wrapper::before {
content: attr(data-value);
position: absolute;
width: 30px;
height: 25px;
line-height: 25px;
border-radius: 4px;
text-align: center;
bottom: -15px;
left: 50%;
transform: translateX(-50%);
background: unset;
color: white;
font-size: 12px;
z-index: 10;
}
</style>

View File

@ -62,12 +62,12 @@ const shpTotalDict: any = reactive(
//获取物资类型
const getResource = () => {
let formData:any = new FormData()
let formData: any = new FormData()
formData.append('pageNum', 1)
formData.append('pageSize', 10000)
formData.append('name', '')
MaterialApi.getList(formData).then((res) => {
shpTotalDict.value = res.data.data.map((item) => {
shpTotalDict.value = res.data.records.map((item) => {
return item.name
})
})

View File

@ -97,7 +97,8 @@ function initEcharts(points) {
tooltip: {
trigger: 'axis',
textStyle: {
align: 'left'
align: 'left',
color: '#fff'
},
formatter(params) {
const xy: any = coords[params[0].dataIndex]
@ -115,6 +116,17 @@ function initEcharts(points) {
'' +
xy[1].toFixed(5)
)
},
color: '#fff',
borderWidth: 1,
borderColor: 'rgba(0,255,255,0.5)',
backgroundColor: 'rgba(0, 255, 255, 0.05)',
axisPointer: {
lineStyle: {
type: 'solid',
width: 3,
color: 'rgba(0,255,255,0.3)'
}
}
},
grid: {
@ -132,10 +144,9 @@ function initEcharts(points) {
axisLabel: {
color: '#ffffff'
},
axisLine: {
lineStyle: {
color: '#ffffff'
}
axisLine: { lineStyle: { color: 'rgba(31, 198, 255, 0.32)', width: 3, type: 'solid' } },
splitLine: {
show: false
}
}
],
@ -146,11 +157,16 @@ function initEcharts(points) {
axisLabel: {
color: '#ffffff'
},
axisLine: {
lineStyle: {
color: '#ffffff'
}
axisLine: { show: false },
splitLine: {
show: true,
lineStyle: { type: 'dashed', color: 'rgba(0,255,255,0.3)' }
}
// axisLine: {
// lineStyle: {
// color: '#ffffff'
// }
// }
}
],
series: [
@ -161,7 +177,7 @@ function initEcharts(points) {
smooth: true,
itemStyle: {
normal: {
color: '#39FDA1'
color: 'rgb(0, 255, 255)'
}
},
lineStyle: {
@ -176,15 +192,13 @@ function initEcharts(points) {
colorStops: [
{
offset: 0,
color: 'rgba(85,254,139,1)' // 0% 处的颜色
},
{
offset: 0.5,
color: 'rgba(7,252,202,1)' // 100% 处的颜色
// color: 'rgba(85,254,139,1)' // 0% 处的颜色
color: 'rgba(31, 198, 255,0.2)' // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(14,245,210,1)' // 100% 处的颜色
// color: 'rgba(14,245,210,1)' // 100% 处的颜色
color: 'rgba(0, 255, 255,1)' // 0% 处的颜色
}
],
globalCoord: false // 缺省为 false
@ -213,9 +227,9 @@ function initEcharts(points) {
}
],
false
),
shadowColor: 'rgba(14,245,210,1)', //阴影颜色
shadowBlur: 20
)
// shadowColor: 'rgba(14,245,210,1)' //阴影颜色
// shadowBlur: 20
}
},
markPoint: {
@ -344,9 +358,9 @@ function initEcharts(points) {
}
],
false
),
shadowColor: 'rgba(14,245,210,1)', //阴影颜色
shadowBlur: 20
)
// shadowColor: 'rgba(14,245,210,1)' //阴影颜色
// shadowBlur: 20
}
},
markPoint: {

View File

@ -12,38 +12,10 @@
<div class="div-item">
<div class="row">
<div class="col">
<span class="label">最低水位</span>
<div class="input-number input-number-unit-3">
<input
class="input"
id="minWaterLevel"
type="number"
title=""
min="0"
max="9999999"
v-model="minWaterLevel"
@input="minWaterLevelInput"
/>
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">最高水位</span>
<div class="input-number input-number-unit-3">
<input
class="input"
id="maxWaterLevel"
type="number"
title=""
min="0"
max="9999999"
v-model="maxWaterLevel"
@input="maxWaterLevelInput"
/>
<span class="unit">m</span>
<span class="arrow"></span>
</div>
<span class="label">绘制区域</span>
<button class="draw" @click="draw">
<svg class="icon-draw"><use xlink:href="#yj-icon-draw"></use></svg>绘制范围
</button>
</div>
</div>
<div class="row">
@ -66,7 +38,7 @@
</div>
</div>
<div class="col">
<span class="label">水量</span>
<span class="label">水量体积</span>
<div class="input-number input-number-unit-3">
<input
class="input"
@ -84,8 +56,44 @@
</div>
</div>
</div>
<div class="row">
<div class="col">
<span class="label">最高水位</span>
<div class="input-number input-number-unit-3">
<input
class="input"
id="maxWaterLevel"
type="number"
title=""
min="0"
max="9999999"
v-model="maxWaterLevel"
@input="maxWaterLevelInput"
/>
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">最低水位</span>
<div class="input-number input-number-unit-3">
<input
class="input"
id="minWaterLevel"
type="number"
title=""
min="0"
max="9999999"
v-model="minWaterLevel"
@input="minWaterLevelInput"
/>
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div>
</div>
</div>
<span class="custom-divider"></span>
<!-- <span class="custom-divider"></span> -->
<div class="div-item">
<div class="row subtitle-box">
<span class="subtitle">上升速度</span>
@ -123,7 +131,7 @@
</div>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<!-- <div class="row">
<div class="col operate-btn-box">
<button class="draw" @click="draw">
<svg class="icon-draw"><use xlink:href="#yj-icon-draw"></use></svg>绘制范围
@ -146,7 +154,7 @@
<svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放
</button>
</div>
</div>
</div>-->
</div>
<div class="table">
@ -174,6 +182,22 @@
<span class="custom-divider" style="margin-top: 20px"></span>
</template>
<template #footer>
<div style="position: absolute; left: 24px; display: flex">
<button class="flyto" @click="flyTo">
<svg class="icon-positions">
<use xlink:href="#yj-icon-positions"></use></svg
>定位
</button>
<button class="analog" style="margin-left: 10px" @click="pause">
<svg class="icon-play" v-if="!isPausng"><use xlink:href="#yj-icon-play"></use></svg>
<svg class="icon-pause" v-if="isPausng"><use xlink:href="#yj-icon-pause"></use></svg>
<span>{{ !isPausng ? '开始模拟' : '暂停模拟' }}</span>
</button>
</div>
<button class="reset" @click="reset">
<svg class="icon-reset"><use xlink:href="#yj-icon-reset"></use></svg>重置
</button>
<button @click="close">取消</button>
</template>
</Dialog>
@ -265,8 +289,10 @@ function reset() {
submerge.restart()
}
function pause() {
if (isPausng.value) {
if (!isPausng.value) {
//暂停中
console.log('暂停中')
submerge.move()
submerge.start()
} else {
//播放中

View File

@ -8,7 +8,7 @@
:closeCallback="closeCallBack"
>
<template #content>
<span class="custom-divider"></span>
<!-- <span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
@ -18,7 +18,7 @@
</button>
</div>
</div>
</div>
</div> -->
<span class="custom-divider"></span>
<div class="div-item">
<div class="row" style="margin-bottom: 25px">
@ -72,11 +72,24 @@
</div>
</div>
</div>
<div class="row">
<div class="col">
<span class="label">绘制区域</span>
<button @click="draw">
<svg class="icon-draw"><use xlink:href="#yj-icon-draw"></use></svg>开始绘制
</button>
</div>
</div>
</div>
<span class="custom-divider"></span>
</template>
<template #footer>
<button @click="draw">绘制</button>
<div style="position: absolute; left: 24px; display: flex">
<button class="edit" @click="edit" v-if="showEdite">
<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>二次编辑
</button>
</div>
<button @click="close">关闭</button>
</template>
</Dialog>
@ -158,6 +171,7 @@ const closeCallBack = (e) => {
viewShed.close()
viewPointHeight.value = 1.8
horizontalViewAngle.value = 90
showEdite.value = false
}
onBeforeUnmount(() => {
closeCallBack('')
@ -173,8 +187,15 @@ function viewPointHeightInput(e) {
viewShed.viewPointHeight = viewPointHeight.value
}
}
var showEdite: any = ref(false)
function draw() {
viewShed.draw()
showEdite.value = false
viewShed.draw(getDrawData)
}
function getDrawData(data) {
if (data) {
showEdite.value = true
}
}
function close() {
baseDialog.value?.close()

View File

@ -10,32 +10,32 @@
<template #content>
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
<el-form-item label="名称" prop="cameraName">
<el-input v-model="addForm.cameraName" clearable />
<el-input v-model="addForm.cameraName" clearable placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="设备IP" prop="ip">
<el-input v-model="addForm.ip" clearable></el-input>
<el-input v-model="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
</el-form-item>
<el-form-item label="设备端口" prop="port">
<el-input v-model="addForm.port" clearable></el-input>
<el-input v-model="addForm.port" clearable placeholder="请输入设备端口"></el-input>
</el-form-item>
<el-form-item label="用户名" prop="username">
<el-input v-model="addForm.username" clearable></el-input>
<el-input v-model="addForm.username" clearable placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="addForm.password" clearable></el-input>
<el-input v-model="addForm.password" clearable placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item label="设备类型" prop="type">
<el-select v-model="addForm.type" filterable placeholder="请选择">
<el-select v-model="addForm.type" filterable placeholder="请选择设备类型">
<el-option label="海康" value="海康"> </el-option>
<el-option label="大华" value="大华"> </el-option>
<!-- <el-option label="手动录入" value="3"> </el-option> -->
</el-select>
</el-form-item>
<el-form-item v-if="addForm.type === '3'" label="视频流地址" prop="flvUrl">
<el-input v-model="addForm.flvUrl" clearable></el-input>
<el-input v-model="addForm.flvUrl" clearable placeholder="请输入视频流地址"></el-input>
</el-form-item>
<el-form-item label="通道号" prop="channel">
<el-input v-model="addForm.channel" clearable></el-input>
<el-input v-model="addForm.channel" clearable placeholder="请输入通道号"></el-input>
</el-form-item>
</el-form>
</template>
@ -79,8 +79,9 @@ const peopleRules: any = reactive({
ip: [{ required: true, message: '请输入ip', trigger: 'blur' }],
port: [{ required: true, message: '请输入设备端口号', trigger: 'blur' }],
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }]
password: [{ required: true, message: '请channel', trigger: 'blur' }],
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }],
channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }]
})
var cancel = () => {
@ -167,6 +168,7 @@ defineExpose({
.YJ-custom-base-dialog.addDevice > .content textarea {
background-color: transparent !important;
border: unset !important;
font-size: 14px !important;
}
</style>
<style scoped lang="scss">

View File

@ -1,7 +1,7 @@
<template>
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<template #content>
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
<textarea style="height: 40px; width: 348px;" v-model="text"></textarea>
</template>
<template #footer>
<button @click="confirm">{{ t('btn.confirm') }}</button>
@ -86,4 +86,14 @@ defineExpose({
})
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
.YJ-custom-base-dialog {
>.content {
textarea {
min-height: 40px;
max-height: 325px;
resize: vertical;
}
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 160px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)" :closeCallback="closeCallBack">
<template #content>
<textarea style="height: 76px; width: 270px" v-model="text"></textarea>
<textarea style="height: 40px; width: 348px;" v-model="text"></textarea>
</template>
<template #footer>
<button @click="confirm">{{ t('btn.confirm') }}</button>
@ -84,4 +84,14 @@ defineExpose({
})
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
.YJ-custom-base-dialog {
>.content {
textarea {
min-height: 40px;
max-height: 325px;
resize: vertical;
}
}
}
</style>

View File

@ -2,9 +2,9 @@
<div class="attribute">
<div class="row">
<div class="col attribute-select-box">
<span class="label" style="line-height: 32px">内容类型</span>
<span class="label" style="line-height: 32px">{{ t('general.内容类型') }}</span>
<el-select style="width: 175px" v-model="attributeType" @change="attributeChange" placeholder="请选择">
<el-option v-for="item in attributeSelect" :key="item.key" :label="item.name" :value="item.key">
<el-option v-for="item in attributeSelect" :key="item.key" :label="t('general.' + item.name)" :value="item.key">
</el-option>
</el-select>
</div>
@ -12,14 +12,14 @@
<div class="attribute-content attribute-content-richText" v-show="attributeType === 'richText'">
<div class="row">
<div class="col">
<span class="label">编辑内容</span>
<button @click="openRichTextEditor">打开文本编辑器</button>
<span class="label">{{ t('general.编辑内容') }}</span>
<button @click="openRichTextEditor">{{ t('general.打开文本编辑器') }}</button>
</div>
</div>
</div>
<div class="row attribute-content attribute-content-link" v-show="attributeType === 'link'">
<div class="col">
<span class="label">添加链接</span>
<span class="label">{{ t('general.添加链接') }}</span>
<div style="flex: 1; position: relative">
<input class="input link_add" type="text" v-model="addlinkInput" />
<i class="link_add_btn" @click="_addLink"></i>
@ -30,9 +30,9 @@
<div class="table">
<div class="table-head">
<div class="tr">
<div class="th">名称</div>
<div class="th">链接</div>
<div class="th">操作</div>
<div class="th">{{ t('general.名称') }}</div>
<div class="th">{{ t('general.链接') }}</div>
<div class="th">{{ t('general.操作') }}</div>
</div>
</div>
<div class="table-body" v-if="attribute.link && attribute.link.content && attribute.link.content.length > 0">
@ -46,40 +46,40 @@
</div>
<div class="td" v-else>{{ item.url }}</div>
<div class="td" v-if="linkEditActive.index === index">
<button @click="linkConfirmEdit(index)">确认</button>
<button @click="linkCancelEdit">取消</button>
<button style="width: 76px;flex: 0 0 76px" @click="linkConfirmEdit(index)">{{ t('general.确认') }}</button>
<button style="width: 76px;flex: 0 0 76px" @click="linkCancelEdit">{{ t('general.取消') }}</button>
</div>
<div class="td" v-else>
<button @click="linkEdit(index, item)">编辑</button>
<button @click="linkDelete(index)">删除</button>
<button style="width: 76px;flex: 0 0 76px" @click="linkEdit(index, item)">{{ t('general.编辑') }}</button>
<button style="width: 76px;flex: 0 0 76px" @click="linkDelete(index)">{{ t('general.删除') }}</button>
</div>
</div>
</div>
<div class="table-empty" v-else>
<div class="empty-img"></div>
<p>暂无数据</p>
<p>{{ t('general.暂无数据') }}</p>
</div>
</div>
</div>
<div class="attribute-content attribute-content-camera" v-show="attributeType === 'camera'">
<div class="row">
<div class="col">
<span class="label">编辑内容</span>
<span class="label">{{ t('general.编辑内容') }}</span>
<input class="input" type="text" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;" />
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">搜索</button>
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">{{ t('general.搜索') }}</button>
</div>
</div>
<div>
<div class="table camera-table">
<div class="table-head">
<div class="tr">
<div class="th">操作</div>
<div class="th">设备名称</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">设备类型</div>
<div class="th" style="width: 126px; flex: 0 126px; min-width: 126px">设备IP</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">设备端口</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">用户名</div>
<div class="th">密码</div>
<div class="th">{{ t('general.操作') }}</div>
<div class="th">{{ t('general.设备名称') }}</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">{{ t('general.设备类型') }}</div>
<div class="th" style="width: 126px; flex: 0 126px; min-width: 126px">{{ t('general.设备IP') }}</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">{{ t('general.设备端口') }}</div>
<div class="th" style="width: 80px; flex: 0 80px; min-width: 80px">{{ t('general.用户名') }}</div>
<div class="th">{{ t('general.密码') }}</div>
</div>
</div>
<div class="table-body" v-if="cameraList && cameraList.length > 0">
@ -87,7 +87,7 @@
<div class="td">
<input type="checkbox" :value="item.id" v-model="item.checked"
@change="changeAttributeCamera(item)" />
<span>绑定</span>
<span>{{ t('general.绑定') }}</span>
</div>
<div class="td">{{ item.cameraName }}</div>
<div class="td" style="width: 80px; flex: 0 80px; min-width: 80px">{{ item.type }}</div>
@ -99,7 +99,7 @@
</div>
<div class="table-empty" v-else>
<div class="empty-img"></div>
<p>暂无数据</p>
<p>{{ t('general.暂无数据') }}</p>
</div>
</div>
</div>
@ -110,9 +110,9 @@
<div class="attribute-content attribute-content-isc" v-show="attributeType === 'isc'">
<!-- <div class="row">
<div class="col">
<span class="label">编辑内容</span>
<span class="label">{{ t('general.编辑内容') }}</span>
<input class="input" type="text" @model="ISCName" style="width: 100px;">
<button class="select btn" @click="ISCSelect">搜索</button>
<button class="select btn" @click="ISCSelect">{{ t('general.搜索') }}</button>
</div>
</div> -->
<div>
@ -146,7 +146,7 @@
</div>
<div class="row attribute-content attribute-content-vr" v-show="attributeType === 'vr'">
<div class="col">
<span class="label">添加链接</span>
<span class="label">{{ t('general.添加链接') }}</span>
<div style="flex: 1; position: relative">
<input class="input vr_add" type="text" v-model="addvrInput" />
<i class="vr_add_btn" @click="_addRr"></i>
@ -157,9 +157,9 @@
<div class="table">
<div class="table-head">
<div class="tr">
<div class="th">名称</div>
<div class="th">链接</div>
<div class="th">操作</div>
<div class="th">{{ t('general.名称') }}</div>
<div class="th">{{ t('general.链接') }}</div>
<div class="th">{{ t('general.操作') }}</div>
</div>
</div>
<div class="table-body" v-if="attribute.vr && attribute.vr.content && attribute.vr.content.length > 0">
@ -173,18 +173,18 @@
</div>
<div class="td" v-else>{{ item.url }}</div>
<div class="td" v-if="vrEditActive.index === index">
<button @click="vrConfirmEdit(index)">确认</button>
<button @click="vrCancelEdit">取消</button>
<button style="width: 76px;flex: 0 0 76px" @click="vrConfirmEdit(index)">{{ t('general.确认') }}</button>
<button style="width: 76px;flex: 0 0 76px" @click="vrCancelEdit">{{ t('general.取消') }}</button>
</div>
<div class="td" v-else>
<button @click="vrEdit(index, item)">编辑</button>
<button @click="vrDelete(index)">删除</button>
<button style="width: 76px;flex: 0 0 76px" @click="vrEdit(index, item)">{{ t('general.编辑') }}</button>
<button style="width: 76px;flex: 0 0 76px" @click="vrDelete(index)">{{ t('general.删除') }}</button>
</div>
</div>
</div>
<div class="table-empty" v-else>
<div class="empty-img"></div>
<p>暂无数据</p>
<p>{{ t('general.暂无数据') }}</p>
</div>
</div>
</div>
@ -192,18 +192,18 @@
<div>
<div class="row">
<div class="col">
<span class="label">编辑内容</span>
<span class="label">{{ t('general.编辑内容') }}</span>
<input class="input goods-select-input" type="text" style="width: 180px;margin-right: 10px;"
v-model="goodsKeywords">
<button class="select btn" @click="goodsFilter">搜索</button>
<button class="select btn" @click="goodsFilter">{{ t('general.搜索') }}</button>
</div>
</div>
<div class="table goods-table">
<div class="table-head">
<div class="tr">
<div class="th" style="width: 60px; flex: 0 60px;min-width: 60px;">序号</div>
<div class="th" style="flex: 0 0 280px;">名称</div>
<div class="th">数量</div>
<div class="th" style="width: 60px; flex: 0 60px;min-width: 60px;">{{ t('general.序号') }}</div>
<div class="th" style="flex: 0 0 280px;">{{ t('general.名称') }}</div>
<div class="th">{{ t('general.数量') }}</div>
</div>
</div>
<div class="table-body" v-if="goodsList && goodsList.length > 0">
@ -217,7 +217,7 @@
</div>
<div class="table-empty" v-else>
<div class="empty-img"></div>
<p>暂无数据</p>
<p>{{ t('general.暂无数据') }}</p>
</div>
</div>
</div>
@ -230,6 +230,8 @@ import { ref } from 'vue'
import { inject } from 'vue'
import { deviceApi } from '@/api/deviceManage'
import { MaterialApi } from '@/api/material'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
let ipcRenderer;
if (window && window.process && window.process.type === 'renderer') {
@ -414,7 +416,7 @@ const openRichTextEditor = () => {
const _addLink = async () => {
if (addlinkInput.value) {
let link = {
name: '链接',
name: t('general.链接'),
url: addlinkInput.value
}
attribute.value.link.content.push(link)
@ -435,7 +437,7 @@ const _addLink = async () => {
if (filePaths.length > 0) {
filePaths.forEach((item) => {
attribute.value.link.content.push({
name: '链接',
name: t('general.链接'),
url: item
})
})
@ -514,7 +516,7 @@ const linkCancelEdit = () => {
const _addRr = () => {
if (addvrInput.value) {
let link = {
name: '全景图',
name: t('general.全景图'),
url: addvrInput.value
}
attribute.value.vr.content.push(link)
@ -532,7 +534,7 @@ const _addRr = () => {
if (filePaths.length > 0) {
filePaths.forEach((item) => {
attribute.value.vr.content.push({
name: '全景图',
name: t('general.全景图'),
url: item
})
})
@ -627,4 +629,133 @@ const changeAttributeCamera = (e) => {
}
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(1) {
width: 164px;
flex: 0 0 164px;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(2),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(2) {
width: 226px;
flex: 0 0 226px;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .th:nth-child(3),
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td:nth-child(3) {
flex: 0 0 150px;
width: 150px;
justify-content: center;
}
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-link .table .tr .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-link .table .tr .td:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-vr .table .tr .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en>.content .attribute-content-vr .table .tr .td:nth-child(3) {
flex: 0 0 190px;
width: 190px;
justify-content: center;
}
.YJ-custom-base-dialog>.content .attribute-content-link .table .tr .td .input-group .input,
.YJ-custom-base-dialog>.content .attribute-content-vr .table .tr .td .input-group .input {
border-radius: 5px 0 0 5px;
}
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .th:nth-child(1),
.YJ-custom-base-dialog>.content .attribute-content-materials .table .tr .td:nth-child(1) {
flex: 0 0 60px;
}
.YJ-custom-base-dialog>.content .table.camera-table {
overflow-x: auto;
}
.YJ-custom-base-dialog>.content .table.isc-table {
overflow: hidden;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr {
display: inline-flex;
}
.YJ-custom-base-dialog>.content .table.isc-table .tr {
display: flex;
}
.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-base1), 0.5);
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .td span,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td span {
white-space: nowrap;
margin-left: 10px;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .td input[type=checkbox],
.YJ-custom-base-dialog>.content .table.isc-table .tr .td input[type=checkbox] {
cursor: pointer;
}
.YJ-custom-base-dialog>.content .table.camera-table .table-body,
.YJ-custom-base-dialog>.content .table.isc-table .table-body {
display: inline-flex;
flex-direction: column;
height: 186px;
width: auto;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .th,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td {
flex: 0 0 100px;
width: 100px;
min-width: 100px;
}
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .th,
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .td {
flex: 0 0 110px;
width: 110px;
min-width: 110px;
}
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .th:nth-of-type(3),
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .td:nth-of-type(3) {
flex: 0 0 110px !important;
width: 110px !important;
min-width: 110px !important;
}
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .th:nth-of-type(5),
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .td:nth-of-type(5) {
flex: 0 0 95px !important;
width: 95px !important;
min-width: 95px !important;
}
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .th:nth-of-type(6),
.YJ-custom-base-dialog.dialog-en>.content .table.camera-table .tr .td:nth-of-type(6) {
flex: 0 0 95px !important;
width: 95px !important;
min-width: 95px !important;
}
.YJ-custom-base-dialog>.content .table.isc-table .tr .th,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td {
flex: 1;
width: auto;
min-width: auto;
}
.YJ-custom-base-dialog>.content .table.camera-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.camera-table .tr .td:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .th:first-child,
.YJ-custom-base-dialog>.content .table.isc-table .tr .td:first-child {
flex: 0 74px;
min-width: 74px;
}
</style>

View File

@ -1,18 +1,12 @@
<template>
<Dialog
ref="baseDialog"
:title="t('dialog.point.title')"
left="180px"
top="100px"
:className="'billboard-object'"
:closeCallback="closeCallback"
>
<Dialog ref="baseDialog" :title="t('dialog.point.title')" left="180px" top="100px" :className="'billboard-object'"
:closeCallback="closeCallback">
<template #content>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
<span class="label" style="flex: unset">{{ t('dialog.name') }}</span>
<span class="label" style="flex: unset">{{ t('general.名称') }}</span>
<input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" />
</div>
<div class="col"></div>
@ -21,57 +15,47 @@
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div style="width: 46%">
<div class="title1">
<div class="row">
<p class="lable-left-line">{{ t('dialog.point.WGS84') }}</p>
</div>
</div>
<div class="title2">
<div class="row coordinate-select-box">
<div class="lable-left-line">
{{ t('dialog.point.转换坐标选择') }}
<el-select class="input input-select coordinate-select" style="width: 155px; margin-left: 20px"
v-model="coordinate" @change="coordinateChange" placeholder="请选择">
<el-option v-for="item in epsg_map" :key="item.epsg" :label="item.name" :value="item.epsg">
</el-option>
</el-select>
</div>
</div>
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div style="width: 46%;">
<div class="row" style="margin-bottom: 5px">
<div class="col">
<span class="label">{{ t('dialog.longitude') }}</span>
<input
class="input"
type="number"
title=""
min="-180"
max="180"
v-model="entityOptions.lng"
@change="changLng"
@input="$handleInputLimit"
/>
<span class="label">{{ t('general.经度') }}</span>
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng"
@change="changLng" @input="$handleInputLimit" />
</div>
</div>
<div class="row" style="margin-bottom: 5px">
<div class="col">
<span class="label">{{ t('dialog.latitude') }}</span>
<input
class="input"
type="number"
title=""
min="-90"
max="90"
v-model="entityOptions.lat"
@change="changLat"
@input="$handleInputLimit"
/>
<span class="label">{{ t('general.纬度') }}</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat"
@change="changLat" @input="$handleInputLimit" />
</div>
</div>
<div class="row">
<div class="col">
<span class="label">{{ t('dialog.altitude') }}</span>
<div
class="input-number input-number-unit-1 alt-box"
:class="{ disabled: heightMode == 2 || heightMode === 3 }"
>
<input
class="input"
type="number"
title=""
min="-9999999"
max="999999999"
v-model="entityOptions.alt"
@change="changAlt"
@input="$handleInputLimit"
/>
<span class="label">{{ t('general.海拔高度') }}</span>
<div class="input-number input-number-unit-1 alt-box"
:class="{ disabled: heightMode == 2 || heightMode === 3 }">
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.alt"
@change="changAlt" @input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -79,140 +63,178 @@
</div>
</div>
<div style="width: 50%;">
<div class="row coordinate-select-box">
<div class="lable-left-line">
{{ t('dialog.point.转换坐标选择') }}
<el-select
class="input input-select coordinate-select"
style="width: 155px; margin-left: 20px"
v-model="coordinate"
@change="coordinateChange"
placeholder="请选择"
>
<el-option
v-for="item in epsg_map"
:key="item.epsg"
:label="item.name"
:value="item.epsg"
>
</el-option>
</el-select>
</div>
</div>
<div class="row" style="margin-bottom: 5px">
<div class="col">
<span class="label">{{ t('dialog.point.XAxis') }}:</span>
<input
style="border: none; background: none"
class="input convert-x"
readonly
v-model="x"
/>
<input style="border: none; background: none" class="input convert-x" readonly v-model="x" />
</div>
</div>
<div class="row" style="margin-bottom: 5px">
<div class="col">
<span class="label">{{ t('dialog.point.YAxis') }}:</span>
<input
style="border: none; background: none"
class="input convert-y"
readonly
v-model="y"
/>
<input style="border: none; background: none" class="input convert-y" readonly v-model="y" />
</div>
</div>
<div class="row">
<div class="col">
<span class="label">{{ t('dialog.point.ZAxis') }}:</span>
<input
style="border: none; background: none"
class="input convert-z"
readonly
v-model="z"
/>
<input style="border: none; background: none" class="input convert-z" readonly v-model="z" />
</div>
</div>
</div>
</div>
</div>
<span class="custom-divider"></span>
<div class="div-item">
<!-- <setStyle type="点" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle> -->
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.show') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.billboardShow" />
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.current') }}</span>
<div class="image-box" @click="clickChangeImage">
<img class="image" :src="entityOptions.billboardImage" alt="" />
</div>
</div>
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.multiple') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0.1" max="99" v-model="entityOptions.billboardScale"
@input="$handleInputLimit" />
<span class="unit">{{ t('general.times') }}</span>
<span class="arrow"></span>
</div>
</div>
<div class="col"></div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col" style="flex: 0 0 80px;">
<span class="label" style="flex: none;">{{ t('dialog.point.text.show') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" />
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.color') }}</span>
<div class="labelColor" ref="labelColorRef"></div>
</div>
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.size') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
style="min-width: 70px;" @input="$handleInputLimit" />
<span class="unit">px</span>
<span class="arrow"></span>
</div>
</div>
<div class="col font-select-box">
<span class="label" style="flex: none;">{{ t('general.text.font') }}</span>
<el-select class="input input-select font-select" style="width: 100px"
v-model="entityOptions.labelFontFamily">
<el-option v-for="item in fontList" :key="item.key" :label="t('general.' + item.name)" :value="item.key">
</el-option>
</el-select>
</div>
</div>
<!-- <div class="row" style="padding-left: 12px;">
<div class="col">
<div class="customized-tip"></div>
<span class="label" style="flex: none;">{{ t('general.text.style') }}</span>
<svg class="icon-text bold">
<use xlink:href="#icon-text-bold"></use>
</svg>
<svg class="icon-text italic">
<use xlink:href="#icon-text-italic"></use>
</svg>
<svg class="icon-text line-bottom">
<use xlink:href="#icon-text-line-bottom"></use>
</svg>
<svg class="icon-text line-through">
<use xlink:href="#icon-text-line-through"></use>
</svg>
</div>
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.letterSpacing') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99"
style="min-width: 70px;" @input="$handleInputLimit" />
<span class="unit">px</span>
<span class="arrow"></span>
</div>
</div>
<div class="col"></div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none;">{{ t('general.outline.color') }}</span>
<div class="labelOutlineColorColor" ref="labelOutlineColorRef"></div>
</div>
<div class="col">
<span class="label" style="flex: none;">{{ t('general.outline.width') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99"
style="min-width: 70px;" @input="$handleInputLimit" />
<span class="unit">px</span>
<span class="arrow"></span>
</div>
</div>
<div class="col"></div>
</div> -->
</div>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col" style="flex: 0 0 120px">
<span class="label">视野缩放</span>
<span class="label">{{ t('general.视野缩放') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance" />
</div>
<div class="col">
<span class="label">最近距离</span>
<span class="label">{{ t('general.最近距离') }}</span>
<div class="input-number input-number-unit-1">
<input
class="input"
type="number"
title=""
min="1"
max="99999999"
v-model="entityOptions.near"
@input="$handleInputLimit"
/>
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.near"
@input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">最远距离</span>
<span class="label">{{ t('general.最远距离') }}</span>
<div class="input-number input-number-unit-1">
<input
class="input"
type="number"
title=""
min="1"
max="99999999"
v-model="entityOptions.far"
@input="$handleInputLimit"
/>
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.far"
@input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div>
</div>
</div>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="属性信息" name="1">
<el-tab-pane :label="t('general.属性信息')" name="1">
<attribute :entityOptions="entityOptions"></attribute>
</el-tab-pane>
<el-tab-pane label="空间信息" name="2">
<el-tab-pane :label="t('general.空间信息')" name="2">
<div class="row">
<div class="col height-mode-box">
<span class="label" style="flex: 0 0 56px">高度模式</span>
<el-select
class="input input-select height-mode-scelect"
style="width: 155px; margin-left: 20px"
v-model="heightMode"
@change="heightModeChange"
placeholder="请选择"
>
<el-option
v-for="item in heightModeData"
:key="item.key"
:label="item.name"
:value="item.key"
>
<span class="label" style="flex: 0 0 56px">{{ t('general.高度模式') }}</span>
<el-select class="input input-select height-mode-scelect" style="width: 155px; margin-left: 20px"
v-model="heightMode" @change="heightModeChange" placeholder="请选择">
<el-option v-for="item in heightModeData" :key="item.key" :label="t('general.' + item.name)"
:value="item.key">
</el-option>
</el-select>
</div>
<div class="col height-box" v-show="heightMode == 0 || heightMode == 1">
<span class="label" style="flex: 0 0 56px">高度</span>
<span class="label" style="flex: 0 0 56px">{{ t('general.高度') }}</span>
<div class="input-number input-number-unit-1">
<input
class="input height"
type="number"
title=""
min="-9999999"
max="999999999"
v-model="height"
@change="changHeight"
@input="$handleInputLimit"
/>
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
@change="changHeight" @input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
@ -220,39 +242,27 @@
</div>
<div class="row">
<div class="col">
<div
class="YJ-custom-checkbox-box"
style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(1)"
>
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(1)">
<input type="checkbox" class="YJ-custom-checkbox" v-model="format1" />
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none"
>小数格式</span
>
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.小数格式')
}}</span>
</div>
</div>
<div class="col">
<div
class="YJ-custom-checkbox-box"
style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(2)"
>
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(2)">
<input type="checkbox" class="YJ-custom-checkbox" v-model="format2" />
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none"
>度分格式</span
>
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.度分格式')
}}</span>
</div>
</div>
<div class="col">
<div
class="YJ-custom-checkbox-box"
style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(3)"
>
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
@click="formatChange(3)">
<input type="checkbox" class="YJ-custom-checkbox" v-model="format3" />
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none"
>度分秒格式</span
>
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none;white-space: nowrap;">{{
t('general.度分秒格式') }}</span>
</div>
</div>
<div class="col"></div>
@ -262,14 +272,14 @@
<div class="proj-input-box" v-show="format1">
<div class="row">
<div class="col">
<span style="flex: 0 0 40px">经度</span>
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
<input class="input lng" readonly :value="entityOptions.lng" />
</div>
<div class="col"></div>
</div>
<div class="row">
<div class="col">
<span style="flex: 0 0 40px">纬度</span>
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
<input class="input lat" readonly :value="entityOptions.lat" />
</div>
<div class="col"></div>
@ -279,19 +289,19 @@
<div class="row">
<div class="col" style="flex-direction: column">
<div class="row" style="margin-bottom: 15px">
<span style="flex: 0 0 40px">经度</span>
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
<input class="input lng-dm-d" style="flex: 1" readonly :value="lngDmD" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
<input class="input lng-dm-m" style="flex: 1" readonly :value="lngDmM" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
<span class="top-line"></span>
</div>
<div class="row">
<span style="flex: 0 0 40px">纬度</span>
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
<input class="input lat-dm-d" style="flex: 1" readonly :value="latDmD" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
<input class="input lat-dm-m" style="flex: 1" readonly :value="latDmM" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
<span class="bottom-line"></span>
</div>
</div>
@ -301,53 +311,23 @@
<div class="row">
<div class="col" style="flex-direction: column">
<div class="row" style="margin-bottom: 15px">
<span style="flex: 0 0 40px">经度</span>
<input
class="input lng-dms-d"
style="flex: 1"
readonly
:value="lngDmsD"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<input
class="input lng-dms-m"
style="flex: 1"
readonly
:value="lngDmsM"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<input
class="input lng-dms-s"
style="flex: 1"
readonly
:value="lngDmsS"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
<input class="input lng-dms-d" style="flex: 1" readonly :value="lngDmsD" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
<input class="input lng-dms-m" style="flex: 1" readonly :value="lngDmsM" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
<input class="input lng-dms-s" style="flex: 1" readonly :value="lngDmsS" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
<span class="top-line"></span>
</div>
<div class="row">
<span style="flex: 0 0 40px">纬度</span>
<input
class="input lat-dms-d"
style="flex: 1"
readonly
:value="latDmsD"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<input
class="input lat-dms-m"
style="flex: 1"
readonly
:value="latDmsM"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<input
class="input lat-dms-s"
style="flex: 1"
readonly
:value="latDmsS"
/>
<span class="label" style="flex: 0 0 14px; margin: 0 10px"></span>
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
<input class="input lat-dms-d" style="flex: 1" readonly :value="latDmsD" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
<input class="input lat-dms-m" style="flex: 1" readonly :value="latDmsM" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
<input class="input lat-dms-s" style="flex: 1" readonly :value="latDmsS" />
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
<span class="bottom-line"></span>
</div>
</div>
@ -356,95 +336,6 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="标注风格" name="3">
<div>
<h4>图标设置</h4>
<div class="row" style="margin-bottom: 10px">
<div class="col" style="flex: 0 0 80px">
<span class="label" style="flex: none">显隐</span>
<input
class="btn-switch"
type="checkbox"
v-model="entityOptions.billboardShow"
/>
</div>
<div class="col" style="flex: 0 0 90px">
<span class="label" style="flex: none">图标</span>
<div class="image-box" @click="clickChangeImage">
<img class="image" :src="entityOptions.billboardImage" alt="" />
</div>
</div>
<div class="col" style="flex: 0 0 90px">
<span class="label" style="flex: none">默认图标</span>
<div class="image-box" @click="clickChangeDefaultImage">
<img class="image" :src="entityOptions.billboardDefaultImage" alt="" />
</div>
</div>
<div class="col">
<span class="label">图标倍数</span>
<div class="input-number input-number-unit-2">
<input
class="input"
type="number"
title=""
min="0.1"
max="99"
v-model="entityOptions.billboardScale"
@input="$handleInputLimit"
/>
<span class="unit"></span>
<span class="arrow"></span>
</div>
</div>
</div>
</div>
<div>
<h4>文字设置</h4>
<div class="row">
<div class="col" style="flex: 0 0 80px">
<span class="label" style="flex: none">显隐</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" />
</div>
<div class="col font-select-box">
<span class="label" style="flex: none">字体选择</span>
<el-select
class="input input-select font-select"
style="width: 100px"
v-model="entityOptions.labelFontFamily"
>
<el-option
v-for="item in fontList"
:key="item.key"
:label="item.name"
:value="item.key"
>
</el-option>
</el-select>
</div>
<div class="col">
<span class="label">文字大小</span>
<div class="input-number input-number-unit-2">
<input
class="input"
type="number"
title=""
min="1"
max="99"
v-model="entityOptions.labelFontSize"
style="width: 70px"
@input="$handleInputLimit"
/>
<span class="unit">px</span>
<span class="arrow"></span>
</div>
</div>
<div class="col">
<span class="label">文字颜色</span>
<div class="labelColor" ref="labelColorRef"></div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
@ -453,13 +344,14 @@
<div style="position: absolute; left: 24px; display: flex">
<button @click="updateHeight">
<svg class="icon-updateheigh">
<use xlink:href="#yj-icon-updateheight"></use></svg>更新高程
<use xlink:href="#yj-icon-updateheight"></use>
</svg>{{ t('general.更新高程') }}
</button>
<button style="margin-left: 10px" @click="translate">平移</button>
<button style="margin-left: 10px" @click="translate">{{ t('general.平移') }}</button>
</div>
<button @click="remove">删除</button>
<button @click="confirm">确定</button>
<button @click="close">关闭</button>
<button @click="remove">{{ t('general.删除') }}</button>
<button @click="confirm">{{ t('general.确定') }}</button>
<button @click="close">{{ t('general.关闭') }}</button>
</template>
</Dialog>
</template>
@ -471,6 +363,7 @@ import { TreeApi } from '@/api/tree'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import attribute from './attribute.vue'
import setStyle from './defaultStyle/index.vue'
import { getFontList } from './fontSelect'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
import { useI18n } from 'vue-i18n'
@ -542,11 +435,13 @@ const z = ref()
const coordinate = ref('EPSG:4326')
const heightMode = ref(0)
const labelColorRef = ref(null)
const sourceType = ref('')
let originalOptions
let that
const open = async (id) => {
const open = async (id, type) => {
that = window.earth.entityMap.get(id)
sourceType.value = type
originalOptions = structuredClone(that.options)
entityOptions.value = that
heightMode.value = entityOptions.value.heightMode
@ -572,6 +467,47 @@ const open = async (id) => {
entityOptions.value.labelColor = 'rgba(255,255,255,1)'
} //点击清空按钮事件回调
})
let iconTextBold = document.getElementsByClassName('bold')[0]
let iconTextItalic = document.getElementsByClassName('italic')[0]
let iconTextLineBottom = document.getElementsByClassName('line-bottom')[0]
let iconTextLineThrough = document.getElementsByClassName('line-through')[0]
let tip: any = document.getElementsByClassName('customized-tip')[0]
iconTextBold.addEventListener('mouseleave', (event:any) => {
tip.style.display = 'none'
})
iconTextBold.addEventListener('mousemove', (event:any) => {
tip.innerHTML = t('general.text.bold')
tip.style.left = (event.layerX + 8) + 'px'
tip.style.top = (event.layerY + 18) + 'px'
tip.style.display = 'block'
})
iconTextItalic.addEventListener('mouseleave', (event:any) => {
tip.style.display = 'none'
})
iconTextItalic.addEventListener('mousemove', (event:any) => {
tip.innerHTML = t('general.text.italic')
tip.style.left = (event.layerX + 8) + 'px'
tip.style.top = (event.layerY + 18) + 'px'
tip.style.display = 'block'
})
iconTextLineBottom.addEventListener('mouseleave', (event:any) => {
tip.style.display = 'none'
})
iconTextLineBottom.addEventListener('mousemove', (event:any) => {
tip.innerHTML = t('general.text.underline')
tip.style.left = (event.layerX + 8) + 'px'
tip.style.top = (event.layerY + 18) + 'px'
tip.style.display = 'block'
})
iconTextLineThrough.addEventListener('mouseleave', (event:any) => {
tip.style.display = 'none'
})
iconTextLineThrough.addEventListener('mousemove', (event:any) => {
tip.innerHTML = t('general.text.strikethrough')
tip.style.left = (event.layerX + 8) + 'px'
tip.style.top = (event.layerY + 18) + 'px'
tip.style.display = 'block'
})
}
const closeCallback = () => {
@ -679,7 +615,7 @@ const changHeight = () => {
coordinateChange()
}
const handleClick = () => {}
const handleClick = () => { }
const formatChange = (val) => {
switch (val) {
@ -776,12 +712,12 @@ const close = () => {
}
const clickChangeImage = () => {
eventBus?.emit('openPhoto', (img)=>{
eventBus?.emit('openPhoto', (img) => {
entityOptions.value.billboardImage = img
})
}
const clickChangeDefaultImage = () => {
eventBus?.emit('openPhoto', (img)=>{
eventBus?.emit('openPhoto', (img) => {
entityOptions.value.billboardDefaultImage = img
})
}
@ -792,31 +728,31 @@ const fontChange = (val) => {
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({
@ -830,5 +766,111 @@ defineExpose({
.YJ-custom-checkbox {
pointer-events: none;
}
::v-deep>.content {
width: 590px;
.title1 {
width: 46%;
}
.title2 {
width: 50%;
}
.icon-text {
width: 16px;
height: 16px;
}
.customized-tip {
display: none;
background: linear-gradient(rgba(var(--color-base1), 0.5), rgba(var(--color-base1), 0.5)), rgba(0, 0, 0, 1);
font-size: 12px;
position: absolute;
z-index: 1;
pointer-events: none;
padding: 6px 8px;
border-radius: 4px;
line-height: 12px;
}
}
}
.billboard-object.dialog-en {
::v-deep>.content {
width: 690px;
.title1 {
width: 40%;
}
.title2 {
width: 60%;
}
.attribute-content-link .table .tr .th:nth-child(2),
.attribute-content-link .table .tr .td:nth-child(2),
.attribute-content-vr .table .tr .th:nth-child(2),
.attribute-content-vr .table .tr .td:nth-child(2) {
width: 284px;
flex: 0 0 284px;
}
}
}
.billboard-object>.content button.primary {
padding: 6px 14px;
}
.billboard-object>.content>div .row .col {
margin: 0 10px;
}
.billboard-object>.content>div .row .col:first-child {
margin-left: 0;
}
.billboard-object>.content>div .row .col:last-child {
margin-right: 0;
}
.billboard-object>.content>div .row .label {
flex: 0 0 56px;
white-space: nowrap;
}
.billboard-object.dialog-en>.content>div .div-item:nth-of-type(2) .row .label {
flex: 0 0 65px;
}
.billboard-object>.content .DIV-cy-tab-content-pane .input-select {
width: 100px;
}
.billboard-object>.content .DIV-cy-tab-content-pane h4 {
font-size: 16px;
margin-bottom: 10px;
}
.billboard-object>.content div .image-box {
width: 23px;
height: 26px;
cursor: pointer;
border: 1px solid rgba(var(--color-base1), 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.billboard-object>.content div .image {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
.billboard-object.dialog-en>.content div .proj-input-box .row .col span:nth-child(1) {
flex: 0 0 70px !important;
}
</style>

View File

@ -143,7 +143,7 @@ const open = async (id: any) => {
let colorPicker = new window.YJColorPicker({
el: colorRefs.value[i],
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
alpha: false, //是否开启透明度
defaultColor: entityOptions.value.options.circle[i].color,
disabled: false, //是否禁止打开颜色选择器
openPickerAni: 'opacity', //打开颜色选择器动画
@ -174,7 +174,7 @@ const addCircle = async () => {
let colorPicker = new window.YJColorPicker({
el: colorRefs.value[i],
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
alpha: false, //是否开启透明度
defaultColor: entityOptions.value.options.circle[i].color,
disabled: false, //是否禁止打开颜色选择器
openPickerAni: 'opacity', //打开颜色选择器动画
@ -198,7 +198,7 @@ const minusCircle = async (index) => {
let colorPicker = new window.YJColorPicker({
el: colorRefs.value[i],
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
alpha: false, //是否开启透明度
defaultColor: entityOptions.value.options.circle[i].color,
disabled: false, //是否禁止打开颜色选择器
openPickerAni: 'opacity', //打开颜色选择器动画
@ -214,7 +214,7 @@ const minusCircle = async (index) => {
}
}
const changeRadius = async (e) => {
proxy.$handleInputLimit(e)
proxy?.$handleInputLimit(e)
let newCircle = JSON.parse(JSON.stringify(circle.value))
if (radiusUnit.value == 'km') {
for (let i = 0; i < newCircle.length; i++) {
@ -227,7 +227,7 @@ const changeRadius = async (e) => {
let colorPicker = new window.YJColorPicker({
el: colorRefs.value[i],
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
alpha: false, //是否开启透明度
defaultColor: entityOptions.value.options.circle[i].color,
disabled: false, //是否禁止打开颜色选择器
openPickerAni: 'opacity', //打开颜色选择器动画

View File

@ -4,40 +4,65 @@
<template #header>
<div class="set_pup_header">
<div class="system_title">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="229" height="35"
viewBox="0 0 229 35" fill="none" preserveAspectRatio="none">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="229"
height="35"
viewBox="0 0 229 35"
fill="none"
preserveAspectRatio="none"
>
<path
d="M74 34L85 34L99.5 6L88.5 6L74 34ZM92 34L103 34L117.5 6L106.5 6L92 34ZM111 34L122 34L136.5 6L125.5 6L111 34ZM140 34L129 34L143.5 6L154.5 6L140 34ZM148 34L159 34L173.5 6L162.5 6L148 34ZM177 34L166 34L180.5 6L191.5 6L177 34ZM185 34L196 34L210.5 6L199.5 6L185 34ZM214 34L203 34L217.5 6L228.5 6L214 34ZM0 34L11 34L25.5 6.5L14.5 6.5L0 34ZM18 34L29 34L43.5 6.5L32.5 6.5L18 34ZM37 34L48 34L62.5 6.5L51.5 6.5L37 34ZM66 34L55 34L69.5 6.5L80.5 6.5L66 34Z"
fill-rule="evenodd" fill="url(#linear_fill_2442_1053)" />
fill-rule="evenodd"
fill="url(#linear_fill_2442_1053)"
/>
<rect x="0" y="0" width="229" height="34" fill="url(#linear_fill_2442_1054)" />
<g clip-path="url(#clip-path-2442_1055)">
<path
d="M10.3993 32.7333L10.666 33L10.666 21L9.33267 22.3333L4.66602 27L5.66602 28L10.3993 32.7333ZM9.33267 29.6667L6.73267 27L9.33267 24.3333L9.33267 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
<g opacity="0.5">
<path
d="M7.39934 32.7333L7.66602 33L7.66602 21L6.33267 22.3333L1.66602 27L2.66602 28L7.39934 32.7333ZM6.33267 29.6667L3.73267 27L6.33267 24.3333L6.33267 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
</g>
</g>
<g clip-path="url(#clip-path-2442_1059)">
<path
d="M218.601 32.7333L218.334 33L218.334 21L219.667 22.3333L224.334 27L223.334 28L218.601 32.7333ZM219.667 29.6667L222.267 27L219.667 24.3333L219.667 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
<g opacity="0.5">
<path
d="M221.601 32.7333L221.334 33L221.334 21L222.667 22.3333L227.334 27L226.334 28L221.601 32.7333ZM222.667 29.6667L225.267 27L222.667 24.3333L222.667 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
</g>
</g>
<defs>
<linearGradient id="linear_fill_2442_1053" x1="119.1239013671875" y1="33.99998474121094"
x2="119.1231689453125" y2="6" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_fill_2442_1053"
x1="119.1239013671875"
y1="33.99998474121094"
x2="119.1231689453125"
y2="6"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_fill_2442_1054" x1="0" y1="17" x2="229" y2="17"
gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_fill_2442_1054"
x1="0"
y1="17"
x2="229"
y2="17"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.4891" stop-color="rgb(var(--color-base1))" stop-opacity="0.4" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
@ -478,8 +503,8 @@ defineExpose({
<style lang="scss" scoped>
.set_pup {
width: 40vw;
height: 50vh;
// width: 40vw;
// height: 50vh;
:deep(.el-dialog) {
background:
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%),
@ -527,7 +552,7 @@ defineExpose({
position: relative;
z-index: 1;
>svg {
> svg {
position: absolute;
top: 0;
left: 0;

View File

@ -1,13 +1,5 @@
<template>
<div>
<div class="row">
<div class="col">
<span class="label">新增{{ type }}标签风格设置</span>
<button style="margin-right: 56px">初始风格</button>
<button>当前风格</button>
</div>
</div>
<span class="custom-divider"></span>
<div class="row"></div>
<div class="row">
<div class="col">

View File

@ -4,40 +4,65 @@
<template #header>
<div class="set_pup_header">
<div class="system_title">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="229" height="35"
viewBox="0 0 229 35" fill="none" preserveAspectRatio="none">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="229"
height="35"
viewBox="0 0 229 35"
fill="none"
preserveAspectRatio="none"
>
<path
d="M74 34L85 34L99.5 6L88.5 6L74 34ZM92 34L103 34L117.5 6L106.5 6L92 34ZM111 34L122 34L136.5 6L125.5 6L111 34ZM140 34L129 34L143.5 6L154.5 6L140 34ZM148 34L159 34L173.5 6L162.5 6L148 34ZM177 34L166 34L180.5 6L191.5 6L177 34ZM185 34L196 34L210.5 6L199.5 6L185 34ZM214 34L203 34L217.5 6L228.5 6L214 34ZM0 34L11 34L25.5 6.5L14.5 6.5L0 34ZM18 34L29 34L43.5 6.5L32.5 6.5L18 34ZM37 34L48 34L62.5 6.5L51.5 6.5L37 34ZM66 34L55 34L69.5 6.5L80.5 6.5L66 34Z"
fill-rule="evenodd" fill="url(#linear_fill_2442_1053)" />
fill-rule="evenodd"
fill="url(#linear_fill_2442_1053)"
/>
<rect x="0" y="0" width="229" height="34" fill="url(#linear_fill_2442_1054)" />
<g clip-path="url(#clip-path-2442_1055)">
<path
d="M10.3993 32.7333L10.666 33L10.666 21L9.33267 22.3333L4.66602 27L5.66602 28L10.3993 32.7333ZM9.33267 29.6667L6.73267 27L9.33267 24.3333L9.33267 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
<g opacity="0.5">
<path
d="M7.39934 32.7333L7.66602 33L7.66602 21L6.33267 22.3333L1.66602 27L2.66602 28L7.39934 32.7333ZM6.33267 29.6667L3.73267 27L6.33267 24.3333L6.33267 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
</g>
</g>
<g clip-path="url(#clip-path-2442_1059)">
<path
d="M218.601 32.7333L218.334 33L218.334 21L219.667 22.3333L224.334 27L223.334 28L218.601 32.7333ZM219.667 29.6667L222.267 27L219.667 24.3333L219.667 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
<g opacity="0.5">
<path
d="M221.601 32.7333L221.334 33L221.334 21L222.667 22.3333L227.334 27L226.334 28L221.601 32.7333ZM222.667 29.6667L225.267 27L222.667 24.3333L222.667 29.6667Z"
fill="rgb(var(--color-base1))" />
fill="rgb(var(--color-base1))"
/>
</g>
</g>
<defs>
<linearGradient id="linear_fill_2442_1053" x1="119.1239013671875" y1="33.99998474121094"
x2="119.1231689453125" y2="6" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_fill_2442_1053"
x1="119.1239013671875"
y1="33.99998474121094"
x2="119.1231689453125"
y2="6"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_fill_2442_1054" x1="0" y1="17" x2="229" y2="17"
gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_fill_2442_1054"
x1="0"
y1="17"
x2="229"
y2="17"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.4891" stop-color="rgb(var(--color-base1))" stop-opacity="0.4" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
@ -56,29 +81,58 @@
</template>
<div class="set_detail">
<div class="top">
<el-input v-model="modelName" class="w-50 m-2" placeholder="请输入模型类型进行搜索" :suffix-icon="Search" />
<el-input
v-model="modelName"
class="w-50 m-2"
placeholder="请输入模型类型进行搜索"
:suffix-icon="Search"
/>
<button @click="setting" class="btn">
<svg-icon name="sys_set" class="setIcon" :size="12" color="rgba(255,255,255, 1)"
style="margin-right: 5px"></svg-icon>默认模型参数设置
<svg-icon
name="sys_set"
class="setIcon"
:size="12"
color="rgba(255,255,255, 1)"
style="margin-right: 5px"
></svg-icon
>默认模型参数设置
</button>
</div>
<div class="content">
<!-- 左侧Tab导航 -->
<div class="treeCon">
<el-tree style="max-width: 600px" :data="typeTreeData" ref="treeRef" node-key="id" empty-text=""
@node-click="handleTypeClick" :filter-node-method="filterNode">
<el-tree
style="max-width: 600px"
:data="typeTreeData"
ref="treeRef"
node-key="id"
empty-text=""
@node-click="handleTypeClick"
:filter-node-method="filterNode"
>
<template #default="{ node, data }">
<!-- <span> {{ node.label }}</span> -->
<span :class="{
'primary-type': !(node.childNodes.length != 0),
'selected-text': node.id === currentTypeId
}" @click.stop="toggleExpand(node)" class="allowDrag"
style="width: 100%; text-overflow: ellipsis; overflow: hidden" :title="node.label">
<svg-icon :name="node.expanded ? 'arrow' : 'more'" :size="12" color="rgba(var(--color-base1), 1)"
style="margin-right: 5px; margin-left: 5px" v-if="node.childNodes.length != 0"
@click.stop="toggleExpand(node)"></svg-icon>
{{ node.label }}</span>
<span
:class="{
'primary-type': !(node.childNodes.length != 0),
'selected-text': node.id === currentTypeId
}"
@click.stop="toggleExpand(node)"
class="allowDrag"
style="width: 100%; text-overflow: ellipsis; overflow: hidden"
:title="node.label"
>
<svg-icon
:name="node.expanded ? 'arrow' : 'more'"
:size="12"
color="rgba(var(--color-base1), 1)"
style="margin-right: 5px; margin-left: 5px"
v-if="node.childNodes.length != 0"
@click.stop="toggleExpand(node)"
></svg-icon>
{{ node.label }}</span
>
</template>
</el-tree>
</div>
@ -87,45 +141,98 @@
<div class="model-section" v-if="categories.length != 0">
<!-- <h2 class="section-title">{{ categories[Number(currentTypeId)].name }}</h2> -->
<div class="model-grid">
<div v-for="(model, mIndex) in categories" :key="mIndex" class="model-item"
@click="modelClick(mIndex, model)">
<div
v-for="(model, mIndex) in categories"
:key="mIndex"
class="model-item"
@click="modelClick(mIndex, model)"
>
<div class="imgbg">
<svg class="imgbg_svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="60.79296875" height="60.77734375" viewBox="0 0 60.79296875 60.77734375" fill="none"
preserveAspectRatio="none">
<path stroke="url(#linear_border_2296_2693_0)" stroke-width="1"
d="M1.27148 0.26416L60.5204 0.26416" />
<path stroke="url(#linear_border_2296_2694_0)" stroke-width="1"
d="M0.271484 1.26416L0.271484 60.5136" />
<path stroke="url(#linear_border_2296_2695_0)" stroke-width="1"
d="M60.5215 1.26416L60.5215 60.5136" />
<path stroke="url(#linear_border_2296_2696_0)" stroke-width="1"
d="M1.27148 60.5132L60.5204 60.5132" />
<svg
class="imgbg_svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="60.79296875"
height="60.77734375"
viewBox="0 0 60.79296875 60.77734375"
fill="none"
preserveAspectRatio="none"
>
<path
stroke="url(#linear_border_2296_2693_0)"
stroke-width="1"
d="M1.27148 0.26416L60.5204 0.26416"
/>
<path
stroke="url(#linear_border_2296_2694_0)"
stroke-width="1"
d="M0.271484 1.26416L0.271484 60.5136"
/>
<path
stroke="url(#linear_border_2296_2695_0)"
stroke-width="1"
d="M60.5215 1.26416L60.5215 60.5136"
/>
<path
stroke="url(#linear_border_2296_2696_0)"
stroke-width="1"
d="M1.27148 60.5132L60.5204 60.5132"
/>
<g opacity="0.5">
<rect x="0.521484375" y="0.51416015625" width="60" height="60" fill="rgb(var(--color-base1))"
fill-opacity="0.5" />
<rect
x="0.521484375"
y="0.51416015625"
width="60"
height="60"
fill="rgb(var(--color-base1))"
fill-opacity="0.5"
/>
</g>
<defs>
<linearGradient id="linear_border_2296_2693_0" x1="1.271484375" y1="0.26416015625"
x2="60.5205078125" y2="0.26416015625" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_border_2296_2693_0"
x1="1.271484375"
y1="0.26416015625"
x2="60.5205078125"
y2="0.26416015625"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.5555" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_border_2296_2694_0" x1="0.271484375" y1="1.26416015625"
x2="0.271484375" y2="60.513671875" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_border_2296_2694_0"
x1="0.271484375"
y1="1.26416015625"
x2="0.271484375"
y2="60.513671875"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.5555" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_border_2296_2695_0" x1="60.521484375" y1="1.26416015625"
x2="60.521484375" y2="60.513671875" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_border_2296_2695_0"
x1="60.521484375"
y1="1.26416015625"
x2="60.521484375"
y2="60.513671875"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.5555" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_border_2296_2696_0" x1="1.271484375" y1="60.51318359375"
x2="60.5205078125" y2="60.51318359375" gradientUnits="userSpaceOnUse">
<linearGradient
id="linear_border_2296_2696_0"
x1="1.271484375"
y1="60.51318359375"
x2="60.5205078125"
y2="60.51318359375"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
<stop offset="0.5555" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
@ -139,7 +246,11 @@
</el-image>
</div>
<div class="model-name" :class="{ isactive: activeIndex == mIndex }" :title="model.modelName">
<div
class="model-name"
:class="{ isactive: activeIndex == mIndex }"
:title="model.modelName"
>
{{ model.modelName }}
</div>
</div>
@ -409,8 +520,8 @@ const renderModel = async (data, model) => {
z
}
}
let Model = await new YJ.Obj.Model(window.earth, option);
(window as any)._entityMap.set(id, Model)
let Model = await new YJ.Obj.Model(window.earth, option)
;(window as any)._entityMap.set(id, Model)
let DbOption: any = {
params: option,
@ -428,7 +539,7 @@ const renderModel = async (data, model) => {
DbOption.params = JSON.stringify(DbOption.params)
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
// //鼠标右键点击事件
Model.onRightClick = () => { }
Model.onRightClick = () => {}
// window._entityMap.set(option.id, Model);
// Model.onClick = () => {
@ -540,8 +651,8 @@ defineExpose({
<style lang="scss" scoped>
.set_pup {
width: 40vw;
height: 50vh;
// width: 40vw;
// height: 50vh;
:deep(.el-dialog) {
background:
@ -597,7 +708,7 @@ defineExpose({
position: relative;
z-index: 1;
>svg {
> svg {
position: absolute;
top: 0;
left: 0;
@ -612,19 +723,23 @@ defineExpose({
box-sizing: border-box;
// height: 50vh;
:deep(.el-tabs--left .el-tabs__active-bar.is-left,
:deep(
.el-tabs--left .el-tabs__active-bar.is-left,
.el-tabs--left .el-tabs__active-bar.is-right,
.el-tabs--right .el-tabs__active-bar.is-left,
.el-tabs--right .el-tabs__active-bar.is-right) {
.el-tabs--right .el-tabs__active-bar.is-right
) {
width: 3px;
background: rgba(var(--color-base1), 1);
height: 40px !important;
}
:deep(.el-tabs--left .el-tabs__nav-wrap.is-left::after,
:deep(
.el-tabs--left .el-tabs__nav-wrap.is-left::after,
.el-tabs--left .el-tabs__nav-wrap.is-right::after,
.el-tabs--right .el-tabs__nav-wrap.is-left::after,
.el-tabs--right .el-tabs__nav-wrap.is-right::after) {
.el-tabs--right .el-tabs__nav-wrap.is-right::after
) {
width: 3px;
}
@ -681,29 +796,39 @@ defineExpose({
}
:deep(.el-tabs__item:hover) {
background: linear-gradient(90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 48.91%,
rgba(var(--color-base1), 0) 100%);
background: linear-gradient(
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 48.91%,
rgba(var(--color-base1), 0) 100%
);
border: 1px solid;
box-sizing: border-box;
border-image: linear-gradient(90deg,
border-image: linear-gradient(
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 1) 55.55%,
rgba(var(--color-base1), 0) 100%) 1;
rgba(var(--color-base1), 0) 100%
)
1;
}
:deep(.el-tabs__item.is-active) {
background: linear-gradient(90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 48.91%,
rgba(var(--color-base1), 0) 100%) !important;
background: linear-gradient(
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 48.91%,
rgba(var(--color-base1), 0) 100%
) !important;
border: 0.1px solid;
// box-sizing: border-box;
border-image: linear-gradient(90deg,
border-image: linear-gradient(
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 1) 55.55%,
rgba(var(--color-base1), 0) 100%) 1 !important;
rgba(var(--color-base1), 0) 100%
)
1 !important;
}
:deep(.el-tabs__header) {
@ -857,7 +982,7 @@ defineExpose({
// background-size: 100% 100%;
position: relative;
>.imgbg_svg {
> .imgbg_svg {
position: absolute;
top: 0;
left: 0;
@ -917,7 +1042,7 @@ defineExpose({
}
/* tree */
.el-tree-node__content>.el-tree-node__expand-icon {
.el-tree-node__content > .el-tree-node__expand-icon {
display: none !important;
}
@ -941,7 +1066,7 @@ defineExpose({
/* Element UI主色可自定义 */
}
::v-deep .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
border-right: 1px solid rgba(var(--color-base1), 0.2) !important;
}
</style>

View File

@ -499,8 +499,8 @@ defineExpose({
<style lang="scss" scoped>
.set_pup {
width: 40vw;
height: 50vh;
// width: 40vw;
// height: 50vh;
:deep(.el-dialog) {
background:

View File

@ -168,7 +168,7 @@ const remove = () => {
})
}
const changeRadius = (e)=>{
proxy.$handleInputLimit(e)
proxy?.$handleInputLimit(e)
if (radiusUnit.value == 'km') {
entityOptions.value.radius = radius.value * 1000
}

View File

@ -199,7 +199,7 @@ const remove = () => {
})
}
const changeRadius = (e) => {
proxy.$handleInputLimit(e)
proxy?.$handleInputLimit(e)
if (radiusUnit.value == 'km') {
entityOptions.value.radius = radius.value * 1000
}

View File

@ -2,12 +2,32 @@
<Dialog ref="baseDialog" :title="title" width="900px" left="calc(50% - 450px)" top="calc(50% - 360px)"
:closeCallback="closeCallback">
<template #content>
<span class="custom-divider"></span>
<div class="div-item" style="display: flex;">
<button @click="importHeader" style="margin-right: 15px;">
<svg class="icon-updateheigh">
<use xlink:href="#icon-importHeader"></use>
</svg>{{ t('vector.导入表头') }}
</button>
<button @click="downloadHeader">
<svg>
<use xlink:href="#icon-download"></use>
</svg>{{ t('vector.下载字典模板') }}
</button>
<button @click="exportExcel" style="position: absolute; right: 25px;">
<svg>
<use xlink:href="#icon-export"></use>
</svg>{{ t('vector.导出') }}
</button>
</div>
<span class="custom-divider"></span>
<div class="div-item">
<div class="row">
<div class="col">
<input type="text" placeholder="输入关键字搜索" v-model="keyword" @input="search">
<button class="btn" style="margin-left: 10px;" @click="exportExcel">导出</button>
<svg style="position: relative;left: -22px;width: 14px;height: 14px;">
<use xlink:href="#icon-search"></use>
</svg>
</div>
<div class="col">
<span class="label">名称字段选择</span>
@ -38,13 +58,10 @@
</div>
</div>
<div class="row">
<Pagination :total="total" v-model:page="pageNum" v-model:limit="pageSize" @pagination="getTableList" />
<Pagination :total="total" v-model:page="pageNum" v-model:limit="pageSize" :pageSizes="pageSizes" @pagination="getTableList" />
</div>
</div>
</template>
<template #footer>
<button @click="close">关闭</button>
</template>
</Dialog>
</template>
@ -52,9 +69,17 @@
import { ref } from 'vue'
import { inject } from 'vue'
import { TreeApi } from '@/api/tree'
import { GisApi } from '@/api/gisApi'
import { ElMessage, ElMessageBox } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue'
import {
$sendElectronChanel,
$recvElectronChanel,
$removeElectronChanel
} from '@/utils/communication'
import { useTreeNode } from '../tree/hooks/treeNode'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const FileSaver = require('file-saver')
const XLSX = require('xlsx')
@ -69,6 +94,7 @@ let originalOptions: any
let that: any
const tableData: any = ref([])
const total: any = ref(0)
const pageSizes: any = ref([20, 50, 100])
const pageSize: any = ref(20)
const pageNum: any = ref(1)
const maxPageNum: any = ref(0)
@ -80,6 +106,7 @@ const closeCallback = () => {
eventBus.emit("destroyComponent")
}
const getKeys = () => {
keyData.value = []
for (let key in that.geojson.features[0].properties) {
let label = key
for (let index = 0; index < that.options.headTables.length; index++) {
@ -219,9 +246,84 @@ const exportExcel = () => {
const data = new Blob([excelBuffer], { type: 'application/octet-stream' })
FileSaver.saveAs(data, title.value + '.xlsx')
}
const importHeader = () => {
let node
let selectNodes = getSelectedNodes(window.treeObj);
if (selectNodes && selectNodes[selectNodes.length - 1]) {
node = selectNodes[selectNodes.length - 1]
}
const dialogParams = {
properties: ["openFile", "multiSelections"],
filters: [
{
name: "excel",
extensions: ["csv"],
},
],
};
openDirectoryDialog(dialogParams, (paths) => {
if (!paths.length) {
return;
}
let entity = (window as any)._entityMap.get(node.id)
if (!entity) {
return
}
GisApi.parseCsv({ filePath: paths[0] }).then((res) => {
if (res.code === 0 || res.code === 200) {
let params = JSON.parse(node.params)
params.headTables = res.data
entity.options.headTables = [...params.headTables]
let params2 = {
"id": node.id,
"sourceName": node.sourceName,
"params": params,
"isShow": node.isShow ? 1 : 0,
}
TreeApi.updateDirectoryInfo(params2)
cusUpdateNode({ "id": params2.id, "sourceName": params2.sourceName, "params": JSON.stringify(params) })
getKeys()
}
})
});
}
const downloadHeader = async () => {
let p = 'csv'
const { ipcRenderer } = require('electron')
let availablePort = await ipcRenderer.invoke('get-available-port')
let url = `http://localhost:${availablePort}/excel/header.` + p
$sendElectronChanel('saveNetFile', {
title: '保存文件',
filename: '字典模板',
filters: [{ name: '保存文件', extensions: [p] }],
url
})
$recvElectronChanel('saveNetFileRes', (e, key) => {
console.log(key, 'key')
ElMessage({
message: '下载结束',
type: 'success'
})
$removeElectronChanel('saveNetFileRes', (res) => {
console.log(res)
})
})
}
const close = () => {
baseDialog.value?.close()
}
function openDirectoryDialog(option, cb) {
const { ipcRenderer } = require('electron')
ipcRenderer.send("open-directory-dialog", option);
ipcRenderer.once("selectedItem", (e, paths) => {
cb(paths);
});
}
defineExpose({
open,
close
@ -263,4 +365,9 @@ defineExpose({
}
}
}
.YJ-custom-base-dialog {
::v-deep .foot {
padding: 4px;
}
}
</style>

View File

@ -325,7 +325,7 @@ export const useTreeNode = () => {
allowChildren: false
},
vector: {
rightMenus: ['edit', 'del', 'setView', 'resetView', 'showAttr', 'importHeader']
rightMenus: ['edit', 'del', 'setView', 'resetView', 'showAttr']
// render: renderShp,
// detailFun: get_detail_shp,
// allowChildren: true,
@ -455,7 +455,6 @@ export const useTreeNode = () => {
else {
type = node.sourceType || node.type;
}
console.log("----------", type);
let name = [
"gdslImagery",
"gdlwImagery",

View File

@ -11,14 +11,8 @@
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
<!--底部菜单-->
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
<input
type="file"
id="fileInputlink"
style="display: none"
multiple
accept=".jpeg,.png,.jpg,.mp4,.pdf"
@input="uploadFile"
/>
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
@input="uploadFile" />
<!-- 多点视线分析 -->
<!-- <Visibility ref="visibility"></Visibility> -->
@ -179,7 +173,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
case 'vrImage':
currentComponent.value = billboardObject
await nextTick()
dynamicComponentRef.value?.open(id)
dynamicComponentRef.value?.open(id, sourceType)
break
case 'line':
currentComponent.value = polylineObject
@ -545,9 +539,9 @@ const getStatus = (time) => {
const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) {
;(window as any).checkAuthIsValid = true
; (window as any).checkAuthIsValid = true
} else {
;(window as any).checkAuthIsValid = false
; (window as any).checkAuthIsValid = false
}
}
@ -557,6 +551,122 @@ onMounted(async () => {
await YJ.on({ host: baseURL, token: localStorage.getItem('Authorization') })
createEarth()
})
// function getLatLngBySheetNumber(sheetNumber) {
// // 比例尺代码映射(逆向):代码 -> 比例尺及步长
// const scaleInfoMap = {
// '': { scale: '1:100万', lngStep: 6, latStep: 4 },
// 'B': { scale: '1:50万', lngStep: 3, latStep: 2 },
// 'C': { scale: '1:25万', lngStep: 1.5, latStep: 1 },
// 'D': { scale: '1:10万', lngStep: 0.5, latStep: 1 / 3 },
// 'E': { scale: '1:5万', lngStep: 0.25, latStep: 1 / 6 },
// 'F': { scale: '1:2.5万', lngStep: 0.125, latStep: 1 / 12 },
// 'G': { scale: '1:1万', lngStep: 0.0625, latStep: 1 / 24 },
// 'H': { scale: '1:5000', lngStep: 0.03125, latStep: 1 / 48 }
// };
// // 1:100万行号字母对应表A-V对应1-22
// const rowChars = 'ABCDEFGHIJKLMNOPQRSTUV';
// // 解析编号结构
// let scaleCode, row100WChar, col100W, subRow, subCol;
// // 1:100万编号格式1个字母 + 2位数字如J50
// if (sheetNumber.length === 3) {
// scaleCode = '';
// row100WChar = sheetNumber[0];
// col100W = parseInt(sheetNumber.slice(1), 10);
// subRow = 1; // 1:100万无细分默认第1行
// subCol = 1; // 1:100万无细分默认第1列
// }
// // 其他比例尺1个字母 + 2位数字 + 1位代码 + 3位行 + 3位列如J50E001001
// else if (sheetNumber.length === 10) {
// row100WChar = sheetNumber[0];
// col100W = parseInt(sheetNumber.slice(1, 3), 10);
// scaleCode = sheetNumber[3];
// subRow = parseInt(sheetNumber.slice(4, 7), 10);
// subCol = parseInt(sheetNumber.slice(7, 10), 10);
// } else {
// throw new Error('无效的图幅编号格式,请检查输入');
// }
// // 验证行字母合法性A-V
// const row100WIndex = rowChars.indexOf(row100WChar);
// if (row100WIndex === -1) {
// throw new Error('无效的1:100万图幅行字母必须为A-V');
// }
// const row100W = row100WIndex + 1; // 行号1-22
// // 验证列号合法性1-60
// if (col100W < 1 || col100W > 60) {
// throw new Error('无效的1:100万图幅列号必须为1-60');
// }
// // 验证比例尺代码和细分行列号
// const scaleInfo = scaleInfoMap[scaleCode];
// if (!scaleInfo) {
// throw new Error('不支持的比例尺代码必须为B-H或空');
// }
// if (subRow < 1 || subCol < 1) {
// throw new Error('细分行列号必须为正整数');
// }
// // 计算1:100万图幅的经纬度范围
// const minLng100W = (col100W - 31) * 6; // 1:100万图幅西边界经度
// const maxLng100W = minLng100W + 6; // 1:100万图幅东边界经度
// const maxLat100W = row100W * 4; // 1:100万图幅北边界纬度
// const minLat100W = maxLat100W - 4; // 1:100万图幅南边界纬度
// // 计算当前比例尺图幅在1:100万内的偏移量反推精确范围
// const { lngStep, latStep, scale } = scaleInfo;
// const minLng = minLng100W + (subCol - 1) * lngStep; // 图幅西边界经度
// const maxLng = minLng + lngStep; // 图幅东边界经度
// const maxLat = maxLat100W - (subRow - 1) * latStep; // 图幅北边界纬度(注意纬度方向是从北向南递增)
// const minLat = maxLat - latStep; // 图幅南边界纬度
// let object = {
// scale,
// longitude: [minLng, maxLng], // [西经, 东经]
// latitude: [minLat, maxLat] // [南纬, 北纬]
// }
// highlightSheetIndex(window.earth, object)
// return object;
// }
// function highlightSheetIndex(sdk, object) {
// let viewer = sdk.viewer;
// let height = 8849
// let positions = [
// Cesium.Cartesian3.fromDegrees(object.longitude[0], object.latitude[0], height),
// Cesium.Cartesian3.fromDegrees(object.longitude[1], object.latitude[0], height),
// Cesium.Cartesian3.fromDegrees(object.longitude[1], object.latitude[1], height),
// Cesium.Cartesian3.fromDegrees(object.longitude[0], object.latitude[1], height),
// Cesium.Cartesian3.fromDegrees(object.longitude[0], object.latitude[0], height),
// ]
// let gridPrimitives = new Cesium.PrimitiveCollection();
// gridPrimitives.name = 'highlightSheetIndexGridPrimitives';
// viewer.scene.primitives.add(gridPrimitives);
// const geometryInstances = new Cesium.GeometryInstance({
// geometry: new Cesium.PolylineGeometry({
// positions: positions,
// width: 5,
// vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
// arcType: Cesium.ArcType.RHUMB,
// })
// });
// gridPrimitives.add(new Cesium.Primitive({
// geometryInstances: geometryInstances,
// appearance: new Cesium.PolylineMaterialAppearance({
// material: Cesium.Material.fromType('Color', {
// color: Cesium.Color.fromCssColorString('#f00')
// })
// })
// }));
// }
// window.getLatLngBySheetNumber = getLatLngBySheetNumber
</script>
<style scoped lang="scss">

View File

@ -1,13 +1,7 @@
<template>
<div
class="login-container"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0"
>
<transition
name="video-fade"
mode="out-in"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
>
<div class="login-container" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0">
<transition name="video-fade" mode="out-in"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover">
<!-- 第一个视频播放一次 -->
<!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded"
src="../../assets/video/login_front.mp4"
@ -15,17 +9,11 @@
<!-- 第二个视频循环播放 -->
<!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> -->
<video
key="second-video"
autoplay
loop
muted
src="../../assets/video/author_video.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
></video>
<video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video>
</transition>
<!-- 登录页面 -->
<div class="rightBox" v-if="isDesktop && !isAuth">
<div class="rightBox" v-if="isDesktop">
<el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
<el-button size="small" :icon="SwitchButton" @click="goExit"> </el-button>
</div>
@ -39,95 +27,45 @@
</div>
</div>
</div>
<el-form
class="login-form"
autoComplete="on"
:model="loginForm"
:rules="loginRules"
ref="loginFormRef"
label-position="left"
>
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginFormRef"
label-position="left">
<el-form-item prop="username">
<el-input
name="username"
type="text"
v-model="loginForm.username"
autoComplete="on"
placeholder="请输入用户名"
:prefix-icon="User"
/>
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="请输入用户名"
:prefix-icon="User" />
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
@keyup.enter.native="handleLogin(loginFormRef)"
v-model="loginForm.password"
autoComplete="on"
placeholder="请输入密码"
:prefix-icon="Unlock"
show-password
></el-input>
<el-input type="password" @keyup.enter.native="handleLogin(loginFormRef)" v-model="loginForm.password"
autoComplete="on" placeholder="请输入密码" :prefix-icon="Unlock" show-password></el-input>
</el-form-item>
<el-form-item class="rememberForget">
<!-- justify-content: space-around;align-items: center; -->
<div style="display: flex">
<svg
class="checkbox-svg"
v-show="checkboxVModel"
style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill="rgba(var(--color-base1), 1)"
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"
></path>
<svg class="checkbox-svg" v-show="checkboxVModel" style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
viewBox="0 0 14 14" fill="none">
<path fill="rgba(var(--color-base1), 1)"
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z">
</path>
<path
d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z"
fill="#004242"
></path>
fill="#004242"></path>
</svg>
<svg
class="checkbox-svg"
v-show="!checkboxVModel"
style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill-rule="evenodd"
fill="url(#linear_border_2442_533_0)"
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"
></path>
<svg class="checkbox-svg" v-show="!checkboxVModel" style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
viewBox="0 0 14 14" fill="none">
<path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)"
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z">
</path>
<defs>
<linearGradient
id="linear_border_2442_533_0"
x1="0"
y1="-0.5574798583984375"
x2="12.1173095703125"
y2="12.878036499023438"
gradientUnits="userSpaceOnUse"
>
<linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125"
y2="12.878036499023438" gradientUnits="userSpaceOnUse">
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
<el-checkbox
:disabled="loading"
v-model="checkboxVModel"
@change="rememberpwd"
label="string"
>记住密码</el-checkbox
>
<el-checkbox :disabled="loading" v-model="checkboxVModel" @change="rememberpwd"
label="string">记住密码</el-checkbox>
<!-- <div style="cursor: pointer;">忘记密码</div> -->
</div>
</el-form-item>
@ -150,24 +88,15 @@
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
<div class="serviceContent">
<el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect">
<el-tab-pane
v-for="item in serviceOptions"
:label="item.name"
:name="item.name"
></el-tab-pane>
<el-tab-pane v-for="item in serviceOptions" :label="item.name" :name="item.name"></el-tab-pane>
</el-tabs>
<div class="tabPanel">
<template v-if="selectedService == '接口服务'">
<div class="item">
<span class="itemLabel">服务选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
<el-option
size="mini"
v-for="item in servOptions"
:key="item.value"
:label="item.name"
:value="item.name"
>
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
:value="item.name">
</el-option>
</el-select>
</div>
@ -199,13 +128,8 @@
<div class="item">
<span class="itemLabel">串口选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="gpsVal">
<el-option
size="mini"
v-for="item in gpsOptions"
:key="item.value"
:label="item.Product"
:value="item.Name"
>
<el-option size="mini" v-for="item in gpsOptions" :key="item.value" :label="item.Product"
:value="item.Name">
</el-option>
</el-select>
</div>
@ -220,14 +144,8 @@
</div>
</div>
<!-- 授权页面 -->
<Dialog
ref="baseDialog"
class="graffiti"
title="系统授权"
:closeCallback="closeCallBack"
left="calc(50vw - 188px)"
top="calc(50vh - 191px)"
>
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack" left="calc(50vw - 188px)"
top="calc(50vh - 191px)">
<template #content>
<div class="auth_info custom_scroll_bar content_h">
<div class="auth_info_box">
@ -235,12 +153,7 @@
<span class="fankuai"></span>
{{ t('auths.authCode') }}
</div>
<div
class="auth_info_text"
@click="copy(authInfo.license_code)"
style="cursor: pointer"
title="点击可复制"
>
<div class="auth_info_text" @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">
{{ authInfo.license_code || '' }}
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
</div>
@ -263,22 +176,13 @@
<span class="fankuai"></span>
{{ t('auths.authType') }}
</div>
<div
v-if="authInfo.status != null"
class="auth_info_text"
style="font-size: 16px"
:style="{
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
}"
>
<div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px" :style="{
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
}">
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
</div>
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
<div
v-else
class="auth_info_text"
style="font-size: 16px; color: rgba(241, 108, 85, 1)"
>
<div v-else class="auth_info_text" style="font-size: 16px; color: rgba(241, 108, 85, 1)">
{{ t('auths.noAuthexpire') }}
</div>
</div>
@ -294,6 +198,7 @@
</template>
<script setup lang="ts">
//@ts-nocheck
import { User, Unlock, Setting, SwitchButton } from '@element-plus/icons-vue'
import { useLogin } from './useLogin'
import { useSetUp } from './useSetUp'
@ -346,6 +251,7 @@ onMounted(() => {
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import useClipboard from 'vue-clipboard3'
import { ipcMain } from 'electron'
import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@ -478,9 +384,9 @@ const getAuthCode = async () => {
const res = await AuthApi.authInfo()
authInfo.value.license_code = res.data
}
setTimeout(() => {
getAuthCode()
}, 5000)
// setTimeout(() => {
// getAuthCode()
// }, 8000)
//复制
const copy = async (text) => {
@ -491,14 +397,28 @@ const copy = async (text) => {
ElMessage.error('复制失败')
}
}
if (!router.currentRoute.value.query.type) {
setTimeout(() => {
let isSeverInit = ipcRenderer.sendSync('judgment-isSeverInit');
// 如果服务端未初始化,等待初始化完成
if (isSeverInit) {
if (!router.currentRoute.value.query.type) {
getAuthCode()
getAuthInfo()
}, 5000)
} else {
isAuth.value = false
} else {
isAuth.value = false
}
}
else {
ipcRenderer.once('program-init', () => {
if (!router.currentRoute.value.query.type) {
getAuthCode()
getAuthInfo()
} else {
isAuth.value = false
}
})
}
</script>
<style lang="scss">
// 添加过渡样式
@ -778,7 +698,7 @@ if (!router.currentRoute.value.query.type) {
border-radius: 0 0 0 90%;
background: rgba(var(--color-base1), 1);
& > span {
&>span {
font-size: 1rem;
position: absolute;
right: 0px;
@ -875,8 +795,7 @@ if (!router.currentRoute.value.query.type) {
align-items: center;
margin: 15px 0;
.select {
}
.select {}
}
}
}
@ -913,6 +832,7 @@ if (!router.currentRoute.value.query.type) {
}
}
}
//授权
.auth_info {
width: 100%;
@ -964,8 +884,7 @@ if (!router.currentRoute.value.query.type) {
z-index: 99;
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
border: 1.5px solid;
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%)
1;
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
text-align: left;
font-family: 'sy-boldface';
}
@ -1011,11 +930,11 @@ if (!router.currentRoute.value.query.type) {
position: relative;
}
::v-deep .title-box > .close-box {
::v-deep .title-box>.close-box {
display: none;
}
::v-deep .title-box > .title {
::v-deep .title-box>.title {
font-family: 'Ali-mother-counts-bold';
font-size: 18px;
font-weight: 400;
@ -1038,7 +957,7 @@ if (!router.currentRoute.value.query.type) {
justify-content: center;
}
::v-deep .foot > button {
::v-deep .foot>button {
margin-left: 10px;
border-radius: 4px;
background: rgba(var(--color-base1), 0.2);
@ -1050,12 +969,12 @@ if (!router.currentRoute.value.query.type) {
cursor: pointer;
}
::v-deep .foot > button:hover {
::v-deep .foot>button:hover {
border: 1px solid rgba(var(--color-base1), 1);
color: rgba(var(--color-base1), 1);
}
::v-deep .foot > .show > .label {
::v-deep .foot>.show>.label {
margin: 0px 10px;
}
@ -1130,7 +1049,7 @@ if (!router.currentRoute.value.query.type) {
border-radius: 0 0 0 90%;
background: rgba(var(--color-base1), 1);
& > span {
&>span {
font-size: 1rem;
position: absolute;
right: 0px;
@ -1227,8 +1146,7 @@ if (!router.currentRoute.value.query.type) {
align-items: center;
margin: 15px 0;
.select {
}
.select {}
}
}
}
@ -1241,6 +1159,7 @@ if (!router.currentRoute.value.query.type) {
width: 166px;
height: 40px;
border-radius: 0;
::v-deep span {
font-weight: 500;
}
@ -1264,6 +1183,7 @@ if (!router.currentRoute.value.query.type) {
}
}
}
::v-deep .el-popper {
z-index: 9999 !important;
}