This commit is contained in:
zh
2025-11-19 10:42:05 +08:00
25 changed files with 770 additions and 278 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -815,8 +815,8 @@
.fly-roam>.content .table .tr .th:nth-child(2), .fly-roam>.content .table .tr .th:nth-child(2),
.fly-roam>.content .table .tr .td:nth-child(2) { .fly-roam>.content .table .tr .td:nth-child(2) {
flex: 0 0 100px; flex: 0 0 180px;
width: 100px; width: 180px;
} }
.fly-roam>.content .table .tr .th:last-child, .fly-roam>.content .table .tr .th:last-child,
@ -3473,7 +3473,7 @@
.YJ-custom-checkbox-left:checked::after, .YJ-custom-checkbox-left:checked::after,
.YJ-custom-checkbox-right:checked::after { .YJ-custom-checkbox-right:checked::after {
content: "\2714"; content: "";
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1); color: rgba(var(--color-sdk-auxiliary), 1);
width: 25px; width: 25px;
@ -3508,7 +3508,7 @@
} }
.YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after { .YJ-custom-base-dialog>.content input.YJ-custom-checkbox[type=checkbox]:checked::after {
content: "\2714"; content: "";
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
color: rgba(var(--color-sdk-auxiliary), 1); color: rgba(var(--color-sdk-auxiliary), 1);
width: 12px; width: 12px;

View File

@ -1,8 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12" viewBox="0 0 12 12" > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="15.65869140625" height="16" viewBox="0 0 15.65869140625 16" fill="none"><path d="M14.9742 4.33334L0.682905 4.33334C0.308133 4.33334 0 4.03334 0 3.66666C0 3.3 0.308133 3 0.682905 3L14.9742 3C15.349 3 15.6571 3.3 15.6571 3.66666C15.6571 4.03334 15.349 4.33334 14.9742 4.33334Z" fill="#FFFFFF" ></path><path d="M6.02972 3.48334C6.01307 3.38334 6.00474 3.275 6.00474 3.16666C6.00474 2.15834 6.82924 1.33334 7.83697 1.33334C8.84469 1.33334 9.66919 2.15834 9.66919 3.16666C9.66919 3.275 9.66086 3.375 9.64421 3.48334L10.9851 3.48334C10.9934 3.38334 11.0017 3.275 11.0017 3.16666C11.0017 1.41666 9.5859 0 7.83697 0C6.08803 0 4.67223 1.41666 4.67223 3.16666C4.67223 3.275 4.68054 3.375 4.68888 3.48334L6.02972 3.48334ZM12.4925 3.64166L12.4925 14.6667L3.16481 14.6667L3.16481 3.64166L1.83228 3.64166L1.83228 14.9583C1.83228 15.5333 2.29867 16 2.87332 16L12.784 16C13.3586 16 13.825 15.5333 13.825 14.9583L13.825 3.64166L12.4925 3.64166Z" fill="#FFFFFF" ></path><path d="M5.50491 12.4834L5.48826 12.4834C5.12182 12.4834 4.83032 12.1917 4.83032 11.8251L4.83032 7.14172C4.83032 6.77506 5.12182 6.4834 5.48826 6.4834L5.50491 6.4834C5.87137 6.4834 6.16285 6.77506 6.16285 7.14172L6.16285 11.8334C6.16285 12.1917 5.87137 12.4834 5.50491 12.4834ZM7.83683 12.4834L7.82018 12.4834C7.45373 12.4834 7.16224 12.1917 7.16224 11.8251L7.16224 7.14172C7.16224 6.77506 7.45373 6.4834 7.82018 6.4834L7.83683 6.4834C8.20327 6.4834 8.49477 6.77506 8.49477 7.14172L8.49477 11.8334C8.49477 12.1917 8.20327 12.4834 7.83683 12.4834ZM10.1688 12.4834L10.1521 12.4834C9.78565 12.4834 9.49417 12.1917 9.49417 11.8251L9.49417 7.14172C9.49417 6.77506 9.78565 6.4834 10.1521 6.4834L10.1688 6.4834C10.5352 6.4834 10.8267 6.77506 10.8267 7.14172L10.8267 11.8334C10.8267 12.1917 10.5352 12.4834 10.1688 12.4834Z" fill="#FFFFFF" ></path></svg>
<path d="M11.3166 3.25L0.598117 3.25C0.317037 3.25 0.0859375 3.025 0.0859375 2.74999C0.0859375 2.475 0.317037 2.25 0.598117 2.25L11.3166 2.25C11.5977 2.25 11.8288 2.475 11.8288 2.74999C11.8288 3.025 11.5977 3.25 11.3166 3.25Z" >
</path>
<path d="M4.60805 2.6125C4.59556 2.5375 4.58931 2.45625 4.58931 2.37499C4.58931 1.61875 5.20768 1 5.96348 1C6.71927 1 7.33765 1.61875 7.33765 2.37499C7.33765 2.45625 7.3314 2.53125 7.31891 2.6125L8.32454 2.6125C8.3308 2.5375 8.33703 2.45625 8.33703 2.37499C8.33703 1.06249 7.27518 0 5.96348 0C4.65178 0 3.58993 1.06249 3.58993 2.37499C3.58993 2.45625 3.59616 2.53125 3.60241 2.6125L4.60805 2.6125ZM9.45511 2.73124L9.45511 11L2.45936 11L2.45936 2.73124L1.45996 2.73124L1.45996 11.2188C1.45996 11.65 1.80976 12 2.24075 12L9.67372 12C10.1047 12 10.4545 11.65 10.4545 11.2188L10.4545 2.73124L9.45511 2.73124Z" >
</path>
<path d="M4.21395 9.36328L4.20146 9.36328C3.92663 9.36328 3.70801 9.14452 3.70801 8.86952L3.70801 5.35702C3.70801 5.08203 3.92663 4.86328 4.20146 4.86328L4.21395 4.86328C4.48879 4.86328 4.70741 5.08203 4.70741 5.35702L4.70741 8.87578C4.70741 9.14452 4.48879 9.36328 4.21395 9.36328ZM5.96289 9.36328L5.9504 9.36328C5.67556 9.36328 5.45695 9.14452 5.45695 8.86952L5.45695 5.35702C5.45695 5.08203 5.67556 4.86328 5.9504 4.86328L5.96289 4.86328C6.23772 4.86328 6.45635 5.08203 6.45635 5.35702L6.45635 8.87578C6.45635 9.14452 6.23772 9.36328 5.96289 9.36328ZM7.71183 9.36328L7.69933 9.36328C7.4245 9.36328 7.20589 9.14452 7.20589 8.86952L7.20589 5.35702C7.20589 5.08203 7.4245 4.86328 7.69933 4.86328L7.71183 4.86328C7.98666 4.86328 8.20527 5.08203 8.20527 5.35702L8.20527 8.87578C8.20527 9.14452 7.98666 9.36328 7.71183 9.36328Z" >
</path>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -152,14 +152,14 @@ export default {
}, },
system: { system: {
systemTitle: '系统面板', systemTitle: '系统面板',
authorize: '授权信息', authorize: '授权管理',
setting: '系统设置', setting: '系统管理',
project: '工程管理', project: '工程管理',
device: '设备管理', device: '设备管理',
materials: '物资管理', materials: '物资管理',
modelManage: '模型管理', modelManage: '模型管理',
graphLabelManage: '军标管理',
photoManage: '图标管理', photoManage: '图标管理',
graphLabelManage: '军标管理',
version: '版本信息' version: '版本信息'
}, },
auths: { auths: {

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 10 10" fill="none"><path d="M5.69937 5L9.80167 0.897704C10.0017 0.697704 10 0.59666 10 0.39666C9.9 0.19666 9.80334 0.1 9.60334 0C9.40334 0 9.3023 -0.00167015 9.1023 0.19833L5 4.30063L0.897704 0.19833C0.797704 0.0983299 0.701044 0 0.501044 0C0.401044 0 0.29833 0.0983299 0.19833 0.19833C0.0983299 0.29833 0 0.401044 0 0.501044C0 0.701044 0.0983299 0.797704 0.19833 0.897704L4.30063 5L0.19833 9.1023C-0.00167015 9.3023 0 9.40334 0 9.60334C0.1 9.80334 0.19666 9.9 0.39666 10C0.59666 10 0.697704 10.0017 0.897704 9.80167L5 5.69937L9.1023 9.80167C9.2023 9.90167 9.29896 10 9.49896 10C9.59896 10 9.70167 9.90167 9.80167 9.80167C9.90167 9.70167 10 9.59896 10 9.49896C10 9.29896 9.90167 9.2023 9.80167 9.1023L5.69937 5Z" fill="#FFFFFF" ></path></svg>

After

Width:  |  Height:  |  Size: 863 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -28,7 +28,7 @@ export const sysChange = async (eventBus) => {
let coor = systemSetting.coordinate ? systemSetting.coordinate : 'EPSG:4326' let coor = systemSetting.coordinate ? systemSetting.coordinate : 'EPSG:4326'
YJ.Global.setCoordinateSystem(window.earth, coor) YJ.Global.setCoordinateSystem(window.earth, coor)
//设置坐标格式 //设置坐标格式
// YJ.Global.setDMS(window.earth, systemSetting.positionType) YJ.Global.setDMS(window.earth, systemSetting.positionType)
//比例尺 //比例尺
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch) await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.sheetIndexStatusSwitch)

View File

@ -202,7 +202,7 @@ const routeImport = () => {
filters: [ filters: [
{ {
name: '路网', //、底图 name: '路网', //、底图
extensions: ['PBFL'] extensions: ['pbf']
} }
] ]
} }
@ -483,6 +483,7 @@ const importProject = () => {
console.log(arr, 'arrarr') console.log(arr, 'arrarr')
arr.pop() arr.pop()
// let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth' // let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth'
console.log(paths[0], arr.join('/'), 'pathpath')
unzip_file(paths[0], arr.join('/')) unzip_file(paths[0], arr.join('/'))
.then((res) => { .then((res) => {
// loadingInstance.close() // loadingInstance.close()

View File

@ -58,7 +58,7 @@
<el-table-column prop="password" label="密码" width="120" /> <el-table-column prop="password" label="密码" width="120" />
<el-table-column prop="channel" label="通道号" width="120" /> <el-table-column prop="channel" label="通道号" width="120" />
<el-table-column prop="flvUrl" label="flv地址" width="300" /> <el-table-column prop="flvUrl" label="flv地址" width="300" />
<el-table-column fixed="right" label="操作" min-width="140"> <el-table-column fixed="right" label="操作" min-width="160">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="edit('编辑设备', scope.row)"> <el-button type="primary" size="small" @click="edit('编辑设备', scope.row)">
编辑 编辑

View File

@ -20,7 +20,7 @@
</el-select> </el-select>
</div> </div>
<!-- 主题色 --> <!-- 主题色 -->
<div class="detailSkin"></div> <!-- <div class="detailSkin"></div> -->
<div class="detailSkin"> <div class="detailSkin">
<span class="titleLabel">{{ t('systemSetting.theme') }}</span> <span class="titleLabel">{{ t('systemSetting.theme') }}</span>
<el-select <el-select
@ -66,7 +66,13 @@
<el-select style="width: 175px" v-model="systemSetting.coordinate" @change="sysChange"> <el-select style="width: 175px" v-model="systemSetting.coordinate" @change="sysChange">
<div <div
class="group-header" class="group-header"
:class="isHotGroupOpen ? 'arrowActive' : ''" :class="
name_map1.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'arrowActive'
: ''
"
@click="toggleGroup('hot')" @click="toggleGroup('hot')"
> >
地理坐标系 地理坐标系
@ -74,14 +80,26 @@
v-if="isHotGroupOpen" v-if="isHotGroupOpen"
name="arrow2" name="arrow2"
:size="10" :size="10"
color="rgba(0, 255, 255, 1)" :color="
name_map1.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'rgba(0, 255, 255, 1)'
: 'rgba(255, 255, 255, 1)'
"
style="margin-left: 10px" style="margin-left: 10px"
></svg-icon> ></svg-icon>
<svg-icon <svg-icon
v-else v-else
name="arrow1" name="arrow1"
:size="10" :size="10"
color="rgba(255, 255, 255, 1)" :color="
name_map1.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'rgba(0, 255, 255, 1)'
: 'rgba(255, 255, 255, 1)'
"
style="margin-left: 10px" style="margin-left: 10px"
></svg-icon> ></svg-icon>
</div> </div>
@ -95,7 +113,13 @@
</div> </div>
<div <div
class="group-header" class="group-header"
:class="isHotGroupOpen2 ? 'arrowActive' : ''" :class="
name_map2.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'arrowActive'
: ''
"
@click="toggleGroup('ty')" @click="toggleGroup('ty')"
> >
投影坐标系 投影坐标系
@ -103,14 +127,26 @@
v-if="isHotGroupOpen2" v-if="isHotGroupOpen2"
name="arrow2" name="arrow2"
:size="10" :size="10"
color="rgba(0, 255, 255, 1)" :color="
name_map2.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'rgba(0, 255, 255, 1)'
: 'rgba(255, 255, 255, 1)'
"
style="margin-left: 10px" style="margin-left: 10px"
></svg-icon> ></svg-icon>
<svg-icon <svg-icon
v-else v-else
name="arrow1" name="arrow1"
:size="10" :size="10"
color="rgba(255, 255, 255, 1)" :color="
name_map2.filter((item) => {
return item.epsg == systemSetting.coordinate
}).length > 0
? 'rgba(0, 255, 255, 1)'
: 'rgba(255, 255, 255, 1)'
"
style="margin-left: 10px" style="margin-left: 10px"
></svg-icon> ></svg-icon>
</div> </div>
@ -124,7 +160,7 @@
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="detailSkin"></div> <!-- <div class="detailSkin"></div> -->
<div class="detailSkin" v-show="showPosiType"> <div class="detailSkin" v-show="showPosiType">
<span class="titleLabel">{{ t('systemSetting.latitude') }}</span> <span class="titleLabel">{{ t('systemSetting.latitude') }}</span>
<el-select <el-select
@ -167,7 +203,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="detailSkin1"></div> <!-- <div class="detailSkin1"></div> -->
<div class="detailSkin1"> <div class="detailSkin1">
<span class="titleLabel">{{ t('systemSetting.areaUnit') }}</span> <span class="titleLabel">{{ t('systemSetting.areaUnit') }}</span>
<el-select <el-select
@ -202,7 +238,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="detailSkin1"></div> <!-- <div class="detailSkin1"></div> -->
<div class="detailSkin1"> <div class="detailSkin1">
<span class="titleLabel">{{ t('systemSetting.speedUnit') }}</span> <span class="titleLabel">{{ t('systemSetting.speedUnit') }}</span>
<el-select <el-select
@ -268,7 +304,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="detailSkin1"></div> <!-- <div class="detailSkin1"></div> -->
<div class="detailSkin1"> <div class="detailSkin1">
<span class="titleLabel">{{ t('ConcurrencyControl') }}</span> <span class="titleLabel">{{ t('ConcurrencyControl') }}</span>
<el-select <el-select
@ -703,21 +739,25 @@ onMounted(() => {
} }
} }
.seting_content { .seting_content {
width: 100%; width: calc(100% - 22px);
padding: 15px 0 0 22px; margin: 15px 0 0 22px;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
.detailSkin {
width: 100%;
display: flex; display: flex;
align-items: center; justify-content: space-between;
.detailSkin {
width: 50%;
display: flex;
align-items: left;
box-sizing: border-box; box-sizing: border-box;
flex-direction: row;
padding-bottom: 15px; padding-bottom: 15px;
> span { > span {
font-size: 0.9rem; font-size: 0.9rem;
color: #c8cfcf; color: #c8cfcf;
display: block; display: block;
width: 86px; // width: 86px;
text-align: right; text-align: right;
} }
} }
@ -725,10 +765,12 @@ onMounted(() => {
.seting_content1 { .seting_content1 {
width: 100%; width: 100%;
padding: 15px 0 0 22px; padding: 15px 0 0 22px;
display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.detailSkin1 { .detailSkin1 {
width: 100%; width: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
@ -737,7 +779,7 @@ onMounted(() => {
font-size: 0.9rem; font-size: 0.9rem;
color: #c8cfcf; color: #c8cfcf;
display: inline-block; display: inline-block;
width: 86px; // width: 86px;
text-align: right; text-align: right;
} }
} }
@ -760,7 +802,7 @@ onMounted(() => {
font-size: 0.9rem; font-size: 0.9rem;
color: #c8cfcf; color: #c8cfcf;
display: inline-block; display: inline-block;
width: 86px; // width: 86px;
text-align: right; text-align: right;
} }
} }
@ -792,5 +834,6 @@ onMounted(() => {
} }
.titleLabel { .titleLabel {
margin-right: 10px; margin-right: 10px;
text-align: left !important;
} }
</style> </style>

View File

@ -105,12 +105,12 @@
<el-tab-pane :label="t('system.modelManage')" name="modelManage"> <el-tab-pane :label="t('system.modelManage')" name="modelManage">
<modelManage></modelManage> <modelManage></modelManage>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="t('system.graphLabelManage')" name="graphLabelManage">
<graphLabelManage></graphLabelManage>
</el-tab-pane>
<el-tab-pane :label="t('system.photoManage')" name="photoManage"> <el-tab-pane :label="t('system.photoManage')" name="photoManage">
<photoManage></photoManage> <photoManage></photoManage>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="t('system.graphLabelManage')" name="graphLabelManage">
<graphLabelManage></graphLabelManage>
</el-tab-pane>
<el-tab-pane :label="t('system.version')" name="version"> <el-tab-pane :label="t('system.version')" name="version">
<version></version> <version></version>
</el-tab-pane> </el-tab-pane>

View File

@ -810,7 +810,7 @@ const methodMap = {
//模型压平 //模型压平
pressModel() { pressModel() {
if ((window as any).checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
let selectedNode = window.treeObj.getSelectedNodes()[0] let selectedNode = window.treeObj?.getSelectedNodes()[0]
if (selectedNode) { if (selectedNode) {
let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType) let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
if (!isTileset) { if (!isTileset) {

View File

@ -3,7 +3,7 @@
ref="baseDialog" ref="baseDialog"
class="fly-roam" class="fly-roam"
title="飞行漫游" title="飞行漫游"
width="382px" width="460px"
left="180px" left="180px"
top="100px" top="100px"
:closeCallback="closeCallBack" :closeCallback="closeCallBack"
@ -14,9 +14,9 @@
<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" /> <input class="input" type="text" name="name" placeholder="请输入名称" />
</div> </div>
<div class="col"> <!-- <div class="col">
<input <input
type="checkbox" type="checkbox"
name="repeat" name="repeat"
@ -30,7 +30,7 @@
" "
/> />
<span class="label">循环播放</span> <span class="label">循环播放</span>
</div> </div> -->
</div> </div>
</div> </div>
<span class="custom-divider"></span> <span class="custom-divider"></span>
@ -95,14 +95,14 @@
<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点 <svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点
</button> </button>
</div> --> </div> -->
<div class="col"> <!-- <div class="col">
<button class="afreshPlay"> <button class="afreshPlay">
<svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>全局播放 <svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>全局播放
</button> </button>
<button class="cease" style="margin-left: 10px"> <button class="cease" style="margin-left: 10px">
<svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>结束播放 <svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>结束播放
</button> </button>
</div> </div> -->
<!-- <div class="col"> <!-- <div class="col">
<button class="cease"> <button class="cease">
<svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束播放 <svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束播放
@ -110,8 +110,30 @@
</div> --> </div> -->
</div> </div>
<div class="row"> <div class="row">
<div class="col" style="flex: 0 0 200px"> <div class="col" style="flex: 0 0 300px">
<span class="label">默认时长</span>
<div class="input-number input-number-unit-3">
<input <input
class="input total-time"
type="number"
title=""
min="0"
max="999999.99"
step="0.01"
name="defaultTime"
value="0"
/>
<span class="unit" style="top: 6px">s</span>
<span class="arrow"></span>
</div>
<button class="add-point" style="margin-left: 10px">
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点
</button>
</div>
</div>
<div class="row">
<div class="col" style="flex: 0 0 300px">
<!-- <input
type="checkbox" type="checkbox"
name="isTotalTime" name="isTotalTime"
style=" style="
@ -122,7 +144,7 @@
width: auto; width: auto;
margin-right: 5px; margin-right: 5px;
" "
/> /> -->
<span class="label">设置总时长</span> <span class="label">设置总时长</span>
<div class="input-number input-number-unit-3"> <div class="input-number input-number-unit-3">
<input <input
@ -138,6 +160,14 @@
<span class="unit" style="top: 6px">s</span> <span class="unit" style="top: 6px">s</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
<button class="isTotalTime" style="margin-left: 10px">应用</button>
<input
type="checkbox"
name="repeat"
class="YJ-custom-checkbox"
style="cursor: pointer; width: auto; margin-right: 5px; margin-left: 10px"
/>
<span class="label">循环</span>
<!-- <button style="margin-left: 10px" @click="apply">应用</button> --> <!-- <button style="margin-left: 10px" @click="apply">应用</button> -->
</div> </div>
</div> </div>
@ -161,8 +191,14 @@
</template> </template>
<template #footer> <template #footer>
<div style="position: absolute; left: 24px; display: flex"> <div style="position: absolute; left: 24px; display: flex">
<button class="add-point"> <button class="afreshPlay">
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点 <svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放
</button>
<button class="cease" style="margin-left: 10px">
<svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>结束
</button>
<button class="video" style="margin-left: 10px" @click="startVideo">
<svg-icon name="video" :size="12"></svg-icon>录制
</button> </button>
</div> </div>
<button class="saveRoam" @click="draw">保存</button> <button class="saveRoam" @click="draw">保存</button>
@ -180,6 +216,7 @@ 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'
const { t } = useI18n() const { t } = useI18n()
const { cusAddNodes } = useTreeNode() const { cusAddNodes } = useTreeNode()
@ -236,8 +273,24 @@ const draw = (data) => {
type: 'warning' type: 'warning'
}) })
} }
}
console.log(data) const startVideo = () => {
document.getElementById('earthContainer').style.zIndex = 100
$sendElectronChanel('startRecoder')
ElMessage({
message: '按ESC结束录制',
type: 'warning'
})
const handleKeyDown = (e) => {
if (e.key === 'Escape') {
$sendElectronChanel('endRecoder')
window.removeEventListener('keydown', handleKeyDown)
document.getElementById('earthContainer').style.zIndex = ''
}
}
window.addEventListener('keydown', handleKeyDown)
} }
const clangeViewPointHeight = () => {} const clangeViewPointHeight = () => {}
@ -275,15 +328,40 @@ defineExpose({
linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 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; 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;
svg {
fill: rgba(27, 248, 195, 1) !important;
}
} }
.cease { .cease {
background: background:
linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%), linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
rgba(0, 0, 0, 0.5) !important; 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;
svg {
fill: rgba(241, 108, 85, 1) !important;
}
}
.video {
background:
linear-gradient(
180deg,
rgba(71, 27, 5, 0.3) 0%,
rgba(71, 27, 5, 0.3) 0%,
rgba(255, 143, 87, 0) 100%
),
rgba(0, 0, 0, 0.5) !important;
border: 1px solid rgba(255, 165, 92, 1) !important;
color: rgba(255, 165, 92, 1) !important;
} }
::v-deep .content input.YJ-custom-checkbox[type='checkbox'] { ::v-deep .content input.YJ-custom-checkbox[type='checkbox'] {
border: 1px solid rgba(var(--color-base1), 1) !important; border: 1px solid rgba(var(--color-base1), 1) !important;
background-color: rgba(0, 0, 0, 0.5) !important; background-color: unset !important;
}
::v-deep .iconBut {
background: unset !important;
border: unset !important;
padding: unset !important;
} }
</style> </style>

View File

@ -20,9 +20,26 @@
</div> </div>
<div class="div-item item" data-type="0" v-show="isShowing"> <div class="div-item item" data-type="0" v-show="isShowing">
<span class="custom-divider"></span> <span class="custom-divider"></span>
<p style="font-size: 16px; padding-bottom: 6px; margin-top: 10px; margin-bottom: 5px"> <p
style="
font-size: 16px;
padding-bottom: 6px;
margin-top: 10px;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
"
>
<div>
<span style="margin-right: 10px"></span> <span style="margin-right: 10px"></span>
<span style="font-size: 12px; margin-bottom: 5px; color: #f16c55">例如116.6°, 39.9°</span> <span style="font-size: 12px; margin-bottom: 5px; color: #f16c55"
>例如116.6°, 39.9°</span
>
</div>
<div style="display: flex; ">
<button class="pickUp"> </button>
<button class="convert" style="margin-left: 10px"> </button>
</div>
</p> </p>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
@ -45,17 +62,23 @@
<use xlink:href="#yj-icon-copy"></use> <use xlink:href="#yj-icon-copy"></use>
</svg> </svg>
</i> </i>
<button class="convert" style="margin-left: 10px"> </button> <!-- <button class="convert" style="margin-left: 10px"> </button> -->
</div> </div>
</div> </div>
</div> </div>
<div class="div-item item" data-type="1" v-show="isShowing"> <div class="div-item item" data-type="1" v-show="isShowing">
<span class="custom-divider"></span> <span class="custom-divider"></span>
<p style="font-size: 16px; padding-bottom: 6px; margin-top: 10px; margin-bottom: 5px"> <p style="font-size: 16px; padding-bottom: 6px; margin-top: 10px; margin-bottom: 5px;display: flex; justify-content: space-between;">
<div>
<span style="margin-right: 10px">度分</span> <span style="margin-right: 10px">度分</span>
<span style="font-size: 12px; margin-bottom: 5px; color: #f16c55" <span style="font-size: 12px; margin-bottom: 5px; color: #f16c55"
>例如95°10.1702', 49°12.4015'</span >例如95°10.1702', 49°12.4015'</span
> >
</div>
<div style="display: flex; ">
<button class="pickUp"> </button>
<button class="convert" style="margin-left: 10px"> </button>
</div>
</p> </p>
<div class="row"> <div class="row">
<div class="col" style="flex-direction: column"> <div class="col" style="flex-direction: column">
@ -120,17 +143,23 @@
<use xlink:href="#yj-icon-copy"></use> <use xlink:href="#yj-icon-copy"></use>
</svg> </svg>
</i> </i>
<button class="convert" style="margin-left: 10px"> </button> <!-- <button class="convert" style="margin-left: 10px"> </button> -->
</div> </div>
</div> </div>
</div> </div>
<div class="div-item item" data-type="2" v-show="isShowing"> <div class="div-item item" data-type="2" v-show="isShowing">
<span class="custom-divider"></span> <span class="custom-divider"></span>
<p style="font-size: 16px; padding-bottom: 6px; margin-top: 10px; margin-bottom: 5px"> <p style="font-size: 16px; padding-bottom: 6px; margin-top: 10px; margin-bottom: 5px;display: flex; justify-content: space-between;">
<div>
<span style="margin-right: 10px">度分秒</span> <span style="margin-right: 10px">度分秒</span>
<span style="font-size: 12px; margin-bottom: 5px; color: #f16c55" <span style="font-size: 12px; margin-bottom: 5px; color: #f16c55"
>例如11°18'54.37", 39°13'46.57"</span >例如11°18'54.37", 39°13'46.57"</span
> >
</div>
<div style="display: flex; ">
<button class="pickUp">拾 取</button>
<button class="convert" style="margin-left: 10px">转 换</button>
</div>
</p> </p>
<div class="row"> <div class="row">
<div class="col" style="flex-direction: column"> <div class="col" style="flex-direction: column">
@ -215,7 +244,7 @@
<use xlink:href="#yj-icon-copy"></use> <use xlink:href="#yj-icon-copy"></use>
</svg> </svg>
</i> </i>
<button class="convert" style="margin-left: 10px">转 换</button> <!-- <button class="convert" style="margin-left: 10px">转 换</button> -->
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,463 @@
<template>
<Dialog
ref="baseDialog"
class="RoutePlanning"
title="路径规划"
left="180px"
top="100px"
width="527px"
:closeCallback="closeCallBack"
>
<template #content>
<div class="row">
<div class="col" style="flex: 0 0 66px">
<span class="label" style="color: rgba(var(--color-base1), 1)">起点</span>
</div>
<div class="col">
<span class="label">经度</span>
<input
class="input"
id="startLng"
type="number"
title=""
min="-180"
max="180"
@model="startLng"
v-model="startLng"
@change="changeStartLng"
@input="inputStartLng"
/>
</div>
<div class="col">
<span class="label">纬度</span>
<input
class="input"
id="startLat"
type="number"
title=""
min="-90"
max="90"
@model="startLat"
v-model="startLat"
@change="changeStartLat"
@input="inputStartLat"
/>
</div>
<div class="col" style="flex: 0 0 95px">
<button class="end-pick-btn" @click="pickStartPos" style="margin-left: 10px">拾取</button>
<svg-icon
name="posiFly"
class="icon"
:size="18"
style="margin: 5px"
title="定位"
></svg-icon>
</div>
</div>
<!-- 避让区域 -->
<div class="row" v-for="i in yieldNum" :key="i">
<div class="col" style="flex: 0 0 66px">
<span class="label">避让区域</span>
</div>
<div class="col">
<span style="font-size: 12px; color: rgba(204, 204, 204, 1)">请绘制避让区域范围</span>
</div>
<div class="col" style="flex: 0 0 95px">
<button class="end-pick-btn" style="margin-left: 10px">绘制</button>
<svg-icon name="posiFly" class="icon" :size="18" style="margin: 5px"></svg-icon>
<svg-icon
name="close"
class="icon"
style="margin-right: -12px"
:size="12"
@click="deleteYieldArea()"
></svg-icon>
</div>
</div>
<!-- 途径点 -->
<div class="row" v-for="i in crossNum" :key="i">
<div class="col" style="flex: 0 0 66px">
<svg-icon
name="crossPoint"
class="icon"
style="margin-left: -18px"
:size="12"
@click="deleteYieldArea()"
></svg-icon>
<span class="label">{{ '途径点' + i }}</span>
</div>
<div class="col">
<span class="label">经度</span>
<input
class="input"
id="endLng"
type="number"
title=""
min="-180"
max="180"
@model="endLng"
v-model="endLng"
@change="changeEndLng"
@input="inputEndLng"
/>
</div>
<div class="col">
<span class="label">纬度</span>
<input
class="input"
id="endLat"
type="number"
title=""
min="-180"
max="180"
@model="endLat"
v-model="endLat"
@change="changeEndLat"
@input="inputEndLat"
/>
</div>
<div class="col" style="flex: 0 0 95px">
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
<svg-icon name="posiFly" class="icon" :size="18" style="margin: 5px"></svg-icon>
<svg-icon
name="close"
class="icon"
style="margin-right: -12px"
:size="12"
@click="deleteCrossPoint()"
></svg-icon>
</div>
</div>
<div class="row">
<div class="col" style="flex: 0 0 66px">
<span class="label" style="color: rgba(var(--color-base1), 1)">终点</span>
</div>
<div class="col">
<span class="label">经度</span>
<input
class="input"
id="endLng"
type="number"
title=""
min="-180"
max="180"
@model="endLng"
v-model="endLng"
@change="changeEndLng"
@input="inputEndLng"
/>
</div>
<div class="col">
<span class="label">纬度</span>
<input
class="input"
id="endLat"
type="number"
title=""
min="-180"
max="180"
@model="endLat"
v-model="endLat"
@change="changeEndLat"
@input="inputEndLat"
/>
</div>
<div class="col" style="flex: 0 0 95px">
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
<svg-icon name="posiFly" class="icon" :size="18" style="margin: 5px"></svg-icon>
</div>
</div>
<div
class="row"
style="align-items: flex-start; display: flex; justify-content: space-between"
>
<div class="col start-col">
<button
class="crossPoint"
@mouseenter="svgHover[0] = true"
@mouseleave="svgHover[0] = false"
@click="addCrossPoint()"
>
<svg-icon
name="add"
:size="12"
:color="svgHover[0] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
></svg-icon>
途径点
</button>
<button
class="crossPoint"
@mouseenter="svgHover[1] = true"
@mouseleave="svgHover[1] = false"
@click="addYieldArea()"
style="margin-left: 10px"
>
<svg-icon
name="add"
:size="12"
:color="svgHover[1] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
></svg-icon
>避让区域
</button>
</div>
<button @clik="routeQuery">
<svg class="icon-query"><use xlink:href="#yj-icon-query"></use></svg>查询
</button>
</div>
<span class="custom-divider"></span>
<div class="row" style="margin-top: 20px">
<p class="lable-left-line">路径规划</p>
</div>
<!-- 路线 -->
<div class="row">
<div class="col">
<span class="label">{{ '路线' }}</span>
</div>
<div class="col">
<span class="label">{{ '52分钟' }}</span>
</div>
<div class="col">
<span class="label">{{ '50公里' }}</span>
</div>
<div class="col">
<span class="label">{{ '中间有路段维修' }}</span>
</div>
<div class="col">
<button class="end-pick-btn">保存</button>
</div>
</div>
</template>
<!-- <template #footer>
<button id="routeQuery" @clik="routeQuery">
<svg class="icon-query"><use xlink:href="#yj-icon-query"></use></svg>查询
</button>
<button id="clearRoute" @click="clearRoute">
<svg class="icon-route"><use xlink:href="#yj-icon-route"></use></svg>清除路线
</button>
<button @click="close">取消</button>
</template> -->
</Dialog>
</template>
<script setup lang="ts">
import { ref, reactive, onBeforeUnmount } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
import { RouteApi } from '@/api/route/index'
import { add } from 'date-fns'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
//避让区域
var yieldNum: any = ref(0)
const addYieldArea = () => {
console.log('addYieldArea')
yieldNum.value++
}
const deleteYieldArea = () => {
yieldNum.value > 0 ? yieldNum.value-- : (yieldNum.value = 0)
}
//途径点
var crossNum: any = ref(0)
const addCrossPoint = () => {
crossNum.value++
}
const deleteCrossPoint = () => {
crossNum.value > 0 ? crossNum.value-- : (crossNum.value = 0)
}
//属性
var startLng: any = ref(null)
var startLat: any = ref(null)
var endLng: any = ref(null)
var endLat: any = ref(null)
var routePlanning: any = reactive([])
var svgHover: any = reactive([false, false])
eventBus.on('routePlanningDialog', () => {
baseDialog.value?.open()
setTimeout(() => {
//加载路网数据
let host = 'http://192.168.110.25:8848'
routePlanning = new YJ.Obj.RoutePlanning(window.earth, {
gps: false,
host
})
routePlanning.Dialog.queryCallBack = async (v) => {
// await queryRoute(params, (response) => {
// if (response) {
// routePlanning.createRoute(response.list[0].positions)
// }
// })
let res = await RouteApi.queryRoute({
startLng: startLng.value,
startLat: startLat.value,
endLng: endLng.value,
endLat: endLat.value,
waypoints: []
})
if (res.code === 200) {
routePlanning.createRoute(res.data.pathPoints)
}
}
}, 100)
})
const open = () => {
baseDialog.value?.open()
setTimeout(() => {
//加载路网数据
let host = 'http://192.168.110.25:8848'
routePlanning = new YJ.Obj.RoutePlanning(window.earth, {
gps: false,
host
})
routePlanning.Dialog.queryCallBack = async (v) => {
// await queryRoute(params, (response) => {
// if (response) {
// routePlanning.createRoute(response.list[0].positions)
// }
// })
let res = await RouteApi.queryRoute({
startLng: startLng.value,
startLat: startLat.value,
endLng: endLng.value,
endLat: endLat.value,
waypoints: []
})
if (res.code === 200) {
routePlanning.createRoute(res.data.pathPoints)
}
}
}, 100)
}
//加载路网数据
const addRoute = async (fileId) => {
let res = await RouteApi.loadRoute({ fileId })
}
const getList = async () => {
let list = await RouteApi.getRouteList()
if (list.data.length > 0) {
let file = list.data[list.data.length - 1]
addRoute(file.id)
}
}
const closeCallBack = (e) => {
startLng.value = null
startLat.value = null
endLng.value = null
endLat.value = null
}
onBeforeUnmount(() => {
closeCallBack('')
})
const routeQuery = async (e) => {
let res = await RouteApi.queryRoute({
startLng: startLng.value,
startLat: startLat.value,
endLng: endLng.value,
endLat: endLat.value,
waypoints: []
})
}
const clearRoute = (e) => {}
const pickStartPos = () => {
routePlanning.pickStartPos((position) => {
startLng.value = position.lng
startLat.value = position.lat
})
}
const pickEndPos = () => {
routePlanning.pickEndPos((position) => {
endLng.value = position.lng
endLat.value = position.lat
})
}
const close = (e) => {
baseDialog.value?.close()
}
const changeStartLng = () => {
routePlanning.startLng = startLng.value
}
const inputStartLng = () => {
let dom: any = document.getElementById('startLng')
if (startLng.value < dom.min * 1) {
startLng.value = dom.min * 1
} else if (startLng.value > dom.max * 1) {
startLng.value = dom.max * 1
}
}
const changeStartLat = () => {
routePlanning.startLat = startLat.value
}
const inputStartLat = () => {
let dom: any = document.getElementById('startLat')
if (startLat.value < dom.min * 1) {
startLat.value = dom.min * 1
} else if (startLat.value > dom.max * 1) {
startLat.value = dom.max * 1
}
}
const changeEndLng = () => {
routePlanning.endLng = endLng.value
}
const inputEndLng = () => {
let dom: any = document.getElementById('endLng')
if (endLng.value < dom.min * 1) {
endLng.value = dom.min * 1
} else if (endLng.value > dom.max * 1) {
endLng.value = dom.max * 1
}
}
const changeEndLat = () => {
routePlanning.endLat = endLat.value
}
const inputEndLat = () => {
let dom: any = document.getElementById('endLat')
if (endLat.value < dom.min * 1) {
endLat.value = dom.min * 1
} else if (endLat.value > dom.max * 1) {
endLat.value = dom.max * 1
}
}
defineExpose({
open
})
</script>
<style scoped lang="scss">
#routeQuery {
position: absolute;
left: 10px;
display: flex;
}
#clearRoute {
position: absolute;
left: 95px;
display: flex;
}
.YJ-custom-base-dialog > .content .row > .col {
margin: 0 5px !important;
}
.crossPoint:hover {
color: rgba(var(--color-base1), 1);
}
.icon {
cursor: pointer;
}
</style>

View File

@ -9,7 +9,7 @@
:closeCallback="closeCallBack" :closeCallback="closeCallBack"
> >
<template #content> <template #content>
<div class="row" style="align-items: flex-start"> <!-- <div class="row" style="align-items: flex-start">
<div class="col start-col"> <div class="col start-col">
<button <button
class="crossPoint" class="crossPoint"
@ -37,7 +37,7 @@
>避让点 >避让点
</button> </button>
</div> </div>
</div> </div> -->
<div class="row"> <div class="row">
<p class="lable-left-line">路径规划</p> <p class="lable-left-line">路径规划</p>
</div> </div>
@ -195,6 +195,7 @@ const open = () => {
// routePlanning.createRoute(response.list[0].positions) // routePlanning.createRoute(response.list[0].positions)
// } // }
// }) // })
try {
let res = await RouteApi.queryRoute({ let res = await RouteApi.queryRoute({
startLng: startLng.value, startLng: startLng.value,
startLat: startLat.value, startLat: startLat.value,
@ -203,7 +204,10 @@ const open = () => {
waypoints: [] waypoints: []
}) })
if (res.code === 200) { if (res.code === 200) {
routePlanning.createRoute(res.data.pathPoints) routePlanning.createRoute(res.data.routes[0]?.points)
}
} catch (error) {
document.getElementById('clearRoute').click()
} }
} }
}, 100) }, 100)

View File

@ -1,171 +0,0 @@
<template>
<Dialog
ref="baseDialog"
class="RoutePlanning"
title="路径规划"
left="180px"
top="100px"
width="527px"
:closeCallback="closeCallBack"
>
<template #content>
<div class="row" style="align-items: flex-start">
<div class="col start-col">
<button
class="crossPoint"
@mouseenter="svgHover[0] = true"
@mouseleave="svgHover[0] = false"
>
<svg-icon
name="add"
:size="12"
:color="svgHover[0] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
></svg-icon>
途径点
</button>
<button
class="crossPoint"
@mouseenter="svgHover[1] = true"
@mouseleave="svgHover[1] = false"
style="margin-left: 10px"
>
<svg-icon
name="add"
:size="12"
:color="svgHover[1] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
></svg-icon
>避让点
</button>
</div>
</div>
<div class="row">
<p class="lable-left-line">路径规划</p>
</div>
<div class="row">
<div class="col" style="flex: 0 0 50px">
<span class="label">起点</span>
</div>
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
</div>
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
</div>
<div class="col" style="flex: 0 0 80px">
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
</div>
</div>
<!-- 途径点 -->
<div class="row" v-for="(item, index) in positionList.waypoints" :key="index">
<div class="col" style="flex: 0 0 50px">
<span class="label">途径点</span>
</div>
<div class="col">
<span class="label">经度</span>
<input
class="input"
type="number"
title=""
min="-180"
max="180"
@model="endLng"
v-model="item.lng"
/>
</div>
<div class="col">
<span class="label">纬度</span>
<input
class="input"
type="number"
title=""
min="-180"
max="180"
@model="endLng"
v-model="item.lat"
/>
</div>
<div class="col" style="flex: 0 0 80px">
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
</div>
</div>
<div class="row">
<div class="col" style="flex: 0 0 50px">
<span class="label">终点</span>
</div>
<div class="col">
<span class="label">经度</span>
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
</div>
<div class="col">
<span class="label">纬度</span>
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
</div>
<div class="col" style="flex: 0 0 80px">
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
</div>
</div>
</template>
<template #footer>
<button @click="draw">绘制</button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
var positionList: any = reactive([
{
startlng: 0,
startlat: 0,
endlng: 0,
endlat: 0,
waypoints: [
{
lat: 0,
lng: 0
}
]
}
])
//属性
var startLng: any = ref(null)
var startLat: any = ref(null)
var endLng: any = ref(null)
var endLat: any = ref(null)
var svgHover: any = reactive([false, false])
eventBus.on('routePlanningDialog', () => {
baseDialog.value?.open()
})
const closeCallBack = (e) => {}
function pickStartPos() {}
function pickEndPos() {}
const draw = (e) => {}
</script>
<style scoped lang="scss">
// ::v-deep .RoutePlanning > .content > div > .row .col {
// margin: 0 10px;
// }
// ::v-deep .RoutePlanning > .content .row .label {
// flex: auto;
// }
.YJ-custom-base-dialog > .content .row > .col {
margin: 0 5px !important;
}
.crossPoint:hover {
color: rgba(var(--color-base1), 1);
}
</style>

View File

@ -42,9 +42,9 @@
</div> </div>
</div> </div>
</template> </template>
<template #footer> <!-- <template #footer>
<button @click="close">关闭</button> <button @click="close">关闭</button>
</template> </template> -->
</Dialog> </Dialog>
</template> </template>

View File

@ -10,32 +10,36 @@
<template #content> <template #content>
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef"> <el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
<el-form-item label="名称" prop="cameraName"> <el-form-item label="名称" prop="cameraName">
<el-input v-model="addForm.cameraName" clearable placeholder="请输入设备名称" /> <el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称" />
</el-form-item> </el-form-item>
<el-form-item label="设备IP" prop="ip"> <el-form-item label="设备IP" prop="ip">
<el-input v-model="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input> <el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备端口" prop="port"> <el-form-item label="设备端口" prop="port">
<el-input v-model="addForm.port" clearable placeholder="请输入设备端口"></el-input> <el-input v-model.trim="addForm.port" clearable placeholder="请输入设备端口"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="addForm.username" clearable placeholder="请输入用户名"></el-input> <el-input v-model.trim="addForm.username" clearable placeholder="请输入用户名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="密码" prop="password"> <el-form-item label="密码" prop="password">
<el-input v-model="addForm.password" clearable placeholder="请输入密码"></el-input> <el-input v-model.trim="addForm.password" clearable placeholder="请输入密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="type"> <el-form-item label="设备类型" prop="type">
<el-select v-model="addForm.type" filterable placeholder="请选择设备类型"> <el-select v-model.trim="addForm.type" filterable placeholder="请选择设备类型">
<el-option label="海康" value="海康"> </el-option> <el-option label="海康" value="海康"> </el-option>
<el-option label="大华" value="大华"> </el-option> <el-option label="大华" value="大华"> </el-option>
<!-- <el-option label="手动录入" value="3"> </el-option> --> <!-- <el-option label="手动录入" value="3"> </el-option> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="addForm.type === '3'" label="视频流地址" prop="flvUrl"> <el-form-item v-if="addForm.type === '3'" label="视频流地址" prop="flvUrl">
<el-input v-model="addForm.flvUrl" clearable placeholder="请输入视频流地址"></el-input> <el-input
v-model.trim="addForm.flvUrl"
clearable
placeholder="请输入视频流地址"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="通道号" prop="channel"> <el-form-item label="通道号" prop="channel">
<el-input v-model="addForm.channel" clearable placeholder="请输入通道号"></el-input> <el-input v-model.trim="addForm.channel" clearable placeholder="请输入通道号"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@ -77,9 +81,38 @@ var addForm: any = ref({
const peopleRules: any = reactive({ const peopleRules: any = reactive({
cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }], cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
ip: [{ required: true, message: '请输入ip', trigger: 'blur' }], ip: [{ required: true, message: '请输入ip', trigger: 'blur' }],
port: [{ required: true, message: '请输入设备端口号', trigger: 'blur' }], port: [
{ required: true, message: '请输入设备端口号', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入设备端口'))
return
}
const portNum = Number(value)
if (isNaN(portNum)) {
callback(new Error('端口号必须为数字'))
return
}
if (portNum < 1 || portNum > 65535) {
callback(new Error('端口号范围必须在1-65535之间'))
return
}
if (!Number.isInteger(portNum)) {
callback(new Error('端口号必须为整数'))
return
}
callback()
},
trigger: 'blur'
}
],
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请channel', trigger: 'blur' }], password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }], type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }],
channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }] channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }]
}) })

