This commit is contained in:
zyl
2025-12-17 18:15:23 +08:00
84 changed files with 1411 additions and 943 deletions

View File

@ -1,6 +1,6 @@
server: server:
host: 127.0.0.1 host: 127.0.0.1
port: 8849 port: 8848
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
poi: poi:
global: global:

View File

@ -487,7 +487,7 @@ function createWindow(): void {
...params, ...params,
webPreferences: { webPreferences: {
...params.webPreferences, ...params.webPreferences,
session: tempSession, // 关键:使用独立会话 session: params.webPreferences?.session ? tempSession : null, // 关键:使用独立会话
nodeIntegration: true, nodeIntegration: true,
contextIsolation: false, contextIsolation: false,
devTools: true, devTools: true,

View File

@ -44,6 +44,7 @@ declare module 'vue' {
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default'] 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'] UploadFiles: typeof import('./src/components/upload/uploadFiles.vue')['default']
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
} }
@font-face { @font-face {
font-family: 'SourceHanSansTi'; font-family: 'SourceHanSansTiM';
src: url('../fonts/SourceHanSansCN-Medium.otf') format('opentype'); src: url('../fonts/SourceHanSansCN-Medium.otf') format('opentype');
} }
@ -33,7 +33,6 @@
src: url('../fonts/AlimamaShuHeiTi-Bold.ttf') format('truetype'); src: url('../fonts/AlimamaShuHeiTi-Bold.ttf') format('truetype');
} }
:root { :root {
--color-base1: 0, 255, 255; --color-base1: 0, 255, 255;
--color-sdk-auxiliary: 0, 66, 66; --color-sdk-auxiliary: 0, 66, 66;
@ -488,7 +487,6 @@
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child { .YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
border-top: none; border-top: none;
} }
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child { .YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
border-bottom: 1px solid rgba(var(--color-base1), 0.5); border-bottom: 1px solid rgba(var(--color-base1), 0.5);
} }
@ -530,6 +528,7 @@
overflow-y: auto; overflow-y: auto;
scrollbar-gutter: stable; scrollbar-gutter: stable;
width: calc(100% + 1px); width: calc(100% + 1px);
max-height: 233px;
} }
.YJ-custom-base-dialog>.content .table .align-center, .YJ-custom-base-dialog>.content .table .align-center,
@ -588,6 +587,7 @@
} }
.YJ-custom-base-dialog>.content .table .tr .td .link-edit { .YJ-custom-base-dialog>.content .table .tr .td .link-edit {
min-height: 32px; min-height: 32px;
line-height: 18px; line-height: 18px;
@ -722,7 +722,6 @@
.YJ-custom-base-dialog>.content .input-number-unit input[type=number] { .YJ-custom-base-dialog>.content .input-number-unit input[type=number] {
padding: 0 16px 0 10px; 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-outer-spin-button,
.YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-inner-spin-button { .YJ-custom-base-dialog>.content .input-number-unit input[type=number]::-webkit-inner-spin-button {
margin-left: 5px; margin-left: 5px;
@ -1823,7 +1822,6 @@
border-color: rgba(var(--color-base1)); border-color: rgba(var(--color-base1));
color: rgba(var(--color-base1)); color: rgba(var(--color-base1));
} }
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active svg { .YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active svg {
fill: rgba(var(--color-base1)); fill: rgba(var(--color-base1));
} }
@ -2094,7 +2092,6 @@
.YJ-custom-base-dialog.cut-fill>.content>div .div-item:last-child .row .unit { .YJ-custom-base-dialog.cut-fill>.content>div .div-item:last-child .row .unit {
margin-left: 5px; margin-left: 5px;
} }
.YJ-custom-base-dialog.cut-fill>.content .firstTip { .YJ-custom-base-dialog.cut-fill>.content .firstTip {
position: absolute; position: absolute;
left: 340px; left: 340px;
@ -2159,7 +2156,6 @@
flex: 0 0 60px; flex: 0 0 60px;
justify-content: center; justify-content: center;
} }
.YJ-custom-base-dialog.submerge>.content .rangeWords { .YJ-custom-base-dialog.submerge>.content .rangeWords {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
@ -2321,7 +2317,6 @@
.YJ-custom-base-dialog.circle-view-shed>.content { .YJ-custom-base-dialog.circle-view-shed>.content {
width: 290px; width: 290px;
} }
.YJ-custom-base-dialog.circle-view-shed>.content .firstTip { .YJ-custom-base-dialog.circle-view-shed>.content .firstTip {
font-size: 14px; font-size: 14px;
font-weight: 700; font-weight: 700;
@ -3099,7 +3094,6 @@
background-size: 100% 100%; background-size: 100% 100%;
padding: 5px 5px 0px 5px; padding: 5px 5px 0px 5px;
} }
.popup-textarea textarea{ .popup-textarea textarea{
width: 158px; width: 158px;
height: 95px; height: 95px;
@ -3107,7 +3101,6 @@
border: unset!important; border: unset!important;
color: #fff; color: #fff;
} }
.popup-textarea textarea::-webkit-scrollbar { .popup-textarea textarea::-webkit-scrollbar {
width: 8px!important; width: 8px!important;
/* height: 8px!important; */ /* height: 8px!important; */
@ -3502,7 +3495,7 @@
.YJ-custom-checkbox-left:checked::after, .YJ-custom-checkbox-left:checked::after,
.YJ-custom-checkbox-right:checked::after { .YJ-custom-checkbox-right:checked::after {
content: ""; content: "\2714";
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1); color: rgba(var(--color-sdk-auxiliary), 1);
width: 25px; width: 25px;
@ -3537,7 +3530,7 @@
} }
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after { .YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
content: ""; content: "\2714";
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1); color: rgba(var(--color-sdk-auxiliary), 1);
width: 12px; width: 12px;
@ -3716,16 +3709,12 @@
border: 1px solid rgba(var(--color-base1), 0.5); border: 1px solid rgba(var(--color-base1), 0.5);
border-right: none; 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); border-right: 1px solid rgba(var(--color-base1), 0.5);
display: flex; display: flex;
justify-content: center; 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; border-right: none;
} }
@ -3773,17 +3762,18 @@
#YJ-custom-message.success { #YJ-custom-message.success {
/* background-color: #f0f9eb; /* background-color: #f0f9eb;
color: rgb(82, 196, 26); */ color: rgb(82, 196, 26); */
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 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%); linear-gradient(0deg, rgba(27, 248, 195, 0.5) 0%, rgba(27, 248, 195, 0) 100%);
font-size: 14px !important; font-size: 14px !important;
font-weight: 500 !important; font-weight: 500 !important;
color: rgba(27, 248, 195, 1); color: rgba(27, 248, 195, 1);
} }
#YJ-custom-message.warning { #YJ-custom-message.warning {
/* background-color: #fdf6ec; /* background-color: #fdf6ec;
color: #e6a23c; */ color: #e6a23c; */
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 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%); linear-gradient(0deg, rgba(255, 161, 69, 0.5) 0%, rgba(255, 161, 69, 0) 100%);
font-size: 14px !important; font-size: 14px !important;
font-weight: 500 !important; font-weight: 500 !important;

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

View File

@ -163,10 +163,10 @@ export default {
version: '版本信息' version: '版本信息'
}, },
project: { project: {
engineeringSettings: '工程设置', engineeringSettings: '路网数据',
importRoadNetwork: '路网导入', importRoadNetwork: '路网导入',
locationData: '地点数据', locationData: '地点数据',
importPOLI: 'POLI导入', importPOLI: 'POIL导入',
engineeringData: '工程数据', engineeringData: '工程数据',
engineeringOverrideImport: '工程覆盖导入', engineeringOverrideImport: '工程覆盖导入',
engineeringMergeImports: '工程合并导入', engineeringMergeImports: '工程合并导入',

View File

@ -14,4 +14,5 @@ export const LoginApi = {
}) })
} }
} }

View File

@ -13,4 +13,10 @@ export const AuthApi = {
url: `/auth/info` url: `/auth/info`
}) })
}, },
authImport: async (data) => {
return await request.post({
url: `/auth/import`,
data: data
})
}
} }

View File

@ -27,11 +27,7 @@ export const TreeApi = {
url: `/source/addOtherSource`, url: `/source/addOtherSource`,
data data
}).then((res) => { }).then((res) => {
ElMessage.closeAll() return res
ElMessage({
message: '添加成功',
type: 'success'
})
}) })
}, },

View File

