bug修改
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
src/renderer/public/sdk/YJEarth.min.js
vendored
6
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -297,11 +297,6 @@
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .row .input-select-unit-box,
|
||||
.YJ-custom-base-dialog>.content .row .input-select-fit-unit-box {
|
||||
flex: 0 0 270px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -424,7 +419,8 @@
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-link .link_add_btn,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .vr_add_btn {
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .vr_add_btn,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-rtmp .rtmp_add_btn {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
@ -436,12 +432,14 @@
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-link .link_add,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .vr_add {
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .vr_add,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-rtmp .rtmp_add {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-link .tr .td:last-child button:first-child,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .tr .td:last-child button:first-child {
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-vr .tr .td:last-child button:first-child,
|
||||
.YJ-custom-base-dialog>.content .attribute .attribute-content-rtmp .tr .td:last-child button:first-child {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@ -513,7 +511,6 @@
|
||||
overflow-y: auto;
|
||||
scrollbar-gutter: stable;
|
||||
width: calc(100% + 1px);
|
||||
height: 194px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .table .align-center,
|
||||
@ -532,7 +529,8 @@
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .attribute-content-link .table .table-body,
|
||||
.YJ-custom-base-dialog>.content .attribute-content-vr .table .table-body {
|
||||
.YJ-custom-base-dialog>.content .attribute-content-vr .table .table-body,
|
||||
.YJ-custom-base-dialog>.content .attribute-content-rtmp .table .table-body {
|
||||
max-height: 172px;
|
||||
}
|
||||
|
||||
@ -2515,7 +2513,9 @@
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-link .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3) {
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||
flex: 0 0 165px;
|
||||
width: 165px;
|
||||
justify-content: center;
|
||||
@ -2597,7 +2597,9 @@
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-link .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3) {
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||
flex: 0 0 165px;
|
||||
width: 165px;
|
||||
justify-content: center;
|
||||
@ -2644,14 +2646,20 @@
|
||||
.YJ-custom-base-dialog.circle>.content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.circle>.content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.circle>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.circle>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.circle>.content .attribute-content-rtmp .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-link .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.attackArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-link .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-link .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3) {
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3),
|
||||
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
|
||||
flex: 0 0 165px;
|
||||
width: 165px;
|
||||
justify-content: center;
|
||||
@ -2947,8 +2955,9 @@
|
||||
.YJ-custom-base-dialog.polyline>.content input.input-text {
|
||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||
border-radius: unset !important;
|
||||
border-top: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
|
||||
border: none;
|
||||
border-top: 1px solid rgba(var(--color-base1), 0.7) !important;
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.7) !important;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist input {
|
||||
@ -3134,7 +3143,9 @@
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-link .table .tr .th:nth-child(2),
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-link .table .tr .td:nth-child(2),
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-vr .table .tr .th:nth-child(2),
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-vr .table .tr .td:nth-child(2) {
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-vr .table .tr .td:nth-child(2),
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-rtmp .table .tr .th:nth-child(2),
|
||||
.YJ-custom-base-dialog.model>.content .attribute-content-rtmp .table .tr .td:nth-child(2) {
|
||||
flex: 0 0 210px;
|
||||
width: 210px;
|
||||
justify-content: center;
|
||||
|
||||
@ -44,9 +44,13 @@ export const GraphApi = {
|
||||
})
|
||||
},
|
||||
//军标类型列表
|
||||
modelTypeList: async () => {
|
||||
modelTypeList: async (data: any) => {
|
||||
return await request.get({
|
||||
url: `/militaryLibrary/militaryTypeTree`
|
||||
url: `/militaryLibrary/militaryTypeTree`,
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
},
|
||||
//添加军标文件
|
||||
|
||||
@ -27,5 +27,12 @@ export const MaterialApi = {
|
||||
url: `/matter/deletes`,
|
||||
data,
|
||||
})
|
||||
},
|
||||
//启用路网数据
|
||||
statistics: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/matter/statistics`,
|
||||
data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,9 +44,14 @@ export const ModelApi = {
|
||||
})
|
||||
},
|
||||
//模型类型列表
|
||||
modelTypeList: async () => {
|
||||
modelTypeList: async (data: any) => {
|
||||
|
||||
return await request.get({
|
||||
url: `/modelLibrary/modelTypeList`
|
||||
url: `/modelLibrary/modelTypeList`,
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
},
|
||||
//添加模型文件
|
||||
|
||||
@ -44,9 +44,13 @@ export const PhotoApi = {
|
||||
})
|
||||
},
|
||||
//图标类型列表
|
||||
modelTypeList: async () => {
|
||||
modelTypeList: async (data: any) => {
|
||||
return await request.get({
|
||||
url: `/iconLibrary/iconTypeTree`
|
||||
url: `/iconLibrary/iconTypeTree`,
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
},
|
||||
//添加图标文件
|
||||
|
||||
BIN
src/renderer/src/assets/img/defaultMouse.png
Normal file
BIN
src/renderer/src/assets/img/defaultMouse.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 364 B |
@ -600,6 +600,35 @@ img {
|
||||
position: relative;
|
||||
top: 6px;
|
||||
}
|
||||
.mousePosiWords {
|
||||
/* right: 245px !important;
|
||||
bottom: 72px !important; */
|
||||
font-size: 12px !important;
|
||||
flex-direction: column !important;
|
||||
padding-bottom: 10px !important;
|
||||
padding-left: 10px!important;
|
||||
border-radius: 0 !important;
|
||||
border: 1px solid rgba(var(--color-base1), 0.5);
|
||||
background: linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%), rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
.mousePosiWords>p:nth-child(1)::before {
|
||||
content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAABkSURBVDiN7dBBCoAwDETRjxczN8vR6s3GTZFKm1jElXSgmxIeycDKCgCSTJJ/gRT18Wk8QUqFRrhFyAhSu00yc+EbsANW3yjt/5EcaNW6bepJb1EV1p0d9OlBb/PIA/4eWPlZToLnA8jkPBbrAAAAAElFTkSuQmCC");
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 6px;
|
||||
}
|
||||
.mousePosiWords>p:nth-child(2)::before {
|
||||
content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACkSURBVDiNrZNRDsMgDEPJ1HstN0M7Gd3JvA/CSlsWDMw/larwZJsQAiEACiAys5QAJABgZh+DYF0GGqSAniMGfgETDqXevBDAU3ci4p5xI7c66912r8P/rUoIOa4p1l3OwvR6EQaGF9uLXFZkr/6pfd+zLr/rUrmbi2zAiLvcXRx6eqbXpL+shkNdBUY2LgvUEXfdDkVkX3Z1VXkpzOxGMulF/gCoY8eTaDSlggAAAABJRU5ErkJggg==");
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 6px;
|
||||
}
|
||||
.mousePosiWords>p:nth-child(3)::before {
|
||||
content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAECSURBVDiN1ZQxTsQwEEWfCRUlQuIQNNwgOQANh9hDbAUNHIEWcQQK6hUSNZRLgfYENEiIDj0KHOQNdjZe0fArO+N8/ZkXB/5YAUA9+FUI4XVrV3Wmvqj36p16Mqh36lmt6bV6VKgtVKf47CTrQ2CmzquSjBgCrIBl5lwHMKXt3WT9BjwCz2oTQviMJt22CfeAC+BmcKYdJp2kEpQeSK+ahPtEKGpTSpWOIDeOUSiF+bVJbTEElUL5IELJmOQ0Tly9TW5KE5+tzS9Rt3GuOSgjhk+D/U/aTTelKzR0XOq0CKXygz5fM4y/r/6mPMR9m321oD5AT/mU7zYugXfgqsbsf+kLw8LzMSWqfwIAAAAASUVORK5CYII=");
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 6px;
|
||||
}
|
||||
|
||||
#mapxDiv {
|
||||
bottom: 126px !important;
|
||||
|
||||
@ -51,7 +51,6 @@ const isUploading = ref(false)
|
||||
// 上传地址
|
||||
const uploadUrl = () => {
|
||||
//process.env.BASE_API +
|
||||
console.log(process.env.BASE_API, 'yyyyy')
|
||||
let url = 'http://127.0.0.1:8848' + '/auth/import'
|
||||
return url
|
||||
}
|
||||
@ -74,7 +73,7 @@ const handleSuccess = (response: any) => {
|
||||
isUploading.value = false
|
||||
} else {
|
||||
isUploading.value = false
|
||||
ElMessage.success('授权成功')
|
||||
ElMessage.success('文件授权成功')
|
||||
eventBus.emit('upload', true)
|
||||
}
|
||||
// 可以在这里添加成功后的其他逻辑
|
||||
|
||||
@ -2,8 +2,22 @@
|
||||
<div class="rightBox" v-if="isDesktop">
|
||||
<el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
|
||||
</div>
|
||||
<video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
|
||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover;z-index: -1;"></video>
|
||||
<video
|
||||
key="second-video"
|
||||
autoplay
|
||||
loop
|
||||
muted
|
||||
src="../../assets/video/author_video.mp4"
|
||||
style="
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
object-fit: cover;
|
||||
z-index: -1;
|
||||
"
|
||||
></video>
|
||||
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack">
|
||||
<template #content>
|
||||
<div class="auth_info custom_scroll_bar content_h">
|
||||
@ -12,7 +26,12 @@
|
||||
<span class="fankuai"></span>
|
||||
{{ t('auths.authCode') }}
|
||||
</div>
|
||||
<div class="auth_info_text" @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">
|
||||
<div
|
||||
class="auth_info_text"
|
||||
@click="copy(authInfo.license_code)"
|
||||
style="cursor: pointer"
|
||||
title="点击可复制"
|
||||
>
|
||||
{{ authInfo.license_code || '' }}
|
||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
||||
</div>
|
||||
@ -35,8 +54,12 @@
|
||||
<span class="fankuai"></span>
|
||||
{{ t('auths.authType') }}
|
||||
</div>
|
||||
<div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px"
|
||||
:style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }">
|
||||
<div
|
||||
v-if="authInfo.status != null"
|
||||
class="auth_info_text"
|
||||
style="font-size: 16px"
|
||||
:style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }"
|
||||
>
|
||||
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
|
||||
</div>
|
||||
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
|
||||
@ -48,7 +71,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
||||
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||
<button @click="close">退出系统</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
@ -70,8 +93,13 @@
|
||||
<div class="item">
|
||||
<span class="itemLabel">服务选择</span>
|
||||
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
|
||||
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
|
||||
:value="item.name">
|
||||
<el-option
|
||||
size="mini"
|
||||
v-for="item in servOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@ -172,7 +200,7 @@ const getAuthInfo = async () => {
|
||||
}
|
||||
} catch (error) {
|
||||
// 统一处理错误
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||
confirmButtonText: '去授权',
|
||||
cancelButtonText: '退出系统',
|
||||
type: 'warning',
|
||||
@ -201,7 +229,7 @@ const getStatus = (date) => {
|
||||
if (timestamp > currentTimestamp) {
|
||||
router.push({ path: '/login' })
|
||||
} else {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||
confirmButtonText: '去授权',
|
||||
cancelButtonText: '退出系统',
|
||||
type: 'warning',
|
||||
@ -222,7 +250,7 @@ const getStatus = (date) => {
|
||||
}
|
||||
setTimeout(() => {
|
||||
getAuthInfo()
|
||||
}, 5000);
|
||||
}, 5000)
|
||||
|
||||
//授权页面
|
||||
|
||||
@ -254,7 +282,7 @@ const authInfo = ref({
|
||||
status: null
|
||||
})
|
||||
//上传授权文件成功
|
||||
eventBus.on('upload', (data) => {
|
||||
let func = (data) => {
|
||||
if (data) {
|
||||
getAuthInfo2()
|
||||
setTimeout(() => {
|
||||
@ -267,7 +295,29 @@ eventBus.on('upload', (data) => {
|
||||
$sendElectronChanel('restart')
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
eventBus.off('upload', func)
|
||||
eventBus.on('upload', func)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
eventBus.off('upload', func)
|
||||
})
|
||||
|
||||
// eventBus.on('upload', (data) => {
|
||||
// if (data) {
|
||||
// getAuthInfo2()
|
||||
// setTimeout(() => {
|
||||
// ElMessage({
|
||||
// message: '载入成功,将在2s后自动重启',
|
||||
// type: 'success'
|
||||
// })
|
||||
// }, 1000)
|
||||
// setTimeout(() => {
|
||||
// $sendElectronChanel('restart')
|
||||
// }, 3000)
|
||||
// }
|
||||
// })
|
||||
|
||||
const { toClipboard } = useClipboard()
|
||||
|
||||
@ -298,7 +348,7 @@ const getAuthCode = async () => {
|
||||
}
|
||||
setTimeout(() => {
|
||||
getAuthCode()
|
||||
}, 5000);
|
||||
}, 5000)
|
||||
//复制
|
||||
|
||||
const copy = async (text) => {
|
||||
@ -374,7 +424,8 @@ const copy = async (text) => {
|
||||
z-index: 99;
|
||||
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
||||
border: 1.5px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
|
||||
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%)
|
||||
1;
|
||||
text-align: left;
|
||||
font-family: 'sy-boldface';
|
||||
}
|
||||
@ -420,11 +471,11 @@ const copy = async (text) => {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
::v-deep .title-box>.close-box {
|
||||
::v-deep .title-box > .close-box {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::v-deep .title-box>.title {
|
||||
::v-deep .title-box > .title {
|
||||
font-family: 'Ali-mother-counts-bold';
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
@ -447,7 +498,7 @@ const copy = async (text) => {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
::v-deep .foot>button {
|
||||
::v-deep .foot > button {
|
||||
margin-left: 10px;
|
||||
border-radius: 4px;
|
||||
background: rgba(var(--color-base1), 0.2);
|
||||
@ -459,12 +510,12 @@ const copy = async (text) => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .foot>button:hover {
|
||||
::v-deep .foot > button:hover {
|
||||
border: 1px solid rgba(var(--color-base1), 1);
|
||||
color: rgba(var(--color-base1), 1);
|
||||
}
|
||||
|
||||
::v-deep .foot>.show>.label {
|
||||
::v-deep .foot > .show > .label {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
@ -539,7 +590,7 @@ const copy = async (text) => {
|
||||
border-radius: 0 0 0 90%;
|
||||
background: rgba(var(--color-base1), 1);
|
||||
|
||||
&>span {
|
||||
& > span {
|
||||
font-size: 1rem;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
@ -636,7 +687,8 @@ const copy = async (text) => {
|
||||
align-items: center;
|
||||
margin: 15px 0;
|
||||
|
||||
.select {}
|
||||
.select {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
{{ t('auths.noAuthexpire') }}
|
||||
</div>
|
||||
</div>
|
||||
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
||||
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -68,11 +68,24 @@ const authInfo: any = ref({
|
||||
status: null
|
||||
})
|
||||
//上传授权文件成功
|
||||
eventBus.on('upload', (data) => {
|
||||
let func = (data) => {
|
||||
if (data) {
|
||||
getAuthInfo()
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
eventBus.off('upload', func)
|
||||
eventBus.on('upload', func)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
eventBus.off('upload', func)
|
||||
})
|
||||
|
||||
// eventBus.on('upload', (data) => {
|
||||
// if (data) {
|
||||
// getAuthInfo()
|
||||
// }
|
||||
// })
|
||||
|
||||
const { toClipboard } = useClipboard()
|
||||
|
||||
|
||||
@ -220,11 +220,32 @@ const routeImport = () => {
|
||||
path: path[0]
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
RouteApi.getRouteList().then((list) => {
|
||||
routeList.splice(0, routeList.length, ...list.data)
|
||||
routeList.map((item) => {
|
||||
let arr = item.path.split('/')
|
||||
item.name = arr[arr.length - 1]
|
||||
})
|
||||
//只有一个route时默认启用
|
||||
if (routeList.length == 1) {
|
||||
let formData = new FormData()
|
||||
formData.append('id', routeList[0].id)
|
||||
RouteApi.enableRoute(formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
message: '上传并启用成功',
|
||||
type: 'success'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '上传成功',
|
||||
type: 'success'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -620,8 +641,8 @@ function unzip_file(srcZipFile, dst) {
|
||||
//工程导出
|
||||
let exportWin = false
|
||||
function derive() {
|
||||
if (!exportWin) {
|
||||
exportWin = !exportWin
|
||||
// if (!exportWin) {
|
||||
// exportWin = !exportWin
|
||||
const date = new Date()
|
||||
const formattedDate = format(date, 'yyyyMMdd HHmmss')
|
||||
|
||||
@ -639,10 +660,8 @@ function derive() {
|
||||
// return
|
||||
// }
|
||||
// let loadingInstance = this.$openLoading('拼命导出中...')
|
||||
exportWin = !exportWin
|
||||
console.log('111111')
|
||||
// exportWin = !exportWin
|
||||
let arr = getElectronPath().replaceAll('\\', '/').split('/')
|
||||
console.log(arr, '222222')
|
||||
arr.pop()
|
||||
arr[arr.length - 1] = 'yjearth/app.db'
|
||||
let db_path: any = arr.join('/')
|
||||
@ -685,7 +704,7 @@ function derive() {
|
||||
// .catch((err) => {
|
||||
// console.log(err)
|
||||
// })
|
||||
}
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -46,14 +46,19 @@
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
height="40vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="cameraName" label="设备名称" width="150" />
|
||||
<el-table-column prop="deviceType" label="设备类型" width="120">
|
||||
<template #default="scope">
|
||||
<span class="deviceType"></span>
|
||||
<!-- {{ statusTrans(scope.row.type) }} -->
|
||||
<span
|
||||
class="deviceType"
|
||||
:style="{
|
||||
background: scope.row.status ? 'rgba(0, 194, 142, 1)' : 'rgba(241, 108, 85, 1)'
|
||||
}"
|
||||
></span>
|
||||
{{ scope.row.type }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -212,12 +212,14 @@ const treeRef = ref()
|
||||
var sortableInstance: any = reactive(null)
|
||||
|
||||
//搜索
|
||||
var photoName = ref(null)
|
||||
var photoName = ref('')
|
||||
|
||||
watch(photoName, (val) => {
|
||||
if (treeRef.value && treeRef.value !== '') {
|
||||
treeRef.value!.filter(val)
|
||||
}
|
||||
// if (treeRef.value && treeRef.value !== '') {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
modelList.value = []
|
||||
getModelList()
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
if (!value) return true
|
||||
@ -293,7 +295,9 @@ eventBus.on('settingPop', (data) => {
|
||||
})
|
||||
|
||||
const getModelList = async () => {
|
||||
const res: any = await GraphApi.modelTypeList()
|
||||
const params = new URLSearchParams()
|
||||
params.append('militaryName', photoName.value)
|
||||
const res: any = await GraphApi.modelTypeList(params)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
let data = transformNestedJson(res.data, 'name', 'label')
|
||||
typeTreeData.value = data
|
||||
@ -536,6 +540,7 @@ const toggleExpand = (row: any) => {
|
||||
const getModelListByType = (id) => {
|
||||
let formData = new FormData()
|
||||
formData.append('militaryTypeId', id)
|
||||
formData.append('name', photoName.value)
|
||||
GraphApi.showModelByType(formData).then((res) => {
|
||||
modelList.value = res.data
|
||||
})
|
||||
@ -634,7 +639,6 @@ const handleImportModel = (row: TypeNode) => {
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
if (paths.length) {
|
||||
console.log(paths, 'paths')
|
||||
const formData = new FormData()
|
||||
formData.append('filePaths', paths)
|
||||
formData.append('militaryTypeId', clickTreeNode.id)
|
||||
@ -807,9 +811,8 @@ const handleDelete = (row: any) => {
|
||||
formData.append('militaryId', row.id)
|
||||
GraphApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('删除成功')
|
||||
getModelListByType(row.militaryTypeId)
|
||||
console.log(res, 'resres')
|
||||
ElMessage.success('删除成功')
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
res.data.forEach((item) => {
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
height="40vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
|
||||
@ -237,12 +237,14 @@ const closeDialog = () => {
|
||||
}
|
||||
|
||||
//搜索
|
||||
var photoName = ref(null)
|
||||
var photoName = ref('')
|
||||
|
||||
watch(photoName, (val) => {
|
||||
if (treeRef.value && treeRef.value !== '') {
|
||||
treeRef.value!.filter(val)
|
||||
}
|
||||
// if (treeRef.value && treeRef.value !== '') {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
getModelList()
|
||||
modelList.value = []
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
if (!value) return true
|
||||
@ -281,8 +283,7 @@ const addType = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
//获取模型列表
|
||||
eventBus.on('settingPop', (data) => {
|
||||
let setFunc = (data) => {
|
||||
if (data) {
|
||||
//关闭弹框时更新模型列表
|
||||
getModelList()
|
||||
@ -290,7 +291,24 @@ eventBus.on('settingPop', (data) => {
|
||||
// getModelListByType(showImageRow.modelTypeId)
|
||||
showImageRow = null
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
eventBus.off('settingPop', setFunc)
|
||||
eventBus.on('settingPop', setFunc)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
eventBus.off('settingPop', setFunc)
|
||||
})
|
||||
//获取模型列表
|
||||
// eventBus.on('settingPop', (data) => {
|
||||
// if (data) {
|
||||
// //关闭弹框时更新模型列表
|
||||
// getModelList()
|
||||
|
||||
// // getModelListByType(showImageRow.modelTypeId)
|
||||
// showImageRow = null
|
||||
// }
|
||||
// })
|
||||
|
||||
var expandedKeys: any = ref([])
|
||||
// 获取当前所有展开节点的key
|
||||
@ -307,7 +325,9 @@ const updateExpandedState = () => {
|
||||
expandedKeys.value = keys
|
||||
}
|
||||
const getModelList = async () => {
|
||||
const res: any = await ModelApi.modelTypeList()
|
||||
const params = new URLSearchParams()
|
||||
params.append('modelName', photoName.value)
|
||||
const res: any = await ModelApi.modelTypeList(params)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
let data = transformNestedJson(res.data, 'name', 'label')
|
||||
typeTreeData.value = data
|
||||
@ -622,6 +642,7 @@ const getModelListByType = (id) => {
|
||||
clickTypeId = id
|
||||
let formData = new FormData()
|
||||
formData.append('modelTypeId', id)
|
||||
formData.append('name', photoName.value)
|
||||
ModelApi.showModelByType(formData).then((res) => {
|
||||
modelList.value = res.data
|
||||
})
|
||||
@ -721,7 +742,6 @@ const handleAddChildType = (row: TypeNode) => {
|
||||
// triggerUpload()
|
||||
// }
|
||||
const handleImportModel = (row: TypeNode) => {
|
||||
console.log('aaaaaaa')
|
||||
let option = {
|
||||
properties: ['openFile', 'multiSelections'],
|
||||
filters: [
|
||||
@ -893,9 +913,9 @@ const handleDelete = (row: ModelItem) => {
|
||||
formData.append('modelId', row.id)
|
||||
ModelApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('删除成功')
|
||||
// @ts-ignore
|
||||
getModelListByType(row.modelTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
|
||||
if (res.data?.length) {
|
||||
//删除对应的树数据和地图数据
|
||||
@ -906,7 +926,6 @@ const handleDelete = (row: ModelItem) => {
|
||||
;(window as any)._entityMap.delete(item)
|
||||
})
|
||||
}
|
||||
console.log(res, 'resres')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -263,12 +263,14 @@ const getExpandedKeys = () => {
|
||||
.map((node: any) => node.key)
|
||||
}
|
||||
|
||||
var photoName = ref(null)
|
||||
var photoName = ref('')
|
||||
|
||||
watch(photoName, (val) => {
|
||||
if (treeRef.value && treeRef.value !== '') {
|
||||
treeRef.value!.filter(val)
|
||||
}
|
||||
// if (treeRef.value && treeRef.value !== '') {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
getModelList()
|
||||
modelList.value = []
|
||||
})
|
||||
const filterNode: any = (value, data) => {
|
||||
if (!value) return true
|
||||
@ -373,7 +375,9 @@ const getModelList = async () => {
|
||||
]
|
||||
} else {
|
||||
//自定义类型
|
||||
const res: any = await PhotoApi.modelTypeList()
|
||||
const params = new URLSearchParams()
|
||||
params.append('iconName', photoName.value)
|
||||
const res: any = await PhotoApi.modelTypeList(params)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
let data = transformNestedJson(res.data, 'name', 'label')
|
||||
typeTreeData.value = data
|
||||
@ -633,6 +637,7 @@ const getModelListByType = async (id) => {
|
||||
} else {
|
||||
let formData = new FormData()
|
||||
formData.append('iconTypeId', id)
|
||||
formData.append('name', photoName.value)
|
||||
PhotoApi.showModelByType(formData).then((res) => {
|
||||
modelList.value = res.data
|
||||
})
|
||||
@ -730,8 +735,33 @@ const handleAddChildType = (row: TypeNode) => {
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// const handleImportModel = (row: TypeNode) => {
|
||||
// triggerUpload()
|
||||
// }
|
||||
const handleImportModel = (row: TypeNode) => {
|
||||
triggerUpload()
|
||||
let option = {
|
||||
properties: ['openFile', 'multiSelections'],
|
||||
filters: [
|
||||
{
|
||||
name: '图标',
|
||||
extensions: ['jpg', 'jpeg', 'png', 'gif']
|
||||
}
|
||||
]
|
||||
}
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
if (paths.length) {
|
||||
const formData = new FormData()
|
||||
formData.append('filePaths', paths)
|
||||
formData.append('iconTypeId', clickTreeNode.id)
|
||||
PhotoApi.addGraph(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('导入成功')
|
||||
getModelListByType(clickTreeNode.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleRenameType = (row: TypeNode) => {
|
||||
@ -880,8 +910,8 @@ const handleDelete = (row: any) => {
|
||||
formData.append('iconId', row.id)
|
||||
PhotoApi.delModel(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('删除成功')
|
||||
getModelListByType(row.iconTypeId)
|
||||
ElMessage.success('删除成功')
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -897,7 +927,6 @@ const setPhotoList = () => {
|
||||
dirName1s: 'GEMarker1s'
|
||||
})
|
||||
$recvElectronChanel('dirFiles', (e, res) => {
|
||||
console.log('dirFiles', res)
|
||||
res.GEMarker1s.forEach((item) => {
|
||||
let name = item.split('.')[0]
|
||||
name = name.split('/')[1]
|
||||
|
||||
@ -634,7 +634,7 @@ const setData = () => {
|
||||
TreeApi.getTreeDefault().then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '添加完成,2秒后,将重启系统',
|
||||
message: '添加完成,2秒后将重启系统',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="set_pup">
|
||||
<el-dialog
|
||||
v-model="isShowPup"
|
||||
:modal="false"
|
||||
:modal="true"
|
||||
draggable
|
||||
:close-on-click-modal="false"
|
||||
:destroy-on-close="true"
|
||||
|
||||
@ -687,6 +687,7 @@ const methodMap = {
|
||||
})
|
||||
dom?.classList.remove('default-cursor')
|
||||
dom?.classList.add('custom-cursor')
|
||||
console.log(document.getElementsByClassName('custom-cursor')[0].style, 'llllll')
|
||||
} else {
|
||||
dom?.classList.remove('custom-cursor')
|
||||
dom?.classList.add('default-cursor')
|
||||
@ -1044,7 +1045,7 @@ defineExpose({
|
||||
}
|
||||
.custom-cursor {
|
||||
cursor:
|
||||
url('@/assets/img/mouse.png') 16 16,
|
||||
url('@/assets/img/defaultMouse.png') 2 11,
|
||||
auto;
|
||||
}
|
||||
.default-cursor {
|
||||
@ -1059,6 +1060,7 @@ defineExpose({
|
||||
position: relative;
|
||||
background: unset !important;
|
||||
z-index: 2;
|
||||
line-height: 150px;
|
||||
/* background: url('@/assets/img/timerBg.png') !important;
|
||||
animation: rotate-bg 5s infinite linear; */
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<div class="row">
|
||||
<div class="col" style="flex: 0 0 205px">
|
||||
<span class="label">名称</span>
|
||||
<input class="input" type="text" name="name" placeholder="请输入名称"/>
|
||||
<input class="input" type="text" name="name" placeholder="请输入名称" />
|
||||
</div>
|
||||
<!-- <div class="col">
|
||||
<input
|
||||
@ -209,7 +209,7 @@
|
||||
录制
|
||||
</button>
|
||||
</div>
|
||||
<button class="saveRoam" @click="draw">保存</button>
|
||||
<button class="saveRoam" @click="save">保存</button>
|
||||
<button @click="close">取消</button>
|
||||
</template>
|
||||
</Dialog>
|
||||
@ -217,18 +217,18 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
//@ts-nocheck
|
||||
import {ref, reactive, onBeforeUnmount} from 'vue'
|
||||
import {inject} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||
import { inject } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||
import {app} from 'electron'
|
||||
import {TreeApi} from '@/api/tree'
|
||||
import {useTreeNode} from '../tree/hooks/treeNode'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {$sendElectronChanel} from '@/utils/communication'
|
||||
import { app } from 'electron'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { $sendElectronChanel } from '@/utils/communication'
|
||||
|
||||
const {t} = useI18n()
|
||||
const {cusAddNodes} = useTreeNode()
|
||||
const { t } = useI18n()
|
||||
const { cusAddNodes, cusUpdateNode } = useTreeNode()
|
||||
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
@ -240,18 +240,35 @@ eventBus.on('flyRoamDialog', () => {
|
||||
show.value = true
|
||||
baseDialog.value?.open()
|
||||
setTimeout(() => {
|
||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
|
||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||
}, 100)
|
||||
})
|
||||
const open = () => {
|
||||
let beforeData = []
|
||||
const open = (data) => {
|
||||
beforeData = data
|
||||
show.value = true
|
||||
baseDialog.value?.open()
|
||||
if (data) {
|
||||
let roamData = JSON.parse(data.params)
|
||||
setTimeout(() => {
|
||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
|
||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, roamData, {}, draw)
|
||||
}, 100)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
const draw = (data) => {
|
||||
if (data.points.length != 0) {
|
||||
|
||||
let allData: any = reactive({
|
||||
name: '',
|
||||
points: [],
|
||||
repeat: '',
|
||||
defaultTime: 0,
|
||||
totalTime: 0
|
||||
})
|
||||
const save = () => {
|
||||
if (allData.points.length != 0) {
|
||||
let selectedNodes = window.treeObj.getSelectedNodes()
|
||||
let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
|
||||
let parentId
|
||||
@ -262,19 +279,39 @@ const draw = (data) => {
|
||||
parentId = node.parentId
|
||||
}
|
||||
}
|
||||
let id = new YJ.Tools().randomString()
|
||||
let id = (beforeData && beforeData.id) || new YJ.Tools().randomString()
|
||||
let paramsData: any = {
|
||||
params: data,
|
||||
params: allData,
|
||||
id,
|
||||
sourceName: t(`default.roam`),
|
||||
sourceName: allData.name || t(`default.roam`),
|
||||
sourceType: 'roam',
|
||||
parentId: parentId
|
||||
}
|
||||
|
||||
if (beforeData && beforeData.id) {
|
||||
// let params2 = {
|
||||
// "id": params.id,
|
||||
// "sourceName": params.name,
|
||||
// "params": params,
|
||||
// "isShow": params.show ? 1 : 0,
|
||||
// }
|
||||
// TreeApi.updateDirectoryInfo(params2)
|
||||
delete paramsData.sourceType
|
||||
delete paramsData.parentId
|
||||
paramsData.isShow = allData.isShow
|
||||
TreeApi.updateDirectoryInfo(paramsData)
|
||||
cusUpdateNode({
|
||||
id: paramsData.id,
|
||||
sourceName: paramsData.sourceName,
|
||||
params: JSON.stringify(paramsData.params)
|
||||
})
|
||||
} else {
|
||||
TreeApi.addOtherSource(paramsData)
|
||||
paramsData.isShow = true
|
||||
paramsData.params = JSON.stringify(paramsData.params)
|
||||
cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
|
||||
}
|
||||
|
||||
baseDialog.value?.close()
|
||||
} else {
|
||||
ElMessage({
|
||||
@ -283,6 +320,9 @@ const draw = (data) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
const draw = (data) => {
|
||||
allData = data
|
||||
}
|
||||
|
||||
const startVideo = () => {
|
||||
document.getElementById('earthContainer').style.zIndex = 100
|
||||
@ -302,8 +342,7 @@ const startVideo = () => {
|
||||
window.addEventListener('keydown', handleKeyDown)
|
||||
}
|
||||
|
||||
const clangeViewPointHeight = () => {
|
||||
}
|
||||
const clangeViewPointHeight = () => {}
|
||||
const viewPointHeightInput = () => {
|
||||
let dom: any = document.getElementById('viewPointHeight')
|
||||
if (viewPointHeight.value < dom.min * 1) {
|
||||
@ -334,7 +373,8 @@ defineExpose({
|
||||
|
||||
<style scoped lang="scss">
|
||||
.afreshPlay {
|
||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
background:
|
||||
linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||
linear-gradient(180deg, rgba(27, 248, 195, 0.2) 0%, rgba(27, 248, 195, 0) 100%) !important;
|
||||
border: 1px solid rgba(27, 248, 195, 1) !important;
|
||||
color: rgba(27, 248, 195, 1) !important;
|
||||
@ -345,7 +385,8 @@ defineExpose({
|
||||
}
|
||||
|
||||
.cease {
|
||||
background: linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
||||
background:
|
||||
linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
||||
rgba(0, 0, 0, 0.5) !important;
|
||||
border: 1px solid rgba(241, 108, 85, 1) !important;
|
||||
color: rgba(241, 108, 85, 1) !important;
|
||||
@ -356,7 +397,8 @@ defineExpose({
|
||||
}
|
||||
|
||||
.video {
|
||||
background: linear-gradient(
|
||||
background:
|
||||
linear-gradient(
|
||||
180deg,
|
||||
rgba(71, 27, 5, 0.3) 0%,
|
||||
rgba(71, 27, 5, 0.3) 0%,
|
||||
|
||||
@ -159,50 +159,60 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
||||
break
|
||||
}
|
||||
}
|
||||
console.log(itemInArea, 'itemInArea')
|
||||
return itemInArea
|
||||
}
|
||||
function renderCanvas(nodes) {
|
||||
async function renderCanvas(nodes) {
|
||||
let x: any = []
|
||||
let y: any = []
|
||||
nodes.forEach((item) => {
|
||||
// shp物资统计
|
||||
if (item.sourceType == 'Feature') {
|
||||
let obj = JSON.parse(JSON.stringify(item.detail.properties))
|
||||
for (const key in obj) {
|
||||
let name = key
|
||||
// if (shpTotalDict[key]) {
|
||||
// name = shpTotalDict[key]
|
||||
if (shpTotalDict.indexOf(key) != -1) {
|
||||
name = key
|
||||
// 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
let index = x.findIndex((item) => item === name)
|
||||
if (index !== -1) {
|
||||
y[index] = y[index] + Number(obj[key])
|
||||
} else {
|
||||
x.push(name)
|
||||
y.push(Number(obj[key]))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let params = JSON.parse(item.params)
|
||||
if (params.attribute && params.attribute.goods) {
|
||||
let goods = params.attribute.goods.content
|
||||
if (goods.length) {
|
||||
// $root_home_index.goodSearchDialog = false;
|
||||
goods.forEach((good) => {
|
||||
// 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
let index = x.findIndex((item) => item === good.name)
|
||||
if (index !== -1) {
|
||||
y[index] = y[index] + Number(good.cnt)
|
||||
} else {
|
||||
x.push(good.name)
|
||||
y.push(Number(good.cnt))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// nodes.forEach((item) => {
|
||||
// // shp物资统计
|
||||
// if (item.sourceType == 'Feature') {
|
||||
// let obj = JSON.parse(JSON.stringify(item.detail.properties))
|
||||
// for (const key in obj) {
|
||||
// let name = key
|
||||
// // if (shpTotalDict[key]) {
|
||||
// // name = shpTotalDict[key]
|
||||
// if (shpTotalDict.indexOf(key) != -1) {
|
||||
// name = key
|
||||
// // 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
// let index = x.findIndex((item) => item === name)
|
||||
// if (index !== -1) {
|
||||
// y[index] = y[index] + Number(obj[key])
|
||||
// } else {
|
||||
// x.push(name)
|
||||
// y.push(Number(obj[key]))
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// let params = JSON.parse(item.params)
|
||||
// if (params.attribute && params.attribute.goods) {
|
||||
// let goods = params.attribute.goods.content
|
||||
// if (goods.length) {
|
||||
// // $root_home_index.goodSearchDialog = false;
|
||||
// goods.forEach((good) => {
|
||||
// // 把相同名称的物资数量相加,名称相同时,累加数据
|
||||
// let index = x.findIndex((item) => item === good.name)
|
||||
// if (index !== -1) {
|
||||
// y[index] = y[index] + Number(good.cnt)
|
||||
// } else {
|
||||
// x.push(good.name)
|
||||
// y.push(Number(good.cnt))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
let pointIds = nodes.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
console.log(pointIds, 'pointIds')
|
||||
let res = await MaterialApi.statistics(pointIds)
|
||||
console.log(res, 'resssssssssss')
|
||||
y = Object.values(res.data)
|
||||
x = Object.keys(res.data)
|
||||
console.log(x, y, 'x')
|
||||
|
||||
let notZeroX: any = []
|
||||
let notZeroY: any = []
|
||||
|
||||
@ -57,23 +57,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">最高水位</span>
|
||||
<div class="input-number input-number-unit-3">
|
||||
<input
|
||||
class="input"
|
||||
id="maxWaterLevel"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="9999999"
|
||||
v-model="maxWaterLevel"
|
||||
@input="maxWaterLevelInput"
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">最低水位</span>
|
||||
<div class="input-number input-number-unit-3">
|
||||
@ -91,6 +74,23 @@
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">最高水位</span>
|
||||
<div class="input-number input-number-unit-3">
|
||||
<input
|
||||
class="input"
|
||||
id="maxWaterLevel"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="9999999"
|
||||
v-model="maxWaterLevel"
|
||||
@input="maxWaterLevelInput"
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <span class="custom-divider"></span> -->
|
||||
|
||||
@ -44,8 +44,8 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
@ -71,11 +71,11 @@ var peopleFormRef: any = ref('')
|
||||
var addForm: any = ref({
|
||||
cameraName: '',
|
||||
ip: '',
|
||||
port: '',
|
||||
port: 554,
|
||||
username: '',
|
||||
password: '',
|
||||
type: '',
|
||||
channel: ''
|
||||
channel: 1
|
||||
})
|
||||
|
||||
const peopleRules: any = reactive({
|
||||
@ -124,11 +124,11 @@ var cancel = () => {
|
||||
addForm.value = {
|
||||
cameraName: '',
|
||||
ip: '',
|
||||
port: '',
|
||||
port: 554,
|
||||
username: '',
|
||||
password: '',
|
||||
type: '',
|
||||
channel: ''
|
||||
channel: 1
|
||||
}
|
||||
}
|
||||
var submitProtal = () => {
|
||||
@ -178,11 +178,11 @@ let func = (params) => {
|
||||
addForm.value = {
|
||||
cameraName: '',
|
||||
ip: '',
|
||||
port: '',
|
||||
port: 554,
|
||||
username: '',
|
||||
password: '',
|
||||
type: '',
|
||||
channel: ''
|
||||
channel: 1
|
||||
}
|
||||
}
|
||||
baseDialog.value?.open()
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
@ -29,8 +29,29 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col" v-show="showDis">
|
||||
<span class="label">间距</span>
|
||||
<div class="col" style="padding-top: 20px" v-show="showDis">
|
||||
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
|
||||
<el-form-item label="间距" prop="distance">
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input
|
||||
id="modelDistance"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="999999"
|
||||
step="0.1"
|
||||
placeholder="请输入数值"
|
||||
v-model="addForm.distance"
|
||||
@input="viewPointHeightInput"
|
||||
@change="clangeViewPointHeight"
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <span class="label">间距</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input
|
||||
id="modelDistance"
|
||||
@ -46,7 +67,7 @@
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -70,8 +91,17 @@ const eventBus: any = inject('bus')
|
||||
const viewPointHeight: any = ref(1.8)
|
||||
var visibility: any = reactive([])
|
||||
var showDis: any = ref(false)
|
||||
var peopleFormRef: any = ref('')
|
||||
|
||||
var type: any = ref('point')
|
||||
|
||||
var addForm: any = ref({
|
||||
distance: null
|
||||
})
|
||||
const peopleRules: any = reactive({
|
||||
distance: [{ required: true, message: '请输入间距', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
var distance: any = ref(null)
|
||||
|
||||
const options = [
|
||||
@ -91,7 +121,8 @@ const options = [
|
||||
eventBus.on('openGraphSetting', (show, data) => {
|
||||
baseDialog.value?.open()
|
||||
show && (type.value = show.key)
|
||||
show && (distance.value = show.value * 1)
|
||||
// show && (distance.value = show.value * 1)
|
||||
show && (addForm.value.distance = show.value * 1)
|
||||
typeChange()
|
||||
})
|
||||
|
||||
@ -120,22 +151,41 @@ const viewPointHeightInput = () => {
|
||||
}
|
||||
const closeCallBack = (e) => {
|
||||
type.value = 'point'
|
||||
distance.value = null
|
||||
// distance.value = null
|
||||
addForm.value.distance = null
|
||||
eventBus.emit('closeModelSetGraph', true)
|
||||
}
|
||||
const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const save = () => {
|
||||
if (showDis.value) {
|
||||
peopleFormRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
ModelApi.modelSetting({
|
||||
key: type.value,
|
||||
value: showDis.value ? distance.value : ''
|
||||
// value: showDis.value ? distance.value : ''
|
||||
value: showDis.value ? addForm.value.distance : ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ModelApi.modelSetting({
|
||||
key: type.value,
|
||||
// value: showDis.value ? distance.value : ''
|
||||
value: showDis.value ? addForm.value.distance : ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -154,4 +204,7 @@ const save = () => {
|
||||
::v-deep .el-select__placeholder {
|
||||
color: rgba(204, 204, 204, 1) !important;
|
||||
}
|
||||
::v-deep .el-form-item__label {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -58,7 +58,7 @@ const service = ref(localStorage.getItem('ip'))
|
||||
// var newData: any = reactive({
|
||||
// name: ''
|
||||
// })
|
||||
eventBus.on('imagePopDialog', (data) => {
|
||||
let func = (data) => {
|
||||
rowData = data
|
||||
rowData.name = data.modelName
|
||||
baseDialog.value?.open()
|
||||
@ -67,7 +67,25 @@ eventBus.on('imagePopDialog', (data) => {
|
||||
loadModel()
|
||||
animate()
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
eventBus.off('imagePopDialog', func)
|
||||
eventBus.on('imagePopDialog', func)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
eventBus.off('imagePopDialog', func)
|
||||
})
|
||||
|
||||
// eventBus.on('imagePopDialog', (data) => {
|
||||
// rowData = data
|
||||
// rowData.name = data.modelName
|
||||
// baseDialog.value?.open()
|
||||
// setTimeout(() => {
|
||||
// initThreeJS()
|
||||
// loadModel()
|
||||
// animate()
|
||||
// })
|
||||
// })
|
||||
//----------------模型预览---------------
|
||||
const threeCanvas: any = ref(null)
|
||||
let scene, camera, renderer, model, controls
|
||||
@ -194,8 +212,29 @@ const setImage = (e) => {
|
||||
canvas.toBlob((blob) => {
|
||||
const file = new File([blob], 'filename.png', { type: 'image/png' })
|
||||
imageData.value = file
|
||||
ElMessage.warning('点击保存是会应用当前图片')
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', rowData.id)
|
||||
// rowData.name && formData.append('modelName', rowData.name)
|
||||
imageData.value && formData.append('file', imageData.value)
|
||||
ModelApi.updatePoster(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
}
|
||||
})
|
||||
|
||||
// ElMessage.warning('设置成功')
|
||||
}, 'image/png')
|
||||
|
||||
// const formData = new FormData()
|
||||
// formData.append('modelId', rowData.id)
|
||||
// rowData.name && formData.append('modelName', rowData.name)
|
||||
// imageData.value && formData.append('file', imageData.value)
|
||||
// ModelApi.updatePoster(formData).then((res) => {
|
||||
// if (res.code == 0 || res.code == 200) {
|
||||
// ElMessage.success('设置成功')
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const close = (e) => {
|
||||
baseDialog.value?.close()
|
||||
@ -204,7 +243,7 @@ const save = (e) => {
|
||||
const formData = new FormData()
|
||||
formData.append('modelId', rowData.id)
|
||||
rowData.name && formData.append('modelName', rowData.name)
|
||||
imageData.value && formData.append('file', imageData.value)
|
||||
// imageData.value && formData.append('file', imageData.value)
|
||||
ModelApi.updatePoster(formData).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
|
||||
@ -311,9 +311,11 @@ let observer: IntersectionObserver | null = null
|
||||
const treeRef: any = ref('')
|
||||
|
||||
watch(modelName, (val) => {
|
||||
if (treeRef.value && treeRef.value !== '') {
|
||||
treeRef.value!.filter(val)
|
||||
}
|
||||
// if (treeRef.value && treeRef.value !== '') {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
categories.value = []
|
||||
getModelList()
|
||||
})
|
||||
|
||||
watch(isShowPup, (val) => {
|
||||
@ -561,13 +563,16 @@ const renderModel = async (data, model) => {
|
||||
const getModelListByType = (id) => {
|
||||
let formData = new FormData()
|
||||
formData.append('modelTypeId', id)
|
||||
formData.append('name', modelName.value)
|
||||
ModelApi.showModelByType(formData).then((res) => {
|
||||
categories.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
const getModelList = async () => {
|
||||
const res: any = await ModelApi.modelTypeList()
|
||||
const params = new URLSearchParams()
|
||||
params.append('modelName', modelName.value)
|
||||
const res: any = await ModelApi.modelTypeList(params)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
let data = transformNestedJson(res.data, 'name', 'label')
|
||||
typeTreeData.value = data
|
||||
|
||||
@ -29,8 +29,29 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col" v-show="showDis">
|
||||
<span class="label">间距</span>
|
||||
<div class="col" style="margin-top: 20px" v-show="showDis">
|
||||
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
|
||||
<el-form-item label="间距" prop="distance">
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input
|
||||
id="modelDistance"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="999999"
|
||||
step="0.1"
|
||||
placeholder="请输入数值"
|
||||
v-model="addForm.distance"
|
||||
@input="viewPointHeightInput"
|
||||
@change="clangeViewPointHeight"
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <span class="label">间距</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input
|
||||
id="modelDistance"
|
||||
@ -46,7 +67,7 @@
|
||||
/>
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -70,6 +91,15 @@ const eventBus: any = inject('bus')
|
||||
const viewPointHeight: any = ref(1.8)
|
||||
var visibility: any = reactive([])
|
||||
var showDis: any = ref(false)
|
||||
var peopleFormRef: any = ref('')
|
||||
|
||||
var addForm: any = ref({
|
||||
distance: null
|
||||
})
|
||||
|
||||
const peopleRules: any = reactive({
|
||||
distance: [{ required: true, message: '请输入间距', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
var type: any = ref('point')
|
||||
var distance: any = ref(null)
|
||||
@ -91,7 +121,8 @@ const options = [
|
||||
eventBus.on('openModelSetting', (show, data) => {
|
||||
baseDialog.value?.open()
|
||||
show && (type.value = show.key)
|
||||
show && (distance.value = show.value * 1)
|
||||
// show && (distance.value = show.value * 1)
|
||||
show && (addForm.value.distance = show.value * 1)
|
||||
typeChange()
|
||||
})
|
||||
|
||||
@ -120,22 +151,41 @@ const viewPointHeightInput = () => {
|
||||
}
|
||||
const closeCallBack = (e) => {
|
||||
type.value = 'point'
|
||||
distance.value = null
|
||||
// distance.value = null
|
||||
addForm.value.distance = null
|
||||
eventBus.emit('closeModelSet', true)
|
||||
}
|
||||
const close = () => {
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
const save = () => {
|
||||
if (showDis.value) {
|
||||
peopleFormRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
ModelApi.modelSetting({
|
||||
key: type.value,
|
||||
value: showDis.value ? distance.value : ''
|
||||
// value: showDis.value ? distance.value : ''
|
||||
value: showDis.value ? addForm.value.distance : ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ModelApi.modelSetting({
|
||||
key: type.value,
|
||||
// value: showDis.value ? distance.value : ''
|
||||
value: showDis.value ? addForm.value.distance : ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage.success('设置成功')
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -154,4 +204,7 @@ const save = () => {
|
||||
::v-deep .el-select__placeholder {
|
||||
color: rgba(204, 204, 204, 1) !important;
|
||||
}
|
||||
::v-deep .el-form-item__label {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import {TreeApi} from '@/api/tree'
|
||||
import {$changeComponentPop} from '@/utils/communication'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
||||
import {initMapData} from '@/common/initMapData'
|
||||
import {GisApi} from '@/api/gisApi'
|
||||
import {addMapSource} from '@/common/addMapSource'
|
||||
import {getNamefromPath} from '@/utils/index'
|
||||
import {renderVector} from './renderVector'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { $changeComponentPop } from '@/utils/communication'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
import { initMapData } from '@/common/initMapData'
|
||||
import { GisApi } from '@/api/gisApi'
|
||||
import { addMapSource } from '@/common/addMapSource'
|
||||
import { getNamefromPath } from '@/utils/index'
|
||||
import { renderVector } from './renderVector'
|
||||
|
||||
const {cusAddNodes} = useTreeNode()
|
||||
const { cusAddNodes } = useTreeNode()
|
||||
|
||||
export const useRightOperate = () => {
|
||||
const {getSelectedNodes, cusRemoveNode, cusUpdateNode} = useTreeNode()
|
||||
const { getSelectedNodes, cusRemoveNode, cusUpdateNode } = useTreeNode()
|
||||
|
||||
//添加文件
|
||||
const addDirectory = () => {
|
||||
@ -19,12 +19,12 @@ export const useRightOperate = () => {
|
||||
}
|
||||
//添加资源
|
||||
const addResource = () => {
|
||||
const {ipcRenderer} = require('electron')
|
||||
const { ipcRenderer } = require('electron')
|
||||
const options = {
|
||||
properties: ['openFile'], // 允许选择多个文件
|
||||
filters: [
|
||||
{name: '模型、影像、地形', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak']},
|
||||
{name: '矢量数据', extensions: ['kmz', 'kml', 'shp', 'tab', 'mif', 'geojson']},
|
||||
{ name: '模型、影像、地形', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak'] },
|
||||
{ name: '矢量数据', extensions: ['kmz', 'kml', 'shp', 'tab', 'mif', 'geojson'] },
|
||||
]
|
||||
};
|
||||
let selectedNodes = window.treeObj.getSelectedNodes()
|
||||
@ -159,7 +159,7 @@ export const useRightOperate = () => {
|
||||
res.data.params.id = res.data.id
|
||||
}
|
||||
let detail = JSON.parse(res.data.detail)
|
||||
let mapParams = {...detail, ...res.data.params}
|
||||
let mapParams = { ...detail, ...res.data.params }
|
||||
|
||||
await initMapData(res.data.sourceType, mapParams, (entity) => {
|
||||
entity.flyTo()
|
||||
@ -295,7 +295,7 @@ export const useRightOperate = () => {
|
||||
if (!entity) {
|
||||
return
|
||||
}
|
||||
GisApi.parseCsv({filePath: paths[0]}).then((res)=>{
|
||||
GisApi.parseCsv({ filePath: paths[0] }).then((res) => {
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
let params = JSON.parse(node.params)
|
||||
params.headTables = res.data
|
||||
@ -330,12 +330,14 @@ export const useRightOperate = () => {
|
||||
}
|
||||
//编辑
|
||||
const editNode = (eventBus, node) => {
|
||||
console.log(node, 'nnodenodenodenodeode')
|
||||
if (!node) {
|
||||
let selectNodes = getSelectedNodes(window.treeObj);
|
||||
if (selectNodes && selectNodes[selectNodes.length - 1]) {
|
||||
node = selectNodes[selectNodes.length - 1]
|
||||
}
|
||||
}
|
||||
console.log(node.id, 'nnodenodenodenodeode')
|
||||
if (node) {
|
||||
if (node.sourceType == 'pressModel' || node.sourceType == 'roam') {
|
||||
eventBus.emit("openDialog", node.sourceType, node);
|
||||
@ -354,7 +356,7 @@ export const useRightOperate = () => {
|
||||
.then(async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj)
|
||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
||||
const res = await TreeApi.removeDirectory({ids: source_ids})
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
@ -363,7 +365,7 @@ export const useRightOperate = () => {
|
||||
console.log('source_ids-----------', source_ids)
|
||||
source_ids.forEach(item => {
|
||||
let entity = (window as any)._entityMap.get(item)
|
||||
if(entity) {
|
||||
if (entity) {
|
||||
entity.remove();
|
||||
(window as any)._entityMap.delete(entity.options.id)
|
||||
}
|
||||
@ -430,7 +432,7 @@ export const useRightOperate = () => {
|
||||
entityObject.resetCustomView()
|
||||
params.customView = entityObject.customView
|
||||
let sourceName = params.name
|
||||
if(node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
||||
if (node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
||||
sourceName = params.text
|
||||
}
|
||||
let params2 = {
|
||||
@ -443,7 +445,7 @@ export const useRightOperate = () => {
|
||||
"isShow": node.isShow ? 1 : 0,
|
||||
}
|
||||
TreeApi.updateDirectoryInfo(params2)
|
||||
cusUpdateNode({"id": params2.id, "sourceName": params2.sourceName, "params": JSON.stringify(params)})
|
||||
cusUpdateNode({ "id": params2.id, "sourceName": params2.sourceName, "params": JSON.stringify(params) })
|
||||
}
|
||||
}
|
||||
//提升图层
|
||||
@ -584,7 +586,7 @@ export const useRightOperate = () => {
|
||||
if (arr.includes(item.sourceType) && item.isShow) {
|
||||
let entityOptions = (window as any)._entityMap.get(item.id)
|
||||
let layerIndex = entityOptions.layerIndex;
|
||||
layers.push({id: item.id, layerIndex});
|
||||
layers.push({ id: item.id, layerIndex });
|
||||
// let params = {
|
||||
// layerIndex: entityOptions.layerIndex,
|
||||
// alpha: entityOptions.alpha,
|
||||
@ -620,7 +622,7 @@ export const useRightOperate = () => {
|
||||
|
||||
// 图片文件上传后续
|
||||
async function handleFileImgInput(files: any, parentId: string, type: string) {
|
||||
const {ipcRenderer} = require('electron')
|
||||
const { ipcRenderer } = require('electron')
|
||||
let availablePort = await ipcRenderer.invoke('get-available-port');
|
||||
const formData = new FormData();
|
||||
let ids: any = []
|
||||
@ -708,7 +710,7 @@ export const useRightOperate = () => {
|
||||
}
|
||||
|
||||
function openDirectoryDialog(option, cb) {
|
||||
const {ipcRenderer} = require('electron')
|
||||
const { ipcRenderer } = require('electron')
|
||||
ipcRenderer.send("open-directory-dialog", option);
|
||||
ipcRenderer.once("selectedItem", (e, paths) => {
|
||||
cb(paths);
|
||||
|
||||
@ -11,8 +11,14 @@
|
||||
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
||||
<!--底部菜单-->
|
||||
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
||||
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||
@input="uploadFile" />
|
||||
<input
|
||||
type="file"
|
||||
id="fileInputlink"
|
||||
style="display: none"
|
||||
multiple
|
||||
accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||
@input="uploadFile"
|
||||
/>
|
||||
|
||||
<!-- 多点视线分析 -->
|
||||
<!-- <Visibility ref="visibility"></Visibility> -->
|
||||
@ -150,16 +156,11 @@ if (!localStorage.getItem('defaultLabelStyle')) {
|
||||
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
|
||||
dynamicComponentRef.value.close()
|
||||
}
|
||||
console.log(sourceType, 'sourceType')
|
||||
switch (sourceType) {
|
||||
case 'directory':
|
||||
editdirectoryBox.value.open()
|
||||
@ -393,7 +394,9 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
await nextTick()
|
||||
dynamicComponentRef.value?.open(id)
|
||||
break
|
||||
case 'roam': //飞行漫游
|
||||
case 'flyRoamDialog': //飞行漫游
|
||||
console.log(FlyRoam, 'FlyRoam')
|
||||
currentComponent.value = FlyRoam
|
||||
await nextTick()
|
||||
dynamicComponentRef.value?.open(id)
|
||||
@ -436,7 +439,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
default:
|
||||
break
|
||||
}
|
||||
id && (dynamicComponentRef.value.id = id)
|
||||
id && dynamicComponentRef.value && (dynamicComponentRef.value.id = id)
|
||||
})
|
||||
eventBus.on('openSelectImg', (selected, entity) => {
|
||||
// $sendElectronChanel("requireGEMarkerName", {
|
||||
@ -558,9 +561,9 @@ const getStatus = (time) => {
|
||||
const currentTimestamp = Date.now()
|
||||
|
||||
if (timestamp > currentTimestamp) {
|
||||
; (window as any).checkAuthIsValid = true
|
||||
;(window as any).checkAuthIsValid = true
|
||||
} else {
|
||||
; (window as any).checkAuthIsValid = false
|
||||
;(window as any).checkAuthIsValid = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -370,7 +370,7 @@ const getAuthInfo = async () => {
|
||||
}
|
||||
} catch (error) {
|
||||
// 统一处理错误
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||
confirmButtonText: '去授权',
|
||||
cancelButtonText: '退出系统',
|
||||
type: 'warning',
|
||||
@ -398,7 +398,7 @@ const getStatus = (date) => {
|
||||
// router.push({ path: '/login' })
|
||||
isAuth.value = false
|
||||
} else {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||
confirmButtonText: '去授权',
|
||||
cancelButtonText: '退出系统',
|
||||
type: 'warning',
|
||||
@ -448,12 +448,25 @@ const authInfo = ref({
|
||||
status: null
|
||||
})
|
||||
//上传授权文件成功
|
||||
eventBus.on('upload', (data) => {
|
||||
let setFunc = (data) => {
|
||||
if (data) {
|
||||
isAuth.value = false
|
||||
baseDialog.value?.close()
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
eventBus.off('upload', setFunc)
|
||||
eventBus.on('upload', setFunc)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
eventBus.off('upload', setFunc)
|
||||
})
|
||||
// eventBus.on('upload', (data) => {
|
||||
// if (data) {
|
||||
// isAuth.value = false
|
||||
// baseDialog.value?.close()
|
||||
// }
|
||||
// })
|
||||
|
||||
const { toClipboard } = useClipboard()
|
||||
|
||||
@ -1296,6 +1309,9 @@ if (isSeverInit) {
|
||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
||||
rgba(0, 0, 0, 0.6) !important;
|
||||
|
||||
.el-message-box__headerbtn {
|
||||
display: none !important;
|
||||
}
|
||||
.el-message-box__btns {
|
||||
.el-button {
|
||||
--el-button-text-color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user