Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
This commit is contained in:
1
src/renderer/components.d.ts
vendored
1
src/renderer/components.d.ts
vendored
@ -23,6 +23,7 @@ declare module 'vue' {
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
|
||||
@ -49,6 +49,10 @@
|
||||
--color-text-shadow: rgba(20, 118, 255, 1);
|
||||
}
|
||||
|
||||
/* .cesium-viewer.\32 d{
|
||||
opacity: 0;
|
||||
} */
|
||||
|
||||
.cesium-viewer-cesiumWidgetContainer {
|
||||
position: relative;
|
||||
}
|
||||
@ -171,8 +175,12 @@
|
||||
|
||||
.YJ-custom-base-dialog button:not(button[disabled]):hover {
|
||||
border-color: rgba(var(--color-base1), 1) !important;
|
||||
color: rgba(var(--color-base1), 1) !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.YJ-custom-base-dialog button:not(button[disabled]):hover svg {
|
||||
fill: rgba(var(--color-base1), 1) !important;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog button:focus-visible {
|
||||
outline: none;
|
||||
@ -279,6 +287,10 @@
|
||||
padding: 0px 24px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .el-tabs .el-tabs__header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .div-item {
|
||||
/* border-top: 1px solid rgba(204, 204, 204, 0.2); */
|
||||
padding: 12px 0;
|
||||
@ -473,6 +485,9 @@
|
||||
.YJ-custom-base-dialog>.content .table .table-body .tr:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
.YJ-custom-base-dialog>.content .table .table-body .tr:last-child {
|
||||
border-bottom: 1px solid rgba(var(--color-base1), 0.5);
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .table .table-empty {
|
||||
display: flex;
|
||||
@ -1772,7 +1787,7 @@
|
||||
|
||||
/* 轨迹运动 */
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content {
|
||||
width: 550px;
|
||||
width: 562px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .div-item>.row>.col {
|
||||
@ -1801,6 +1816,10 @@
|
||||
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active {
|
||||
border-color: rgba(var(--color-base1));
|
||||
color: rgba(var(--color-base1));
|
||||
}
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn.is-active svg {
|
||||
fill: rgba(var(--color-base1));
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .btn-group .btn.is-active>span {
|
||||
@ -1826,7 +1845,6 @@
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .icon-rubric {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog.trajectory-motion>.content .custom__popper__arrow::after {
|
||||
|
||||
@ -1492,7 +1492,6 @@
|
||||
html.push('</a>')
|
||||
},
|
||||
makeDOMNodeNameBefore: function (html, setting, node) {
|
||||
console.log('=================', setting, node)
|
||||
var title = data.nodeTitle(setting, node),
|
||||
url = view.makeNodeUrl(setting, node),
|
||||
fontcss = view.makeNodeFontCss(setting, node),
|
||||
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
pictureLocation: '带定位照片',
|
||||
importPanorama: '带定位全景',
|
||||
addBIM: '添加BIM',
|
||||
edit: '编辑节点',
|
||||
edit: '图层属性',
|
||||
del: '删除节点',
|
||||
setView: '设置视角',
|
||||
resetView: '重置视角',
|
||||
@ -249,6 +249,7 @@ export default {
|
||||
视野缩放: '视野缩放',
|
||||
最近距离: '最近距离',
|
||||
最远距离: '最远距离',
|
||||
基础信息: '基础信息',
|
||||
属性信息: '属性信息',
|
||||
空间信息: '空间信息',
|
||||
标注风格: '标注风格',
|
||||
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
pictureLocation: 'add photo data',
|
||||
importPanorama: 'add panoramic data',
|
||||
addBIM: 'add BIM',
|
||||
edit: 'edit Node',
|
||||
edit: 'Properties',
|
||||
del: 'delete Node',
|
||||
setView: 'set View',
|
||||
resetView: 'reset View',
|
||||
@ -248,6 +248,7 @@ export default {
|
||||
视野缩放: 'Field of view zoom',
|
||||
最近距离: 'Shortest distance',
|
||||
最远距离: 'Farthest distance',
|
||||
基础信息: 'Basic info',
|
||||
属性信息: 'Attribute',
|
||||
空间信息: 'Spatial info',
|
||||
标注风格: 'Mark style',
|
||||
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
pictureLocation: '帶定位照片',
|
||||
importPanorama: '帶定位全景',
|
||||
addBIM: '添加BIM',
|
||||
edit: '編輯節點',
|
||||
edit: '圖層屬性',
|
||||
del: '刪除節點',
|
||||
setView: '設置視角',
|
||||
resetView: '重置視角',
|
||||
@ -247,6 +247,7 @@ export default {
|
||||
视野缩放: '視野縮放',
|
||||
最近距离: '最近距離',
|
||||
最远距离: '最遠距離',
|
||||
基础信息: '基礎信息',
|
||||
属性信息: '屬性信息',
|
||||
空间信息: '空間信息',
|
||||
标注风格: '標注風格',
|
||||
|
||||
@ -27,6 +27,7 @@ export const TsApi = {
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
delPlan: async (data: any) => {
|
||||
return await request.post({
|
||||
url: '/tsPlan/delete',
|
||||
@ -45,6 +46,19 @@ export const TsApi = {
|
||||
data
|
||||
})
|
||||
},
|
||||
//树的隐藏显示
|
||||
updateTreeShow: async (data: any) => {
|
||||
let datas = []
|
||||
data.forEach(item => {
|
||||
let obj = {id: item.id, show: item.isShow}
|
||||
// @ts-ignore
|
||||
datas.push(obj)
|
||||
})
|
||||
return await request.post({
|
||||
url: `/tsSource/batchUpdateShowStatus`,
|
||||
data: datas
|
||||
})
|
||||
},
|
||||
///tsSource/addModelSource
|
||||
addTsModelSource: async (data: any) => {
|
||||
return await request.post({
|
||||
|
||||
@ -426,7 +426,6 @@ img {
|
||||
.ztree li span.button.switch {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#app {
|
||||
.ztree * {
|
||||
font-size: 14px;
|
||||
@ -438,6 +437,9 @@ img {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.ztree .checkbox_false_full + a,.ztree .checkbox_false_full_focus + a {
|
||||
color: #d7d7d7;
|
||||
}
|
||||
.ztree li a.curSelectedNode {
|
||||
background-color: #ffffff00;
|
||||
border: none;
|
||||
@ -683,6 +685,18 @@ img {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1640px) {
|
||||
#app .left .menus .menus_itemBox .item_text {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1450px) {
|
||||
#app .left .menus .menus_itemBox .item_text {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 提示 */
|
||||
/* .el-message--info {
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import { leftClick, rightClick } from '../../src/views/components/tree/entityClick'
|
||||
import { renderVector } from '../views/components/tree/components/hooks/renderVector'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
const { cusUpdateNode } = useTreeNode()
|
||||
|
||||
export const initMapData = async (type, data, cd) => {
|
||||
let entityObject
|
||||
@ -115,6 +118,18 @@ export const initMapData = async (type, data, cd) => {
|
||||
})
|
||||
break
|
||||
case 'path':
|
||||
data.customView = {
|
||||
"orientation": {
|
||||
"heading": 0.7281022757737154,
|
||||
"pitch": -40.42354263534561,
|
||||
"roll": 0.00021604950860490326
|
||||
},
|
||||
"relativePosition": {
|
||||
"lng": 0.0002095400000001746,
|
||||
"lat": -0.000447990000001397,
|
||||
"alt": 45.65
|
||||
}
|
||||
}
|
||||
entityObject = new YJ.Obj.TrajectoryMotion(window.earth, data)
|
||||
break
|
||||
case 'wallStereoscopic':
|
||||
@ -196,7 +211,7 @@ export const initMapData = async (type, data, cd) => {
|
||||
console.log('--------------------onClick')
|
||||
//鼠标左键点击事件
|
||||
entityObject.onClick = () => {
|
||||
// console.log('onClick')
|
||||
console.log('onClick')
|
||||
leftClick(getOptions());
|
||||
};
|
||||
//鼠标右键点击事件
|
||||
@ -204,6 +219,24 @@ export const initMapData = async (type, data, cd) => {
|
||||
rightClick(getOptions());
|
||||
};
|
||||
|
||||
// 文本框回调
|
||||
if(type === 'textBox') {
|
||||
entityObject.callback = (options) => {
|
||||
let params = structuredClone(options)
|
||||
let sourceName = '文本框'
|
||||
delete params.name
|
||||
delete params.host
|
||||
let params2 = {
|
||||
id: params.id,
|
||||
sourceName:sourceName,
|
||||
params: params,
|
||||
isShow: params.show ? 1 : 0
|
||||
}
|
||||
TreeApi.updateDirectoryInfo(params2)
|
||||
cusUpdateNode({ id: params.id, sourceName: sourceName, params: JSON.stringify(params) })
|
||||
}
|
||||
}
|
||||
|
||||
if (entityObject.options.id) {
|
||||
(window as any)._entityMap.set(entityObject.options.id, entityObject)
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 1.9 KiB |
@ -1,4 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10.5" height="10.5" viewBox="0 0 10.5 10.5" fill="none">
|
||||
<path d="M8.25 5.39063L7.4625 4.59844C7.3875 4.52344 7.27031 4.52344 7.19531 4.59844L6.92812 4.86563C6.85312 4.94063 6.85312 5.05782 6.92812 5.13282L8.47031 6.675C8.55937 6.74532 8.68125 6.74532 8.77031 6.675L10.3125 5.13282C10.3875 5.0625 10.3922 4.94063 10.3172 4.86563L10.05 4.59844C9.975 4.52344 9.85781 4.52344 9.78281 4.59844L9 5.39063L9 1.6875C9 1.58438 8.91562 1.5 8.8125 1.5L3.75 1.5L3.75 0.1875C3.75 0.0843751 3.66562 0 3.5625 0L0.1875 0C0.084375 0 0 0.0843751 0 0.1875L0 3.5625C0 3.66563 0.084375 3.75 0.1875 3.75L3.5625 3.75C3.66562 3.75 3.75 3.66563 3.75 3.5625L3.75 2.25L8.25 2.25L8.25 5.39063ZM3 3L0.75 3L0.75 0.75L3 0.75L3 3ZM10.3125 6.75L6.9375 6.75C6.83437 6.75 6.75 6.83438 6.75 6.9375L6.75 10.3125C6.75 10.4156 6.83437 10.5 6.9375 10.5L10.3125 10.5C10.4156 10.5 10.5 10.4156 10.5 10.3125L10.5 6.9375C10.5 6.83438 10.4156 6.75 10.3125 6.75ZM9.75 9.75001L7.5 9.75001L7.5 7.5L9.75 7.5L9.75 9.75001Z" fill="#FFFFFF" >
|
||||
</path>
|
||||
</svg>
|
||||
<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" fill="none"><g clip-path="url(#clip-path-2256_333)"><path d="M3.74078 6.58137C3.73295 6.59133 3.72512 6.60176 3.72163 6.61434L3.11787 8.8213C3.0826 8.94978 3.11874 9.08822 3.21408 9.18586C3.28548 9.2553 3.3795 9.29351 3.47962 9.29351C3.5127 9.29351 3.54579 9.2896 3.57843 9.2809L5.77629 8.68328C5.77979 8.68328 5.78154 8.68631 5.78414 8.68631C5.80937 8.68631 5.83421 8.6772 5.85294 8.65807L11.73 2.79937C11.9046 2.62513 12.0004 2.38772 12.0004 2.12947C12.0004 1.83674 11.8759 1.54422 11.6578 1.32742L11.1027 0.773191C10.8851 0.555745 10.5913 0.431396 10.2979 0.431396C10.0389 0.431396 9.80075 0.526895 9.62573 0.700699L3.74948 6.56097C3.74341 6.56659 3.74515 6.57485 3.74078 6.58137ZM11.155 2.22562L10.5712 2.8072L9.62485 1.84869L10.2004 1.27491C10.2913 1.18379 10.4676 1.19703 10.5721 1.3016L11.1275 1.85585C11.1855 1.91358 11.2185 1.99038 11.2185 2.06633C11.2181 2.12862 11.1959 2.18505 11.155 2.22562ZM4.78596 6.67338L9.02674 2.44501L9.97356 3.40418L5.74061 7.62428L4.78596 6.67338ZM4.01329 8.38773L4.31975 7.26623L5.13725 8.08132L4.01329 8.38773Z" fill="#FFFFFF" ></path><path d="M11.5268 4.54734C11.3043 4.54734 11.1219 4.72766 11.1211 4.95248L11.1211 10.4147C11.1211 10.7012 10.8878 10.9338 10.6 10.9338L1.33227 10.9338C1.04496 10.9338 0.810751 10.7012 0.810751 10.4147L0.810751 1.49926C0.810751 1.21257 1.04496 0.979735 1.33227 0.979735L7.30122 0.979735C7.52496 0.979735 7.70653 0.798549 7.70653 0.575451C7.70653 0.352806 7.52496 0.171387 7.30122 0.171387L1.27046 0.171387C0.570049 0.171387 0 0.739297 0 1.43806L0 10.4764C0 11.1751 0.570049 11.7428 1.27046 11.7428L10.6614 11.7428C11.3623 11.7428 11.9321 11.1751 11.9321 10.4764L11.9321 4.94988C11.9312 4.72766 11.7492 4.54734 11.5268 4.54734Z" fill="#FFFFFF" ></path></g><defs><clipPath id="clip-path-2256_333"><path d="M0 12L12 12L12 0L0 0L0 12Z" fill="white"/></clipPath></defs></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.9 KiB |
@ -1,4 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="9.857177734375" viewBox="0 0 12 9.857177734375" fill="none">
|
||||
<path d="M8.28042 1.6024L11.585 1.6024C11.8114 1.6024 12 1.41411 12 1.18816C12 0.962208 11.8114 0.773909 11.585 0.773909L8.28042 0.773909C8.05408 0.773909 7.86545 0.962208 7.86545 1.18816C7.86545 1.42164 8.04652 1.6024 8.28042 1.6024ZM8.28042 4.9013L11.585 4.9013C11.8114 4.9013 12 4.713 12 4.48705C12 4.26111 11.8114 4.07281 11.585 4.07281L8.28042 4.07281C8.05408 4.07281 7.86545 4.26111 7.86545 4.48705C7.86545 4.72054 8.04652 4.9013 8.28042 4.9013ZM8.28042 8.20019L11.585 8.20019C11.8114 8.20019 12 8.0119 12 7.78595C12 7.55999 11.8114 7.37171 11.585 7.37171L8.28042 7.37171C8.05408 7.37171 7.86545 7.55999 7.86545 7.78595C7.86545 8.01943 8.04652 8.20019 8.28042 8.20019ZM7.23168 3.25185L3.97987 0.118647C3.81389 -0.0395079 3.54227 -0.0395079 3.37629 0.118647L0.124492 3.25185C-0.0414896 3.41002 -0.0414896 3.67363 0.124492 3.83179C0.207422 3.91464 0.320646 3.9523 0.42627 3.9523C0.531894 3.9523 0.64507 3.91464 0.728061 3.83179L3.24803 1.39905L3.24803 9.44293C3.24803 9.66888 3.43665 9.85718 3.67054 9.85718C3.90442 9.85718 4.10059 9.67642 4.10059 9.44293L4.10059 1.39905L6.62056 3.83179C6.78654 3.98996 7.05816 3.98996 7.22414 3.83179C7.39768 3.67363 7.39768 3.41002 7.23168 3.25185Z" fill="#FFFFFF" >
|
||||
</path>
|
||||
</svg>
|
||||
<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" fill="none"><path d="M3.71958 2.71666L0.414964 2.71666C0.188621 2.71666 0 2.52837 0 2.30241C0 2.07646 0.188621 1.88816 0.414964 1.88816L3.71958 1.88816C3.94592 1.88816 4.13455 2.07646 4.13455 2.30241C4.13455 2.5359 3.95348 2.71666 3.71958 2.71666ZM3.71958 6.01556L0.414964 6.01556C0.188621 6.01556 0 5.82726 0 5.60131C0 5.37536 0.188621 5.18706 0.414964 5.18706L3.71958 5.18706C3.94592 5.18706 4.13455 5.37536 4.13455 5.60131C4.13455 5.8348 3.95348 6.01556 3.71958 6.01556ZM3.71958 9.31445L0.414964 9.31445C0.188621 9.31445 0 9.12616 0 8.90021C0 8.67425 0.188621 8.48596 0.414964 8.48596L3.71958 8.48596C3.94592 8.48596 4.13455 8.67425 4.13455 8.90021C4.13455 9.13369 3.95348 9.31445 3.71958 9.31445ZM4.76832 4.36611L8.02013 1.2329C8.18611 1.07475 8.45773 1.07475 8.62371 1.2329L11.8755 4.36611C12.0415 4.52428 12.0415 4.78788 11.8755 4.94605C11.7926 5.0289 11.6794 5.06656 11.5737 5.06656C11.4681 5.06656 11.3549 5.0289 11.2719 4.94605L8.75197 2.51331L8.75197 10.5572C8.75197 10.7831 8.56335 10.9714 8.32946 10.9714C8.09558 10.9714 7.89941 10.7907 7.89941 10.5572L7.89941 2.51331L5.37944 4.94605C5.21346 5.10422 4.94184 5.10422 4.77586 4.94605C4.60232 4.78788 4.60232 4.52428 4.76832 4.36611Z" fill="#FFFFFF" ></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
@ -67,7 +67,7 @@ export function getNamefromPath(path) {
|
||||
}
|
||||
|
||||
export function handleInputLimit(e) {
|
||||
if (e.data === '-') {
|
||||
if (e.data === '-' || e.data === '.') {
|
||||
}
|
||||
else {
|
||||
e.target.value = e.target.value || 0
|
||||
|
||||
@ -157,7 +157,8 @@ const initTreeCallBack = () => {
|
||||
if (!detail && !params) {
|
||||
detail = {
|
||||
id: arr[i].id,
|
||||
name: arr[i].sourceName
|
||||
name: arr[i].sourceName,
|
||||
isShow: arr[i].isShow
|
||||
}
|
||||
}
|
||||
layers.push(
|
||||
@ -168,7 +169,7 @@ const initTreeCallBack = () => {
|
||||
)
|
||||
} else {
|
||||
console.log({...detail, ...params})
|
||||
initMapData(arr[i].sourceType, {...detail, ...params})
|
||||
initMapData(arr[i].sourceType, {...detail, ...params},)
|
||||
|
||||
}
|
||||
}
|
||||
@ -195,7 +196,9 @@ const initTreeCallBack = () => {
|
||||
});
|
||||
if ((window as any).earth_ts) {
|
||||
for (let i = 0; i < layers.length; i++) {
|
||||
initMapData(layers[i].sourceType, layers[i].detail, null)
|
||||
initMapData(layers[i].sourceType, layers[i].detail, (layer) => {
|
||||
layer.show = Boolean(layers[i].isShow)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -232,7 +235,7 @@ const onClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
* @param treeId
|
||||
* @param treeNode
|
||||
*/
|
||||
const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
const onCheck = async (event: any, treeId: any, treeNode: any) => {
|
||||
console.log(treeNode, 'treeNode')
|
||||
let p_ids: any = []
|
||||
let parentNode = treeNode.getParentNode();
|
||||
@ -262,7 +265,7 @@ const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
p_ids.push(
|
||||
{
|
||||
id: parentNode.id,
|
||||
isShow: 0
|
||||
isShow: 0,
|
||||
}
|
||||
)
|
||||
window['treeObj'].checkNode(parentNode, false, true);
|
||||
@ -270,7 +273,7 @@ const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
p_ids.push(
|
||||
{
|
||||
id: parentNode.id,
|
||||
isShow: 1
|
||||
isShow: 1,
|
||||
}
|
||||
)
|
||||
}
|
||||
@ -286,7 +289,7 @@ const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
|
||||
function sourceStatus(node) {
|
||||
if (canCheckType.includes(node.sourceType)) {
|
||||
ids.push({id: node.id, isShow: node.isShow ? 1 : 0})
|
||||
ids.push({id: node.id, isShow: node.isShow ? 1 : 0,})
|
||||
console.log(node)
|
||||
let entityObject
|
||||
entityObject = (window as any)._entityMap.get(node.id)
|
||||
@ -308,6 +311,18 @@ const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
|
||||
sourceStatus(treeNode)
|
||||
console.log("ids", ids)
|
||||
const res = await TsApi.updateTreeShow(ids)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '操作失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const onMouseDown = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
console.log("onMouseDown")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<!--:style="'left:'+(index*Store.scales.distanceOfTicTiny+Store.scales.originOffset)+'px'"-->
|
||||
<template>
|
||||
<div class="timeScale">
|
||||
<div class="timeScale" @click="clickTime">
|
||||
<!-- 循环数组,确保key唯一 -->
|
||||
<template v-for="(_, index) in ticTiny" :key="index">
|
||||
<span
|
||||
@ -24,7 +24,12 @@ import {ref, watchEffect} from 'vue'
|
||||
|
||||
const props = defineProps(['ticTiny', 'ticMain', 'distanceOfTicTiny', 'distanceOfTicMain', 'originOffset', 'originMainOffset'])
|
||||
|
||||
|
||||
const clickTime = (e) => {
|
||||
console.log("点击时间轴", e)
|
||||
let offset = window['tsObj']._Store._scales.scrollLeft + (e.screenX - 400)
|
||||
window['tsObj']._Store.currentTimestamp = window['tsObj']._Store._startTimestamp + (offset / window['tsObj']._Store._scales.preSecondPx) * 1000
|
||||
window['tsObj']._Store.setCursorLeft(window['tsObj']._Store._currentTimestamp)
|
||||
}
|
||||
let ticLabel = (val) => {
|
||||
let timeLabels = []
|
||||
/* console.log("timeLabels", this.Store.scales.ticMain)
|
||||
|
||||
@ -141,6 +141,7 @@ const propsMap = {
|
||||
}
|
||||
// 更新数值触发视图更新
|
||||
window['updateProp'] = (key: string, val: any) => {
|
||||
console.log("window['updateProp']", key, val)
|
||||
if (propsMap[key])
|
||||
propsMap[key].value = val
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ onUnmounted(() => {
|
||||
|
||||
// 定义可复用的回调函数
|
||||
const handleClick = (e) => {
|
||||
console.log('点击事件触发', e)
|
||||
// console.log('点击事件触发', e)
|
||||
let dom = $('.MouseRight')[0]
|
||||
if (dom) dom.style.display = "none"
|
||||
|
||||
|
||||
@ -14,14 +14,14 @@
|
||||
<svg-icon :size="15" class="icon-svg-item" name="closeLeftTs"/>收起
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<el-input
|
||||
v-model="input2"
|
||||
class="responsive-input"
|
||||
placeholder="搜索"
|
||||
:prefix-icon="Search"
|
||||
/>
|
||||
</div>-->
|
||||
<div>
|
||||
<el-input
|
||||
v-model="input2"
|
||||
class="responsive-input"
|
||||
placeholder="搜索"
|
||||
:prefix-icon="Search"
|
||||
/>
|
||||
</div>
|
||||
<div class="tabsBox">
|
||||
<div class="tabs">
|
||||
<div v-for="(item,index) in tabs" @click="handleTabClick(item,index)" :class="index==activIndex?'active':''">
|
||||
@ -32,9 +32,11 @@
|
||||
<div class="treeOrList custom_scroll_bar_ts" :style="currentTypeId!=''?'height: calc(100% - 300px);':''">
|
||||
<template v-if="dataType=='tree'">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
:filter-node-method="filterNode"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="dataType=='list'">
|
||||
@ -65,14 +67,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
//@ts-nocheck
|
||||
import {ref, onMounted} from "vue";
|
||||
import {ref, onMounted, watch} from "vue";
|
||||
import {Search} from '@element-plus/icons-vue'
|
||||
import {ModelApi} from "../../api/model";
|
||||
import {GraphApi} from "../../api/graphLabel";
|
||||
|
||||
import {addMapSource} from "./entity";
|
||||
import {useTreeNode} from "../components/tree/hooks/treeNode";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ElMessage, TreeInstance} from "element-plus";
|
||||
|
||||
const {getSelectedNodes} = useTreeNode()
|
||||
const service = ref(localStorage.getItem('ip'))
|
||||
@ -83,6 +85,7 @@ interface Tree {
|
||||
children?: Tree[]
|
||||
}
|
||||
|
||||
const treeRef = ref<TreeInstance>()
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
@ -114,10 +117,26 @@ let graphTypes = ref<Tree[]>([])
|
||||
const lists = ref([])
|
||||
const elementList = ref([])
|
||||
let input2 = ref('')
|
||||
watch(input2, (val) => {
|
||||
console.log("input2", val)
|
||||
console.log("lists", lists)
|
||||
console.log("lists", lists.value.filter(item => item.name.includes(val)))
|
||||
if (val == '') {
|
||||
handleTabClick(tabs[activIndex.value], activIndex.value)
|
||||
} else {
|
||||
lists.value = lists.value.filter(item => item.name.includes(val))
|
||||
}
|
||||
treeRef.value && treeRef.value!.filter(val)
|
||||
})
|
||||
// 当前选择类型的Id
|
||||
const currentTypeId = ref('')
|
||||
// 是否为树结构
|
||||
const dataType = ref('tree')
|
||||
|
||||
const filterNode = (value: string, data: Tree) => {
|
||||
if (!value) return true
|
||||
return data.name.includes(value)
|
||||
}
|
||||
// 树形结构节点点击
|
||||
const handleTabClick = (item, index) => {
|
||||
activIndex.value = index
|
||||
@ -272,7 +291,7 @@ let addMarker = (item) => {
|
||||
|
||||
.tabsBox {
|
||||
//flex: auto;
|
||||
height: calc(100% - 30px);
|
||||
height: calc(100% - 70.8px);
|
||||
//display: flex;
|
||||
//flex-direction: column;
|
||||
.tabs {
|
||||
|
||||
@ -60,18 +60,22 @@ export function initMapData(type, data, cb: any = null) {
|
||||
case 'gdslImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.GDSLImagery(window['earth_ts'], data)
|
||||
cb && cb(entityObject)
|
||||
break
|
||||
case 'gdlwImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.GDLWImagery(window['earth_ts'], data)
|
||||
cb && cb(entityObject)
|
||||
break
|
||||
case 'arcgisBlueImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.ArcgisBLUEImagery(window['earth_ts'], data)
|
||||
cb && cb(entityObject)
|
||||
break
|
||||
case 'arcgisWximagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.ArcgisWXImagery(window['earth_ts'], data)
|
||||
cb && cb(entityObject)
|
||||
break
|
||||
case "guiji":
|
||||
entityObject = new YJ.Obj.TrajectoryMotionObject(
|
||||
|
||||
@ -198,7 +198,7 @@ const getList = (params: any = null) => {
|
||||
formData.append('pageSize', pageSize.value)
|
||||
formData.append('pageNum', pageNum.value)
|
||||
if (params) {
|
||||
/*for (const paramsKey in params) {
|
||||
for (const paramsKey in params) {
|
||||
if (params[paramsKey]) {
|
||||
if (paramsKey == 'datetime') {
|
||||
formData.append('startTime', params[paramsKey][0])
|
||||
@ -208,8 +208,8 @@ const getList = (params: any = null) => {
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
formData.append('username', params["createdBy"])
|
||||
}
|
||||
formData.append('nickname', params["createdBy"])
|
||||
|
||||
}
|
||||
TsApi.planList(formData).then(res => {
|
||||
|
||||
@ -93,7 +93,6 @@ export class Store {
|
||||
break
|
||||
case "ticTiny":
|
||||
val = value
|
||||
|
||||
break
|
||||
case "ticMain":
|
||||
this._scales.timeLabels = this._scales.timeLabels.slice(0, this._scales.ticMain)
|
||||
@ -130,8 +129,12 @@ export class Store {
|
||||
// 通过时间戳来设置位置
|
||||
setCursorLeft(stamp) {
|
||||
let newLeft = ((stamp - this._startTimestamp) / 1000) * this._scales.preSecondPx - this._scales.scrollLeft
|
||||
console.log("stamp", stamp)
|
||||
console.log("this._startTimestamp", this._startTimestamp)
|
||||
console.log("this._scales.preSecondPx", this._scales.preSecondPx)
|
||||
console.log("newLeft", newLeft)
|
||||
|
||||
this.setScale('cursorLeft', newLeft)
|
||||
// console.log("newLeft", newLeft)
|
||||
}
|
||||
|
||||
dealData(key = "startTime", value = []) {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
>
|
||||
<div
|
||||
class="set_item"
|
||||
:class="{ 'last-item': i === setList.length - 1 }"
|
||||
:class="{ 'last-item': i === setList.length - 1, 'first-item': i === 0 }"
|
||||
@click="item.callback"
|
||||
>
|
||||
<svg-icon :name="item.icon" :size="20"></svg-icon>
|
||||
@ -52,20 +52,28 @@ eventBus.on('settingPop', (data) => {
|
||||
data ? setPupRef.value.open('current') : setPupRef.value.close()
|
||||
})
|
||||
const logout = async (e) => {
|
||||
let res = await LoginApi.logout()
|
||||
if (window.earth) {
|
||||
window.earth.destroy()
|
||||
window.earth = null
|
||||
}
|
||||
if (res.code === 200) {
|
||||
router.push({
|
||||
path: '/',
|
||||
query: {
|
||||
type: 'logout'
|
||||
ElMessageBox.confirm('您确定要退出当前账号?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let res = await LoginApi.logout()
|
||||
if (window.earth) {
|
||||
window.earth.destroy()
|
||||
window.earth = null
|
||||
}
|
||||
if (res.code === 200) {
|
||||
router.push({
|
||||
path: '/',
|
||||
query: {
|
||||
type: 'logout'
|
||||
}
|
||||
})
|
||||
// localStorage.clear()
|
||||
}
|
||||
})
|
||||
// localStorage.clear()
|
||||
}
|
||||
.catch(() => {})
|
||||
}
|
||||
const openSet = () => {
|
||||
setPupRef.value?.open()
|
||||
@ -81,25 +89,25 @@ const resetShow = (item) => {
|
||||
|
||||
const setList = ref([
|
||||
// 标准版本
|
||||
// {id: 4, index: 2, icon: 'layerTitleBg', className: 'header_public', callback: this.setShow},
|
||||
{
|
||||
id: 0,
|
||||
index: 0,
|
||||
icon: 'beidou',
|
||||
name: 'locate',
|
||||
icon: 'out_login',
|
||||
name: 'logout',
|
||||
className: 'header_public',
|
||||
dbcallback: (e) => {},
|
||||
callback: (e) => {}
|
||||
// dbcallback: this.flyTo,
|
||||
// callback: this.locate,
|
||||
dbcallback: null,
|
||||
callback: logout
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
index: 1,
|
||||
icon: 'sys_reset',
|
||||
icon: 'sys_set',
|
||||
name: 'set',
|
||||
className: 'header_public',
|
||||
name: 'reset',
|
||||
dbcallback: null,
|
||||
callback: resetShow
|
||||
// callback: setShow
|
||||
callback: openSet
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@ -112,31 +120,33 @@ const setList = ref([
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
index: 3,
|
||||
icon: 'sys_set',
|
||||
name: 'set',
|
||||
index: 4,
|
||||
icon: 'sys_reset',
|
||||
className: 'header_public',
|
||||
name: 'reset',
|
||||
dbcallback: null,
|
||||
// callback: setShow
|
||||
callback: openSet
|
||||
callback: resetShow
|
||||
},
|
||||
// {id: 4, index: 2, icon: 'layerTitleBg', className: 'header_public', callback: this.setShow},
|
||||
{
|
||||
id: 4,
|
||||
index: 4,
|
||||
icon: 'out_login',
|
||||
name: 'logout',
|
||||
icon: 'beidou',
|
||||
name: 'locate',
|
||||
className: 'header_public',
|
||||
dbcallback: null,
|
||||
callback: logout
|
||||
dbcallback: (e) => {},
|
||||
callback: (e) => {}
|
||||
// dbcallback: this.flyTo,
|
||||
// callback: this.locate,
|
||||
}
|
||||
])
|
||||
|
||||
ipcRenderer.invoke('getIsFullScreen').then((res) => {
|
||||
setList.value[2].icon = res ? 'full_screen_exit' : 'full_screen'
|
||||
setList.value[2].name = res ? 'shrink' : 'fullScreen'
|
||||
})
|
||||
ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => {
|
||||
setList.value[2].icon = isFullscreen ? 'full_screen_exit' : 'full_screen'
|
||||
setList.value[2].name = isFullscreen ? 'shrink' : 'fullScreen'
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -151,6 +161,7 @@ ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => {
|
||||
// background: var(--svg-headColorbg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
// justify-content: space-between;
|
||||
// border: 1px solid var(--svg-headColor3);
|
||||
padding: 10px 0;
|
||||
@ -179,7 +190,7 @@ ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => {
|
||||
);
|
||||
}
|
||||
|
||||
.set_item.last-item::after {
|
||||
.set_item.first-item::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ eventBus.on('tufuInput', (data) => {
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
position: absolute;
|
||||
top: 14%;
|
||||
top: 130px;
|
||||
right: 15px;
|
||||
}
|
||||
.el-range-editor.is-active .el-range-editor.is-active:hover,
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 60%;">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<div class="col">
|
||||
<span class="label" style="margin-right: 0px;">投影面积:</span>
|
||||
<input class="input input-text" readonly type="text" v-model="area">
|
||||
<el-select v-model="areaUnit">
|
||||
|
||||
@ -325,6 +325,7 @@ const draw = (data) => {
|
||||
}
|
||||
|
||||
const startVideo = () => {
|
||||
//@ts-ignore
|
||||
document.getElementById('earthContainer').style.zIndex = 100
|
||||
$sendElectronChanel('startRecoder')
|
||||
ElMessage({
|
||||
@ -336,6 +337,7 @@ const startVideo = () => {
|
||||
if (e.key === 'Escape') {
|
||||
$sendElectronChanel('endRecoder')
|
||||
window.removeEventListener('keydown', handleKeyDown)
|
||||
//@ts-ignore
|
||||
document.getElementById('earthContainer').style.zIndex = ''
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,8 +214,7 @@ const open = () => {
|
||||
routePlanning.createRoute(res.data.routes[0]?.points)
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
document.getElementById('clearRoute').click()
|
||||
document.getElementById('clearRoute')?.click()
|
||||
}
|
||||
}
|
||||
}, 100)
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 60%;">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<div class="col">
|
||||
<span class="label" style="margin-right: 0px;">投影面积:</span>
|
||||
<input class="input input-text" readonly type="text" v-model="area">
|
||||
<el-select v-model="areaUnit">
|
||||
@ -277,6 +277,7 @@ const open = async (id: any, type: any) => {
|
||||
|
||||
const heightModeChange = (val) => {
|
||||
that.heightMode = heightMode.value
|
||||
entityOptions.value.spreadState = false
|
||||
}
|
||||
|
||||
const heightConfirm = () => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="attribute">
|
||||
<div class="div-item attribute">
|
||||
<div class="row">
|
||||
<div class="col attribute-select-box">
|
||||
<span class="label" style="line-height: 32px">{{ t('general.内容类型') }}</span>
|
||||
@ -244,8 +244,8 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.编辑内容') }}</span>
|
||||
<input class="input goods-select-input" type="text" style="width: 180px;margin-right: 10px;"
|
||||
v-model="goodsKeywords">
|
||||
<input class="input goods-select-input" type="text" placeholder="请输入关键字" style="width: 180px;margin-right: 10px;"
|
||||
v-model="goodsKeywords">
|
||||
<button class="select btn" @click="goodsFilter">{{ t('general.搜索') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -327,7 +327,6 @@ const goodsFilter = () => {
|
||||
for (let m = 0; m < goodsList.value.length; m++) {
|
||||
if ('id' in goodsList.value[m]) {
|
||||
if (goodsList.value[m].id === props.entityOptions.attributeGoods[i].id) {
|
||||
goodsList.value[m].name = props.entityOptions.attributeGoods[i].name
|
||||
goodsList.value[m].cnt = props.entityOptions.attributeGoods[i].cnt
|
||||
break
|
||||
}
|
||||
@ -640,7 +639,7 @@ const _addRtmp = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const rtmpEdit = (index: any, item: { name: any; url: any; id: any }) => {
|
||||
const rtmpEdit = (index: any, item: { name: any; url: any; id: any; }) => {
|
||||
let active = {
|
||||
index: index,
|
||||
name: item.name,
|
||||
|
||||
@ -3,144 +3,147 @@
|
||||
:closeCallback="closeCallback">
|
||||
<template #content>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: unset">{{ t('general.名称') }}</span>
|
||||
<input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="title1">
|
||||
<div class="row">
|
||||
<p class="lable-left-line">{{ t('dialog.point.WGS84') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title2">
|
||||
<div class="row coordinate-select-box">
|
||||
<div class="lable-left-line">
|
||||
{{ t('dialog.point.转换坐标选择') }}
|
||||
<el-select class="input input-select coordinate-select" style="width: 155px; margin-left: 20px"
|
||||
v-model="coordinate" @change="coordinateChange" placeholder="请选择">
|
||||
<el-option v-for="item in epsg_map" :key="item.epsg" :label="item.name" :value="item.epsg">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane :label="t('general.基础信息')" name="1">
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: unset">{{ t('general.名称') }}</span>
|
||||
<input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div style="width: 46%;">
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.经度') }}</span>
|
||||
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng"
|
||||
@change="changLng" @input="$handleInputLimit" />
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="title1">
|
||||
<div class="row">
|
||||
<p class="lable-left-line">{{ t('dialog.point.WGS84') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title2">
|
||||
<div class="row coordinate-select-box">
|
||||
<div class="lable-left-line">
|
||||
{{ t('dialog.point.转换坐标选择') }}
|
||||
<el-select class="input input-select coordinate-select" style="width: 155px; margin-left: 20px"
|
||||
v-model="coordinate" @change="coordinateChange" placeholder="请选择">
|
||||
<el-option v-for="item in epsg_map" :key="item.epsg" :label="item.name" :value="item.epsg">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.纬度') }}</span>
|
||||
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat"
|
||||
@change="changLat" @input="$handleInputLimit" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.海拔高度') }}</span>
|
||||
<div class="input-number input-number-unit-1 alt-box"
|
||||
:class="{ disabled: heightMode == 2 || heightMode === 3 }">
|
||||
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.alt"
|
||||
@change="changAlt" @input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div style="width: 46%;">
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.经度') }}</span>
|
||||
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng"
|
||||
@change="changLng" @input="$handleInputLimit" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.纬度') }}</span>
|
||||
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat"
|
||||
@change="changLat" @input="$handleInputLimit" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.海拔高度') }}</span>
|
||||
<div class="input-number input-number-unit-1 alt-box"
|
||||
:class="{ disabled: heightMode == 2 || heightMode === 3 }">
|
||||
<input class="input" type="number" title="" min="-9999999" max="999999999"
|
||||
v-model="entityOptions.alt" @change="changAlt" @input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 50%;">
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.XAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-x" readonly v-model="x" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.YAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-y" readonly v-model="y" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.ZAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-z" readonly v-model="z" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 50%;">
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.XAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-x" readonly v-model="x" />
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<setStyle type="点" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.show') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.billboardShow" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 5px">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.YAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-y" readonly v-model="y" />
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.current') }}</span>
|
||||
<div class="image-box" @click="clickChangeImage">
|
||||
<img class="image" :src="entityOptions.billboardImage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.multiple') }}</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input class="input" type="number" title="" min="0.1" max="99" v-model="entityOptions.billboardScale"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">{{ t('general.times') }}</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">{{ t('dialog.point.ZAxis') }}:</span>
|
||||
<input style="border: none; background: none" class="input convert-z" readonly v-model="z" />
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col" style="flex: 0 0 80px;">
|
||||
<span class="label" style="flex: none;">{{ t('dialog.point.text.show') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<setStyle type="点" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.show') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.billboardShow" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.current') }}</span>
|
||||
<div class="image-box" @click="clickChangeImage">
|
||||
<img class="image" :src="entityOptions.billboardImage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none">{{ t('dialog.point.icon.multiple') }}</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input class="input" type="number" title="" min="0.1" max="99" v-model="entityOptions.billboardScale"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">{{ t('general.times') }}</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col" style="flex: 0 0 80px;">
|
||||
<span class="label" style="flex: none;">{{ t('dialog.point.text.show') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.color') }}</span>
|
||||
<div class="labelColor" ref="labelColorRef"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.size') }}</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
|
||||
style="min-width: 70px;" @input="$handleInputLimit" />
|
||||
<span class="unit">px</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col font-select-box">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.font') }}</span>
|
||||
<el-select class="input input-select font-select" style="width: 100px"
|
||||
v-model="entityOptions.labelFontFamily">
|
||||
<el-option v-for="item in fontList" :key="item.key" :label="t('general.' + item.name)" :value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row" style="padding-left: 12px;">
|
||||
<div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.color') }}</span>
|
||||
<div class="labelColor" ref="labelColorRef"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.size') }}</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
|
||||
style="min-width: 70px;" @input="$handleInputLimit" />
|
||||
<span class="unit">px</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col font-select-box">
|
||||
<span class="label" style="flex: none;">{{ t('general.text.font') }}</span>
|
||||
<el-select class="input input-select font-select" style="width: 100px"
|
||||
v-model="entityOptions.labelFontFamily">
|
||||
<el-option v-for="item in fontList" :key="item.key" :label="t('general.' + item.name)"
|
||||
:value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row" style="padding-left: 12px;">
|
||||
<div class="col">
|
||||
<div class="customized-tip"></div>
|
||||
<span class="label" style="flex: none;">{{ t('general.text.style') }}</span>
|
||||
@ -184,161 +187,158 @@
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col" style="flex: 0 0 120px">
|
||||
<span class="label">{{ t('general.视野缩放') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.最近距离') }}</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.near"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.最远距离') }}</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.far"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane :label="t('general.属性信息')" name="1">
|
||||
<attribute :entityOptions="entityOptions"></attribute>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="t('general.空间信息')" name="2">
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col height-mode-box">
|
||||
<span class="label" style="flex: 0 0 56px">{{ t('general.高度模式') }}</span>
|
||||
<el-select class="input input-select height-mode-scelect" style="width: 155px; margin-left: 20px"
|
||||
v-model="heightMode" @change="heightModeChange" placeholder="请选择">
|
||||
<el-option v-for="item in heightModeData" :key="item.key" :label="t('general.' + item.name)"
|
||||
:value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="col" style="flex: 0 0 120px">
|
||||
<span class="label">{{ t('general.视野缩放') }}</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance" />
|
||||
</div>
|
||||
<div class="col height-box" v-show="heightMode == 0 || heightMode == 1">
|
||||
<span class="label" style="flex: 0 0 56px">{{ t('general.高度') }}</span>
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.最近距离') }}</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
|
||||
@change="changHeight" @input="$handleInputLimit" />
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.near"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">{{ t('general.最远距离') }}</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.far"
|
||||
@input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="t('general.属性信息')" name="2">
|
||||
<attribute :entityOptions="entityOptions"></attribute>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="t('general.空间信息')" name="3">
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(1)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format1" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.小数格式')
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(2)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format2" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.度分格式')
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(3)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format3" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none;white-space: nowrap;">{{
|
||||
t('general.度分秒格式') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
<div class="col height-mode-box">
|
||||
<span class="label" style="flex: 0 0 56px">{{ t('general.高度模式') }}</span>
|
||||
<el-select class="input input-select height-mode-scelect" style="width: 155px; margin-left: 20px"
|
||||
v-model="heightMode" @change="heightModeChange" placeholder="请选择">
|
||||
<el-option v-for="item in heightModeData" :key="item.key" :label="t('general.' + item.name)"
|
||||
:value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="flex: 1">
|
||||
<div class="proj-input-box" v-show="format1">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col height-box" v-show="heightMode == 0 || heightMode == 1">
|
||||
<span class="label" style="flex: 0 0 56px">{{ t('general.高度') }}</span>
|
||||
<div class="input-number input-number-unit-1">
|
||||
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
|
||||
@change="changHeight" @input="$handleInputLimit" />
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(1)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format1" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.小数格式')
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(2)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format2" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none">{{ t('general.度分格式')
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="YJ-custom-checkbox-box" style="display: flex; align-items: center; cursor: pointer"
|
||||
@click="formatChange(3)">
|
||||
<input type="checkbox" class="YJ-custom-checkbox" v-model="format3" />
|
||||
<span style="margin-left: 10px; margin-bottom: 1px; user-select: none;white-space: nowrap;">{{
|
||||
t('general.度分秒格式') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="flex: 1">
|
||||
<div class="proj-input-box" v-show="format1">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
|
||||
<input class="input lng" readonly :value="entityOptions.lng" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
|
||||
<input class="input lat" readonly :value="entityOptions.lat" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proj-input-box" style="width: 56%" v-show="format2">
|
||||
<div class="row">
|
||||
<div class="col" style="flex-direction: column">
|
||||
<div class="row" style="margin-bottom: 15px">
|
||||
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
|
||||
<input class="input lng" readonly :value="entityOptions.lng" />
|
||||
<input class="input lng-dm-d" style="flex: 1" readonly :value="lngDmD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lng-dm-m" style="flex: 1" readonly :value="lngDmM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<span class="top-line"></span>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
|
||||
<input class="input lat" readonly :value="entityOptions.lat" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proj-input-box" style="width: 56%" v-show="format2">
|
||||
<div class="row">
|
||||
<div class="col" style="flex-direction: column">
|
||||
<div class="row" style="margin-bottom: 15px">
|
||||
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
|
||||
<input class="input lng-dm-d" style="flex: 1" readonly :value="lngDmD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lng-dm-m" style="flex: 1" readonly :value="lngDmM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<span class="top-line"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
|
||||
<input class="input lat-dm-d" style="flex: 1" readonly :value="latDmD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lat-dm-m" style="flex: 1" readonly :value="latDmM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<span class="bottom-line"></span>
|
||||
</div>
|
||||
<input class="input lat-dm-d" style="flex: 1" readonly :value="latDmD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lat-dm-m" style="flex: 1" readonly :value="latDmM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<span class="bottom-line"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proj-input-box" style="width: 70%" v-show="format3">
|
||||
<div class="row">
|
||||
<div class="col" style="flex-direction: column">
|
||||
<div class="row" style="margin-bottom: 15px">
|
||||
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
|
||||
<input class="input lng-dms-d" style="flex: 1" readonly :value="lngDmsD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lng-dms-m" style="flex: 1" readonly :value="lngDmsM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<input class="input lng-dms-s" style="flex: 1" readonly :value="lngDmsS" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
|
||||
<span class="top-line"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
|
||||
<input class="input lat-dms-d" style="flex: 1" readonly :value="latDmsD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lat-dms-m" style="flex: 1" readonly :value="latDmsM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<input class="input lat-dms-s" style="flex: 1" readonly :value="latDmsS" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
|
||||
<span class="bottom-line"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proj-input-box" style="width: 70%" v-show="format3">
|
||||
<div class="row">
|
||||
<div class="col" style="flex-direction: column">
|
||||
<div class="row" style="margin-bottom: 15px">
|
||||
<span style="flex: 0 0 40px">{{ t('general.经度') }}</span>
|
||||
<input class="input lng-dms-d" style="flex: 1" readonly :value="lngDmsD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lng-dms-m" style="flex: 1" readonly :value="lngDmsM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<input class="input lng-dms-s" style="flex: 1" readonly :value="lngDmsS" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
|
||||
<span class="top-line"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span style="flex: 0 0 40px">{{ t('general.纬度') }}</span>
|
||||
<input class="input lat-dms-d" style="flex: 1" readonly :value="latDmsD" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.度') }}</span>
|
||||
<input class="input lat-dms-m" style="flex: 1" readonly :value="latDmsM" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.分') }}</span>
|
||||
<input class="input lat-dms-s" style="flex: 1" readonly :value="latDmsS" />
|
||||
<span class="label" style="flex: 0 0 14px; margin: 0 10px">{{ t('general.秒') }}</span>
|
||||
<span class="bottom-line"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<span class="custom-divider"></span>
|
||||
</template>
|
||||
<template #footer>
|
||||
@ -468,7 +468,7 @@ const open = async (id, type) => {
|
||||
entityOptions.value.labelColor = 'rgba(255,255,255,1)'
|
||||
} //点击清空按钮事件回调
|
||||
})
|
||||
|
||||
|
||||
// let iconTextBold = document.getElementsByClassName('bold')[0]
|
||||
// let iconTextItalic = document.getElementsByClassName('italic')[0]
|
||||
// let iconTextLineBottom = document.getElementsByClassName('line-bottom')[0]
|
||||
@ -821,6 +821,7 @@ defineExpose({
|
||||
width: 284px;
|
||||
flex: 0 0 284px;
|
||||
}
|
||||
|
||||
.attribute-content-link .table .tr .td.operation button,
|
||||
.attribute-content-vr .table .tr .td.operation button,
|
||||
.attribute-content-rtmp .table .tr .td.operation button {
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">线段缓冲</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" />
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" @change="lineExtendchange"/>
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 33%">
|
||||
<span class="label">缓冲宽度</span>
|
||||
@ -382,6 +382,10 @@ const open = async (id, type) => {
|
||||
}
|
||||
const heightModeChange = (val) => {
|
||||
that.heightMode = heightMode.value
|
||||
// @ts-ignore
|
||||
if(heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') {
|
||||
entityOptions.value.extend = false
|
||||
}
|
||||
}
|
||||
const heightConfirm = () => {
|
||||
that.positionEditing = false
|
||||
@ -421,11 +425,16 @@ const changeWordsName = (val) => {
|
||||
|
||||
|
||||
const lineTypechange = () => { }
|
||||
const lineExtendchange = (e)=>{
|
||||
if(e.target.checked) {
|
||||
heightMode.value = 2
|
||||
}
|
||||
}
|
||||
const nodeEdit = () => {
|
||||
entityOptions.value.positionEditing = false
|
||||
entityOptions.value.noseToTail = false
|
||||
heightMode.value = 0
|
||||
that.heightMode = 0
|
||||
// heightMode.value = 0
|
||||
// that.heightMode = 0
|
||||
that.nodeEdit((positions, lenByMeter) => {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
placeholder="请输入模型类型进行搜索"
|
||||
:suffix-icon="Search"
|
||||
/>
|
||||
<button @click="setting" class="btn">
|
||||
<button @click="setting" class="btn" v-if="addType !== 'trajectoryMotion'">
|
||||
<svg-icon
|
||||
name="sys_set"
|
||||
class="setIcon"
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 60%;">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<div class="col">
|
||||
<span class="label" style="margin-right: 0px;">投影面积:</span>
|
||||
<input class="input input-text" readonly type="text" v-model="area">
|
||||
<el-select v-model="areaUnit">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 60%;">
|
||||
<div class="row">
|
||||
<div class="col input-select-unit-box">
|
||||
<div class="col">
|
||||
<span class="label" style="margin-right: 0px;">投影面积:</span>
|
||||
<input class="input input-text" readonly type="text" v-model="area">
|
||||
<el-select v-model="areaUnit">
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">线段缓冲</span>
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" />
|
||||
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" @change="lineExtendchange" />
|
||||
</div>
|
||||
<div class="col" style="flex: 0 0 33%">
|
||||
<span class="label">缓冲宽度</span>
|
||||
@ -390,6 +390,10 @@ const open = async (id: any, type) => {
|
||||
}
|
||||
const heightModeChange = (val) => {
|
||||
that.heightMode = heightMode.value
|
||||
// @ts-ignore
|
||||
if(heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') {
|
||||
entityOptions.value.extend = false
|
||||
}
|
||||
}
|
||||
const heightConfirm = () => {
|
||||
that.positionEditing = false
|
||||
@ -429,11 +433,16 @@ const changeWordsName = (val) => {
|
||||
}
|
||||
|
||||
const lineTypechange = () => { }
|
||||
const lineExtendchange = (e)=>{
|
||||
if(e.target.checked) {
|
||||
heightMode.value = 2
|
||||
}
|
||||
}
|
||||
const nodeEdit = () => {
|
||||
entityOptions.value.positionEditing = false
|
||||
entityOptions.value.noseToTail = false
|
||||
heightMode.value = 0
|
||||
that.heightMode = 0
|
||||
// heightMode.value = 0
|
||||
// that.heightMode = 0
|
||||
that.nodeEdit((positions, lenByMeter) => {
|
||||
entityOptions.value.options.positions = structuredClone(positions)
|
||||
if (lengthUnit.value == 'km') {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Dialog ref="baseDialog" title="轨迹运动属性" left="180px"
|
||||
top="100px" className="trajectory-motion"
|
||||
<Dialog ref="baseDialog" title="轨迹运动属性" left="180px" top="100px" className="trajectory-motion"
|
||||
:closeCallback="closeCallback">
|
||||
<template #content>
|
||||
<span class="custom-divider"></span>
|
||||
@ -8,7 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: 0 0 70px;">名称</span>
|
||||
<input class="input" maxlength="40" type="text" v-model="entityOptions.name">
|
||||
<input class="input" style="width: 180px;" maxlength="40" type="text" v-model="entityOptions.name">
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
@ -18,16 +17,18 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: 0 0 70px;">起始点高度</span>
|
||||
<div class="input-number input-number-unit-1 height-box">
|
||||
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.height" @input="$handleInputLimit">
|
||||
<div class="input-number input-number-unit-1 height-box" style="width: 180px;">
|
||||
<input class="input" type="number" title="" min="-9999999" max="999999999" v-model="entityOptions.height"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col" style="justify-content: flex-end;">
|
||||
<span class="label">模型倍数</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input class="input" type="number" title="" min="0" max="99999" step="1" v-model="entityOptions.scale" @input="$handleInputLimit">
|
||||
<div class="input-number input-number-unit-2" style="width: 119px;">
|
||||
<input class="input" type="number" title="" min="0" max="99999" step="1" v-model="entityOptions.scale"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">倍</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
@ -36,17 +37,19 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: 0 0 70px;">运行速度</span>
|
||||
<div class="input-number input-number-unit-3">
|
||||
<input class="input" type="number" title="" min="0" max="99999999" step="1" v-model="entityOptions.speed" @input="$handleInputLimit">
|
||||
<div class="input-number input-number-unit-3" style="width: 180px;">
|
||||
<input class="input" type="number" title="" min="0" max="99999999" step="1" v-model="entityOptions.speed"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">m/s</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col" style="justify-content: flex-end;">
|
||||
<span class="label">延迟运动</span>
|
||||
<div class="input-number input-number-unit-3">
|
||||
<input class="input" type="number" title="" min="0" max="9999999" v-model="entityOptions.delay" @input="$handleInputLimit">
|
||||
<span class="unit">ms</span>
|
||||
<div class="input-number input-number-unit-3" style="width: 119px;">
|
||||
<input class="input" type="number" title="" min="0" max="9999999" v-model="entityOptions.delay"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">s</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,30 +59,52 @@
|
||||
<span class="label" style="flex: 0 0 70px;">更换模型</span>
|
||||
<button class="btn" @click="clickChangeModel">选择</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">模型方向</span>
|
||||
<button class="btn model-rotate-btn" @click="modelRotate">开始调整</button>
|
||||
<svg class="icon-rubric" @mouseover="handleMouseOver" @mouseout="handleMouseOut">
|
||||
<use xlink:href="#yj-icon-rubric"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="btn-group">
|
||||
<button class="btn" :class="{ 'is-active': entityOptions.firstPersonView }"
|
||||
style="border-radius: 5px 0 0 5px;" name="firstPerson" data-state="true"
|
||||
@click="changeFirstPersonView(true)"><span>第一视角</span></button>
|
||||
<button class="btn" :class="{ 'is-active': !entityOptions.firstPersonView }"
|
||||
style="border-radius: 0 5px 5px 0;" name="firstPerson" data-state="false"
|
||||
@click="changeFirstPersonView(false)"><span>第三视角</span></button>
|
||||
<div class="col" style="justify-content: flex-end;">
|
||||
<span class="label">动画方向</span>
|
||||
<div style="width: 119px;">
|
||||
<button class="btn movement-rotate-btn" style="padding: 0 10px;" @click="movementRotate">
|
||||
<svg class="icon-direction" style="margin-right: 0px;">
|
||||
<use xlink:href="#icon-direction"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label" style="flex: 0 0 70px;">视角切换</span>
|
||||
<button class="btn" :class="{ 'is-active': entityOptions.firstPersonView }" name="firstPerson"
|
||||
data-state="true" @click="changeFirstPersonView(true)" style="margin-right: 5px;">
|
||||
<svg class="icon-preview" style="margin-right: 8px;">
|
||||
<use xlink:href="#icon-preview"></use>
|
||||
</svg>
|
||||
<span>第一视角</span>
|
||||
</button>
|
||||
<button class="btn" :class="{ 'is-active': !entityOptions.firstPersonView }" name="firstPerson"
|
||||
data-state="false" @click="changeFirstPersonView(false)">
|
||||
<svg class="icon-third-party" style="margin-right: 8px;">
|
||||
<use xlink:href="#icon-third-party"></use>
|
||||
</svg>
|
||||
<span>第三视角</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">模型方向</span>
|
||||
<button class="btn model-rotate-btn" style="margin-right: 12px;" @click="modelRotate">开始调整</button>
|
||||
<el-tooltip content="场景正东方向为轨迹前进正方向" effect="customized" placement="top"
|
||||
:hide-after="0">
|
||||
<svg class="icon-rubric">
|
||||
<use xlink:href="#yj-icon-rubric"></use>
|
||||
</svg>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-tabs v-model="activeName">
|
||||
<el-tab-pane label="基础设置" name="1"></el-tab-pane>
|
||||
<el-tab-pane label="动画设置" name="2"></el-tab-pane>
|
||||
</el-tabs> -->
|
||||
<span class="custom-divider"></span>
|
||||
<div class="div-item div-item-switch">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
@ -171,7 +196,8 @@
|
||||
<div class="col">
|
||||
<span class="label">字体大小</span>
|
||||
<div class="input-number input-number-unit-2" style="width: 82px;">
|
||||
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize" @input="$handleInputLimit">
|
||||
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">px</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
@ -185,7 +211,8 @@
|
||||
<div class="col">
|
||||
<span class="label">最近距离</span>
|
||||
<div class="input-number input-number-unit-1" style="width: 82px;">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelNear" @input="$handleInputLimit">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelNear"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
@ -193,7 +220,8 @@
|
||||
<div class="col">
|
||||
<span class="label">最远距离</span>
|
||||
<div class="input-number input-number-unit-1" style="width: 82px;">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelFar" @input="$handleInputLimit">
|
||||
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.labelFar"
|
||||
@input="$handleInputLimit">
|
||||
<span class="unit">m</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
@ -201,10 +229,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<span class="custom-divider"></span>
|
||||
<div class="custom-rubric-box" v-show="tip"
|
||||
style="transform-origin: center bottom; position: absolute; top: 180px; right: 3px; padding: 5px 10px; background-color: rgb(62, 66, 73); border-radius: 5px; font-size: 12px; color: rgb(255, 87, 51);pointer-events: none;">
|
||||
场景正东方向为轨迹前进正方向<div x-arrow="" class="custom__popper__arrow" style="left: 59px;"></div>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button @click="remove">删除</button>
|
||||
@ -230,9 +254,9 @@ const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
|
||||
const baseDialog: any = ref(null)
|
||||
const eventBus: any = inject('bus')
|
||||
const text = ref('')
|
||||
const activeName = ref('1')
|
||||
const fontList = ref(getFontList())
|
||||
const labelColorRef = ref(null)
|
||||
const tip = ref(false)
|
||||
eventBus.on('openStandTextAdd', () => {
|
||||
baseDialog.value?.open()
|
||||
})
|
||||
@ -290,31 +314,31 @@ const close = () => {
|
||||
const remove = () => {
|
||||
close()
|
||||
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
let node = window.treeObj.getNodeByParam('id', that.options.id, null)
|
||||
let source_ids = cusRemoveNode(window.treeObj, [node])
|
||||
const res = await TreeApi.removeDirectory({ ids: source_ids })
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.remove()
|
||||
(window as any)._entityMap.delete(source_ids[0])
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg || '删除失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
})
|
||||
}
|
||||
const clickChangeModel = () => {
|
||||
eventBus.emit('openModel', true, (url) => {
|
||||
@ -324,15 +348,13 @@ const clickChangeModel = () => {
|
||||
const modelRotate = () => {
|
||||
that.modelRotate()
|
||||
}
|
||||
const movementRotate = () => {
|
||||
that.reverse = !that.reverse
|
||||
}
|
||||
const changeFirstPersonView = (state) => {
|
||||
entityOptions.value.firstPersonView = state
|
||||
}
|
||||
const handleMouseOver = () => {
|
||||
tip.value = true
|
||||
}
|
||||
const handleMouseOut = () => {
|
||||
tip.value = false
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
|
||||
@ -21,8 +21,9 @@ export const useRightOperate = () => {
|
||||
const addResource = () => {
|
||||
const { ipcRenderer } = require('electron')
|
||||
const options = {
|
||||
properties: ['openFile'], // 允许选择多个文件
|
||||
properties: ['openFile', 'multiSelections'], // 允许选择多个文件
|
||||
filters: [
|
||||
{ name: '全部', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak', 'kmz', 'kml', 'shp', 'tab', 'mif', 'geojson'] },
|
||||
{ name: '模型、影像、地形', extensions: ['clt', 'json', 'jct', 'mbtiles', 'pak'] },
|
||||
{ name: '矢量数据', extensions: ['kmz', 'kml', 'shp', 'tab', 'mif', 'geojson'] },
|
||||
]
|
||||
@ -42,134 +43,134 @@ export const useRightOperate = () => {
|
||||
//@ts-ignore
|
||||
ipcRenderer.once('selectedItem', async (event, filePaths) => {
|
||||
if (filePaths.length > 0) {
|
||||
let id = new YJ.Tools().randomString()
|
||||
|
||||
|
||||
// 检查文件名是否有效
|
||||
if (typeof filePaths[0] !== 'string' || filePaths[0].trim() === '') {
|
||||
return false;
|
||||
}
|
||||
let item = filePaths[0]
|
||||
|
||||
//@ts-ignore
|
||||
let name = getLastPathComponent(item, ['clt', 'json', 'pak', 'kml', 'kmz', 'shp', 'geojson', 'geoJson', 'czml', 'jct', 'mif', 'tab', 'csv']);
|
||||
let sourceType = "layer";
|
||||
if (item.endsWith(".clt") || item.endsWith(".json")) {
|
||||
sourceType = "tileset";
|
||||
} else if (item.endsWith(".pak")) {
|
||||
sourceType = "Terrain";
|
||||
} else if (item.endsWith(".kml") || item.endsWith(".kmz")) {
|
||||
sourceType = "kml";
|
||||
} else if (item.endsWith(".shp")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".geojson") || item.endsWith(".geoJson")) {
|
||||
sourceType = "geojson";
|
||||
} else if (item.endsWith(".czml")) {
|
||||
sourceType = "czml";
|
||||
} else if (item.endsWith(".jct")) {
|
||||
sourceType = "bim";
|
||||
} else if (item.endsWith(".mif")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".tab")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".csv")) {
|
||||
sourceType = "csv";
|
||||
}
|
||||
if (["shp", "tab", "mif", "kml", "kmz"].includes(sourceType)) {
|
||||
let params: any = {
|
||||
id: id,
|
||||
parentId: parentId,
|
||||
sourceName: name,
|
||||
sourceType: 'vector',
|
||||
// sourcePath: filePaths[0],
|
||||
params: {
|
||||
id: id,
|
||||
path: filePaths[0],
|
||||
field: 'id',
|
||||
name: name,
|
||||
headTables: [],
|
||||
opacity: 1,
|
||||
color: 'rgba(0,255,184,0.5)',
|
||||
show: true
|
||||
},
|
||||
for (let i = 0; i < filePaths.length; i++) {
|
||||
let id = new YJ.Tools().randomString()
|
||||
// 检查文件名是否有效
|
||||
if (typeof filePaths[i] !== 'string' || filePaths[i].trim() === '') {
|
||||
continue;
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
params.isShow = true
|
||||
params.params = JSON.stringify(params.params)
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
let entityObject = renderVector(params, true);
|
||||
(window as any)._entityMap.set(id, entityObject)
|
||||
} else if (["geojson"].includes(sourceType)) {
|
||||
let baseURL = localStorage.getItem('ip')
|
||||
await addMapSource({
|
||||
type: 'geojson',
|
||||
id: id,
|
||||
sourceName: name,
|
||||
opt: {
|
||||
host: baseURL,
|
||||
let item = filePaths[i]
|
||||
|
||||
//@ts-ignore
|
||||
let name = getLastPathComponent(item, ['clt', 'json', 'pak', 'kml', 'kmz', 'shp', 'geojson', 'geoJson', 'czml', 'jct', 'mif', 'tab', 'csv']);
|
||||
let sourceType = "layer";
|
||||
if (item.endsWith(".clt") || item.endsWith(".json")) {
|
||||
sourceType = "tileset";
|
||||
} else if (item.endsWith(".pak")) {
|
||||
sourceType = "Terrain";
|
||||
} else if (item.endsWith(".kml") || item.endsWith(".kmz")) {
|
||||
sourceType = "kml";
|
||||
} else if (item.endsWith(".shp")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".geojson") || item.endsWith(".geoJson")) {
|
||||
sourceType = "geojson";
|
||||
} else if (item.endsWith(".czml")) {
|
||||
sourceType = "czml";
|
||||
} else if (item.endsWith(".jct")) {
|
||||
sourceType = "bim";
|
||||
} else if (item.endsWith(".mif")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".tab")) {
|
||||
sourceType = "shp";
|
||||
} else if (item.endsWith(".csv")) {
|
||||
sourceType = "csv";
|
||||
}
|
||||
if (["shp", "tab", "mif", "kml", "kmz"].includes(sourceType)) {
|
||||
let params: any = {
|
||||
id: id,
|
||||
parentId: parentId,
|
||||
sourceName: name,
|
||||
sourceType: 'vector',
|
||||
// sourcePath: filePaths[0],
|
||||
params: {
|
||||
id: id,
|
||||
path: filePaths[i],
|
||||
field: 'id',
|
||||
name: name,
|
||||
headTables: [],
|
||||
opacity: 1,
|
||||
color: 'rgba(0,255,184,0.5)',
|
||||
show: true
|
||||
},
|
||||
}
|
||||
TreeApi.addOtherSource(params)
|
||||
params.isShow = true
|
||||
params.params = JSON.stringify(params.params)
|
||||
cusAddNodes(window.treeObj, params.parentId, [params])
|
||||
let entityObject = renderVector(params, true);
|
||||
(window as any)._entityMap.set(id, entityObject)
|
||||
} else if (["geojson"].includes(sourceType)) {
|
||||
let baseURL = localStorage.getItem('ip')
|
||||
await addMapSource({
|
||||
type: 'geojson',
|
||||
id: id,
|
||||
sourceName: name,
|
||||
opt: {
|
||||
host: baseURL,
|
||||
id: id,
|
||||
url: filePaths[i],
|
||||
show: true,
|
||||
width: 1,
|
||||
color: "rgb(239, 6, 6, 1)",
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 获取最后一个点的位置
|
||||
const lastDotIndex = filePaths[i].lastIndexOf('.');
|
||||
|
||||
// 如果没有点或者点是最后一个字符,则不是有效的文件后缀
|
||||
if (lastDotIndex === -1 || lastDotIndex === filePaths[i].length - 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let params2: any = {
|
||||
id: id,
|
||||
url: filePaths[0],
|
||||
show: true,
|
||||
width: 1,
|
||||
color: "rgb(239, 6, 6, 1)",
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 获取最后一个点的位置
|
||||
const lastDotIndex = filePaths[0].lastIndexOf('.');
|
||||
|
||||
// 如果没有点或者点是最后一个字符,则不是有效的文件后缀
|
||||
if (lastDotIndex === -1 || lastDotIndex === filePaths[0].length - 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let params2: any = {
|
||||
id: id,
|
||||
show: true,
|
||||
}
|
||||
if (item.endsWith(".mbtiles")) {
|
||||
params2.alpha = 1
|
||||
params2.brightness = 1
|
||||
params2.layerIndex = 99999
|
||||
}
|
||||
if (item.endsWith(".apk")) {
|
||||
// params2.exaggeration = 1
|
||||
}
|
||||
|
||||
|
||||
let params: any = {
|
||||
id: id,
|
||||
sourcePath: filePaths[0],
|
||||
parentId: parentId,
|
||||
params: params2,
|
||||
}
|
||||
// filePaths[0].split('\\').pop()
|
||||
let res = await TreeApi.addModelSource(params)
|
||||
console.log('res', res)
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
res.data.params = JSON.parse(res.data.params)
|
||||
if (!res.data.params.name) {
|
||||
res.data.params.name = res.data.sourceName
|
||||
if (item.endsWith(".mbtiles")) {
|
||||
params2.alpha = 1
|
||||
params2.brightness = 1
|
||||
params2.layerIndex = 99999
|
||||
}
|
||||
if (!res.data.params.id) {
|
||||
res.data.params.id = res.data.id
|
||||
}
|
||||
let detail = JSON.parse(res.data.detail)
|
||||
let mapParams = { ...detail, ...res.data.params }
|
||||
|
||||
await initMapData(res.data.sourceType, mapParams, (entity) => {
|
||||
entity.flyTo()
|
||||
})
|
||||
if (res.data.sourceType) {
|
||||
if (item.endsWith(".apk")) {
|
||||
// params2.exaggeration = 1
|
||||
}
|
||||
|
||||
res.data.params = JSON.stringify(res.data.params)
|
||||
res.data.detail = JSON.stringify(res.data.detail)
|
||||
cusAddNodes(window.treeObj, params.parentId, [res.data])
|
||||
|
||||
let params: any = {
|
||||
id: id,
|
||||
sourcePath: filePaths[i],
|
||||
parentId: parentId,
|
||||
params: params2,
|
||||
}
|
||||
// filePaths[i].split('\\').pop()
|
||||
let res = await TreeApi.addModelSource(params)
|
||||
console.log('res', res)
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
res.data.params = JSON.parse(res.data.params)
|
||||
if (!res.data.params.name) {
|
||||
res.data.params.name = res.data.sourceName
|
||||
}
|
||||
if (!res.data.params.id) {
|
||||
res.data.params.id = res.data.id
|
||||
}
|
||||
let detail = JSON.parse(res.data.detail)
|
||||
let mapParams = { ...detail, ...res.data.params }
|
||||
|
||||
await initMapData(res.data.sourceType, mapParams, (entity) => {
|
||||
entity.flyTo()
|
||||
})
|
||||
if (res.data.sourceType) {
|
||||
}
|
||||
|
||||
res.data.params = JSON.stringify(res.data.params)
|
||||
res.data.detail = JSON.stringify(res.data.detail)
|
||||
cusAddNodes(window.treeObj, params.parentId, [res.data])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -395,7 +396,7 @@ export const useRightOperate = () => {
|
||||
}
|
||||
|
||||
//设置视图
|
||||
const setView = () => {
|
||||
const setView = async () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj);
|
||||
if (selectNodes && selectNodes[selectNodes.length - 1]) {
|
||||
let node = selectNodes[selectNodes.length - 1]
|
||||
@ -408,8 +409,8 @@ export const useRightOperate = () => {
|
||||
}
|
||||
}
|
||||
let entityObject = (window as any)._entityMap.get(params.id)
|
||||
entityObject.setCustomView()
|
||||
params.customView = entityObject.customView
|
||||
await entityObject.setCustomView()
|
||||
params.customView = await entityObject.customView
|
||||
let params2 = {
|
||||
"id": node.id,
|
||||
"sourceName": params.name,
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
@mouseup="$changeComponentShow('#rMenu', false)"
|
||||
>
|
||||
<div class="itemIcon">
|
||||
<svg-icon :name="item.key" :size="14"></svg-icon>
|
||||
<svg-icon :name="item.key" :size="12"></svg-icon>
|
||||
</div>
|
||||
<div class="itemText">
|
||||
{{ t(`rightMenu.${item.key}`) }}
|
||||
@ -70,9 +70,10 @@ const { t } = useI18n()
|
||||
<style lang="scss" scoped>
|
||||
.rightMenu {
|
||||
user-select: none;
|
||||
width: 8.5vw;
|
||||
height: 23vh;
|
||||
// width: 8.5vw;
|
||||
// height: 23vh;
|
||||
visibility: hidden;
|
||||
padding: 8px 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border: 1.5px solid;
|
||||
box-sizing: border-box;
|
||||
@ -99,9 +100,10 @@ const { t } = useI18n()
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
padding: 5px 0;
|
||||
padding: 2px 22px 2px 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 2px 0;
|
||||
/* 默认文字颜色 */
|
||||
color: #fff;
|
||||
// transition: all 0.2s ease; /* 添加过渡动画使效果更平滑 */
|
||||
@ -116,16 +118,18 @@ const { t } = useI18n()
|
||||
|
||||
.itemText {
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.itemIcon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-right: 8px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* 关键:通过currentColor继承父元素的文字颜色 */
|
||||
|
||||
@ -65,7 +65,7 @@ export const useTree = () => {
|
||||
const menus = showRightMenu(event, treeObj.value)
|
||||
console.log('menus', menus)
|
||||
if (menus.length == 0) {
|
||||
// $changeComponentShow('.rightMenu', false)
|
||||
$changeComponentShow('.rightMenu', false)
|
||||
return
|
||||
}
|
||||
nextTick(() => {
|
||||
|
||||
@ -107,6 +107,9 @@ export const useTreeNode = () => {
|
||||
// detailFun: get_detail_waterl,
|
||||
// allowChildren: false,
|
||||
},
|
||||
textBox: {
|
||||
rightMenus: ['del', 'setView', 'resetView']
|
||||
},
|
||||
|
||||
directory: {
|
||||
rightMenus: [
|
||||
@ -251,7 +254,7 @@ export const useTreeNode = () => {
|
||||
// allowChildren: false,
|
||||
},
|
||||
path: {
|
||||
rightMenus: ['edit', 'del' /* "setView", "resetView"*/]
|
||||
rightMenus: ['edit', 'del', "setView", "resetView"]
|
||||
// detailFun: get_detail_path,
|
||||
// render: renderPath,
|
||||
},
|
||||
|
||||
@ -188,7 +188,6 @@
|
||||
type="text"
|
||||
:placeholder="select == 'poi' ? t('btn.treePlaceholder') : t('btn.treeLayerholder')"
|
||||
@input="clearResult"
|
||||
@change="searchPlace"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -285,7 +284,11 @@ const isShowTree = debounce(() => {
|
||||
arrow.style.left = 'unset'
|
||||
arrow.style.right = '1em'
|
||||
}, 100)
|
||||
setTimeout(() => {
|
||||
box1.style.display = 'none'
|
||||
}, 500)
|
||||
} else {
|
||||
box1.style.display = 'flex'
|
||||
TreeIndex.style.pointerEvents = 'unset'
|
||||
// 显示box1
|
||||
arrow.style.transform = 'rotate(180deg)'
|
||||
@ -611,6 +614,7 @@ defineExpose({
|
||||
transform: translateY(-50%);
|
||||
width: 17vw;
|
||||
height: calc(100% - 420px);
|
||||
// overflow-x: hidden;
|
||||
|
||||
.box1 {
|
||||
width: 90%;
|
||||
|
||||
@ -187,11 +187,26 @@
|
||||
<div class="item port">
|
||||
<template v-if="servVal == '单机'">
|
||||
<span class="itemLabel">端口</span>
|
||||
<el-input v-model="localport"></el-input>
|
||||
<el-form-item prop="localport" :rules="[
|
||||
{
|
||||
validator: validateLocalportRange,
|
||||
trigger: 'blur'
|
||||
}
|
||||
]">
|
||||
<el-input-number v-model="localport" :controls="false" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="servVal == '网络'">
|
||||
<span class="itemLabel">端口</span>
|
||||
<el-input v-model="port"></el-input>
|
||||
<el-form-item prop="port" :rules="[
|
||||
{
|
||||
validator: validatePortRange,
|
||||
message: '端口号必须在 1024–65535 之间',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]">
|
||||
<el-input-number v-model="port" :controls="false" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@ -342,6 +357,29 @@ const handleSelect = (tab) => {
|
||||
onMounted(() => {
|
||||
loginInit()
|
||||
initialize()
|
||||
|
||||
let isSeverInit = ipcRenderer.sendSync('judgment-isSeverInit');
|
||||
// 如果服务端未初始化,等待初始化完成
|
||||
if (isSeverInit) {
|
||||
if (!router.currentRoute.value.query.type) {
|
||||
setTimeout(() => {
|
||||
getAuthCode()
|
||||
getAuthInfo()
|
||||
}, 0);
|
||||
} else {
|
||||
isAuth.value = false
|
||||
}
|
||||
}
|
||||
else {
|
||||
ipcRenderer.once('program-init', () => {
|
||||
if (!router.currentRoute.value.query.type) {
|
||||
getAuthCode()
|
||||
getAuthInfo()
|
||||
} else {
|
||||
isAuth.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//授权判断
|
||||
@ -470,16 +508,6 @@ onUnmounted(() => {
|
||||
|
||||
const { toClipboard } = useClipboard()
|
||||
|
||||
const getAuthInfo2 = async () => {
|
||||
const res = await AuthApi.showAuth()
|
||||
if (typeof res.data === 'object') {
|
||||
authInfo.value.generateTime = res.data.generateTime
|
||||
authInfo.value.expireTime = res.data.expireTime
|
||||
console.log(authInfo.value.expireTime, '授权时间')
|
||||
getStatus2()
|
||||
}
|
||||
}
|
||||
|
||||
const getStatus2 = () => {
|
||||
const timestamp = new Date(authInfo.value.expireTime).getTime()
|
||||
|
||||
@ -510,25 +538,29 @@ const copy = async (text) => {
|
||||
}
|
||||
}
|
||||
|
||||
let isSeverInit = ipcRenderer.sendSync('judgment-isSeverInit')
|
||||
// 如果服务端未初始化,等待初始化完成
|
||||
if (isSeverInit) {
|
||||
if (!router.currentRoute.value.query.type) {
|
||||
getAuthCode()
|
||||
getAuthInfo()
|
||||
} else {
|
||||
isAuth.value = false
|
||||
const validateLocalportRange = (rule, value, callback) => {
|
||||
if (!localport.value) {
|
||||
callback(new Error('请输入端口号')); // 校验失败
|
||||
return
|
||||
}
|
||||
} else {
|
||||
ipcRenderer.once('program-init', () => {
|
||||
if (!router.currentRoute.value.query.type) {
|
||||
getAuthCode()
|
||||
getAuthInfo()
|
||||
} else {
|
||||
isAuth.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
if (localport.value < 1024 || localport.value > 65535) {
|
||||
callback(new Error('端口号范围在 1024–65535 之间')); // 校验失败
|
||||
} else {
|
||||
callback(); // 校验通过
|
||||
}
|
||||
};
|
||||
const validatePortRange = (rule, value, callback) => {
|
||||
if (!port.value) {
|
||||
callback(new Error('请输入端口号')); // 校验失败
|
||||
return
|
||||
}
|
||||
if (port.value < 1024 || port.value > 65535) {
|
||||
callback(new Error('端口号范围在 1024–65535 之间')); // 校验失败
|
||||
} else {
|
||||
callback(); // 校验通过
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 添加过渡样式
|
||||
@ -905,7 +937,21 @@ if (isSeverInit) {
|
||||
align-items: center;
|
||||
margin: 15px 0;
|
||||
|
||||
.select {
|
||||
::v-deep .el-input__wrapper {
|
||||
padding: 1px 12px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
flex: 1;
|
||||
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,16 +74,24 @@ export const useLogin = () => {
|
||||
console.log(res);
|
||||
|
||||
if ([0, 200].includes(res.code)) {
|
||||
checkboxVModel.value = true
|
||||
|
||||
if(isRememberPassword.value) {
|
||||
checkboxVModel.value = true
|
||||
localStorage.setItem(
|
||||
'userInfo',
|
||||
JSON.stringify({
|
||||
// ...res.data.userInfo,
|
||||
...loginForm.value,
|
||||
checkboxVModel: checkboxVModel.value
|
||||
})
|
||||
)
|
||||
}
|
||||
else {
|
||||
checkboxVModel.value = false
|
||||
localStorage.removeItem('userInfo')
|
||||
}
|
||||
localStorage.setItem(res.data.header, res.data.token)
|
||||
localStorage.setItem(
|
||||
'userInfo',
|
||||
JSON.stringify({
|
||||
// ...res.data.userInfo,
|
||||
...loginForm.value,
|
||||
checkboxVModel: checkboxVModel.value
|
||||
})
|
||||
)
|
||||
|
||||
ElMessage.success('登录成功')
|
||||
router.push({ path: '/home' })
|
||||
getAuthInfo()
|
||||
@ -161,6 +169,7 @@ export const useLogin = () => {
|
||||
loginForm.value.username = JSON.parse(userInfo).username
|
||||
loginForm.value.password = JSON.parse(userInfo).password
|
||||
checkboxVModel.value = JSON.parse(userInfo).checkboxVModel
|
||||
isRememberPassword.value = checkboxVModel.value
|
||||
}
|
||||
}
|
||||
const userStore = useUserStore()
|
||||
|
||||
@ -8,9 +8,9 @@ export const useSetUp = () => {
|
||||
const servVal = ref('单机') // 服务类型选择值
|
||||
const prototype = ref('http') // 协议选择值
|
||||
const ip = ref('192.168.1.1')
|
||||
const port = ref('8890')
|
||||
const port = ref(8890)
|
||||
const localip = ref('127.0.0.1')
|
||||
const localport = ref('8848')
|
||||
const localport = ref(8848)
|
||||
const gpsVal = ref('') // 服务类型选择值
|
||||
const gpsOptions: any = ref([])
|
||||
const servOptions: any = ref([{ name: '单机' }, { name: '网络' }])
|
||||
@ -32,12 +32,12 @@ export const useSetUp = () => {
|
||||
if (serverMode === 'false') {
|
||||
servVal.value = '网络'
|
||||
ip.value = ipPort[0]
|
||||
port.value = ipPort[1]
|
||||
port.value = Number(ipPort[1])
|
||||
prototype.value = parsedUrl.protocol.slice(0, -1)
|
||||
}
|
||||
else {
|
||||
localip.value = ipPort[0]
|
||||
localport.value = ipPort[1]
|
||||
localport.value = Number(ipPort[1])
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,6 +45,19 @@ export const useSetUp = () => {
|
||||
switch (selectedService.value) {
|
||||
case '接口服务':
|
||||
// this.submitIP();
|
||||
if (serverMode === 'false') {
|
||||
if(Number(port.value) < 1024 || Number(port.value) > 65535) {
|
||||
// ElMessage.error('端口号范围为1024-65535')
|
||||
return
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(Number(localport.value) < 1024 || Number(localport.value) > 65535) {
|
||||
// ElMessage.error('端口号范围为1024-65535')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
submitIP()
|
||||
break
|
||||
case '北斗串口':
|
||||
|
||||
Reference in New Issue
Block a user