@ -65,7 +65,7 @@ body {
background: var(--color-background); background: var(--color-background);
line-height: 1.6; line-height: 1.6;
font-family: font-family:
SourceHanSans, SourceHanSansTi,
-apple-system, -apple-system,
BlinkMacSystemFont, BlinkMacSystemFont,
'Segoe UI', 'Segoe UI',

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

View File

@ -41,8 +41,8 @@
} }
@font-face { @font-face {
font-family: 'SourceHanSans'; font-family: 'SourceHanSansTi';
src: url('../iconfont/SourceHanSansCN-ExtraLight.ttf') format('opentype'); src: url('../iconfont/SourceHanSansCN-Normal.ttf') format('opentype');
} }
@font-face { @font-face {

View File

@ -431,7 +431,7 @@ img {
#app { #app {
.ztree * { .ztree * {
font-size: 14px; font-size: 14px;
font-family: SourceHanSans; font-family: SourceHanSansTi;
} }
.ztree li a { .ztree li a {
@ -676,6 +676,10 @@ img {
background: rgba(var(--color-base1), 0.2) !important; background: rgba(var(--color-base1), 0.2) !important;
} }
input::placeholder {
font-size: 12px !important;
}
@media (max-height: 850px) { @media (max-height: 850px) {
#distanceLegendDiv { #distanceLegendDiv {
.compass { .compass {

View File

@ -75,7 +75,7 @@ service.interceptors.response.use(
(response: AxiosResponse) => { (response: AxiosResponse) => {
const key = getRequestKey(response.config) const key = getRequestKey(response.config)
pendingRequests.delete(key) pendingRequests.delete(key)
// console.log(response); console.log(response);
// 统一处理HTTP状态码 // 统一处理HTTP状态码
if (response.status === 200) { if (response.status === 200) {
@ -95,8 +95,8 @@ service.interceptors.response.use(
message: response.data.msg || response.data.message, message: response.data.msg || response.data.message,
type: 'error' type: 'error'
}) })
return response
} }
} }
return Promise.reject(new Error('Error')) return Promise.reject(new Error('Error'))
}, },

View File

@ -57,7 +57,15 @@ export const addMapSource = async ({ type, id, sourceName = '未命名对象', o
// "treeIndex": 0, // "treeIndex": 0,
params: options 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.params = JSON.stringify(params.params)
params.isShow = true params.isShow = true

View File

@ -133,6 +133,7 @@ export const initMapData = async (type, data, cd) => {
} }
} }
entityObject = new YJ.Obj.TrajectoryMotion(window.earth, data) entityObject = new YJ.Obj.TrajectoryMotion(window.earth, data)
delete entityObject.options.reverse
break break
case 'wallStereoscopic': case 'wallStereoscopic':
entityObject = new YJ.Obj.WallStereoscopic(window.earth, data) entityObject = new YJ.Obj.WallStereoscopic(window.earth, data)

View 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>

View File

@ -1,5 +1,6 @@
import theme from "@/utils/theme"; 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") || '{}') let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}')
const obj = { const obj = {
@ -31,7 +32,11 @@ export const sysChange = async (eventBus) => {
YJ.Global.setDMS(window.earth, systemSetting.positionType) YJ.Global.setDMS(window.earth, systemSetting.positionType)
//比例尺 //比例尺
console.log(systemSetting.sheetIndexStatusSwitch, window.earth, '标准图幅')
setTimeout(async () => {
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch) await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)
}, isFirst ? 1000 : 0)
eventBus.emit('tufuInput', systemSetting.sheetIndexStatusSwitch) eventBus.emit('tufuInput', systemSetting.sheetIndexStatusSwitch)
//鹰眼图 //鹰眼图

View File

@ -14,7 +14,7 @@
<div class="col"> <div class="col">
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <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="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>

View File

@ -74,7 +74,8 @@
</div> </div>
</template> </template>
<template #footer> <template #footer>
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> <!-- <uploadFiles accept=".YJ" :maxSize="1"></uploadFiles> -->
<button @click="importAuth">授权导入</button>
<button @click="close">退出系统</button> <button @click="close">退出系统</button>
</template> </template>
</Dialog> </Dialog>
@ -362,6 +363,25 @@ const copy = async (text) => {
ElMessage.error('复制失败') 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.rightBox { .rightBox {
@ -565,7 +585,7 @@ const copy = async (text) => {
.greet { .greet {
color: rgba(0, 66, 66, 1); color: rgba(0, 66, 66, 1);
font-family: 'SourceHanSans'; font-family: 'SourceHanSansTi';
font-size: 18px; font-size: 18px;
line-height: 18px; line-height: 18px;
font-weight: 500; font-weight: 500;

View File

@ -3,7 +3,8 @@
<div class="animate__animated bottomMenu"> <div class="animate__animated bottomMenu">
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i"> <div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i">
<div class="bottom_box_content" @click="addMarker(item, $event)"> <div class="bottom_box_content" @click="addMarker(item, $event)">
<el-tooltip :content="t('bottomMenu.' + item.sourceType)" effect="customized" placement="top" :hide-after="0"> <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" <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" width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
preserveAspectRatio="none"> preserveAspectRatio="none">
@ -19,7 +20,12 @@
</linearGradient> </linearGradient>
</defs> </defs>
</svg> </svg>
</el-tooltip> </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" <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" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
@ -42,19 +48,17 @@
</div> </div>
</div> </div>
<div class="bottom_children" v-if="item.children" v-show="item.childrenShow"> <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" <Tooltip v-for="(item2, m) of item.children" :key="m" :content="t('bottomMenu.' + item2.sourceType)" class="bottom_childre_box" @click="addMarker(item2, $event)">
@click="addMarker(item2, $event)"> <template #trigger>
<el-tooltip :content="t('bottomMenu.' + item2.sourceType)" effect="customized" placement="top" <div class="bottom_childre_box">
:hide-after="0">
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg" <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" xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5"
preserveAspectRatio="none"> 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" <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" /> fill="#000000" fill-opacity="0.5" />
<path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd" <path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd"
fill="url(#linear_fill_2485_4)" /> fill="url(#linear_fill_2485_4)" />
</svg> </svg>
</el-tooltip>
<svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;" <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" 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"> height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none">
@ -67,6 +71,8 @@
{{ t('bottomMenu.' + item2.sourceType) }} {{ t('bottomMenu.' + item2.sourceType) }}
</div> </div>
</div> </div>
</template>
</Tooltip>
<svg-icon class="subscript2" name="subscript2" :size="14" color="rgba(var(--color-base1), 1)"></svg-icon> <svg-icon class="subscript2" name="subscript2" :size="14" color="rgba(var(--color-base1), 1)"></svg-icon>
</div> </div>
</div> </div>
@ -141,6 +147,7 @@
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { inject } from 'vue' import { inject } from 'vue'
import { addMapSource } from '../../../common/addMapSource' import { addMapSource } from '../../../common/addMapSource'
import Tooltip from '@/components/tooltip/index.vue'
const { ipcRenderer } = require('electron') const { ipcRenderer } = require('electron')
const { t } = useI18n() const { t } = useI18n()
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
@ -746,6 +753,15 @@ document.addEventListener('click', (e: any) => {
top: 0; top: 0;
pointer-events: all; pointer-events: all;
} }
:deep(.tooltip-wrapper) {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
pointer-events: all;
}
} }
.bottomMenu { .bottomMenu {
@ -836,7 +852,7 @@ document.addEventListener('click', (e: any) => {
} }
&:hover { &:hover {
>.bottom_childre_box_bg_hover { .bottom_childre_box_bg_hover {
opacity: 1 !important; opacity: 1 !important;
} }
} }

View File

@ -49,7 +49,15 @@
{{ t('auths.noAuthexpire') }} {{ t('auths.noAuthexpire') }}
</div> </div>
</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> </div>
</template> </template>
@ -59,6 +67,11 @@ import uploadFiles from '@/components/upload/uploadFiles.vue'
import { AuthApi } from '@/api/setting/auth' import { AuthApi } from '@/api/setting/auth'
import useClipboard from 'vue-clipboard3' import useClipboard from 'vue-clipboard3'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import {
$sendElectronChanel,
$recvElectronChanel,
$changeComponentShow
} from '@/utils/communication'
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
const { t } = useI18n() const { t } = useI18n()
@ -84,6 +97,24 @@ onUnmounted(() => {
eventBus.off('upload', func) 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) => { // eventBus.on('upload', (data) => {
// if (data) { // if (data) {
// getAuthInfo() // getAuthInfo()

View File

@ -32,7 +32,7 @@
<div class="item_left"> <div class="item_left">
<div class="img"> <div class="img">
<img <img
src="../../../../../../assets/images/pdf.png" src="../../../../../../assets/images/pbfl.png"
style="width: 40px; height: 50px" style="width: 40px; height: 50px"
/> />
</div> </div>
@ -88,7 +88,7 @@
<div class="item_left"> <div class="item_left">
<div class="img"> <div class="img">
<img <img
src="../../../../../../assets/images/poi.png" src="../../../../../../assets/images/poil.png"
style="width: 40px; height: 50px" style="width: 40px; height: 50px"
/> />
</div> </div>

View File

@ -105,6 +105,7 @@ import {
$recvElectronChanel, $recvElectronChanel,
$removeElectronChanel $removeElectronChanel
} from '@/utils/communication' } from '@/utils/communication'
import { set } from 'date-fns'
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
@ -258,7 +259,15 @@ const attachUpload = async () => {
} }
}) })
} }
let isClick = true
const downloadTemp = async () => { const downloadTemp = async () => {
if (!isClick) {
return
}
isClick = false
setTimeout(() => {
isClick = true
}, 1000)
let p = 'xlsx' let p = 'xlsx'
if (process.platform == 'linux') { if (process.platform == 'linux') {
p = 'et' p = 'et'
@ -372,7 +381,7 @@ const downloadTemp = async () => {
} }
:deep(.el-table th.el-table__cell) { :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; color: #fff;
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important; border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
border-right: 1px solid rgba(var(--color-base1), 0.5) !important; border-right: 1px solid rgba(var(--color-base1), 0.5) !important;

View File

@ -258,6 +258,7 @@ watch(photoName, (val) => {
// treeRef.value!.filter(val) // treeRef.value!.filter(val)
// } // }
modelList.value = [] modelList.value = []
currModelList.value = []
getModelList() getModelList()
}) })
const filterNode: any = (value, data) => { const filterNode: any = (value, data) => {
@ -401,7 +402,8 @@ const handleFileChange = (e: Event) => {
} }
//创建模型库 //创建模型库
const createModelDB = async () => { const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0] // let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = { let option = {
title: '创建军标库', title: '创建军标库',
// filename: 'YJEarth.junbiao', // 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 = () => { const importModelDB = () => {
@ -891,11 +900,12 @@ const handleDelete = (row: any) => {
type: 'warning' type: 'warning'
} }
) )
.then(() => { .then(async () => {
try {
let formData = new FormData() let formData = new FormData()
formData.append('militaryId', row.id) formData.append('militaryId', row.id)
GraphApi.delModel(formData).then((res) => { let res = await GraphApi.delModel(formData)
if (res.code == 0 || res.code == 200) {
getModelListByType(row.militaryTypeId) getModelListByType(row.militaryTypeId)
ElMessage.success('删除成功') ElMessage.success('删除成功')
if (res.data?.length) { if (res.data?.length) {
@ -907,8 +917,7 @@ const handleDelete = (row: any) => {
;(window as any)._entityMap.delete(item) ;(window as any)._entityMap.delete(item)
}) })
} }
} } catch (error) {}
})
}) })
.catch(() => {}) .catch(() => {})
} }

View File

