Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
This commit is contained in:
@ -8,7 +8,7 @@ Var defaultInstallDir
|
|||||||
IfFileExists "D:\*.*" DDriveExists CDriveDefault
|
IfFileExists "D:\*.*" DDriveExists CDriveDefault
|
||||||
|
|
||||||
CDriveDefault:
|
CDriveDefault:
|
||||||
StrCpy $defaultInstallDir "$PROGRAMFILES\${APP_ID}"
|
StrCpy $defaultInstallDir "D:\ProgramFiles\${APP_ID}"
|
||||||
Goto doneDetect
|
Goto doneDetect
|
||||||
|
|
||||||
DDriveExists:
|
DDriveExists:
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
src/renderer/components.d.ts
vendored
2
src/renderer/components.d.ts
vendored
@ -16,6 +16,7 @@ declare module 'vue' {
|
|||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
@ -27,6 +28,7 @@ declare module 'vue' {
|
|||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||||
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSlider: typeof import('element-plus/es')['ElSlider']
|
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||||
|
|||||||
@ -49,13 +49,8 @@
|
|||||||
--color-text-shadow: rgba(20, 118, 255, 1);
|
--color-text-shadow: rgba(20, 118, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .cesium-viewer.\32 d{
|
|
||||||
opacity: 0;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.cesium-viewer-cesiumWidgetContainer {
|
.cesium-viewer-cesiumWidgetContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) {
|
.cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) {
|
||||||
@ -176,14 +171,9 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog button:not(button[disabled]):hover {
|
.YJ-custom-base-dialog button:not(button[disabled]):hover {
|
||||||
border-color: rgba(var(--color-base1), 1) !important;
|
border-color: rgba(var(--color-base1), 1) !important;
|
||||||
color: rgba(var(--color-base1), 1) !important;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog button:not(button[disabled]):hover svg {
|
|
||||||
fill: rgba(var(--color-base1), 1) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog button:focus-visible {
|
.YJ-custom-base-dialog button:focus-visible {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@ -289,10 +279,6 @@
|
|||||||
padding: 0px 24px;
|
padding: 0px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .el-tabs .el-tabs__header {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .div-item {
|
.YJ-custom-base-dialog>.content .div-item {
|
||||||
/* border-top: 1px solid rgba(204, 204, 204, 0.2); */
|
/* border-top: 1px solid rgba(204, 204, 204, 0.2); */
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
@ -343,7 +329,7 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog>.content input,
|
.YJ-custom-base-dialog>.content input,
|
||||||
.YJ-custom-base-dialog>.content textarea {
|
.YJ-custom-base-dialog>.content textarea {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
border: 1px solid rgba(var(--color-base1), 0.5);
|
border: 1px solid rgba(var(--color-base1), 0.5);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@ -487,9 +473,6 @@
|
|||||||
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
|
|
||||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .table .table-empty {
|
.YJ-custom-base-dialog>.content .table .table-empty {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1792,7 +1775,7 @@
|
|||||||
|
|
||||||
/* 轨迹运动 */
|
/* 轨迹运动 */
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content {
|
.YJ-custom-base-dialog.trajectory-motion>.content {
|
||||||
width: 562px;
|
width: 550px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .div-item>.row>.col {
|
.YJ-custom-base-dialog.trajectory-motion>.content .div-item>.row>.col {
|
||||||
@ -1821,10 +1804,6 @@
|
|||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
|
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
|
||||||
border-color: rgba(var(--color-base1));
|
border-color: rgba(var(--color-base1));
|
||||||
color: rgba(var(--color-base1));
|
|
||||||
}
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active svg {
|
|
||||||
fill: rgba(var(--color-base1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
|
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
|
||||||
@ -1850,6 +1829,7 @@
|
|||||||
.YJ-custom-base-dialog.trajectory-motion>.content .icon-rubric {
|
.YJ-custom-base-dialog.trajectory-motion>.content .icon-rubric {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.trajectory-motion>.content .custom__popper__arrow::after {
|
.YJ-custom-base-dialog.trajectory-motion>.content .custom__popper__arrow::after {
|
||||||
@ -2539,8 +2519,8 @@
|
|||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2623,8 +2603,8 @@
|
|||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2683,8 +2663,8 @@
|
|||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||||
flex: 0 0 175px;
|
flex: 0 0 165px;
|
||||||
width: 175px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2766,7 +2746,7 @@
|
|||||||
|
|
||||||
/* 折线 */
|
/* 折线 */
|
||||||
.YJ-custom-base-dialog.polyline>.content {
|
.YJ-custom-base-dialog.polyline>.content {
|
||||||
width: 600px;
|
width: 580px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom {
|
.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom {
|
||||||
@ -3801,7 +3781,7 @@
|
|||||||
.yj-custom-icon {
|
.yj-custom-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 18px;
|
height: 10px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -352,5 +352,66 @@ export default {
|
|||||||
show: '文字显示',
|
show: '文字显示',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
// 态势部分
|
||||||
|
ts: {
|
||||||
|
historyDeduce: "历史推演",
|
||||||
|
deduceName: "推演名称",
|
||||||
|
deduceNamePlaceholder: "请输入推演名称",
|
||||||
|
creator: "创建人",
|
||||||
|
creatorPlaceholder: "请输入创建人姓名",
|
||||||
|
creationTime: "创建日期",
|
||||||
|
startPlaceholder: "开始日期",
|
||||||
|
endPlaceholder: "结束日期",
|
||||||
|
search: "搜索",
|
||||||
|
reset: "重置",
|
||||||
|
deduceDesc: "推演描述",
|
||||||
|
operation: "操作",
|
||||||
|
tooltipEdit: "编辑推演",
|
||||||
|
tooltipDetail: "详情",
|
||||||
|
tooltipDelete: "删除",
|
||||||
|
createPlan: "新建推演",
|
||||||
|
deduceDetail: "推演详情",
|
||||||
|
startTime: "仿真开始时间",
|
||||||
|
startTimePlaceholder: "请选择日期时间",
|
||||||
|
deduceDescPlaceholder: "请输入内容描述",
|
||||||
|
operationalTime: "作战时间",
|
||||||
|
enterTuiyan: "进入推演页面",
|
||||||
|
ersanwei: "二三维模式",
|
||||||
|
back: "返回",
|
||||||
|
exitTs: "退出方案库",
|
||||||
|
save: "保存",
|
||||||
|
cancel: "取消",
|
||||||
|
confirm: "确定",
|
||||||
|
standText: "立体文字",
|
||||||
|
layerCabin: "仿真演练图层指挥舱",
|
||||||
|
unfoldCabin: "展开指挥舱",
|
||||||
|
unfoldElement: "展开元素库",
|
||||||
|
fold: "收起",
|
||||||
|
element: "元素库",
|
||||||
|
model: "人工模型",
|
||||||
|
graph: "军事标绘",
|
||||||
|
baseLabel: "基础标绘",
|
||||||
|
effects: "特效",
|
||||||
|
"事件名称": "事件名称",
|
||||||
|
"开始时间": "开始时间",
|
||||||
|
"持续时间": "持续时间",
|
||||||
|
"删除": "删除",
|
||||||
|
"定位": "定位",
|
||||||
|
popconfirmTitle: "确定要删除吗?",
|
||||||
|
numberOfFlicker: "闪烁次数",
|
||||||
|
numberPlaceholder: "请输入闪烁次数",
|
||||||
|
selectEventToUpdate: "选中事件调整属性",
|
||||||
|
situationEvent: "态势事件",
|
||||||
|
hour: "时",
|
||||||
|
minute: "分",
|
||||||
|
second: "秒",
|
||||||
|
isContainModelPosition: "路径是否包含元素点位",
|
||||||
|
drawPath: "绘制路径",
|
||||||
|
directoryNamePlaceholder: "请输入文件夹名称",
|
||||||
|
name: "名称",
|
||||||
|
"添加态势事件": "添加态势事件",
|
||||||
|
"视角设定": "视角设定",
|
||||||
|
"重置视角": "重置视角",
|
||||||
}
|
}
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@ -353,5 +353,66 @@ export default {
|
|||||||
show: 'Text show',
|
show: 'Text show',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
// 态势部分
|
||||||
|
ts: {
|
||||||
|
historyDeduce: "History Deduction",
|
||||||
|
deduceName: "Deduction Name",
|
||||||
|
deduceNamePlaceholder: "Please enter the name of the deduction",
|
||||||
|
creator: "creator",
|
||||||
|
creatorPlaceholder: "Please enter the name of the creator",
|
||||||
|
creationTime: "creation time",
|
||||||
|
startPlaceholder: "start time",
|
||||||
|
endPlaceholder: "end time",
|
||||||
|
search: "search",
|
||||||
|
reset: "reset",
|
||||||
|
deduceDesc: "Deduction Description",
|
||||||
|
operation: "operation",
|
||||||
|
tooltipEdit: "Edit Deduction",
|
||||||
|
tooltipDetail: "Detail",
|
||||||
|
tooltipDelete: "Delete",
|
||||||
|
createPlan: "Create Plan",
|
||||||
|
deduceDetail: "Deduction Detail",
|
||||||
|
startTime: "Start Time",
|
||||||
|
startTimePlaceholder: "Please select Time",
|
||||||
|
deduceDescPlaceholder: "Please enter the description of the deduction",
|
||||||
|
operationalTime: "Operational Time",
|
||||||
|
enterTuiyan: "Enter play page",
|
||||||
|
ersanwei: "Two-dimensional and three-dimensional",
|
||||||
|
back: "back",
|
||||||
|
exitTs: "exit",
|
||||||
|
save: "save",
|
||||||
|
cancel: "cancel",
|
||||||
|
confirm: "confirm",
|
||||||
|
standText: "Stand Text",
|
||||||
|
layerCabin: "Layer Cabin",
|
||||||
|
unfoldCabin: "Unfold Cabin",
|
||||||
|
unfoldElement: "Unfold Element",
|
||||||
|
fold: "fold",
|
||||||
|
element: "element",
|
||||||
|
model: "model",
|
||||||
|
graph: "Military plotting",
|
||||||
|
baseLabel: "Base Label",
|
||||||
|
effects: "Effects",
|
||||||
|
"事件名称": "Event Name",
|
||||||
|
"开始时间": "Start Time",
|
||||||
|
"持续时间": "time of duration",
|
||||||
|
"删除": "delete",
|
||||||
|
"定位": "location",
|
||||||
|
popconfirmTitle: "Are you sure you want to delete it?",
|
||||||
|
numberOfFlicker: "Number Of Flicker",
|
||||||
|
numberPlaceholder: "Place enter number of flicker",
|
||||||
|
selectEventToUpdate: "Select Event To Update it",
|
||||||
|
situationEvent: "Situation Event",
|
||||||
|
hour: "hour",
|
||||||
|
minute: "minute",
|
||||||
|
second: "second",
|
||||||
|
isContainModelPosition: "Is Contain Position Of Model",
|
||||||
|
drawPath: "Draw Path",
|
||||||
|
directoryNamePlaceholder: "Place enter name of directory",
|
||||||
|
name: "name",
|
||||||
|
"添加态势事件": "Add situation event",
|
||||||
|
"视角设定": "Set View",
|
||||||
|
"重置视角": "Reset View",
|
||||||
}
|
}
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@ -351,5 +351,65 @@ export default {
|
|||||||
show: '文字顯示',
|
show: '文字顯示',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
ts: {
|
||||||
|
historyDeduce: "歷史推演",
|
||||||
|
deduceName: "推演名稱",
|
||||||
|
deduceNamePlaceholder: "請輸入推演名稱",
|
||||||
|
creator: "建立人",
|
||||||
|
creatorPlaceholder: "請輸入建立人姓名",
|
||||||
|
creationTime: "建立日期",
|
||||||
|
startPlaceholder: "開始日期",
|
||||||
|
endPlaceholder: "結束日期",
|
||||||
|
search: "搜尋",
|
||||||
|
reset: "重置",
|
||||||
|
deduceDesc: "推演描述",
|
||||||
|
operation: "操作",
|
||||||
|
tooltipEdit: "編輯推演",
|
||||||
|
tooltipDetail: "詳情",
|
||||||
|
tooltipDelete: "刪除",
|
||||||
|
createPlan: "新增推演",
|
||||||
|
deduceDetail: "推演詳情",
|
||||||
|
startTime: "模擬開始時間",
|
||||||
|
startTimePlaceholder: "請選擇日期時間",
|
||||||
|
deduceDescPlaceholder: "請輸入內容描述",
|
||||||
|
operationalTime: "作戰時間",
|
||||||
|
enterTuiyan: "進入推演頁面",
|
||||||
|
ersanwei: "二三維模式",
|
||||||
|
back: "返回",
|
||||||
|
exitTs: "退出方案庫",
|
||||||
|
save: "儲存",
|
||||||
|
cancel: "取消",
|
||||||
|
confirm: "確定",
|
||||||
|
standText: "立體文字",
|
||||||
|
layerCabin: "模擬演練圖層指揮艙",
|
||||||
|
unfoldCabin: "展開指揮艙",
|
||||||
|
unfoldElement: "展開元素庫",
|
||||||
|
fold: "收起",
|
||||||
|
element: "元素庫",
|
||||||
|
model: "人工模型",
|
||||||
|
graph: "軍事標繪",
|
||||||
|
baseLabel: "基礎標繪",
|
||||||
|
effects: "特效",
|
||||||
|
"事件名称": "事件名稱",
|
||||||
|
"开始时间": "開始時間",
|
||||||
|
"持续时间": "持續時間",
|
||||||
|
"删除": "刪除",
|
||||||
|
"定位": "定位",
|
||||||
|
popconfirmTitle: "確定要刪除嗎?",
|
||||||
|
numberOfFlicker: "閃爍次數",
|
||||||
|
numberPlaceholder: "請輸入閃爍次數",
|
||||||
|
selectEventToUpdate: "選中事件調整屬性",
|
||||||
|
situationEvent: "態勢事件",
|
||||||
|
hour: "時",
|
||||||
|
minute: "分",
|
||||||
|
second: "秒",
|
||||||
|
isContainModelPosition: "路徑是否包含元素點位",
|
||||||
|
drawPath: "繪製路徑",
|
||||||
|
directoryNamePlaceholder: "請輸入資料夾名稱",
|
||||||
|
name: "名稱",
|
||||||
|
"添加态势事件": "新增態勢事件",
|
||||||
|
"视角设定": "視角設定",
|
||||||
|
"重置视角": "重置視角",
|
||||||
}
|
}
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@ -8,21 +8,22 @@
|
|||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:on-error="handleError"
|
:on-error="handleError"
|
||||||
class="simple-upload"
|
class="simple-upload"
|
||||||
|
accept=".YJ"
|
||||||
>
|
>
|
||||||
<el-button class="clickBut" color="#005c5c" :loading="isUploading">
|
<el-button class="clickBut" color="#005c5c" :loading="isUploading">
|
||||||
<UploadFilled class="mr-2"/>
|
<UploadFilled class="mr-2" />
|
||||||
{{ t('auths.upload') }}
|
{{ t('auths.upload') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {UploadFilled} from '@element-plus/icons-vue'
|
import { UploadFilled } from '@element-plus/icons-vue'
|
||||||
import {ElMessage} from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import {useI18n} from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const {t} = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
// 组件属性
|
// 组件属性
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -53,7 +54,7 @@ const isUploading = ref(false)
|
|||||||
const uploadUrl = () => {
|
const uploadUrl = () => {
|
||||||
//process.env.BASE_API +
|
//process.env.BASE_API +
|
||||||
console.log(process.env.BASE_API, 'yyyyy')
|
console.log(process.env.BASE_API, 'yyyyy')
|
||||||
let url = (localStorage.getItem("ip") || 'http://127.0.0.1:8848') + '/auth/import'
|
let url = (localStorage.getItem('ip') || 'http://127.0.0.1:8848') + '/auth/import'
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
// 上传前处理
|
// 上传前处理
|
||||||
|
|||||||
@ -3,22 +3,22 @@
|
|||||||
<div class="miniCabin" :style="!mini?'display:none':''">
|
<div class="miniCabin" :style="!mini?'display:none':''">
|
||||||
<div class="switch-node-outer" @click="mini=false">
|
<div class="switch-node-outer" @click="mini=false">
|
||||||
<div class="switch-node-inner">
|
<div class="switch-node-inner">
|
||||||
展开指挥舱
|
{{ t('ts.unfoldCabin') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cabin" :style="mini?'display:none':''">
|
<div class="cabin" :style="mini?'display:none':''">
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<span class="title">仿真演练图层指挥舱</span>
|
<span class="title">{{ t('ts.layerCabin') }}</span>
|
||||||
<span class="close" @click="mini=true">
|
<span class="close" @click="mini=true">
|
||||||
<svg-icon :size="15" class="icon-svg-item" name="closeRightTs"/>收起
|
<svg-icon :size="15" class="icon-svg-item" name="closeRightTs"/>{{ t('ts.fold') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchKey"
|
v-model="searchKey"
|
||||||
class="responsive-input"
|
class="responsive-input"
|
||||||
placeholder="搜索"
|
:placeholder=" t('ts.search') "
|
||||||
:prefix-icon="Search"
|
:prefix-icon="Search"
|
||||||
@input="clearResult"
|
@input="clearResult"
|
||||||
id="keyword"
|
id="keyword"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
plain
|
plain
|
||||||
@click="searchPlace"
|
@click="searchPlace"
|
||||||
id="queryButton"
|
id="queryButton"
|
||||||
>搜索
|
>{{ t('ts.search') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="treeBox custom_scroll_bar_ts">
|
<div class="treeBox custom_scroll_bar_ts">
|
||||||
@ -56,7 +56,9 @@ import {showRightMenuTs} from "./tree"
|
|||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
import {initMapData} from "./entity";
|
import {initMapData} from "./entity";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const rightMenuRef: any = ref()
|
const rightMenuRef: any = ref()
|
||||||
const treeObj = ref() //树形的实例
|
const treeObj = ref() //树形的实例
|
||||||
let zNodes: any = ref([])//树形结构数据
|
let zNodes: any = ref([])//树形结构数据
|
||||||
@ -356,6 +358,7 @@ let rightClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let selectNodes = getSelectedNodes(treeObj.value)
|
let selectNodes = getSelectedNodes(treeObj.value)
|
||||||
|
// console.log("selectNodes", selectNodes)
|
||||||
let isnewSelect = true //是否为新选中
|
let isnewSelect = true //是否为新选中
|
||||||
selectNodes.forEach((item: any) => {
|
selectNodes.forEach((item: any) => {
|
||||||
if (treeNode && item.id == treeNode.id) isnewSelect = false
|
if (treeNode && item.id == treeNode.id) isnewSelect = false
|
||||||
@ -363,14 +366,15 @@ let rightClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
|||||||
if (!event.ctrlKey && (selectNodes.length < 2 || isnewSelect))
|
if (!event.ctrlKey && (selectNodes.length < 2 || isnewSelect))
|
||||||
cusSelectNode(treeObj.value, treeNode)
|
cusSelectNode(treeObj.value, treeNode)
|
||||||
let menus = showRightMenuTs(event, treeObj.value, getSelectedNodes(treeObj.value), nodeType)
|
let menus = showRightMenuTs(event, treeObj.value, getSelectedNodes(treeObj.value), nodeType)
|
||||||
if (canCheckType.includes(treeNode.sourceType) && treeNode.sourceType != 'directory') {
|
// console.log("menus", menus)
|
||||||
|
if (treeNode && canCheckType.includes(treeNode.sourceType) && treeNode.sourceType != 'directory') {
|
||||||
let customView
|
let customView
|
||||||
let entity = window['_entityMap'].get(treeNode.id)
|
let entity = window['_entityMap'].get(treeNode.id)
|
||||||
customView = Boolean(entity.customView && entity.customView.orientation)
|
customView = Boolean(entity.customView && entity.customView.orientation)
|
||||||
|
|
||||||
menus = [...menus, customView ? 'resetView' : 'setView']
|
menus = [...menus, customView ? 'resetView' : 'setView']
|
||||||
}
|
}
|
||||||
console.log('menus', menus)
|
// console.log('menus', menus)
|
||||||
if (menus.length == 0) {
|
if (menus.length == 0) {
|
||||||
// $changeComponentShow('.rightMenu', false)
|
// $changeComponentShow('.rightMenu', false)
|
||||||
return
|
return
|
||||||
@ -378,7 +382,7 @@ let rightClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
rightMenuRef.value.initMenus(menus, treeNode)
|
rightMenuRef.value.initMenus(menus, treeNode)
|
||||||
})
|
})
|
||||||
console.log("树形节点右键点击", treeNode)
|
// console.log("树形节点右键点击", treeNode)
|
||||||
}
|
}
|
||||||
const setting = {
|
const setting = {
|
||||||
edit: {
|
edit: {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="MouseRight">
|
<div class="MouseRight">
|
||||||
<div v-for="item in menus" class="item" @click="item.fun">
|
<div v-for="item in menus" class="item" @click="item.fun">
|
||||||
<svg-icon :name="item.key" :size="14"></svg-icon>
|
<svg-icon :name="item.key" :size="14"></svg-icon>
|
||||||
{{ item.name }}
|
{{ t(`ts.${item.name}`) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -12,7 +12,9 @@ import {ref} from 'vue'
|
|||||||
import {TsApi} from "../../../api/ts";
|
import {TsApi} from "../../../api/ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {useRightOperate} from './rightOperate'
|
import {useRightOperate} from './rightOperate'
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
let {delNode, addEvent} = useRightOperate()
|
let {delNode, addEvent} = useRightOperate()
|
||||||
|
|
||||||
const eventBus: any = inject("bus");
|
const eventBus: any = inject("bus");
|
||||||
|
|||||||
@ -11,22 +11,22 @@
|
|||||||
秒
|
秒
|
||||||
</div>-->
|
</div>-->
|
||||||
<div>
|
<div>
|
||||||
闪烁次数
|
{{ t('ts.numberOfFlicker') }}
|
||||||
<el-input v-model="detail.numbers" style="width: 50%" placeholder="请输入闪烁次数"/>
|
<el-input v-model="detail.numbers" style="width: 50%" :placeholder="t('ts.numberPlaceholder')"/>
|
||||||
次
|
次
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="optBtn">
|
<div class="optBtn">
|
||||||
<el-button @click="updateEvent">确定</el-button>
|
<el-button @click="updateEvent">{{ t('ts.confirm') }}</el-button>
|
||||||
<el-button @click="cancel">取消</el-button>
|
<el-button @click="cancel">{{ t('ts.cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="tourBox">
|
<div class="tourBox">
|
||||||
<img src="../../../assets/img/tour.png">
|
<img src="../../../assets/img/tour.png">
|
||||||
<p>选中事件调整属性</p>
|
<p>{{ t('ts.selectEventToUpdate') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@ -36,7 +36,9 @@
|
|||||||
import {inject, ref} from 'vue'
|
import {inject, ref} from 'vue'
|
||||||
import {TsApi} from "../../../api/ts";
|
import {TsApi} from "../../../api/ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const times = ref(0)
|
const times = ref(0)
|
||||||
const numbers = ref(0)
|
const numbers = ref(0)
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="grid" @click="hideRightMenu">
|
<div class="grid" @click="hideRightMenu">
|
||||||
<div class="grid-header row">
|
<div class="grid-header row">
|
||||||
<div v-for="item in columns" :style="item.style">{{ item.name }}</div>
|
<div class="oneLine" v-for="item in columns" :style="item.style" :title="t('ts.' + item.name)">
|
||||||
|
{{ t('ts.' + item.name) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-body">
|
<div class="grid-body">
|
||||||
<div :class="['row',(eventObj&&event.id==eventObj.id)?'selectedRow':'']" :style="getStyle"
|
<div :class="['row',(eventObj&&event.id==eventObj.id)?'selectedRow':'']" :style="getStyle"
|
||||||
v-for="(event) in eventList" @click.right="(e)=>{rightClick(e,event)}">
|
v-for="(event) in eventList" @click.right="(e)=>{rightClick(e,event)}">
|
||||||
<span v-for="item in columns" :class="item.key" :style="item.style">{{
|
<span v-for="item in columns" :class="[item.key,'oneLine']" :style="item.style"
|
||||||
|
:title="format(item.key, event[item.key])">{{
|
||||||
format(item.key, event[item.key])
|
format(item.key, event[item.key])
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -17,9 +20,30 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="gridRightMenu" v-if="rightClickEvent">
|
<div class="gridRightMenu" v-if="rightClickEvent">
|
||||||
<template v-for="item in menus">
|
<template v-for="(item,index) in menus">
|
||||||
<template v-if="item.name=='删除'">
|
<template v-if="item.name=='删除'">
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
|
width="220"
|
||||||
|
icon-color="#626AEF"
|
||||||
|
:title="t('ts.popconfirmTitle')"
|
||||||
|
@cancel="onCancel"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<span @click="">删除</span>
|
||||||
|
</template>
|
||||||
|
<template #actions="{ confirm, cancel }">
|
||||||
|
<el-button size="small" @click="cancel">{{ t('ts.cancel') }}</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="()=>{item.fun(); confirm()}"
|
||||||
|
>
|
||||||
|
{{ t('ts.confirm') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
|
|
||||||
|
<!-- <el-popconfirm
|
||||||
width="220"
|
width="220"
|
||||||
icon-color="#626AEF"
|
icon-color="#626AEF"
|
||||||
title="确定要删除吗?"
|
title="确定要删除吗?"
|
||||||
@ -38,10 +62,10 @@
|
|||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>-->
|
||||||
</template>
|
</template>
|
||||||
<span v-else @click="item.fun()">
|
<span v-else @click="item.fun()">
|
||||||
{{ item.name }}
|
{{ t('ts.' + item.name) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +78,10 @@ import {computed, onMounted, ref, nextTick} from "vue"
|
|||||||
import {TsApi} from "../../../api/ts";
|
import {TsApi} from "../../../api/ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import * as electron from "electron";
|
import * as electron from "electron";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
|
const visible = ref(false)
|
||||||
|
const {t} = useI18n()
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const props = defineProps(['eventList',])
|
const props = defineProps(['eventList',])
|
||||||
const menus = ref([
|
const menus = ref([
|
||||||
@ -86,6 +113,12 @@ const menus = ref([
|
|||||||
}
|
}
|
||||||
},]
|
},]
|
||||||
)
|
)
|
||||||
|
// 1. 必加:绑定显示状态(之前缺失的核心)
|
||||||
|
const isPopconfirmShow = ref(false);
|
||||||
|
// 2. 手动触发气泡框显示(确保点击一定触发)
|
||||||
|
const triggerPopconfirm = () => {
|
||||||
|
isPopconfirmShow.value = true;
|
||||||
|
};
|
||||||
const clicked = ref(false)
|
const clicked = ref(false)
|
||||||
const delEvent = (ids, cb) => {
|
const delEvent = (ids, cb) => {
|
||||||
TsApi.delEvent(ids).then(res => {
|
TsApi.delEvent(ids).then(res => {
|
||||||
@ -105,10 +138,15 @@ function onCancel() {
|
|||||||
clicked.value = true
|
clicked.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const confirmEvent = () => {
|
||||||
|
console.log('confirm!')
|
||||||
|
}
|
||||||
|
const cancelEvent = () => {
|
||||||
|
console.log('cancel!')
|
||||||
|
}
|
||||||
let eventObj = ref(null)
|
let eventObj = ref(null)
|
||||||
let rightClickEvent = ref(null)
|
let rightClickEvent = ref(null)
|
||||||
let columns = ref([{name: '事件名称', key: "name", style: "flex:auto"},
|
let columns = ref([{name: '事件名称', key: "name", style: "width:210px"},
|
||||||
{name: '开始时间', key: "startTime", style: "width:120px"},
|
{name: '开始时间', key: "startTime", style: "width:120px"},
|
||||||
{name: '持续时间', key: "duration_time", style: "width:70px"}])
|
{name: '持续时间', key: "duration_time", style: "width:70px"}])
|
||||||
// let eventList = ref([])
|
// let eventList = ref([])
|
||||||
|
|||||||
@ -183,8 +183,11 @@ export const useRightOperate = () => {
|
|||||||
|
|
||||||
})*/
|
})*/
|
||||||
}
|
}
|
||||||
const editNode = () => {
|
const editNode = (node, eventBus) => {
|
||||||
console.log("编辑节点")
|
console.log("编辑节点", node)
|
||||||
|
if (node) {
|
||||||
|
eventBus.emit("openDialog", node.sourceType, node.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const addEvent = (node, eventBus) => {
|
const addEvent = (node, eventBus) => {
|
||||||
eventBus.emit('openAddEvent', node)
|
eventBus.emit('openAddEvent', node)
|
||||||
|
|||||||
@ -12,14 +12,14 @@
|
|||||||
<div class="boxBody">
|
<div class="boxBody">
|
||||||
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="80px"
|
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="80px"
|
||||||
@keyup.enter.native="submitForm(ruleForm)">
|
@keyup.enter.native="submitForm(ruleForm)">
|
||||||
<el-form-item label="名称:" prop="sourceName">
|
<el-form-item :label="t('ts.name')+':'" prop="sourceName">
|
||||||
<!-- @input="removeSpaces" -->
|
<!-- @input="removeSpaces" -->
|
||||||
<el-input v-model.trim="form.sourceName" placeholder="图层文件夹"></el-input>
|
<el-input v-model.trim="form.sourceName" :placeholder="t('ts.directoryNamePlaceholder')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="btnOption">
|
<div class="btnOption">
|
||||||
<el-button type="primary" @click="submitForm(ruleForm)">确定</el-button>
|
<el-button type="primary" @click="submitForm(ruleForm)">{{ t('ts.confirm') }}</el-button>
|
||||||
<el-button @click="cancel">取消</el-button>
|
<el-button @click="cancel">{{ t('ts.cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -35,7 +35,9 @@ import {ElMessage, FormInstance} from 'element-plus'
|
|||||||
import {TreeApi} from '@/api/tree'
|
import {TreeApi} from '@/api/tree'
|
||||||
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
||||||
import {addMapSource} from "../entity";
|
import {addMapSource} from "../entity";
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const {getKeyOfSelectedNode, getSelectedNode, cusAddNodes, getSameLevel} = useTreeNode()
|
const {getKeyOfSelectedNode, getSelectedNode, cusAddNodes, getSameLevel} = useTreeNode()
|
||||||
const title = ref('添加文件夹')
|
const title = ref('添加文件夹')
|
||||||
let form: any = reactive({
|
let form: any = reactive({
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit ts-zyl ">
|
<div class="edit ts-zyl ">
|
||||||
<div class="leftTimeDesc">
|
<div class="leftTimeDesc">
|
||||||
<span>作战时间:{{ stamp }}</span>
|
<span>{{ t('ts.operationalTime') }}:{{ stamp }}</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="box-item"
|
class="box-item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="推演描述"
|
:content="t('ts.deduceDesc')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<svg-icon @click="showInfo" :size="20" class="icon-svg-item" name="des_detail"/>
|
<svg-icon @click="showInfo" :size="20" class="icon-svg-item" name="des_detail"/>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="box-item"
|
class="box-item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="item.name"
|
:content="t('ts.'+item.name)"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<svg-icon @click="item.fun" :size="35" class="icon-svg-item" :name="item.iconName"/>
|
<svg-icon @click="item.fun" :size="35" class="icon-svg-item" :name="item.iconName"/>
|
||||||
@ -36,11 +36,12 @@
|
|||||||
<div id="earthContainer" class="fullSize"></div>
|
<div id="earthContainer" class="fullSize"></div>
|
||||||
<cabin ref="cabin"></cabin>
|
<cabin ref="cabin"></cabin>
|
||||||
<element></element>
|
<element></element>
|
||||||
|
|
||||||
<deduction :TSOBJ="tsOBJ"></deduction>
|
<deduction :TSOBJ="tsOBJ"></deduction>
|
||||||
<newEvent></newEvent>
|
<newEvent></newEvent>
|
||||||
<addDirectory class="adddirectoryBox absolute zIndex999"></addDirectory>
|
<addDirectory class="adddirectoryBox absolute zIndex999"></addDirectory>
|
||||||
<mouseRight></mouseRight>
|
<mouseRight></mouseRight>
|
||||||
|
<component :is="currentComponent" ref="dynamicComponentRef"/>
|
||||||
<!-- 方案描述编辑框 -->
|
<!-- 方案描述编辑框 -->
|
||||||
<el-dialog width="20vw" v-model="isShowPup" :modal="false" draggable>
|
<el-dialog width="20vw" v-model="isShowPup" :modal="false" draggable>
|
||||||
<template #header>
|
<template #header>
|
||||||
@ -100,8 +101,8 @@
|
|||||||
<el-input type="textarea" :rows="7" v-model="des_detail"></el-input>
|
<el-input type="textarea" :rows="7" v-model="des_detail"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align: right;margin-top: 15px">
|
<div style="text-align: right;margin-top: 15px">
|
||||||
<el-button @click="submit">保存</el-button>
|
<el-button @click="submit">{{ t('ts.save') }}</el-button>
|
||||||
<el-button @click="isShowPup=false">取消</el-button>
|
<el-button @click="isShowPup=false">{{ t('ts.cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 立体文字内容 -->
|
<!-- 立体文字内容 -->
|
||||||
@ -155,7 +156,7 @@
|
|||||||
</clipPath>
|
</clipPath>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
立体文字
|
{{ t('ts.standText') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -163,8 +164,8 @@
|
|||||||
<el-input type="textarea" v-model="standText"></el-input>
|
<el-input type="textarea" v-model="standText"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align: right;margin-top: 15px">
|
<div style="text-align: right;margin-top: 15px">
|
||||||
<el-button @click="()=>{submitStandText(true)}">保存</el-button>
|
<el-button @click="()=>{submitStandText(true)}">{{ t('ts.save') }}</el-button>
|
||||||
<el-button @click="()=>{submitStandText(false)}">取消</el-button>
|
<el-button @click="()=>{submitStandText(false)}">{{ t('ts.cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -172,7 +173,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//@ts-nocheck
|
//@ts-nocheck
|
||||||
import {ref, reactive, onMounted, nextTick, onUnmounted,} from "vue";
|
import {ref, reactive, onMounted, nextTick, onUnmounted, shallowRef,} from "vue";
|
||||||
import {useRouter, useRoute} from "vue-router";
|
import {useRouter, useRoute} from "vue-router";
|
||||||
import Cabin from "./cabin.vue"
|
import Cabin from "./cabin.vue"
|
||||||
import Element from "./element.vue"
|
import Element from "./element.vue"
|
||||||
@ -186,7 +187,12 @@ import {TsApi} from "../../api/ts";
|
|||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {addMapSource} from "../../common/addMapSource";
|
import {addMapSource} from "../../common/addMapSource";
|
||||||
import {$changeComponentShow} from "../../utils/communication";
|
import {$changeComponentShow} from "../../utils/communication";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
import billboardObject from "./edit/billboardObjectTs.vue";
|
||||||
|
import polylineObject from "./edit/polylineObjectTs.vue";
|
||||||
|
import polygonObject from "./edit/polygonObjectTs.vue";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const planInfo = ref({})
|
const planInfo = ref({})
|
||||||
const isShowPup = ref(false)
|
const isShowPup = ref(false)
|
||||||
const showStandText = ref(false)
|
const showStandText = ref(false)
|
||||||
@ -197,11 +203,11 @@ const stamp = ref("")
|
|||||||
const rightMenus = ref([
|
const rightMenus = ref([
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "进入推演页面", iconName: "playTs", fun: () => {
|
name: "enterTuiyan", iconName: "playTs", fun: () => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "二三维模式", iconName: "ersan_ts", fun: () => {
|
name: "ersanwei", iconName: "ersan_ts", fun: () => {
|
||||||
if (YJ.Global.multiViewportMode.getSdk().sdkD) {
|
if (YJ.Global.multiViewportMode.getSdk().sdkD) {
|
||||||
YJ.Global.multiViewportMode.off(window['earth_ts'])
|
YJ.Global.multiViewportMode.off(window['earth_ts'])
|
||||||
} else {
|
} else {
|
||||||
@ -213,14 +219,13 @@ const rightMenus = ref([
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "返回", iconName: "backTs", fun: () => {
|
name: "back", iconName: "backTs", fun: () => {
|
||||||
router.back()
|
router.back()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "退出方案库", iconName: "exitTs", fun: () => {
|
name: "exitTs", iconName: "exitTs", fun: () => {
|
||||||
router.push({path: '/home'})
|
router.push({path: '/home'})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -236,6 +241,8 @@ for (const routeQueryKey in route.query) {
|
|||||||
params[routeQueryKey] = Number(route.query[routeQueryKey])
|
params[routeQueryKey] = Number(route.query[routeQueryKey])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let currentComponent = shallowRef()
|
||||||
|
let dynamicComponentRef = ref()
|
||||||
console.log("params", params)
|
console.log("params", params)
|
||||||
window.planId = params.id
|
window.planId = params.id
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
@ -309,6 +316,7 @@ eventBus.on('open-standText', (currentDrawItemres) => {
|
|||||||
currentDrawItem.value = currentDrawItemres
|
currentDrawItem.value = currentDrawItemres
|
||||||
})
|
})
|
||||||
eventBus.on('add-event', (task) => {
|
eventBus.on('add-event', (task) => {
|
||||||
|
console.log("dd-even", task)
|
||||||
tsOBJ.value._Store._tasks = [...tsOBJ.value._Store._tasks, task]
|
tsOBJ.value._Store._tasks = [...tsOBJ.value._Store._tasks, task]
|
||||||
})
|
})
|
||||||
// 新建态势推演对象
|
// 新建态势推演对象
|
||||||
@ -400,6 +408,39 @@ const handleClick = (e) => {
|
|||||||
|
|
||||||
$changeComponentShow('.rightMenuTs', false)
|
$changeComponentShow('.rightMenuTs', false)
|
||||||
}
|
}
|
||||||
|
eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||||
|
if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
|
||||||
|
dynamicComponentRef.value.close()
|
||||||
|
}
|
||||||
|
switch (sourceType) {
|
||||||
|
case 'point':
|
||||||
|
currentComponent.value = billboardObject
|
||||||
|
await nextTick()
|
||||||
|
dynamicComponentRef.value?.open(id, sourceType)
|
||||||
|
break
|
||||||
|
case 'line':
|
||||||
|
currentComponent.value = polylineObject
|
||||||
|
await nextTick()
|
||||||
|
dynamicComponentRef.value?.open(id, sourceType)
|
||||||
|
break
|
||||||
|
case 'panel':
|
||||||
|
currentComponent.value = polygonObject
|
||||||
|
await nextTick()
|
||||||
|
dynamicComponentRef.value?.open(id)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
id && dynamicComponentRef.value && (dynamicComponentRef.value.id = id)
|
||||||
|
})
|
||||||
|
eventBus.on('destroyComponent', (id) => {
|
||||||
|
if (id) {
|
||||||
|
if (dynamicComponentRef.value && dynamicComponentRef.value.id == id) {
|
||||||
|
dynamicComponentRef.value?.close()
|
||||||
|
currentComponent.value = undefined
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentComponent.value = undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
922
src/renderer/src/views/TS/edit/billboardObjectTs.vue
Normal file
922
src/renderer/src/views/TS/edit/billboardObjectTs.vue
Normal file
@ -0,0 +1,922 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog ref="baseDialog" :title="t('dialog.point.title')" left="180px" top="100px" :className="'billboard-object'"
|
||||||
|
:closeCallback="closeCallback">
|
||||||
|
<template #content>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane :label="t('general.基础信息')" name="1">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row">
|
||||||
|
<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('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('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('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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 50%;">
|
||||||
|
<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"/>
|
||||||
|
</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"/>
|
||||||
|
</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"/>
|
||||||
|
</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">{{ t('general.视野缩放') }}</span>
|
||||||
|
<input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance"/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<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"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<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"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane :label="t('general.属性信息')" name="2">
|
||||||
|
<attribute :entityOptions="entityOptions"></attribute>
|
||||||
|
</el-tab-pane>-->
|
||||||
|
<el-tab-pane :label="t('general.空间信息')" name="3">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col height-mode-box">
|
||||||
|
<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">{{ 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"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<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">{{
|
||||||
|
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)">
|
||||||
|
<input type="checkbox" class="YJ-custom-checkbox" v-model="format2"/>
|
||||||
|
<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)">
|
||||||
|
<input type="checkbox" class="YJ-custom-checkbox" v-model="format3"/>
|
||||||
|
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none;white-space: nowrap;">{{
|
||||||
|
t('general.度分秒格式')
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div style="flex: 1">
|
||||||
|
<div class="proj-input-box" v-show="format1">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<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">{{ t('general.纬度') }}</span>
|
||||||
|
<input class="input lat" readonly :value="entityOptions.lat"/>
|
||||||
|
</div>
|
||||||
|
<div class="col"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="proj-input-box" style="width: 56%" v-show="format2">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex-direction: column">
|
||||||
|
<div class="row" style="margin-bottom: 15px">
|
||||||
|
<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">{{ 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">{{ t('general.分') }}</span>
|
||||||
|
<span class="top-line"></span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<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">{{ 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">{{ t('general.分') }}</span>
|
||||||
|
<span class="bottom-line"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="proj-input-box" style="width: 70%" v-show="format3">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex-direction: column">
|
||||||
|
<div class="row" style="margin-bottom: 15px">
|
||||||
|
<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">{{ 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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="position: absolute; left: 24px; display: flex">
|
||||||
|
<button @click="updateHeight">
|
||||||
|
<svg class="icon-updateheigh">
|
||||||
|
<use xlink:href="#yj-icon-updateheight"></use>
|
||||||
|
</svg>
|
||||||
|
{{ t('general.更新高程') }}
|
||||||
|
</button>
|
||||||
|
<button style="margin-left: 10px" @click="translate">{{ t('general.平移') }}</button>
|
||||||
|
</div>
|
||||||
|
<!--<button @click="remove">{{ t('general.删除') }}</button>-->
|
||||||
|
<button @click="confirm">{{ t('general.确定') }}</button>
|
||||||
|
<button @click="close">{{ t('general.关闭') }}</button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {ref} from 'vue'
|
||||||
|
import {inject} from 'vue'
|
||||||
|
// 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'
|
||||||
|
import {TsApi} from "../../../api/ts";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
|
|
||||||
|
const {cusUpdateNode, getSelectedNodes, cusRemoveNode} = useTreeNode()
|
||||||
|
|
||||||
|
const baseDialog: any = ref(null)
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
|
const epsg_map = ref([
|
||||||
|
{
|
||||||
|
name: 'WGS 84 / UTM zone 3N',
|
||||||
|
epsg: 'EPSG:32603',
|
||||||
|
def: '+proj=utm +zone=3 +datum=WGS84 +units=m +no_defs'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
let array: any[] = []
|
||||||
|
for (const [key, value] of window['earth_ts'].proj.epsg_map) {
|
||||||
|
let item = structuredClone(value)
|
||||||
|
item.name = item.name + `(${item.epsg}})`
|
||||||
|
array.push(item)
|
||||||
|
}
|
||||||
|
epsg_map.value = array
|
||||||
|
|
||||||
|
const format1 = ref(true)
|
||||||
|
const format2 = ref(false)
|
||||||
|
const format3 = ref(false)
|
||||||
|
const lngDmD = ref('')
|
||||||
|
const lngDmM = ref('')
|
||||||
|
const latDmD = ref('')
|
||||||
|
const latDmM = ref('')
|
||||||
|
const lngDmsD = ref('')
|
||||||
|
const lngDmsM = ref('')
|
||||||
|
const latDmsD = ref('')
|
||||||
|
const latDmsM = ref('')
|
||||||
|
const lngDmsS = ref('')
|
||||||
|
const latDmsS = ref('')
|
||||||
|
|
||||||
|
const fontList = ref([{
|
||||||
|
name: '黑体',
|
||||||
|
value: '黑体',
|
||||||
|
font: 'SimHei',
|
||||||
|
key: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '思源黑体',
|
||||||
|
value: '思源黑体',
|
||||||
|
font: 'SourceHanSansTi',
|
||||||
|
key: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '庞门正道标题体',
|
||||||
|
value: '庞门正道标题体',
|
||||||
|
font: 'PMZDBTTi',
|
||||||
|
key: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '数黑体',
|
||||||
|
value: '数黑体',
|
||||||
|
font: 'AlimamaShuHeiTi',
|
||||||
|
key: 3
|
||||||
|
}])
|
||||||
|
const height = ref(0)
|
||||||
|
const heightModeData = ref([
|
||||||
|
{
|
||||||
|
name: '海拔高度',
|
||||||
|
value: '海拔高度',
|
||||||
|
key: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '相对地表',
|
||||||
|
value: '相对地表',
|
||||||
|
key: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '依附地表',
|
||||||
|
value: '依附地表',
|
||||||
|
key: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '依附模型',
|
||||||
|
value: '依附模型',
|
||||||
|
key: 3
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const activeName = ref('1')
|
||||||
|
const entityOptions: any = ref({})
|
||||||
|
const x = ref()
|
||||||
|
const y = ref()
|
||||||
|
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, type) => {
|
||||||
|
that = window['earth_ts'].entityMap.get(id)
|
||||||
|
sourceType.value = type
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
entityOptions.value = that
|
||||||
|
heightMode.value = entityOptions.value.heightMode
|
||||||
|
projConvert()
|
||||||
|
heightModeChange(heightMode.value)
|
||||||
|
x.value = that.lng
|
||||||
|
y.value = that.lat
|
||||||
|
z.value = that.alt
|
||||||
|
baseDialog.value?.open()
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
|
let labelColorPicker = new window.YJColorPicker({
|
||||||
|
el: labelColorRef.value,
|
||||||
|
size: 'mini', //颜色box类型
|
||||||
|
alpha: true, //是否开启透明度
|
||||||
|
defaultColor: entityOptions.value.labelColor,
|
||||||
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
|
sure: (color) => {
|
||||||
|
entityOptions.value.labelColor = color
|
||||||
|
}, //点击确认按钮事件回调
|
||||||
|
clear: () => {
|
||||||
|
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 = () => {
|
||||||
|
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||||
|
that.positionEditing = false
|
||||||
|
that.reset()
|
||||||
|
eventBus?.emit('destroyComponent')
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeName = (e) => {
|
||||||
|
entityOptions.value.labelText = e.target.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const coordinateChange = () => {
|
||||||
|
let position = window['earth_ts'].proj.convert(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
x: entityOptions.value.lng || 0,
|
||||||
|
y: entityOptions.value.lat || 0,
|
||||||
|
z: entityOptions.value.alt || 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'EPSG:4326',
|
||||||
|
coordinate.value
|
||||||
|
).points
|
||||||
|
x.value = position[0].x
|
||||||
|
y.value = position[0].y
|
||||||
|
z.value = position[0].z
|
||||||
|
}
|
||||||
|
|
||||||
|
const heightModeChange = (val) => {
|
||||||
|
switch (val) {
|
||||||
|
case 0:
|
||||||
|
case '0':
|
||||||
|
height.value = entityOptions.value.alt || 0
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
case '1':
|
||||||
|
if (window['earth_ts'].viewer.scene.terrainProvider.availability) {
|
||||||
|
window.Cesium.sampleTerrainMostDetailed(window['earth_ts'].viewer.scene.terrainProvider, [
|
||||||
|
window.Cesium.Cartographic.fromDegrees(entityOptions.value.lng, entityOptions.value.lat)
|
||||||
|
]).then((position) => {
|
||||||
|
height.value = (entityOptions.value.alt || 0) - Number(position[0].height.toFixed(2))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
height.value = entityOptions.value.alt || 0
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
case '2':
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
case '3':
|
||||||
|
let objectsToExclude: any[] = []
|
||||||
|
for (let [key, value] of window['earth_ts'].entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push((value as any).entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entityOptions.value
|
||||||
|
.getClampToHeight(entityOptions.value.options.position, objectsToExclude)
|
||||||
|
.then((h) => {
|
||||||
|
height.value = Number(h.toFixed(2))
|
||||||
|
entityOptions.value.alt = Number(h.toFixed(2))
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
|
that.heightMode = val
|
||||||
|
}
|
||||||
|
|
||||||
|
const changLng = () => {
|
||||||
|
entityOptions.value.lng = entityOptions.value.lng || 0
|
||||||
|
projConvert()
|
||||||
|
coordinateChange()
|
||||||
|
}
|
||||||
|
const changLat = () => {
|
||||||
|
entityOptions.value.lat = entityOptions.value.lat || 0
|
||||||
|
projConvert()
|
||||||
|
coordinateChange()
|
||||||
|
}
|
||||||
|
const changAlt = () => {
|
||||||
|
entityOptions.value.alt = entityOptions.value.alt || 0
|
||||||
|
heightModeChange(heightMode.value)
|
||||||
|
coordinateChange()
|
||||||
|
}
|
||||||
|
|
||||||
|
const changHeight = () => {
|
||||||
|
switch (heightMode.value) {
|
||||||
|
case 0:
|
||||||
|
entityOptions.value.alt = Number(Number(height.value).toFixed(2))
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
if (window['earth_ts'].viewer.scene.terrainProvider.availability) {
|
||||||
|
window.Cesium.sampleTerrainMostDetailed(window['earth_ts'].viewer.scene.terrainProvider, [
|
||||||
|
window.Cesium.Cartographic.fromDegrees(entityOptions.value.lng, entityOptions.value.lat)
|
||||||
|
]).then((position) => {
|
||||||
|
entityOptions.value.alt = Number(height.value) + Number(position[0].height.toFixed(2))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
entityOptions.value.alt = Number(height.value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
changAlt()
|
||||||
|
coordinateChange()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatChange = (val) => {
|
||||||
|
switch (val) {
|
||||||
|
case 1:
|
||||||
|
format1.value = true
|
||||||
|
format2.value = false
|
||||||
|
format3.value = false
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
format1.value = false
|
||||||
|
format2.value = true
|
||||||
|
format3.value = false
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
format1.value = false
|
||||||
|
format2.value = false
|
||||||
|
format3.value = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const projConvert = () => {
|
||||||
|
let lng,
|
||||||
|
lat,
|
||||||
|
lngDM,
|
||||||
|
latDM,
|
||||||
|
lngDMS,
|
||||||
|
latDMS,
|
||||||
|
lngdnArr1,
|
||||||
|
lngdnArr2,
|
||||||
|
latdnArr1,
|
||||||
|
latdnArr2,
|
||||||
|
lngdnsArr1,
|
||||||
|
lngdnsArr2,
|
||||||
|
lngdnsArr3,
|
||||||
|
latdnsArr1,
|
||||||
|
latdnsArr2,
|
||||||
|
latdnsArr3
|
||||||
|
lng = entityOptions.value.lng || 0
|
||||||
|
lat = entityOptions.value.lat || 0
|
||||||
|
lngDM = that._proj.degreesToDMS(lng, true)
|
||||||
|
latDM = that._proj.degreesToDMS(lat, true)
|
||||||
|
lngdnArr1 = lngDM.split('°')
|
||||||
|
lngdnArr2 = lngdnArr1[1].split("'")
|
||||||
|
latdnArr1 = latDM.split('°')
|
||||||
|
latdnArr2 = latdnArr1[1].split("'")
|
||||||
|
lngDmD.value = lngdnArr1[0]
|
||||||
|
lngDmM.value = lngdnArr2[0]
|
||||||
|
latDmD.value = latdnArr1[0]
|
||||||
|
latDmM.value = latdnArr2[0]
|
||||||
|
lngDMS = that._proj.degreesToDMS(lng)
|
||||||
|
latDMS = that._proj.degreesToDMS(lat)
|
||||||
|
lngdnsArr1 = lngDMS.split('°')
|
||||||
|
lngdnsArr2 = lngdnsArr1[1].split("'")
|
||||||
|
lngdnsArr3 = lngdnsArr2[1].split('"')
|
||||||
|
latdnsArr1 = latDMS.split('°')
|
||||||
|
latdnsArr2 = latdnsArr1[1].split("'")
|
||||||
|
latdnsArr3 = latdnsArr2[1].split('"')
|
||||||
|
lngDmsD.value = lngdnsArr1[0]
|
||||||
|
lngDmsM.value = lngdnsArr2[0]
|
||||||
|
lngDmsS.value = lngdnsArr3[0]
|
||||||
|
latDmsD.value = latdnsArr1[0]
|
||||||
|
latDmsM.value = latdnsArr2[0]
|
||||||
|
latDmsS.value = latdnsArr3[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateHeight = () => {
|
||||||
|
entityOptions.value.updateHeight().then(() => {
|
||||||
|
changAlt()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const translate = () => {
|
||||||
|
that.openPositionEditing(() => {
|
||||||
|
changAlt()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const confirm = () => {
|
||||||
|
entityOptions.value.labelText = entityOptions.value.labelText || t("default.untitled")
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
baseDialog.value?.close()
|
||||||
|
let params = structuredClone(that.options)
|
||||||
|
delete params.host
|
||||||
|
delete params.attribute.rtmp
|
||||||
|
let params2 = {
|
||||||
|
id: params.id,
|
||||||
|
sourceName: params.name,
|
||||||
|
detail: JSON.stringify(params),
|
||||||
|
isShow: params.show ? 1 : 0
|
||||||
|
}
|
||||||
|
TsApi.updateTsSource(params2).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({type: "success", message: "操作成功"})
|
||||||
|
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const close = () => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
const clickChangeImage = () => {
|
||||||
|
eventBus?.emit('openPhoto', (img) => {
|
||||||
|
entityOptions.value.billboardImage = img
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const clickChangeDefaultImage = () => {
|
||||||
|
eventBus?.emit('openPhoto', (img) => {
|
||||||
|
entityOptions.value.billboardDefaultImage = img
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const fontChange = (val) => {
|
||||||
|
entityOptions.value.labelFontFamily = 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()
|
||||||
|
(window as any)._entityMap.delete(source_ids[0])
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
message: res.msg || '删除失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
})
|
||||||
|
}*/
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.billboard-object {
|
||||||
|
.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),
|
||||||
|
.attribute-content-rtmp .table .tr .th:nth-child(2),
|
||||||
|
.attribute-content-rtmp .table .tr .td:nth-child(2) {
|
||||||
|
width: 284px;
|
||||||
|
flex: 0 0 284px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.attribute-content-link .table .tr .td.operation button,
|
||||||
|
.attribute-content-vr .table .tr .td.operation button,
|
||||||
|
.attribute-content-rtmp .table .tr .td.operation button {
|
||||||
|
width: 76px !important;
|
||||||
|
flex: 0 0 76px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
393
src/renderer/src/views/TS/edit/polygonObjectTs.vue
Normal file
393
src/renderer/src/views/TS/edit/polygonObjectTs.vue
Normal file
@ -0,0 +1,393 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog ref="baseDialog" :title="title+'属性'" left="180px" top="100px" className="polygon"
|
||||||
|
:closeCallback="closeCallback">
|
||||||
|
<template #content>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row" style="align-items: flex-start;">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">名称</span>
|
||||||
|
<input class="input" maxlength="40" type="text" v-model="entityOptions.name">
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 60%;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label" style="margin-right: 0px;">投影面积:</span>
|
||||||
|
<input class="input input-text" readonly type="text" v-model="area">
|
||||||
|
<el-select v-model="areaUnit">
|
||||||
|
<el-option label="平方米" value="m2"></el-option>
|
||||||
|
<el-option label="平方千米" value="km2"></el-option>
|
||||||
|
<el-option label="亩" value="mu"></el-option>
|
||||||
|
<el-option label="公顷" value="ha"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row">
|
||||||
|
<el-tabs v-model="activeName">
|
||||||
|
<!-- <el-tab-pane label="属性信息" name="1">
|
||||||
|
<attribute :entityOptions="entityOptions"></attribute>
|
||||||
|
</el-tab-pane>-->
|
||||||
|
<el-tab-pane label="空间信息" 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">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">Z值统一增加</span>
|
||||||
|
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
|
||||||
|
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
|
||||||
|
@input="$handleInputLimit"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
<button class="confirm height-confirm" style="margin-left: 5px;" @click="heightConfirm"
|
||||||
|
:disabled="heightMode == 2">应用
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="table spatial-info-table">
|
||||||
|
<div class="table-head">
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th"></div>
|
||||||
|
<div class="th">经度(X)</div>
|
||||||
|
<div class="th">纬度(Y)</div>
|
||||||
|
<div class="th">高度(Z)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-body">
|
||||||
|
<div class="tr" v-for="(item, i) in entityOptions.options.positions" :key="i">
|
||||||
|
<div class="td">{{ i + 1 }}</div>
|
||||||
|
<div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number"
|
||||||
|
v-model="item.lng" min="-180" max="180"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'lng'" @input="$handleInputLimit"/>
|
||||||
|
<span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number"
|
||||||
|
v-model="item.lat" min="-180" max="180"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'lat'" @input="$handleInputLimit">
|
||||||
|
<span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')"
|
||||||
|
@input="$handleInputLimit">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number"
|
||||||
|
v-model="entityOptions.height" min="-9999999" max="999999999"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'alt'">
|
||||||
|
<span style="pointer-events: none;" v-else>{{ (entityOptions.height).toFixed(2) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="面风格" name="3">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">面颜色</span>
|
||||||
|
<div class="color" ref="colorRef"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">描边颜色</span>
|
||||||
|
<div class="lineColor" ref="lineColorRef"></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" max="99" v-model="entityOptions.lineWidth"
|
||||||
|
@input="$handleInputLimit">
|
||||||
|
<span class="unit">px</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane label="标签风格" name="4">
|
||||||
|
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</el-tab-pane>-->
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="position: absolute; left: 24px; display: flex;">
|
||||||
|
<button @click="nodeEdit">
|
||||||
|
<svg class="icon-edit">
|
||||||
|
<use xlink:href="#yj-icon-edit"></use>
|
||||||
|
</svg>
|
||||||
|
二次编辑
|
||||||
|
</button>
|
||||||
|
<button style="margin-left: 10px;" @click="translate">
|
||||||
|
<svg class="icon-py">
|
||||||
|
<use xlink:href="#yj-icon-py"></use>
|
||||||
|
</svg>
|
||||||
|
平移
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!--<button @click="remove">删除</button>-->
|
||||||
|
<button @click="confirm">确定</button>
|
||||||
|
<button @click="close">关闭</button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {ref} from 'vue';
|
||||||
|
import {inject} from "vue";
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
import {TreeApi} from '@/api/tree'
|
||||||
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
||||||
|
import {TsApi} from "../../../api/ts";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
|
const {cusUpdateNode, getSelectedNodes, cusRemoveNode} = useTreeNode()
|
||||||
|
|
||||||
|
const title = ref('面')
|
||||||
|
const baseDialog: any = ref(null);
|
||||||
|
const eventBus: any = inject("bus");
|
||||||
|
const options = ref({});
|
||||||
|
const colorRef = ref(null)
|
||||||
|
const lineColorRef = ref(null)
|
||||||
|
eventBus.on("openPolygonEdit", () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
});
|
||||||
|
|
||||||
|
const area = ref(0)
|
||||||
|
const areaUnit = ref('m2')
|
||||||
|
const height = ref(10)
|
||||||
|
const heightModeData = ref([
|
||||||
|
{
|
||||||
|
name: '海拔高度',
|
||||||
|
value: '海拔高度',
|
||||||
|
key: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '相对地表',
|
||||||
|
value: '相对地表',
|
||||||
|
key: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '依附模型',
|
||||||
|
value: '依附模型',
|
||||||
|
key: 2
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const activeName = ref('2')
|
||||||
|
const activeTd = ref({
|
||||||
|
index: -1,
|
||||||
|
name: ''
|
||||||
|
})
|
||||||
|
const positions = ref([])
|
||||||
|
const heightMode = ref(0)
|
||||||
|
const entityOptions: any = ref({});
|
||||||
|
let originalOptions: any
|
||||||
|
let that: any
|
||||||
|
|
||||||
|
const open = async (id: any, type: any) => {
|
||||||
|
if (type && type === 'rectangle') {
|
||||||
|
title.value = '矩形'
|
||||||
|
} else if (type && type === 'rendezvous') {
|
||||||
|
title.value = '集结地'
|
||||||
|
}
|
||||||
|
that = window['earth_ts'].entityMap.get(id)
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
entityOptions.value = that
|
||||||
|
heightMode.value = entityOptions.value.heightMode
|
||||||
|
area.value = entityOptions.value.areaByMeter
|
||||||
|
positions.value = structuredClone(that.options.positions)
|
||||||
|
that.areaChangeCallBack = () => {
|
||||||
|
switch (areaUnit.value) {
|
||||||
|
case 'm2'://平方米
|
||||||
|
area.value = entityOptions.value.areaByMeter
|
||||||
|
break
|
||||||
|
case 'km2'://平方千米
|
||||||
|
area.value = Number((entityOptions.value.areaByMeter / 1000000).toFixed(8))
|
||||||
|
break
|
||||||
|
case 'mu'://亩
|
||||||
|
area.value = Number(
|
||||||
|
(entityOptions.value.areaByMeter / 666.6666667).toFixed(4)
|
||||||
|
)
|
||||||
|
break
|
||||||
|
case 'ha'://公顷
|
||||||
|
area.value = Number((entityOptions.value.areaByMeter / 10000).toFixed(6))
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
area.value = entityOptions.value.areaByMeter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
heightModeChange(heightMode.value)
|
||||||
|
baseDialog.value?.open()
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
|
let colorPicker = new window.YJColorPicker({
|
||||||
|
el: colorRef.value,
|
||||||
|
size: 'mini', //颜色box类型
|
||||||
|
alpha: true, //是否开启透明度
|
||||||
|
defaultColor: entityOptions.value.color,
|
||||||
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
|
sure: color => {
|
||||||
|
entityOptions.value.color = color
|
||||||
|
}, //点击确认按钮事件回调
|
||||||
|
clear: () => {
|
||||||
|
entityOptions.value.color = 'rgba(255,255,255,1)'
|
||||||
|
} //点击清空按钮事件回调
|
||||||
|
})
|
||||||
|
let linecolorPicker = new window.YJColorPicker({
|
||||||
|
el: lineColorRef.value,
|
||||||
|
size: 'mini', //颜色box类型
|
||||||
|
alpha: true, //是否开启透明度
|
||||||
|
defaultColor: entityOptions.value.lineColor,
|
||||||
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
|
sure: color => {
|
||||||
|
entityOptions.value.lineColor = color
|
||||||
|
}, //点击确认按钮事件回调
|
||||||
|
clear: () => {
|
||||||
|
entityOptions.value.lineColor = 'rgba(255,255,255,1)'
|
||||||
|
} //点击清空按钮事件回调
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const heightModeChange = (val) => {
|
||||||
|
that.heightMode = heightMode.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const heightConfirm = () => {
|
||||||
|
if (entityOptions.value.operate.positionEditing) {
|
||||||
|
that.positionEditing = false
|
||||||
|
entityOptions.value.height = Number((entityOptions.value.height + Number(height.value)).toFixed(2))
|
||||||
|
} else {
|
||||||
|
that.closeNodeEdit(this)
|
||||||
|
that.heightMode = that.heightMode
|
||||||
|
setTimeout(() => {
|
||||||
|
entityOptions.value.height = Number((entityOptions.value.height + Number(height.value)).toFixed(2))
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const inputDblclick = async (event, i, anme) => {
|
||||||
|
if (heightMode.value == 2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
activeTd.value = {
|
||||||
|
index: i,
|
||||||
|
name: anme
|
||||||
|
}
|
||||||
|
await nextTick()
|
||||||
|
let inputElm = event.target.getElementsByClassName('input')[0]
|
||||||
|
if (inputElm) {
|
||||||
|
inputElm.focus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const inputBlurCallBack = (event, i, name, digit = 2) => {
|
||||||
|
activeTd.value = {
|
||||||
|
index: -1,
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const translate = () => {
|
||||||
|
that.openPositionEditing(() => {
|
||||||
|
entityOptions.value.options.positions = structuredClone(that.options.positions)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeCallback = () => {
|
||||||
|
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||||
|
that.positionEditing = false
|
||||||
|
entityOptions.value.closeNodeEdit()
|
||||||
|
entityOptions.value.reset()
|
||||||
|
eventBus.emit("destroyComponent")
|
||||||
|
}
|
||||||
|
|
||||||
|
const nodeEdit = () => {
|
||||||
|
that.nodeEdit((e, positions, areaByMeter) => {
|
||||||
|
console.log('positions', positions)
|
||||||
|
entityOptions.value.options.positions = structuredClone(positions)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const confirm = () => {
|
||||||
|
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
let params = structuredClone(that.options)
|
||||||
|
baseDialog.value?.close()
|
||||||
|
delete params.host
|
||||||
|
let params2 = {
|
||||||
|
id: params.id,
|
||||||
|
sourceName: params.name,
|
||||||
|
detail: JSON.stringify(params),
|
||||||
|
isShow: params.show ? 1 : 0
|
||||||
|
}
|
||||||
|
TsApi.updateTsSource(params2).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({type: "success", message: "操作成功"})
|
||||||
|
cusUpdateNode({id: params.id, sourceName: params.name, "params": JSON.stringify(params)})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const close = () => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
const remove = () => {
|
||||||
|
close()
|
||||||
|
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||||
|
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||||
|
const res = await TreeApi.removeDirectory({ids: source_ids})
|
||||||
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
that.remove()
|
||||||
|
(window as any)._entityMap.delete(source_ids[0])
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
message: res.msg || '删除失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => areaUnit.value,
|
||||||
|
(val) => {
|
||||||
|
if ((entityOptions.value.areaByMeter || entityOptions.value.areaByMeter == 0) && that) {
|
||||||
|
that.areaChangeCallBack()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{immediate: true}
|
||||||
|
);
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
574
src/renderer/src/views/TS/edit/polylineObjectTs.vue
Normal file
574
src/renderer/src/views/TS/edit/polylineObjectTs.vue
Normal file
@ -0,0 +1,574 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog ref="baseDialog" title="线标注" left="180px" top="100px" className="polyline" :closeCallback="closeCallback">
|
||||||
|
<template #content>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row" style="align-items: flex-start">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">名称</span>
|
||||||
|
<input class="input" maxlength="40" type="text" v-model="entityOptions.name"/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 56%">
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col input-select-unit-box">
|
||||||
|
<el-select v-model="wordsName" @change="changeWordsName">
|
||||||
|
<el-option label="空间长度" :value="0"></el-option>
|
||||||
|
<el-option label="投影长度" :value="1"></el-option>
|
||||||
|
<el-option label="地表长度" :value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<input v-model="length" class="input-text" readonly/>
|
||||||
|
<el-select v-model="lengthUnit">
|
||||||
|
<el-option label="米" value="m"></el-option>
|
||||||
|
<el-option label="千米" value="km"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<div class="div-item">
|
||||||
|
<!--<setStyle type="线" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle>-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">线条颜色</span>
|
||||||
|
<div class="color" ref="colorRef"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 33%">
|
||||||
|
<span class="label">线条宽度</span>
|
||||||
|
<div class="input-number input-number-unit-1" style="width: 80px">
|
||||||
|
<input class="input" type="number" title="" min="1" max="999" @input="$handleInputLimit"
|
||||||
|
v-model="entityOptions.lineWidth"/>
|
||||||
|
<span class="unit">px</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col input-select-line-type-box" style="flex: 0 0 37%">
|
||||||
|
<span class="label">线条形式</span>
|
||||||
|
<el-select class="input input-select input-select-line-type" style="margin-left: 20px"
|
||||||
|
v-model="entityOptions.lineType" @change="lineTypechange">
|
||||||
|
<el-option v-for="item in lineTypeData" :key="item.key" :label="item.name" :value="item.key">
|
||||||
|
<i class="yj-custom-icon" :class="item.icon"></i>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">首尾相连</span>
|
||||||
|
<input class="btn-switch" type="checkbox" v-model="entityOptions.noseToTail"/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 33%">
|
||||||
|
<span class="label">线段圆滑</span>
|
||||||
|
<input class="btn-switch" type="checkbox" v-model="entityOptions.smooth"/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 37%"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">线段缓冲</span>
|
||||||
|
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" @change="lineExtendchange"/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 33%">
|
||||||
|
<span class="label">缓冲宽度</span>
|
||||||
|
<div class="input-number input-number-unit-1" style="width: 80px">
|
||||||
|
<input class="input" type="number" title="" min="0" data-min="0.01" max="999999"
|
||||||
|
@input="$handleInputLimit" v-model="entityOptions.extendWidth"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 37%">
|
||||||
|
<span class="label">缓冲颜色</span>
|
||||||
|
<div class="extendColor" ref="extendColorRef"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" v-show="entityOptions.lineType > 2 && entityOptions.lineType < 13">
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">首尾反向</span>
|
||||||
|
<input class="btn-switch" type="checkbox" v-model="entityOptions.rotate"/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 33%">
|
||||||
|
<span class="label">流动速率</span>
|
||||||
|
<div class="input-number input-number-unit-1" style="width: 80px">
|
||||||
|
<input class="input" type="number" title="" min="0" max="999999" step="1" @input="$handleInputLimit"
|
||||||
|
v-model="entityOptions.speed"/>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 37%">
|
||||||
|
<span class="label lineSpace"
|
||||||
|
v-show="entityOptions.lineType > 2 && entityOptions.lineType >= 5">线条间距</span>
|
||||||
|
<div class="input-number input-number-unit-1 lineSpace" style="width: 80px"
|
||||||
|
v-show="entityOptions.lineType > 2 && entityOptions.lineType >= 5">
|
||||||
|
<input class="input" type="number" title="" min="0" max="4.5" step="0.1" @input="$handleInputLimit"
|
||||||
|
v-model="entityOptions.space"/>
|
||||||
|
<span class="unit">倍</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="row">
|
||||||
|
<el-tabs v-model="activeName">
|
||||||
|
<!-- <el-tab-pane label="属性信息" name="1">
|
||||||
|
<attribute :entityOptions="entityOptions"></attribute>
|
||||||
|
</el-tab-pane>-->
|
||||||
|
<el-tab-pane label="空间信息" 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">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">Z值统一增加</span>
|
||||||
|
<div class="input-number input-number-unit-1 height-box" :class="{ disabled: heightMode == 2 }">
|
||||||
|
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
|
||||||
|
@input="$handleInputLimit"/>
|
||||||
|
<span class="unit">m</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
<button class="confirm height-confirm" style="margin-left: 5px" @click="heightConfirm"
|
||||||
|
:disabled="heightMode == 2">
|
||||||
|
应用
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="table spatial-info-table">
|
||||||
|
<div class="table-head">
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th"></div>
|
||||||
|
<div class="th">经度(X)</div>
|
||||||
|
<div class="th">纬度(Y)</div>
|
||||||
|
<div class="th">高度(Z)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-body">
|
||||||
|
<div class="tr" v-for="(item, i) in entityOptions.options.positions" :key="i">
|
||||||
|
<div class="td">{{ i + 1 }}</div>
|
||||||
|
<div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number"
|
||||||
|
v-model="item.lng" min="-180" max="180" @input="$handleInputLimit"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'lng'"/>
|
||||||
|
<span style="pointer-events: none" v-else>{{ item.lng.toFixed(8) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number"
|
||||||
|
v-model="item.lat" min="-180" max="180" @input="$handleInputLimit"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'lat'"/>
|
||||||
|
<span style="pointer-events: none" v-else>{{ item.lat.toFixed(8) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')">
|
||||||
|
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number"
|
||||||
|
v-model="item.alt" min="-9999999" max="999999999" @input="$handleInputLimit"
|
||||||
|
v-if="activeTd.index == i && activeTd.name == 'alt'"/>
|
||||||
|
<span style="pointer-events: none" v-else>{{ item.alt.toFixed(2) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane label="标签风格" name="3">
|
||||||
|
<labelStyle type="线" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</el-tab-pane>-->
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="position: absolute; left: 24px; display: flex">
|
||||||
|
<button @click="nodeEdit">
|
||||||
|
<svg class="icon-edit">
|
||||||
|
<use xlink:href="#yj-icon-edit"></use>
|
||||||
|
</svg>
|
||||||
|
二次编辑
|
||||||
|
</button>
|
||||||
|
<button style="margin-left: 10px" @click="translate">
|
||||||
|
<svg class="icon-py">
|
||||||
|
<use xlink:href="#yj-icon-py"></use>
|
||||||
|
</svg>
|
||||||
|
平移
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button @click="remove">删除</button>
|
||||||
|
<button @click="confirm">确定</button>
|
||||||
|
<button @click="close">关闭</button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {ref, getCurrentInstance} from 'vue'
|
||||||
|
import {inject} from 'vue'
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
import {TreeApi} from '@/api/tree'
|
||||||
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
// import attribute from './attribute.vue'
|
||||||
|
// import setStyle from './defaultStyle/index.vue'
|
||||||
|
// import labelStyle from './labelStyle.vue'
|
||||||
|
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
||||||
|
import {TsApi} from "../../../api/ts";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
|
const {cusUpdateNode, getSelectedNodes, cusRemoveNode} = useTreeNode()
|
||||||
|
|
||||||
|
const baseDialog: any = ref(null)
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
|
const sourceType = ref('')
|
||||||
|
const length = ref(0)
|
||||||
|
const lengthUnit = ref('m')
|
||||||
|
const height = ref(10)
|
||||||
|
const heightModeData = ref([
|
||||||
|
{
|
||||||
|
name: '海拔高度',
|
||||||
|
value: '海拔高度',
|
||||||
|
key: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '相对地表',
|
||||||
|
value: '相对地表',
|
||||||
|
key: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '依附模型',
|
||||||
|
value: '依附模型',
|
||||||
|
key: 2
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const lineTypeData = ref([
|
||||||
|
{
|
||||||
|
name: '实线',
|
||||||
|
value: '实线',
|
||||||
|
key: 0,
|
||||||
|
icon: 'line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '虚线',
|
||||||
|
value: '虚线',
|
||||||
|
key: 1,
|
||||||
|
icon: 'dash-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '泛光',
|
||||||
|
value: '泛光',
|
||||||
|
key: 2,
|
||||||
|
icon: 'light-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '尾迹光线',
|
||||||
|
value: '尾迹光线',
|
||||||
|
key: 3,
|
||||||
|
icon: 'tail-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '多尾迹光线',
|
||||||
|
value: '多尾迹光线',
|
||||||
|
key: 4,
|
||||||
|
icon: 'mult-tail-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动虚线1',
|
||||||
|
value: '流动虚线1',
|
||||||
|
key: 5,
|
||||||
|
icon: 'flow-dash-line1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动虚线2',
|
||||||
|
value: '流动虚线2',
|
||||||
|
key: 6,
|
||||||
|
icon: 'flow-dash-line2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头1',
|
||||||
|
value: '流动箭头1',
|
||||||
|
key: 7,
|
||||||
|
icon: 'pic-line1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头2',
|
||||||
|
value: '流动箭头2',
|
||||||
|
key: 8,
|
||||||
|
icon: 'pic-line2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头3',
|
||||||
|
value: '流动箭头3',
|
||||||
|
key: 9,
|
||||||
|
icon: 'pic-line3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头4',
|
||||||
|
value: '流动箭头4',
|
||||||
|
key: 10,
|
||||||
|
icon: 'pic-line4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头5',
|
||||||
|
value: '流动箭头5',
|
||||||
|
key: 11,
|
||||||
|
icon: 'pic-line5'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流动箭头6',
|
||||||
|
value: '流动箭头6',
|
||||||
|
key: 12,
|
||||||
|
icon: 'pic-line6'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const activeName = ref('2')
|
||||||
|
const activeTd = ref({
|
||||||
|
index: -1,
|
||||||
|
name: ''
|
||||||
|
})
|
||||||
|
const entityOptions: any = ref({})
|
||||||
|
const linePositions = ref([])
|
||||||
|
const colorRef = ref(null)
|
||||||
|
const extendColorRef = ref(null)
|
||||||
|
const heightMode = ref(0)
|
||||||
|
const wordsName = ref(0)
|
||||||
|
|
||||||
|
let originalOptions: any
|
||||||
|
let that: any
|
||||||
|
|
||||||
|
const open = async (id: any, type) => {
|
||||||
|
that = window['earth_ts'].entityMap.get(id)
|
||||||
|
sourceType.value = type
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
entityOptions.value = that
|
||||||
|
heightMode.value = entityOptions.value.heightMode
|
||||||
|
wordsName.value = Number(entityOptions.value.wordsName)
|
||||||
|
length.value = entityOptions.value.lengthByMeter
|
||||||
|
linePositions.value = structuredClone(that.options.positions)
|
||||||
|
that.lengthChangeCallBack = () => {
|
||||||
|
if (lengthUnit.value == 'km') {
|
||||||
|
length.value = entityOptions.value.lengthByMeter / 1000
|
||||||
|
} else {
|
||||||
|
length.value = entityOptions.value.lengthByMeter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
heightModeChange(heightMode.value)
|
||||||
|
baseDialog.value?.open()
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
|
let colorPicker = new (window as any).YJColorPicker({
|
||||||
|
el: colorRef.value,
|
||||||
|
size: 'mini', //颜色box类型
|
||||||
|
alpha: true, //是否开启透明度
|
||||||
|
defaultColor: entityOptions.value.color,
|
||||||
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
|
sure: (color) => {
|
||||||
|
entityOptions.value.color = color
|
||||||
|
}, //点击确认按钮事件回调
|
||||||
|
clear: () => {
|
||||||
|
entityOptions.value.color = 'rgba(255,255,255,1)'
|
||||||
|
} //点击清空按钮事件回调
|
||||||
|
})
|
||||||
|
let extendColorPicker = new (window as any).YJColorPicker({
|
||||||
|
el: extendColorRef.value,
|
||||||
|
size: 'mini', //颜色box类型
|
||||||
|
alpha: true, //是否开启透明度
|
||||||
|
defaultColor: entityOptions.value.extendColor,
|
||||||
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
|
sure: (color) => {
|
||||||
|
entityOptions.value.extendColor = color
|
||||||
|
}, //点击确认按钮事件回调
|
||||||
|
clear: () => {
|
||||||
|
entityOptions.value.extendColor = 'rgba(255,255,255,1)'
|
||||||
|
} //点击清空按钮事件回调
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const heightModeChange = (val) => {
|
||||||
|
that.heightMode = heightMode.value
|
||||||
|
// @ts-ignore
|
||||||
|
if (heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') {
|
||||||
|
entityOptions.value.extend = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const heightConfirm = () => {
|
||||||
|
that.positionEditing = false
|
||||||
|
for (let i = 0; i < entityOptions.value.options.positions.length; i++) {
|
||||||
|
entityOptions.value.options.positions[i].alt = Number(
|
||||||
|
(entityOptions.value.options.positions[i].alt + Number(height.value)).toFixed(2)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
that.positionEditing = false
|
||||||
|
that.smooth = that.smooth
|
||||||
|
}
|
||||||
|
const inputDblclick = async (event, i, anme) => {
|
||||||
|
if (heightMode.value == 2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
activeTd.value = {
|
||||||
|
index: i,
|
||||||
|
name: anme
|
||||||
|
}
|
||||||
|
await nextTick()
|
||||||
|
let inputElm = event.target.getElementsByClassName('input')[0]
|
||||||
|
if (inputElm) {
|
||||||
|
inputElm.focus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const inputBlurCallBack = (event, i, name, digit = 2) => {
|
||||||
|
entityOptions.value.options.positions[i][name] = Number(Number(event.target.value).toFixed(digit))
|
||||||
|
entityOptions.value.positionEditing = false
|
||||||
|
activeTd.value = {
|
||||||
|
index: -1,
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeWordsName = (val) => {
|
||||||
|
entityOptions.value.wordsName = wordsName.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const lineTypechange = () => {
|
||||||
|
}
|
||||||
|
const lineExtendchange = (e) => {
|
||||||
|
if (e.target.checked) {
|
||||||
|
heightMode.value = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const nodeEdit = () => {
|
||||||
|
entityOptions.value.positionEditing = false
|
||||||
|
entityOptions.value.noseToTail = false
|
||||||
|
// heightMode.value = 0
|
||||||
|
// that.heightMode = 0
|
||||||
|
that.nodeEdit((positions, lenByMeter) => {
|
||||||
|
entityOptions.value.options.positions = structuredClone(positions)
|
||||||
|
if (lengthUnit.value == 'km') {
|
||||||
|
length.value = lenByMeter / 1000
|
||||||
|
} else {
|
||||||
|
length.value = lenByMeter
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const translate = () => {
|
||||||
|
that.openPositionEditing(() => {
|
||||||
|
entityOptions.value.options.positions = structuredClone(that.options.positions)
|
||||||
|
if (lengthUnit.value == 'km') {
|
||||||
|
length.value = entityOptions.value.lengthByMeter / 1000
|
||||||
|
} else {
|
||||||
|
length.value = entityOptions.value.lengthByMeter
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeCallback = () => {
|
||||||
|
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||||
|
that.positionEditing = false
|
||||||
|
entityOptions.value.closeNodeEdit()
|
||||||
|
entityOptions.value.reset()
|
||||||
|
eventBus.emit('destroyComponent')
|
||||||
|
}
|
||||||
|
const confirm = () => {
|
||||||
|
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
|
||||||
|
originalOptions = structuredClone(that.options)
|
||||||
|
let params = structuredClone(that.options)
|
||||||
|
baseDialog.value?.close()
|
||||||
|
delete params.host
|
||||||
|
let params2 = {
|
||||||
|
id: params.id,
|
||||||
|
sourceName: params.name,
|
||||||
|
detail: JSON.stringify(params),
|
||||||
|
isShow: params.show ? 1 : 0
|
||||||
|
}
|
||||||
|
TsApi.updateTsSource(params2).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({type: "success", message: "操作成功"})
|
||||||
|
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const close = () => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
const remove = () => {
|
||||||
|
close()
|
||||||
|
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||||
|
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||||
|
const res = await TreeApi.removeDirectory({ids: source_ids})
|
||||||
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
that.remove()
|
||||||
|
(window as any)._entityMap.delete(source_ids[0])
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
message: res.msg || '删除失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => lengthUnit.value,
|
||||||
|
(val) => {
|
||||||
|
if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) {
|
||||||
|
if (lengthUnit.value == 'km') {
|
||||||
|
length.value = entityOptions.value.lengthByMeter / 1000
|
||||||
|
} else {
|
||||||
|
length.value = entityOptions.value.lengthByMeter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{immediate: true}
|
||||||
|
)
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.polyline {
|
||||||
|
::v-deep .input-select-unit-box {
|
||||||
|
.el-input-group__prepend {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input__wrapper {
|
||||||
|
width: 130px;
|
||||||
|
padding: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow: unset;
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
border-radius: 0;
|
||||||
|
background: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-group__append {
|
||||||
|
width: 75px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -3,29 +3,30 @@
|
|||||||
<div class="miniElement" :style="!mini?'display:none':''">
|
<div class="miniElement" :style="!mini?'display:none':''">
|
||||||
<div class="switch-node-outer" @click="mini=false">
|
<div class="switch-node-outer" @click="mini=false">
|
||||||
<div class="switch-node-inner">
|
<div class="switch-node-inner">
|
||||||
展开元素库
|
{{ t('ts.unfoldElement') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="element" :style="mini?'display:none':''">
|
<div class="element" :style="mini?'display:none':''">
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<span class="title">元素库</span>
|
<span class="title">{{ t("ts.element") }}</span>
|
||||||
<span class="close" @click="mini=true">
|
<span class="close" @click="mini=true">
|
||||||
<svg-icon :size="15" class="icon-svg-item" name="closeLeftTs"/>收起
|
<svg-icon :size="15" class="icon-svg-item" name="closeLeftTs"/>{{ t("ts.fold") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input2"
|
v-model="input2"
|
||||||
class="responsive-input"
|
class="responsive-input"
|
||||||
placeholder="搜索"
|
:placeholder="t('ts.search')"
|
||||||
:prefix-icon="Search"
|
:prefix-icon="Search"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabsBox">
|
<div class="tabsBox">
|
||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<div v-for="(item,index) in tabs" @click="handleTabClick(item,index)" :class="index==activIndex?'active':''">
|
<div v-for="(item,index) in tabs" @click="handleTabClick(item,index)" :title=" t('ts.' + item.name)"
|
||||||
{{ item.name }}
|
:class="[index==activIndex?'active':'','oneLine']">
|
||||||
|
{{ t('ts.' + item.name) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
@ -75,10 +76,12 @@ import {GraphApi} from "../../api/graphLabel";
|
|||||||
import {addMapSource} from "./entity";
|
import {addMapSource} from "./entity";
|
||||||
import {useTreeNode} from "../components/tree/hooks/treeNode";
|
import {useTreeNode} from "../components/tree/hooks/treeNode";
|
||||||
import {ElMessage, TreeInstance} from "element-plus";
|
import {ElMessage, TreeInstance} from "element-plus";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
const {getSelectedNodes} = useTreeNode()
|
const {getSelectedNodes} = useTreeNode()
|
||||||
const service = ref(localStorage.getItem('ip'))
|
const service = ref(localStorage.getItem('ip'))
|
||||||
let mini = ref(false)
|
let mini = ref(false)
|
||||||
|
const {t} = useI18n()
|
||||||
|
|
||||||
interface Tree {
|
interface Tree {
|
||||||
name: string
|
name: string
|
||||||
@ -94,10 +97,10 @@ const defaultProps = {
|
|||||||
|
|
||||||
const activIndex = ref(0)
|
const activIndex = ref(0)
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{name: "人工模型", dataType: 'tree', key: "model",},
|
{name: "model", dataType: 'tree', key: "model",},
|
||||||
{name: "军事标绘", dataType: 'tree', key: "graph", funName: 'DrawPoint',},
|
{name: "graph", dataType: 'tree', key: "graph", funName: 'DrawPoint',},
|
||||||
{
|
{
|
||||||
name: "基础标绘", dataType: 'list', children:
|
name: "baseLabel", dataType: 'list', children:
|
||||||
[
|
[
|
||||||
{name: "点", source_name: "点标注", funName: 'DrawPoint', type: "point"},
|
{name: "点", source_name: "点标注", funName: 'DrawPoint', type: "point"},
|
||||||
{name: "线", source_name: "线标注", funName: 'DrawPolyline', type: "line", positionLength: 2},
|
{name: "线", source_name: "线标注", funName: 'DrawPolyline', type: "line", positionLength: 2},
|
||||||
@ -108,7 +111,7 @@ const tabs = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "特效", dataType: 'list', children: [
|
name: "effects", dataType: 'list', children: [
|
||||||
{name: "火焰", source_name: "火焰", funName: 'DrawPoint', type: "fire"},
|
{name: "火焰", source_name: "火焰", funName: 'DrawPoint', type: "fire"},
|
||||||
{name: "喷射水柱", source_name: "喷射水柱", funName: 'DrawPolyline', type: "waterL", option: {number: 2}},
|
{name: "喷射水柱", source_name: "喷射水柱", funName: 'DrawPolyline', type: "waterL", option: {number: 2}},
|
||||||
{name: "立体文字", source_name: "", funName: 'DrawPolyline', type: "standText", positionLength: 2}
|
{name: "立体文字", source_name: "", funName: 'DrawPolyline', type: "standText", positionLength: 2}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<span>{{ date.hms }}</span>
|
<span>{{ date.hms }}</span>
|
||||||
<div class="ymd_week">
|
<div class="ymd_week">
|
||||||
<span>{{ date.ymd }}</span>
|
<span>{{ date.ymd }}</span>
|
||||||
<span>星期{{ date.week }}</span>
|
<span>{{ t(`week.${date.week}`) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="titles">实景三维态势推演系统</div>
|
<div class="titles">实景三维态势推演系统</div>
|
||||||
@ -17,44 +17,45 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
<span>历史推演</span>
|
<span>{{ t('ts.historyDeduce') }}</span>
|
||||||
<svg class="icon icon-title" aria-hidden="true">
|
<svg class="icon icon-title" aria-hidden="true">
|
||||||
<use xlink:href="#icon-title"></use>
|
<use xlink:href="#icon-title"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<span>推演名称 <el-input
|
<span>{{ t('ts.deduceName') }} <el-input
|
||||||
v-model="searchParams.name"
|
v-model="searchParams.name"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请输入推演名称"
|
:placeholder="t('ts.deduceNamePlaceholder')"
|
||||||
clearable
|
clearable
|
||||||
/></span>
|
/></span>
|
||||||
<span>创建人 <el-input
|
<span>{{ t('ts.creator') }} <el-input
|
||||||
v-model="searchParams.createdBy"
|
v-model="searchParams.createdBy"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请输入创建人姓名"
|
:placeholder="t('ts.creatorPlaceholder')"
|
||||||
clearable
|
clearable
|
||||||
/></span>
|
/></span>
|
||||||
<span>创建时间
|
<span>
|
||||||
|
{{ t('ts.creationTime') }}
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
class="dark-time-picker"
|
class="dark-time-picker"
|
||||||
v-model="searchParams.datetime"
|
v-model="searchParams.datetime"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
start-placeholder="开始日期"
|
:start-placeholder="t('ts.startPlaceholder')"
|
||||||
end-placeholder="结束日期"
|
:end-placeholder="t('ts.endPlaceholder')"
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
date-format="YYYY-MM-DD"
|
date-format="YYYY-MM-DD"
|
||||||
time-format="HH:mm:ss"
|
time-format="HH:mm:ss"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
/></span>
|
/></span>
|
||||||
<el-button @click="search">搜索</el-button>
|
<el-button @click="search">{{ t('ts.search') }}</el-button>
|
||||||
<el-button @click="reset">重置</el-button>
|
<el-button @click="reset">{{ t('ts.reset') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="option">
|
<div class="option">
|
||||||
<el-button :icon="CirclePlus" @click="()=>{addPlan()}">新建推演</el-button>
|
<el-button :icon="CirclePlus" @click="()=>{addPlan()}">{{ t('ts.createPlan') }}</el-button>
|
||||||
<el-button :icon="Download">导入</el-button>
|
<!-- <el-button :icon="Download">导入</el-button>
|
||||||
<el-button :icon="Upload">导出</el-button>
|
<el-button :icon="Upload">导出</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<el-table
|
<el-table
|
||||||
@ -62,15 +63,15 @@
|
|||||||
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column align="center" prop="name" label="推演名称"/>
|
<el-table-column align="center" prop="name" :label="t('ts.deduceName')"/>
|
||||||
<el-table-column align="center" label="推演描述" :class-name="'ellipsis-column'">
|
<el-table-column align="center" :label="t('ts.deduceDesc')" :class-name="'ellipsis-column'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.desc }}
|
{{ scope.row.desc }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="createdBy" label="创建人" sortable width="240"/>
|
<el-table-column align="center" prop="createdBy" :label="t('ts.creator')" sortable width="240"/>
|
||||||
<el-table-column align="center" prop="createdAt" label="创建日期" sortable width="180"/>
|
<el-table-column align="center" prop="createdAt" :label="t('ts.creationTime')" sortable width="180"/>
|
||||||
<el-table-column align="center" label="操作" width="160">
|
<el-table-column align="center" :label="t('ts.operation')" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
||||||
<!--<el-button text size="small" type="primary" :icon="Edit" @click="toTSEdit(scope.row)">编辑</el-button>-->
|
<!--<el-button text size="small" type="primary" :icon="Edit" @click="toTSEdit(scope.row)">编辑</el-button>-->
|
||||||
@ -93,7 +94,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="box-item"
|
class="box-item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="编辑推演"
|
:content="t('ts.tooltipEdit')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<Edit style="width: 16px; height: 16px; cursor:pointer;" @click="toTSEdit(scope.row)"></Edit>
|
<Edit style="width: 16px; height: 16px; cursor:pointer;" @click="toTSEdit(scope.row)"></Edit>
|
||||||
@ -101,7 +102,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="box-item"
|
class="box-item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="详情"
|
:content="t('ts.tooltipDetail')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<Warning style="width: 16px; height: 16px; cursor:pointer; "
|
<Warning style="width: 16px; height: 16px; cursor:pointer; "
|
||||||
@ -110,7 +111,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="box-item"
|
class="box-item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="删除"
|
:content="t('ts.tooltipDelete')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<Delete style="width: 16px; height: 16px; cursor:pointer;" @click="delPlanBtn(scope.row.id)"/>
|
<Delete style="width: 16px; height: 16px; cursor:pointer;" @click="delPlanBtn(scope.row.id)"/>
|
||||||
@ -136,12 +137,13 @@
|
|||||||
</el-auto-resizer>-->
|
</el-auto-resizer>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="pageBox">
|
<div class="pageBox">
|
||||||
|
<el-config-provider :locale="locale">
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
|
||||||
:page-sizes="[5, 10, 50, 100]" :page-size="pageSize"
|
:page-sizes="[5, 10, 50, 100]" :page-size="pageSize"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="total">
|
:total="total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<NewPlan @addCallback="getList(searchParams.value)"></NewPlan>
|
<NewPlan @addCallback="getList(searchParams.value)"></NewPlan>
|
||||||
@ -149,19 +151,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onUnmounted} from "vue";
|
import {ref, onUnmounted, computed} from "vue";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {Delete, Edit, Warning, CirclePlus, Download, Upload} from '@element-plus/icons-vue'
|
import {Delete, Edit, Warning, CirclePlus, Download, Upload} from '@element-plus/icons-vue'
|
||||||
import {ElMessage, ElMessageBox, TableV2SortOrder} from 'element-plus'
|
import {ElMessage, ElMessageBox, TableV2SortOrder} from 'element-plus'
|
||||||
import type {SortBy} from 'element-plus'
|
import type {SortBy} from 'element-plus'
|
||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
import NewPlan from "./newPlan.vue"
|
import NewPlan from "./newPlan.vue"
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||||
|
import zhTw from 'element-plus/es/locale/lang/zh-tw'
|
||||||
|
import en from 'element-plus/es/locale/lang/en'
|
||||||
|
|
||||||
|
const language = ref('zh-CN')
|
||||||
|
language.value = JSON.parse(localStorage.getItem("systemSetting"))?.language || 'zh-CN'
|
||||||
|
const locale = computed(() => (language.value === "zh-CN" ? zhCn : (language.value === "zh-TW" ? zhTw : en)))
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const moment = require("moment");
|
const moment = require("moment");
|
||||||
|
|
||||||
const date = ref({
|
const date = ref({
|
||||||
ymd: '',
|
ymd: '',
|
||||||
hms: '',
|
hms: '',
|
||||||
week: ""
|
week: 0
|
||||||
})
|
})
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
@ -338,7 +350,7 @@ const setTime = () => {
|
|||||||
date.value.ymd = year + '-' + month + '-' + day
|
date.value.ymd = year + '-' + month + '-' + day
|
||||||
date.value.hms = hours + ':' + minutes + ':' + seconds
|
date.value.hms = hours + ':' + minutes + ':' + seconds
|
||||||
|
|
||||||
date.value.week = ["天", "一", "二", "三", "四", "五", "六"][date1.getDay()]
|
date.value.week = date1.getDay() //["天", "一", "二", "三", "四", "五", "六"][date1.getDay()]
|
||||||
}
|
}
|
||||||
// 添加定时器,每秒更新一次时间
|
// 添加定时器,每秒更新一次时间
|
||||||
const timer = setInterval(setTime, 1000)
|
const timer = setInterval(setTime, 1000)
|
||||||
@ -406,6 +418,7 @@ onUnmounted(() => {
|
|||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-top {
|
.icon-top {
|
||||||
@ -452,22 +465,25 @@ onUnmounted(() => {
|
|||||||
.sub-title {
|
.sub-title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
width: 15.4350566864vw;
|
width: 15.4350566864vw;
|
||||||
height: 4.0740740741vh;
|
height: 5.0740740741vh;
|
||||||
//padding: vh(20);
|
//padding: vh(20);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
//top: 50%;
|
||||||
transform: translate(-50%, -50%);
|
width: 100%;
|
||||||
|
transform: translateX(-50%);
|
||||||
//font-family: W7;
|
//font-family: W7;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-title {
|
.icon-title {
|
||||||
width: 15.4350566864vw;
|
width: 15.4350566864vw;
|
||||||
height: 4.0740740741vh;
|
height: 5.0740740741vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<div class="set_pup_header">
|
<div class="set_pup_header">
|
||||||
<div class="system_title">
|
<div class="system_title">
|
||||||
态势事件
|
|
||||||
|
{{ t("ts.situationEvent") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="set_detail">
|
<div class="set_detail">
|
||||||
@ -24,25 +25,25 @@
|
|||||||
<div class="eventDetail">
|
<div class="eventDetail">
|
||||||
<template v-if="currentKey&¤tKey!='normal'">
|
<template v-if="currentKey&¤tKey!='normal'">
|
||||||
<el-form label-width="auto" :model="form" style="max-width: 600px">
|
<el-form label-width="auto" :model="form" style="max-width: 600px">
|
||||||
<el-form-item label="事件名称">
|
<el-form-item :label="t('ts.事件名称')">
|
||||||
<el-input v-model="form.name"/>
|
<el-input v-model="form.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开始时间">
|
<el-form-item :label="t('ts.开始时间')">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:show-now="false"
|
:show-now="false"
|
||||||
popper-class="ts_dark_theme"
|
popper-class="ts_dark_theme"
|
||||||
v-model="form.datetime"
|
v-model="form.datetime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择触发时间"
|
:placeholder="t('ts.startTimePlaceholder')"
|
||||||
class="timePicker"
|
class="timePicker"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template v-if="!['display','hide'].includes(currentKey)">
|
<template v-if="!['display','hide'].includes(currentKey)">
|
||||||
<el-form-item label="持续时间">
|
<el-form-item :label="t('ts.持续时间')">
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span><el-input v-model="hour"/>时</span>
|
<span><el-input v-model="hour"/>{{ t('ts.hour') }}</span>
|
||||||
<span><el-input v-model="minute"/>分 </span>
|
<span><el-input v-model="minute"/>{{ t('ts.minute') }} </span>
|
||||||
<span><el-input v-model="second"/>秒</span>
|
<span><el-input v-model="second"/>{{ t('ts.second') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -56,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item label="闪烁次数">
|
<el-form-item :label="t('ts.numberOfFlicker')">
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span>
|
<span>
|
||||||
<el-input v-model="numbers"/>次
|
<el-input v-model="numbers"/>次
|
||||||
@ -65,17 +66,17 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="currentKey=='move'">
|
<template v-if="currentKey=='move'">
|
||||||
<el-form-item label="路径是否包含元素点位" label-width="160">
|
<el-form-item :label="t('ts.isContainModelPosition')" label-width="160">
|
||||||
<el-switch v-model="isContainModelPosition"/>
|
<el-switch v-model="isContainModelPosition"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button @click="drawLine">绘制路径</el-button>
|
<el-button @click="drawLine">{{ t('ts.drawPath') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="optionbtn">
|
<div class="optionbtn">
|
||||||
<el-button @click="addEvent">确定</el-button>
|
<el-button @click="addEvent">{{ t('ts.confirm') }}</el-button>
|
||||||
<el-button @click="()=>{isShowPup=false,reset()}">取消</el-button>
|
<el-button @click="()=>{isShowPup=false,reset()}">{{ t('ts.cancel') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -93,7 +94,9 @@ import type {RenderContentContext, TreeInstance} from 'element-plus'
|
|||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {initMapData} from "./entity";
|
import {initMapData} from "./entity";
|
||||||
|
import {useI18n} from 'vue-i18n'
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const treeRef = ref<TreeInstance>()
|
const treeRef = ref<TreeInstance>()
|
||||||
// 存储当前需要高亮的节点 key(初始为空)
|
// 存储当前需要高亮的节点 key(初始为空)
|
||||||
const currentKey = ref<number | string | null>("flicker");
|
const currentKey = ref<number | string | null>("flicker");
|
||||||
@ -238,6 +241,7 @@ const addEvent = () => {
|
|||||||
"detail": JSON.stringify(obj)
|
"detail": JSON.stringify(obj)
|
||||||
}
|
}
|
||||||
console.log("dbParams", dbParams)
|
console.log("dbParams", dbParams)
|
||||||
|
console.log("duration_S", duration_S)
|
||||||
// return;
|
// return;
|
||||||
TsApi.addTsEvent(dbParams).then(res => {
|
TsApi.addTsEvent(dbParams).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -5,14 +5,13 @@
|
|||||||
<template v-if="!currentPlanId">
|
<template v-if="!currentPlanId">
|
||||||
<div class="set_pup_header">
|
<div class="set_pup_header">
|
||||||
<div class="system_title">
|
<div class="system_title">
|
||||||
<!--{{ t('model.title') }}-->
|
{{ t('ts.createPlan') }}
|
||||||
新建推演
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="detailTitle">
|
<div class="detailTitle">
|
||||||
推演详情
|
{{ t('ts.deduceDetail') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,10 +26,10 @@
|
|||||||
:label-position="'top'"
|
:label-position="'top'"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
>
|
>
|
||||||
<el-form-item label="推演名称" prop="name" required>
|
<el-form-item :label="t('ts.deduceName')" prop="name" required>
|
||||||
<el-input v-model="sizeForm.name" placeholder="请填写名称"/>
|
<el-input v-model="sizeForm.name" :placeholder="t('ts.deduceNamePlaceholder')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="仿真开始时间" prop="simulationStartTime" required>
|
<el-form-item :label="t('ts.startTime')" prop="simulationStartTime" required>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:readonly="Boolean(currentPlanId)"
|
:readonly="Boolean(currentPlanId)"
|
||||||
v-model="sizeForm.simulationStartTime"
|
v-model="sizeForm.simulationStartTime"
|
||||||
@ -38,16 +37,16 @@
|
|||||||
type="datetime"
|
type="datetime"
|
||||||
timezone="Asia/Shanghai"
|
timezone="Asia/Shanghai"
|
||||||
value-format="YYYY-MM-DDTHH:mm:ss"
|
value-format="YYYY-MM-DDTHH:mm:ss"
|
||||||
placeholder="请选择日期时间"
|
:placeholder="t('ts.startTimePlaceholder')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="推演描述" prop="desc" required>
|
<el-form-item :label="t('ts.deduceDesc')" prop="desc" required>
|
||||||
<el-input v-model="sizeForm.desc" type="textarea" placeholder="请输入内容描述"/>
|
<el-input v-model="sizeForm.desc" type="textarea" :placeholder="t('ts.deduceDescPlaceholder')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="optionbtn">
|
<div class="optionbtn">
|
||||||
<el-button @click="addPlan(ruleFormRef)">确定</el-button>
|
<el-button @click="addPlan(ruleFormRef)">{{ t('btn.confirm') }}</el-button>
|
||||||
<el-button @click="isShowPup= false">取消</el-button>
|
<el-button @click="isShowPup= false">{{ t('general.取消') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -62,7 +61,9 @@
|
|||||||
import {ref, reactive,} from "vue";
|
import {ref, reactive,} from "vue";
|
||||||
import {ElMessage, FormInstance, FormRules} from 'element-plus'
|
import {ElMessage, FormInstance, FormRules} from 'element-plus'
|
||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
|
const {t} = useI18n()
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const emit = defineEmits(['addCallback']);
|
const emit = defineEmits(['addCallback']);
|
||||||
const isShowPup = ref(false)
|
const isShowPup = ref(false)
|
||||||
@ -72,6 +73,7 @@ interface RuleForm {
|
|||||||
name: string,
|
name: string,
|
||||||
simulationStartTime: string,
|
simulationStartTime: string,
|
||||||
desc: string,
|
desc: string,
|
||||||
|
wheel: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ruleFormRef = ref<FormInstance>()
|
const ruleFormRef = ref<FormInstance>()
|
||||||
@ -79,11 +81,12 @@ let sizeForm = reactive<RuleForm>({
|
|||||||
name: '',
|
name: '',
|
||||||
simulationStartTime: '',
|
simulationStartTime: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
|
wheel: 20
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = reactive<FormRules<RuleForm>>({
|
const rules = reactive<FormRules<RuleForm>>({
|
||||||
name: [
|
name: [
|
||||||
// {required: true, message: '推演名称不能为空', trigger: 'blur'},
|
{required: true, message: '推演名称不能为空', trigger: 'blur'},
|
||||||
{
|
{
|
||||||
// 自定义验证器
|
// 自定义验证器
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
@ -91,18 +94,18 @@ const rules = reactive<FormRules<RuleForm>>({
|
|||||||
const trimmedVal = value.trim();
|
const trimmedVal = value.trim();
|
||||||
if (!trimmedVal) {
|
if (!trimmedVal) {
|
||||||
// 验证失败,返回错误提示
|
// 验证失败,返回错误提示
|
||||||
callback(new Error('推演名称不能为空(不能仅输入空格)'));
|
callback(new Error('不能仅输入空格'));
|
||||||
} else {
|
} else {
|
||||||
// 验证通过,调用 callback() 无参
|
// 验证通过,调用 callback() 无参
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 触发时机:失去焦点 + 表单提交(可按需调整)
|
// 触发时机:失去焦点 + 表单提交(可按需调整)
|
||||||
trigger: ['blur', 'submit']
|
trigger: ['blur', 'submit',]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
desc: [
|
desc: [
|
||||||
// {required: true, message: '推演描述不能为空', trigger: 'blur'},
|
{required: true, message: '推演描述不能为空', trigger: 'blur'},
|
||||||
{
|
{
|
||||||
// 自定义验证器
|
// 自定义验证器
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
@ -110,7 +113,7 @@ const rules = reactive<FormRules<RuleForm>>({
|
|||||||
const trimmedVal = value.trim();
|
const trimmedVal = value.trim();
|
||||||
if (!trimmedVal) {
|
if (!trimmedVal) {
|
||||||
// 验证失败,返回错误提示
|
// 验证失败,返回错误提示
|
||||||
callback(new Error('推演描述不能为空(不能仅输入空格)'));
|
callback(new Error('不能仅输入空格'));
|
||||||
} else {
|
} else {
|
||||||
// 验证通过,调用 callback() 无参
|
// 验证通过,调用 callback() 无参
|
||||||
callback();
|
callback();
|
||||||
@ -140,6 +143,7 @@ const addPlan = async (formEl: FormInstance | undefined) => {
|
|||||||
await formEl.validate((valid, fields) => {
|
await formEl.validate((valid, fields) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (currentPlanId.value == '') {
|
if (currentPlanId.value == '') {
|
||||||
|
|
||||||
TsApi.addPlan(sizeForm).then(res => {
|
TsApi.addPlan(sizeForm).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -26,14 +26,17 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authCode') }}
|
{{ t('auths.authCode') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="auth_info_text">
|
||||||
class="auth_info_text"
|
<span @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">{{
|
||||||
|
authInfo.license_code || ''
|
||||||
|
}}</span>
|
||||||
|
<svg-icon
|
||||||
|
name="copy"
|
||||||
@click="copy(authInfo.license_code)"
|
@click="copy(authInfo.license_code)"
|
||||||
style="cursor: pointer"
|
|
||||||
title="点击可复制"
|
title="点击可复制"
|
||||||
>
|
:size="20"
|
||||||
{{ authInfo.license_code || '' }}
|
style="margin-left: 30px; cursor: pointer"
|
||||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_box">
|
<div class="auth_info_box">
|
||||||
@ -201,22 +204,22 @@ const getAuthInfo = async () => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const selectedService = ref('接口服务')
|
const selectedService = ref('接口服务')
|
||||||
@ -230,22 +233,22 @@ const getStatus = (date) => {
|
|||||||
router.push({ path: '/login' })
|
router.push({ path: '/login' })
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -522,8 +525,11 @@ const copy = async (text) => {
|
|||||||
::v-deep .el-message-box {
|
::v-deep .el-message-box {
|
||||||
--el-messagebox-title-color: #fff !important;
|
--el-messagebox-title-color: #fff !important;
|
||||||
--el-messagebox-content-color: #fff !important;
|
--el-messagebox-content-color: #fff !important;
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0) 0%,
|
||||||
|
rgba(var(--color-base1), 0.2) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 0.6) !important;
|
rgba(0, 0, 0, 0.6) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -732,8 +738,11 @@ const copy = async (text) => {
|
|||||||
.el-message-box {
|
.el-message-box {
|
||||||
--el-messagebox-title-color: #fff !important;
|
--el-messagebox-title-color: #fff !important;
|
||||||
--el-messagebox-content-color: #fff !important;
|
--el-messagebox-content-color: #fff !important;
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0) 0%,
|
||||||
|
rgba(var(--color-base1), 0.2) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 0.6) !important;
|
rgba(0, 0, 0, 0.6) !important;
|
||||||
|
|
||||||
.el-message-box__btns {
|
.el-message-box__btns {
|
||||||
|
|||||||
@ -5,14 +5,17 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authCode') }}
|
{{ t('auths.authCode') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="auth_info_text">
|
||||||
class="auth_info_text"
|
<span @click="copy(authInfo.license_code)" title="点击可复制" style="cursor: pointer">{{
|
||||||
|
authInfo.license_code || ''
|
||||||
|
}}</span>
|
||||||
|
<svg-icon
|
||||||
|
name="copy"
|
||||||
@click="copy(authInfo.license_code)"
|
@click="copy(authInfo.license_code)"
|
||||||
style="cursor: pointer"
|
|
||||||
title="点击可复制"
|
title="点击可复制"
|
||||||
>
|
:size="20"
|
||||||
{{ authInfo.license_code || '' }}
|
style="margin-left: 30px; cursor: pointer"
|
||||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_box">
|
<div class="auth_info_box">
|
||||||
@ -113,7 +116,6 @@ const getStatus = () => {
|
|||||||
const getAuthCode = async () => {
|
const getAuthCode = async () => {
|
||||||
const res = await AuthApi.authInfo()
|
const res = await AuthApi.authInfo()
|
||||||
authInfo.value.license_code = res.data
|
authInfo.value.license_code = res.data
|
||||||
console.log(res, '码')
|
|
||||||
}
|
}
|
||||||
getAuthInfo()
|
getAuthInfo()
|
||||||
getAuthCode()
|
getAuthCode()
|
||||||
@ -122,10 +124,8 @@ getAuthCode()
|
|||||||
const copy = async (text) => {
|
const copy = async (text) => {
|
||||||
try {
|
try {
|
||||||
await toClipboard(text)
|
await toClipboard(text)
|
||||||
console.log('复制成功')
|
|
||||||
ElMessage.success('复制成功')
|
ElMessage.success('复制成功')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('复制失败', e)
|
|
||||||
ElMessage.error('复制失败')
|
ElMessage.error('复制失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -206,7 +206,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const routeImport = () => {
|
const routeImport = () => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile', 'multiSelections'],
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: '路网', //、底图
|
name: '路网', //、底图
|
||||||
@ -216,10 +216,11 @@ const routeImport = () => {
|
|||||||
}
|
}
|
||||||
$sendElectronChanel('open-directory-dialog', option)
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
$recvElectronChanel('selectedItem', (e, path) => {
|
$recvElectronChanel('selectedItem', (e, path) => {
|
||||||
|
console.log(path, 'path')
|
||||||
if (path.length) {
|
if (path.length) {
|
||||||
RouteApi.loadRoute({
|
const formData = new FormData()
|
||||||
path: path[0]
|
formData.append('paths', path)
|
||||||
}).then((res) => {
|
RouteApi.loadRoute(formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
RouteApi.getRouteList().then((list) => {
|
RouteApi.getRouteList().then((list) => {
|
||||||
routeList.splice(0, routeList.length, ...list.data)
|
routeList.splice(0, routeList.length, ...list.data)
|
||||||
@ -254,7 +255,7 @@ const routeImport = () => {
|
|||||||
}
|
}
|
||||||
const poiImport = () => {
|
const poiImport = () => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile', 'multiSelections'],
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: 'poi', //、底图
|
name: 'poi', //、底图
|
||||||
@ -265,9 +266,9 @@ const poiImport = () => {
|
|||||||
$sendElectronChanel('open-directory-dialog', option)
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
$recvElectronChanel('selectedItem', (e, path) => {
|
$recvElectronChanel('selectedItem', (e, path) => {
|
||||||
if (path.length) {
|
if (path.length) {
|
||||||
PoiApi.loadPoi({
|
const formData = new FormData()
|
||||||
path: path[0]
|
formData.append('paths', path)
|
||||||
}).then((res) => {
|
PoiApi.loadPoi(formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
PoiApi.getPoiList().then((list) => {
|
PoiApi.getPoiList().then((list) => {
|
||||||
poiList.splice(0, poiList.length, ...list.data)
|
poiList.splice(0, poiList.length, ...list.data)
|
||||||
@ -459,12 +460,12 @@ const handleError = (error: Error) => {
|
|||||||
}
|
}
|
||||||
//工程合并导入
|
//工程合并导入
|
||||||
const mergeProject = () => {
|
const mergeProject = () => {
|
||||||
ElMessageBox.confirm(`项目已存在,继续导入将合并项目,是否执行?`, '提示', {
|
// ElMessageBox.confirm(`项目已存在,继续导入将合并项目,是否执行?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
// confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
type: 'warning'
|
// type: 'warning'
|
||||||
})
|
// })
|
||||||
.then(() => {
|
// .then(() => {
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile'],
|
properties: ['openFile'],
|
||||||
filters: [
|
filters: [
|
||||||
@ -494,8 +495,8 @@ const mergeProject = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
// })
|
||||||
.catch(() => {})
|
// .catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
//工程导入(单机)
|
//工程导入(单机)
|
||||||
@ -667,6 +668,7 @@ function derive() {
|
|||||||
arr[arr.length - 1] = 'yjearth/app.db'
|
arr[arr.length - 1] = 'yjearth/app.db'
|
||||||
let db_path: any = arr.join('/')
|
let db_path: any = arr.join('/')
|
||||||
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
||||||
|
try {
|
||||||
zip_file([db_path], path, () => {
|
zip_file([db_path], path, () => {
|
||||||
// loadingInstance.close()
|
// loadingInstance.close()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -674,6 +676,12 @@ function derive() {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage({
|
||||||
|
message: error,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -32,12 +32,12 @@
|
|||||||
<span>批量导入</span>
|
<span>批量导入</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input3"
|
v-model.trim="input3"
|
||||||
style="max-width: 250px"
|
style="max-width: 250px"
|
||||||
placeholder="请输入设备名称进行搜索"
|
placeholder="请输入设备名称进行搜索"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
:suffix-icon="Search"
|
:suffix-icon="Search"
|
||||||
@input="getTableList()"
|
@change="getTableList()"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
@ -153,6 +153,7 @@ const getTableList = async () => {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
tableData.value = res.data.records
|
tableData.value = res.data.records
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
|
console.log(tableData.value.length, 'leleleleele')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,8 +293,11 @@ const downloadTemp = async () => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
::v-deep .addDevice {
|
::v-deep .addDevice {
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0.2) 0%,
|
||||||
|
rgba(var(--color-base1), 0) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 1) !important;
|
rgba(0, 0, 0, 1) !important;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@ -312,13 +312,33 @@ eventBus.on('settingPop', (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入军标库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
eventBus.on('openGraphLabel', openfunc)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
eventBus.off('openGraphLabel', openfunc)
|
||||||
|
})
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
params.append('militaryName', photoName.value)
|
params.append('militaryName', photoName.value)
|
||||||
const res: any = await GraphApi.modelTypeList(params)
|
const res: any = await GraphApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入军标库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const transformNestedJson = (data, oldKey, newKey) => {
|
const transformNestedJson = (data, oldKey, newKey) => {
|
||||||
@ -436,7 +456,7 @@ const handleDragEnd = (
|
|||||||
console.log('tree drag end:', dropNode, dropType, ev, draggingNode)
|
console.log('tree drag end:', dropNode, dropType, ev, draggingNode)
|
||||||
|
|
||||||
if (dropType != 'none') {
|
if (dropType != 'none') {
|
||||||
let nodeList:any = []
|
let nodeList: any = []
|
||||||
switch (dropType) {
|
switch (dropType) {
|
||||||
case 'before':
|
case 'before':
|
||||||
case 'after':
|
case 'after':
|
||||||
|
|||||||
@ -12,12 +12,12 @@
|
|||||||
<span>添加物资</span>
|
<span>添加物资</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input3"
|
v-model.trim="input3"
|
||||||
style="max-width: 250px"
|
style="max-width: 250px"
|
||||||
placeholder="请输入物资名称进行搜索"
|
placeholder="请输入物资名称进行搜索"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
:suffix-icon="Search"
|
:suffix-icon="Search"
|
||||||
@input="getTableList()"
|
@change="getTableList()"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
@ -185,8 +185,11 @@ var delFun = (row) => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
::v-deep .addDevice {
|
::v-deep .addDevice {
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0.2) 0%,
|
||||||
|
rgba(var(--color-base1), 0) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 1) !important;
|
rgba(0, 0, 0, 1) !important;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@ -223,7 +223,7 @@ const contextMenu = reactive({
|
|||||||
|
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
//表头拖拽
|
//表头拖拽
|
||||||
const tableRef:any = ref(null)
|
const tableRef: any = ref(null)
|
||||||
|
|
||||||
const handleHeaderDragend = (newWidth, oldWidth, column, event) => {
|
const handleHeaderDragend = (newWidth, oldWidth, column, event) => {
|
||||||
const columns = tableRef.value.$refs.tableHeaderRef.columnRows[0]
|
const columns = tableRef.value.$refs.tableHeaderRef.columnRows[0]
|
||||||
@ -312,12 +312,21 @@ let setFunc = (data) => {
|
|||||||
showImageRow = null
|
showImageRow = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入模型库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
eventBus.off('settingPop', setFunc)
|
eventBus.off('settingPop', setFunc)
|
||||||
eventBus.on('settingPop', setFunc)
|
eventBus.on('settingPop', setFunc)
|
||||||
|
eventBus.on('openModelManage', openfunc)
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
eventBus.off('settingPop', setFunc)
|
eventBus.off('settingPop', setFunc)
|
||||||
|
eventBus.off('openModelManage', openfunc)
|
||||||
})
|
})
|
||||||
//获取模型列表
|
//获取模型列表
|
||||||
// eventBus.on('settingPop', (data) => {
|
// eventBus.on('settingPop', (data) => {
|
||||||
@ -344,11 +353,13 @@ const updateExpandedState = () => {
|
|||||||
const keys = getExpandedKeys()
|
const keys = getExpandedKeys()
|
||||||
expandedKeys.value = keys
|
expandedKeys.value = keys
|
||||||
}
|
}
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
params.append('modelName', photoName.value)
|
params.append('modelName', photoName.value)
|
||||||
const res: any = await ModelApi.modelTypeList(params)
|
const res: any = await ModelApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入模型库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
const saved = localStorage.getItem('tree-expanded-keys')
|
const saved = localStorage.getItem('tree-expanded-keys')
|
||||||
@ -368,6 +379,11 @@ const getModelList = async () => {
|
|||||||
|
|
||||||
localStorage.removeItem('tree-click-node')
|
localStorage.removeItem('tree-click-node')
|
||||||
}
|
}
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const transformNestedJson = (data, oldKey, newKey) => {
|
const transformNestedJson = (data, oldKey, newKey) => {
|
||||||
@ -486,7 +502,7 @@ const handleDragEnd = (
|
|||||||
) => {
|
) => {
|
||||||
console.log('tree drag end:', dropNode, dropType, ev, draggingNode, draggingNode.parent)
|
console.log('tree drag end:', dropNode, dropType, ev, draggingNode, draggingNode.parent)
|
||||||
if (dropType != 'none') {
|
if (dropType != 'none') {
|
||||||
let nodeList:any = []
|
let nodeList: any = []
|
||||||
switch (dropType) {
|
switch (dropType) {
|
||||||
case 'before':
|
case 'before':
|
||||||
case 'after':
|
case 'after':
|
||||||
|
|||||||
@ -383,6 +383,20 @@ eventBus.on('settingPop', (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let openfunc = () => {
|
||||||
|
if (haventModel) {
|
||||||
|
ElMessage.warning('请先创建或导入图标库文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取模型列表
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
eventBus.on('openPhotoManage', openfunc)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
eventBus.off('openPhotoManage', openfunc)
|
||||||
|
})
|
||||||
|
let haventModel = false
|
||||||
const getModelList = async () => {
|
const getModelList = async () => {
|
||||||
if (activeIndex.value !== 2) {
|
if (activeIndex.value !== 2) {
|
||||||
typeTreeData.value = [
|
typeTreeData.value = [
|
||||||
@ -398,8 +412,14 @@ const getModelList = async () => {
|
|||||||
params.append('iconName', photoName.value)
|
params.append('iconName', photoName.value)
|
||||||
const res: any = await PhotoApi.modelTypeList(params)
|
const res: any = await PhotoApi.modelTypeList(params)
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
if (res.message != '请先创建或导入图标库') {
|
||||||
let data = transformNestedJson(res.data, 'name', 'label')
|
let data = transformNestedJson(res.data, 'name', 'label')
|
||||||
typeTreeData.value = data
|
typeTreeData.value = data
|
||||||
|
haventModel = false
|
||||||
|
} else {
|
||||||
|
//标识没得库文件
|
||||||
|
haventModel = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -516,7 +536,7 @@ const handleDragEnd = (
|
|||||||
) => {
|
) => {
|
||||||
console.log('tree drag end:', dropNode, dropType, ev, draggingNode)
|
console.log('tree drag end:', dropNode, dropType, ev, draggingNode)
|
||||||
if (dropType != 'none') {
|
if (dropType != 'none') {
|
||||||
let nodeList:any = []
|
let nodeList: any = []
|
||||||
switch (dropType) {
|
switch (dropType) {
|
||||||
case 'before':
|
case 'before':
|
||||||
case 'after':
|
case 'after':
|
||||||
|
|||||||
@ -484,8 +484,8 @@ import { sysChange as utilsSysChange } from '@/utils/sysChange'
|
|||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const isHotGroupOpen: any = ref(false)
|
const isHotGroupOpen: any = ref(true)
|
||||||
const isHotGroupOpen2: any = ref(false)
|
const isHotGroupOpen2: any = ref(true)
|
||||||
const showPosiType: any = ref(false)
|
const showPosiType: any = ref(false)
|
||||||
|
|
||||||
const systemSetting = ref({
|
const systemSetting = ref({
|
||||||
@ -583,7 +583,7 @@ const searchWay = ref()
|
|||||||
const concurrentcode = ref()
|
const concurrentcode = ref()
|
||||||
const showBattery = ref()
|
const showBattery = ref()
|
||||||
searchWay.value = localStorage.getItem('searchWay') || 'net'
|
searchWay.value = localStorage.getItem('searchWay') || 'net'
|
||||||
concurrentcode.value = localStorage.getItem('concurrentcode') || 10
|
concurrentcode.value = localStorage.getItem('concurrentcode') || 30
|
||||||
//系统坐标系
|
//系统坐标系
|
||||||
let tool = new YJ.Tools(window.earth)
|
let tool = new YJ.Tools(window.earth)
|
||||||
name_map.value = Array.from(tool.name_map.values())
|
name_map.value = Array.from(tool.name_map.values())
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="set_pup" :class="{'dialog-en': isEN}">
|
<div class="set_pup" :class="{ 'dialog-en': isEN }">
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="isShowPup"
|
v-model="isShowPup"
|
||||||
:modal="true"
|
:modal="true"
|
||||||
@ -149,6 +149,19 @@ const open = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeTab = (x, j) => {
|
const changeTab = (x, j) => {
|
||||||
|
switch (x) {
|
||||||
|
case 'modelManage':
|
||||||
|
eventBus.emit('openModelManage')
|
||||||
|
break
|
||||||
|
case 'photoManage':
|
||||||
|
eventBus.emit('openPhotoManage')
|
||||||
|
break
|
||||||
|
case 'graphLabelManage':
|
||||||
|
eventBus.emit('openGraphLabel')
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
switch (j) {
|
switch (j) {
|
||||||
case 'device':
|
case 'device':
|
||||||
eventBus.emit('closeAddDevice')
|
eventBus.emit('closeAddDevice')
|
||||||
@ -166,19 +179,17 @@ const close = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 可以在这里添加初始化逻辑
|
// 可以在这里添加初始化逻辑
|
||||||
if(locale.value === 'zh-EN') {
|
if (locale.value === 'zh-EN') {
|
||||||
isEN.value = true
|
isEN.value = true
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isEN.value = false
|
isEN.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(locale, ()=>{
|
watch(locale, () => {
|
||||||
if(locale.value === 'zh-EN') {
|
if (locale.value === 'zh-EN') {
|
||||||
isEN.value = true
|
isEN.value = true
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isEN.value = false
|
isEN.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -157,7 +157,6 @@ const precisionInput = () => {
|
|||||||
// precision.value = dom.max * 1
|
// precision.value = dom.max * 1
|
||||||
// }
|
// }
|
||||||
visibility.precisions = precision.value
|
visibility.precisions = precision.value
|
||||||
console.log('precision.value', visibility.precisions, precision.value)
|
|
||||||
}
|
}
|
||||||
const precisionChange = () => {}
|
const precisionChange = () => {}
|
||||||
const draw = (e) => {
|
const draw = (e) => {
|
||||||
@ -179,7 +178,6 @@ const updateDataAttr = async () => {
|
|||||||
}
|
}
|
||||||
const precisionMaxInput = () => {
|
const precisionMaxInput = () => {
|
||||||
let dom: any = document.getElementById('precision')
|
let dom: any = document.getElementById('precision')
|
||||||
console.log('maxNum.value', maxNum.value, dom.min, dom.max)
|
|
||||||
if (maxNum.value < dom.min * 1) {
|
if (maxNum.value < dom.min * 1) {
|
||||||
maxNum.value = dom.min * 1
|
maxNum.value = dom.min * 1
|
||||||
} else if (maxNum.value > dom.max * 1) {
|
} else if (maxNum.value > dom.max * 1) {
|
||||||
@ -190,7 +188,6 @@ const precisionMaxInput = () => {
|
|||||||
watch(
|
watch(
|
||||||
() => maxNum.value,
|
() => maxNum.value,
|
||||||
(x, j) => {
|
(x, j) => {
|
||||||
console.log('maxNum.value11111', 'x:' + x, 'y:' + j)
|
|
||||||
if (!x) {
|
if (!x) {
|
||||||
maxNum.value = 1
|
maxNum.value = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,13 @@
|
|||||||
<el-select style="width: 175px" v-model="coordinate" @change="sysChange">
|
<el-select style="width: 175px" v-model="coordinate" @change="sysChange">
|
||||||
<div
|
<div
|
||||||
class="group-header"
|
class="group-header"
|
||||||
:class="isHotGroupOpen ? 'arrowActive' : ''"
|
:class="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'arrowActive'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
@click="toggleGroup('hot')"
|
@click="toggleGroup('hot')"
|
||||||
>
|
>
|
||||||
地理坐标系
|
地理坐标系
|
||||||
@ -25,14 +31,26 @@
|
|||||||
v-if="isHotGroupOpen"
|
v-if="isHotGroupOpen"
|
||||||
name="arrow2"
|
name="arrow2"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(0, 255, 255, 1)"
|
:color="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-else
|
v-else
|
||||||
name="arrow1"
|
name="arrow1"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(255, 255, 255, 1)"
|
:color="
|
||||||
|
name_map1.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
@ -46,7 +64,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="group-header"
|
class="group-header"
|
||||||
:class="isHotGroupOpen2 ? 'arrowActive' : ''"
|
:class="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'arrowActive'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
@click="toggleGroup('ty')"
|
@click="toggleGroup('ty')"
|
||||||
>
|
>
|
||||||
投影坐标系
|
投影坐标系
|
||||||
@ -54,14 +78,26 @@
|
|||||||
v-if="isHotGroupOpen2"
|
v-if="isHotGroupOpen2"
|
||||||
name="arrow2"
|
name="arrow2"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(0, 255, 255, 1)"
|
:color="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-else
|
v-else
|
||||||
name="arrow1"
|
name="arrow1"
|
||||||
:size="10"
|
:size="10"
|
||||||
color="rgba(255, 255, 255, 1)"
|
:color="
|
||||||
|
name_map2.filter((item) => {
|
||||||
|
return item.epsg == coordinate
|
||||||
|
}).length > 0
|
||||||
|
? 'rgba(0, 255, 255, 1)'
|
||||||
|
: 'rgba(255, 255, 255, 1)'
|
||||||
|
"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
></svg-icon>
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
@ -122,9 +158,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 78%">
|
<div class="col" style="flex: 0 0 78%">
|
||||||
<span class="label">经度</span>
|
<span class="label">经度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="longitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="longitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -132,9 +168,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 78%">
|
<div class="col" style="flex: 0 0 78%">
|
||||||
<span class="label">纬度</span>
|
<span class="label">纬度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -155,11 +191,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 90%">
|
<div class="col" style="flex: 0 0 90%">
|
||||||
<span class="label">经度</span>
|
<span class="label">经度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="longitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="longitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="lngSec" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="lngSec" />
|
||||||
<span class="label2">秒</span>
|
<span class="label2">秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -167,11 +203,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 90%">
|
<div class="col" style="flex: 0 0 90%">
|
||||||
<span class="label">纬度</span>
|
<span class="label">纬度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latitude" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latitude" />
|
||||||
<span class="label2">度</span>
|
<span class="label2">度</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latMin" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latMin" />
|
||||||
<span class="label2">分</span>
|
<span class="label2">分</span>
|
||||||
<input class="input" type="number" placeholder="请输入内容" v-model="latSec" />
|
<input class="input" type="number" placeholder="请输入数值" v-model="latSec" />
|
||||||
<span class="label2">秒</span>
|
<span class="label2">秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
@ -365,6 +401,7 @@ const turnToPosition = async () => {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'second':
|
case 'second':
|
||||||
|
console.log(longitude.value, lngMin.value, 'klklkl')
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
|
var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
@ -379,8 +416,8 @@ const turnToPosition = async () => {
|
|||||||
window.earth
|
window.earth
|
||||||
)
|
)
|
||||||
position = {
|
position = {
|
||||||
lng: lng,
|
lng: longitude.value != null && lngMin.value != null ? lng : null,
|
||||||
lat: lat,
|
lat: latitude.value != null && latMin.value != null ? lat : null,
|
||||||
alt: point2[0].height < 0 ? 0 : point2[0].height
|
alt: point2[0].height < 0 ? 0 : point2[0].height
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,8 +440,8 @@ const turnToPosition = async () => {
|
|||||||
window.earth
|
window.earth
|
||||||
)
|
)
|
||||||
position = {
|
position = {
|
||||||
lng: lng,
|
lng: longitude.value != null && lngMin.value != null && lngSec.value != null ? lng : null,
|
||||||
lat: lat,
|
lat: latitude.value != null && latMin.value != null && latSec.value != null ? lat : null,
|
||||||
alt: point3[0].height < 0 ? 0 : point3[0].height
|
alt: point3[0].height < 0 ? 0 : point3[0].height
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@ -444,6 +481,7 @@ const getPosition = async () => {
|
|||||||
}
|
}
|
||||||
const flyto = async (e) => {
|
const flyto = async (e) => {
|
||||||
await getPosition()
|
await getPosition()
|
||||||
|
console.log(pointPosi.lng, pointPosi.lng !== 0, pointPosi.lat, 'ooppp')
|
||||||
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
|
if ((!pointPosi.lng && pointPosi.lng !== 0) || (!pointPosi.lat && pointPosi.lng !== 0)) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '请正确填写坐标信息!',
|
message: '请正确填写坐标信息!',
|
||||||
@ -474,7 +512,7 @@ const flyto = async (e) => {
|
|||||||
await initMapData('point', params, null)
|
await initMapData('point', params, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
var pointPosi:any = {}
|
var pointPosi: any = {}
|
||||||
const draw = async (e) => {
|
const draw = async (e) => {
|
||||||
if (!pointPosi.lng) {
|
if (!pointPosi.lng) {
|
||||||
await getPosition()
|
await getPosition()
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog ref="baseDialog" title="物质统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
<Dialog ref="baseDialog" title="物资统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div id="goodSearchEchart" style="width: 650px; height: 400px"></div>
|
<div id="goodSearchEchart" style="width: 650px; height: 400px"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog ref="baseDialog" title="物质统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
<Dialog ref="baseDialog" title="物资统计" left="180px" top="100px" :closeCallback="closeCallBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div id="goodSearchEchart2" style="width: 650px; height: 400px"></div>
|
<div id="goodSearchEchart2" style="width: 650px; height: 400px"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -207,6 +207,7 @@
|
|||||||
import { ref, reactive, onBeforeUnmount } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
import { set } from 'date-fns'
|
||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -228,7 +229,7 @@ var readOnly = ref(true)
|
|||||||
eventBus.on('submergeDialog', () => {
|
eventBus.on('submergeDialog', () => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
|
|
||||||
submerge = new YJ.Analysis.Submerge(window.earth)
|
submerge = new YJ.Analysis.Submerge(window.earth, {}, {}, animationEnd)
|
||||||
submerge.onEnd = (areaV, posi) => {
|
submerge.onEnd = (areaV, posi) => {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
minWaterLevel.value = submerge.minWaterLevel
|
minWaterLevel.value = submerge.minWaterLevel
|
||||||
@ -244,7 +245,7 @@ eventBus.on('submergeDialog', () => {
|
|||||||
const open = () => {
|
const open = () => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
|
|
||||||
submerge = new YJ.Analysis.Submerge(window.earth)
|
submerge = new YJ.Analysis.Submerge(window.earth, {}, {}, animationEnd)
|
||||||
submerge.onEnd = (areaV, posi) => {
|
submerge.onEnd = (areaV, posi) => {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
minWaterLevel.value = submerge.minWaterLevel
|
minWaterLevel.value = submerge.minWaterLevel
|
||||||
@ -257,6 +258,12 @@ const open = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let restart = false
|
||||||
|
const animationEnd = () => {
|
||||||
|
isPausng.value = false
|
||||||
|
restart = true
|
||||||
|
}
|
||||||
|
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
minWaterLevel.value = 0
|
minWaterLevel.value = 0
|
||||||
maxWaterLevel.value = 0
|
maxWaterLevel.value = 0
|
||||||
@ -287,18 +294,30 @@ function flyTo() {
|
|||||||
function reset() {
|
function reset() {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
submerge.restart()
|
submerge.restart()
|
||||||
|
restart = false
|
||||||
}
|
}
|
||||||
function pause() {
|
function pause() {
|
||||||
|
if (risingSpeed.value != 0) {
|
||||||
if (!isPausng.value) {
|
if (!isPausng.value) {
|
||||||
//暂停中
|
//暂停中
|
||||||
console.log('暂停中')
|
if (!restart) {
|
||||||
submerge.move()
|
submerge.move()
|
||||||
submerge.start()
|
submerge.start()
|
||||||
|
} else {
|
||||||
|
submerge.restart()
|
||||||
|
setTimeout(() => {
|
||||||
|
submerge.move()
|
||||||
|
submerge.start()
|
||||||
|
}, 10)
|
||||||
|
|
||||||
|
restart = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//播放中
|
//播放中
|
||||||
submerge.pause()
|
submerge.pause()
|
||||||
}
|
}
|
||||||
isPausng.value = !isPausng.value
|
isPausng.value = !isPausng.value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function analog() {
|
function analog() {
|
||||||
isPausng.value = false
|
isPausng.value = false
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<el-input v-model.trim="addForm.password" clearable placeholder="请输入密码"></el-input>
|
<el-input v-model.trim="addForm.password" clearable placeholder="请输入密码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="type">
|
<el-form-item label="设备类型" prop="type">
|
||||||
<el-select v-model.trim="addForm.type" filterable placeholder="请选择设备类型">
|
<el-select v-model.trim="addForm.type" placeholder="请选择设备类型">
|
||||||
<el-option label="海康" value="海康"> </el-option>
|
<el-option label="海康" value="海康"> </el-option>
|
||||||
<el-option label="大华" value="大华"> </el-option>
|
<el-option label="大华" value="大华"> </el-option>
|
||||||
<!-- <el-option label="手动录入" value="3"> </el-option> -->
|
<!-- <el-option label="手动录入" value="3"> </el-option> -->
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0">
|
<div
|
||||||
<transition name="video-fade" mode="out-in"
|
class="login-container"
|
||||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover">
|
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"
|
<!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded"
|
||||||
src="../../assets/video/login_front.mp4"
|
src="../../assets/video/login_front.mp4"
|
||||||
@ -9,8 +15,14 @@
|
|||||||
<!-- 第二个视频,循环播放 -->
|
<!-- 第二个视频,循环播放 -->
|
||||||
<!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4"
|
<!-- <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> -->
|
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"
|
<video
|
||||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></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>
|
</transition>
|
||||||
<!-- 登录页面 -->
|
<!-- 登录页面 -->
|
||||||
<div class="rightBox" v-if="isDesktop">
|
<div class="rightBox" v-if="isDesktop">
|
||||||
@ -27,45 +39,95 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginFormRef"
|
<el-form
|
||||||
label-position="left">
|
class="login-form"
|
||||||
|
autoComplete="on"
|
||||||
|
:model="loginForm"
|
||||||
|
:rules="loginRules"
|
||||||
|
ref="loginFormRef"
|
||||||
|
label-position="left"
|
||||||
|
>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="请输入用户名"
|
<el-input
|
||||||
:prefix-icon="User" />
|
name="username"
|
||||||
|
type="text"
|
||||||
|
v-model="loginForm.username"
|
||||||
|
autoComplete="on"
|
||||||
|
placeholder="请输入用户名"
|
||||||
|
:prefix-icon="User"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input type="password" @keyup.enter.native="handleLogin(loginFormRef)" v-model="loginForm.password"
|
<el-input
|
||||||
autoComplete="on" placeholder="请输入密码" :prefix-icon="Unlock" show-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-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="rememberForget">
|
<el-form-item class="rememberForget">
|
||||||
<!-- justify-content: space-around;align-items: center; -->
|
<!-- justify-content: space-around;align-items: center; -->
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<svg class="checkbox-svg" v-show="checkboxVModel" style="pointer-events: none"
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
|
class="checkbox-svg"
|
||||||
viewBox="0 0 14 14" fill="none">
|
v-show="checkboxVModel"
|
||||||
<path fill="rgba(var(--color-base1), 1)"
|
style="pointer-events: none"
|
||||||
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">
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
</path>
|
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
|
<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"
|
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>
|
||||||
<svg class="checkbox-svg" v-show="!checkboxVModel" style="pointer-events: none"
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
|
class="checkbox-svg"
|
||||||
viewBox="0 0 14 14" fill="none">
|
v-show="!checkboxVModel"
|
||||||
<path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)"
|
style="pointer-events: none"
|
||||||
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">
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
</path>
|
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>
|
<defs>
|
||||||
<linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125"
|
<linearGradient
|
||||||
y2="12.878036499023438" gradientUnits="userSpaceOnUse">
|
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="0.0625" stop-color="rgba(var(--color-base1), 1)" />
|
||||||
<stop offset="1" stop-color="var(--color-border1)" />
|
<stop offset="1" stop-color="var(--color-border1)" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<el-checkbox :disabled="loading" v-model="checkboxVModel" @change="rememberpwd"
|
<el-checkbox
|
||||||
label="string">记住密码</el-checkbox>
|
:disabled="loading"
|
||||||
|
v-model="checkboxVModel"
|
||||||
|
@change="rememberpwd"
|
||||||
|
label="string"
|
||||||
|
>记住密码</el-checkbox
|
||||||
|
>
|
||||||
<!-- <div style="cursor: pointer;">忘记密码?</div> -->
|
<!-- <div style="cursor: pointer;">忘记密码?</div> -->
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -88,15 +150,24 @@
|
|||||||
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
|
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
|
||||||
<div class="serviceContent">
|
<div class="serviceContent">
|
||||||
<el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect">
|
<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>
|
</el-tabs>
|
||||||
<div class="tabPanel">
|
<div class="tabPanel">
|
||||||
<template v-if="selectedService == '接口服务'">
|
<template v-if="selectedService == '接口服务'">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="itemLabel">服务选择</span>
|
<span class="itemLabel">服务选择</span>
|
||||||
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
|
<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"
|
<el-option
|
||||||
:value="item.name">
|
size="mini"
|
||||||
|
v-for="item in servOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@ -116,24 +187,30 @@
|
|||||||
<div class="item port">
|
<div class="item port">
|
||||||
<template v-if="servVal == '单机'">
|
<template v-if="servVal == '单机'">
|
||||||
<span class="itemLabel">端口</span>
|
<span class="itemLabel">端口</span>
|
||||||
<el-form-item prop="localport" :rules="[
|
<el-form-item
|
||||||
|
prop="localport"
|
||||||
|
:rules="[
|
||||||
{
|
{
|
||||||
validator: validateLocalportRange,
|
validator: validateLocalportRange,
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]">
|
]"
|
||||||
|
>
|
||||||
<el-input-number v-model="localport" :controls="false" />
|
<el-input-number v-model="localport" :controls="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="servVal == '网络'">
|
<template v-if="servVal == '网络'">
|
||||||
<span class="itemLabel">端口</span>
|
<span class="itemLabel">端口</span>
|
||||||
<el-form-item prop="port" :rules="[
|
<el-form-item
|
||||||
|
prop="port"
|
||||||
|
:rules="[
|
||||||
{
|
{
|
||||||
validator: validatePortRange,
|
validator: validatePortRange,
|
||||||
message: '端口号必须在 1024–65535 之间',
|
message: '端口号必须在 1024–65535 之间',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]">
|
]"
|
||||||
|
>
|
||||||
<el-input-number v-model="port" :controls="false" />
|
<el-input-number v-model="port" :controls="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -143,8 +220,13 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="itemLabel">串口选择</span>
|
<span class="itemLabel">串口选择</span>
|
||||||
<el-select class="select" popper-class="login-select-popper" v-model="gpsVal">
|
<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"
|
<el-option
|
||||||
:value="item.Name">
|
size="mini"
|
||||||
|
v-for="item in gpsOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.Product"
|
||||||
|
:value="item.Name"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@ -159,8 +241,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 授权页面 -->
|
<!-- 授权页面 -->
|
||||||
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack" left="calc(50vw - 188px)"
|
<Dialog
|
||||||
top="calc(50vh - 191px)">
|
ref="baseDialog"
|
||||||
|
class="graffiti"
|
||||||
|
title="系统授权"
|
||||||
|
:closeCallback="closeCallBack"
|
||||||
|
left="calc(50vw - 188px)"
|
||||||
|
top="calc(50vh - 191px)"
|
||||||
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="auth_info custom_scroll_bar content_h">
|
<div class="auth_info custom_scroll_bar content_h">
|
||||||
<div class="auth_info_box">
|
<div class="auth_info_box">
|
||||||
@ -168,9 +256,20 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authCode') }}
|
{{ t('auths.authCode') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_text" @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">
|
<div class="auth_info_text">
|
||||||
{{ authInfo.license_code || '' }}
|
<span
|
||||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
@click="copy(authInfo.license_code)"
|
||||||
|
style="cursor: pointer"
|
||||||
|
title="点击可复制"
|
||||||
|
>{{ authInfo.license_code || '' }}</span
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
name="copy"
|
||||||
|
:size="20"
|
||||||
|
@click="copy(authInfo.license_code)"
|
||||||
|
title="点击可复制"
|
||||||
|
style="margin-left: 30px; cursor: pointer"
|
||||||
|
></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_box">
|
<div class="auth_info_box">
|
||||||
@ -191,13 +290,22 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authType') }}
|
{{ t('auths.authType') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px" :style="{
|
<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)'
|
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
|
||||||
}">
|
}"
|
||||||
|
>
|
||||||
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
|
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</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') }}
|
{{ t('auths.noAuthexpire') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -242,7 +350,6 @@ const {
|
|||||||
loginInit,
|
loginInit,
|
||||||
isDesktop
|
isDesktop
|
||||||
} = useLogin() // 登录逻辑
|
} = useLogin() // 登录逻辑
|
||||||
console.log('isDesktop', isDesktop)
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
serviceDialog,
|
serviceDialog,
|
||||||
@ -270,30 +377,26 @@ onMounted(() => {
|
|||||||
loginInit()
|
loginInit()
|
||||||
initialize()
|
initialize()
|
||||||
|
|
||||||
let { isSeverInit, severError } = ipcRenderer.sendSync('judgment-isSeverInit');
|
let { isSeverInit, severError } = ipcRenderer.sendSync('judgment-isSeverInit')
|
||||||
// 如果服务端未初始化,等待初始化完成
|
// 如果服务端未初始化,等待初始化完成
|
||||||
if (isSeverInit) {
|
if (isSeverInit) {
|
||||||
console.log('severError', severError)
|
|
||||||
if (severError) {
|
if (severError) {
|
||||||
ElMessage.error(severError)
|
ElMessage.error(severError)
|
||||||
return
|
return
|
||||||
}
|
} else if (!router.currentRoute.value.query.type) {
|
||||||
else if (!router.currentRoute.value.query.type) {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getAuthCode()
|
getAuthCode()
|
||||||
getAuthInfo()
|
getAuthInfo()
|
||||||
}, 0);
|
}, 0)
|
||||||
} else {
|
} else {
|
||||||
isAuth.value = false
|
isAuth.value = false
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ipcRenderer.once('program-init', (e, error) => {
|
ipcRenderer.once('program-init', (e, error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
ElMessage.error(error)
|
ElMessage.error(error)
|
||||||
return
|
return
|
||||||
}
|
} else if (!router.currentRoute.value.query.type) {
|
||||||
else if (!router.currentRoute.value.query.type) {
|
|
||||||
getAuthCode()
|
getAuthCode()
|
||||||
getAuthInfo()
|
getAuthInfo()
|
||||||
} else {
|
} else {
|
||||||
@ -312,32 +415,33 @@ const router = useRouter()
|
|||||||
const getAuthInfo = async () => {
|
const getAuthInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await AuthApi.showAuth()
|
const res = await AuthApi.showAuth()
|
||||||
|
console.log(res, 'resresres')
|
||||||
if (typeof res.data === 'object') {
|
if (typeof res.data === 'object') {
|
||||||
authInfo.value.generateTime = res.data.generateTime
|
authInfo.value.generateTime = res.data.generateTime
|
||||||
authInfo.value.expireTime = res.data.expireTime
|
authInfo.value.expireTime = res.data.expireTime
|
||||||
console.log(authInfo.value.expireTime, '授权时间222')
|
|
||||||
getStatus2()
|
getStatus2()
|
||||||
getStatus(res.data.expireTime)
|
getStatus(res.data.expireTime)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
|
console.log('认证请求失败:', error)
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const baseDialog = ref(null)
|
const baseDialog = ref(null)
|
||||||
@ -349,23 +453,24 @@ const getStatus = (date) => {
|
|||||||
// router.push({ path: '/login' })
|
// router.push({ path: '/login' })
|
||||||
isAuth.value = false
|
isAuth.value = false
|
||||||
} else {
|
} else {
|
||||||
|
console.log('授权时间已过')
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '退出系统',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '去授权',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
closeOnClickModal: false
|
closeOnClickModal: false
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
// 用户点击取消,不执行任何操作
|
||||||
|
ipcRenderer.send('quit-app')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
try {
|
try {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('打开授权对话框失败:', error)
|
console.error('打开授权对话框失败:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
|
||||||
// 用户点击取消,不执行任何操作
|
|
||||||
ipcRenderer.send('quit-app')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +530,6 @@ const getStatus2 = () => {
|
|||||||
const timestamp = new Date(authInfo.value.expireTime).getTime()
|
const timestamp = new Date(authInfo.value.expireTime).getTime()
|
||||||
|
|
||||||
const currentTimestamp = Date.now()
|
const currentTimestamp = Date.now()
|
||||||
console.log('timestamp', timestamp > currentTimestamp)
|
|
||||||
if (timestamp > currentTimestamp) {
|
if (timestamp > currentTimestamp) {
|
||||||
authInfo.value.status = true
|
authInfo.value.status = true
|
||||||
} else {
|
} else {
|
||||||
@ -453,27 +557,26 @@ const copy = async (text) => {
|
|||||||
|
|
||||||
const validateLocalportRange = (rule, value, callback) => {
|
const validateLocalportRange = (rule, value, callback) => {
|
||||||
if (!localport.value) {
|
if (!localport.value) {
|
||||||
callback(new Error('请输入端口号')); // 校验失败
|
callback(new Error('请输入端口号')) // 校验失败
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (localport.value < 1024 || localport.value > 65535) {
|
if (localport.value < 1024 || localport.value > 65535) {
|
||||||
callback(new Error('端口号范围在 1024–65535 之间')); // 校验失败
|
callback(new Error('端口号范围在 1024–65535 之间')) // 校验失败
|
||||||
} else {
|
} else {
|
||||||
callback(); // 校验通过
|
callback() // 校验通过
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
const validatePortRange = (rule, value, callback) => {
|
const validatePortRange = (rule, value, callback) => {
|
||||||
if (!port.value) {
|
if (!port.value) {
|
||||||
callback(new Error('请输入端口号')); // 校验失败
|
callback(new Error('请输入端口号')) // 校验失败
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (port.value < 1024 || port.value > 65535) {
|
if (port.value < 1024 || port.value > 65535) {
|
||||||
callback(new Error('端口号范围在 1024–65535 之间')); // 校验失败
|
callback(new Error('端口号范围在 1024–65535 之间')) // 校验失败
|
||||||
} else {
|
} else {
|
||||||
callback(); // 校验通过
|
callback() // 校验通过
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 添加过渡样式
|
// 添加过渡样式
|
||||||
@ -501,7 +604,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
.content {
|
.content {
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
// background-color: transparent;
|
// background-color: transparent;
|
||||||
border: 0.2px solid rgba(var(--color-base1), 1);
|
// border: 0.2px solid rgba(var(--color-base1), 1);
|
||||||
box-shadow: 0 0 0 0.2px rgba(var(--color-base1), 1) inset !important;
|
box-shadow: 0 0 0 0.2px rgba(var(--color-base1), 1) inset !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 3px 11px;
|
padding: 3px 11px;
|
||||||
@ -753,7 +856,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
border-radius: 0 0 0 90%;
|
border-radius: 0 0 0 90%;
|
||||||
background: rgba(var(--color-base1), 1);
|
background: rgba(var(--color-base1), 1);
|
||||||
|
|
||||||
&>span {
|
& > span {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
@ -954,7 +1057,8 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
z-index: 99;
|
z-index: 99;
|
||||||
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
||||||
border: 1.5px solid;
|
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;
|
text-align: left;
|
||||||
font-family: 'sy-boldface';
|
font-family: 'sy-boldface';
|
||||||
}
|
}
|
||||||
@ -1000,11 +1104,11 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .title-box>.close-box {
|
::v-deep .title-box > .close-box {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .title-box>.title {
|
::v-deep .title-box > .title {
|
||||||
font-family: 'Ali-mother-counts-bold';
|
font-family: 'Ali-mother-counts-bold';
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -1027,7 +1131,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>button {
|
::v-deep .foot > button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: rgba(var(--color-base1), 0.2);
|
background: rgba(var(--color-base1), 0.2);
|
||||||
@ -1039,20 +1143,23 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>button:hover {
|
::v-deep .foot > button:hover {
|
||||||
border: 1px solid rgba(var(--color-base1), 1);
|
border: 1px solid rgba(var(--color-base1), 1);
|
||||||
color: rgba(var(--color-base1), 1);
|
color: rgba(var(--color-base1), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>.show>.label {
|
::v-deep .foot > .show > .label {
|
||||||
margin: 0px 10px;
|
margin: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-message-box {
|
::v-deep .el-message-box {
|
||||||
--el-messagebox-title-color: #fff !important;
|
--el-messagebox-title-color: #fff !important;
|
||||||
--el-messagebox-content-color: #fff !important;
|
--el-messagebox-content-color: #fff !important;
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0) 0%,
|
||||||
|
rgba(var(--color-base1), 0.2) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 0.6) !important;
|
rgba(0, 0, 0, 0.6) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1119,7 +1226,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
border-radius: 0 0 0 90%;
|
border-radius: 0 0 0 90%;
|
||||||
background: rgba(var(--color-base1), 1);
|
background: rgba(var(--color-base1), 1);
|
||||||
|
|
||||||
&>span {
|
& > span {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
@ -1216,7 +1323,8 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
|
|
||||||
.select {}
|
.select {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1262,8 +1370,11 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
.el-message-box {
|
.el-message-box {
|
||||||
--el-messagebox-title-color: #fff !important;
|
--el-messagebox-title-color: #fff !important;
|
||||||
--el-messagebox-content-color: #fff !important;
|
--el-messagebox-content-color: #fff !important;
|
||||||
background:
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
180deg,
|
||||||
|
rgba(var(--color-base1), 0) 0%,
|
||||||
|
rgba(var(--color-base1), 0.2) 100%
|
||||||
|
),
|
||||||
rgba(0, 0, 0, 0.6) !important;
|
rgba(0, 0, 0, 0.6) !important;
|
||||||
|
|
||||||
.el-message-box__headerbtn {
|
.el-message-box__headerbtn {
|
||||||
|
|||||||
Reference in New Issue
Block a user