合并
This commit is contained in:
1
resources/java/app/license/yjearth.yj
Normal file
1
resources/java/app/license/yjearth.yj
Normal file
@ -0,0 +1 @@
|
|||||||
|
41b/ujShRZRf9Aa433FD3uyIZuxWSSqXWXlc2dyQfJ75ED0HNbadcdsPF5CaMuJ624E+iLBfS14muki3Kp1qv3N0KPVdc0TjJDyrO+AVfwFghRHbXEWYEGb3GpmVU0MwclqNNggKfnTvj0gDIpFBNl/nxMZKwYXbYk8nqd3yUDfwLryTr1ScTPGegLiv1C+r1SDxtenx4d2fxqS6FkGbV5TA9+UoajQ1PHwDUdI7SfpxjvK4tQscOcu0R0wLgUa3LypkZtybW+yeNEhnp/jeYw==
|
||||||
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;
|
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 {
|
.YJ-custom-base-dialog>.content .row:last-child {
|
||||||
margin-bottom: 0;
|
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-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;
|
display: inline-block;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 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-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;
|
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-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;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,7 +511,6 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
scrollbar-gutter: stable;
|
scrollbar-gutter: stable;
|
||||||
width: calc(100% + 1px);
|
width: calc(100% + 1px);
|
||||||
height: 194px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .table .align-center,
|
.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-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;
|
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 .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-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 .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;
|
flex: 0 0 165px;
|
||||||
width: 165px;
|
width: 165px;
|
||||||
justify-content: center;
|
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 .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-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 .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;
|
flex: 0 0 165px;
|
||||||
width: 165px;
|
width: 165px;
|
||||||
justify-content: center;
|
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-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 .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-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 .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-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 .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-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 .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-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 .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;
|
flex: 0 0 165px;
|
||||||
width: 165px;
|
width: 165px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -2947,8 +2955,9 @@
|
|||||||
.YJ-custom-base-dialog.polyline>.content input.input-text {
|
.YJ-custom-base-dialog.polyline>.content input.input-text {
|
||||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||||
border-radius: unset !important;
|
border-radius: unset !important;
|
||||||
border-top: 1px solid rgba(var(--color-base1), 0.5) !important;
|
border: none;
|
||||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5) !important;
|
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 {
|
.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 .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-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 .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;
|
flex: 0 0 210px;
|
||||||
width: 210px;
|
width: 210px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -44,9 +44,13 @@ export const GraphApi = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//军标类型列表
|
//军标类型列表
|
||||||
modelTypeList: async () => {
|
modelTypeList: async (data: any) => {
|
||||||
return await request.get({
|
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`,
|
url: `/matter/deletes`,
|
||||||
data,
|
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({
|
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({
|
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;
|
position: relative;
|
||||||
top: 6px;
|
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 {
|
#mapxDiv {
|
||||||
bottom: 126px !important;
|
bottom: 126px !important;
|
||||||
|
|||||||
@ -52,8 +52,12 @@ const isUploading = ref(false)
|
|||||||
// 上传地址
|
// 上传地址
|
||||||
const uploadUrl = () => {
|
const uploadUrl = () => {
|
||||||
//process.env.BASE_API +
|
//process.env.BASE_API +
|
||||||
|
<<<<<<< HEAD
|
||||||
console.log(process.env.BASE_API, 'yyyyy')
|
console.log(process.env.BASE_API, 'yyyyy')
|
||||||
let url = (localStorage.getItem("ip") || 'http://127.0.0.1:8848') + '/auth/import'
|
let url = (localStorage.getItem("ip") || 'http://127.0.0.1:8848') + '/auth/import'
|
||||||
|
=======
|
||||||
|
let url = 'http://127.0.0.1:8848' + '/auth/import'
|
||||||
|
>>>>>>> 9394a3aef8b65530205a25c61da8405085d63c1c
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
// 上传前处理
|
// 上传前处理
|
||||||
@ -75,7 +79,7 @@ const handleSuccess = (response: any) => {
|
|||||||
isUploading.value = false
|
isUploading.value = false
|
||||||
} else {
|
} else {
|
||||||
isUploading.value = false
|
isUploading.value = false
|
||||||
ElMessage.success('授权成功')
|
ElMessage.success('文件授权成功')
|
||||||
eventBus.emit('upload', true)
|
eventBus.emit('upload', true)
|
||||||
}
|
}
|
||||||
// 可以在这里添加成功后的其他逻辑
|
// 可以在这里添加成功后的其他逻辑
|
||||||
|
|||||||
@ -2,8 +2,22 @@
|
|||||||
<div class="rightBox" v-if="isDesktop">
|
<div class="rightBox" v-if="isDesktop">
|
||||||
<el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
|
<el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
|
||||||
</div>
|
</div>
|
||||||
<video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
|
<video
|
||||||
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover;z-index: -1;"></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">
|
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="auth_info custom_scroll_bar content_h">
|
<div class="auth_info custom_scroll_bar content_h">
|
||||||
@ -12,7 +26,12 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authCode') }}
|
{{ t('auths.authCode') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_text" @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">
|
<div
|
||||||
|
class="auth_info_text"
|
||||||
|
@click="copy(authInfo.license_code)"
|
||||||
|
style="cursor: pointer"
|
||||||
|
title="点击可复制"
|
||||||
|
>
|
||||||
{{ authInfo.license_code || '' }}
|
{{ authInfo.license_code || '' }}
|
||||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
@ -35,8 +54,12 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authType') }}
|
{{ t('auths.authType') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px"
|
<div
|
||||||
:style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }">
|
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') }}
|
{{ 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> -->
|
||||||
@ -48,65 +71,70 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||||
<button @click="close">退出系统</button>
|
<button @click="close">退出系统</button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<div class="service" v-if="serviceDialog">
|
<div class="service" v-if="serviceDialog">
|
||||||
<div class="contentBox">
|
<div class="contentBox">
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<span class="title"></span>
|
<span class="title"></span>
|
||||||
<span class="closeBox">
|
<span class="closeBox">
|
||||||
<span @click="cancel">✕</span>
|
<span @click="cancel">✕</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="hello">Hello!</h1>
|
<h1 class="hello">Hello!</h1>
|
||||||
<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">
|
<el-tabs v-model="selectedService" class="demo-tabs">
|
||||||
<el-tab-pane label="接口服务" name="接口服务"></el-tab-pane>
|
<el-tab-pane label="接口服务" name="接口服务"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="tabPanel">
|
<div class="tabPanel">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="itemLabel">服务选择</span>
|
<span class="itemLabel">服务选择</span>
|
||||||
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
|
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
|
||||||
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
|
<el-option
|
||||||
:value="item.name">
|
size="mini"
|
||||||
</el-option>
|
v-for="item in servOptions"
|
||||||
</el-select>
|
:key="item.value"
|
||||||
</div>
|
:label="item.name"
|
||||||
<div class="item prototype" v-if="servVal == '网络'">
|
:value="item.name"
|
||||||
<span class="itemLabel">协议</span><el-input v-model="prototype"></el-input>
|
>
|
||||||
</div>
|
</el-option>
|
||||||
<div class="item ip">
|
</el-select>
|
||||||
<template v-if="servVal == '单机'">
|
</div>
|
||||||
<span class="itemLabel">IP</span>
|
<div class="item prototype" v-if="servVal == '网络'">
|
||||||
<el-input v-model="localip" disabled></el-input>
|
<span class="itemLabel">协议</span><el-input v-model="prototype"></el-input>
|
||||||
</template>
|
</div>
|
||||||
<template v-if="servVal == '网络'">
|
<div class="item ip">
|
||||||
<span class="itemLabel">IP</span>
|
<template v-if="servVal == '单机'">
|
||||||
<el-input v-model="ip"></el-input>
|
<span class="itemLabel">IP</span>
|
||||||
</template>
|
<el-input v-model="localip" disabled></el-input>
|
||||||
</div>
|
</template>
|
||||||
<div class="item port">
|
<template v-if="servVal == '网络'">
|
||||||
<template v-if="servVal == '单机'">
|
<span class="itemLabel">IP</span>
|
||||||
<span class="itemLabel">端口</span>
|
<el-input v-model="ip"></el-input>
|
||||||
<el-input v-model="localport"></el-input>
|
</template>
|
||||||
</template>
|
</div>
|
||||||
<template v-if="servVal == '网络'">
|
<div class="item port">
|
||||||
<span class="itemLabel">端口</span>
|
<template v-if="servVal == '单机'">
|
||||||
<el-input v-model="port"></el-input>
|
<span class="itemLabel">端口</span>
|
||||||
</template>
|
<el-input v-model="localport"></el-input>
|
||||||
</div>
|
</template>
|
||||||
|
<template v-if="servVal == '网络'">
|
||||||
|
<span class="itemLabel">端口</span>
|
||||||
|
<el-input v-model="port"></el-input>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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="submit">确定</el-button>
|
||||||
<el-button size="mini" @click="cancel">关闭</el-button>
|
<el-button size="mini" @click="cancel">关闭</el-button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -172,7 +200,7 @@ const getAuthInfo = async () => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '去授权',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '退出系统',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -201,7 +229,7 @@ const getStatus = (date) => {
|
|||||||
if (timestamp > currentTimestamp) {
|
if (timestamp > currentTimestamp) {
|
||||||
router.push({ path: '/login' })
|
router.push({ path: '/login' })
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '去授权',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '退出系统',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -222,7 +250,7 @@ const getStatus = (date) => {
|
|||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getAuthInfo()
|
getAuthInfo()
|
||||||
}, 5000);
|
}, 5000)
|
||||||
|
|
||||||
//授权页面
|
//授权页面
|
||||||
|
|
||||||
@ -254,7 +282,7 @@ const authInfo = ref({
|
|||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
//上传授权文件成功
|
//上传授权文件成功
|
||||||
eventBus.on('upload', (data) => {
|
let func = (data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
getAuthInfo2()
|
getAuthInfo2()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -267,7 +295,29 @@ eventBus.on('upload', (data) => {
|
|||||||
$sendElectronChanel('restart')
|
$sendElectronChanel('restart')
|
||||||
}, 3000)
|
}, 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()
|
const { toClipboard } = useClipboard()
|
||||||
|
|
||||||
@ -298,7 +348,7 @@ const getAuthCode = async () => {
|
|||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getAuthCode()
|
getAuthCode()
|
||||||
}, 5000);
|
}, 5000)
|
||||||
//复制
|
//复制
|
||||||
|
|
||||||
const copy = async (text) => {
|
const copy = async (text) => {
|
||||||
@ -374,7 +424,8 @@ const copy = async (text) => {
|
|||||||
z-index: 99;
|
z-index: 99;
|
||||||
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
|
||||||
border: 1.5px solid;
|
border: 1.5px solid;
|
||||||
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
|
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%)
|
||||||
|
1;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-family: 'sy-boldface';
|
font-family: 'sy-boldface';
|
||||||
}
|
}
|
||||||
@ -420,11 +471,11 @@ const copy = async (text) => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .title-box>.close-box {
|
::v-deep .title-box > .close-box {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .title-box>.title {
|
::v-deep .title-box > .title {
|
||||||
font-family: 'Ali-mother-counts-bold';
|
font-family: 'Ali-mother-counts-bold';
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -447,7 +498,7 @@ const copy = async (text) => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>button {
|
::v-deep .foot > button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: rgba(var(--color-base1), 0.2);
|
background: rgba(var(--color-base1), 0.2);
|
||||||
@ -459,12 +510,12 @@ const copy = async (text) => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>button:hover {
|
::v-deep .foot > button:hover {
|
||||||
border: 1px solid rgba(var(--color-base1), 1);
|
border: 1px solid rgba(var(--color-base1), 1);
|
||||||
color: rgba(var(--color-base1), 1);
|
color: rgba(var(--color-base1), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .foot>.show>.label {
|
::v-deep .foot > .show > .label {
|
||||||
margin: 0px 10px;
|
margin: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,7 +590,7 @@ const copy = async (text) => {
|
|||||||
border-radius: 0 0 0 90%;
|
border-radius: 0 0 0 90%;
|
||||||
background: rgba(var(--color-base1), 1);
|
background: rgba(var(--color-base1), 1);
|
||||||
|
|
||||||
&>span {
|
& > span {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
@ -636,7 +687,8 @@ const copy = async (text) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
|
|
||||||
.select {}
|
.select {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
{{ t('auths.noAuthexpire') }}
|
{{ t('auths.noAuthexpire') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
<uploadFiles accept=".YJ" :maxSize="1"></uploadFiles>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -68,11 +68,24 @@ const authInfo: any = ref({
|
|||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
//上传授权文件成功
|
//上传授权文件成功
|
||||||
eventBus.on('upload', (data) => {
|
let func = (data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
getAuthInfo()
|
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()
|
const { toClipboard } = useClipboard()
|
||||||
|
|
||||||
|
|||||||
@ -220,11 +220,32 @@ const routeImport = () => {
|
|||||||
path: path[0]
|
path: path[0]
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
ElMessage({
|
RouteApi.getRouteList().then((list) => {
|
||||||
message: '上传成功',
|
routeList.splice(0, routeList.length, ...list.data)
|
||||||
type: 'success'
|
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,72 +641,70 @@ function unzip_file(srcZipFile, dst) {
|
|||||||
//工程导出
|
//工程导出
|
||||||
let exportWin = false
|
let exportWin = false
|
||||||
function derive() {
|
function derive() {
|
||||||
if (!exportWin) {
|
// if (!exportWin) {
|
||||||
exportWin = !exportWin
|
// exportWin = !exportWin
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
const formattedDate = format(date, 'yyyyMMdd HHmmss')
|
const formattedDate = format(date, 'yyyyMMdd HHmmss')
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
title: '请选择要保存的文件名',
|
title: '请选择要保存的文件名',
|
||||||
buttonLabel: '保存',
|
buttonLabel: '保存',
|
||||||
filename: `工程${formattedDate}.zip`,
|
filename: `工程${formattedDate}.zip`,
|
||||||
filters: [{ name: '文件类型', extensions: ['zip'] }]
|
filters: [{ name: '文件类型', extensions: ['zip'] }]
|
||||||
}
|
|
||||||
$sendElectronChanel('saveFile', option)
|
|
||||||
$recvElectronChanel('selectedFileItem', (e, path) => {
|
|
||||||
if (path) {
|
|
||||||
// if (result.canceled) {
|
|
||||||
// this.exportWin = !this.exportWin
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// let loadingInstance = this.$openLoading('拼命导出中...')
|
|
||||||
exportWin = !exportWin
|
|
||||||
console.log('111111')
|
|
||||||
let arr = getElectronPath().replaceAll('\\', '/').split('/')
|
|
||||||
console.log(arr, '222222')
|
|
||||||
arr.pop()
|
|
||||||
arr[arr.length - 1] = 'yjearth/app.db'
|
|
||||||
let db_path: any = arr.join('/')
|
|
||||||
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
|
||||||
zip_file([db_path], path, () => {
|
|
||||||
// loadingInstance.close()
|
|
||||||
ElMessage({
|
|
||||||
message: '导出完成',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// dialog
|
|
||||||
// .showSaveDialog({
|
|
||||||
// title: '请选择要保存的文件名',
|
|
||||||
// buttonLabel: '保存',
|
|
||||||
// defaultPath: `工程${formattedDate}.zip`,
|
|
||||||
// filters: [{ name: '文件类型', extensions: ['zip'] }]
|
|
||||||
// })
|
|
||||||
// .then((result) => {
|
|
||||||
// if (result.canceled) {
|
|
||||||
// exportWin = !exportWin
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// // let loadingInstance = this.$openLoading('拼命导出中...')
|
|
||||||
// exportWin = !exportWin
|
|
||||||
// let arr = getElectronPath().replaceAll('\\', '/').split('/')
|
|
||||||
// arr[arr.length - 1] = 'database.ydb'
|
|
||||||
// let db_path: any = arr.join('/')
|
|
||||||
// zip_file([db_path], result.filePath, () => {
|
|
||||||
// // loadingInstance.close()
|
|
||||||
// ElMessage({
|
|
||||||
// message: '导出完成',
|
|
||||||
// type: 'success'
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// console.log(err)
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
$sendElectronChanel('saveFile', option)
|
||||||
|
$recvElectronChanel('selectedFileItem', (e, path) => {
|
||||||
|
if (path) {
|
||||||
|
// if (result.canceled) {
|
||||||
|
// this.exportWin = !this.exportWin
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// let loadingInstance = this.$openLoading('拼命导出中...')
|
||||||
|
// exportWin = !exportWin
|
||||||
|
let arr = getElectronPath().replaceAll('\\', '/').split('/')
|
||||||
|
arr.pop()
|
||||||
|
arr[arr.length - 1] = 'yjearth/app.db'
|
||||||
|
let db_path: any = arr.join('/')
|
||||||
|
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
|
||||||
|
zip_file([db_path], path, () => {
|
||||||
|
// loadingInstance.close()
|
||||||
|
ElMessage({
|
||||||
|
message: '导出完成',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// dialog
|
||||||
|
// .showSaveDialog({
|
||||||
|
// title: '请选择要保存的文件名',
|
||||||
|
// buttonLabel: '保存',
|
||||||
|
// defaultPath: `工程${formattedDate}.zip`,
|
||||||
|
// filters: [{ name: '文件类型', extensions: ['zip'] }]
|
||||||
|
// })
|
||||||
|
// .then((result) => {
|
||||||
|
// if (result.canceled) {
|
||||||
|
// exportWin = !exportWin
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// // let loadingInstance = this.$openLoading('拼命导出中...')
|
||||||
|
// exportWin = !exportWin
|
||||||
|
// let arr = getElectronPath().replaceAll('\\', '/').split('/')
|
||||||
|
// arr[arr.length - 1] = 'database.ydb'
|
||||||
|
// let db_path: any = arr.join('/')
|
||||||
|
// zip_file([db_path], result.filePath, () => {
|
||||||
|
// // loadingInstance.close()
|
||||||
|
// ElMessage({
|
||||||
|
// message: '导出完成',
|
||||||
|
// type: 'success'
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// .catch((err) => {
|
||||||
|
// console.log(err)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -46,14 +46,19 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:header-cell-style="{ 'text-align': 'center' }"
|
:header-cell-style="{ 'text-align': 'center' }"
|
||||||
|
:cell-style="{ 'text-align': 'center' }"
|
||||||
height="40vh"
|
height="40vh"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column prop="cameraName" label="设备名称" width="150" />
|
<el-table-column prop="cameraName" label="设备名称" width="150" />
|
||||||
<el-table-column prop="deviceType" label="设备类型" width="120">
|
<el-table-column prop="deviceType" label="设备类型" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span class="deviceType"></span>
|
<span
|
||||||
<!-- {{ statusTrans(scope.row.type) }} -->
|
class="deviceType"
|
||||||
|
:style="{
|
||||||
|
background: scope.row.status ? 'rgba(0, 194, 142, 1)' : 'rgba(241, 108, 85, 1)'
|
||||||
|
}"
|
||||||
|
></span>
|
||||||
{{ scope.row.type }}
|
{{ scope.row.type }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@ -212,12 +212,14 @@ const treeRef = ref()
|
|||||||
var sortableInstance: any = reactive(null)
|
var sortableInstance: any = reactive(null)
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
var photoName = ref(null)
|
var photoName = ref('')
|
||||||
|
|
||||||
watch(photoName, (val) => {
|
watch(photoName, (val) => {
|
||||||
if (treeRef.value && treeRef.value !== '') {
|
// if (treeRef.value && treeRef.value !== '') {
|
||||||
treeRef.value!.filter(val)
|
// treeRef.value!.filter(val)
|
||||||
}
|
// }
|
||||||
|
modelList.value = []
|
||||||
|
getModelList()
|
||||||
})
|
})
|
||||||
const filterNode: any = (value, data) => {
|
const filterNode: any = (value, data) => {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
@ -293,7 +295,9 @@ eventBus.on('settingPop', (data) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getModelList = async () => {
|
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) {
|
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
|
||||||
@ -536,6 +540,7 @@ const toggleExpand = (row: any) => {
|
|||||||
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', photoName.value)
|
||||||
GraphApi.showModelByType(formData).then((res) => {
|
GraphApi.showModelByType(formData).then((res) => {
|
||||||
modelList.value = res.data
|
modelList.value = res.data
|
||||||
})
|
})
|
||||||
@ -634,7 +639,6 @@ const handleImportModel = (row: TypeNode) => {
|
|||||||
$sendElectronChanel('open-directory-dialog', option)
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||||
if (paths.length) {
|
if (paths.length) {
|
||||||
console.log(paths, 'paths')
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('filePaths', paths)
|
formData.append('filePaths', paths)
|
||||||
formData.append('militaryTypeId', clickTreeNode.id)
|
formData.append('militaryTypeId', clickTreeNode.id)
|
||||||
@ -807,9 +811,8 @@ const handleDelete = (row: any) => {
|
|||||||
formData.append('militaryId', row.id)
|
formData.append('militaryId', row.id)
|
||||||
GraphApi.delModel(formData).then((res) => {
|
GraphApi.delModel(formData).then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage.success('删除成功')
|
|
||||||
getModelListByType(row.militaryTypeId)
|
getModelListByType(row.militaryTypeId)
|
||||||
console.log(res, 'resres')
|
ElMessage.success('删除成功')
|
||||||
if (res.data?.length) {
|
if (res.data?.length) {
|
||||||
//删除对应的树数据和地图数据
|
//删除对应的树数据和地图数据
|
||||||
res.data.forEach((item) => {
|
res.data.forEach((item) => {
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:header-cell-style="{ 'text-align': 'center' }"
|
:header-cell-style="{ 'text-align': 'center' }"
|
||||||
|
:cell-style="{ 'text-align': 'center' }"
|
||||||
height="40vh"
|
height="40vh"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -237,12 +237,14 @@ const closeDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
var photoName = ref(null)
|
var photoName = ref('')
|
||||||
|
|
||||||
watch(photoName, (val) => {
|
watch(photoName, (val) => {
|
||||||
if (treeRef.value && treeRef.value !== '') {
|
// if (treeRef.value && treeRef.value !== '') {
|
||||||
treeRef.value!.filter(val)
|
// treeRef.value!.filter(val)
|
||||||
}
|
// }
|
||||||
|
getModelList()
|
||||||
|
modelList.value = []
|
||||||
})
|
})
|
||||||
const filterNode: any = (value, data) => {
|
const filterNode: any = (value, data) => {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
@ -281,8 +283,7 @@ const addType = () => {
|
|||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取模型列表
|
let setFunc = (data) => {
|
||||||
eventBus.on('settingPop', (data) => {
|
|
||||||
if (data) {
|
if (data) {
|
||||||
//关闭弹框时更新模型列表
|
//关闭弹框时更新模型列表
|
||||||
getModelList()
|
getModelList()
|
||||||
@ -290,7 +291,24 @@ eventBus.on('settingPop', (data) => {
|
|||||||
// getModelListByType(showImageRow.modelTypeId)
|
// getModelListByType(showImageRow.modelTypeId)
|
||||||
showImageRow = null
|
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([])
|
var expandedKeys: any = ref([])
|
||||||
// 获取当前所有展开节点的key
|
// 获取当前所有展开节点的key
|
||||||
@ -307,7 +325,9 @@ const updateExpandedState = () => {
|
|||||||
expandedKeys.value = keys
|
expandedKeys.value = keys
|
||||||
}
|
}
|
||||||
const getModelList = async () => {
|
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) {
|
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
|
||||||
@ -622,6 +642,7 @@ const getModelListByType = (id) => {
|
|||||||
clickTypeId = id
|
clickTypeId = id
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('modelTypeId', id)
|
formData.append('modelTypeId', id)
|
||||||
|
formData.append('name', photoName.value)
|
||||||
ModelApi.showModelByType(formData).then((res) => {
|
ModelApi.showModelByType(formData).then((res) => {
|
||||||
modelList.value = res.data
|
modelList.value = res.data
|
||||||
})
|
})
|
||||||
@ -721,7 +742,6 @@ const handleAddChildType = (row: TypeNode) => {
|
|||||||
// triggerUpload()
|
// triggerUpload()
|
||||||
// }
|
// }
|
||||||
const handleImportModel = (row: TypeNode) => {
|
const handleImportModel = (row: TypeNode) => {
|
||||||
console.log('aaaaaaa')
|
|
||||||
let option = {
|
let option = {
|
||||||
properties: ['openFile', 'multiSelections'],
|
properties: ['openFile', 'multiSelections'],
|
||||||
filters: [
|
filters: [
|
||||||
@ -893,9 +913,9 @@ const handleDelete = (row: ModelItem) => {
|
|||||||
formData.append('modelId', row.id)
|
formData.append('modelId', row.id)
|
||||||
ModelApi.delModel(formData).then((res) => {
|
ModelApi.delModel(formData).then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage.success('删除成功')
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
getModelListByType(row.modelTypeId)
|
getModelListByType(row.modelTypeId)
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
|
||||||
if (res.data?.length) {
|
if (res.data?.length) {
|
||||||
//删除对应的树数据和地图数据
|
//删除对应的树数据和地图数据
|
||||||
@ -906,7 +926,6 @@ const handleDelete = (row: ModelItem) => {
|
|||||||
;(window as any)._entityMap.delete(item)
|
;(window as any)._entityMap.delete(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(res, 'resres')
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -263,12 +263,14 @@ const getExpandedKeys = () => {
|
|||||||
.map((node: any) => node.key)
|
.map((node: any) => node.key)
|
||||||
}
|
}
|
||||||
|
|
||||||
var photoName = ref(null)
|
var photoName = ref('')
|
||||||
|
|
||||||
watch(photoName, (val) => {
|
watch(photoName, (val) => {
|
||||||
if (treeRef.value && treeRef.value !== '') {
|
// if (treeRef.value && treeRef.value !== '') {
|
||||||
treeRef.value!.filter(val)
|
// treeRef.value!.filter(val)
|
||||||
}
|
// }
|
||||||
|
getModelList()
|
||||||
|
modelList.value = []
|
||||||
})
|
})
|
||||||
const filterNode: any = (value, data) => {
|
const filterNode: any = (value, data) => {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
@ -373,7 +375,9 @@ const getModelList = async () => {
|
|||||||
]
|
]
|
||||||
} else {
|
} 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) {
|
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
|
||||||
@ -633,6 +637,7 @@ const getModelListByType = async (id) => {
|
|||||||
} else {
|
} else {
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('iconTypeId', id)
|
formData.append('iconTypeId', id)
|
||||||
|
formData.append('name', photoName.value)
|
||||||
PhotoApi.showModelByType(formData).then((res) => {
|
PhotoApi.showModelByType(formData).then((res) => {
|
||||||
modelList.value = res.data
|
modelList.value = res.data
|
||||||
})
|
})
|
||||||
@ -730,8 +735,33 @@ const handleAddChildType = (row: TypeNode) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const handleImportModel = (row: TypeNode) => {
|
||||||
|
// triggerUpload()
|
||||||
|
// }
|
||||||
const handleImportModel = (row: TypeNode) => {
|
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) => {
|
const handleRenameType = (row: TypeNode) => {
|
||||||
@ -880,8 +910,8 @@ const handleDelete = (row: any) => {
|
|||||||
formData.append('iconId', row.id)
|
formData.append('iconId', row.id)
|
||||||
PhotoApi.delModel(formData).then((res) => {
|
PhotoApi.delModel(formData).then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage.success('删除成功')
|
|
||||||
getModelListByType(row.iconTypeId)
|
getModelListByType(row.iconTypeId)
|
||||||
|
ElMessage.success('删除成功')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -897,7 +927,6 @@ const setPhotoList = () => {
|
|||||||
dirName1s: 'GEMarker1s'
|
dirName1s: 'GEMarker1s'
|
||||||
})
|
})
|
||||||
$recvElectronChanel('dirFiles', (e, res) => {
|
$recvElectronChanel('dirFiles', (e, res) => {
|
||||||
console.log('dirFiles', res)
|
|
||||||
res.GEMarker1s.forEach((item) => {
|
res.GEMarker1s.forEach((item) => {
|
||||||
let name = item.split('.')[0]
|
let name = item.split('.')[0]
|
||||||
name = name.split('/')[1]
|
name = name.split('/')[1]
|
||||||
|
|||||||
@ -634,7 +634,7 @@ const setData = () => {
|
|||||||
TreeApi.getTreeDefault().then((res) => {
|
TreeApi.getTreeDefault().then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '添加完成,2秒后,将重启系统',
|
message: '添加完成,2秒后将重启系统',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="set_pup">
|
<div class="set_pup">
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="isShowPup"
|
v-model="isShowPup"
|
||||||
:modal="false"
|
:modal="true"
|
||||||
draggable
|
draggable
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
|
|||||||
@ -687,6 +687,7 @@ const methodMap = {
|
|||||||
})
|
})
|
||||||
dom?.classList.remove('default-cursor')
|
dom?.classList.remove('default-cursor')
|
||||||
dom?.classList.add('custom-cursor')
|
dom?.classList.add('custom-cursor')
|
||||||
|
console.log(document.getElementsByClassName('custom-cursor')[0].style, 'llllll')
|
||||||
} else {
|
} else {
|
||||||
dom?.classList.remove('custom-cursor')
|
dom?.classList.remove('custom-cursor')
|
||||||
dom?.classList.add('default-cursor')
|
dom?.classList.add('default-cursor')
|
||||||
@ -1044,7 +1045,7 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
.custom-cursor {
|
.custom-cursor {
|
||||||
cursor:
|
cursor:
|
||||||
url('@/assets/img/mouse.png') 16 16,
|
url('@/assets/img/defaultMouse.png') 2 11,
|
||||||
auto;
|
auto;
|
||||||
}
|
}
|
||||||
.default-cursor {
|
.default-cursor {
|
||||||
@ -1059,6 +1060,7 @@ defineExpose({
|
|||||||
position: relative;
|
position: relative;
|
||||||
background: unset !important;
|
background: unset !important;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
line-height: 150px;
|
||||||
/* background: url('@/assets/img/timerBg.png') !important;
|
/* background: url('@/assets/img/timerBg.png') !important;
|
||||||
animation: rotate-bg 5s infinite linear; */
|
animation: rotate-bg 5s infinite linear; */
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="flex: 0 0 205px">
|
<div class="col" style="flex: 0 0 205px">
|
||||||
<span class="label">名称</span>
|
<span class="label">名称</span>
|
||||||
<input class="input" type="text" name="name" placeholder="请输入名称"/>
|
<input class="input" type="text" name="name" placeholder="请输入名称" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col">
|
<!-- <div class="col">
|
||||||
<input
|
<input
|
||||||
@ -209,7 +209,7 @@
|
|||||||
录制
|
录制
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="saveRoam" @click="draw">保存</button>
|
<button class="saveRoam" @click="save">保存</button>
|
||||||
<button @click="close">取消</button>
|
<button @click="close">取消</button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@ -217,18 +217,18 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//@ts-nocheck
|
//@ts-nocheck
|
||||||
import {ref, reactive, onBeforeUnmount} from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import {inject} from 'vue'
|
import { inject } from 'vue'
|
||||||
import {useI18n} from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
import {app} from 'electron'
|
import { app } from 'electron'
|
||||||
import {TreeApi} from '@/api/tree'
|
import { TreeApi } from '@/api/tree'
|
||||||
import {useTreeNode} from '../tree/hooks/treeNode'
|
import { useTreeNode } from '../tree/hooks/treeNode'
|
||||||
import {ElMessage} from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import {$sendElectronChanel} from '@/utils/communication'
|
import { $sendElectronChanel } from '@/utils/communication'
|
||||||
|
|
||||||
const {t} = useI18n()
|
const { t } = useI18n()
|
||||||
const {cusAddNodes} = useTreeNode()
|
const { cusAddNodes, cusUpdateNode } = useTreeNode()
|
||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -240,18 +240,35 @@ eventBus.on('flyRoamDialog', () => {
|
|||||||
show.value = true
|
show.value = true
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
|
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
const open = () => {
|
let beforeData = []
|
||||||
|
const open = (data) => {
|
||||||
|
beforeData = data
|
||||||
show.value = true
|
show.value = true
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
setTimeout(() => {
|
if (data) {
|
||||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, {repeat: Infinity}, {}, draw)
|
let roamData = JSON.parse(data.params)
|
||||||
}, 100)
|
setTimeout(() => {
|
||||||
|
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 selectedNodes = window.treeObj.getSelectedNodes()
|
||||||
let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
|
let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
|
||||||
let parentId
|
let parentId
|
||||||
@ -262,19 +279,39 @@ const draw = (data) => {
|
|||||||
parentId = node.parentId
|
parentId = node.parentId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let id = new YJ.Tools().randomString()
|
let id = (beforeData && beforeData.id) || new YJ.Tools().randomString()
|
||||||
let paramsData: any = {
|
let paramsData: any = {
|
||||||
params: data,
|
params: allData,
|
||||||
id,
|
id,
|
||||||
sourceName: t(`default.roam`),
|
sourceName: allData.name || t(`default.roam`),
|
||||||
sourceType: 'roam',
|
sourceType: 'roam',
|
||||||
parentId: parentId
|
parentId: parentId
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeApi.addOtherSource(paramsData)
|
if (beforeData && beforeData.id) {
|
||||||
paramsData.isShow = true
|
// let params2 = {
|
||||||
paramsData.params = JSON.stringify(paramsData.params)
|
// "id": params.id,
|
||||||
cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
|
// "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()
|
baseDialog.value?.close()
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -283,6 +320,9 @@ const draw = (data) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const draw = (data) => {
|
||||||
|
allData = data
|
||||||
|
}
|
||||||
|
|
||||||
const startVideo = () => {
|
const startVideo = () => {
|
||||||
document.getElementById('earthContainer').style.zIndex = 100
|
document.getElementById('earthContainer').style.zIndex = 100
|
||||||
@ -302,8 +342,7 @@ const startVideo = () => {
|
|||||||
window.addEventListener('keydown', handleKeyDown)
|
window.addEventListener('keydown', handleKeyDown)
|
||||||
}
|
}
|
||||||
|
|
||||||
const clangeViewPointHeight = () => {
|
const clangeViewPointHeight = () => {}
|
||||||
}
|
|
||||||
const viewPointHeightInput = () => {
|
const viewPointHeightInput = () => {
|
||||||
let dom: any = document.getElementById('viewPointHeight')
|
let dom: any = document.getElementById('viewPointHeight')
|
||||||
if (viewPointHeight.value < dom.min * 1) {
|
if (viewPointHeight.value < dom.min * 1) {
|
||||||
@ -334,8 +373,9 @@ defineExpose({
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.afreshPlay {
|
.afreshPlay {
|
||||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
background:
|
||||||
linear-gradient(180deg, rgba(27, 248, 195, 0.2) 0%, rgba(27, 248, 195, 0) 100%) !important;
|
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;
|
border: 1px solid rgba(27, 248, 195, 1) !important;
|
||||||
color: rgba(27, 248, 195, 1) !important;
|
color: rgba(27, 248, 195, 1) !important;
|
||||||
|
|
||||||
@ -345,8 +385,9 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cease {
|
.cease {
|
||||||
background: linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
background:
|
||||||
rgba(0, 0, 0, 0.5) !important;
|
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;
|
border: 1px solid rgba(241, 108, 85, 1) !important;
|
||||||
color: rgba(241, 108, 85, 1) !important;
|
color: rgba(241, 108, 85, 1) !important;
|
||||||
|
|
||||||
@ -356,13 +397,14 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.video {
|
.video {
|
||||||
background: linear-gradient(
|
background:
|
||||||
|
linear-gradient(
|
||||||
180deg,
|
180deg,
|
||||||
rgba(71, 27, 5, 0.3) 0%,
|
rgba(71, 27, 5, 0.3) 0%,
|
||||||
rgba(71, 27, 5, 0.3) 0%,
|
rgba(71, 27, 5, 0.3) 0%,
|
||||||
rgba(255, 143, 87, 0) 100%
|
rgba(255, 143, 87, 0) 100%
|
||||||
),
|
),
|
||||||
rgba(0, 0, 0, 0.5) !important;
|
rgba(0, 0, 0, 0.5) !important;
|
||||||
border: 1px solid rgba(255, 165, 92, 1) !important;
|
border: 1px solid rgba(255, 165, 92, 1) !important;
|
||||||
color: rgba(255, 165, 92, 1) !important;
|
color: rgba(255, 165, 92, 1) !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,50 +159,60 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(itemInArea, 'itemInArea')
|
||||||
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.detail.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]
|
||||||
if (shpTotalDict.indexOf(key) != -1) {
|
// if (shpTotalDict.indexOf(key) != -1) {
|
||||||
name = key
|
// name = 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)
|
||||||
|
console.log(res, 'resssssssssss')
|
||||||
|
y = Object.values(res.data)
|
||||||
|
x = Object.keys(res.data)
|
||||||
|
console.log(x, y, 'x')
|
||||||
|
|
||||||
let notZeroX: any = []
|
let notZeroX: any = []
|
||||||
let notZeroY: any = []
|
let notZeroY: any = []
|
||||||
|
|||||||
@ -57,23 +57,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<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">
|
<div class="col">
|
||||||
<span class="label">最低水位</span>
|
<span class="label">最低水位</span>
|
||||||
<div class="input-number input-number-unit-3">
|
<div class="input-number input-number-unit-3">
|
||||||
@ -91,6 +74,23 @@
|
|||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
<!-- <span class="custom-divider"></span> -->
|
<!-- <span class="custom-divider"></span> -->
|
||||||
|
|||||||
@ -44,8 +44,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="cancel">取消</el-button>
|
|
||||||
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -71,11 +71,11 @@ var peopleFormRef: any = ref('')
|
|||||||
var addForm: any = ref({
|
var addForm: any = ref({
|
||||||
cameraName: '',
|
cameraName: '',
|
||||||
ip: '',
|
ip: '',
|
||||||
port: '',
|
port: 554,
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
type: '',
|
type: '',
|
||||||
channel: ''
|
channel: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
const peopleRules: any = reactive({
|
const peopleRules: any = reactive({
|
||||||
@ -124,11 +124,11 @@ var cancel = () => {
|
|||||||
addForm.value = {
|
addForm.value = {
|
||||||
cameraName: '',
|
cameraName: '',
|
||||||
ip: '',
|
ip: '',
|
||||||
port: '',
|
port: 554,
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
type: '',
|
type: '',
|
||||||
channel: ''
|
channel: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var submitProtal = () => {
|
var submitProtal = () => {
|
||||||
@ -178,11 +178,11 @@ let func = (params) => {
|
|||||||
addForm.value = {
|
addForm.value = {
|
||||||
cameraName: '',
|
cameraName: '',
|
||||||
ip: '',
|
ip: '',
|
||||||
port: '',
|
port: 554,
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
type: '',
|
type: '',
|
||||||
channel: ''
|
channel: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="cancel">取消</el-button>
|
|
||||||
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
<el-button type="primary" @click="submitProtal"> 确定 </el-button>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -29,8 +29,29 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" v-show="showDis">
|
<div class="col" style="padding-top: 20px" v-show="showDis">
|
||||||
<span class="label">间距</span>
|
<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">
|
<div class="input-number input-number-unit-1">
|
||||||
<input
|
<input
|
||||||
id="modelDistance"
|
id="modelDistance"
|
||||||
@ -46,7 +67,7 @@
|
|||||||
/>
|
/>
|
||||||
<span class="unit">m</span>
|
<span class="unit">m</span>
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -70,8 +91,17 @@ const eventBus: any = inject('bus')
|
|||||||
const viewPointHeight: any = ref(1.8)
|
const viewPointHeight: any = ref(1.8)
|
||||||
var visibility: any = reactive([])
|
var visibility: any = reactive([])
|
||||||
var showDis: any = ref(false)
|
var showDis: any = ref(false)
|
||||||
|
var peopleFormRef: any = ref('')
|
||||||
|
|
||||||
var type: any = ref('point')
|
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)
|
var distance: any = ref(null)
|
||||||
|
|
||||||
const options = [
|
const options = [
|
||||||
@ -91,7 +121,8 @@ const options = [
|
|||||||
eventBus.on('openGraphSetting', (show, data) => {
|
eventBus.on('openGraphSetting', (show, data) => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
show && (type.value = show.key)
|
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()
|
typeChange()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -120,22 +151,41 @@ const viewPointHeightInput = () => {
|
|||||||
}
|
}
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
type.value = 'point'
|
type.value = 'point'
|
||||||
distance.value = null
|
// distance.value = null
|
||||||
|
addForm.value.distance = null
|
||||||
eventBus.emit('closeModelSetGraph', true)
|
eventBus.emit('closeModelSetGraph', true)
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
const save = () => {
|
const save = () => {
|
||||||
ModelApi.modelSetting({
|
if (showDis.value) {
|
||||||
key: type.value,
|
peopleFormRef.value.validate(async (valid) => {
|
||||||
value: showDis.value ? distance.value : ''
|
if (valid) {
|
||||||
}).then((res) => {
|
ModelApi.modelSetting({
|
||||||
if (res.code == 0 || res.code == 200) {
|
key: type.value,
|
||||||
ElMessage.success('设置成功')
|
// value: showDis.value ? distance.value : ''
|
||||||
baseDialog.value?.close()
|
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>
|
</script>
|
||||||
|
|
||||||
@ -154,4 +204,7 @@ const save = () => {
|
|||||||
::v-deep .el-select__placeholder {
|
::v-deep .el-select__placeholder {
|
||||||
color: rgba(204, 204, 204, 1) !important;
|
color: rgba(204, 204, 204, 1) !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -58,7 +58,7 @@ const service = ref(localStorage.getItem('ip'))
|
|||||||
// var newData: any = reactive({
|
// var newData: any = reactive({
|
||||||
// name: ''
|
// name: ''
|
||||||
// })
|
// })
|
||||||
eventBus.on('imagePopDialog', (data) => {
|
let func = (data) => {
|
||||||
rowData = data
|
rowData = data
|
||||||
rowData.name = data.modelName
|
rowData.name = data.modelName
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
@ -67,7 +67,25 @@ eventBus.on('imagePopDialog', (data) => {
|
|||||||
loadModel()
|
loadModel()
|
||||||
animate()
|
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)
|
const threeCanvas: any = ref(null)
|
||||||
let scene, camera, renderer, model, controls
|
let scene, camera, renderer, model, controls
|
||||||
@ -194,8 +212,29 @@ const setImage = (e) => {
|
|||||||
canvas.toBlob((blob) => {
|
canvas.toBlob((blob) => {
|
||||||
const file = new File([blob], 'filename.png', { type: 'image/png' })
|
const file = new File([blob], 'filename.png', { type: 'image/png' })
|
||||||
imageData.value = file
|
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')
|
}, '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) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
@ -204,7 +243,7 @@ const save = (e) => {
|
|||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('modelId', rowData.id)
|
formData.append('modelId', rowData.id)
|
||||||
rowData.name && formData.append('modelName', rowData.name)
|
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) => {
|
ModelApi.updatePoster(formData).then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage.success('设置成功')
|
ElMessage.success('设置成功')
|
||||||
|
|||||||
@ -311,9 +311,11 @@ 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 = []
|
||||||
|
getModelList()
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(isShowPup, (val) => {
|
watch(isShowPup, (val) => {
|
||||||
@ -561,13 +563,16 @@ const renderModel = async (data, model) => {
|
|||||||
const getModelListByType = (id) => {
|
const getModelListByType = (id) => {
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('modelTypeId', id)
|
formData.append('modelTypeId', id)
|
||||||
|
formData.append('name', modelName.value)
|
||||||
ModelApi.showModelByType(formData).then((res) => {
|
ModelApi.showModelByType(formData).then((res) => {
|
||||||
categories.value = res.data
|
categories.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getModelList = async () => {
|
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) {
|
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
|
||||||
|
|||||||
@ -29,8 +29,29 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" v-show="showDis">
|
<div class="col" style="margin-top: 20px" v-show="showDis">
|
||||||
<span class="label">间距</span>
|
<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">
|
<div class="input-number input-number-unit-1">
|
||||||
<input
|
<input
|
||||||
id="modelDistance"
|
id="modelDistance"
|
||||||
@ -46,7 +67,7 @@
|
|||||||
/>
|
/>
|
||||||
<span class="unit">m</span>
|
<span class="unit">m</span>
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -70,6 +91,15 @@ const eventBus: any = inject('bus')
|
|||||||
const viewPointHeight: any = ref(1.8)
|
const viewPointHeight: any = ref(1.8)
|
||||||
var visibility: any = reactive([])
|
var visibility: any = reactive([])
|
||||||
var showDis: any = ref(false)
|
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 type: any = ref('point')
|
||||||
var distance: any = ref(null)
|
var distance: any = ref(null)
|
||||||
@ -91,7 +121,8 @@ const options = [
|
|||||||
eventBus.on('openModelSetting', (show, data) => {
|
eventBus.on('openModelSetting', (show, data) => {
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
show && (type.value = show.key)
|
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()
|
typeChange()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -120,22 +151,41 @@ const viewPointHeightInput = () => {
|
|||||||
}
|
}
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
type.value = 'point'
|
type.value = 'point'
|
||||||
distance.value = null
|
// distance.value = null
|
||||||
|
addForm.value.distance = null
|
||||||
eventBus.emit('closeModelSet', true)
|
eventBus.emit('closeModelSet', true)
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
const save = () => {
|
const save = () => {
|
||||||
ModelApi.modelSetting({
|
if (showDis.value) {
|
||||||
key: type.value,
|
peopleFormRef.value.validate(async (valid) => {
|
||||||
value: showDis.value ? distance.value : ''
|
if (valid) {
|
||||||
}).then((res) => {
|
ModelApi.modelSetting({
|
||||||
if (res.code == 0 || res.code == 200) {
|
key: type.value,
|
||||||
ElMessage.success('设置成功')
|
// value: showDis.value ? distance.value : ''
|
||||||
baseDialog.value?.close()
|
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>
|
</script>
|
||||||
|
|
||||||
@ -154,4 +204,7 @@ const save = () => {
|
|||||||
::v-deep .el-select__placeholder {
|
::v-deep .el-select__placeholder {
|
||||||
color: rgba(204, 204, 204, 1) !important;
|
color: rgba(204, 204, 204, 1) !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
import {TreeApi} from '@/api/tree'
|
import { TreeApi } from '@/api/tree'
|
||||||
import {$changeComponentPop} from '@/utils/communication'
|
import { $changeComponentPop } from '@/utils/communication'
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||||
import {initMapData} from '@/common/initMapData'
|
import { initMapData } from '@/common/initMapData'
|
||||||
import {GisApi} from '@/api/gisApi'
|
import { GisApi } from '@/api/gisApi'
|
||||||
import {addMapSource} from '@/common/addMapSource'
|
import { addMapSource } from '@/common/addMapSource'
|
||||||
import {getNamefromPath} from '@/utils/index'
|
import { getNamefromPath } from '@/utils/index'
|
||||||
import {renderVector} from './renderVector'
|
import { renderVector } from './renderVector'
|
||||||
|
|
||||||
const {cusAddNodes} = useTreeNode()
|
const { cusAddNodes } = useTreeNode()
|
||||||
|
|
||||||
export const useRightOperate = () => {
|
export const useRightOperate = () => {
|
||||||
const {getSelectedNodes, cusRemoveNode, cusUpdateNode} = useTreeNode()
|
const { getSelectedNodes, cusRemoveNode, cusUpdateNode } = useTreeNode()
|
||||||
|
|
||||||
//添加文件
|
//添加文件
|
||||||
const addDirectory = () => {
|
const addDirectory = () => {
|
||||||
@ -19,12 +19,12 @@ export const useRightOperate = () => {
|
|||||||
}
|
}
|
||||||
//添加资源
|
//添加资源
|
||||||
const addResource = () => {
|
const addResource = () => {
|
||||||
const {ipcRenderer} = require('electron')
|
const { ipcRenderer } = require('electron')
|
||||||
const options = {
|
const options = {
|
||||||
properties: ['openFile'], // 允许选择多个文件
|
properties: ['openFile'], // 允许选择多个文件
|
||||||
filters: [
|
filters: [
|
||||||
{name: '模型、影像、地形', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak']},
|
{ name: '模型、影像、地形', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak'] },
|
||||||
{name: '矢量数据', extensions: ['kmz', 'kml', 'shp', 'tab', 'mif', 'geojson']},
|
{ name: '矢量数据', extensions: ['kmz', 'kml', 'shp', 'tab', 'mif', 'geojson'] },
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let selectedNodes = window.treeObj.getSelectedNodes()
|
let selectedNodes = window.treeObj.getSelectedNodes()
|
||||||
@ -159,7 +159,7 @@ export const useRightOperate = () => {
|
|||||||
res.data.params.id = res.data.id
|
res.data.params.id = res.data.id
|
||||||
}
|
}
|
||||||
let detail = JSON.parse(res.data.detail)
|
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) => {
|
await initMapData(res.data.sourceType, mapParams, (entity) => {
|
||||||
entity.flyTo()
|
entity.flyTo()
|
||||||
@ -192,9 +192,9 @@ export const useRightOperate = () => {
|
|||||||
{
|
{
|
||||||
description: '全景图',
|
description: '全景图',
|
||||||
accept:
|
accept:
|
||||||
{
|
{
|
||||||
'image/jpg': ['.jpg']
|
'image/jpg': ['.jpg']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
excludeAcceptAllOption: true,
|
excludeAcceptAllOption: true,
|
||||||
@ -234,9 +234,9 @@ export const useRightOperate = () => {
|
|||||||
{
|
{
|
||||||
description: '无人机航拍',
|
description: '无人机航拍',
|
||||||
accept:
|
accept:
|
||||||
{
|
{
|
||||||
'image/jpg': ['.jpg']
|
'image/jpg': ['.jpg']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
excludeAcceptAllOption: true,
|
excludeAcceptAllOption: true,
|
||||||
@ -295,7 +295,7 @@ export const useRightOperate = () => {
|
|||||||
if (!entity) {
|
if (!entity) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
GisApi.parseCsv({filePath: paths[0]}).then((res)=>{
|
GisApi.parseCsv({ filePath: paths[0] }).then((res) => {
|
||||||
if (res.code === 0 || res.code === 200) {
|
if (res.code === 0 || res.code === 200) {
|
||||||
let params = JSON.parse(node.params)
|
let params = JSON.parse(node.params)
|
||||||
params.headTables = res.data
|
params.headTables = res.data
|
||||||
@ -330,12 +330,14 @@ export const useRightOperate = () => {
|
|||||||
}
|
}
|
||||||
//编辑
|
//编辑
|
||||||
const editNode = (eventBus, node) => {
|
const editNode = (eventBus, node) => {
|
||||||
|
console.log(node, 'nnodenodenodenodeode')
|
||||||
if (!node) {
|
if (!node) {
|
||||||
let selectNodes = getSelectedNodes(window.treeObj);
|
let selectNodes = getSelectedNodes(window.treeObj);
|
||||||
if (selectNodes && selectNodes[selectNodes.length - 1]) {
|
if (selectNodes && selectNodes[selectNodes.length - 1]) {
|
||||||
node = selectNodes[selectNodes.length - 1]
|
node = selectNodes[selectNodes.length - 1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(node.id, 'nnodenodenodenodeode')
|
||||||
if (node) {
|
if (node) {
|
||||||
if (node.sourceType == 'pressModel' || node.sourceType == 'roam') {
|
if (node.sourceType == 'pressModel' || node.sourceType == 'roam') {
|
||||||
eventBus.emit("openDialog", node.sourceType, node);
|
eventBus.emit("openDialog", node.sourceType, node);
|
||||||
@ -354,7 +356,7 @@ export const useRightOperate = () => {
|
|||||||
.then(async () => {
|
.then(async () => {
|
||||||
let selectNodes = getSelectedNodes(window.treeObj)
|
let selectNodes = getSelectedNodes(window.treeObj)
|
||||||
let source_ids = cusRemoveNode(window.treeObj, selectNodes)
|
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) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '删除成功',
|
message: '删除成功',
|
||||||
@ -363,7 +365,7 @@ export const useRightOperate = () => {
|
|||||||
console.log('source_ids-----------', source_ids)
|
console.log('source_ids-----------', source_ids)
|
||||||
source_ids.forEach(item => {
|
source_ids.forEach(item => {
|
||||||
let entity = (window as any)._entityMap.get(item)
|
let entity = (window as any)._entityMap.get(item)
|
||||||
if(entity) {
|
if (entity) {
|
||||||
entity.remove();
|
entity.remove();
|
||||||
(window as any)._entityMap.delete(entity.options.id)
|
(window as any)._entityMap.delete(entity.options.id)
|
||||||
}
|
}
|
||||||
@ -430,7 +432,7 @@ export const useRightOperate = () => {
|
|||||||
entityObject.resetCustomView()
|
entityObject.resetCustomView()
|
||||||
params.customView = entityObject.customView
|
params.customView = entityObject.customView
|
||||||
let sourceName = params.name
|
let sourceName = params.name
|
||||||
if(node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
if (node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
||||||
sourceName = params.text
|
sourceName = params.text
|
||||||
}
|
}
|
||||||
let params2 = {
|
let params2 = {
|
||||||
@ -443,7 +445,7 @@ export const useRightOperate = () => {
|
|||||||
"isShow": node.isShow ? 1 : 0,
|
"isShow": node.isShow ? 1 : 0,
|
||||||
}
|
}
|
||||||
TreeApi.updateDirectoryInfo(params2)
|
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) {
|
if (arr.includes(item.sourceType) && item.isShow) {
|
||||||
let entityOptions = (window as any)._entityMap.get(item.id)
|
let entityOptions = (window as any)._entityMap.get(item.id)
|
||||||
let layerIndex = entityOptions.layerIndex;
|
let layerIndex = entityOptions.layerIndex;
|
||||||
layers.push({id: item.id, layerIndex});
|
layers.push({ id: item.id, layerIndex });
|
||||||
// let params = {
|
// let params = {
|
||||||
// layerIndex: entityOptions.layerIndex,
|
// layerIndex: entityOptions.layerIndex,
|
||||||
// alpha: entityOptions.alpha,
|
// alpha: entityOptions.alpha,
|
||||||
@ -620,7 +622,7 @@ export const useRightOperate = () => {
|
|||||||
|
|
||||||
// 图片文件上传后续
|
// 图片文件上传后续
|
||||||
async function handleFileImgInput(files: any, parentId: string, type: string) {
|
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');
|
let availablePort = await ipcRenderer.invoke('get-available-port');
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
let ids: any = []
|
let ids: any = []
|
||||||
@ -708,7 +710,7 @@ export const useRightOperate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openDirectoryDialog(option, cb) {
|
function openDirectoryDialog(option, cb) {
|
||||||
const {ipcRenderer} = require('electron')
|
const { ipcRenderer } = require('electron')
|
||||||
ipcRenderer.send("open-directory-dialog", option);
|
ipcRenderer.send("open-directory-dialog", option);
|
||||||
ipcRenderer.once("selectedItem", (e, paths) => {
|
ipcRenderer.once("selectedItem", (e, paths) => {
|
||||||
cb(paths);
|
cb(paths);
|
||||||
|
|||||||
@ -11,8 +11,14 @@
|
|||||||
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
||||||
<!--底部菜单-->
|
<!--底部菜单-->
|
||||||
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
||||||
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
<input
|
||||||
@input="uploadFile" />
|
type="file"
|
||||||
|
id="fileInputlink"
|
||||||
|
style="display: none"
|
||||||
|
multiple
|
||||||
|
accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||||
|
@input="uploadFile"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 多点视线分析 -->
|
<!-- 多点视线分析 -->
|
||||||
<!-- <Visibility ref="visibility"></Visibility> -->
|
<!-- <Visibility ref="visibility"></Visibility> -->
|
||||||
@ -150,16 +156,11 @@ if (!localStorage.getItem('defaultLabelStyle')) {
|
|||||||
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
|
localStorage.setItem('defaultLabelStyle', JSON.stringify(defaultLabelStyle))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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) {
|
||||||
dynamicComponentRef.value.close()
|
dynamicComponentRef.value.close()
|
||||||
}
|
}
|
||||||
|
console.log(sourceType, 'sourceType')
|
||||||
switch (sourceType) {
|
switch (sourceType) {
|
||||||
case 'directory':
|
case 'directory':
|
||||||
editdirectoryBox.value.open()
|
editdirectoryBox.value.open()
|
||||||
@ -393,7 +394,9 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
dynamicComponentRef.value?.open(id)
|
dynamicComponentRef.value?.open(id)
|
||||||
break
|
break
|
||||||
|
case 'roam': //飞行漫游
|
||||||
case 'flyRoamDialog': //飞行漫游
|
case 'flyRoamDialog': //飞行漫游
|
||||||
|
console.log(FlyRoam, 'FlyRoam')
|
||||||
currentComponent.value = FlyRoam
|
currentComponent.value = FlyRoam
|
||||||
await nextTick()
|
await nextTick()
|
||||||
dynamicComponentRef.value?.open(id)
|
dynamicComponentRef.value?.open(id)
|
||||||
@ -436,7 +439,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
|||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
id && (dynamicComponentRef.value.id = id)
|
id && dynamicComponentRef.value && (dynamicComponentRef.value.id = id)
|
||||||
})
|
})
|
||||||
eventBus.on('openSelectImg', (selected, entity) => {
|
eventBus.on('openSelectImg', (selected, entity) => {
|
||||||
// $sendElectronChanel("requireGEMarkerName", {
|
// $sendElectronChanel("requireGEMarkerName", {
|
||||||
@ -558,9 +561,9 @@ const getStatus = (time) => {
|
|||||||
const currentTimestamp = Date.now()
|
const currentTimestamp = Date.now()
|
||||||
|
|
||||||
if (timestamp > currentTimestamp) {
|
if (timestamp > currentTimestamp) {
|
||||||
; (window as any).checkAuthIsValid = true
|
;(window as any).checkAuthIsValid = true
|
||||||
} else {
|
} else {
|
||||||
; (window as any).checkAuthIsValid = false
|
;(window as any).checkAuthIsValid = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -370,7 +370,7 @@ const getAuthInfo = async () => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 统一处理错误
|
// 统一处理错误
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '去授权',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '退出系统',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -398,7 +398,7 @@ const getStatus = (date) => {
|
|||||||
// router.push({ path: '/login' })
|
// router.push({ path: '/login' })
|
||||||
isAuth.value = false
|
isAuth.value = false
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
|
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用!', '提示', {
|
||||||
confirmButtonText: '去授权',
|
confirmButtonText: '去授权',
|
||||||
cancelButtonText: '退出系统',
|
cancelButtonText: '退出系统',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -448,12 +448,25 @@ const authInfo = ref({
|
|||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
//上传授权文件成功
|
//上传授权文件成功
|
||||||
eventBus.on('upload', (data) => {
|
let setFunc = (data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
isAuth.value = false
|
isAuth.value = false
|
||||||
baseDialog.value?.close()
|
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()
|
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%),
|
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
||||||
rgba(0, 0, 0, 0.6) !important;
|
rgba(0, 0, 0, 0.6) !important;
|
||||||
|
|
||||||
|
.el-message-box__headerbtn {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
.el-message-box__btns {
|
.el-message-box__btns {
|
||||||
.el-button {
|
.el-button {
|
||||||
--el-button-text-color: #fff;
|
--el-button-text-color: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user