@ -268,7 +268,7 @@ var delFun = (row) => {
} }
:deep(.el-table th.el-table__cell) { :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; color: #fff;
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important; border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
border-right: 1px solid rgba(var(--color-base1), 0.5) !important; border-right: 1px solid rgba(var(--color-base1), 0.5) !important;

View File

@ -286,6 +286,7 @@ watch(photoName, (val) => {
// } // }
getModelList() getModelList()
modelList.value = [] modelList.value = []
currModelList.value = []
}) })
const filterNode: any = (value, data) => { const filterNode: any = (value, data) => {
if (!value) return true if (!value) return true
@ -448,7 +449,8 @@ const handleFileChange = (e: Event) => {
//创建模型库 //创建模型库
const createModelDB = async () => { const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0] // let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = { let option = {
title: '创建模型库', title: '创建模型库',
// filename: 'YJEarth.model', // 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 = () => { const importModelDB = () => {
@ -838,16 +847,15 @@ const handleEdit = (row: ModelItem) => {
updatePoster(row) updatePoster(row)
} }
const updatePoster1 = (row, flag = false, path = '') => { const updatePoster1 = (row, flag = false, path = '') => {
let cb = (c) => { let cb = async (c) => {
try {
const formData = new FormData() const formData = new FormData()
formData.append('modelId', row.id) formData.append('modelId', row.id)
formData.append('file', c) formData.append('file', c)
ModelApi.updatePoster(formData).then((res) => { let res = await ModelApi.updatePoster(formData)
if (res.code == 0 || res.code == 200) {
getModelListByType(row.modelTypeId) getModelListByType(row.modelTypeId)
ElMessage.success('添加成功') ElMessage.success('更换成功')
} } catch (error) {}
})
} }
if (!flag) { if (!flag) {
let option = { let option = {
@ -872,16 +880,16 @@ const updatePoster1 = (row, flag = false, path = '') => {
const updatePoster = (row, flag = false, path = '') => { const updatePoster = (row, flag = false, path = '') => {
let that = this let that = this
let cb = (c) => { let cb = async (c) => {
try {
const formData = new FormData() const formData = new FormData()
formData.append('modelId', row.id) formData.append('modelId', row.id)
formData.append('file', c) formData.append('file', c)
ModelApi.updatePoster(formData).then((res) => { let res = await ModelApi.updatePoster(formData)
if (res.code == 0 || res.code == 200) {
getModelListByType(row.modelTypeId) getModelListByType(row.modelTypeId)
ElMessage.success('添加成功') ElMessage.success('更换成功')
} } catch (error) {}
})
} }
if (!flag) { if (!flag) {
let option = { let option = {
@ -945,11 +953,11 @@ const handleDelete = (row: ModelItem) => {
type: 'warning' type: 'warning'
} }
) )
.then(() => { .then(async () => {
try {
let formData = new FormData() let formData = new FormData()
formData.append('modelId', row.id) formData.append('modelId', row.id)
ModelApi.delModel(formData).then((res) => { let res = await ModelApi.delModel(formData)
if (res.code == 0 || res.code == 200) {
// @ts-ignore // @ts-ignore
getModelListByType(row.modelTypeId) getModelListByType(row.modelTypeId)
ElMessage.success('删除成功') ElMessage.success('删除成功')
@ -963,8 +971,7 @@ const handleDelete = (row: ModelItem) => {
;(window as any)._entityMap.delete(item) ;(window as any)._entityMap.delete(item)
}) })
} }
} } catch (error) {}
})
}) })
.catch(() => {}) .catch(() => {})
} }

View File

@ -292,6 +292,7 @@ watch(photoName, (val) => {
// treeRef.value!.filter(val) // treeRef.value!.filter(val)
// } // }
getModelList() getModelList()
modelList.value = []
currModelList.value = [] currModelList.value = []
}) })
const filterNode: any = (value, data) => { const filterNode: any = (value, data) => {
@ -483,7 +484,8 @@ const handleFileChange = (e: Event) => {
} }
//创建模型库 //创建模型库
const createModelDB = async () => { const createModelDB = async () => {
let date = new Date().toISOString().split('T')[0] // let date = new Date().toISOString().split('T')[0]
let date = getCurrentDateFormatted()
let option = { let option = {
title: '创建图标库', title: '创建图标库',
// filename: 'YJEarth.tubiao', // 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 = () => { const importModelDB = () => {
@ -970,15 +979,15 @@ const handleDelete = (row: any) => {
type: 'warning' type: 'warning'
} }
) )
.then(() => { .then(async () => {
try {
let formData = new FormData() let formData = new FormData()
formData.append('iconId', row.id) formData.append('iconId', row.id)
PhotoApi.delModel(formData).then((res) => { let res = await PhotoApi.delModel(formData)
if (res.code == 0 || res.code == 200) {
getModelListByType(row.iconTypeId) getModelListByType(row.iconTypeId)
ElMessage.success('删除成功') ElMessage.success('删除成功')
} } catch (error) {}
})
}) })
.catch(() => {}) .catch(() => {})
} }

View File

@ -711,7 +711,8 @@ const intoBack = async () => {
contextIsolation: false, contextIsolation: false,
// devTools: true, // devTools: true,
// fullScreen: true, // fullScreen: true,
devTools: true devTools: true,
session: true // 自定义参数用于判断是否启用session
} }
}, },
// `http://localhost:${availablePort}/backManage/index.html#/login?timestamp=${Date.now()}`, // `http://localhost:${availablePort}/backManage/index.html#/login?timestamp=${Date.now()}`,
@ -781,7 +782,7 @@ onMounted(() => {
.detailSkin { .detailSkin {
width: 50%; width: 50%;
display: flex; display: flex;
align-items: left; align-items: center;
box-sizing: border-box; box-sizing: border-box;
flex-direction: row; flex-direction: row;
padding-bottom: 15px; padding-bottom: 15px;

View File

@ -88,8 +88,8 @@
class="input height custom-number-input with-arrows" class="input height custom-number-input with-arrows"
type="number" type="number"
step="0.1" step="0.1"
min="0" :min="0"
max="1" :max="1"
v-model="weatherData.darkness" v-model="weatherData.darkness"
@change="changDarkness" @change="changDarkness"
> >
@ -108,8 +108,8 @@
<el-input <el-input
class="input height custom-number-input with-arrows arrows2" class="input height custom-number-input with-arrows arrows2"
type="number" type="number"
min="-9999999" :min="0.1"
max="999999999" :max="9999"
v-model="weatherData.speed" v-model="weatherData.speed"
@change="changSpeed" @change="changSpeed"
size="small" size="small"
@ -264,16 +264,19 @@ onMounted(() => {
weatherData.softShadow = data.softShadow weatherData.softShadow = data.softShadow
weatherData.darkness = data.darkness weatherData.darkness = data.darkness
weatherData.speed = data.speed weatherData.speed = data.speed
data?.wearther.forEach((item, index) => { // data?.wearther.forEach((item, index) => {
list[index].status = item.status // list[index].status = item.status
}) // })
} }
// list = data.wearther // list = data.wearther
switchStatus.value = true switchStatus.value = true
sunshine = window.sunshine sunshine = window.sunshine
myData = formatTimeToBeijing() myData = formatTimeToBeijing()
} }
let wearther = JSON.parse(localStorage.getItem('weartherSetting'))
wearther?.forEach((item, index) => {
list[index].status = item.status
})
timeline && timeline.clear() timeline && timeline.clear()
timeline = new TimeLine(window.earth, weatherData.speed, switchStatus.value, myData, initCallback) timeline = new TimeLine(window.earth, weatherData.speed, switchStatus.value, myData, initCallback)
@ -302,10 +305,11 @@ onBeforeUnmount(() => {
darkness: weatherData.darkness, darkness: weatherData.darkness,
speed: weatherData.speed, speed: weatherData.speed,
time: weatherData.time, time: weatherData.time,
timeerTime: document.getElementById('currentTime').textContent, timeerTime: document.getElementById('currentTime').textContent
wearther: list // wearther: list
} }
localStorage.setItem('shineSetting', JSON.stringify(data)) localStorage.setItem('shineSetting', JSON.stringify(data))
localStorage.setItem('weartherSetting', JSON.stringify(list))
// sunshine && sunshine.remove() // sunshine && sunshine.remove()
timeline && timeline.clear() timeline && timeline.clear()
emit('isPause', document.getElementById('timePause').textContent == '播放') emit('isPause', document.getElementById('timePause').textContent == '播放')
@ -379,8 +383,11 @@ var getDateTimeString = () => {
watch( watch(
() => weatherData.darkness, () => weatherData.darkness,
(newValue) => { (newValue) => {
if (newValue < 0 || newValue > 1) {
return
}
if (sunshine) { if (sunshine) {
sunshine.darkness = newValue sunshine.darkness = 1 - newValue
} }
} }
) )
@ -400,6 +407,9 @@ var decrementValue = () => {
watch( watch(
() => weatherData.speed, () => weatherData.speed,
(newValue) => { (newValue) => {
if (newValue < 0 || newValue == 0 || newValue > 9999) {
return
}
if (!currWeatherData) { if (!currWeatherData) {
weatherData.currWeather = false weatherData.currWeather = false
} else { } else {
@ -410,10 +420,13 @@ watch(
} }
) )
var incrementValue2 = () => { 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 = () => { 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 = () => { var getCurrentTime = () => {
const now = new Date() const now = new Date()
@ -461,7 +474,7 @@ var switchFunc = () => {
sunshine = window.sunshine sunshine = window.sunshine
sunshine.timeBar(document.getElementById('currentTime').textContent) sunshine.timeBar(document.getElementById('currentTime').textContent)
if (weatherData) { if (weatherData) {
sunshine.darkness = weatherData.darkness sunshine.darkness = 1 - weatherData.darkness
sunshine.speed = weatherData.speed sunshine.speed = weatherData.speed
sunshine.softShadow = weatherData.softShadow sunshine.softShadow = weatherData.softShadow
} }
@ -534,9 +547,19 @@ var clickTimeIcon = (item: any) => {
} }
var changDarkness = () => { 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 = () => { var changSpeed = () => {
if (weatherData.speed < 0 || weatherData.speed == 0) {
weatherData.speed = 0.1
} else if (weatherData.speed > 9999) {
weatherData.speed = 9999
}
weatherData.currWeather = false weatherData.currWeather = false
sunshine && (sunshine.speed = weatherData.speed) sunshine && (sunshine.speed = weatherData.speed)
timeline.setSpeed(weatherData.speed) timeline.setSpeed(weatherData.speed)

View File

@ -81,6 +81,7 @@ export default class TimeLine {
// }) // })
// } else { // } else {
that.pauseed = !that.pauseed; that.pauseed = !that.pauseed;
if (that.pauseed) {//暂停 if (that.pauseed) {//暂停
that.pausedTime = performance.now(); // 记录暂停时刻 that.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放'; document.getElementById('timePause').textContent = '播放';
@ -88,7 +89,7 @@ export default class TimeLine {
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false) 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) callback(false)
} }
} else {//播放 } else {//播放

View File

@ -147,33 +147,33 @@ var clickFun = (childData) => {
darkness: 0.4, darkness: 0.4,
speed: 1, speed: 1,
time: formattedDate, time: formattedDate,
timeerTime: '00:00:00', timeerTime: '00:00:00'
wearther: [ // wearther: [
// 雨 // //
{ // {
name: '雨', // name: '雨',
svg: 'rain', // svg: 'rain',
status: false // status: false
}, // },
// 雪 // //
{ // {
name: '雪', // name: '雪',
svg: 'snow', // svg: 'snow',
status: false // status: false
}, // },
//雾 // //
{ // {
name: '雾', // name: '雾',
svg: 'fog', // svg: 'fog',
status: false // status: false
}, // },
//星空 // //星空
{ // {
name: '星空', // name: '星空',
svg: 'skystarry', // svg: 'skystarry',
status: false // status: false
} // }
] // ]
} }
} }
//光照 //光照
@ -186,22 +186,22 @@ var clickFun = (childData) => {
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
}) })
window.sunshine = sunshine window.sunshine = sunshine
sunshine.darkness = data.darkness sunshine.darkness = 1 - data.darkness
sunshine.softShadow = data.softShadow sunshine.softShadow = data.softShadow
//天气效果 //天气效果
if ((window as any).checkAuthIsValid) { // if ((window as any).checkAuthIsValid) {
data.wearther.forEach((item) => { // data.wearther.forEach((item) => {
if (item.status) { // if (item.status) {
func[item.svg](item) // func[item.svg](item)
} // }
})
} else {
// ElMessage({
// message: '您没有该功能的权限',
// type: 'warning'
// }) // })
} // } else {
// // ElMessage({
// // message: '您没有该功能的权限',
// // type: 'warning'
// // })
// }
} else if (weatherClickPop.value === false) { } else if (weatherClickPop.value === false) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, { sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123, id: 123,

View File

@ -3,11 +3,13 @@
<div class="left animate__animated"> <div class="left animate__animated">
<div class="menus"> <div class="menus">
<div class="menus_itemBox" v-for="(item, index) in menuList"> <div class="menus_itemBox" v-for="(item, index) in menuList">
<el-tooltip :content="t(`firstMenu.${item.name}`)" effect="customized" placement="top" :hide-after="0"> <Tooltip :content="t(`firstMenu.${item.name}`)" effect="customized" placement="top" :hide-after="0"
<div class="item_icon" @click="(e) => { class="item_icon" @click="(e) => {
handleClick(item, index, e) handleClick(item, index, e)
} }
"> ">
<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" <!-- <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"> 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="#000000" fill-opacity="0.5" d="M0 44L136.639 44L162 18L162 0L0 0L0 44Z" />
@ -57,7 +59,9 @@
{{ t(`firstMenu.${item.name}`) }} {{ t(`firstMenu.${item.name}`) }}
</div> </div>
</div> </div>
</el-tooltip> </template>
</Tooltip>
</div> </div>
<leftSideSecond class="absolute zIndex99 leftSideSecond" ref="leftSideSecondRef"></leftSideSecond> <leftSideSecond class="absolute zIndex99 leftSideSecond" ref="leftSideSecondRef"></leftSideSecond>

View File

@ -153,7 +153,7 @@ const handleKeyDown = (e) => {
window.addEventListener('keydown', handleKeyDown) window.addEventListener('keydown', handleKeyDown)
eventBus.on('closeSplitScreen', (data: never) => { eventBus.on('closeSplitScreen', (data: never) => {
clickChange.splitScreen = !clickChange.splitScreen clickChange.splitScreen = false
YJ.Global.splitScreen.off() YJ.Global.splitScreen.off()
}) })
@ -490,7 +490,7 @@ const methodMap = {
}, },
// 喷射水柱 // 喷射水柱
waterL: () => { 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) => { draw.start(async (a, positions) => {
if (!positions || positions.length < 2) { if (!positions || positions.length < 2) {
if (a >= 2) { if (a >= 2) {
@ -875,8 +875,8 @@ const methodMap = {
// let source_id = this.$md5(new Date().getTime() + '压平面') // let source_id = this.$md5(new Date().getTime() + '压平面')
let draw = new YJ.Draw.DrawPolygon(window.earth) let draw = new YJ.Draw.DrawPolygon(window.earth)
draw.start((err, params) => { draw.start(async(err, params) => {
if (params.length > 2) { if (params && params.length > 2) {
if (err) throw err if (err) throw err
let alt = params[0].alt let alt = params[0].alt
params.forEach((item) => { params.forEach((item) => {
@ -907,7 +907,15 @@ const methodMap = {
parentId: selectedNode.id 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.isShow = true
paramsData.params = JSON.stringify(paramsData.params) paramsData.params = JSON.stringify(paramsData.params)
; (window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData) ; (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 tileset = window.earth.entityMap.get(selectedNode[0].id)
let draw = new YJ.Draw.DrawPolygon(window.earth) let draw = new YJ.Draw.DrawPolygon(window.earth)
draw.start((err, pos) => { draw.start((err, pos) => {
if(pos) {
let section = new YJ.Analysis.Section(window.earth, tileset.entity, { let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
positions: pos positions: pos
}) })
}
// _entityMap.set(selectedNode.source_id + 'pouqie', section) // _entityMap.set(selectedNode.source_id + 'pouqie', section)
}) })
} else { } else {

View File

@ -13,7 +13,7 @@
<div class="col"> <div class="col">
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <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="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>

View File

@ -168,10 +168,37 @@ eventBus.on('contourDialog', () => {
}) })
const open = () => { const open = () => {
baseDialog.value?.open() baseDialog.value?.open()
setVal()
setTimeout(() => { setTimeout(() => {
YJ.Global.Contour(window.earth) 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) => { const closeCallBack = (e) => {
YJ.Global.ContourReset() YJ.Global.ContourReset()
show.value = true show.value = true
@ -190,8 +217,7 @@ const sure = (e) => {
message: value, message: value,
type: 'error' type: 'error'
}) })
} } else {
else {
baseDialog.value?.close() baseDialog.value?.close()
} }
} }

View File

@ -489,8 +489,17 @@ const flyto = async (e) => {
}) })
return 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, { 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 name = '点标注'
let params = { let params = {
@ -574,4 +583,7 @@ defineExpose({
line-height: 0px; line-height: 0px;
text-shadow: 0px 0px 9px rgb(20, 118, 255); text-shadow: 0px 0px 9px rgb(20, 118, 255);
} }
::v-deep .content input[type='number'] {
font-size: 15px !important;
}
</style> </style>

View File

@ -135,7 +135,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col" style="flex: 0 0 300px"> <div class="col" style="flex: 0 0 350px">
<!-- <input <!-- <input
type="checkbox" type="checkbox"
name="isTotalTime" name="isTotalTime"
@ -267,7 +267,7 @@ let allData: any = reactive({
defaultTime: 5, defaultTime: 5,
totalTime: 0 totalTime: 0
}) })
const save = () => { const save = async () => {
if (allData.points.length != 0) { if (allData.points.length != 0) {
let selectedNodes = window.treeObj.getSelectedNodes() let selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1] let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
@ -306,7 +306,15 @@ const save = () => {
params: JSON.stringify(paramsData.params) params: JSON.stringify(paramsData.params)
}) })
} else { } 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.isShow = true
paramsData.params = JSON.stringify(paramsData.params) paramsData.params = JSON.stringify(paramsData.params)
cusAddNodes(window.treeObj, paramsData.parentId, [paramsData]) cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])

View File

@ -151,9 +151,9 @@ function booleanOverlaps(positions1, flag = 'circle') {
getAllItemInArea(lng, lat) getAllItemInArea(lng, lat)
break break
case 'Feature': case 'Feature':
if (item.detail.geometry.type == 'Point') { if (item.params.geometry.type == 'Point') {
lng = item.detail.geometry.coordinates[0] lng = item.params.geometry.coordinates[0]
lat = item.detail.geometry.coordinates[1] lat = item.params.geometry.coordinates[1]
getAllItemInArea(lng, lat) getAllItemInArea(lng, lat)
} }
break break

View File

@ -12,33 +12,48 @@ import { inject } from 'vue'
import { nextTick } from 'vue' import { nextTick } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { MaterialApi } from '@/api/material/index'
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
const shpTotalDict: any = reactive({ const shpTotalDict: any = reactive({
shlwz_jzzp: '救灾帐篷', // shlwz_jzzp: '救灾帐篷',
mb: '棉被', // mb: '棉被',
mymdy: '棉衣、棉大衣', // mymdy: '棉衣、棉大衣',
mjb: '毛巾被', // mjb: '毛巾被',
mt: '毛毯', // mt: '毛毯',
dgnsd: '睡袋', // dgnsd: '睡袋',
zdc: '折叠床', // zdc: '折叠床',
jycs: '简易厕所', // jycs: '简易厕所',
xpct: '橡皮船(艇)', // xpct: '橡皮船(艇)',
cfz: '冲锋舟', // cfz: '冲锋舟',
jsc: '救生船', // jsc: '救生船',
jsy: '救生衣', // jsy: '救生衣',
jsq: '救生圈', // jsq: '救生圈',
bzd: '编织袋', // bzd: '编织袋',
md: '麻袋', // md: '麻袋',
csb: '抽水泵', // csb: '抽水泵',
fdj: '发电机', // fdj: '发电机',
yjd: '应急灯', // yjd: '应急灯',
jzzp: '救灾帐篷', // jzzp: '救灾帐篷',
jzyb: '救灾衣被', // jzyb: '救灾衣被',
jygj: '救援工具' // 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 draw: any = reactive([])
var show: any = ref(false) var show: any = ref(false)
@ -115,9 +130,9 @@ function booleanOverlaps(positions1, flag = 'circle') {
getAllItemInArea(lng, lat) getAllItemInArea(lng, lat)
break break
case 'Feature': case 'Feature':
if (item.detail.geometry.type == 'Point') { if (item.params.geometry.type == 'Point') {
lng = item.detail.geometry.coordinates[0] lng = item.params.geometry.coordinates[0]
lat = item.detail.geometry.coordinates[1] lat = item.params.geometry.coordinates[1]
getAllItemInArea(lng, lat) getAllItemInArea(lng, lat)
} }
break break
@ -125,46 +140,54 @@ function booleanOverlaps(positions1, flag = 'circle') {
} }
return itemInArea return itemInArea
} }
function renderCanvas(nodes) { async function renderCanvas(nodes) {
let x: any = [] let x: any = []
let y: any = [] let y: any = []
nodes.forEach((item) => { // nodes.forEach((item) => {
// shp物资统计 // // shp物资统计
if (item.sourceType == 'Feature') { // if (item.sourceType == 'Feature') {
let obj = JSON.parse(JSON.stringify(item.detail.properties)) // let obj = JSON.parse(JSON.stringify(item.params.properties))
for (const key in obj) { // for (const key in obj) {
let name = key // let name = key
if (shpTotalDict[key]) { // if (shpTotalDict[key]) {
name = shpTotalDict[key] // name = shpTotalDict[key]
// 把相同名称的物资数量相加,名称相同时,累加数据 // // 把相同名称的物资数量相加,名称相同时,累加数据
let index = x.findIndex((item) => item === name) // let index = x.findIndex((item) => item === name)
if (index !== -1) { // if (index !== -1) {
y[index] = y[index] + Number(obj[key]) // y[index] = y[index] + Number(obj[key])
} else { // } else {
x.push(name) // x.push(name)
y.push(Number(obj[key])) // y.push(Number(obj[key]))
} // }
} // }
} // }
} // }
let params = JSON.parse(item.params) // let params = JSON.parse(item.params)
if (params.attribute && params.attribute.goods) { // if (params.attribute && params.attribute.goods) {
let goods = params.attribute.goods.content // let goods = params.attribute.goods.content
if (goods.length) { // if (goods.length) {
// $root_home_index.goodSearchDialog = false; // // $root_home_index.goodSearchDialog = false;
goods.forEach((good) => { // goods.forEach((good) => {
// 把相同名称的物资数量相加,名称相同时,累加数据 // // 把相同名称的物资数量相加,名称相同时,累加数据
let index = x.findIndex((item) => item === good.name) // let index = x.findIndex((item) => item === good.name)
if (index !== -1) { // if (index !== -1) {
y[index] = y[index] + Number(good.cnt) // y[index] = y[index] + Number(good.cnt)
} else { // } else {
x.push(good.name) // x.push(good.name)
y.push(Number(good.cnt)) // 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 notZeroX: any = []
let notZeroY: any = [] let notZeroY: any = []

View File

@ -50,15 +50,15 @@ const open = () => {
} }
} }
const closeCallBack = (e) => { const closeCallBack = (e) => {
echartsObject && echartsObject.clear() echartsObject && echartsObject.clear && echartsObject.clear()
profile && profile.clean() profile && profile.clean && profile.clean()
profile = [] profile = []
echartsObject = [] echartsObject = []
} }
onBeforeUnmount(() => { onBeforeUnmount(() => {
echartsObject && echartsObject.clear() echartsObject && echartsObject.clear && echartsObject.clear()
profile && profile.clean() profile && profile.clean && profile.clean()
profile = [] profile = []
echartsObject = [] echartsObject = []
}) })
@ -68,7 +68,7 @@ function close() {
const draw = (e) => { const draw = (e) => {
// @ts-ignore (define in dts) // @ts-ignore (define in dts)
initEcharts() initEcharts()
profile.reDraw() profile && profile.reDraw && profile.reDraw()
} }
function initEcharts(points) { function initEcharts(points) {
let datas = [], let datas = [],

View File

@ -300,6 +300,7 @@ const open = () => {
const closeCallBack = (e) => { const closeCallBack = (e) => {
status1.value = false status1.value = false
tools.projConvert(status1.value, () => {})
} }
onBeforeUnmount(() => { onBeforeUnmount(() => {
closeCallBack('') closeCallBack('')

View File

@ -6,11 +6,12 @@
style="z-index: 1000" style="z-index: 1000"
left="calc(50% - 160px)" left="calc(50% - 160px)"
top="calc(50% - 120px)" top="calc(50% - 120px)"
width="350px"
> >
<template #content> <template #content>
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef"> <el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
<el-form-item label="名称" prop="cameraName"> <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>
<el-form-item label="设备IP" prop="ip"> <el-form-item label="设备IP" prop="ip">
<el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input> <el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
@ -80,7 +81,25 @@ var addForm: any = ref({
const peopleRules: any = reactive({ const peopleRules: any = reactive({
cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }], cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
ip: [{required: true, message: '请输入ip', 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: [ port: [
{ required: true, message: '请输入设备端口号', trigger: 'blur' }, { required: true, message: '请输入设备端口号', trigger: 'blur' },
{ {

View File

@ -2,7 +2,9 @@
<Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)" <Dialog ref="baseDialog" :title="t('bottomMenu.groundText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
:closeCallback="closeCallBack"> :closeCallback="closeCallBack">
<template #content> <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>
<template #footer> <template #footer>
<button @click="confirm">{{ t('btn.confirm') }}</button> <button @click="confirm">{{ t('btn.confirm') }}</button>
@ -94,7 +96,15 @@ const confirm = () => {
// "treeIndex": 0, // "treeIndex": 0,
params: options 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.params = JSON.stringify(params.params)
params.isShow = true params.isShow = true
cusAddNodes(window.treeObj, params.parentId, [params]) cusAddNodes(window.treeObj, params.parentId, [params])

View File

@ -2,7 +2,9 @@
<Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)" <Dialog ref="baseDialog" :title="t('bottomMenu.standText')" left="calc(50% - 198px)" top="calc(50% - 120px)"
:closeCallback="closeCallBack"> :closeCallback="closeCallBack">
<template #content> <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>
<template #footer> <template #footer>
<button @click="confirm">{{ t('btn.confirm') }}</button> <button @click="confirm">{{ t('btn.confirm') }}</button>
@ -89,7 +91,15 @@ const confirm = () => {
// "treeIndex": 0, // "treeIndex": 0,
params: options 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.params = JSON.stringify(params.params)
params.isShow = true params.isShow = true
cusAddNodes(window.treeObj, params.parentId, [params]) cusAddNodes(window.treeObj, params.parentId, [params])

View File

@ -14,7 +14,7 @@
<div class="col"> <div class="col">
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <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="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>

View File

@ -514,7 +514,7 @@ const y = ref()
const z = ref() const z = ref()
const coordinate = ref('EPSG:4326') const coordinate = ref('EPSG:4326')
const isHotGroupOpen: any = ref(true) const isHotGroupOpen: any = ref(true)
const isHotGroupOpen2: any = ref(false) const isHotGroupOpen2: any = ref(true)
const showPosiType: any = ref(false) const showPosiType: any = ref(false)
const heightMode = ref(0) const heightMode = ref(0)
const labelColorRef = ref(null) const labelColorRef = ref(null)
@ -786,6 +786,7 @@ const updateHeight = () => {
const translate = () => { const translate = () => {
that.openPositionEditing(() => { that.openPositionEditing(() => {
changAlt() changAlt()
projConvert()
}) })
} }
const confirm = () => { const confirm = () => {

View File

@ -8,8 +8,8 @@
<span class="label">名称</span> <span class="label">名称</span>
<input class="input" maxlength="40" type="text" v-model="entityOptions.name" /> <input class="input" maxlength="40" type="text" v-model="entityOptions.name" />
</div> </div>
<div class="col" style="flex: 0 0 56%"> <div class="col" style="flex: 0 0 60%">
<div> <div style="width: 100%">
<div class="row"> <div class="row">
<div class="col input-select-unit-box"> <div class="col input-select-unit-box">
<el-select v-model="wordsName" @change="changeWordsName"> <el-select v-model="wordsName" @change="changeWordsName">
@ -17,7 +17,7 @@
<el-option label="投影长度" :value="1"></el-option> <el-option label="投影长度" :value="1"></el-option>
<el-option label="地表长度" :value="2"></el-option> <el-option label="地表长度" :value="2"></el-option>
</el-select> </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-select v-model="lengthUnit">
<el-option label="米" value="m"></el-option> <el-option label="米" value="m"></el-option>
<el-option label="千米" value="km"></el-option> <el-option label="千米" value="km"></el-option>
@ -344,7 +344,7 @@ const open = async (id, type) => {
linePositions.value = structuredClone(that.options.positions) linePositions.value = structuredClone(that.options.positions)
that.lengthChangeCallBack = () => { that.lengthChangeCallBack = () => {
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }
@ -440,7 +440,7 @@ const nodeEdit = () => {
that.nodeEdit((positions, lenByMeter) => { that.nodeEdit((positions, lenByMeter) => {
entityOptions.value.options.positions = structuredClone(positions) entityOptions.value.options.positions = structuredClone(positions)
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = lenByMeter / 1000 length.value = lenByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = lenByMeter length.value = lenByMeter
} }
@ -450,7 +450,7 @@ const translate = () => {
that.openPositionEditing(() => { that.openPositionEditing(() => {
entityOptions.value.options.positions = structuredClone(that.options.positions) entityOptions.value.options.positions = structuredClone(that.options.positions)
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }
@ -518,7 +518,7 @@ watch(
(val) => { (val) => {
if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) { if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) {
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }

View File

@ -219,9 +219,12 @@ let observer: IntersectionObserver | null = null
const treeRef: any = ref('') const treeRef: any = ref('')
watch(modelName, (val) => { watch(modelName, (val) => {
if (treeRef.value && treeRef.value !== '') { // if (treeRef.value && treeRef.value !== '') {
treeRef.value!.filter(val) // treeRef.value!.filter(val)
} // }
categories.value = []
currModelList.value = []
getModelList()
}) })
watch(isShowPup, (val) => { watch(isShowPup, (val) => {
@ -390,7 +393,7 @@ const renderModel = async (model) => {
let GroundSvg = new YJ.Obj.GroundSvg(window.earth, option) let GroundSvg = new YJ.Obj.GroundSvg(window.earth, option)
GroundSvg.load(() => { GroundSvg.load(async() => {
GroundSvg.drag(true, null, (data) => { GroundSvg.drag(true, null, (data) => {
let params = data let params = data
delete params.attributeType delete params.attributeType
@ -420,7 +423,15 @@ const renderModel = async (model) => {
: selectedNode.parentId : selectedNode.parentId
: undefined : 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.isShow = true
DbOption.params = JSON.stringify(DbOption.params) DbOption.params = JSON.stringify(DbOption.params)
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption]) cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
@ -435,6 +446,7 @@ const renderModel = async (model) => {
const getModelListByType = (id) => { const getModelListByType = (id) => {
let formData = new FormData() let formData = new FormData()
formData.append('militaryTypeId', id) formData.append('militaryTypeId', id)
formData.append('name', modelName.value)
GraphApi.showModelByType(formData).then((res) => { GraphApi.showModelByType(formData).then((res) => {
categories.value = res.data categories.value = res.data
@ -445,7 +457,9 @@ const getModelListByType = (id) => {
} }
const getModelList = async () => { 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) { if (res.code == 0 || res.code == 200) {
let data = transformNestedJson(res.data, 'name', 'label') let data = transformNestedJson(res.data, 'name', 'label')
typeTreeData.value = data typeTreeData.value = data

View File

@ -4,9 +4,10 @@
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
<div class="row"> <div class="row">
<div class="col"> <div class="col" style="position: relative;">
<span class="label">名称</span> <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>
<div class="col"> <div class="col">
<span class="label">颜色</span> <span class="label">颜色</span>

View File

@ -315,6 +315,7 @@ watch(modelName, (val) => {
// treeRef.value!.filter(val) // treeRef.value!.filter(val)
// } // }
categories.value = [] categories.value = []
currModelList.value = []
getModelList() getModelList()
}) })
@ -548,7 +549,15 @@ const renderModel = async (data, model) => {
: selectedNode.parentId : selectedNode.parentId
: undefined : 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.isShow = true
DbOption.params = JSON.stringify(DbOption.params) DbOption.params = JSON.stringify(DbOption.params)
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption]) cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])

View File

@ -220,7 +220,7 @@
min="0" min="0"
max="99999" max="99999"
step="1" step="1"
@change="scaleChange" @input="scaleChange"
v-model="entityOptions.scaleX" v-model="entityOptions.scaleX"
/> />
<div <div
@ -233,8 +233,7 @@
title="" title=""
min="0" min="0"
max="360" max="360"
@input="$handleInputLimit" @input="scaleChange"
@change="scaleChange"
v-model="entityOptions.scaleX" v-model="entityOptions.scaleX"
/> />
<span class="unit"></span> <span class="unit"></span>
@ -350,8 +349,8 @@
style="width: 100px" style="width: 100px"
type="number" type="number"
title="" title=""
min="0" min="-99999"
max="360" max="999999"
@input="$handleInputLimit" @input="$handleInputLimit"
v-model="entityOptions.alt" v-model="entityOptions.alt"
/> />
@ -509,15 +508,11 @@
</template> </template>
<template #footer> <template #footer>
<div style="position: absolute; left: 24px; display: flex"> <div style="position: absolute; left: 24px; display: flex">
<button @click="nodeEdit"> <button v-if="!moveFlag" @click="translate">
<svg class="icon-edit">
<use xlink:href="#yj-icon-edit"></use></svg>二次编辑
</button>
<button style="margin-left: 10px" v-if="!moveFlag" @click="translate">
<svg class="icon-py"> <svg class="icon-py">
<use xlink:href="#yj-icon-py"></use></svg>平移 <use xlink:href="#yj-icon-py"></use></svg>平移
</button> </button>
<button style="margin-left: 10px" v-if="moveFlag" @click="translate"> <button v-if="moveFlag" @click="translate">
<svg class="icon-py"> <svg class="icon-py">
<use xlink:href="#yj-icon-py"></use></svg>结束平移 <use xlink:href="#yj-icon-py"></use></svg>结束平移
</button> </button>
@ -530,7 +525,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, getCurrentInstance } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { TreeApi } from '@/api/tree' import { TreeApi } from '@/api/tree'
@ -540,6 +535,8 @@ import labelStyle from './labelStyle.vue'
import { useTreeNode } from '@/views/components/tree/hooks/treeNode' import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
import { getFontList } from './fontSelect' import { getFontList } from './fontSelect'
const { proxy } = getCurrentInstance()!
const { t } = useI18n() const { t } = useI18n()
const { cusUpdateNode, cusRemoveNode } = useTreeNode() const { cusUpdateNode, cusRemoveNode } = useTreeNode()
@ -573,7 +570,8 @@ const entityOptions: any = ref({})
let originalOptions: any let originalOptions: any
let that: any let that: any
const scaleChange = () => { const scaleChange = (e) => {
proxy?.$handleInputLimit(e)
entityOptions.value.scaleY = entityOptions.value.scaleX entityOptions.value.scaleY = entityOptions.value.scaleX
entityOptions.value.scaleZ = entityOptions.value.scaleX entityOptions.value.scaleZ = entityOptions.value.scaleX
} }
@ -726,12 +724,6 @@ const closeCallback = () => {
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }
const nodeEdit = () => {
that.nodeEdit((e, positions, areaByMeter) => {
entityOptions.value.options.positions = structuredClone(positions)
})
}
const confirm = () => { const confirm = () => {
entityOptions.value.name = entityOptions.value.name || t("default.untitled") entityOptions.value.name = entityOptions.value.name || t("default.untitled")
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)

View File

@ -98,7 +98,19 @@ var addForm: any = ref({
}) })
const peopleRules: any = reactive({ 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') var type: any = ref('point')

View File

@ -265,7 +265,7 @@ const translate = () => {
} }
else { else {
that.openPositionEditing(() => { 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) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
that.reset() 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") eventBus?.emit("destroyComponent")
} }

View File

@ -14,7 +14,7 @@
<div class="col"> <div class="col">
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <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="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>
@ -314,8 +314,9 @@ const closeCallback = () => {
const nodeEdit = () => { const nodeEdit = () => {
that.nodeEdit((e, positions, areaByMeter) => { that.nodeEdit((e, positions, areaByMeter) => {
console.log('positions', positions) if(positions) {
entityOptions.value.options.positions = structuredClone(positions) entityOptions.value.options.positions = structuredClone(positions)
}
}) })
} }

View File

@ -14,7 +14,7 @@
<div class="col"> <div class="col">
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <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="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>

View File

@ -8,8 +8,8 @@
<span class="label">名称</span> <span class="label">名称</span>
<input class="input" maxlength="40" type="text" v-model="entityOptions.name" /> <input class="input" maxlength="40" type="text" v-model="entityOptions.name" />
</div> </div>
<div class="col" style="flex: 0 0 56%"> <div class="col" style="flex: 0 0 60%">
<div> <div style="width: 100%">
<div class="row"> <div class="row">
<div class="col input-select-unit-box"> <div class="col input-select-unit-box">
<el-select v-model="wordsName" @change="changeWordsName"> <el-select v-model="wordsName" @change="changeWordsName">
@ -17,7 +17,7 @@
<el-option label="投影长度" :value="1"></el-option> <el-option label="投影长度" :value="1"></el-option>
<el-option label="地表长度" :value="2"></el-option> <el-option label="地表长度" :value="2"></el-option>
</el-select> </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-select v-model="lengthUnit">
<el-option label="米" value="m"></el-option> <el-option label="米" value="m"></el-option>
<el-option label="千米" value="km"></el-option> <el-option label="千米" value="km"></el-option>
@ -75,8 +75,8 @@
<div class="col" style="flex: 0 0 33%"> <div class="col" style="flex: 0 0 33%">
<span class="label">缓冲宽度</span> <span class="label">缓冲宽度</span>
<div class="input-number input-number-unit-1" style="width: 80px"> <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" <input class="input" type="number" title="" min="0" data-min="0.01" max="999999"
v-model="entityOptions.extendWidth" /> @input="$handleInputLimit" v-model="entityOptions.extendWidth" />
<span class="unit">m</span> <span class="unit">m</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -352,7 +352,7 @@ const open = async (id: any, type) => {
linePositions.value = structuredClone(that.options.positions) linePositions.value = structuredClone(that.options.positions)
that.lengthChangeCallBack = () => { that.lengthChangeCallBack = () => {
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }
@ -448,7 +448,7 @@ const nodeEdit = () => {
that.nodeEdit((positions, lenByMeter) => { that.nodeEdit((positions, lenByMeter) => {
entityOptions.value.options.positions = structuredClone(positions) entityOptions.value.options.positions = structuredClone(positions)
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = lenByMeter / 1000 length.value = lenByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = lenByMeter length.value = lenByMeter
} }
@ -458,7 +458,7 @@ const translate = () => {
that.openPositionEditing(() => { that.openPositionEditing(() => {
entityOptions.value.options.positions = structuredClone(that.options.positions) entityOptions.value.options.positions = structuredClone(that.options.positions)
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }
@ -526,7 +526,7 @@ watch(
(val) => { (val) => {
if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) { if (entityOptions.value.lengthByMeter || entityOptions.value.lengthByMeter == 0) {
if (lengthUnit.value == 'km') { if (lengthUnit.value == 'km') {
length.value = entityOptions.value.lengthByMeter / 1000 length.value = entityOptions.value.lengthByMeter * 100000 / (100000 * 1000)
} else { } else {
length.value = entityOptions.value.lengthByMeter length.value = entityOptions.value.lengthByMeter
} }

View File

@ -5,9 +5,10 @@
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
<div class="row"> <div class="row">
<div class="col"> <div class="col" style="position: relative;">
<span class="label">名称</span> <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>
<div class="col"> <div class="col">
<span class="label">颜色</span> <span class="label">颜色</span>

View File

@ -90,9 +90,10 @@
</div> </div>
<div class="col"> <div class="col">
<span class="label">模型方向</span> <span class="label">模型方向</span>
<button class="btn model-rotate-btn" style="margin-right: 12px;" @click="modelRotate">开始调整</button> <button class="btn model-rotate-btn" style="margin-right: 12px;" @click="modelRotate">
<el-tooltip content="场景正东方向为轨迹前进正方向" effect="customized" placement="top" {{ modelRotateState ? '结束调整' : '开始调整' }}
:hide-after="0"> </button>
<el-tooltip content="场景正东方向为轨迹前进正方向" effect="customized" placement="top" :hide-after="0">
<svg class="icon-rubric"> <svg class="icon-rubric">
<use xlink:href="#yj-icon-rubric"></use> <use xlink:href="#yj-icon-rubric"></use>
</svg> </svg>
@ -160,15 +161,11 @@
<div class="col" style="margin: 0px;"> <div class="col" style="margin: 0px;">
<span class="label">模型动画</span> <span class="label">模型动画</span>
<div class="input input-select model-animate-select"></div> <div class="input input-select model-animate-select"></div>
<el-select class="model-animate-select" v-model="entityOptions.modelAnimate" <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="无" value="无"></el-option>
<el-option label="无"></el-option> <el-option v-for="item in animationsList" :label="item.name"
<el-option v-for="item in entityOptions.model.loader.components.animations" :label="item.name"
:value="item.name"></el-option> :value="item.name"></el-option>
</el-select> </el-select>
<el-select class="model-animate-select" v-model="entityOptions.modelAnimate" v-else>
<el-option label="无"></el-option>
</el-select>
</div> </div>
</div> </div>
</div> </div>
@ -257,6 +254,8 @@ const text = ref('')
const activeName = ref('1') const activeName = ref('1')
const fontList = ref(getFontList()) const fontList = ref(getFontList())
const labelColorRef = ref(null) const labelColorRef = ref(null)
const animationsList:any = ref([])
const modelRotateState = ref(false)
eventBus.on('openStandTextAdd', () => { eventBus.on('openStandTextAdd', () => {
baseDialog.value?.open() baseDialog.value?.open()
}) })
@ -273,6 +272,22 @@ const open = async (id: any) => {
that = window.earth.entityMap.get(id) that = window.earth.entityMap.get(id)
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
entityOptions.value = that 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() baseDialog.value?.open()
await nextTick() await nextTick()
let labelColorPicker = new (window as any).YJColorPicker({ let labelColorPicker = new (window as any).YJColorPicker({
@ -341,17 +356,58 @@ const remove = () => {
}) })
} }
const clickChangeModel = () => { const clickChangeModel = () => {
eventBus.emit('openModel', true, (url) => { eventBus.emit('openModel', true, async (url) => {
that.changeModelUrl(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') }, 'trajectoryMotion')
} }
const getAnimationsList = () => {
entityOptions.value.modelAnimate = entityOptions.value.modelAnimate
animationsList.value = entityOptions.value.model.loader.components.animations
}
const modelRotate = () => { const modelRotate = () => {
that.modelRotate() entityOptions.value.viewFollow = false
entityOptions.value.state = false
modelRotateState.value = that.modelRotate()
} }
const movementRotate = () => { const movementRotate = () => {
that.reverse = !that.reverse that.reverse = !that.reverse
} }
const changeFirstPersonView = (state) => { const changeFirstPersonView = (state) => {
if (state && YJ.Global.multiViewportMode.get2DView()) {
ElMessage.closeAll()
ElMessage({
message: '请先关闭二三维模式!',
type: 'warning'
})
return
}
entityOptions.value.firstPersonView = state entityOptions.value.firstPersonView = state
} }

View File

@ -152,25 +152,25 @@ const material = ref([
name: '纯色墙', name: '纯色墙',
value: '纯色墙', value: '纯色墙',
key: 0, key: 0,
icon: '../sdk/custom/img/icon-wall.png' icon: './sdk/custom/img/icon-wall.png'
}, },
{ {
name: '红砖墙', name: '红砖墙',
value: '红砖墙', value: '红砖墙',
key: 1, key: 1,
icon: '../sdk/img/material/brick1.png' icon: './sdk/img/material/brick1.jpg'
}, },
{ {
name: '黄砖墙', name: '黄砖墙',
value: '黄砖墙', value: '黄砖墙',
key: 2, key: 2,
icon: '../sdk/img/material/brick2.png' icon: './sdk/img/material/brick2.jpg'
}, },
{ {
name: '灰瓷墙', name: '灰瓷墙',
value: '灰瓷墙', value: '灰瓷墙',
key: 3, key: 3,
icon: '../sdk/img/material/brick3.png' icon: './sdk/img/material/brick3.jpg'
} }
]) ])
eventBus.on("openStandTextAdd", () => { eventBus.on("openStandTextAdd", () => {

View File

@ -31,14 +31,14 @@
<span class="label">材质样式</span> <span class="label">材质样式</span>
<el-select class="input input-select input-select-line-type" v-model="entityOptions.material"> <el-select class="input input-select input-select-line-type" v-model="entityOptions.material">
<template #label="{ label, value }"> <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%;`"> :style="`background: url(${material[value].icon}) 100% 100% no-repeat;background-size: 100% 100%;`">
</i> </i>
{{ label }} {{ label }}
</template> </template>
<el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key"> <el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key">
<div style="display: flex; align-items: center;"> <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%;`" :style="`background: url(${item.icon}) 100% 100% no-repeat;background-size: 100% 100%;`"
></i> ></i>
{{ item.name }} {{ item.name }}
@ -105,25 +105,25 @@ const material = ref([
name: '纯色墙', name: '纯色墙',
value: '纯色墙', value: '纯色墙',
key: 0, key: 0,
icon: '../sdk/custom/img/icon-wall.png', icon: './sdk/custom/img/icon-wall.png',
}, },
{ {
name: '上升墙', name: '上升墙',
value: '上升墙', value: '上升墙',
key: 1, key: 1,
icon: '../sdk/custom/img/icon-wall-gradient.png' icon: './sdk/custom/img/icon-wall-gradient.png'
}, },
{ {
name: '箭头墙', name: '箭头墙',
value: '箭头墙', value: '箭头墙',
key: 2, key: 2,
icon: '../sdk/img/material/arrow.png' icon: './sdk/img/material/arrow.png'
}, },
{ {
name: '警戒墙', name: '警戒墙',
value: '警戒墙', value: '警戒墙',
key: 3, key: 3,
icon: '../sdk/img/material/warn.png' icon: './sdk/img/material/warn.png'
} }
]) ])
eventBus.on("openStandTextAdd", () => { eventBus.on("openStandTextAdd", () => {

View File

@ -91,7 +91,10 @@ export const useRightOperate = () => {
show: true, show: true,
}, },
} }
TreeApi.addOtherSource(params) let res = await TreeApi.addOtherSource(params)
if(![0, 200].includes(res.code)) {
return
}
params.isShow = true params.isShow = true
params.params = JSON.stringify(params.params) params.params = JSON.stringify(params.params)
cusAddNodes(window.treeObj, params.parentId, [params]) cusAddNodes(window.treeObj, params.parentId, [params])
@ -99,22 +102,40 @@ export const useRightOperate = () => {
entityObject.flyTo(); entityObject.flyTo();
(window as any)._entityMap.set(id, entityObject) (window as any)._entityMap.set(id, entityObject)
} else if (["geojson"].includes(sourceType)) { } else if (["geojson"].includes(sourceType)) {
let baseURL = localStorage.getItem('ip') let params: any = {
await addMapSource({
type: 'geojson',
id: id, id: id,
sourceName: name, sourceName: name,
opt: { sourceType: sourceType,
host: baseURL, parentId: parentId,
params: {
id: id, id: id,
url: filePaths[i], url: filePaths[i],
show: true, color: 'rgb(239, 6, 6, 1)',
name: name,
width: 1, 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() entity?.flyTo()
}) })
} else { } else {
// 获取最后一个点的位置 // 获取最后一个点的位置
const lastDotIndex = filePaths[i].lastIndexOf('.'); const lastDotIndex = filePaths[i].lastIndexOf('.');

View File

@ -1,3 +1,5 @@
import {MaterialApi} from '@/api/material'
let index = 0; let index = 0;
let option = { let option = {
width: 1300, width: 1300,
@ -22,7 +24,7 @@ let option = {
}, },
} }
function leftClick(options) { async function leftClick(options) {
const {ipcRenderer} = require('electron') const {ipcRenderer} = require('electron')
console.log('leftClick', options) console.log('leftClick', options)
let id = options.id; let id = options.id;
@ -69,6 +71,7 @@ function leftClick(options) {
source_path: node.sourcePath, source_path: node.sourcePath,
env: localStorage.getItem("service"), env: localStorage.getItem("service"),
}; };
info.goods = await goodsSelect(info.goods)
// // 0828 // // 0828
// info.ISC && // info.ISC &&
// info.ISC.forEach((item) => { // 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}; export {leftClick, rightClick};

View File

@ -81,6 +81,9 @@ export const useTree = () => {
const onDblClick = (event: MouseEvent, treeId: string, treeNode: any) => { const onDblClick = (event: MouseEvent, treeId: string, treeNode: any) => {
let entityObject let entityObject
if(!treeNode) {
return
}
if (treeNode.sourceType == 'Feature') { if (treeNode.sourceType == 'Feature') {
const getEntityObject = (n) => { const getEntityObject = (n) => {
if (n) { if (n) {
@ -312,6 +315,11 @@ export const useTree = () => {
let ids = [...p_ids] let ids = [...p_ids]
if (parentNode && parentNode.sourceType === 'tileset') {
sourceStatus(parentNode)
}
// 更新节点状态修改地图资源状态 // 更新节点状态修改地图资源状态
function sourceStatus(node) { function sourceStatus(node) {
ids.push({id: node.id, isShow: node.isShow ? 1 : 0}) ids.push({id: node.id, isShow: node.isShow ? 1 : 0})

View File

@ -372,8 +372,7 @@ var key =
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) || (localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
'd88fcc689d1aa99866b2d0d83fd36677' 'd88fcc689d1aa99866b2d0d83fd36677'
var isOnline = false var isOnline = false
var loadAmp = (cb = () => { var loadAmp = (cb = () => {}) => {
}) => {
AMapLoader.reset() AMapLoader.reset()
AMapLoader.load({ AMapLoader.load({
key: key, // 申请好的Web端开发者Key首次调用 load 时必填 key: key, // 申请好的Web端开发者Key首次调用 load 时必填
@ -841,4 +840,9 @@ defineExpose({
.el-select-dropdown__loading { .el-select-dropdown__loading {
margin-top: -150px !important; 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> </style>

View File

@ -136,6 +136,7 @@ import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style'
import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style' import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style'
import { setEventBus } from './eventBus' import { setEventBus } from './eventBus'
import router from '@renderer/router'
const { rightMenus } = useRightOperate() const { rightMenus } = useRightOperate()
const firstMenuRef = ref(null) const firstMenuRef = ref(null)
@ -150,7 +151,6 @@ let editdirectoryBox = ref()
setEventBus(eventBus) setEventBus(eventBus)
// 标注标绘默认样式 // 标注标绘默认样式
if (!localStorage.getItem('defaultStyle')) { if (!localStorage.getItem('defaultStyle')) {
let defaultStyle = getdefaultStyle(null) let defaultStyle = getdefaultStyle(null)
@ -160,6 +160,8 @@ if (!localStorage.getItem('defaultLabelStyle')) {
let defaultLabelStyle = getdefaultLabelStyle(null) let defaultLabelStyle = getdefaultLabelStyle(null)
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle)) localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
} }
//移除天气设置
localStorage.removeItem('weartherSetting')
eventBus.on('openDialog', async (sourceType: any, id: any) => { eventBus.on('openDialog', async (sourceType: any, id: any) => {
if (dynamicComponentRef.value && dynamicComponentRef.value.close) { if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
@ -474,7 +476,7 @@ eventBus.on('destroyComponent', (id) => {
} }
}) })
utilsSysChange(eventBus) utilsSysChange(eventBus, true)
const createEarth = async () => { const createEarth = async () => {
window.earth = await new YJ.YJEarth('earthContainer') window.earth = await new YJ.YJEarth('earthContainer')
@ -552,7 +554,10 @@ const uploadFile = (event) => {
} }
const getAuthInfo = async () => { const getAuthInfo = async () => {
const res = await AuthApi.showAuth() 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 let time = res.data.expireTime
getStatus(time) getStatus(time)
} }

View File

@ -1,13 +1,7 @@
<template> <template>
<div <div class="login-container" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0">
class="login-container" <transition name="video-fade" mode="out-in"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover">
>
<transition
name="video-fade"
mode="out-in"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
>
<!-- 第一个视频播放一次 --> <!-- 第一个视频播放一次 -->
<!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded" <!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded"
src="../../assets/video/login_front.mp4" src="../../assets/video/login_front.mp4"
@ -15,43 +9,88 @@
<!-- 第二个视频循环播放 --> <!-- 第二个视频循环播放 -->
<!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4" <!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> --> style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> -->
<video <video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
key="second-video" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video>
autoplay
loop
muted
src="../../assets/video/author_video.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
></video>
</transition> </transition>
<!-- 登录页面 --> <!-- 登录页面 -->
<div class="rightBox" v-if="isDesktop"> <div class="rightBox" v-if="isDesktop">
<el-button class="settings" size="small" @click="serviceDialog = true"> <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> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42"
</el-button> height="40.67999267578125" viewBox="0 0 42 40.67999267578125" fill="none">
<el-button class="exit" size="small" @click="goExit"> <g>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40" height="40" <path
viewBox="-8 -8 40 40" fill="none"> 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"
<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" /> fill="#FFFFFF" />
</g> </g>
<defs> <defs>
<filter id="filter_2442_480" x="-10" y="-10" width="52.000244" height="53.800659" <filter id="filter_2442_1327" x="0" y="0" width="42" height="40.67999267578125" filterUnits="userSpaceOnUse"
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="feFloodId_2442_480" /> <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" <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" /> <feOffset dx="0" dy="0" />
<feGaussianBlur stdDeviation="4.5" /> <feGaussianBlur stdDeviation="4.5" />
<feComposite in2="hardAlpha_2442_480" operator="out" /> <feComposite in2="hardAlpha_2442_480" operator="out" />
<feColorMatrix type="matrix" <feColorMatrix
values="0 0 0 0 0.0784313725490196 0 0 0 0 0.4627450980392157 0 0 0 0 1 0 0 0 1 0" /> 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" 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> </filter>
</defs> </defs>
</svg> </svg>
@ -67,95 +106,45 @@
</div> </div>
</div> </div>
</div> </div>
<el-form <el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginFormRef"
class="login-form" label-position="left">
autoComplete="on"
:model="loginForm"
:rules="loginRules"
ref="loginFormRef"
label-position="left"
>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="请输入用户名"
name="username" :prefix-icon="User" />
type="text"
v-model="loginForm.username"
autoComplete="on"
placeholder="请输入用户名"
:prefix-icon="User"
/>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input type="password" @keyup.enter.native="handleLogin(loginFormRef)" v-model="loginForm.password"
type="password" autoComplete="on" placeholder="请输入密码" :prefix-icon="Unlock" show-password></el-input>
@keyup.enter.native="handleLogin(loginFormRef)"
v-model="loginForm.password"
autoComplete="on"
placeholder="请输入密码"
:prefix-icon="Unlock"
show-password
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="rememberForget"> <el-form-item class="rememberForget">
<!-- justify-content: space-around;align-items: center; --> <!-- justify-content: space-around;align-items: center; -->
<div style="display: flex"> <div style="display: flex">
<svg <svg class="checkbox-svg" v-show="checkboxVModel" style="pointer-events: none"
class="checkbox-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
v-show="checkboxVModel" viewBox="0 0 14 14" fill="none">
style="pointer-events: none" <path fill="rgba(var(--color-base1), 1)"
xmlns="http://www.w3.org/2000/svg" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z">
xmlns:xlink="http://www.w3.org/1999/xlink" </path>
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill="rgba(var(--color-base1), 1)"
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"
></path>
<path <path
d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z"
fill="#004242" fill="#004242"></path>
></path>
</svg> </svg>
<svg <svg class="checkbox-svg" v-show="!checkboxVModel" style="pointer-events: none"
class="checkbox-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"
v-show="!checkboxVModel" viewBox="0 0 14 14" fill="none">
style="pointer-events: none" <path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)"
xmlns="http://www.w3.org/2000/svg" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z">
xmlns:xlink="http://www.w3.org/1999/xlink" </path>
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill-rule="evenodd"
fill="url(#linear_border_2442_533_0)"
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"
></path>
<defs> <defs>
<linearGradient <linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125"
id="linear_border_2442_533_0" y2="12.878036499023438" gradientUnits="userSpaceOnUse">
x1="0"
y1="-0.5574798583984375"
x2="12.1173095703125"
y2="12.878036499023438"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /> <stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
<stop offset="1" stop-color="var(--color-border1)" /> <stop offset="1" stop-color="var(--color-border1)" />
</linearGradient> </linearGradient>
</defs> </defs>
</svg> </svg>
<el-checkbox <el-checkbox :disabled="loading" v-model="checkboxVModel" @change="rememberpwd"
:disabled="loading" label="string">记住密码</el-checkbox>
v-model="checkboxVModel"
@change="rememberpwd"
label="string"
>记住密码</el-checkbox
>
<!-- <div style="cursor: pointer;">忘记密码</div> --> <!-- <div style="cursor: pointer;">忘记密码</div> -->
</div> </div>
</el-form-item> </el-form-item>
@ -178,24 +167,15 @@
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2> <h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
<div class="serviceContent"> <div class="serviceContent">
<el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect"> <el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect">
<el-tab-pane <el-tab-pane v-for="item in serviceOptions" :label="item.name" :name="item.name"></el-tab-pane>
v-for="item in serviceOptions"
:label="item.name"
:name="item.name"
></el-tab-pane>
</el-tabs> </el-tabs>
<div class="tabPanel"> <div class="tabPanel">
<template v-if="selectedService == '接口服务'"> <template v-if="selectedService == '接口服务'">
<div class="item"> <div class="item">
<span class="itemLabel">服务选择</span> <span class="itemLabel">服务选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="servVal"> <el-select class="select" popper-class="login-select-popper" v-model="servVal">
<el-option <el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
size="mini" :value="item.name">
v-for="item in servOptions"
:key="item.value"
:label="item.name"
:value="item.name"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -209,36 +189,38 @@
</template> </template>
<template v-if="servVal == '网络'"> <template v-if="servVal == '网络'">
<span class="itemLabel">IP</span> <span class="itemLabel">IP</span>
<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-input v-model="ip"></el-input>
</el-form-item>
</template> </template>
</div> </div>
<div class="item port"> <div class="item port">
<template v-if="servVal == '单机'"> <template v-if="servVal == '单机'">
<span class="itemLabel">端口</span> <span class="itemLabel">端口</span>
<el-form-item <el-form-item ref="localportFormItem" prop="localport" :rules="[
prop="localport"
:rules="[
{ {
validator: validateLocalportRange, validator: validateLocalportRange,
trigger: 'blur' trigger: 'blur'
} }
]" ]">
>
<el-input-number v-model="localport" :controls="false" /> <el-input-number v-model="localport" :controls="false" />
</el-form-item> </el-form-item>
</template> </template>
<template v-if="servVal == '网络'"> <template v-if="servVal == '网络'">
<span class="itemLabel">端口</span> <span class="itemLabel">端口</span>
<el-form-item <el-form-item ref="portFormItem" prop="port" :rules="[
prop="port"
:rules="[
{ {
validator: validatePortRange, validator: validatePortRange,
message: '端口号必须在 102465535 之间', message: '端口号必须在 102465535 之间',
trigger: 'blur' trigger: 'blur'
} }
]" ]">
>
<el-input-number v-model="port" :controls="false" /> <el-input-number v-model="port" :controls="false" />
</el-form-item> </el-form-item>
</template> </template>
@ -248,13 +230,8 @@
<div class="item"> <div class="item">
<span class="itemLabel">串口选择</span> <span class="itemLabel">串口选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="gpsVal"> <el-select class="select" popper-class="login-select-popper" v-model="gpsVal">
<el-option <el-option size="mini" v-for="item in gpsOptions" :key="item.value" :label="item.Product"
size="mini" :value="item.Name">
v-for="item in gpsOptions"
:key="item.value"
:label="item.Product"
:value="item.Name"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -263,20 +240,14 @@
</div> </div>
<div class="btn"> <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> <el-button size="mini" @click="cancel">关闭</el-button>
</div> </div>
</div> </div>
</div> </div>
<!-- 授权页面 --> <!-- 授权页面 -->
<Dialog <Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack" left="calc(50vw - 188px)"
ref="baseDialog" top="calc(50vh - 191px)">
class="graffiti"
title="系统授权"
:closeCallback="closeCallBack"
left="calc(50vw - 188px)"
top="calc(50vh - 191px)"
>
<template #content> <template #content>
<div class="auth_info custom_scroll_bar content_h"> <div class="auth_info custom_scroll_bar content_h">
<div class="auth_info_box"> <div class="auth_info_box">
@ -285,19 +256,10 @@
{{ t('auths.authCode') }} {{ t('auths.authCode') }}
</div> </div>
<div class="auth_info_text"> <div class="auth_info_text">
<span <span @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">{{ authInfo.license_code
@click="copy(authInfo.license_code)" || '' }}</span>
style="cursor: pointer" <svg-icon name="copy" :size="20" @click="copy(authInfo.license_code)" title="点击可复制"
title="点击可复制" style="margin-left: 30px; cursor: pointer"></svg-icon>
>{{ authInfo.license_code || '' }}</span
>
<svg-icon
name="copy"
:size="20"
@click="copy(authInfo.license_code)"
title="点击可复制"
style="margin-left: 30px; cursor: pointer"
></svg-icon>
</div> </div>
</div> </div>
<div class="auth_info_box"> <div class="auth_info_box">
@ -318,22 +280,13 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authType') }} {{ t('auths.authType') }}
</div> </div>
<div <div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px" :style="{
v-if="authInfo.status != null"
class="auth_info_text"
style="font-size: 16px"
:style="{
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
}" }">
>
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }} {{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
</div> </div>
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> --> <!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
<div <div v-else class="auth_info_text" style="font-size: 16px; color: rgba(241, 108, 85, 1)">
v-else
class="auth_info_text"
style="font-size: 16px; color: rgba(241, 108, 85, 1)"
>
{{ t('auths.noAuthexpire') }} {{ t('auths.noAuthexpire') }}
</div> </div>
</div> </div>
@ -341,7 +294,14 @@
</div> </div>
</template> </template>
<template #footer> <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> <button @click="close">退出系统</button>
</template> </template>
</Dialog> </Dialog>
@ -360,7 +320,7 @@ import { ipcMain } from 'electron'
import { AuthApi } from '@/api/setting/auth' import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication' import { $sendElectronChanel, $recvElectronChanel } from '@/utils/communication'
const { const {
loginFormRef, loginFormRef,
@ -379,6 +339,11 @@ const {
isDesktop isDesktop
} = useLogin() // 登录逻辑 } = useLogin() // 登录逻辑
const ipFormItem = ref(null)
const localportFormItem = ref(null)
const portFormItem = ref(null)
const { const {
serviceDialog, serviceDialog,
servVal, servVal,
@ -397,6 +362,39 @@ const {
initialize initialize
} = useSetUp() // 服务设置逻辑 } = 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) => { const handleSelect = (tab) => {
selectedService.value = tab.props.name selectedService.value = tab.props.name
} }
@ -443,7 +441,6 @@ const router = useRouter()
const getAuthInfo = async () => { const getAuthInfo = async () => {
try { try {
const res = await AuthApi.showAuth() const res = await AuthApi.showAuth()
console.log(res, 'resresres')
if (typeof res.data === 'object') { if (typeof res.data === 'object') {
authInfo.value.generateTime = res.data.generateTime authInfo.value.generateTime = res.data.generateTime
authInfo.value.expireTime = res.data.expireTime authInfo.value.expireTime = res.data.expireTime
@ -504,9 +501,9 @@ const getStatus = (date) => {
//授权页面 //授权页面
// const closeCallBack = (e) => { const closeCallBack = (e) => {
// baseDialog.value?.close() baseDialog.value?.close()
// } }
const close = (e) => { const close = (e) => {
ElMessageBox.confirm('确定要退出系统吗?', '提示', { ElMessageBox.confirm('确定要退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -569,6 +566,25 @@ const getAuthCode = async () => {
const res = await AuthApi.authInfo() const res = await AuthApi.authInfo()
authInfo.value.license_code = res.data authInfo.value.license_code = res.data
} }
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(() => { // setTimeout(() => {
// getAuthCode() // getAuthCode()
// }, 8000) // }, 8000)
@ -605,6 +621,24 @@ const validatePortRange = (rule, value, callback) => {
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> </script>
<style lang="scss"> <style lang="scss">
// 添加过渡样式 // 添加过渡样式
@ -818,9 +852,11 @@ const validatePortRange = (rule, value, callback) => {
.settings:hover svg g { .settings:hover svg g {
filter: url(#filter_2442_1327); filter: url(#filter_2442_1327);
} }
.exit:hover svg { .exit:hover svg {
g { g {
filter: url(#filter_2442_480); filter: url(#filter_2442_480);
path { path {
fill: rgba(241, 108, 85, 1) !important; fill: rgba(241, 108, 85, 1) !important;
} }
@ -838,204 +874,6 @@ const validatePortRange = (rule, value, callback) => {
padding: 22px 11px; 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; z-index: 99;
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6); background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
border: 1.5px solid; border: 1.5px solid;
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
1;
text-align: left; text-align: left;
font-family: 'sy-boldface'; font-family: 'sy-boldface';
} }
@ -1187,11 +1024,9 @@ const validatePortRange = (rule, value, callback) => {
::v-deep .el-message-box { ::v-deep .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: linear-gradient( background: linear-gradient(180deg,
180deg,
rgba(var(--color-base1), 0) 0%, 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; rgba(0, 0, 0, 0.6) !important;
} }
@ -1206,7 +1041,7 @@ const validatePortRange = (rule, value, callback) => {
padding: 0 40px 40px 40px; padding: 0 40px 40px 40px;
background-color: #ffffff; background-color: #ffffff;
backdrop-filter: blur(2px); backdrop-filter: blur(2px);
width: 450px; width: 465px;
position: absolute; position: absolute;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
left: 50%; left: 50%;
@ -1227,7 +1062,7 @@ const validatePortRange = (rule, value, callback) => {
.greet { .greet {
color: rgba(0, 66, 66, 1); color: rgba(0, 66, 66, 1);
font-family: 'SourceHanSans'; font-family: 'SourceHanSansTi';
font-size: 18px; font-size: 18px;
line-height: 18px; line-height: 18px;
font-weight: 500; font-weight: 500;
@ -1353,9 +1188,26 @@ const validatePortRange = (rule, value, callback) => {
.item { .item {
display: flex; display: flex;
align-items: center; 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-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: linear-gradient( background: linear-gradient(180deg,
180deg,
rgba(var(--color-base1), 0) 0%, 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; rgba(0, 0, 0, 0.6) !important;
.el-message-box__headerbtn { .el-message-box__headerbtn {

View File

@ -31,8 +31,14 @@ export const useSetUp = () => {
ip.value = ipPort[0] ip.value = ipPort[0]
port.value = Number(ipPort[1]) port.value = Number(ipPort[1])
prototype.value = parsedUrl.protocol.slice(0, -1) prototype.value = parsedUrl.protocol.slice(0, -1)
localip.value = '127.0.0.1'
localport.value = 8848
} }
else { else {
servVal.value = '单机'
ip.value = '192.168.1.1'
port.value = 8890
prototype.value = 'http'
localip.value = ipPort[0] localip.value = ipPort[0]
localport.value = Number(ipPort[1]) localport.value = Number(ipPort[1])
} }
@ -47,17 +53,22 @@ export const useSetUp = () => {
case '接口服务': case '接口服务':
// this.submitIP(); // this.submitIP();
if (serverMode === 'false') { if (serverMode === 'false') {
console.log(Number(port.value))
if (Number(port.value) < 1024 || Number(port.value) > 65535) { if (Number(port.value) < 1024 || Number(port.value) > 65535) {
console.log(11111111)
// ElMessage.error('端口号范围为1024-65535') // ElMessage.error('端口号范围为1024-65535')
return return
} }
} }
else { else {
console.log(Number(localport.value))
if (Number(localport.value) < 1024 || Number(localport.value) > 65535) { if (Number(localport.value) < 1024 || Number(localport.value) > 65535) {
console.log(222222)
// ElMessage.error('端口号范围为1024-65535') // ElMessage.error('端口号范围为1024-65535')
return return
} }
} }
console.log(serverMode, localport.value, port.value)
submitIP() submitIP()
break break
case '北斗串口': case '北斗串口':
@ -65,6 +76,7 @@ export const useSetUp = () => {
break break
} }
selectedService.value = '接口服务' selectedService.value = '接口服务'
reset()
} }
const cancel = () => { const cancel = () => {
serviceDialog.value = false serviceDialog.value = false
@ -85,7 +97,7 @@ export const useSetUp = () => {
setIP(url) setIP(url)
serviceDialog.value = false serviceDialog.value = false
} else { } else {
ElMessage.error('url不合法') // ElMessage.error('url不合法')
} }
} else { } else {
//单机走这里 //单机走这里
@ -124,6 +136,14 @@ export const useSetUp = () => {
} }
} }
watch(servVal, (newVal, oldVal) => {
if(newVal === '网络') {
serverMode = 'false'
}
else {
serverMode = 'true'
}
});
return { return {
serviceDialog, serviceDialog,
servVal, servVal,