View File

@ -16,7 +16,7 @@
ref="peopleFormRef" ref="peopleFormRef"
> >
<el-form-item label="" prop="name"> <el-form-item label="" prop="name">
<el-input v-model="addForm.name" placeholder="请输入物资名称" clearable /> <el-input v-model.trim="addForm.name" placeholder="请输入物资名称" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@ -86,6 +86,7 @@ var submitProtal = () => {
}) })
} }
eventBus.on('openAddMaterial', (params) => { eventBus.on('openAddMaterial', (params) => {
console.log(params, 'iuiuuiuiu')
addTitle.value = params.title addTitle.value = params.title
if (addTitle.value != '添加物资') { if (addTitle.value != '添加物资') {
addForm.value.name = params.data.name addForm.value.name = params.data.name

View File

@ -121,6 +121,19 @@ export const useTreeNode = () => {
// render: () => {}, // render: () => {},
allowChildren: true, allowChildren: true,
}, },
folder: {
rightMenus: [
'addDirectory',
'addResource',
'pictureLocation',
'importPanorama',
'edit',
'del'
],
// detailFun: get_detail_null,
// render: () => {},
allowChildren: true,
},
tileset: { tileset: {
rightMenus: [ rightMenus: [
'edit', 'edit',
@ -440,7 +453,7 @@ export const useTreeNode = () => {
const cusNodeIcon = async (node) => { const cusNodeIcon = async (node) => {
let availablePort = await ipcRenderer.invoke('get-available-port'); let availablePort = await ipcRenderer.invoke('get-available-port');
let type let type
if(node.sourcePath || node.sourceType === 'vector') { if (node.sourcePath || node.sourceType === 'vector') {
let path = node.sourcePath ? node.sourcePath : JSON.parse(node.params).path let path = node.sourcePath ? node.sourcePath : JSON.parse(node.params).path
// 获取最后一个点的位置 // 获取最后一个点的位置
const lastDotIndex = path.lastIndexOf('.'); const lastDotIndex = path.lastIndexOf('.');
@ -468,12 +481,12 @@ export const useTreeNode = () => {
name = "lineDrawing"; name = "lineDrawing";
let strokeWidth = 0.1 let strokeWidth = 0.1
if(type === 'ellipse') { if (type === 'ellipse') {
strokeWidth = 1.5; strokeWidth = 1.5;
} }
// return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`; // return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`;
return (type === 'directory' || type === 'FeatureCollection') ? undefined : ` return (type === 'directory' || type === 'FeatureCollection' || type === 'folder') ? undefined : `
<svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: currentColor !important;stroke: currentColor !important;stroke-width: ${strokeWidth} !important;shape-rendering: geometricPrecision;"> <svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: currentColor !important;stroke: currentColor !important;stroke-width: ${strokeWidth} !important;shape-rendering: geometricPrecision;">
<use xlink:href="#icon-${name}" /> <use xlink:href="#icon-${name}" />
</svg> </svg>
@ -537,7 +550,7 @@ export const useTreeNode = () => {
allNodes = allNodes.concat(treeObj.transformToArray(node)) allNodes = allNodes.concat(treeObj.transformToArray(node))
}) })
allNodes.forEach((node: any) => { allNodes.forEach((node: any) => {
if(node.sourceType !== 'FeatureCollection' && node.sourceType !== 'Feature') { if (node.sourceType !== 'FeatureCollection' && node.sourceType !== 'Feature') {
_idSet.add(node.id) _idSet.add(node.id)
} }
treeObj.removeNode(node) treeObj.removeNode(node)