Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
@ -1,6 +1,6 @@
|
||||
server:
|
||||
host: 127.0.0.1
|
||||
port: 8849
|
||||
port: 8848
|
||||
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
|
||||
poi:
|
||||
global:
|
||||
|
||||
@ -487,7 +487,7 @@ function createWindow(): void {
|
||||
...params,
|
||||
webPreferences: {
|
||||
...params.webPreferences,
|
||||
session: tempSession, // 关键:使用独立会话
|
||||
session: params.webPreferences?.session ? tempSession : null, // 关键:使用独立会话
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
devTools: true,
|
||||
|
||||
1
src/renderer/components.d.ts
vendored
@ -44,6 +44,7 @@ declare module 'vue' {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
|
||||
Tooltip: typeof import('./src/components/tooltip/index.vue')['default']
|
||||
UploadFiles: typeof import('./src/components/upload/uploadFiles.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
12
src/renderer/public/sdk/YJEarth.min.js
vendored
@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SourceHanSansTi';
|
||||
font-family: 'SourceHanSansTiM';
|
||||
src: url('../fonts/SourceHanSansCN-Medium.otf') format('opentype');
|
||||
}
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
src: url('../fonts/AlimamaShuHeiTi-Bold.ttf') format('truetype');
|
||||
}
|
||||
|
||||
|
||||
:root {
|
||||
--color-base1: 0, 255, 255;
|
||||
--color-sdk-auxiliary: 0, 66, 66;
|
||||
@ -488,7 +487,6 @@
|
||||
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
|
||||
}
|
||||
@ -530,6 +528,7 @@
|
||||
overflow-y: auto;
|
||||
scrollbar-gutter: stable;
|
||||
width: calc(100% + 1px);
|
||||
max-height: 233px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .table .align-center,
|
||||
@ -588,6 +587,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
.YJ-custom-base-dialog>.content .table .tr .td .link-edit {
|
||||
min-height: 32px;
|
||||
line-height: 18px;
|
||||
@ -722,7 +722,6 @@
|
||||
.YJ-custom-base-dialog>.content .input-number-unit input[type=number] {
|
||||
padding: 0 16px 0 10px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-outer-spin-button,
|
||||
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-inner-spin-button {
|
||||
margin-left: 5px;
|
||||
@ -1823,7 +1822,6 @@
|
||||
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));
|
||||
}
|
||||
@ -2094,7 +2092,6 @@
|
||||
.YJ-custom-base-dialog.cut-fill>.content>div .div-item:last-child .row .unit {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.cut-fill>.content .firstTip {
|
||||
position: absolute;
|
||||
left: 340px;
|
||||
@ -2159,7 +2156,6 @@
|
||||
flex: 0 0 60px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.submerge>.content .rangeWords {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
@ -2321,7 +2317,6 @@
|
||||
.YJ-custom-base-dialog.circle-view-shed>.content {
|
||||
width: 290px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.circle-view-shed>.content .firstTip {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
@ -3086,7 +3081,7 @@
|
||||
}
|
||||
|
||||
/* 文本框 */
|
||||
.popup-textarea {
|
||||
.popup-textarea{
|
||||
/* width: 212px; */
|
||||
width: 161px;
|
||||
/* height: 154px; */
|
||||
@ -3099,30 +3094,28 @@
|
||||
background-size: 100% 100%;
|
||||
padding: 5px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.popup-textarea textarea {
|
||||
.popup-textarea textarea{
|
||||
width: 158px;
|
||||
height: 95px;
|
||||
background-color: unset !important;
|
||||
border: unset !important;
|
||||
background-color: unset!important;
|
||||
border: unset!important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.popup-textarea textarea::-webkit-scrollbar {
|
||||
width: 8px !important;
|
||||
width: 8px!important;
|
||||
/* height: 8px!important; */
|
||||
}
|
||||
|
||||
.popup-textarea textarea::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px !important;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
|
||||
background-color: rgba(var(--color-base1)) !important;
|
||||
border-radius: 5px!important;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
|
||||
background-color: rgba(var(--color-base1))!important;
|
||||
}
|
||||
|
||||
.popup-textarea textarea::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
|
||||
border-radius: 5px !important;
|
||||
background-color: rgba(var(--color-base1), 0.1) !important;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important;
|
||||
border-radius: 5px!important;
|
||||
background-color: rgba(var(--color-base1), 0.1)!important;
|
||||
}
|
||||
|
||||
/* 贴地图片 */
|
||||
@ -3502,7 +3495,7 @@
|
||||
|
||||
.YJ-custom-checkbox-left:checked::after,
|
||||
.YJ-custom-checkbox-right:checked::after {
|
||||
content: "✔";
|
||||
content: "\2714";
|
||||
background-color: rgba(var(--color-base1), 1);
|
||||
color: rgba(var(--color-sdk-auxiliary), 1);
|
||||
width: 25px;
|
||||
@ -3537,7 +3530,7 @@
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
|
||||
content: "✔";
|
||||
content: "\2714";
|
||||
background-color: rgba(var(--color-base1), 1);
|
||||
color: rgba(var(--color-sdk-auxiliary), 1);
|
||||
width: 12px;
|
||||
@ -3716,16 +3709,12 @@
|
||||
border: 1px solid rgba(var(--color-base1), 0.5);
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.billboard-attribute-box .table .tr .th,
|
||||
.billboard-attribute-box .table .tr .td {
|
||||
.billboard-attribute-box .table .tr .th, .billboard-attribute-box .table .tr .td {
|
||||
border-right: 1px solid rgba(var(--color-base1), 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.billboard-attribute-box .table .tr .th:last-child,
|
||||
.billboard-attribute-box .table .tr .td:last-child {
|
||||
.billboard-attribute-box .table .tr .th:last-child, .billboard-attribute-box .table .tr .td:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
@ -3773,18 +3762,19 @@
|
||||
#YJ-custom-message.success {
|
||||
/* background-color: #f0f9eb;
|
||||
color: rgb(82, 196, 26); */
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);
|
||||
font-size: 14px !important;
|
||||
font-weight: 500 !important;
|
||||
color: rgba(27, 248, 195, 1);
|
||||
}
|
||||
|
||||
#YJ-custom-message.warning {
|
||||
/* background-color: #fdf6ec;
|
||||
color: #e6a23c; */
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(0deg, rgba(255, 161, 69, 0.5) 0%, rgba(255, 161, 69, 0) 100%);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(0deg, rgba(255, 161, 69, 0.5) 0%, rgba(255, 161, 69, 0) 100%);
|
||||
font-size: 14px !important;
|
||||
font-weight: 500 !important;
|
||||
color: rgba(255, 161, 69, 1)
|
||||
@ -3883,4 +3873,4 @@
|
||||
.yj-custom-icon.pic-line6 {
|
||||
background: url(../../img/arrow/6.png) 100% 100% no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/renderer/public/sdk/img/material/brick1.jpg
Normal file
|
After Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 7.6 MiB |
BIN
src/renderer/public/sdk/img/material/brick2.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 1.7 MiB |
BIN
src/renderer/public/sdk/img/material/brick3.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 717 KiB |
|
Before Width: | Height: | Size: 5.2 MiB |
@ -163,10 +163,10 @@ export default {
|
||||
version: '版本信息'
|
||||
},
|
||||
project: {
|
||||
engineeringSettings: '工程设置',
|
||||
engineeringSettings: '路网数据',
|
||||
importRoadNetwork: '路网导入',
|
||||
locationData: '地点数据',
|
||||
importPOLI: 'POLI导入',
|
||||
importPOLI: 'POIL导入',
|
||||
engineeringData: '工程数据',
|
||||
engineeringOverrideImport: '工程覆盖导入',
|
||||
engineeringMergeImports: '工程合并导入',
|
||||
@ -353,7 +353,7 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
// 态势部分
|
||||
// 态势部分
|
||||
ts: {
|
||||
historyDeduce: "历史推演",
|
||||
deduceName: "推演名称",
|
||||
|
||||
@ -11,7 +11,8 @@ export const LoginApi = {
|
||||
logout: async () => {
|
||||
return await request.post({
|
||||
url: `/user/logout`,
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -13,4 +13,10 @@ export const AuthApi = {
|
||||
url: `/auth/info`
|
||||
})
|
||||
},
|
||||
authImport: async (data) => {
|
||||
return await request.post({
|
||||
url: `/auth/import`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,11 +27,7 @@ export const TreeApi = {
|
||||
url: `/source/addOtherSource`,
|
||||
data
|
||||
}).then((res) => {
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ body {
|
||||
background: var(--color-background);
|
||||
line-height: 1.6;
|
||||
font-family:
|
||||
SourceHanSans,
|
||||
SourceHanSansTi,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
'Segoe UI',
|
||||
|
||||
BIN
src/renderer/src/assets/iconfont/SourceHanSansCN-Normal.ttf
Normal file
BIN
src/renderer/src/assets/images/pbfl.png
Normal file
|
After Width: | Height: | Size: 788 B |
BIN
src/renderer/src/assets/images/poil.png
Normal file
|
After Width: | Height: | Size: 738 B |
@ -41,8 +41,8 @@
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SourceHanSans';
|
||||
src: url('../iconfont/SourceHanSansCN-ExtraLight.ttf') format('opentype');
|
||||
font-family: 'SourceHanSansTi';
|
||||
src: url('../iconfont/SourceHanSansCN-Normal.ttf') format('opentype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
||||
@ -431,7 +431,7 @@ img {
|
||||
#app {
|
||||
.ztree * {
|
||||
font-size: 14px;
|
||||
font-family: SourceHanSans;
|
||||
font-family: SourceHanSansTi;
|
||||
}
|
||||
|
||||
.ztree li a {
|
||||
@ -676,6 +676,10 @@ img {
|
||||
background: rgba(var(--color-base1), 0.2) !important;
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
@media (max-height: 850px) {
|
||||
#distanceLegendDiv {
|
||||
.compass {
|
||||
|
||||
@ -75,7 +75,7 @@ service.interceptors.response.use(
|
||||
(response: AxiosResponse) => {
|
||||
const key = getRequestKey(response.config)
|
||||
pendingRequests.delete(key)
|
||||
// console.log(response);
|
||||
console.log(response);
|
||||
|
||||
// 统一处理HTTP状态码
|
||||
if (response.status === 200) {
|
||||
@ -95,8 +95,8 @@ service.interceptors.response.use(
|
||||
message: response.data.msg || response.data.message,
|
||||
type: 'error'
|
||||
})
|
||||
return response
|
||||
}
|
||||
|
||||
}
|
||||
return Promise.reject(new Error('Error'))
|
||||
},
|
||||
|
||||
@ -57,7 +57,15 @@ export const addMapSource = async ({ type, id, sourceName = '未命名对象', o
|
||||
// "treeIndex": 0,
|
||||
params: options
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
let res = await TreeApi.addOtherSource(params)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
params.params = JSON.stringify(params.params)
|
||||
params.isShow = true
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ export const initMapData = async (type, data, cd) => {
|
||||
}
|
||||
}
|
||||
entityObject = new YJ.Obj.TrajectoryMotion(window.earth, data)
|
||||
delete entityObject.options.reverse
|
||||
break
|
||||
case 'wallStereoscopic':
|
||||
entityObject = new YJ.Obj.WallStereoscopic(window.earth, data)
|
||||
|
||||
181
src/renderer/src/components/tooltip/index.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<div class="tooltip-wrapper" ref="tooltipRef" @mousemove="updatePosition" @mouseenter="handleShow"
|
||||
@mouseleave="handleHide">
|
||||
<slot name="trigger"></slot>
|
||||
<span v-show="visible" class="tooltip-popup" ref="popupRef">{{ props.content }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
delay: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'show', 'hide'])
|
||||
|
||||
// 响应式变量
|
||||
const tooltipRef = ref(null) // 触发元素Ref
|
||||
const popupRef = ref(null) // 弹窗Ref
|
||||
const visible = ref(false) // 弹窗显隐状态
|
||||
let showTimer = null // 显示延迟定时器
|
||||
let hideTimer = null // 隐藏延迟定时器
|
||||
|
||||
|
||||
|
||||
// 监听手动控制的显隐状态
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
if (props.trigger === 'manual') {
|
||||
visible.value = val
|
||||
if (val) {
|
||||
updatePosition()
|
||||
emit('show')
|
||||
} else {
|
||||
emit('hide')
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
// 更新弹窗位置
|
||||
const updatePosition = (e) => {
|
||||
if (!tooltipRef.value || !popupRef.value) return
|
||||
nextTick(() => {
|
||||
let top = e.y + 22
|
||||
let left = e.x + 10
|
||||
if (top > document.documentElement.clientHeight - 26) {
|
||||
top = document.documentElement.clientHeight - 26
|
||||
}
|
||||
if (left > document.documentElement.clientWidth - popupRef.value.offsetWidth) {
|
||||
left = document.documentElement.clientWidth - popupRef.value.offsetWidth
|
||||
}
|
||||
let style = {}
|
||||
style = {
|
||||
top: `${top}px`,
|
||||
left: `${left}px`
|
||||
}
|
||||
Object.assign(popupRef.value.style, style)
|
||||
})
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
const handleShow = (e) => {
|
||||
clearTimeout(hideTimer)
|
||||
showTimer = setTimeout(() => {
|
||||
visible.value = true
|
||||
emit('show')
|
||||
}, props.delay)
|
||||
}
|
||||
|
||||
// 隐藏弹窗
|
||||
const handleHide = () => {
|
||||
clearTimeout(showTimer)
|
||||
visible.value = false
|
||||
emit('hide')
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
|
||||
// 监听窗口大小变化,重新计算位置
|
||||
const handleResize = () => {
|
||||
if (visible.value) {
|
||||
updatePosition()
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('resize', handleResize)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('resize', handleResize)
|
||||
clearTimeout(showTimer)
|
||||
clearTimeout(hideTimer)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tooltip-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tooltip-popup {
|
||||
white-space: nowrap;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
padding: 7px 5px;
|
||||
color: #fff;
|
||||
font-family: 'D-Din-Bold';
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
pointer-events: none;
|
||||
line-height: 12px;
|
||||
background: linear-gradient(0deg, rgba(var(--color-base1), 0.1) 0%, rgba(var(--color-base1), 0.3) 100%), rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* 不同位置的箭头样式 */
|
||||
.tooltip-arrow {
|
||||
position: absolute;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #333;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.tooltip-top .tooltip-arrow {
|
||||
bottom: -4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
.tooltip-bottom .tooltip-arrow {
|
||||
top: -4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
.tooltip-left .tooltip-arrow {
|
||||
right: -4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
.tooltip-right .tooltip-arrow {
|
||||
left: -4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
/* 淡入淡出动画 */
|
||||
.tooltip-fade {
|
||||
transition: opacity 0.2s ease;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tooltip-popup:not(.tooltip-fade) {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.v-enter-from,
|
||||
.v-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.v-enter-active,
|
||||
.v-leave-active {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
</style>
|
||||
@ -1,5 +1,6 @@
|
||||
import theme from "@/utils/theme";
|
||||
export const sysChange = async (eventBus) => {
|
||||
import { set } from "date-fns";
|
||||
export const sysChange = async (eventBus, isFirst=false) => {
|
||||
let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}')
|
||||
|
||||
const obj = {
|
||||
@ -31,7 +32,11 @@ export const sysChange = async (eventBus) => {
|
||||
YJ.Global.setDMS(window.earth, systemSetting.positionType)
|
||||
|
||||
//比例尺
|
||||
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)
|
||||
console.log(systemSetting.sheetIndexStatusSwitch, window.earth, '标准图幅')
|
||||
setTimeout(async () => {
|
||||
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)
|
||||
}, isFirst ? 1000 : 0)
|
||||
|
||||
eventBus.emit('tufuInput', systemSetting.sheetIndexStatusSwitch)
|
||||
|
||||
//鹰眼图
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<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-select v-model="areaUnit" style="flex: 0 0 100px;">
|
||||
<el-option label="平方米" value="m2"></el-option>
|
||||
<el-option label="平方千米" value="km2"></el-option>
|
||||
<el-option label="亩" value="mu"></el-option>
|
||||
|
||||
@ -74,7 +74,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
|
||||
<button @click="importAuth">授权导入</button>
|
||||
<button @click="close">退出系统</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
@ -362,6 +363,25 @@ const copy = async (text) => {
|
||||
ElMessage.error('复制失败')
|
||||
}
|
||||
}
|
||||
|
||||
function importAuth() {
|
||||
// importWin = true
|
||||
let option = {
|
||||
properties: ['openFile'],
|
||||
filters: [{ name: '授权文件', extensions: ['YJ'] }]
|
||||
}
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
console.log(paths, 'paths')
|
||||
let formdata = new FormData()
|
||||
formdata.append('filePath', paths[0])
|
||||
try {
|
||||
let res = AuthApi.authImport(formdata)
|
||||
ElMessage.success('文件授权成功')
|
||||
getAuthInfo()
|
||||
} catch (error) {}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.rightBox {
|
||||
@ -565,7 +585,7 @@ const copy = async (text) => {
|
||||
|
||||
.greet {
|
||||
color: rgba(0, 66, 66, 1);
|
||||
font-family: 'SourceHanSans';
|
||||
font-family: 'SourceHanSansTi';
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: 500;
|
||||
|
||||
@ -3,23 +3,29 @@
|
||||
<div class="animate__animated bottomMenu">
|
||||
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i">
|
||||
<div class="bottom_box_content" @click="addMarker(item, $event)">
|
||||
<el-tooltip :content="t('bottomMenu.' + item.sourceType)" effect="customized" placement="top" :hide-after="0">
|
||||
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
|
||||
preserveAspectRatio="none">
|
||||
<path fill="#000000" fill-opacity="0.5"
|
||||
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" />
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
|
||||
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" />
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
|
||||
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</el-tooltip>
|
||||
<Tooltip :content="t('bottomMenu.' + item.sourceType)">
|
||||
<template #trigger>
|
||||
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
|
||||
preserveAspectRatio="none">
|
||||
<path fill="#000000" fill-opacity="0.5"
|
||||
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" />
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
|
||||
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" />
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
|
||||
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</template>
|
||||
</Tooltip>
|
||||
|
||||
<!-- <el-tooltip :content="t('bottomMenu.' + item.sourceType)" effect="customized" placement="top" :hide-after="0">
|
||||
|
||||
</el-tooltip> -->
|
||||
|
||||
<svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
|
||||
@ -42,31 +48,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_children" v-if="item.children" v-show="item.childrenShow">
|
||||
<div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m"
|
||||
@click="addMarker(item2, $event)">
|
||||
<el-tooltip :content="t('bottomMenu.' + item2.sourceType)" effect="customized" placement="top"
|
||||
:hide-after="0">
|
||||
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none"
|
||||
preserveAspectRatio="none">
|
||||
<path d="M11 0.5L108 0.5L118 35.5L1 35.5L11 0.5Z" stroke="url(#linear_border_2485_3)" stroke-width="1"
|
||||
fill="#000000" fill-opacity="0.5" />
|
||||
<path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd"
|
||||
fill="url(#linear_fill_2485_4)" />
|
||||
</svg>
|
||||
</el-tooltip>
|
||||
<svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.32568359375"
|
||||
height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none">
|
||||
<path fill="url(#linear_fill_2253_24_1)"
|
||||
d="M10.6628 0.5L107.663 0.5L117.663 35.5L0.662842 35.5L10.6628 0.5Z" />
|
||||
</svg>
|
||||
<svg-icon :name="item2.sourceType" :size="20" color="rgba(var(--color-base1), 1)"
|
||||
:strokeWidth="item2.sourceType == 'ellipse' ? 1.5 : 0.1"></svg-icon>
|
||||
<div class="span">
|
||||
{{ t('bottomMenu.' + item2.sourceType) }}
|
||||
</div>
|
||||
</div>
|
||||
<Tooltip v-for="(item2, m) of item.children" :key="m" :content="t('bottomMenu.' + item2.sourceType)" class="bottom_childre_box" @click="addMarker(item2, $event)">
|
||||
<template #trigger>
|
||||
<div class="bottom_childre_box">
|
||||
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5"
|
||||
fill="none" preserveAspectRatio="none">
|
||||
<path d="M11 0.5L108 0.5L118 35.5L1 35.5L11 0.5Z" stroke="url(#linear_border_2485_3)" stroke-width="1"
|
||||
fill="#000000" fill-opacity="0.5" />
|
||||
<path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd"
|
||||
fill="url(#linear_fill_2485_4)" />
|
||||
</svg>
|
||||
<svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.32568359375"
|
||||
height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none">
|
||||
<path fill="url(#linear_fill_2253_24_1)"
|
||||
d="M10.6628 0.5L107.663 0.5L117.663 35.5L0.662842 35.5L10.6628 0.5Z" />
|
||||
</svg>
|
||||
<svg-icon :name="item2.sourceType" :size="20" color="rgba(var(--color-base1), 1)"
|
||||
:strokeWidth="item2.sourceType == 'ellipse' ? 1.5 : 0.1"></svg-icon>
|
||||
<div class="span">
|
||||
{{ t('bottomMenu.' + item2.sourceType) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Tooltip>
|
||||
<svg-icon class="subscript2" name="subscript2" :size="14" color="rgba(var(--color-base1), 1)"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
@ -141,6 +147,7 @@
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { inject } from 'vue'
|
||||
import { addMapSource } from '../../../common/addMapSource'
|
||||
import Tooltip from '@/components/tooltip/index.vue'
|
||||
const { ipcRenderer } = require('electron')
|
||||
const { t } = useI18n()
|
||||
const eventBus: any = inject('bus')
|
||||
@ -746,6 +753,15 @@ document.addEventListener('click', (e: any) => {
|
||||
top: 0;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
:deep(.tooltip-wrapper) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
|
||||
.bottomMenu {
|
||||
@ -836,7 +852,7 @@ document.addEventListener('click', (e: any) => {
|
||||
}
|
||||
|
||||
&:hover {
|
||||
>.bottom_childre_box_bg_hover {
|
||||
.bottom_childre_box_bg_hover {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,15 @@
|
||||
{{ t('auths.noAuthexpire') }}
|
||||
</div>
|
||||
</div>
|
||||
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
|
||||
|
||||
<el-button
|
||||
@click="importAuth"
|
||||
color="#004b4b"
|
||||
style="border: 1px solid rgba(var(--color-base1), 0.5); width: 90px"
|
||||
>
|
||||
<span>{{ t('auths.upload') }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -59,6 +67,11 @@ import uploadFiles from '@/components/upload/uploadFiles.vue'
|
||||
import { AuthApi } from '@/api/setting/auth'
|
||||
import useClipboard from 'vue-clipboard3'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
$sendElectronChanel,
|
||||
$recvElectronChanel,
|
||||
$changeComponentShow
|
||||
} from '@/utils/communication'
|
||||
|
||||
const eventBus: any = inject('bus')
|
||||
const { t } = useI18n()
|
||||
@ -84,6 +97,24 @@ onUnmounted(() => {
|
||||
eventBus.off('upload', func)
|
||||
})
|
||||
|
||||
function importAuth() {
|
||||
// importWin = true
|
||||
let option = {
|
||||
properties: ['openFile'],
|
||||
filters: [{ name: '授权文件', extensions: ['YJ'] }]
|
||||
}
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
let formdata = new FormData()
|
||||
formdata.append('filePath', paths[0])
|
||||
try {
|
||||
let res = AuthApi.authImport(formdata)
|
||||
ElMessage.success('文件授权成功')
|
||||
getAuthInfo()
|
||||
} catch (error) {}
|
||||
})
|
||||
}
|
||||
|
||||
// eventBus.on('upload', (data) => {
|
||||
// if (data) {
|
||||
// getAuthInfo()
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="item_left">
|
||||
<div class="img">
|
||||
<img
|
||||
src="../../../../../../assets/images/pdf.png"
|
||||
src="../../../../../../assets/images/pbfl.png"
|
||||
style="width: 40px; height: 50px"
|
||||
/>
|
||||
</div>
|
||||
@ -88,7 +88,7 @@
|
||||
<div class="item_left">
|
||||
<div class="img">
|
||||
<img
|
||||
src="../../../../../../assets/images/poi.png"
|
||||
src="../../../../../../assets/images/poil.png"
|
||||
style="width: 40px; height: 50px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -105,6 +105,7 @@ import {
|
||||
$recvElectronChanel,
|
||||
$removeElectronChanel
|
||||
} from '@/utils/communication'
|
||||
import { set } from 'date-fns'
|
||||
|
||||
const eventBus: any = inject('bus')
|
||||
|
||||
@ -258,7 +259,15 @@ const attachUpload = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
let isClick = true
|
||||
const downloadTemp = async () => {
|
||||
if (!isClick) {
|
||||
return
|
||||
}
|
||||
isClick = false
|
||||
setTimeout(() => {
|
||||
isClick = true
|
||||
}, 1000)
|
||||
let p = 'xlsx'
|
||||
if (process.platform == 'linux') {
|
||||
p = 'et'
|
||||
@ -372,7 +381,7 @@ const downloadTemp = async () => {
|
||||
}
|
||||
|
||||
:deep(.el-table th.el-table__cell) {
|
||||
background: #004b4b;
|
||||
background: linear-gradient(rgba(var(--color-base1), 0.3), rgba(var(--color-base1), 0.3)), rgba(0, 0, 0, 1);
|
||||
color: #fff;
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
border-right: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
|
||||
@ -258,6 +258,7 @@ watch(photoName, (val) => {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
modelList.value = []
|
||||
currModelList.value = []
|
||||
getModelList()
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
@ -401,7 +402,8 @@ const handleFileChange = (e: Event) => {
|
||||
}
|
||||
//创建模型库
|
||||
const createModelDB = async () => {
|
||||
let date = new Date().toISOString().split('T')[0]
|
||||
// let date = new Date().toISOString().split('T')[0]
|
||||
let date = getCurrentDateFormatted()
|
||||
let option = {
|
||||
title: '创建军标库',
|
||||
// filename: 'YJEarth.junbiao',
|
||||
@ -423,6 +425,13 @@ const createModelDB = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
function getCurrentDateFormatted() {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(now.getDate()).padStart(2, '0')
|
||||
return `${year}${month}${day}`
|
||||
}
|
||||
|
||||
//导入模型库
|
||||
const importModelDB = () => {
|
||||
@ -891,24 +900,24 @@ const handleDelete = (row: any) => {
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
let formData = new FormData()
|
||||
formData.append('militaryId', row.id)
|
||||
GraphApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
getModelListByType(row.militaryTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
res.data.forEach((item) => {
|
||||
let node = window.treeObj.getNodeByParam('id', item, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
;(window as any).earth.entityMap.get(source_ids[0]).remove()
|
||||
;(window as any)._entityMap.delete(item)
|
||||
})
|
||||
}
|
||||
.then(async () => {
|
||||
try {
|
||||
let formData = new FormData()
|
||||
formData.append('militaryId', row.id)
|
||||
let res = await GraphApi.delModel(formData)
|
||||
|
||||
getModelListByType(row.militaryTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
res.data.forEach((item) => {
|
||||
let node = window.treeObj.getNodeByParam('id', item, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
;(window as any).earth.entityMap.get(source_ids[0]).remove()
|
||||
;(window as any)._entityMap.delete(item)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ var delFun = (row) => {
|
||||
}
|
||||
|
||||
:deep(.el-table th.el-table__cell) {
|
||||
background: #004b4b;
|
||||
background: linear-gradient(rgba(var(--color-base1), 0.3), rgba(var(--color-base1), 0.3)), rgba(0, 0, 0, 1);
|
||||
color: #fff;
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
border-right: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
|
||||
@ -286,6 +286,7 @@ watch(photoName, (val) => {
|
||||
// }
|
||||
getModelList()
|
||||
modelList.value = []
|
||||
currModelList.value = []
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
if (!value) return true
|
||||
@ -448,7 +449,8 @@ const handleFileChange = (e: Event) => {
|
||||
|
||||
//创建模型库
|
||||
const createModelDB = async () => {
|
||||
let date = new Date().toISOString().split('T')[0]
|
||||
// let date = new Date().toISOString().split('T')[0]
|
||||
let date = getCurrentDateFormatted()
|
||||
let option = {
|
||||
title: '创建模型库',
|
||||
// filename: 'YJEarth.model',
|
||||
@ -470,6 +472,13 @@ const createModelDB = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
function getCurrentDateFormatted() {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(now.getDate()).padStart(2, '0')
|
||||
return `${year}${month}${day}`
|
||||
}
|
||||
|
||||
//导入模型库
|
||||
const importModelDB = () => {
|
||||
@ -838,16 +847,15 @@ const handleEdit = (row: ModelItem) => {
|
||||
updatePoster(row)
|
||||
}
|
||||
const updatePoster1 = (row, flag = false, path = '') => {
|
||||
let cb = (c) => {
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
formData.append('file', c)
|
||||
ModelApi.updatePoster(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('添加成功')
|
||||
}
|
||||
})
|
||||
let cb = async (c) => {
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
formData.append('file', c)
|
||||
let res = await ModelApi.updatePoster(formData)
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('更换成功')
|
||||
} catch (error) {}
|
||||
}
|
||||
if (!flag) {
|
||||
let option = {
|
||||
@ -872,16 +880,16 @@ const updatePoster1 = (row, flag = false, path = '') => {
|
||||
|
||||
const updatePoster = (row, flag = false, path = '') => {
|
||||
let that = this
|
||||
let cb = (c) => {
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
formData.append('file', c)
|
||||
ModelApi.updatePoster(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('添加成功')
|
||||
}
|
||||
})
|
||||
let cb = async (c) => {
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
formData.append('file', c)
|
||||
let res = await ModelApi.updatePoster(formData)
|
||||
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('更换成功')
|
||||
} catch (error) {}
|
||||
}
|
||||
if (!flag) {
|
||||
let option = {
|
||||
@ -945,26 +953,25 @@ const handleDelete = (row: ModelItem) => {
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
let formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
ModelApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
// @ts-ignore
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
.then(async () => {
|
||||
try {
|
||||
let formData = new FormData()
|
||||
formData.append('modelId', row.id)
|
||||
let res = await ModelApi.delModel(formData)
|
||||
// @ts-ignore
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
res.data.forEach((item) => {
|
||||
let node = window.treeObj.getNodeByParam('id', item, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
;(window as any).earth.entityMap.get(source_ids[0]).remove()
|
||||
;(window as any)._entityMap.delete(item)
|
||||
})
|
||||
}
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
res.data.forEach((item) => {
|
||||
let node = window.treeObj.getNodeByParam('id', item, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
;(window as any).earth.entityMap.get(source_ids[0]).remove()
|
||||
;(window as any)._entityMap.delete(item)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
@ -292,6 +292,7 @@ watch(photoName, (val) => {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
getModelList()
|
||||
modelList.value = []
|
||||
currModelList.value = []
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
@ -483,7 +484,8 @@ const handleFileChange = (e: Event) => {
|
||||
}
|
||||
//创建模型库
|
||||
const createModelDB = async () => {
|
||||
let date = new Date().toISOString().split('T')[0]
|
||||
// let date = new Date().toISOString().split('T')[0]
|
||||
let date = getCurrentDateFormatted()
|
||||
let option = {
|
||||
title: '创建图标库',
|
||||
// filename: 'YJEarth.tubiao',
|
||||
@ -505,6 +507,13 @@ const createModelDB = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
function getCurrentDateFormatted() {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(now.getDate()).padStart(2, '0')
|
||||
return `${year}${month}${day}`
|
||||
}
|
||||
|
||||
//导入模型库
|
||||
const importModelDB = () => {
|
||||
@ -970,15 +979,15 @@ const handleDelete = (row: any) => {
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
let formData = new FormData()
|
||||
formData.append('iconId', row.id)
|
||||
PhotoApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
getModelListByType(row.iconTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
}
|
||||
})
|
||||
.then(async () => {
|
||||
try {
|
||||
let formData = new FormData()
|
||||
formData.append('iconId', row.id)
|
||||
let res = await PhotoApi.delModel(formData)
|
||||
|
||||
getModelListByType(row.iconTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
} catch (error) {}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
@ -711,7 +711,8 @@ const intoBack = async () => {
|
||||
contextIsolation: false,
|
||||
// devTools: true,
|
||||
// fullScreen: true,
|
||||
devTools: true
|
||||
devTools: true,
|
||||
session: true // 自定义参数,用于判断是否启用session
|
||||
}
|
||||
},
|
||||
// `http://localhost:${availablePort}/backManage/index.html#/login?timestamp=${Date.now()}`,
|
||||
@ -781,7 +782,7 @@ onMounted(() => {
|
||||
.detailSkin {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: left;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
padding-bottom: 15px;
|
||||
|
||||
@ -88,8 +88,8 @@
|
||||
class="input height custom-number-input with-arrows"
|
||||
type="number"
|
||||
step="0.1"
|
||||
min="0"
|
||||
max="1"
|
||||
:min="0"
|
||||
:max="1"
|
||||
v-model="weatherData.darkness"
|
||||
@change="changDarkness"
|
||||
>
|
||||
@ -108,8 +108,8 @@
|
||||
<el-input
|
||||
class="input height custom-number-input with-arrows arrows2"
|
||||
type="number"
|
||||
min="-9999999"
|
||||
max="999999999"
|
||||
:min="0.1"
|
||||
:max="9999"
|
||||
v-model="weatherData.speed"
|
||||
@change="changSpeed"
|
||||
size="small"
|
||||
@ -264,16 +264,19 @@ onMounted(() => {
|
||||
weatherData.softShadow = data.softShadow
|
||||
weatherData.darkness = data.darkness
|
||||
weatherData.speed = data.speed
|
||||
data?.wearther.forEach((item, index) => {
|
||||
list[index].status = item.status
|
||||
})
|
||||
// data?.wearther.forEach((item, index) => {
|
||||
// list[index].status = item.status
|
||||
// })
|
||||
}
|
||||
// list = data.wearther
|
||||
switchStatus.value = true
|
||||
sunshine = window.sunshine
|
||||
myData = formatTimeToBeijing()
|
||||
}
|
||||
|
||||
let wearther = JSON.parse(localStorage.getItem('weartherSetting'))
|
||||
wearther?.forEach((item, index) => {
|
||||
list[index].status = item.status
|
||||
})
|
||||
timeline && timeline.clear()
|
||||
|
||||
timeline = new TimeLine(window.earth, weatherData.speed, switchStatus.value, myData, initCallback)
|
||||
@ -302,10 +305,11 @@ onBeforeUnmount(() => {
|
||||
darkness: weatherData.darkness,
|
||||
speed: weatherData.speed,
|
||||
time: weatherData.time,
|
||||
timeerTime: document.getElementById('currentTime').textContent,
|
||||
wearther: list
|
||||
timeerTime: document.getElementById('currentTime').textContent
|
||||
// wearther: list
|
||||
}
|
||||
localStorage.setItem('shineSetting', JSON.stringify(data))
|
||||
localStorage.setItem('weartherSetting', JSON.stringify(list))
|
||||
// sunshine && sunshine.remove()
|
||||
timeline && timeline.clear()
|
||||
emit('isPause', document.getElementById('timePause').textContent == '播放')
|
||||
@ -379,8 +383,11 @@ var getDateTimeString = () => {
|
||||
watch(
|
||||
() => weatherData.darkness,
|
||||
(newValue) => {
|
||||
if (newValue < 0 || newValue > 1) {
|
||||
return
|
||||
}
|
||||
if (sunshine) {
|
||||
sunshine.darkness = newValue
|
||||
sunshine.darkness = 1 - newValue
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -400,6 +407,9 @@ var decrementValue = () => {
|
||||
watch(
|
||||
() => weatherData.speed,
|
||||
(newValue) => {
|
||||
if (newValue < 0 || newValue == 0 || newValue > 9999) {
|
||||
return
|
||||
}
|
||||
if (!currWeatherData) {
|
||||
weatherData.currWeather = false
|
||||
} else {
|
||||
@ -410,10 +420,13 @@ watch(
|
||||
}
|
||||
)
|
||||
var incrementValue2 = () => {
|
||||
weatherData.speed = new Decimal(weatherData.speed).add(1).toNumber()
|
||||
let val = new Decimal(weatherData.speed).add(1).toNumber()
|
||||
weatherData.speed = Math.min(val, 9999)
|
||||
}
|
||||
var decrementValue2 = () => {
|
||||
weatherData.speed = new Decimal(weatherData.speed).sub(1).toNumber()
|
||||
let val = new Decimal(weatherData.speed).sub(1).toNumber()
|
||||
// weatherData.speed = val < 0 || val == 0 ? 0.1 : val
|
||||
weatherData.speed = Math.max(val, 0.1)
|
||||
}
|
||||
var getCurrentTime = () => {
|
||||
const now = new Date()
|
||||
@ -461,7 +474,7 @@ var switchFunc = () => {
|
||||
sunshine = window.sunshine
|
||||
sunshine.timeBar(document.getElementById('currentTime').textContent)
|
||||
if (weatherData) {
|
||||
sunshine.darkness = weatherData.darkness
|
||||
sunshine.darkness = 1 - weatherData.darkness
|
||||
sunshine.speed = weatherData.speed
|
||||
sunshine.softShadow = weatherData.softShadow
|
||||
}
|
||||
@ -534,9 +547,19 @@ var clickTimeIcon = (item: any) => {
|
||||
}
|
||||
|
||||
var changDarkness = () => {
|
||||
sunshine && (sunshine.darkness = weatherData.darkness)
|
||||
if (weatherData.darkness < 0) {
|
||||
weatherData.darkness = 0
|
||||
} else if (weatherData.darkness > 1) {
|
||||
weatherData.darkness = 1
|
||||
}
|
||||
sunshine && (sunshine.darkness = 1 - weatherData.darkness)
|
||||
}
|
||||
var changSpeed = () => {
|
||||
if (weatherData.speed < 0 || weatherData.speed == 0) {
|
||||
weatherData.speed = 0.1
|
||||
} else if (weatherData.speed > 9999) {
|
||||
weatherData.speed = 9999
|
||||
}
|
||||
weatherData.currWeather = false
|
||||
sunshine && (sunshine.speed = weatherData.speed)
|
||||
timeline.setSpeed(weatherData.speed)
|
||||
|
||||
@ -81,6 +81,7 @@ export default class TimeLine {
|
||||
// })
|
||||
// } else {
|
||||
that.pauseed = !that.pauseed;
|
||||
|
||||
if (that.pauseed) {//暂停
|
||||
that.pausedTime = performance.now(); // 记录暂停时刻
|
||||
document.getElementById('timePause').textContent = '播放';
|
||||
@ -88,7 +89,7 @@ export default class TimeLine {
|
||||
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false)
|
||||
|
||||
//判断当没有开启光照时,点击停止播放时关闭实时光照按钮
|
||||
if (document.getElementById('weatherSwitch').style.color == 'rgba(var(--color-base1), 1)') {
|
||||
if (document.getElementById('weatherSwitch').style.color == 'rgba(var(--color-base1), 1)' || document.getElementById('weatherSwitch').style.color == 'rgb(255, 255, 255)') {
|
||||
callback(false)
|
||||
}
|
||||
} else {//播放
|
||||
|
||||
@ -147,33 +147,33 @@ var clickFun = (childData) => {
|
||||
darkness: 0.4,
|
||||
speed: 1,
|
||||
time: formattedDate,
|
||||
timeerTime: '00:00:00',
|
||||
wearther: [
|
||||
// 雨
|
||||
{
|
||||
name: '雨',
|
||||
svg: 'rain',
|
||||
status: false
|
||||
},
|
||||
// 雪
|
||||
{
|
||||
name: '雪',
|
||||
svg: 'snow',
|
||||
status: false
|
||||
},
|
||||
//雾
|
||||
{
|
||||
name: '雾',
|
||||
svg: 'fog',
|
||||
status: false
|
||||
},
|
||||
//星空
|
||||
{
|
||||
name: '星空',
|
||||
svg: 'skystarry',
|
||||
status: false
|
||||
}
|
||||
]
|
||||
timeerTime: '00:00:00'
|
||||
// wearther: [
|
||||
// // 雨
|
||||
// {
|
||||
// name: '雨',
|
||||
// svg: 'rain',
|
||||
// status: false
|
||||
// },
|
||||
// // 雪
|
||||
// {
|
||||
// name: '雪',
|
||||
// svg: 'snow',
|
||||
// status: false
|
||||
// },
|
||||
// //雾
|
||||
// {
|
||||
// name: '雾',
|
||||
// svg: 'fog',
|
||||
// status: false
|
||||
// },
|
||||
// //星空
|
||||
// {
|
||||
// name: '星空',
|
||||
// svg: 'skystarry',
|
||||
// status: false
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
}
|
||||
//光照
|
||||
@ -186,22 +186,22 @@ var clickFun = (childData) => {
|
||||
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
|
||||
})
|
||||
window.sunshine = sunshine
|
||||
sunshine.darkness = data.darkness
|
||||
sunshine.darkness = 1 - data.darkness
|
||||
sunshine.softShadow = data.softShadow
|
||||
|
||||
//天气效果
|
||||
if ((window as any).checkAuthIsValid) {
|
||||
data.wearther.forEach((item) => {
|
||||
if (item.status) {
|
||||
func[item.svg](item)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// ElMessage({
|
||||
// message: '您没有该功能的权限',
|
||||
// type: 'warning'
|
||||
// })
|
||||
}
|
||||
// if ((window as any).checkAuthIsValid) {
|
||||
// data.wearther.forEach((item) => {
|
||||
// if (item.status) {
|
||||
// func[item.svg](item)
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// // ElMessage({
|
||||
// // message: '您没有该功能的权限',
|
||||
// // type: 'warning'
|
||||
// // })
|
||||
// }
|
||||
} else if (weatherClickPop.value === false) {
|
||||
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
|
||||
id: 123,
|
||||
|
||||
@ -3,12 +3,14 @@
|
||||
<div class="left animate__animated">
|
||||
<div class="menus">
|
||||
<div class="menus_itemBox" v-for="(item, index) in menuList">
|
||||
<el-tooltip :content="t(`firstMenu.${item.name}`)" effect="customized" placement="top" :hide-after="0">
|
||||
<div class="item_icon" @click="(e) => {
|
||||
<Tooltip :content="t(`firstMenu.${item.name}`)" effect="customized" placement="top" :hide-after="0"
|
||||
class="item_icon" @click="(e) => {
|
||||
handleClick(item, index, e)
|
||||
}
|
||||
">
|
||||
<!-- <svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
<template #trigger>
|
||||
<div class="item_icon">
|
||||
<!-- <svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="162" height="44" viewBox="0 0 162 44" fill="none" preserveAspectRatio="none">
|
||||
<path fill="#000000" fill-opacity="0.5" d="M0 44L136.639 44L162 18L162 0L0 0L0 44Z" />
|
||||
<path fill-rule="evenodd" fill="rgba(42, 200, 251, 1)"
|
||||
@ -19,45 +21,47 @@
|
||||
<path d="M159 10L159 3L152 3L159 10Z" stroke="rgba(198, 248, 255, 1)" stroke-width="0.5"
|
||||
stroke-linejoin="round" />
|
||||
</svg> -->
|
||||
<svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="162" height="44" viewBox="0 0 162 44" fill="none" preserveAspectRatio="none">
|
||||
<path fill="#000000" fill-opacity="0.5" d="M0 44L136.639 44L162 18L162 0L0 0L0 44Z"/>
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2218_109_0)"
|
||||
d="M136.006 42.5L1.5 42.5L1.5 1.5L160.5 1.5L160.5 17.3896L136.006 42.5ZM136.639 44L0 44L0 0L162 0L162 18L136.639 44Z"/>
|
||||
<path d="M0 0L15.0533 0L49.1742 41L98.4484 41.2681L102 44L0 44L0 0Z"
|
||||
fill="rgba(var(--color-base1), 0.2)"/>
|
||||
<path d="M3 34L3 41L10 41L3 34Z" stroke="rgba(var(--color-base2), 1)" stroke-width="0.5"
|
||||
stroke-linejoin="round"/>
|
||||
<path d="M159 10L159 3L152 3L159 10Z" stroke="rgba(var(--color-base2), 1)" stroke-width="0.5"
|
||||
stroke-linejoin="round"/>
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2218_109_0" x1="0" y1="-1.7520751953125" x2="140.2142333984375"
|
||||
y2="40.473846435546875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)"/>
|
||||
<stop offset="1" stop-color="var(--color-border1)"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<svg class="item_icon_bg item_icon_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="163" height="45" viewBox="0 0 163 45" fill="none"
|
||||
preserveAspectRatio="none">
|
||||
<path fill="url(#linear_fill_2218_82_1)"
|
||||
d="M0.5 44.5L137.139 44.5L162.5 18.5L162.5 0.5L0.5 0.5L0.5 44.5Z"/>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_2218_82_1" x1="84.9554443359375" y1="44.49997329711914"
|
||||
x2="84.95498657226562" y2="0.5" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.6"/>
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<!-- <svg-icon :class-name="['absolute', 'zIndex-1', 'left_item_bg']" icon-class="bg2"></svg-icon> -->
|
||||
<svg-icon :name="item.svg" :size="16" color="rgba(var(--color-base2), 1)"></svg-icon>
|
||||
<div class="item_text">
|
||||
{{ t(`firstMenu.${item.name}`) }}
|
||||
<svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="162" height="44" viewBox="0 0 162 44" fill="none" preserveAspectRatio="none">
|
||||
<path fill="#000000" fill-opacity="0.5" d="M0 44L136.639 44L162 18L162 0L0 0L0 44Z" />
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2218_109_0)"
|
||||
d="M136.006 42.5L1.5 42.5L1.5 1.5L160.5 1.5L160.5 17.3896L136.006 42.5ZM136.639 44L0 44L0 0L162 0L162 18L136.639 44Z" />
|
||||
<path d="M0 0L15.0533 0L49.1742 41L98.4484 41.2681L102 44L0 44L0 0Z"
|
||||
fill="rgba(var(--color-base1), 0.2)" />
|
||||
<path d="M3 34L3 41L10 41L3 34Z" stroke="rgba(var(--color-base2), 1)" stroke-width="0.5"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M159 10L159 3L152 3L159 10Z" stroke="rgba(var(--color-base2), 1)" stroke-width="0.5"
|
||||
stroke-linejoin="round" />
|
||||
<defs>
|
||||
<linearGradient id="linear_border_2218_109_0" x1="0" y1="-1.7520751953125" x2="140.2142333984375"
|
||||
y2="40.473846435546875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<svg class="item_icon_bg item_icon_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="163" height="45" viewBox="0 0 163 45" fill="none"
|
||||
preserveAspectRatio="none">
|
||||
<path fill="url(#linear_fill_2218_82_1)"
|
||||
d="M0.5 44.5L137.139 44.5L162.5 18.5L162.5 0.5L0.5 0.5L0.5 44.5Z" />
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_2218_82_1" x1="84.9554443359375" y1="44.49997329711914"
|
||||
x2="84.95498657226562" y2="0.5" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.6" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<!-- <svg-icon :class-name="['absolute', 'zIndex-1', 'left_item_bg']" icon-class="bg2"></svg-icon> -->
|
||||
<svg-icon :name="item.svg" :size="16" color="rgba(var(--color-base2), 1)"></svg-icon>
|
||||
<div class="item_text">
|
||||
{{ t(`firstMenu.${item.name}`) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
</Tooltip>
|
||||
|
||||
</div>
|
||||
<leftSideSecond class="absolute zIndex99 leftSideSecond" ref="leftSideSecondRef"></leftSideSecond>
|
||||
@ -65,41 +69,41 @@
|
||||
</div>
|
||||
<div class="left_bottom" @click="fold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"
|
||||
viewBox="0 0 32 32" fill="none">
|
||||
viewBox="0 0 32 32" fill="none">
|
||||
<path fill="#000000" fill-opacity="0.6"
|
||||
d="M16 0C24.835 0 32 7.16496 32 16C32 24.835 24.835 32 16 32C7.16496 32 0 24.835 0 16C0 7.16496 7.16496 0 16 0Z"/>
|
||||
d="M16 0C24.835 0 32 7.16496 32 16C32 24.835 24.835 32 16 32C7.16496 32 0 24.835 0 16C0 7.16496 7.16496 0 16 0Z" />
|
||||
<path fill="url(#linear_fill_2442_491_1)"
|
||||
d="M16 0C24.835 0 32 7.16496 32 16C32 24.835 24.835 32 16 32C7.16496 32 0 24.835 0 16C0 7.16496 7.16496 0 16 0Z"/>
|
||||
d="M16 0C24.835 0 32 7.16496 32 16C32 24.835 24.835 32 16 32C7.16496 32 0 24.835 0 16C0 7.16496 7.16496 0 16 0Z" />
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2442_491_0)"
|
||||
d="M32 16C32 7.16496 24.835 0 16 0C7.16496 0 0 7.16496 0 16C0 24.835 7.16496 32 16 32C24.835 32 32 24.835 32 16ZM30.5 16C30.5 7.99187 24.0081 1.5 16 1.5C7.99187 1.5 1.5 7.99187 1.5 16C1.5 24.0081 7.99187 30.5 16 30.5C24.0081 30.5 30.5 24.0081 30.5 16Z"/>
|
||||
d="M32 16C32 7.16496 24.835 0 16 0C7.16496 0 0 7.16496 0 16C0 24.835 7.16496 32 16 32C24.835 32 32 24.835 32 16ZM30.5 16C30.5 7.99187 24.0081 1.5 16 1.5C7.99187 1.5 1.5 7.99187 1.5 16C1.5 24.0081 7.99187 30.5 16 30.5C24.0081 30.5 30.5 24.0081 30.5 16Z" />
|
||||
<g filter="url(#filter_2442_492)">
|
||||
<path
|
||||
d="M10.4025 16.1283L19.1887 9.77097C19.1941 9.76721 19.1995 9.76361 19.205 9.76018C19.2106 9.75678 19.2162 9.75356 19.222 9.75054C19.2278 9.74754 19.2337 9.74473 19.2396 9.74211C19.2456 9.73947 19.2517 9.73705 19.2578 9.73486C19.2639 9.73265 19.2701 9.73065 19.2764 9.72886C19.2827 9.72708 19.289 9.7255 19.2954 9.72415C19.3017 9.72279 19.3082 9.72166 19.3146 9.72075C19.3211 9.71985 19.3275 9.71916 19.334 9.71868C19.3405 9.71821 19.347 9.71794 19.3535 9.7179C19.3601 9.71787 19.3666 9.71808 19.3731 9.7185C19.3796 9.71891 19.3861 9.71954 19.3925 9.7204C19.399 9.72125 19.4054 9.72234 19.4118 9.72365C19.4182 9.72493 19.4245 9.72645 19.4308 9.72818C19.4371 9.7299 19.4433 9.73184 19.4495 9.734C19.4556 9.73615 19.4617 9.7385 19.4677 9.74108C19.4737 9.74365 19.4795 9.74641 19.4854 9.74936C19.4912 9.75234 19.4969 9.7555 19.5024 9.75886C19.508 9.76222 19.5135 9.76577 19.5188 9.7695C19.5242 9.77322 19.5294 9.77712 19.5345 9.78122C19.5395 9.78531 19.5445 9.78956 19.5492 9.79397C19.554 9.7984 19.5587 9.80298 19.5631 9.80772C19.5676 9.81246 19.5719 9.81735 19.5761 9.8224C19.5802 9.82742 19.5842 9.83259 19.588 9.8379C19.5917 9.84318 19.5953 9.8486 19.5987 9.85415C19.6022 9.8597 19.6054 9.86536 19.6084 9.87115C19.6115 9.87691 19.6143 9.88277 19.6169 9.88872C19.6196 9.8947 19.622 9.90074 19.6242 9.90686C19.6264 9.913 19.6284 9.91921 19.6302 9.92547C19.632 9.93173 19.6336 9.93805 19.635 9.94443C19.6363 9.95079 19.6375 9.9572 19.6384 9.96365C19.6393 9.9701 19.64 9.97658 19.6405 9.98308C19.641 9.98958 19.6413 9.99609 19.6413 10.0026L19.6413 11.6788C19.6413 12.0415 19.4676 12.3889 19.1705 12.6022L13.9773 16.3599L19.1705 20.1176C19.1887 20.1308 19.2065 20.1445 19.2239 20.1587C19.2413 20.1729 19.2583 20.1876 19.2749 20.2028C19.2914 20.218 19.3075 20.2337 19.3231 20.2499C19.3387 20.266 19.3539 20.2826 19.3685 20.2997C19.3831 20.3167 19.3972 20.3342 19.4109 20.3521C19.4245 20.37 19.4375 20.3883 19.45 20.407C19.4625 20.4256 19.4745 20.4446 19.4859 20.464C19.4973 20.4834 19.5081 20.5031 19.5183 20.5231C19.5285 20.5431 19.5381 20.5634 19.5471 20.584C19.5562 20.6046 19.5646 20.6254 19.5724 20.6465C19.5801 20.6676 19.5873 20.6889 19.5938 20.7104C19.6003 20.7319 19.6062 20.7536 19.6115 20.7754C19.6167 20.7973 19.6213 20.8193 19.6252 20.8414C19.6292 20.8635 19.6325 20.8858 19.6351 20.9081C19.6377 20.9304 19.6396 20.9528 19.6409 20.9752C19.6422 20.9977 19.6429 21.0201 19.6428 21.0426L19.6428 22.7173C19.6428 22.9489 19.3777 23.0845 19.1887 22.9489L10.4025 16.5915C10.3979 16.5882 10.3935 16.5848 10.3892 16.5812C10.3849 16.5776 10.3807 16.5739 10.3766 16.57C10.3725 16.5662 10.3686 16.5623 10.3647 16.5582C10.3608 16.5541 10.3571 16.5499 10.3535 16.5456C10.3499 16.5414 10.3464 16.537 10.343 16.5325C10.3396 16.528 10.3364 16.5234 10.3334 16.5187C10.3302 16.514 10.3273 16.5093 10.3245 16.5044C10.3217 16.4996 10.319 16.4946 10.3165 16.4896C10.3139 16.4846 10.3116 16.4796 10.3094 16.4744C10.3071 16.4693 10.305 16.464 10.3031 16.4588C10.3012 16.4535 10.2994 16.4482 10.2978 16.4428C10.2962 16.4375 10.2948 16.4321 10.2934 16.4266C10.2921 16.4211 10.291 16.4156 10.29 16.4101C10.2891 16.4046 10.2882 16.3991 10.2876 16.3935C10.2869 16.3879 10.2864 16.3824 10.2861 16.3768C10.2858 16.3711 10.2856 16.3655 10.2856 16.3599C10.2856 16.3543 10.2858 16.3487 10.2861 16.3431C10.2864 16.3375 10.2869 16.3319 10.2876 16.3264C10.2882 16.3208 10.2891 16.3153 10.29 16.3097C10.291 16.3042 10.2921 16.2987 10.2934 16.2933C10.2948 16.2878 10.2962 16.2824 10.2978 16.277C10.2994 16.2716 10.3012 16.2663 10.3031 16.2611C10.305 16.2558 10.3071 16.2506 10.3094 16.2455C10.3116 16.2403 10.3139 16.2352 10.3165 16.2302C10.319 16.2252 10.3217 16.2203 10.3245 16.2154C10.3273 16.2106 10.3302 16.2058 10.3334 16.2011C10.3364 16.1965 10.3396 16.1919 10.343 16.1874C10.3464 16.1829 10.3499 16.1785 10.3535 16.1742C10.3571 16.1699 10.3608 16.1658 10.3647 16.1617C10.3686 16.1576 10.3725 16.1536 10.3766 16.1498C10.3807 16.146 10.3849 16.1423 10.3892 16.1387C10.3935 16.1351 10.3979 16.1316 10.4025 16.1283Z"
|
||||
fill="rgba(var(--color-base2), 1)"/>
|
||||
fill="rgba(var(--color-base2), 1)" />
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_2442_491_1" x1="14.793701171875" y1="16.00537109375" x2="14.7939453125"
|
||||
y2="-6.678619384765625" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2"/>
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
|
||||
y2="-6.678619384765625" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
<linearGradient id="linear_border_2442_491_0" x1="32" y1="-1.27423095703125" x2="4.303466796875"
|
||||
y2="29.435516357421875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))"/>
|
||||
<stop offset="1" stop-color="var(--color-border1)"/>
|
||||
y2="29.435516357421875" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
<filter id="filter_2442_492" x="6.28564453125" y="5.717864990234375" width="17.357177734375"
|
||||
height="21.36663818359375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_492"/>
|
||||
height="21.36663818359375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_492" />
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha_2442_492"/>
|
||||
<feOffset dx="0" dy="0"/>
|
||||
<feGaussianBlur stdDeviation="2"/>
|
||||
<feComposite in2="hardAlpha_2442_492" operator="out"/>
|
||||
result="hardAlpha_2442_492" />
|
||||
<feOffset dx="0" dy="0" />
|
||||
<feGaussianBlur stdDeviation="2" />
|
||||
<feComposite in2="hardAlpha_2442_492" operator="out" />
|
||||
<feColorMatrix type="matrix"
|
||||
values="0 0 0 0 0.1450980392156863 0 0 0 0 0.7686274509803922 0 0 0 0 0.7686274509803922 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_492" result="shape_2442_492"/>
|
||||
values="0 0 0 0 0.1450980392156863 0 0 0 0 0.7686274509803922 0 0 0 0 0.7686274509803922 0 0 0 1 0" />
|
||||
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492" />
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_492" result="shape_2442_492" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -108,16 +112,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {useRouter} from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import {bus} from '@/utils/bus'
|
||||
import { bus } from '@/utils/bus'
|
||||
import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue'
|
||||
import {ElMessage, ElLoading} from 'element-plus'
|
||||
import { ElMessage, ElLoading } from 'element-plus'
|
||||
|
||||
const {ipcRenderer} = require('electron')
|
||||
const { ipcRenderer } = require('electron')
|
||||
const router = useRouter() // 路由实例
|
||||
const {t} = useI18n()
|
||||
const { t } = useI18n()
|
||||
const eventBus: any = inject('bus')
|
||||
const menuList: any = ref([
|
||||
// 方案推演
|
||||
@ -284,7 +288,7 @@ const handleClick = (item: any, index, e) => {
|
||||
ipcRenderer.send('toggle-fullscreen', true)
|
||||
window['earth'].destroy()
|
||||
window['earth'] = null
|
||||
router.push({path: '/ts'})
|
||||
router.push({ path: '/ts' })
|
||||
|
||||
} else {
|
||||
ElMessage({
|
||||
@ -452,7 +456,7 @@ onBeforeUnmount(() => {
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
> .item_icon_bg {
|
||||
>.item_icon_bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
@ -464,7 +468,7 @@ onBeforeUnmount(() => {
|
||||
// background: url('../../../assets/images/hongse/left1.png') no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
|
||||
> .item_icon_bg_hover {
|
||||
>.item_icon_bg_hover {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
@ -500,7 +504,7 @@ onBeforeUnmount(() => {
|
||||
cursor: pointer;
|
||||
pointer-events: all;
|
||||
|
||||
> svg {
|
||||
>svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ const handleKeyDown = (e) => {
|
||||
window.addEventListener('keydown', handleKeyDown)
|
||||
|
||||
eventBus.on('closeSplitScreen', (data: never) => {
|
||||
clickChange.splitScreen = !clickChange.splitScreen
|
||||
clickChange.splitScreen = false
|
||||
YJ.Global.splitScreen.off()
|
||||
})
|
||||
|
||||
@ -490,7 +490,7 @@ const methodMap = {
|
||||
},
|
||||
// 喷射水柱
|
||||
waterL: () => {
|
||||
let draw = new YJ.Draw.DrawPolyline(window.earth, { tipText: '左键单击确定控制点位置,右键单击取消水柱添加!CTRL+右键单击撤销上一个控制点' })
|
||||
let draw = new YJ.Draw.DrawPolyline(window.earth, { number: 2, tipText: '左键单击确定控制点位置,右键单击取消水柱添加!CTRL+右键单击撤销上一个控制点' })
|
||||
draw.start(async (a, positions) => {
|
||||
if (!positions || positions.length < 2) {
|
||||
if (a >= 2) {
|
||||
@ -875,8 +875,8 @@ const methodMap = {
|
||||
// let source_id = this.$md5(new Date().getTime() + '压平面')
|
||||
|
||||
let draw = new YJ.Draw.DrawPolygon(window.earth)
|
||||
draw.start((err, params) => {
|
||||
if (params.length > 2) {
|
||||
draw.start(async(err, params) => {
|
||||
if (params && params.length > 2) {
|
||||
if (err) throw err
|
||||
let alt = params[0].alt
|
||||
params.forEach((item) => {
|
||||
@ -907,7 +907,15 @@ const methodMap = {
|
||||
parentId: selectedNode.id
|
||||
}
|
||||
|
||||
TreeApi.addOtherSource(paramsData)
|
||||
let res = await TreeApi.addOtherSource(paramsData)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
paramsData.isShow = true
|
||||
paramsData.params = JSON.stringify(paramsData.params)
|
||||
; (window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData)
|
||||
@ -967,9 +975,11 @@ const methodMap = {
|
||||
let tileset = window.earth.entityMap.get(selectedNode[0].id)
|
||||
let draw = new YJ.Draw.DrawPolygon(window.earth)
|
||||
draw.start((err, pos) => {
|
||||
let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
|
||||
positions: pos
|
||||
})
|
||||
if(pos) {
|
||||
let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
|
||||
positions: pos
|
||||
})
|
||||
}
|
||||
// _entityMap.set(selectedNode.source_id + 'pouqie', section)
|
||||
})
|
||||
} else {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<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-select v-model="areaUnit" style="flex: 0 0 100px;">
|
||||
<el-option label="平方米" value="m2"></el-option>
|
||||
<el-option label="平方千米" value="km2"></el-option>
|
||||
<el-option label="亩" value="mu"></el-option>
|
||||
|
||||
@ -168,10 +168,37 @@ eventBus.on('contourDialog', () => {
|
||||
})
|
||||
const open = () => {
|
||||
baseDialog.value?.open()
|
||||
setVal()
|
||||
setTimeout(() => {
|
||||
YJ.Global.Contour(window.earth)
|
||||
})
|
||||
}
|
||||
const setVal = () => {
|
||||
//设置初始值
|
||||
let material = window.earth.viewer.scene.globe.material
|
||||
if (!material) {
|
||||
return
|
||||
}
|
||||
|
||||
let val = {
|
||||
secondaryLinesCount: material.uniforms.secondaryLinesCount,
|
||||
equalHeightDistance: material.uniforms.spacing / 5,
|
||||
activeColor: material.uniforms.activeColor,
|
||||
indexContourShow: material.uniforms.indexContourShow,
|
||||
indexContourWidth: material.uniforms.indexContourWidth,
|
||||
indexContourColor: material.uniforms.indexContourColor,
|
||||
intermediateContourShow: material.uniforms.intermediateContourShow,
|
||||
intermediateContourWidth: material.uniforms.intermediateContourWidth,
|
||||
intermediateContourColor: material.uniforms.intermediateContourColor,
|
||||
halfIntervalContourShow: material.uniforms.halfIntervalContourShow,
|
||||
halfIntervalContourWidth: material.uniforms.halfIntervalContourWidth,
|
||||
halfIntervalContourColor: material.uniforms.halfIntervalContourColor,
|
||||
supplementaryContourShow: material.uniforms.supplementaryContourShow,
|
||||
supplementaryContourWidth: material.uniforms.supplementaryContourWidth,
|
||||
supplementaryContourColor: material.uniforms.supplementaryContourColor
|
||||
}
|
||||
YJ.Global.ContourSetVal(val)
|
||||
}
|
||||
const closeCallBack = (e) => {
|
||||
YJ.Global.ContourReset()
|
||||
show.value = true
|
||||
@ -190,8 +217,7 @@ const sure = (e) => {
|
||||
message: value,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,8 +489,17 @@ const flyto = async (e) => {
|
||||
})
|
||||
return
|
||||
}
|
||||
if ((window as any).earthPlaceMap === undefined) {
|
||||
(window as any).earthPlaceMap = new Map()
|
||||
}
|
||||
if ((window as any).earthPlaceMap.size) {
|
||||
(window as any).earthPlaceMap.forEach((item) => {
|
||||
item.remove()
|
||||
})
|
||||
(window as any).earthPlaceMap.clear()
|
||||
}
|
||||
new YJ.Global.flyTo(window.earth, {
|
||||
position: { lng: pointPosi.lng, lat: pointPosi.lat, alt: pointPosi.alt + 100 }
|
||||
position: { lng: pointPosi.lng, lat: pointPosi.lat, alt: pointPosi.alt + 300 }
|
||||
})
|
||||
let name = '点标注'
|
||||
let params = {
|
||||
@ -574,4 +583,7 @@ defineExpose({
|
||||
line-height: 0px;
|
||||
text-shadow: 0px 0px 9px rgb(20, 118, 255);
|
||||
}
|
||||
::v-deep .content input[type='number'] {
|
||||
font-size: 15px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col" style="flex: 0 0 300px">
|
||||
<div class="col" style="flex: 0 0 350px">
|
||||
<!-- <input
|
||||
type="checkbox"
|
||||
name="isTotalTime"
|
||||
@ -267,7 +267,7 @@ let allData: any = reactive({
|
||||
defaultTime: 5,
|
||||
totalTime: 0
|
||||
})
|
||||
const save = () => {
|
||||
const save = async () => {
|
||||
if (allData.points.length != 0) {
|
||||
let selectedNodes = window.treeObj.getSelectedNodes()
|
||||
let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
|
||||
@ -306,7 +306,15 @@ const save = () => {
|
||||
params: JSON.stringify(paramsData.params)
|
||||
})
|
||||
} else {
|
||||
TreeApi.addOtherSource(paramsData)
|
||||
let res = await TreeApi.addOtherSource(paramsData)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
paramsData.isShow = true
|
||||
paramsData.params = JSON.stringify(paramsData.params)
|
||||
cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
|
||||
|
||||
@ -151,9 +151,9 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
||||
getAllItemInArea(lng, lat)
|
||||
break
|
||||
case 'Feature':
|
||||
if (item.detail.geometry.type == 'Point') {
|
||||
lng = item.detail.geometry.coordinates[0]
|
||||
lat = item.detail.geometry.coordinates[1]
|
||||
if (item.params.geometry.type == 'Point') {
|
||||
lng = item.params.geometry.coordinates[0]
|
||||
lat = item.params.geometry.coordinates[1]
|
||||
getAllItemInArea(lng, lat)
|
||||
}
|
||||
break
|
||||
|
||||
@ -12,33 +12,48 @@ import { inject } from 'vue'
|
||||
import { nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { MaterialApi } from '@/api/material/index'
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
const shpTotalDict: any = reactive({
|
||||
shlwz_jzzp: '救灾帐篷',
|
||||
mb: '棉被',
|
||||
mymdy: '棉衣、棉大衣',
|
||||
mjb: '毛巾被',
|
||||
mt: '毛毯',
|
||||
dgnsd: '睡袋',
|
||||
zdc: '折叠床',
|
||||
jycs: '简易厕所',
|
||||
xpct: '橡皮船(艇)',
|
||||
cfz: '冲锋舟',
|
||||
jsc: '救生船',
|
||||
jsy: '救生衣',
|
||||
jsq: '救生圈',
|
||||
bzd: '编织袋',
|
||||
md: '麻袋',
|
||||
csb: '抽水泵',
|
||||
fdj: '发电机',
|
||||
yjd: '应急灯',
|
||||
jzzp: '救灾帐篷',
|
||||
jzyb: '救灾衣被',
|
||||
jygj: '救援工具'
|
||||
// shlwz_jzzp: '救灾帐篷',
|
||||
// mb: '棉被',
|
||||
// mymdy: '棉衣、棉大衣',
|
||||
// mjb: '毛巾被',
|
||||
// mt: '毛毯',
|
||||
// dgnsd: '睡袋',
|
||||
// zdc: '折叠床',
|
||||
// jycs: '简易厕所',
|
||||
// xpct: '橡皮船(艇)',
|
||||
// cfz: '冲锋舟',
|
||||
// jsc: '救生船',
|
||||
// jsy: '救生衣',
|
||||
// jsq: '救生圈',
|
||||
// bzd: '编织袋',
|
||||
// md: '麻袋',
|
||||
// csb: '抽水泵',
|
||||
// fdj: '发电机',
|
||||
// yjd: '应急灯',
|
||||
// jzzp: '救灾帐篷',
|
||||
// jzyb: '救灾衣被',
|
||||
// jygj: '救援工具'
|
||||
})
|
||||
|
||||
//获取物资类型
|
||||
const getResource = () => {
|
||||
let formData: any = new FormData()
|
||||
formData.append('pageNum', 1)
|
||||
formData.append('pageSize', 10000)
|
||||
formData.append('name', '')
|
||||
MaterialApi.getList(formData).then((res) => {
|
||||
shpTotalDict.value = res.data.records.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
})
|
||||
}
|
||||
getResource()
|
||||
|
||||
var draw: any = reactive([])
|
||||
|
||||
var show: any = ref(false)
|
||||
@ -115,9 +130,9 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
||||
getAllItemInArea(lng, lat)
|
||||
break
|
||||
case 'Feature':
|
||||
if (item.detail.geometry.type == 'Point') {
|
||||
lng = item.detail.geometry.coordinates[0]
|
||||
lat = item.detail.geometry.coordinates[1]
|
||||
if (item.params.geometry.type == 'Point') {
|
||||
lng = item.params.geometry.coordinates[0]
|
||||
lat = item.params.geometry.coordinates[1]
|
||||
getAllItemInArea(lng, lat)
|
||||
}
|
||||
break
|
||||
@ -125,46 +140,54 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
||||
}
|
||||
return itemInArea
|
||||
}
|
||||
function renderCanvas(nodes) {
|
||||
async function renderCanvas(nodes) {
|
||||
let x: any = []
|
||||
let y: any = []
|
||||
nodes.forEach((item) => {
|
||||
// shp物资统计
|
||||
if (item.sourceType == 'Feature') {
|
||||
let obj = JSON.parse(JSON.stringify(item.detail.properties))
|
||||
for (const key in obj) {
|
||||
let name = key
|
||||
if (shpTotalDict[key]) {
|
||||
name = shpTotalDict[key]
|
||||
// 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
let index = x.findIndex((item) => item === name)
|
||||
if (index !== -1) {
|
||||
y[index] = y[index] + Number(obj[key])
|
||||
} else {
|
||||
x.push(name)
|
||||
y.push(Number(obj[key]))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let params = JSON.parse(item.params)
|
||||
if (params.attribute && params.attribute.goods) {
|
||||
let goods = params.attribute.goods.content
|
||||
if (goods.length) {
|
||||
// $root_home_index.goodSearchDialog = false;
|
||||
goods.forEach((good) => {
|
||||
// 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
let index = x.findIndex((item) => item === good.name)
|
||||
if (index !== -1) {
|
||||
y[index] = y[index] + Number(good.cnt)
|
||||
} else {
|
||||
x.push(good.name)
|
||||
y.push(Number(good.cnt))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// nodes.forEach((item) => {
|
||||
// // shp物资统计
|
||||
// if (item.sourceType == 'Feature') {
|
||||
// let obj = JSON.parse(JSON.stringify(item.params.properties))
|
||||
// for (const key in obj) {
|
||||
// let name = key
|
||||
// if (shpTotalDict[key]) {
|
||||
// name = shpTotalDict[key]
|
||||
// // 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
// let index = x.findIndex((item) => item === name)
|
||||
// if (index !== -1) {
|
||||
// y[index] = y[index] + Number(obj[key])
|
||||
// } else {
|
||||
// x.push(name)
|
||||
// y.push(Number(obj[key]))
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// let params = JSON.parse(item.params)
|
||||
// if (params.attribute && params.attribute.goods) {
|
||||
// let goods = params.attribute.goods.content
|
||||
// if (goods.length) {
|
||||
// // $root_home_index.goodSearchDialog = false;
|
||||
// goods.forEach((good) => {
|
||||
// // 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
// let index = x.findIndex((item) => item === good.name)
|
||||
// if (index !== -1) {
|
||||
// y[index] = y[index] + Number(good.cnt)
|
||||
// } else {
|
||||
// x.push(good.name)
|
||||
// y.push(Number(good.cnt))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
let pointIds = nodes.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
console.log(pointIds, 'pointIds')
|
||||
let res = await MaterialApi.statistics(pointIds)
|
||||
y = Object.values(res.data)
|
||||
x = Object.keys(res.data)
|
||||
|
||||
let notZeroX: any = []
|
||||
let notZeroY: any = []
|
||||
|
||||
@ -50,15 +50,15 @@ const open = () => {
|
||||
}
|
||||
}
|
||||
const closeCallBack = (e) => {
|
||||
echartsObject && echartsObject.clear()
|
||||
profile && profile.clean()
|
||||
echartsObject && echartsObject.clear && echartsObject.clear()
|
||||
profile && profile.clean && profile.clean()
|
||||
profile = []
|
||||
echartsObject = []
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
echartsObject && echartsObject.clear()
|
||||
profile && profile.clean()
|
||||
echartsObject && echartsObject.clear && echartsObject.clear()
|
||||
profile && profile.clean && profile.clean()
|
||||
profile = []
|
||||
echartsObject = []
|
||||
})
|
||||
@ -68,7 +68,7 @@ function close() {
|
||||
const draw = (e) => {
|
||||
// @ts-ignore (define in dts)
|
||||
initEcharts()
|
||||
profile.reDraw()
|
||||
profile && profile.reDraw && profile.reDraw()
|
||||
}
|
||||
function initEcharts(points) {
|
||||
let datas = [],
|
||||
|
||||
@ -300,6 +300,7 @@ const open = () => {
|
||||
|
||||
const closeCallBack = (e) => {
|
||||
status1.value = false
|
||||
tools.projConvert(status1.value, () => {})
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
closeCallBack('')
|
||||
|
||||
@ -6,11 +6,12 @@
|
||||
style="z-index: 1000"
|
||||
left="calc(50% - 160px)"
|
||||
top="calc(50% - 120px)"
|
||||
width="350px"
|
||||
>
|
||||
<template #content>
|
||||
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
|
||||
<el-form-item label="名称" prop="cameraName">
|
||||
<el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称"/>
|
||||
<el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称" style="width: 220px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备IP" prop="ip">
|
||||
<el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
|
||||
@ -51,16 +52,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue'
|
||||
import {inject} from 'vue'
|
||||
import {TreeApi} from '@/api/tree'
|
||||
import { ref } from 'vue'
|
||||
import { inject } from 'vue'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import {initMapData} from '../../../common/initMapData'
|
||||
import {useTreeNode} from '../tree/hooks/treeNode'
|
||||
import {deviceApi} from '@/api/deviceManage/index'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import { initMapData } from '../../../common/initMapData'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
import { deviceApi } from '@/api/deviceManage/index'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const {cusAddNodes} = useTreeNode()
|
||||
const { cusAddNodes } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
@ -79,10 +80,28 @@ var addForm: any = ref({
|
||||
})
|
||||
|
||||
const peopleRules: any = reactive({
|
||||
cameraName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
ip: [{required: true, message: '请输入ip', trigger: 'blur'}],
|
||||
cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
ip: [
|
||||
{ required: true, message: '请输入ip', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const ipPattern = /^(\d{1,3}\.){3}\d{1,3}$/
|
||||
if (!ipPattern.test(value)) {
|
||||
callback(new Error('请输入有效的IP地址'))
|
||||
} else {
|
||||
const parts = value.split('.').map(Number)
|
||||
if (parts.some((part) => part < 0 || part > 255)) {
|
||||
callback(new Error('IP地址段必须在0-255之间'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
port: [
|
||||
{required: true, message: '请输入设备端口号', trigger: 'blur'},
|
||||
{ required: true, message: '请输入设备端口号', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
@ -111,10 +130,10 @@ const peopleRules: any = reactive({
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
username: [{required: true, message: '请输入用户名', trigger: 'blur'}],
|
||||
password: [{required: true, message: '请输入密码', trigger: 'blur'}],
|
||||
type: [{required: true, message: '请选择设备类型', trigger: 'blur'}],
|
||||
channel: [{required: true, message: '请输入通道号', trigger: 'blur'}]
|
||||
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
||||
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }],
|
||||
channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
var cancel = () => {
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
|
||||
:closeCallback="closeCallBack">
|
||||
<template #content>
|
||||
<textarea style="height: 40px; width: 348px;" maxlength="80" v-model="text"></textarea>
|
||||
<textarea style="height: 40px; width: 348px;margin-bottom: 10px;" maxlength="80" v-model="text"></textarea>
|
||||
<span style="position: absolute;bottom: 66px;right: 26px;font-size: 12px;color: #c5c5c5;font-family: Arial;">{{
|
||||
text.length }}/80</span>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button @click="confirm">{{ t('btn.confirm') }}</button>
|
||||
@ -94,7 +96,15 @@ const confirm = () => {
|
||||
// "treeIndex": 0,
|
||||
params: options
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
let res = await TreeApi.addOtherSource(params)
|
||||
if (![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
params.params = JSON.stringify(params.params)
|
||||
params.isShow = true
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
|
||||
:closeCallback="closeCallBack">
|
||||
<template #content>
|
||||
<textarea style="height: 40px; width: 348px;" maxlength="80" v-model="text"></textarea>
|
||||
<textarea style="height: 40px; width: 348px;margin-bottom: 10px;" maxlength="80" v-model="text"></textarea>
|
||||
<span style="position: absolute;bottom: 66px;right: 26px;font-size: 12px;color: #c5c5c5;font-family: Arial;">{{
|
||||
text.length }}/80</span>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button @click="confirm">{{ t('btn.confirm') }}</button>
|
||||
@ -89,7 +91,15 @@ const confirm = () => {
|
||||
// "treeIndex": 0,
|
||||
params: options
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
let res = await TreeApi.addOtherSource(params)
|
||||
if (![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
params.params = JSON.stringify(params.params)
|
||||
params.isShow = true
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<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-select v-model="areaUnit" style="flex: 0 0 100px;">
|
||||
<el-option label="平方米" value="m2"></el-option>
|
||||
<el-option label="平方千米" value="km2"></el-option>
|
||||
<el-option label="亩" value="mu"></el-option>
|
||||
|
||||
@ -514,7 +514,7 @@ const y = ref()
|
||||
const z = ref()
|
||||
const coordinate = ref('EPSG:4326')
|
||||
const isHotGroupOpen: any = ref(true)
|
||||
const isHotGroupOpen2: any = ref(false)
|
||||
const isHotGroupOpen2: any = ref(true)
|
||||
const showPosiType: any = ref(false)
|
||||
const heightMode = ref(0)
|
||||
const labelColorRef = ref(null)
|
||||
@ -786,6 +786,7 @@ const updateHeight = () => {
|
||||
const translate = () => {
|
||||
that.openPositionEditing(() => {
|
||||
changAlt()
|
||||
projConvert()
|
||||
})
|
||||
}
|
||||
const confirm = () => {
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
<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="col" style="flex: 0 0 60%">
|
||||
<div style="width: 100%">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<el-select v-model="wordsName" @change="changeWordsName">
|
||||
@ -17,7 +17,7 @@
|
||||
<el-option label="投影长度" :value="1"></el-option>
|
||||
<el-option label="地表长度" :value="2"></el-option>
|
||||
</el-select>
|
||||
<input v-model="length" class="input-text" readonly />
|
||||
<input v-model="length" class="input-text" readonly style="width: 140px;" />
|
||||
<el-select v-model="lengthUnit">
|
||||
<el-option label="米" value="m"></el-option>
|
||||
<el-option label="千米" value="km"></el-option>
|
||||
@ -344,7 +344,7 @@ const open = async (id, type) => {
|
||||
linePositions.value = structuredClone(that.options.positions)
|
||||
that.lengthChangeCallBack = () => {
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
@ -440,7 +440,7 @@ const nodeEdit = () => {
|
||||
that.nodeEdit((positions, lenByMeter) => {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = lenByMeter / 1000
|
||||
length.value = lenByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = lenByMeter
|
||||
}
|
||||
@ -450,7 +450,7 @@ const translate = () => {
|
||||
that.openPositionEditing(() => {
|
||||
entityOptions.value.options.positions = structuredClone(that.options.positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
@ -518,7 +518,7 @@ watch(
|
||||
(val) => {
|
||||
if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) {
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
|
||||
@ -219,9 +219,12 @@ let observer: IntersectionObserver | null = null
|
||||
|
||||
const treeRef: any = ref('')
|
||||
watch(modelName, (val) => {
|
||||
if (treeRef.value && treeRef.value !== '') {
|
||||
treeRef.value!.filter(val)
|
||||
}
|
||||
// if (treeRef.value && treeRef.value !== '') {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
categories.value = []
|
||||
currModelList.value = []
|
||||
getModelList()
|
||||
})
|
||||
|
||||
watch(isShowPup, (val) => {
|
||||
@ -390,7 +393,7 @@ const renderModel = async (model) => {
|
||||
|
||||
let GroundSvg = new YJ.Obj.GroundSvg(window.earth, option)
|
||||
|
||||
GroundSvg.load(() => {
|
||||
GroundSvg.load(async() => {
|
||||
GroundSvg.drag(true, null, (data) => {
|
||||
let params = data
|
||||
delete params.attributeType
|
||||
@ -420,7 +423,15 @@ const renderModel = async (model) => {
|
||||
: selectedNode.parentId
|
||||
: undefined
|
||||
}
|
||||
TreeApi.addOtherSource(DbOption)
|
||||
let res = await TreeApi.addOtherSource(DbOption)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
DbOption.isShow = true
|
||||
DbOption.params = JSON.stringify(DbOption.params)
|
||||
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
|
||||
@ -435,6 +446,7 @@ const renderModel = async (model) => {
|
||||
const getModelListByType = (id) => {
|
||||
let formData = new FormData()
|
||||
formData.append('militaryTypeId', id)
|
||||
formData.append('name', modelName.value)
|
||||
GraphApi.showModelByType(formData).then((res) => {
|
||||
categories.value = res.data
|
||||
|
||||
@ -445,7 +457,9 @@ const getModelListByType = (id) => {
|
||||
}
|
||||
|
||||
const getModelList = async () => {
|
||||
const res: any = await GraphApi.modelTypeList()
|
||||
const params = new URLSearchParams()
|
||||
params.append('militaryName', modelName.value)
|
||||
const res: any = await GraphApi.modelTypeList(params)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
let data = transformNestedJson(res.data, 'name', 'label')
|
||||
typeTreeData.value = data
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col" style="position: relative;">
|
||||
<span class="label">名称</span>
|
||||
<textarea v-model="entityOptions.text"></textarea>
|
||||
<textarea style="margin-bottom: 10px;" v-model="entityOptions.text"></textarea>
|
||||
<span style="position: absolute;bottom: -10px;right: 2px;font-size: 12px;color: #c5c5c5;font-family: Arial;">{{ entityOptions.text.length || 0 }}/80</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">颜色</span>
|
||||
|
||||
@ -315,6 +315,7 @@ watch(modelName, (val) => {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
categories.value = []
|
||||
currModelList.value = []
|
||||
getModelList()
|
||||
})
|
||||
|
||||
@ -548,7 +549,15 @@ const renderModel = async (data, model) => {
|
||||
: selectedNode.parentId
|
||||
: undefined
|
||||
}
|
||||
TreeApi.addOtherSource(DbOption)
|
||||
let res = await TreeApi.addOtherSource(DbOption)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
DbOption.isShow = true
|
||||
DbOption.params = JSON.stringify(DbOption.params)
|
||||
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
|
||||
|
||||
@ -220,7 +220,7 @@
|
||||
min="0"
|
||||
max="99999"
|
||||
step="1"
|
||||
@change="scaleChange"
|
||||
@input="scaleChange"
|
||||
v-model="entityOptions.scaleX"
|
||||
/>
|
||||
<div
|
||||
@ -233,8 +233,7 @@
|
||||
title=""
|
||||
min="0"
|
||||
max="360"
|
||||
@input="$handleInputLimit"
|
||||
@change="scaleChange"
|
||||
@input="scaleChange"
|
||||
v-model="entityOptions.scaleX"
|
||||
/>
|
||||
<span class="unit">倍</span>
|
||||
@ -350,8 +349,8 @@
|
||||
style="width: 100px"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="360"
|
||||
min="-99999"
|
||||
max="999999"
|
||||
@input="$handleInputLimit"
|
||||
v-model="entityOptions.alt"
|
||||
/>
|
||||
@ -509,15 +508,11 @@
|
||||
</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" v-if="!moveFlag" @click="translate">
|
||||
<button v-if="!moveFlag" @click="translate">
|
||||
<svg class="icon-py">
|
||||
<use xlink:href="#yj-icon-py"></use></svg>平移
|
||||
</button>
|
||||
<button style="margin-left: 10px" v-if="moveFlag" @click="translate">
|
||||
<button v-if="moveFlag" @click="translate">
|
||||
<svg class="icon-py">
|
||||
<use xlink:href="#yj-icon-py"></use></svg>结束平移
|
||||
</button>
|
||||
@ -530,7 +525,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, getCurrentInstance } from 'vue'
|
||||
import { inject } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
@ -540,6 +535,8 @@ import labelStyle from './labelStyle.vue'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
import { getFontList } from './fontSelect'
|
||||
|
||||
const { proxy } = getCurrentInstance()!
|
||||
|
||||
const { t } = useI18n()
|
||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||
|
||||
@ -573,7 +570,8 @@ const entityOptions: any = ref({})
|
||||
let originalOptions: any
|
||||
let that: any
|
||||
|
||||
const scaleChange = () => {
|
||||
const scaleChange = (e) => {
|
||||
proxy?.$handleInputLimit(e)
|
||||
entityOptions.value.scaleY = entityOptions.value.scaleX
|
||||
entityOptions.value.scaleZ = entityOptions.value.scaleX
|
||||
}
|
||||
@ -726,12 +724,6 @@ const closeCallback = () => {
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
|
||||
const nodeEdit = () => {
|
||||
that.nodeEdit((e, positions, areaByMeter) => {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
})
|
||||
}
|
||||
|
||||
const confirm = () => {
|
||||
entityOptions.value.name = entityOptions.value.name || t("default.untitled")
|
||||
originalOptions = structuredClone(that.options)
|
||||
|
||||
@ -98,7 +98,19 @@ var addForm: any = ref({
|
||||
})
|
||||
|
||||
const peopleRules: any = reactive({
|
||||
distance: [{ required: true, message: '请输入间距', trigger: 'blur' }]
|
||||
distance: [
|
||||
{ required: true, message: '请输入间距', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value < 0 || value === 0) {
|
||||
callback(new Error('间距需大于0'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
var type: any = ref('point')
|
||||
|
||||
@ -265,7 +265,7 @@ const translate = () => {
|
||||
}
|
||||
else {
|
||||
that.openPositionEditing(() => {
|
||||
entityOptions.value.lng = structuredClone(that.options.lng)
|
||||
entityOptions.value.lng = structuredClone(that.lng)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -348,10 +348,12 @@ const changeMaximumParticleLife = (event) => {
|
||||
|
||||
|
||||
|
||||
const closeCallback = () => {
|
||||
const closeCallback = async () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
that.reset()
|
||||
await YJ.Global.multiViewportMode.syncData(window.earth, that.options.id)
|
||||
await YJ.Global.splitScreen.syncData(window.earth, that.options.id)
|
||||
eventBus?.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<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-select v-model="areaUnit" style="flex: 0 0 100px;">
|
||||
<el-option label="平方米" value="m2"></el-option>
|
||||
<el-option label="平方千米" value="km2"></el-option>
|
||||
<el-option label="亩" value="mu"></el-option>
|
||||
@ -314,8 +314,9 @@ const closeCallback = () => {
|
||||
|
||||
const nodeEdit = () => {
|
||||
that.nodeEdit((e, positions, areaByMeter) => {
|
||||
console.log('positions', positions)
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
if(positions) {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<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-select v-model="areaUnit" style="flex: 0 0 100px;">
|
||||
<el-option label="平方米" value="m2"></el-option>
|
||||
<el-option label="平方千米" value="km2"></el-option>
|
||||
<el-option label="亩" value="mu"></el-option>
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
<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="col" style="flex: 0 0 60%">
|
||||
<div style="width: 100%">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<el-select v-model="wordsName" @change="changeWordsName">
|
||||
@ -17,7 +17,7 @@
|
||||
<el-option label="投影长度" :value="1"></el-option>
|
||||
<el-option label="地表长度" :value="2"></el-option>
|
||||
</el-select>
|
||||
<input v-model="length" class="input-text" readonly />
|
||||
<input v-model="length" class="input-text" readonly style="width: 140px;" />
|
||||
<el-select v-model="lengthUnit">
|
||||
<el-option label="米" value="m"></el-option>
|
||||
<el-option label="千米" value="km"></el-option>
|
||||
@ -75,8 +75,8 @@
|
||||
<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" />
|
||||
<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>
|
||||
@ -352,7 +352,7 @@ const open = async (id: any, type) => {
|
||||
linePositions.value = structuredClone(that.options.positions)
|
||||
that.lengthChangeCallBack = () => {
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
@ -448,7 +448,7 @@ const nodeEdit = () => {
|
||||
that.nodeEdit((positions, lenByMeter) => {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = lenByMeter / 1000
|
||||
length.value = lenByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = lenByMeter
|
||||
}
|
||||
@ -458,7 +458,7 @@ const translate = () => {
|
||||
that.openPositionEditing(() => {
|
||||
entityOptions.value.options.positions = structuredClone(that.options.positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
@ -526,7 +526,7 @@ watch(
|
||||
(val) => {
|
||||
if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) {
|
||||
if (lengthUnit.value == 'km') {
|
||||
length.value = entityOptions.value.lengthByMeter / 1000
|
||||
length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
|
||||
} else {
|
||||
length.value = entityOptions.value.lengthByMeter
|
||||
}
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col" style="position: relative;">
|
||||
<span class="label">名称</span>
|
||||
<textarea v-model="entityOptions.text"></textarea>
|
||||
<textarea style="margin-bottom: 10px;" maxlength="80" v-model="entityOptions.text"></textarea>
|
||||
<span style="position: absolute;bottom: -10px;right: 2px;font-size: 12px;color: #c5c5c5;font-family: Arial;">{{ entityOptions.text.length || 0 }}/80</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">颜色</span>
|
||||
|
||||
@ -90,9 +90,10 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">模型方向</span>
|
||||
<button class="btn model-rotate-btn" style="margin-right: 12px;" @click="modelRotate">开始调整</button>
|
||||
<el-tooltip content="场景正东方向为轨迹前进正方向" effect="customized" placement="top"
|
||||
:hide-after="0">
|
||||
<button class="btn model-rotate-btn" style="margin-right: 12px;" @click="modelRotate">
|
||||
{{ modelRotateState ? '结束调整' : '开始调整' }}
|
||||
</button>
|
||||
<el-tooltip content="场景正东方向为轨迹前进正方向" effect="customized" placement="top" :hide-after="0">
|
||||
<svg class="icon-rubric">
|
||||
<use xlink:href="#yj-icon-rubric"></use>
|
||||
</svg>
|
||||
@ -160,15 +161,11 @@
|
||||
<div class="col" style="margin: 0px;">
|
||||
<span class="label">模型动画</span>
|
||||
<div class="input input-select model-animate-select"></div>
|
||||
<el-select class="model-animate-select" v-model="entityOptions.modelAnimate"
|
||||
v-if="entityOptions.model && entityOptions.model.loader && entityOptions.model.loader.components && entityOptions.model.loader.components.animations">
|
||||
<el-option label="无"></el-option>
|
||||
<el-option v-for="item in entityOptions.model.loader.components.animations" :label="item.name"
|
||||
<el-select class="model-animate-select" v-model="entityOptions.modelAnimate">
|
||||
<el-option label="无" value="无"></el-option>
|
||||
<el-option v-for="item in animationsList" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
<el-select class="model-animate-select" v-model="entityOptions.modelAnimate" v-else>
|
||||
<el-option label="无"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -257,6 +254,8 @@ const text = ref('')
|
||||
const activeName = ref('1')
|
||||
const fontList = ref(getFontList())
|
||||
const labelColorRef = ref(null)
|
||||
const animationsList:any = ref([])
|
||||
const modelRotateState = ref(false)
|
||||
eventBus.on('openStandTextAdd', () => {
|
||||
baseDialog.value?.open()
|
||||
})
|
||||
@ -273,6 +272,22 @@ const open = async (id: any) => {
|
||||
that = window.earth.entityMap.get(id)
|
||||
originalOptions = structuredClone(that.options)
|
||||
entityOptions.value = that
|
||||
if (Number(window.Cesium.VERSION.split('.')[1]) >= 107) {
|
||||
if (entityOptions.value.model.ready) {
|
||||
getAnimationsList()
|
||||
}
|
||||
else {
|
||||
entityOptions.value.model.readyEvent.addEventListener(() => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
entityOptions.value.model.readyPromise.then((entity) => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
baseDialog.value?.open()
|
||||
await nextTick()
|
||||
let labelColorPicker = new (window as any).YJColorPicker({
|
||||
@ -341,17 +356,58 @@ const remove = () => {
|
||||
})
|
||||
}
|
||||
const clickChangeModel = () => {
|
||||
eventBus.emit('openModel', true, (url) => {
|
||||
that.changeModelUrl(url)
|
||||
eventBus.emit('openModel', true, async (url) => {
|
||||
await that.changeModelUrl(url)
|
||||
if (Number(window.Cesium.VERSION.split('.')[1]) >= 107) {
|
||||
if (entityOptions.value.model.ready) {
|
||||
getAnimationsList()
|
||||
}
|
||||
else {
|
||||
entityOptions.value.model.readyEvent.addEventListener(() => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
entityOptions.value.model.readyPromise.then((entity) => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
if (Number(window.Cesium.VERSION.split('.')[1]) >= 107) {
|
||||
that.model.readyEvent.addEventListener(() => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
else {
|
||||
that.model.readyPromise.then((entity) => {
|
||||
getAnimationsList()
|
||||
})
|
||||
}
|
||||
}, 'trajectoryMotion')
|
||||
}
|
||||
|
||||
const getAnimationsList = () => {
|
||||
entityOptions.value.modelAnimate = entityOptions.value.modelAnimate
|
||||
animationsList.value = entityOptions.value.model.loader.components.animations
|
||||
}
|
||||
const modelRotate = () => {
|
||||
that.modelRotate()
|
||||
entityOptions.value.viewFollow = false
|
||||
entityOptions.value.state = false
|
||||
modelRotateState.value = that.modelRotate()
|
||||
}
|
||||
const movementRotate = () => {
|
||||
that.reverse = !that.reverse
|
||||
}
|
||||
const changeFirstPersonView = (state) => {
|
||||
if (state && YJ.Global.multiViewportMode.get2DView()) {
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '请先关闭二三维模式!',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
entityOptions.value.firstPersonView = state
|
||||
}
|
||||
|
||||
|
||||
@ -152,25 +152,25 @@ const material = ref([
|
||||
name: '纯色墙',
|
||||
value: '纯色墙',
|
||||
key: 0,
|
||||
icon: '../sdk/custom/img/icon-wall.png'
|
||||
icon: './sdk/custom/img/icon-wall.png'
|
||||
},
|
||||
{
|
||||
name: '红砖墙',
|
||||
value: '红砖墙',
|
||||
key: 1,
|
||||
icon: '../sdk/img/material/brick1.png'
|
||||
icon: './sdk/img/material/brick1.jpg'
|
||||
},
|
||||
{
|
||||
name: '黄砖墙',
|
||||
value: '黄砖墙',
|
||||
key: 2,
|
||||
icon: '../sdk/img/material/brick2.png'
|
||||
icon: './sdk/img/material/brick2.jpg'
|
||||
},
|
||||
{
|
||||
name: '灰瓷墙',
|
||||
value: '灰瓷墙',
|
||||
key: 3,
|
||||
icon: '../sdk/img/material/brick3.png'
|
||||
icon: './sdk/img/material/brick3.jpg'
|
||||
}
|
||||
])
|
||||
eventBus.on("openStandTextAdd", () => {
|
||||
|
||||
@ -31,14 +31,14 @@
|
||||
<span class="label">材质样式</span>
|
||||
<el-select class="input input-select input-select-line-type" v-model="entityOptions.material">
|
||||
<template #label="{ label, value }">
|
||||
<i class="yj-custom-icon" :class="material[value].icon"
|
||||
<i class="yj-custom-icon"
|
||||
:style="`background: url(${material[value].icon}) 100% 100% no-repeat;background-size: 100% 100%;`">
|
||||
</i>
|
||||
{{ label }}
|
||||
</template>
|
||||
<el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<i class="yj-custom-icon" :class="item.icon"
|
||||
<i class="yj-custom-icon"
|
||||
:style="`background: url(${item.icon}) 100% 100% no-repeat;background-size: 100% 100%;`"
|
||||
></i>
|
||||
{{ item.name }}
|
||||
@ -105,25 +105,25 @@ const material = ref([
|
||||
name: '纯色墙',
|
||||
value: '纯色墙',
|
||||
key: 0,
|
||||
icon: '../sdk/custom/img/icon-wall.png',
|
||||
icon: './sdk/custom/img/icon-wall.png',
|
||||
},
|
||||
{
|
||||
name: '上升墙',
|
||||
value: '上升墙',
|
||||
key: 1,
|
||||
icon: '../sdk/custom/img/icon-wall-gradient.png'
|
||||
icon: './sdk/custom/img/icon-wall-gradient.png'
|
||||
},
|
||||
{
|
||||
name: '箭头墙',
|
||||
value: '箭头墙',
|
||||
key: 2,
|
||||
icon: '../sdk/img/material/arrow.png'
|
||||
icon: './sdk/img/material/arrow.png'
|
||||
},
|
||||
{
|
||||
name: '警戒墙',
|
||||
value: '警戒墙',
|
||||
key: 3,
|
||||
icon: '../sdk/img/material/warn.png'
|
||||
icon: './sdk/img/material/warn.png'
|
||||
}
|
||||
])
|
||||
eventBus.on("openStandTextAdd", () => {
|
||||
|
||||
@ -91,7 +91,10 @@ export const useRightOperate = () => {
|
||||
show: true,
|
||||
},
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
let res = await TreeApi.addOtherSource(params)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
params.isShow = true
|
||||
params.params = JSON.stringify(params.params)
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
@ -99,22 +102,40 @@ export const useRightOperate = () => {
|
||||
entityObject.flyTo();
|
||||
(window as any)._entityMap.set(id, entityObject)
|
||||
} else if (["geojson"].includes(sourceType)) {
|
||||
let baseURL = localStorage.getItem('ip')
|
||||
await addMapSource({
|
||||
type: 'geojson',
|
||||
let params: any = {
|
||||
id: id,
|
||||
sourceName: name,
|
||||
opt: {
|
||||
host: baseURL,
|
||||
sourceType: sourceType,
|
||||
parentId: parentId,
|
||||
params: {
|
||||
id: id,
|
||||
url: filePaths[i],
|
||||
show: true,
|
||||
color: 'rgb(239, 6, 6, 1)',
|
||||
name: name,
|
||||
width: 1,
|
||||
color: "rgb(239, 6, 6, 1)",
|
||||
show: true,
|
||||
}
|
||||
}, (entity:any) => {
|
||||
}
|
||||
let res = await TreeApi.addOtherSource(params)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
params.isShow = true
|
||||
let baseURL = localStorage.getItem('ip')
|
||||
params.params.host = baseURL
|
||||
params.params = JSON.stringify(params.params)
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
let options: any = await initMapData(sourceType, JSON.parse(params.params), (entity:any) => {
|
||||
entity?.flyTo()
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
// 获取最后一个点的位置
|
||||
const lastDotIndex = filePaths[i].lastIndexOf('.');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import {MaterialApi} from '@/api/material'
|
||||
|
||||
let index = 0;
|
||||
let option = {
|
||||
width: 1300,
|
||||
@ -22,7 +24,7 @@ let option = {
|
||||
},
|
||||
}
|
||||
|
||||
function leftClick(options) {
|
||||
async function leftClick(options) {
|
||||
const {ipcRenderer} = require('electron')
|
||||
console.log('leftClick', options)
|
||||
let id = options.id;
|
||||
@ -69,6 +71,7 @@ function leftClick(options) {
|
||||
source_path: node.sourcePath,
|
||||
env: localStorage.getItem("service"),
|
||||
};
|
||||
info.goods = await goodsSelect(info.goods)
|
||||
// // 0828
|
||||
// info.ISC &&
|
||||
// info.ISC.forEach((item) => {
|
||||
@ -277,4 +280,30 @@ async function tankuang(id, node, info) {
|
||||
}
|
||||
}
|
||||
|
||||
const goodsSelect = async (goods) => {
|
||||
let formData = new FormData()
|
||||
formData.append('pageNum', '1')
|
||||
formData.append('pageSize', '999999')
|
||||
const res = await MaterialApi.getList(formData)
|
||||
let allGoodsList:any = []
|
||||
if (res.code === 200) {
|
||||
allGoodsList = res.data.records || []
|
||||
}
|
||||
for (let i = goods.length - 1; i >= 0; i--) {
|
||||
let flag = false
|
||||
for (let m = 0; m < allGoodsList.length; m++) {
|
||||
if ('id' in allGoodsList[m]) {
|
||||
if (allGoodsList[m].id === goods[i].id) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
goods.splice(i, 1)
|
||||
}
|
||||
}
|
||||
return goods
|
||||
}
|
||||
|
||||
export {leftClick, rightClick};
|
||||
|
||||
@ -81,6 +81,9 @@ export const useTree = () => {
|
||||
const onDblClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
let entityObject
|
||||
|
||||
if(!treeNode) {
|
||||
return
|
||||
}
|
||||
if (treeNode.sourceType == 'Feature') {
|
||||
const getEntityObject = (n) => {
|
||||
if (n) {
|
||||
@ -312,6 +315,11 @@ export const useTree = () => {
|
||||
|
||||
let ids = [...p_ids]
|
||||
|
||||
if (parentNode && parentNode.sourceType === 'tileset') {
|
||||
sourceStatus(parentNode)
|
||||
}
|
||||
|
||||
|
||||
// 更新节点状态修改地图资源状态
|
||||
function sourceStatus(node) {
|
||||
ids.push({id: node.id, isShow: node.isShow ? 1 : 0})
|
||||
|
||||
@ -38,8 +38,8 @@
|
||||
y2="-6.678619384765625"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2"/>
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linear_border_2442_491_0"
|
||||
@ -49,8 +49,8 @@
|
||||
y2="29.435516357421875"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))"/>
|
||||
<stop offset="1" stop-color="var(--color-border1)"/>
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
id="filter_2442_492"
|
||||
@ -61,21 +61,21 @@
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"
|
||||
>
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_492"/>
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_492" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha_2442_492"
|
||||
/>
|
||||
<feOffset dx="0" dy="0"/>
|
||||
<feGaussianBlur stdDeviation="2"/>
|
||||
<feComposite in2="hardAlpha_2442_492" operator="out"/>
|
||||
<feOffset dx="0" dy="0" />
|
||||
<feGaussianBlur stdDeviation="2" />
|
||||
<feComposite in2="hardAlpha_2442_492" operator="out" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0.1450980392156863 0 0 0 0 0.7686274509803922 0 0 0 0 0.7686274509803922 0 0 0 1 0"
|
||||
/>
|
||||
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492"/>
|
||||
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
@ -132,8 +132,8 @@
|
||||
y2="-131.6942138671875"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2"/>
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
|
||||
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
|
||||
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linear_border_2409_300_0"
|
||||
@ -143,8 +143,8 @@
|
||||
y2="580.431640625"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))"/>
|
||||
<stop offset="1" stop-color="var(--color-border1)"/>
|
||||
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -196,7 +196,7 @@
|
||||
size="small"
|
||||
@click="searchPlace"
|
||||
:loading="loading"
|
||||
>{{ t('btn.search') }}
|
||||
>{{ t('btn.search') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div id="selectorBox">
|
||||
@ -247,22 +247,22 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
import {debounce} from '@/utils'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {useTree} from './hooks/tree'
|
||||
import { debounce } from '@/utils'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useTree } from './hooks/tree'
|
||||
import AMapLoader from '@amap/amap-jsapi-loader'
|
||||
import rightMenu from './components/rightMenu.vue'
|
||||
import {$changeComponentShow} from '@/utils/communication'
|
||||
import {ref, nextTick} from 'vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {bus} from '@/utils/bus'
|
||||
import {TreeApi} from '@/api/tree'
|
||||
import {PoiApi} from '@/api/poi'
|
||||
import {get} from 'jquery'
|
||||
import { $changeComponentShow } from '@/utils/communication'
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { bus } from '@/utils/bus'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { PoiApi } from '@/api/poi'
|
||||
import { get } from 'jquery'
|
||||
|
||||
const {initTree, rightMenuRef, initTreeCallBack} = useTree()
|
||||
const { initTree, rightMenuRef, initTreeCallBack } = useTree()
|
||||
|
||||
const {t} = useI18n()
|
||||
const { t } = useI18n()
|
||||
const isShow = ref(false)
|
||||
const select = ref('poi')
|
||||
const searchKey: any = ref('')
|
||||
@ -372,8 +372,7 @@ var key =
|
||||
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
|
||||
'd88fcc689d1aa99866b2d0d83fd36677'
|
||||
var isOnline = false
|
||||
var loadAmp = (cb = () => {
|
||||
}) => {
|
||||
var loadAmp = (cb = () => {}) => {
|
||||
AMapLoader.reset()
|
||||
AMapLoader.load({
|
||||
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
@ -474,7 +473,7 @@ const searchPlace = debounce(function () {
|
||||
let string = searchKey.value.trim()
|
||||
if (string) {
|
||||
// TreeApi.queryPOI({ name: string, pageNum: 1, pageSize: 1000 }).then((res) => {
|
||||
PoiApi.searchPoi({name: string, pageNum: 1, pageSize: 1000}).then((res) => {
|
||||
PoiApi.searchPoi({ name: string, pageNum: 1, pageSize: 1000 }).then((res) => {
|
||||
console.log(res, 'resres')
|
||||
poiOptions.value = res.data
|
||||
if (poiOptions.value.length) {
|
||||
@ -527,7 +526,7 @@ const locationChange = () => {
|
||||
// let sg84 = YJ.Global.CoordTransform.GCJ02ToWGS84(item.lng, item.lat);
|
||||
let params = {
|
||||
id,
|
||||
position: {lng: item.lng, lat: item.lat, alt: item.alt ? item.alt : 0},
|
||||
position: { lng: item.lng, lat: item.lat, alt: item.alt ? item.alt : 0 },
|
||||
billboard: {
|
||||
show: true,
|
||||
image: 'http://localhost:' + availablePort.value + '/' + 'GEMarker1/A-ablu-blank.png',
|
||||
@ -659,10 +658,10 @@ defineExpose({
|
||||
text-shadow: 0px 0px 9px var(--color-text-shadow);
|
||||
font-weight: 700;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(var(--color-base1), 0) 0%,
|
||||
rgba(var(--color-base1), 0.5) 55.55%,
|
||||
rgba(var(--color-base1), 0) 100%
|
||||
90deg,
|
||||
rgba(var(--color-base1), 0) 0%,
|
||||
rgba(var(--color-base1), 0.5) 55.55%,
|
||||
rgba(var(--color-base1), 0) 100%
|
||||
);
|
||||
|
||||
> svg {
|
||||
@ -841,4 +840,9 @@ defineExpose({
|
||||
.el-select-dropdown__loading {
|
||||
margin-top: -150px !important;
|
||||
}
|
||||
::v-deep .el-select-dropdown {
|
||||
background: linear-gradient(180deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0) 100%),
|
||||
rgba(0, 0, 0, 0.6) !important;
|
||||
border: 1px solid rgba(0, 255, 255, 0.5) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -136,6 +136,7 @@ import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style'
|
||||
import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style'
|
||||
|
||||
import { setEventBus } from './eventBus'
|
||||
import router from '@renderer/router'
|
||||
|
||||
const { rightMenus } = useRightOperate()
|
||||
const firstMenuRef = ref(null)
|
||||
@ -150,7 +151,6 @@ let editdirectoryBox = ref()
|
||||
|
||||
setEventBus(eventBus)
|
||||
|
||||
|
||||
// 标注标绘默认样式
|
||||
if (!localStorage.getItem('defaultStyle')) {
|
||||
let defaultStyle = getdefaultStyle(null)
|
||||
@ -160,6 +160,8 @@ if (!localStorage.getItem('defaultLabelStyle')) {
|
||||
let defaultLabelStyle = getdefaultLabelStyle(null)
|
||||
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
|
||||
}
|
||||
//移除天气设置
|
||||
localStorage.removeItem('weartherSetting')
|
||||
|
||||
eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
|
||||
@ -474,7 +476,7 @@ eventBus.on('destroyComponent', (id) => {
|
||||
}
|
||||
})
|
||||
|
||||
utilsSysChange(eventBus)
|
||||
utilsSysChange(eventBus, true)
|
||||
|
||||
const createEarth = async () => {
|
||||
window.earth = await new YJ.YJEarth('earthContainer')
|
||||
@ -552,7 +554,10 @@ const uploadFile = (event) => {
|
||||
}
|
||||
const getAuthInfo = async () => {
|
||||
const res = await AuthApi.showAuth()
|
||||
if (typeof res.data === 'object') {
|
||||
if (res.message == '未找到授权文件') {
|
||||
router.push('/')
|
||||
localStorage.removeItem('Authorization')
|
||||
} else if (typeof res.data === 'object') {
|
||||
let time = res.data.expireTime
|
||||
getStatus(time)
|
||||
}
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="login-container"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0"
|
||||
>
|
||||
<transition
|
||||
name="video-fade"
|
||||
mode="out-in"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
|
||||
>
|
||||
<div class="login-container" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0">
|
||||
<transition name="video-fade" mode="out-in"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover">
|
||||
<!-- 第一个视频,播放一次 -->
|
||||
<!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded"
|
||||
src="../../assets/video/login_front.mp4"
|
||||
@ -15,43 +9,88 @@
|
||||
<!-- 第二个视频,循环播放 -->
|
||||
<!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> -->
|
||||
<video
|
||||
key="second-video"
|
||||
autoplay
|
||||
loop
|
||||
muted
|
||||
src="../../assets/video/author_video.mp4"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
|
||||
></video>
|
||||
<video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video>
|
||||
</transition>
|
||||
<!-- 登录页面 -->
|
||||
<div class="rightBox" v-if="isDesktop">
|
||||
<el-button class="settings" size="small" @click="serviceDialog = true">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="40.67999267578125" viewBox="0 0 42 40.67999267578125" fill="none"><g><path d="M32.748 18C32.6078 17.2589 32.1562 16.776 31.596 16.776L31.584 16.776L31.476 16.776C29.8563 16.776 28.536 15.4559 28.536 13.836C28.536 13.3103 28.788 12.72 28.788 12.72C29.0783 12.0666 28.8579 11.2688 28.272 10.86L28.236 10.836L25.26 9.18L25.224 9.168C25.0301 9.0837 24.8127 9.036 24.588 9.036C24.1275 9.036 23.6739 9.21871 23.376 9.528C23.0494 9.86507 21.9261 10.824 21.06 10.824C20.1861 10.824 19.0599 9.84731 18.732 9.504C18.4325 9.18839 17.9732 9 17.508 9C17.2877 9 17.0746 9.0387 16.884 9.12L16.848 9.144L13.764 10.836L13.728 10.86C13.1402 11.2684 12.922 12.0669 13.212 12.72C13.212 12.72 13.464 13.3063 13.464 13.836C13.464 15.4559 12.1438 16.776 10.524 16.776L10.428 16.776L10.404 16.776C9.84445 16.776 9.39221 17.2588 9.252 18C9.252 18.0544 9 19.3442 9 20.352C9 21.3598 9.252 22.6495 9.252 22.704C9.39231 23.4452 9.84407 23.916 10.404 23.916L10.416 23.916L10.524 23.916C12.1438 23.916 13.464 25.2361 13.464 26.856C13.464 27.3823 13.212 27.972 13.212 27.972C12.922 28.6249 13.1424 29.4341 13.728 29.844L13.764 29.868L16.68 31.5L16.716 31.512C16.9098 31.5973 17.1284 31.644 17.352 31.644C17.819 31.644 18.2669 31.4511 18.564 31.128C18.9788 30.6773 20.1089 29.748 20.94 29.748C21.8399 29.748 22.995 30.787 23.328 31.152C23.6258 31.4807 24.0803 31.68 24.552 31.68C24.7712 31.68 24.9852 31.6424 25.176 31.56L25.212 31.536L28.236 29.868L28.272 29.844C28.8589 29.4351 29.0894 28.6356 28.8 27.984C28.8 27.984 28.536 27.3787 28.536 26.856C28.536 25.2361 29.8563 23.916 31.476 23.916L31.572 23.916L31.596 23.916C32.1571 23.916 32.608 23.4446 32.748 22.704C32.748 22.6909 33 21.385 33 20.352C33 19.3396 32.748 18.0542 32.748 18ZM17.364 29.952L14.808 28.524C14.9206 28.2349 15.144 27.5538 15.144 26.856C15.144 24.433 13.2855 22.4323 10.884 22.248C10.8254 21.9063 10.692 21.0321 10.692 20.352C10.692 19.6729 10.8254 18.798 10.884 18.456C13.2856 18.2719 15.144 16.2592 15.144 13.836C15.144 13.1401 14.9204 12.4692 14.808 12.18L17.532 10.692C17.63 10.7921 18.0227 11.1823 18.564 11.568C19.4485 12.1985 20.2834 12.516 21.06 12.516C21.829 12.516 22.6651 12.1983 23.544 11.58C24.0819 11.2016 24.4783 10.8264 24.576 10.728L27.192 12.18C27.0795 12.4692 26.856 13.1391 26.856 13.836C26.856 16.2592 28.7144 18.2719 31.116 18.456C31.1746 18.7985 31.308 19.6749 31.308 20.352C31.308 21.0318 31.1746 21.9062 31.116 22.248C28.7145 22.4321 26.856 24.4328 26.856 26.856C26.856 27.5527 27.0796 28.2229 27.192 28.512L24.54 29.988C24.4255 29.8664 24.0426 29.4611 23.508 29.064C22.6064 28.3945 21.7405 28.056 20.94 28.056C20.1472 28.056 19.2924 28.3951 18.396 29.052C17.8691 29.4383 17.4787 29.8324 17.364 29.952ZM25.2 20.328C25.2 17.9842 23.2957 16.08 20.952 16.08C18.6083 16.08 16.692 17.9842 16.692 20.328C16.692 22.6717 18.6083 24.588 20.952 24.588C23.2958 24.588 25.2 22.6717 25.2 20.328ZM20.952 17.772C22.3658 17.772 23.508 18.9142 23.508 20.328C23.508 21.7418 22.3658 22.896 20.952 22.896C19.5383 22.896 18.384 21.7418 18.384 20.328C18.384 18.9142 19.5383 17.772 20.952 17.772Z" fill="#FFFFFF"/></g><defs><filter id="filter_2442_1327" x="0" y="0" width="42" height="40.67999267578125" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="feFloodId_2442_1327"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha_2442_1327"/><feOffset dx="0" dy="0"/><feGaussianBlur stdDeviation="4.5"/><feComposite in2="hardAlpha_2442_1327" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0"/><feBlend mode="normal" in2="feFloodId_2442_1327" result="dropShadow_1_2442_1327"/><feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_1327" result="shape_2442_1327"/></filter></defs></svg>
|
||||
</el-button>
|
||||
<el-button class="exit" size="small" @click="goExit">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40" height="40"
|
||||
viewBox="-8 -8 40 40" fill="none">
|
||||
<g xmlns="http://www.w3.org/2000/svg">
|
||||
<path xmlns="http://www.w3.org/2000/svg"
|
||||
d="M15.8747 5.23095L16.8448 3.27277C16.9578 3.32908 17.0698 3.38736 17.1809 3.44758C17.2919 3.5078 17.4018 3.56992 17.5107 3.63395C17.6195 3.69799 17.7273 3.76389 17.8338 3.83167C17.9404 3.89944 18.0458 3.96904 18.15 4.04046C18.2541 4.1119 18.357 4.18512 18.4587 4.26012C18.5603 4.33512 18.6606 4.41186 18.7596 4.49034C18.8586 4.56881 18.9561 4.64899 19.0523 4.73086C19.1485 4.81273 19.2433 4.89624 19.3366 4.9814C19.4299 5.06657 19.5217 5.15332 19.612 5.24167C19.7023 5.33 19.791 5.41988 19.8782 5.51131C19.9654 5.60273 20.051 5.69563 20.1349 5.79003C20.2189 5.88443 20.3012 5.98026 20.3818 6.0775C20.4625 6.17474 20.5414 6.27335 20.6186 6.37335C20.6958 6.47335 20.7713 6.57465 20.8451 6.67726C20.9188 6.77986 20.9907 6.88372 21.0608 6.98884C21.1309 7.09395 21.1992 7.20024 21.2656 7.3077C21.3321 7.41516 21.3966 7.52375 21.4593 7.63347C21.522 7.74318 21.5827 7.85397 21.6415 7.96578C21.7004 8.07759 21.7573 8.1904 21.8122 8.3042C21.8671 8.41801 21.9201 8.53274 21.971 8.64836C22.0219 8.764 22.0709 8.88049 22.1178 8.99783C22.1647 9.11516 22.2096 9.23326 22.2524 9.35215C22.2952 9.47105 22.336 9.59066 22.3747 9.71096C22.4133 9.83126 22.4499 9.9522 22.4844 10.0738C22.5189 10.1954 22.5513 10.3175 22.5815 10.4402C22.6118 10.5629 22.6399 10.6861 22.6659 10.8097C22.6919 10.9334 22.7157 11.0575 22.7374 11.182C22.7591 11.3065 22.7786 11.4313 22.796 11.5565C22.8134 11.6817 22.8285 11.8071 22.8416 11.9329C22.8546 12.0586 22.8654 12.1845 22.8741 12.3105C22.8827 12.4366 22.8892 12.5628 22.8935 12.6891C22.8977 12.8154 22.8998 12.9418 22.8998 13.0681C22.8998 19.1053 18.0198 24.0002 11.9997 24.0002C5.97958 24.0002 1.09961 19.1053 1.09961 13.0681C1.09961 8.87354 3.47583 5.10551 7.15461 3.27277L8.12471 5.23095C8.03425 5.27602 7.9446 5.32264 7.8558 5.37081C7.76695 5.41898 7.67899 5.46868 7.59188 5.5199C7.50476 5.57114 7.41857 5.62386 7.33329 5.67807C7.24799 5.73229 7.16366 5.78797 7.08032 5.84511C6.99696 5.90225 6.91462 5.96083 6.83331 6.02084C6.75197 6.08085 6.67172 6.14224 6.59253 6.20503C6.51333 6.26781 6.43523 6.33196 6.35826 6.39746C6.28129 6.46294 6.20546 6.52975 6.13082 6.59789C6.05617 6.66603 5.98269 6.73543 5.91045 6.80612C5.8382 6.87679 5.76718 6.94869 5.69744 7.02184C5.62767 7.095 5.5592 7.16935 5.49201 7.24485C5.42482 7.32038 5.35896 7.39704 5.29443 7.47484C5.2299 7.55265 5.16672 7.63155 5.10495 7.71155C5.04313 7.79156 4.98273 7.87261 4.92377 7.95471C4.86478 8.03681 4.80722 8.11991 4.75112 8.204C4.69502 8.2881 4.64038 8.37314 4.58724 8.45912C4.53405 8.54511 4.48239 8.63199 4.43227 8.71977C4.3821 8.80755 4.33348 8.89619 4.28642 8.98566C4.23934 9.07512 4.19381 9.16538 4.14987 9.25643C4.10591 9.34748 4.06355 9.43927 4.0228 9.5318C3.98203 9.62433 3.94287 9.71753 3.90534 9.81139C3.86778 9.90528 3.83186 9.99978 3.79761 10.0949C3.76332 10.19 3.73072 10.2857 3.69979 10.382C3.66882 10.4782 3.63956 10.575 3.61197 10.6723C3.58436 10.7695 3.55846 10.8673 3.53426 10.9654C3.51004 11.0636 3.48753 11.1622 3.46674 11.2611C3.44594 11.3601 3.42687 11.4594 3.40951 11.559C3.39216 11.6586 3.37653 11.7585 3.36263 11.8587C3.34875 11.9588 3.3366 12.0592 3.32618 12.1598C3.31577 12.2603 3.3071 12.3611 3.30017 12.4619C3.29324 12.5628 3.28806 12.6638 3.28464 12.7649C3.28122 12.866 3.27955 12.967 3.27963 13.0681C3.27963 17.8987 7.18404 21.814 11.9997 21.814C16.8153 21.814 20.7197 17.8976 20.7197 13.0681C20.7198 12.967 20.7181 12.866 20.7147 12.7649C20.7113 12.6638 20.7061 12.5628 20.6992 12.4619C20.6922 12.3611 20.6836 12.2603 20.6732 12.1598C20.6628 12.0592 20.6506 11.9588 20.6367 11.8587C20.6228 11.7585 20.6072 11.6586 20.5898 11.559C20.5725 11.4594 20.5534 11.3601 20.5326 11.2611C20.5118 11.1622 20.4893 11.0636 20.4651 10.9654C20.4409 10.8673 20.415 10.7696 20.3874 10.6723C20.3598 10.575 20.3305 10.4782 20.2996 10.382C20.2686 10.2857 20.236 10.19 20.2018 10.0949C20.1675 9.99978 20.1316 9.90528 20.0941 9.81139C20.0565 9.71753 20.0173 9.62433 19.9766 9.5318C19.9358 9.43927 19.8934 9.34748 19.8495 9.25643C19.8056 9.16538 19.76 9.07512 19.7129 8.98566C19.6659 8.89619 19.6172 8.80755 19.5671 8.71977C19.5169 8.63199 19.4653 8.54511 19.4122 8.45912C19.359 8.37314 19.3043 8.2881 19.2482 8.204C19.1921 8.11991 19.1346 8.03681 19.0756 7.95471C19.0166 7.87261 18.9562 7.79156 18.8944 7.71155C18.8326 7.63155 18.7695 7.55265 18.7049 7.47484C18.6404 7.39704 18.5745 7.32038 18.5074 7.24485C18.4402 7.16935 18.3717 7.095 18.302 7.02184C18.2322 6.94869 18.1612 6.87679 18.0889 6.80612C18.0167 6.73543 17.9432 6.66603 17.8686 6.59789C17.7939 6.52975 17.7181 6.46294 17.6411 6.39746C17.5641 6.33196 17.486 6.26781 17.4068 6.20503C17.3276 6.14224 17.2474 6.08085 17.1661 6.02084C17.0847 5.96083 17.0024 5.90225 16.919 5.84511C16.8357 5.78797 16.7514 5.73229 16.6661 5.67807C16.5808 5.62386 16.4946 5.57114 16.4075 5.5199C16.3204 5.46868 16.2324 5.41898 16.1436 5.37081C16.0547 5.32264 15.9651 5.27602 15.8747 5.23095Z"
|
||||
fill="#FFFFFF" />
|
||||
<path xmlns="http://www.w3.org/2000/svg" d="M10.9102 0L13.0902 0L13.0902 8.72736L10.9102 8.72736L10.9102 0Z"
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42"
|
||||
height="40.67999267578125" viewBox="0 0 42 40.67999267578125" fill="none">
|
||||
<g>
|
||||
<path
|
||||
d="M32.748 18C32.6078 17.2589 32.1562 16.776 31.596 16.776L31.584 16.776L31.476 16.776C29.8563 16.776 28.536 15.4559 28.536 13.836C28.536 13.3103 28.788 12.72 28.788 12.72C29.0783 12.0666 28.8579 11.2688 28.272 10.86L28.236 10.836L25.26 9.18L25.224 9.168C25.0301 9.0837 24.8127 9.036 24.588 9.036C24.1275 9.036 23.6739 9.21871 23.376 9.528C23.0494 9.86507 21.9261 10.824 21.06 10.824C20.1861 10.824 19.0599 9.84731 18.732 9.504C18.4325 9.18839 17.9732 9 17.508 9C17.2877 9 17.0746 9.0387 16.884 9.12L16.848 9.144L13.764 10.836L13.728 10.86C13.1402 11.2684 12.922 12.0669 13.212 12.72C13.212 12.72 13.464 13.3063 13.464 13.836C13.464 15.4559 12.1438 16.776 10.524 16.776L10.428 16.776L10.404 16.776C9.84445 16.776 9.39221 17.2588 9.252 18C9.252 18.0544 9 19.3442 9 20.352C9 21.3598 9.252 22.6495 9.252 22.704C9.39231 23.4452 9.84407 23.916 10.404 23.916L10.416 23.916L10.524 23.916C12.1438 23.916 13.464 25.2361 13.464 26.856C13.464 27.3823 13.212 27.972 13.212 27.972C12.922 28.6249 13.1424 29.4341 13.728 29.844L13.764 29.868L16.68 31.5L16.716 31.512C16.9098 31.5973 17.1284 31.644 17.352 31.644C17.819 31.644 18.2669 31.4511 18.564 31.128C18.9788 30.6773 20.1089 29.748 20.94 29.748C21.8399 29.748 22.995 30.787 23.328 31.152C23.6258 31.4807 24.0803 31.68 24.552 31.68C24.7712 31.68 24.9852 31.6424 25.176 31.56L25.212 31.536L28.236 29.868L28.272 29.844C28.8589 29.4351 29.0894 28.6356 28.8 27.984C28.8 27.984 28.536 27.3787 28.536 26.856C28.536 25.2361 29.8563 23.916 31.476 23.916L31.572 23.916L31.596 23.916C32.1571 23.916 32.608 23.4446 32.748 22.704C32.748 22.6909 33 21.385 33 20.352C33 19.3396 32.748 18.0542 32.748 18ZM17.364 29.952L14.808 28.524C14.9206 28.2349 15.144 27.5538 15.144 26.856C15.144 24.433 13.2855 22.4323 10.884 22.248C10.8254 21.9063 10.692 21.0321 10.692 20.352C10.692 19.6729 10.8254 18.798 10.884 18.456C13.2856 18.2719 15.144 16.2592 15.144 13.836C15.144 13.1401 14.9204 12.4692 14.808 12.18L17.532 10.692C17.63 10.7921 18.0227 11.1823 18.564 11.568C19.4485 12.1985 20.2834 12.516 21.06 12.516C21.829 12.516 22.6651 12.1983 23.544 11.58C24.0819 11.2016 24.4783 10.8264 24.576 10.728L27.192 12.18C27.0795 12.4692 26.856 13.1391 26.856 13.836C26.856 16.2592 28.7144 18.2719 31.116 18.456C31.1746 18.7985 31.308 19.6749 31.308 20.352C31.308 21.0318 31.1746 21.9062 31.116 22.248C28.7145 22.4321 26.856 24.4328 26.856 26.856C26.856 27.5527 27.0796 28.2229 27.192 28.512L24.54 29.988C24.4255 29.8664 24.0426 29.4611 23.508 29.064C22.6064 28.3945 21.7405 28.056 20.94 28.056C20.1472 28.056 19.2924 28.3951 18.396 29.052C17.8691 29.4383 17.4787 29.8324 17.364 29.952ZM25.2 20.328C25.2 17.9842 23.2957 16.08 20.952 16.08C18.6083 16.08 16.692 17.9842 16.692 20.328C16.692 22.6717 18.6083 24.588 20.952 24.588C23.2958 24.588 25.2 22.6717 25.2 20.328ZM20.952 17.772C22.3658 17.772 23.508 18.9142 23.508 20.328C23.508 21.7418 22.3658 22.896 20.952 22.896C19.5383 22.896 18.384 21.7418 18.384 20.328C18.384 18.9142 19.5383 17.772 20.952 17.772Z"
|
||||
fill="#FFFFFF" />
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter_2442_480" x="-10" y="-10" width="52.000244" height="53.800659"
|
||||
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_480" />
|
||||
<filter id="filter_2442_1327" x="0" y="0" width="42" height="40.67999267578125" filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_1327" />
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha_2442_480" />
|
||||
result="hardAlpha_2442_1327" />
|
||||
<feOffset dx="0" dy="0" />
|
||||
<feGaussianBlur stdDeviation="4.5" />
|
||||
<feComposite in2="hardAlpha_2442_1327" operator="out" />
|
||||
<feColorMatrix type="matrix"
|
||||
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0" />
|
||||
<feBlend mode="normal" in2="feFloodId_2442_1327" result="dropShadow_1_2442_1327" />
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_1327" result="shape_2442_1327" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
</el-button>
|
||||
<el-button class="exit" size="small" @click="goExit">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="-8 -8 40 40"
|
||||
fill="none"
|
||||
>
|
||||
<g xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
d="M15.8747 5.23095L16.8448 3.27277C16.9578 3.32908 17.0698 3.38736 17.1809 3.44758C17.2919 3.5078 17.4018 3.56992 17.5107 3.63395C17.6195 3.69799 17.7273 3.76389 17.8338 3.83167C17.9404 3.89944 18.0458 3.96904 18.15 4.04046C18.2541 4.1119 18.357 4.18512 18.4587 4.26012C18.5603 4.33512 18.6606 4.41186 18.7596 4.49034C18.8586 4.56881 18.9561 4.64899 19.0523 4.73086C19.1485 4.81273 19.2433 4.89624 19.3366 4.9814C19.4299 5.06657 19.5217 5.15332 19.612 5.24167C19.7023 5.33 19.791 5.41988 19.8782 5.51131C19.9654 5.60273 20.051 5.69563 20.1349 5.79003C20.2189 5.88443 20.3012 5.98026 20.3818 6.0775C20.4625 6.17474 20.5414 6.27335 20.6186 6.37335C20.6958 6.47335 20.7713 6.57465 20.8451 6.67726C20.9188 6.77986 20.9907 6.88372 21.0608 6.98884C21.1309 7.09395 21.1992 7.20024 21.2656 7.3077C21.3321 7.41516 21.3966 7.52375 21.4593 7.63347C21.522 7.74318 21.5827 7.85397 21.6415 7.96578C21.7004 8.07759 21.7573 8.1904 21.8122 8.3042C21.8671 8.41801 21.9201 8.53274 21.971 8.64836C22.0219 8.764 22.0709 8.88049 22.1178 8.99783C22.1647 9.11516 22.2096 9.23326 22.2524 9.35215C22.2952 9.47105 22.336 9.59066 22.3747 9.71096C22.4133 9.83126 22.4499 9.9522 22.4844 10.0738C22.5189 10.1954 22.5513 10.3175 22.5815 10.4402C22.6118 10.5629 22.6399 10.6861 22.6659 10.8097C22.6919 10.9334 22.7157 11.0575 22.7374 11.182C22.7591 11.3065 22.7786 11.4313 22.796 11.5565C22.8134 11.6817 22.8285 11.8071 22.8416 11.9329C22.8546 12.0586 22.8654 12.1845 22.8741 12.3105C22.8827 12.4366 22.8892 12.5628 22.8935 12.6891C22.8977 12.8154 22.8998 12.9418 22.8998 13.0681C22.8998 19.1053 18.0198 24.0002 11.9997 24.0002C5.97958 24.0002 1.09961 19.1053 1.09961 13.0681C1.09961 8.87354 3.47583 5.10551 7.15461 3.27277L8.12471 5.23095C8.03425 5.27602 7.9446 5.32264 7.8558 5.37081C7.76695 5.41898 7.67899 5.46868 7.59188 5.5199C7.50476 5.57114 7.41857 5.62386 7.33329 5.67807C7.24799 5.73229 7.16366 5.78797 7.08032 5.84511C6.99696 5.90225 6.91462 5.96083 6.83331 6.02084C6.75197 6.08085 6.67172 6.14224 6.59253 6.20503C6.51333 6.26781 6.43523 6.33196 6.35826 6.39746C6.28129 6.46294 6.20546 6.52975 6.13082 6.59789C6.05617 6.66603 5.98269 6.73543 5.91045 6.80612C5.8382 6.87679 5.76718 6.94869 5.69744 7.02184C5.62767 7.095 5.5592 7.16935 5.49201 7.24485C5.42482 7.32038 5.35896 7.39704 5.29443 7.47484C5.2299 7.55265 5.16672 7.63155 5.10495 7.71155C5.04313 7.79156 4.98273 7.87261 4.92377 7.95471C4.86478 8.03681 4.80722 8.11991 4.75112 8.204C4.69502 8.2881 4.64038 8.37314 4.58724 8.45912C4.53405 8.54511 4.48239 8.63199 4.43227 8.71977C4.3821 8.80755 4.33348 8.89619 4.28642 8.98566C4.23934 9.07512 4.19381 9.16538 4.14987 9.25643C4.10591 9.34748 4.06355 9.43927 4.0228 9.5318C3.98203 9.62433 3.94287 9.71753 3.90534 9.81139C3.86778 9.90528 3.83186 9.99978 3.79761 10.0949C3.76332 10.19 3.73072 10.2857 3.69979 10.382C3.66882 10.4782 3.63956 10.575 3.61197 10.6723C3.58436 10.7695 3.55846 10.8673 3.53426 10.9654C3.51004 11.0636 3.48753 11.1622 3.46674 11.2611C3.44594 11.3601 3.42687 11.4594 3.40951 11.559C3.39216 11.6586 3.37653 11.7585 3.36263 11.8587C3.34875 11.9588 3.3366 12.0592 3.32618 12.1598C3.31577 12.2603 3.3071 12.3611 3.30017 12.4619C3.29324 12.5628 3.28806 12.6638 3.28464 12.7649C3.28122 12.866 3.27955 12.967 3.27963 13.0681C3.27963 17.8987 7.18404 21.814 11.9997 21.814C16.8153 21.814 20.7197 17.8976 20.7197 13.0681C20.7198 12.967 20.7181 12.866 20.7147 12.7649C20.7113 12.6638 20.7061 12.5628 20.6992 12.4619C20.6922 12.3611 20.6836 12.2603 20.6732 12.1598C20.6628 12.0592 20.6506 11.9588 20.6367 11.8587C20.6228 11.7585 20.6072 11.6586 20.5898 11.559C20.5725 11.4594 20.5534 11.3601 20.5326 11.2611C20.5118 11.1622 20.4893 11.0636 20.4651 10.9654C20.4409 10.8673 20.415 10.7696 20.3874 10.6723C20.3598 10.575 20.3305 10.4782 20.2996 10.382C20.2686 10.2857 20.236 10.19 20.2018 10.0949C20.1675 9.99978 20.1316 9.90528 20.0941 9.81139C20.0565 9.71753 20.0173 9.62433 19.9766 9.5318C19.9358 9.43927 19.8934 9.34748 19.8495 9.25643C19.8056 9.16538 19.76 9.07512 19.7129 8.98566C19.6659 8.89619 19.6172 8.80755 19.5671 8.71977C19.5169 8.63199 19.4653 8.54511 19.4122 8.45912C19.359 8.37314 19.3043 8.2881 19.2482 8.204C19.1921 8.11991 19.1346 8.03681 19.0756 7.95471C19.0166 7.87261 18.9562 7.79156 18.8944 7.71155C18.8326 7.63155 18.7695 7.55265 18.7049 7.47484C18.6404 7.39704 18.5745 7.32038 18.5074 7.24485C18.4402 7.16935 18.3717 7.095 18.302 7.02184C18.2322 6.94869 18.1612 6.87679 18.0889 6.80612C18.0167 6.73543 17.9432 6.66603 17.8686 6.59789C17.7939 6.52975 17.7181 6.46294 17.6411 6.39746C17.5641 6.33196 17.486 6.26781 17.4068 6.20503C17.3276 6.14224 17.2474 6.08085 17.1661 6.02084C17.0847 5.96083 17.0024 5.90225 16.919 5.84511C16.8357 5.78797 16.7514 5.73229 16.6661 5.67807C16.5808 5.62386 16.4946 5.57114 16.4075 5.5199C16.3204 5.46868 16.2324 5.41898 16.1436 5.37081C16.0547 5.32264 15.9651 5.27602 15.8747 5.23095Z"
|
||||
fill="#FFFFFF"
|
||||
/>
|
||||
<path
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
d="M10.9102 0L13.0902 0L13.0902 8.72736L10.9102 8.72736L10.9102 0Z"
|
||||
fill="#FFFFFF"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter
|
||||
id="filter_2442_480"
|
||||
x="-10"
|
||||
y="-10"
|
||||
width="52.000244"
|
||||
height="53.800659"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"
|
||||
>
|
||||
<feFlood flood-opacity="0" result="feFloodId_2442_480" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha_2442_480"
|
||||
/>
|
||||
<feOffset dx="0" dy="0" />
|
||||
<feGaussianBlur stdDeviation="4.5" />
|
||||
<feComposite in2="hardAlpha_2442_480" operator="out" />
|
||||
<feColorMatrix type="matrix"
|
||||
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0"
|
||||
/>
|
||||
<feBlend mode="normal" in2="feFloodId_2442_480" result="dropShadow_1_2442_480" />
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="dropShadow_1_2442_480" result="shape_2442_480" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="dropShadow_1_2442_480"
|
||||
result="shape_2442_480"
|
||||
/>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -67,95 +106,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-form
|
||||
class="login-form"
|
||||
autoComplete="on"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
ref="loginFormRef"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginFormRef"
|
||||
label-position="left">
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
name="username"
|
||||
type="text"
|
||||
v-model="loginForm.username"
|
||||
autoComplete="on"
|
||||
placeholder="请输入用户名"
|
||||
:prefix-icon="User"
|
||||
/>
|
||||
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="请输入用户名"
|
||||
:prefix-icon="User" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
type="password"
|
||||
@keyup.enter.native="handleLogin(loginFormRef)"
|
||||
v-model="loginForm.password"
|
||||
autoComplete="on"
|
||||
placeholder="请输入密码"
|
||||
:prefix-icon="Unlock"
|
||||
show-password
|
||||
></el-input>
|
||||
<el-input type="password" @keyup.enter.native="handleLogin(loginFormRef)" v-model="loginForm.password"
|
||||
autoComplete="on" placeholder="请输入密码" :prefix-icon="Unlock" show-password></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="rememberForget">
|
||||
<!-- justify-content: space-around;align-items: center; -->
|
||||
<div style="display: flex">
|
||||
<svg
|
||||
class="checkbox-svg"
|
||||
v-show="checkboxVModel"
|
||||
style="pointer-events: none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill="rgba(var(--color-base1), 1)"
|
||||
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"
|
||||
></path>
|
||||
<svg class="checkbox-svg" v-show="checkboxVModel" style="pointer-events: none"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
|
||||
viewBox="0 0 14 14" fill="none">
|
||||
<path fill="rgba(var(--color-base1), 1)"
|
||||
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z">
|
||||
</path>
|
||||
<path
|
||||
d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z"
|
||||
fill="#004242"
|
||||
></path>
|
||||
fill="#004242"></path>
|
||||
</svg>
|
||||
<svg
|
||||
class="checkbox-svg"
|
||||
v-show="!checkboxVModel"
|
||||
style="pointer-events: none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
fill="url(#linear_border_2442_533_0)"
|
||||
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"
|
||||
></path>
|
||||
<svg class="checkbox-svg" v-show="!checkboxVModel" style="pointer-events: none"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
|
||||
viewBox="0 0 14 14" fill="none">
|
||||
<path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)"
|
||||
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z">
|
||||
</path>
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="linear_border_2442_533_0"
|
||||
x1="0"
|
||||
y1="-0.5574798583984375"
|
||||
x2="12.1173095703125"
|
||||
y2="12.878036499023438"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125"
|
||||
y2="12.878036499023438" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
|
||||
<stop offset="1" stop-color="var(--color-border1)" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<el-checkbox
|
||||
:disabled="loading"
|
||||
v-model="checkboxVModel"
|
||||
@change="rememberpwd"
|
||||
label="string"
|
||||
>记住密码</el-checkbox
|
||||
>
|
||||
<el-checkbox :disabled="loading" v-model="checkboxVModel" @change="rememberpwd"
|
||||
label="string">记住密码</el-checkbox>
|
||||
<!-- <div style="cursor: pointer;">忘记密码?</div> -->
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -178,24 +167,15 @@
|
||||
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
|
||||
<div class="serviceContent">
|
||||
<el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect">
|
||||
<el-tab-pane
|
||||
v-for="item in serviceOptions"
|
||||
:label="item.name"
|
||||
:name="item.name"
|
||||
></el-tab-pane>
|
||||
<el-tab-pane v-for="item in serviceOptions" :label="item.name" :name="item.name"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="tabPanel">
|
||||
<template v-if="selectedService == '接口服务'">
|
||||
<div class="item">
|
||||
<span class="itemLabel">服务选择</span>
|
||||
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
|
||||
<el-option
|
||||
size="mini"
|
||||
v-for="item in servOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
>
|
||||
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@ -209,36 +189,38 @@
|
||||
</template>
|
||||
<template v-if="servVal == '网络'">
|
||||
<span class="itemLabel">IP</span>
|
||||
<el-input v-model="ip"></el-input>
|
||||
<el-form-item ref="ipFormItem" prop="ip" :rules="[
|
||||
{
|
||||
validator: validateisIPv4,
|
||||
message: '请输入合法的 IP 地址,4 段 0-255 的数字,用英文点分隔(示例:192.168.1.1)',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]">
|
||||
<el-input v-model="ip"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</div>
|
||||
<div class="item port">
|
||||
<template v-if="servVal == '单机'">
|
||||
<span class="itemLabel">端口</span>
|
||||
<el-form-item
|
||||
prop="localport"
|
||||
:rules="[
|
||||
{
|
||||
validator: validateLocalportRange,
|
||||
trigger: 'blur'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-form-item ref="localportFormItem" prop="localport" :rules="[
|
||||
{
|
||||
validator: validateLocalportRange,
|
||||
trigger: 'blur'
|
||||
}
|
||||
]">
|
||||
<el-input-number v-model="localport" :controls="false" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="servVal == '网络'">
|
||||
<span class="itemLabel">端口</span>
|
||||
<el-form-item
|
||||
prop="port"
|
||||
:rules="[
|
||||
{
|
||||
validator: validatePortRange,
|
||||
message: '端口号必须在 1024–65535 之间',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-form-item ref="portFormItem" prop="port" :rules="[
|
||||
{
|
||||
validator: validatePortRange,
|
||||
message: '端口号必须在 1024–65535 之间',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]">
|
||||
<el-input-number v-model="port" :controls="false" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -248,13 +230,8 @@
|
||||
<div class="item">
|
||||
<span class="itemLabel">串口选择</span>
|
||||
<el-select class="select" popper-class="login-select-popper" v-model="gpsVal">
|
||||
<el-option
|
||||
size="mini"
|
||||
v-for="item in gpsOptions"
|
||||
:key="item.value"
|
||||
:label="item.Product"
|
||||
:value="item.Name"
|
||||
>
|
||||
<el-option size="mini" v-for="item in gpsOptions" :key="item.value" :label="item.Product"
|
||||
:value="item.Name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@ -263,20 +240,14 @@
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<el-button style="margin: 5px 0" size="mini" @click="submit">确定</el-button>
|
||||
<el-button style="margin: 5px 0" size="mini" @click="clickSubmit">确定</el-button>
|
||||
<el-button size="mini" @click="cancel">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 授权页面 -->
|
||||
<Dialog
|
||||
ref="baseDialog"
|
||||
class="graffiti"
|
||||
title="系统授权"
|
||||
:closeCallback="closeCallBack"
|
||||
left="calc(50vw - 188px)"
|
||||
top="calc(50vh - 191px)"
|
||||
>
|
||||
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack" left="calc(50vw - 188px)"
|
||||
top="calc(50vh - 191px)">
|
||||
<template #content>
|
||||
<div class="auth_info custom_scroll_bar content_h">
|
||||
<div class="auth_info_box">
|
||||
@ -285,19 +256,10 @@
|
||||
{{ t('auths.authCode') }}
|
||||
</div>
|
||||
<div class="auth_info_text">
|
||||
<span
|
||||
@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>
|
||||
<span @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 class="auth_info_box">
|
||||
@ -318,22 +280,13 @@
|
||||
<span class="fankuai"></span>
|
||||
{{ t('auths.authType') }}
|
||||
</div>
|
||||
<div
|
||||
v-if="authInfo.status != null"
|
||||
class="auth_info_text"
|
||||
style="font-size: 16px"
|
||||
:style="{
|
||||
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
|
||||
}"
|
||||
>
|
||||
<div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px" :style="{
|
||||
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
|
||||
}">
|
||||
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
|
||||
</div>
|
||||
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
|
||||
<div
|
||||
v-else
|
||||
class="auth_info_text"
|
||||
style="font-size: 16px; color: rgba(241, 108, 85, 1)"
|
||||
>
|
||||
<div v-else class="auth_info_text" style="font-size: 16px; color: rgba(241, 108, 85, 1)">
|
||||
{{ t('auths.noAuthexpire') }}
|
||||
</div>
|
||||
</div>
|
||||
@ -341,7 +294,14 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||
<!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
|
||||
<el-button
|
||||
@click="importAuth"
|
||||
color="#004b4b"
|
||||
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
||||
>
|
||||
<span>{{ t('auths.upload') }}</span>
|
||||
</el-button>
|
||||
<button @click="close">退出系统</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
@ -360,7 +320,7 @@ import { ipcMain } from 'electron'
|
||||
import { AuthApi } from '@/api/setting/auth'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { $sendElectronChanel } from '@/utils/communication'
|
||||
import { $sendElectronChanel, $recvElectronChanel } from '@/utils/communication'
|
||||
|
||||
const {
|
||||
loginFormRef,
|
||||
@ -379,6 +339,11 @@ const {
|
||||
isDesktop
|
||||
} = useLogin() // 登录逻辑
|
||||
|
||||
const ipFormItem = ref(null)
|
||||
const localportFormItem = ref(null)
|
||||
const portFormItem = ref(null)
|
||||
|
||||
|
||||
const {
|
||||
serviceDialog,
|
||||
servVal,
|
||||
@ -397,6 +362,39 @@ const {
|
||||
initialize
|
||||
} = useSetUp() // 服务设置逻辑
|
||||
|
||||
const clickSubmit = async () => {
|
||||
let isIpValid = false
|
||||
let isLocalportValid = false
|
||||
let isPortValid = false
|
||||
if(ipFormItem.value) {
|
||||
await ipFormItem.value.validate('blur', (a)=>{
|
||||
isIpValid = a
|
||||
})
|
||||
}
|
||||
else {
|
||||
isIpValid = true
|
||||
}
|
||||
if(localportFormItem.value) {
|
||||
await localportFormItem.value.validate('blur', (a)=>{
|
||||
isLocalportValid = a
|
||||
})
|
||||
}
|
||||
else {
|
||||
isLocalportValid = true
|
||||
}
|
||||
if(portFormItem.value) {
|
||||
await portFormItem.value.validate('blur', (a)=>{
|
||||
isPortValid = a
|
||||
})
|
||||
}
|
||||
else {
|
||||
isPortValid = true
|
||||
}
|
||||
if(isIpValid && isLocalportValid && isPortValid) {
|
||||
submit()
|
||||
}
|
||||
}
|
||||
|
||||
const handleSelect = (tab) => {
|
||||
selectedService.value = tab.props.name
|
||||
}
|
||||
@ -443,7 +441,6 @@ const router = useRouter()
|
||||
const getAuthInfo = async () => {
|
||||
try {
|
||||
const res = await AuthApi.showAuth()
|
||||
console.log(res, 'resresres')
|
||||
if (typeof res.data === 'object') {
|
||||
authInfo.value.generateTime = res.data.generateTime
|
||||
authInfo.value.expireTime = res.data.expireTime
|
||||
@ -504,9 +501,9 @@ const getStatus = (date) => {
|
||||
|
||||
//授权页面
|
||||
|
||||
// const closeCallBack = (e) => {
|
||||
// baseDialog.value?.close()
|
||||
// }
|
||||
const closeCallBack = (e) => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const close = (e) => {
|
||||
ElMessageBox.confirm('确定要退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -569,6 +566,25 @@ const getAuthCode = async () => {
|
||||
const res = await AuthApi.authInfo()
|
||||
authInfo.value.license_code = res.data
|
||||
}
|
||||
|
||||
function importAuth() {
|
||||
// importWin = true
|
||||
let option = {
|
||||
properties: ['openFile'],
|
||||
filters: [{ name: '授权文件', extensions: ['YJ'] }]
|
||||
}
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
let formdata = new FormData()
|
||||
formdata.append('filePath', paths[0])
|
||||
try {
|
||||
let res = AuthApi.authImport(formdata)
|
||||
ElMessage.success('文件授权成功')
|
||||
isAuth.value = false
|
||||
baseDialog.value?.close()
|
||||
} catch (error) {}
|
||||
})
|
||||
}
|
||||
// setTimeout(() => {
|
||||
// getAuthCode()
|
||||
// }, 8000)
|
||||
@ -605,6 +621,24 @@ const validatePortRange = (rule, value, callback) => {
|
||||
callback() // 校验通过
|
||||
}
|
||||
}
|
||||
const validateisIPv4 = (rule, value, callback) => {
|
||||
if (!ip.value) {
|
||||
callback(new Error('请输入IP')) // 校验失败
|
||||
return
|
||||
}
|
||||
let isIPv4 = isIPv4Valid(ip.value)
|
||||
if (!isIPv4) {
|
||||
callback(new Error()) // 校验失败
|
||||
} else {
|
||||
callback() // 校验通过
|
||||
}
|
||||
}
|
||||
function isIPv4Valid(ip) {
|
||||
ip = ip + ''
|
||||
// 正则匹配:覆盖所有IPv4规则(无空格、4段、0-255、无前导零)
|
||||
const ipv4Regex = /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
|
||||
return ipv4Regex.test(ip.trim()) && !ip.trim().includes(' ');
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 添加过渡样式
|
||||
@ -818,9 +852,11 @@ const validatePortRange = (rule, value, callback) => {
|
||||
.settings:hover svg g {
|
||||
filter: url(#filter_2442_1327);
|
||||
}
|
||||
|
||||
.exit:hover svg {
|
||||
g {
|
||||
filter: url(#filter_2442_480);
|
||||
|
||||
path {
|
||||
fill: rgba(241, 108, 85, 1) !important;
|
||||
}
|
||||
@ -838,204 +874,6 @@ const validatePortRange = (rule, value, callback) => {
|
||||
padding: 22px 11px;
|
||||
}
|
||||
}
|
||||
.service {
|
||||
z-index: 999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: absolute;
|
||||
|
||||
.contentBox {
|
||||
padding: 0 40px 40px 40px;
|
||||
background-color: #ffffff;
|
||||
backdrop-filter: blur(2px);
|
||||
width: 450px;
|
||||
position: absolute;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
left: 50%;
|
||||
top: 29%;
|
||||
transform: translate(-50%, 0%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.hello {
|
||||
color: rgba(0, 66, 66, 1);
|
||||
font-family: 'ddin';
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
line-height: 30px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.greet {
|
||||
color: rgba(0, 66, 66, 1);
|
||||
font-family: 'SourceHanSans';
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: 500;
|
||||
|
||||
span {
|
||||
color: rgba(153, 153, 153, 1);
|
||||
font-weight: 500;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.titleBox {
|
||||
height: 40px;
|
||||
|
||||
.title {
|
||||
line-height: 50px;
|
||||
padding-left: 15px;
|
||||
font-size: 1rem;
|
||||
text-shadow: 0px 0px 9px rgba(20, 118, 255, 1);
|
||||
}
|
||||
|
||||
.closeBox {
|
||||
right: 0;
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 0 0 0 90%;
|
||||
background: rgba(var(--color-base1), 1);
|
||||
|
||||
& > span {
|
||||
font-size: 1rem;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
cursor: pointer;
|
||||
color: rgba(0, 66, 66, 1);
|
||||
font-weight: 700;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.serviceContent {
|
||||
margin-top: 30px;
|
||||
flex: auto;
|
||||
|
||||
::v-deep .el-tabs {
|
||||
.el-tabs__header {
|
||||
margin-bottom: 5px;
|
||||
|
||||
.el-tabs__nav-wrap {
|
||||
.el-tabs__nav-scroll {
|
||||
.el-tabs__nav {
|
||||
.el-tabs__active-bar {
|
||||
background: rgba(0, 66, 66, 1);
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
color: rgba(153, 153, 153, 1);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-tabs__item:focus-visible {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
font-size: 18px;
|
||||
color: rgba(0, 66, 66, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
height: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
border-radius: 5px;
|
||||
//width: 50%;
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background: rgba(var(--color-base1), 0.2);
|
||||
display: flex;
|
||||
|
||||
.tab-item {
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.activeService {
|
||||
border: 1px solid rgba(var(--color-base1), 1);
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.itemLabel {
|
||||
width: 64px;
|
||||
flex: 0 0 64px;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.tabPanel {
|
||||
margin: 0;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 15px 0;
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
padding: 1px 12px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
flex: 1;
|
||||
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
text-align: center;
|
||||
|
||||
button {
|
||||
width: 166px;
|
||||
height: 40px;
|
||||
border-radius: 0;
|
||||
|
||||
::v-deep span {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: 1px solid rgba(var(--color-base1), 1) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//授权
|
||||
@ -1089,8 +927,7 @@ const validatePortRange = (rule, value, callback) => {
|
||||
z-index: 99;
|
||||
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
||||
border: 1.5px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%)
|
||||
1;
|
||||
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
|
||||
text-align: left;
|
||||
font-family: 'sy-boldface';
|
||||
}
|
||||
@ -1136,11 +973,11 @@ const validatePortRange = (rule, value, callback) => {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
::v-deep .title-box > .close-box {
|
||||
::v-deep .title-box>.close-box {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::v-deep .title-box > .title {
|
||||
::v-deep .title-box>.title {
|
||||
font-family: 'Ali-mother-counts-bold';
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
@ -1163,7 +1000,7 @@ const validatePortRange = (rule, value, callback) => {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
::v-deep .foot > button {
|
||||
::v-deep .foot>button {
|
||||
margin-left: 10px;
|
||||
border-radius: 4px;
|
||||
background: rgba(var(--color-base1), 0.2);
|
||||
@ -1175,23 +1012,21 @@ const validatePortRange = (rule, value, callback) => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .foot > button:hover {
|
||||
::v-deep .foot>button:hover {
|
||||
border: 1px solid rgba(var(--color-base1), 1);
|
||||
color: rgba(var(--color-base1), 1);
|
||||
}
|
||||
|
||||
::v-deep .foot > .show > .label {
|
||||
::v-deep .foot>.show>.label {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-message-box {
|
||||
--el-messagebox-title-color: #fff !important;
|
||||
--el-messagebox-content-color: #fff !important;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
background: linear-gradient(180deg,
|
||||
rgba(var(--color-base1), 0) 0%,
|
||||
rgba(var(--color-base1), 0.2) 100%
|
||||
),
|
||||
rgba(var(--color-base1), 0.2) 100%),
|
||||
rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
|
||||
@ -1206,7 +1041,7 @@ const validatePortRange = (rule, value, callback) => {
|
||||
padding: 0 40px 40px 40px;
|
||||
background-color: #ffffff;
|
||||
backdrop-filter: blur(2px);
|
||||
width: 450px;
|
||||
width: 465px;
|
||||
position: absolute;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
left: 50%;
|
||||
@ -1227,7 +1062,7 @@ const validatePortRange = (rule, value, callback) => {
|
||||
|
||||
.greet {
|
||||
color: rgba(0, 66, 66, 1);
|
||||
font-family: 'SourceHanSans';
|
||||
font-family: 'SourceHanSansTi';
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: 500;
|
||||
@ -1258,7 +1093,7 @@ const validatePortRange = (rule, value, callback) => {
|
||||
border-radius: 0 0 0 90%;
|
||||
background: rgba(var(--color-base1), 1);
|
||||
|
||||
& > span {
|
||||
&>span {
|
||||
font-size: 1rem;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
@ -1353,9 +1188,26 @@ const validatePortRange = (rule, value, callback) => {
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 15px 0;
|
||||
margin: 15px 0 24px 0;
|
||||
|
||||
.select {
|
||||
::v-deep .el-input__wrapper {
|
||||
padding: 1px 12px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
flex: 1;
|
||||
:deep(.el-form-item__error) {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1402,11 +1254,9 @@ const validatePortRange = (rule, value, callback) => {
|
||||
.el-message-box {
|
||||
--el-messagebox-title-color: #fff !important;
|
||||
--el-messagebox-content-color: #fff !important;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
background: linear-gradient(180deg,
|
||||
rgba(var(--color-base1), 0) 0%,
|
||||
rgba(var(--color-base1), 0.2) 100%
|
||||
),
|
||||
rgba(var(--color-base1), 0.2) 100%),
|
||||
rgba(0, 0, 0, 0.6) !important;
|
||||
|
||||
.el-message-box__headerbtn {
|
||||
|
||||
@ -31,8 +31,14 @@ export const useSetUp = () => {
|
||||
ip.value = ipPort[0]
|
||||
port.value = Number(ipPort[1])
|
||||
prototype.value = parsedUrl.protocol.slice(0, -1)
|
||||
localip.value = '127.0.0.1'
|
||||
localport.value = 8848
|
||||
}
|
||||
else {
|
||||
servVal.value = '单机'
|
||||
ip.value = '192.168.1.1'
|
||||
port.value = 8890
|
||||
prototype.value = 'http'
|
||||
localip.value = ipPort[0]
|
||||
localport.value = Number(ipPort[1])
|
||||
}
|
||||
@ -47,17 +53,22 @@ export const useSetUp = () => {
|
||||
case '接口服务':
|
||||
// this.submitIP();
|
||||
if (serverMode === 'false') {
|
||||
console.log(Number(port.value))
|
||||
if (Number(port.value) < 1024 || Number(port.value) > 65535) {
|
||||
console.log(11111111)
|
||||
// ElMessage.error('端口号范围为1024-65535')
|
||||
return
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log(Number(localport.value))
|
||||
if (Number(localport.value) < 1024 || Number(localport.value) > 65535) {
|
||||
console.log(222222)
|
||||
// ElMessage.error('端口号范围为1024-65535')
|
||||
return
|
||||
}
|
||||
}
|
||||
console.log(serverMode, localport.value, port.value)
|
||||
submitIP()
|
||||
break
|
||||
case '北斗串口':
|
||||
@ -65,6 +76,7 @@ export const useSetUp = () => {
|
||||
break
|
||||
}
|
||||
selectedService.value = '接口服务'
|
||||
reset()
|
||||
}
|
||||
const cancel = () => {
|
||||
serviceDialog.value = false
|
||||
@ -85,7 +97,7 @@ export const useSetUp = () => {
|
||||
setIP(url)
|
||||
serviceDialog.value = false
|
||||
} else {
|
||||
ElMessage.error('url不合法')
|
||||
// ElMessage.error('url不合法')
|
||||
}
|
||||
} else {
|
||||
//单机走这里
|
||||
@ -124,6 +136,14 @@ export const useSetUp = () => {
|
||||
|
||||
}
|
||||
}
|
||||
watch(servVal, (newVal, oldVal) => {
|
||||
if(newVal === '网络') {
|
||||
serverMode = 'false'
|
||||
}
|
||||
else {
|
||||
serverMode = 'true'
|
||||
}
|
||||
});
|
||||
return {
|
||||
serviceDialog,
|
||||
servVal,
|
||||
|
||||