增加显隐,界面增加收回功能,拖拽指示器预览
This commit is contained in:
1
src/renderer/src/icons/svg/closeLeftTs.svg
Normal file
1
src/renderer/src/icons/svg/closeLeftTs.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="12.4248046875" viewBox="0 0 14 12.4248046875" fill="none"><path d="M13.4332 11.2955L0.585683 11.2955C0.283401 11.2955 0.0188816 11.559 0.0188816 11.8602C0.0188816 12.1614 0.283401 12.425 0.585683 12.425L13.4332 12.425C13.7355 12.425 14 12.1614 14 11.8602C14 11.559 13.7355 11.2955 13.4332 11.2955ZM0.585683 1.12955L13.4332 1.12955C13.7355 1.12955 14 0.865991 14 0.564773C14 0.263555 13.7355 0 13.4332 0L0.585683 0C0.283401 0 0.0188816 0.263555 0.0188816 0.564773C0.0188816 0.865991 0.283401 1.12955 0.585683 1.12955ZM3.98649 5.64773C3.68421 5.64773 3.41969 5.91128 3.41969 6.2125C3.41969 6.51372 3.68421 6.77727 3.98649 6.77727L13.0553 6.77727C13.3576 6.77727 13.6221 6.51372 13.6221 6.2125C13.6221 5.91128 13.3576 5.64773 13.0553 5.64773L3.98649 5.64773ZM2.81511 9.26227C2.92847 9.37523 3.07961 9.41287 3.23077 9.41287C3.38193 9.41287 3.53305 9.37523 3.64641 9.26227C3.87313 9.03636 3.87313 8.6975 3.64641 8.47159L1.37921 6.2125L3.60863 3.99105C3.83535 3.76515 3.83535 3.42628 3.60863 3.20037C3.38191 2.97446 3.04183 2.97446 2.81511 3.20037L0.17004 5.83599C-0.0566802 6.0619 -0.0566802 6.40076 0.17004 6.62667L2.81511 9.26227Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
1
src/renderer/src/icons/svg/closeRightTs.svg
Normal file
1
src/renderer/src/icons/svg/closeRightTs.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="12.4248046875" viewBox="0 0 14 12.4248046875" fill="none"><path d="M0.566802 11.2955L13.4143 11.2955C13.7166 11.2955 13.9811 11.559 13.9811 11.8602C13.9811 12.1614 13.7166 12.425 13.4143 12.425L0.566802 12.425C0.26452 12.425 0 12.1614 0 11.8602C0 11.559 0.26452 11.2955 0.566802 11.2955ZM13.4143 1.12955L0.566802 1.12955C0.26452 1.12955 0 0.865991 0 0.564773C0 0.263555 0.26452 0 0.566802 0L13.4143 0C13.7166 0 13.9811 0.263555 13.9811 0.564773C13.9811 0.865991 13.7166 1.12955 13.4143 1.12955ZM10.0135 5.64773C10.3158 5.64773 10.5803 5.91128 10.5803 6.2125C10.5803 6.51372 10.3158 6.77727 10.0135 6.77727L0.944681 6.77727C0.642382 6.77727 0.37788 6.51372 0.37788 6.2125C0.37788 5.91128 0.642382 5.64773 0.944681 5.64773L10.0135 5.64773ZM11.1849 9.26227C11.0715 9.37523 10.9204 9.41287 10.7692 9.41287C10.6181 9.41287 10.4669 9.37523 10.3536 9.26227C10.1269 9.03636 10.1269 8.6975 10.3536 8.47159L12.6208 6.2125L10.3914 3.99105C10.1646 3.76515 10.1646 3.42628 10.3914 3.20037C10.6181 2.97446 10.9582 2.97446 11.1849 3.20037L13.83 5.83599C14.0567 6.0619 14.0567 6.40076 13.83 6.62667L11.1849 9.26227Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -1,7 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cabin">
|
|
||||||
<div>
|
<div>
|
||||||
<span>仿真演练图层指挥舱</span>
|
<div class="miniCabin" :style="!mini?'display:none':''">
|
||||||
|
<div class="switch-node-outer" @click="mini=false">
|
||||||
|
<div class="switch-node-inner">
|
||||||
|
展开指挥舱
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cabin" :style="mini?'display:none':''">
|
||||||
|
<div class="titleBox">
|
||||||
|
<span class="title">仿真演练图层指挥舱</span>
|
||||||
|
<span class="close" @click="mini=true">
|
||||||
|
<svg-icon :size="15" class="icon-svg-item" name="closeRightTs"/>收起
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<el-input
|
<el-input
|
||||||
@ -27,6 +38,8 @@
|
|||||||
<rightMenuTs ref="rightMenuRef" class="absolute zIndex99"></rightMenuTs>
|
<rightMenuTs ref="rightMenuRef" class="absolute zIndex99"></rightMenuTs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -48,6 +61,7 @@ const treeObj = ref() //树形的实例
|
|||||||
let zNodes: any = ref([])//树形结构数据
|
let zNodes: any = ref([])//树形结构数据
|
||||||
let nodes: any = ref([])//选中的node节点
|
let nodes: any = ref([])//选中的node节点
|
||||||
let searchKey = ref('')
|
let searchKey = ref('')
|
||||||
|
let mini = ref(false)
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('id', window["planId"])
|
formData.append('id', window["planId"])
|
||||||
|
|
||||||
@ -325,8 +339,28 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
.titleBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 18px;
|
||||||
|
padding: 5px 0;
|
||||||
|
//line-height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
&:hover {
|
||||||
|
color: #0ff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.treeBox {
|
.treeBox {
|
||||||
border: 1px solid red;
|
//border: 1px solid red;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
|
|
||||||
.ztree {
|
.ztree {
|
||||||
@ -354,4 +388,48 @@ defineExpose({
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
//border: 1px solid #0ff;
|
//border: 1px solid #0ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.miniCabin {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
right: 0;
|
||||||
|
top: 35%;
|
||||||
|
|
||||||
|
.switch-node-outer {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
//width: 30px;
|
||||||
|
clip-path: polygon(0% calc(30px + 3px),
|
||||||
|
100% 0%,
|
||||||
|
100% 100%,
|
||||||
|
0% calc(100% - 30px - 3px));
|
||||||
|
/*clip-path: polygon(0% 0%,
|
||||||
|
100% calc(30px + 3px),
|
||||||
|
100% calc(100% - 30px - 3px),
|
||||||
|
0% 100%);*/
|
||||||
|
//clip-path: polygon(0% 0%, 100% 33px, 100% calc(100% - 33px), 0% 100%);
|
||||||
|
padding: calc(3px * 1.42) 3px;
|
||||||
|
//padding: 4.6px 3px;
|
||||||
|
background: #0ff;
|
||||||
|
|
||||||
|
.switch-node-inner {
|
||||||
|
clip-path: polygon(0% 30px,
|
||||||
|
100% 3px,
|
||||||
|
100% calc(100% - 3px),
|
||||||
|
0% calc(100% - 30px));
|
||||||
|
//clip-path: polygon(0% 3px, 100% 30px, 100% calc(100% - 30px), 0% calc(100% - 3px));
|
||||||
|
cursor: pointer;
|
||||||
|
writing-mode: vertical-lr;
|
||||||
|
padding: calc(30px * 1.1) 0;
|
||||||
|
width: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
background: linear-gradient(to right, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0) 100%), rgba(0, 0, 0, 0.8);
|
||||||
|
color: #0ff;
|
||||||
|
letter-spacing: 2.5px;
|
||||||
|
/* border: 1.5px solid rgba(0, 255, 255, 1); */
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -91,8 +91,11 @@ let getWidth = (durationTime) => {
|
|||||||
// 6. 让 progressStyle 间接依赖 refreshKey(通过 getWidth)
|
// 6. 让 progressStyle 间接依赖 refreshKey(通过 getWidth)
|
||||||
let progressStyle = (task) => {
|
let progressStyle = (task) => {
|
||||||
let taskLeft = task.startTime - window['tsObj']._Store._startTimestamp;
|
let taskLeft = task.startTime - window['tsObj']._Store._startTimestamp;
|
||||||
|
let width = 1
|
||||||
|
if (!['display', 'hide'].includes(task.callback))
|
||||||
|
width = getWidth(task.duration_time) * 1000
|
||||||
let style: any = {
|
let style: any = {
|
||||||
width: getWidth(task.duration_time) * 1000 + "px",
|
width: width + "px",
|
||||||
left: getWidth(taskLeft) + "px",
|
left: getWidth(taskLeft) + "px",
|
||||||
};
|
};
|
||||||
if (task.id == selectedEventId.value) {
|
if (task.id == selectedEventId.value) {
|
||||||
|
|||||||
@ -92,6 +92,8 @@ import {ElPopover} from 'element-plus'; // 确保导入ElPopover(按需导入
|
|||||||
// import {dragElement} from "./util/drag.js";
|
// import {dragElement} from "./util/drag.js";
|
||||||
import dragLeftRight from './util/dragLeftRight.js';
|
import dragLeftRight from './util/dragLeftRight.js';
|
||||||
|
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
if (instance) {
|
if (instance) {
|
||||||
// 2. 注册局部指令(kebab-case 命名,与模板中一致)
|
// 2. 注册局部指令(kebab-case 命名,与模板中一致)
|
||||||
@ -227,16 +229,27 @@ function todoEvent(timeId: number, res: any, isEnd: boolean) {
|
|||||||
console.log("执行事件对象", res, '1111111111111111111111111111');
|
console.log("执行事件对象", res, '1111111111111111111111111111');
|
||||||
window['did_ts_Arr'].push(res.id)
|
window['did_ts_Arr'].push(res.id)
|
||||||
switch (res.callback) {
|
switch (res.callback) {
|
||||||
case 'flicker':
|
/* case 'flicker':
|
||||||
let tsEntity = (window as any)._entityMap.get(res.sourceId);
|
let tsEntity = (window as any)._entityMap.get(res.sourceId);
|
||||||
tsEntity.flicker(Number(res.detail.times) * 1000, Number(res.detail.numbers))
|
tsEntity.flicker(Number(res.detail.times) * 1000, Number(res.detail.numbers))
|
||||||
break;
|
break;*/
|
||||||
case 'move':
|
case 'move':
|
||||||
let TrajectoryMotionObject = (window as any)._entityMap.get(res.id + res.callback + res.sourceId);
|
let TrajectoryMotionObject = (window as any)._entityMap.get(res.id + res.callback + res.sourceId);
|
||||||
|
|
||||||
TrajectoryMotionObject.speed = TrajectoryMotionObject.oldSpeed * props.TSOBJ._Store._multiplier
|
TrajectoryMotionObject.speed = TrajectoryMotionObject.oldSpeed * props.TSOBJ._Store._multiplier
|
||||||
TrajectoryMotionObject.state = true
|
TrajectoryMotionObject.state = true
|
||||||
break
|
break
|
||||||
|
default:
|
||||||
|
//新增0918
|
||||||
|
let tsEntity = window['_entityMap'].get(res.sourceId);
|
||||||
|
if (tsEntity && typeof tsEntity[res.callback] == "function") {
|
||||||
|
if (res.callback == "flicker") {
|
||||||
|
let detail = res.detail;
|
||||||
|
typeof detail == "string" && (detail = JSON.parse(detail));
|
||||||
|
tsEntity[res.callback](detail.times * 1000 / props.TSOBJ._Store._multiplier, detail.numbers);
|
||||||
|
} else tsEntity[res.callback]();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,11 +284,46 @@ let eventCallback = () => {
|
|||||||
fun(dataMap)
|
fun(dataMap)
|
||||||
}
|
}
|
||||||
// 拖拽时间指示器预览
|
// 拖拽时间指示器预览
|
||||||
let timing = () => {
|
|
||||||
console.log("拖拽时间指示器预览")
|
|
||||||
}
|
|
||||||
const handleDrag = (newLeft: number) => {
|
const handleDrag = (newLeft: number) => {
|
||||||
console.log("handleDrag", newLeft)
|
// console.log("handleDrag", newLeft)
|
||||||
|
let {cursorLeft, scrollLeft, preSecondPx} = window['tsObj']._Store._scales
|
||||||
|
console.log("_currentTimestamp", window['tsObj']._Store._currentTimestamp)
|
||||||
|
|
||||||
|
let offset = cursorLeft + scrollLeft
|
||||||
|
let currentTimeStamp = (offset / preSecondPx) * 1000 + window['tsObj']._Store._startTimestamp
|
||||||
|
window['tsObj']._Store.currentTimestamp = Number(parseInt(String(currentTimeStamp / 1000))) * 1000
|
||||||
|
|
||||||
|
/*let timeInput = $(".timePicker .el-input__inner")
|
||||||
|
if (timeInput && timeInput[0])
|
||||||
|
timeInput[0]['value'] = formatTime(window['tsObj']._Store._currentTimestamp)*/
|
||||||
|
|
||||||
|
eventBus.emit('event-startTime', window['tsObj']._Store._currentTimestamp)
|
||||||
|
|
||||||
|
let currentTasks = window['tsObj']._Store.getTaskInStamp()
|
||||||
|
// console.log(currentTasks)
|
||||||
|
currentTasks.forEach(task => {
|
||||||
|
switch (task.callback) {
|
||||||
|
case 'move':
|
||||||
|
let TrajectoryMotionObject = window['_entityMap'].get(task.id + task.callback + task.sourceId);
|
||||||
|
let tsEntitys = window['_entityMap'].get(task.sourceId);
|
||||||
|
tsEntitys.show = true
|
||||||
|
// TrajectoryMotionObject.speed = TrajectoryMotionObject.oldSpeed
|
||||||
|
TrajectoryMotionObject.setMovePositionByTime((window['tsObj']._Store._currentTimestamp - task.startTime) / 1000)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//新增0918
|
||||||
|
let tsEntity = window['_entityMap'].get(task.sourceId);
|
||||||
|
if (tsEntity && typeof tsEntity[task.callback] == "function") {
|
||||||
|
if (task.callback == "flicker") {
|
||||||
|
/* let detail = task.detail;
|
||||||
|
typeof detail == "string" && (detail = JSON.parse(detail));
|
||||||
|
tsEntity[task.callback](detail.times / window['tsObj']._Store._multiplier, detail.numbers);*/
|
||||||
|
tsEntity[task.callback](1, 1)
|
||||||
|
} else tsEntity[task.callback]();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
// cursorLeft.value = newLeft;
|
// cursorLeft.value = newLeft;
|
||||||
// 同步到Store(如果需要保存拖拽后的位置到全局状态)
|
// 同步到Store(如果需要保存拖拽后的位置到全局状态)
|
||||||
// props.TSOBJ._Store.setScale('cursorLeft', newLeft);
|
// props.TSOBJ._Store.setScale('cursorLeft', newLeft);
|
||||||
|
|||||||
@ -121,6 +121,7 @@ import {TS} from "./sdk";
|
|||||||
import * as domain from "domain";
|
import * as domain from "domain";
|
||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {addMapSource} from "../../common/addMapSource";
|
||||||
|
|
||||||
const isShowPup = ref(false)
|
const isShowPup = ref(false)
|
||||||
const des_detail = ref("")
|
const des_detail = ref("")
|
||||||
@ -248,6 +249,32 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
const createEarth = async () => {
|
const createEarth = async () => {
|
||||||
(window as any).earth_ts = await new YJ.YJEarth('earthContainer', {navigationHelpButton: false})
|
(window as any).earth_ts = await new YJ.YJEarth('earthContainer', {navigationHelpButton: false})
|
||||||
|
let openRightClick = await new YJ.Global.openRightClick(window.earth_ts)
|
||||||
|
/*YJ.Global.MouseRightMenu(window.earth_ts, true, (text, object) => {
|
||||||
|
switch (text) {
|
||||||
|
case 'rotateAround':
|
||||||
|
YJ.Global.rotateAround(window.earth_ts, object.position)
|
||||||
|
break
|
||||||
|
case 'textBox':
|
||||||
|
let id = new YJ.Tools().randomString()
|
||||||
|
let name = '文本框'
|
||||||
|
addMapSource({
|
||||||
|
type: 'textBox',
|
||||||
|
id: id,
|
||||||
|
sourceName: name,
|
||||||
|
opt: {
|
||||||
|
id: id,
|
||||||
|
position: object.position
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'attribute':
|
||||||
|
let node = window.treeObj.getNodeByParam('id', object.id, null)
|
||||||
|
// rightMenus.edit.callback(eventBus, node)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})*/
|
||||||
|
|
||||||
YJ.Global.CesiumContainer((window as any).earth_ts, {compass: false, legend: false});
|
YJ.Global.CesiumContainer((window as any).earth_ts, {compass: false, legend: false});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new YJ.Tools((window as any).earth_ts).flyHome()
|
new YJ.Tools((window as any).earth_ts).flyHome()
|
||||||
|
|||||||
@ -1,7 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="element">
|
<div>
|
||||||
<div class="title">
|
<div class="miniElement" :style="!mini?'display:none':''">
|
||||||
<span>元素库</span>
|
<div class="switch-node-outer" @click="mini=false">
|
||||||
|
<div class="switch-node-inner">
|
||||||
|
展开元素库
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="element" :style="mini?'display:none':''">
|
||||||
|
<div class="titleBox">
|
||||||
|
<span class="title">元素库</span>
|
||||||
|
<span class="close" @click="mini=true">
|
||||||
|
<svg-icon :size="15" class="icon-svg-item" name="closeLeftTs"/>收起
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<el-input
|
<el-input
|
||||||
@ -48,6 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -62,6 +75,7 @@ import {useTreeNode} from "../components/tree/hooks/treeNode";
|
|||||||
|
|
||||||
const {getSelectedNodes} = useTreeNode()
|
const {getSelectedNodes} = useTreeNode()
|
||||||
const service = ref(localStorage.getItem('ip'))
|
const service = ref(localStorage.getItem('ip'))
|
||||||
|
let mini = ref(false)
|
||||||
|
|
||||||
interface Tree {
|
interface Tree {
|
||||||
name: string
|
name: string
|
||||||
@ -226,9 +240,23 @@ let addMarker = (item) => {
|
|||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
//display: flex;
|
//display: flex;
|
||||||
//flex-direction: column;
|
//flex-direction: column;
|
||||||
|
.titleBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
height: 30px;
|
font-size: 18px;
|
||||||
line-height: 30px;
|
padding: 5px 0;
|
||||||
|
//line-height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
&:hover {
|
||||||
|
color: #0ff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabsBox {
|
.tabsBox {
|
||||||
@ -359,4 +387,39 @@ let addMarker = (item) => {
|
|||||||
:deep(.el-text ) {
|
:deep(.el-text ) {
|
||||||
--el-text-color: #fff !important;
|
--el-text-color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.miniElement {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
left: 0;
|
||||||
|
top: 35%;
|
||||||
|
|
||||||
|
.switch-node-outer {
|
||||||
|
position: relative;
|
||||||
|
clip-path: polygon(0% 0%,
|
||||||
|
100% calc(30px + 3px),
|
||||||
|
100% calc(100% - 30px - 3px),
|
||||||
|
0% 100%);
|
||||||
|
padding: calc(3px * 1.42) 3px;
|
||||||
|
background: #0ff;
|
||||||
|
|
||||||
|
.switch-node-inner {
|
||||||
|
clip-path: polygon(0% 3px,
|
||||||
|
100% 30px,
|
||||||
|
100% calc(100% - 30px),
|
||||||
|
0% calc(100% - 3px));
|
||||||
|
cursor: pointer;
|
||||||
|
writing-mode: vertical-lr;
|
||||||
|
padding: calc(30px * 1.1) 0;
|
||||||
|
width: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
background: linear-gradient(to right, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0) 100%), rgba(0, 0, 0, 0.8);
|
||||||
|
color: #0ff;
|
||||||
|
letter-spacing: 2.5px;
|
||||||
|
/* border: 1.5px solid rgba(0, 255, 255, 1); */
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
import {useTreeNode} from '@/views/components/tree/hooks/treeNode'
|
||||||
|
import {rightClick} from "../components/tree/entityClick";
|
||||||
|
|
||||||
const {cusAddNodes, getSelectedNode} = useTreeNode()
|
const {cusAddNodes, getSelectedNode} = useTreeNode()
|
||||||
|
|
||||||
@ -67,6 +68,15 @@ export function initMapData(type, data, cb: any = null) {
|
|||||||
TrajectoryMotionObject.moveCallBack(tsEntitys);*/
|
TrajectoryMotionObject.moveCallBack(tsEntitys);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//鼠标右键点击事件
|
||||||
|
entityObject.onRightClick = () => {
|
||||||
|
// rightClick(getOptions());
|
||||||
|
console.log("鼠标右键点击事件")
|
||||||
|
let id = options.id;
|
||||||
|
let node = window.treeObj.getNodeByParam("id", id, null);
|
||||||
|
if (node) window.treeObj.selectNode(node);
|
||||||
|
YJ.Global.splitScreen.setActiveId([id]);
|
||||||
|
};
|
||||||
return options
|
return options
|
||||||
|
|
||||||
} else return null
|
} else return null
|
||||||
|
|||||||
@ -67,9 +67,9 @@
|
|||||||
{{ scope.row.desc }}
|
{{ scope.row.desc }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="createdBy" label="创建人" sortable/>
|
<el-table-column align="center" prop="createdBy" label="创建人" sortable width="240"/>
|
||||||
<el-table-column align="center" prop="createdAt" label="创建日期" sortable/>
|
<el-table-column align="center" prop="createdAt" label="创建日期" sortable width="180"/>
|
||||||
<el-table-column align="center" label="操作">
|
<el-table-column align="center" label="操作" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
||||||
<!--<el-button text size="small" type="primary" :icon="Edit" @click="toTSEdit(scope.row)">编辑</el-button>-->
|
<!--<el-button text size="small" type="primary" :icon="Edit" @click="toTSEdit(scope.row)">编辑</el-button>-->
|
||||||
@ -88,9 +88,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-popconfirm>-->
|
</el-popconfirm>-->
|
||||||
|
|
||||||
<div>
|
<div style="display: flex;justify-content: space-evenly">
|
||||||
<Edit style="width: 16px; height: 16px; " @click="toTSEdit(scope.row)"></Edit>
|
<Edit style="width: 16px; height: 16px; cursor:pointer;" @click="toTSEdit(scope.row)"></Edit>
|
||||||
<Delete style="width: 16px; height: 16px;" @click="delPlanBtn(scope.row.id)"/>
|
<Warning style="width: 16px; height: 16px; cursor:pointer; "></Warning>
|
||||||
|
<Delete style="width: 16px; height: 16px; cursor:pointer;" @click="delPlanBtn(scope.row.id)"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -125,7 +126,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onUnmounted} from "vue";
|
import {ref, onUnmounted} from "vue";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {Delete, Edit, CirclePlus, Download, Upload} from '@element-plus/icons-vue'
|
import {Delete, Edit, Warning, CirclePlus, Download, Upload} from '@element-plus/icons-vue'
|
||||||
import {ElMessage, ElMessageBox, TableV2SortOrder} from 'element-plus'
|
import {ElMessage, ElMessageBox, TableV2SortOrder} from 'element-plus'
|
||||||
import type {SortBy} from 'element-plus'
|
import type {SortBy} from 'element-plus'
|
||||||
import {TsApi} from "../../api/ts";
|
import {TsApi} from "../../api/ts";
|
||||||
@ -134,7 +135,7 @@ import NewPlan from "./newPlan.vue"
|
|||||||
const date = ref({
|
const date = ref({
|
||||||
ymd: '',
|
ymd: '',
|
||||||
hms: '',
|
hms: '',
|
||||||
week: 0
|
week: ""
|
||||||
})
|
})
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
|
|||||||
@ -33,31 +33,28 @@
|
|||||||
v-model="form.datetime"
|
v-model="form.datetime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择触发时间"
|
placeholder="选择触发时间"
|
||||||
|
class="timePicker"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<template v-if="!['display','hide'].includes(currentKey)">
|
||||||
<el-form-item label="持续时间">
|
<el-form-item label="持续时间">
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span>
|
<span><el-input v-model="hour"/>时</span>
|
||||||
<el-input v-model="hour"/>时
|
<span><el-input v-model="minute"/>分 </span>
|
||||||
</span>
|
<span><el-input v-model="second"/>秒</span>
|
||||||
<span>
|
|
||||||
<el-input v-model="minute"/>分
|
|
||||||
</span><span>
|
|
||||||
<el-input v-model="second"/>秒
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-if="currentKey=='flicker'">
|
<template v-if="currentKey=='flicker'">
|
||||||
<el-form-item label="闪烁间隔">
|
<!-- <el-form-item label="闪烁间隔">
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span>
|
<span>
|
||||||
<el-input v-model="times"/>秒
|
<el-input v-model="times"/>秒
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
<el-form-item label="闪烁次数">
|
<el-form-item label="闪烁次数">
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span>
|
<span>
|
||||||
@ -74,14 +71,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
</el-form>
|
||||||
|
</template>
|
||||||
<div class="optionbtn">
|
<div class="optionbtn">
|
||||||
<el-button @click="addEvent">确定</el-button>
|
<el-button @click="addEvent">确定</el-button>
|
||||||
<el-button @click="isShowPup=false">取消</el-button>
|
<el-button @click="isShowPup=false">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="placeholder"></div>
|
<div class="placeholder"></div>
|
||||||
@ -115,7 +110,7 @@ const zNode = ref({})
|
|||||||
const hour = ref(0)
|
const hour = ref(0)
|
||||||
const minute = ref(0)
|
const minute = ref(0)
|
||||||
const second = ref(0)
|
const second = ref(0)
|
||||||
const times = ref(0)//闪烁间隔
|
const times = ref(1)//闪烁间隔
|
||||||
const numbers = ref(0)//闪烁次数
|
const numbers = ref(0)//闪烁次数
|
||||||
|
|
||||||
const isContainModelPosition = ref(true)
|
const isContainModelPosition = ref(true)
|
||||||
@ -129,6 +124,16 @@ const eventTree: { children: ({ label: string } | { label: string })[]; id: stri
|
|||||||
id: "normal",
|
id: "normal",
|
||||||
label: '常用推演事件',
|
label: '常用推演事件',
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
id: "display",
|
||||||
|
label: '显示事件',
|
||||||
|
name: '显示'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "hide",
|
||||||
|
label: '隐藏事件',
|
||||||
|
name: '隐藏'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "flicker",
|
id: "flicker",
|
||||||
label: '闪烁事件',
|
label: '闪烁事件',
|
||||||
@ -205,8 +210,7 @@ const addEvent = () => {
|
|||||||
endTime: startTime + duration_S * 1000,
|
endTime: startTime + duration_S * 1000,
|
||||||
"detail": JSON.stringify(obj)
|
"detail": JSON.stringify(obj)
|
||||||
}
|
}
|
||||||
console.log(obj)
|
console.log("dbParams", dbParams)
|
||||||
|
|
||||||
TsApi.addTsEvent(dbParams).then(res => {
|
TsApi.addTsEvent(dbParams).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -239,7 +243,7 @@ const reset = () => {
|
|||||||
minute.value = 0
|
minute.value = 0
|
||||||
second.value = 0
|
second.value = 0
|
||||||
numbers.value = 0
|
numbers.value = 0
|
||||||
times.value = 0
|
times.value = 1
|
||||||
form = {
|
form = {
|
||||||
name: '闪烁-',
|
name: '闪烁-',
|
||||||
// datetime: '',
|
// datetime: '',
|
||||||
@ -260,6 +264,9 @@ eventBus.on('openAddEvent', (data, cb, type) => {
|
|||||||
// getSetting()
|
// getSetting()
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
eventBus.on('event-startTime', (data) => {
|
||||||
|
form['datetime'] = new Date(data)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -303,7 +310,7 @@ eventBus.on('openAddEvent', (data, cb, type) => {
|
|||||||
|
|
||||||
.set_detail {
|
.set_detail {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: calc(100% - 64px);
|
||||||
|
|
||||||
.sort {
|
.sort {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -327,6 +334,9 @@ eventBus.on('openAddEvent', (data, cb, type) => {
|
|||||||
//flex: auto;
|
//flex: auto;
|
||||||
width: calc(100% - 170px);
|
width: calc(100% - 170px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
:deep(.el-input ) {
|
:deep(.el-input ) {
|
||||||
--el-date-editor-width: 100%;
|
--el-date-editor-width: 100%;
|
||||||
@ -363,7 +373,7 @@ eventBus.on('openAddEvent', (data, cb, type) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.optionbtn {
|
.optionbtn {
|
||||||
margin: 0 auto;
|
margin: 5px auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -169,7 +169,9 @@ export class Store {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set currentTimestamp(val) {
|
set currentTimestamp(val) {
|
||||||
|
console.log("currentTimestamp", val)
|
||||||
this._currentTimestamp = val
|
this._currentTimestamp = val
|
||||||
window['updateProp']("currentStamp", val)
|
window['updateProp']("currentStamp", val)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,11 +21,12 @@ export default {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
currentX = event.pageX - startX;
|
currentX = event.pageX - startX;
|
||||||
currentY = event.pageY - startY;
|
currentY = event.pageY - startY;
|
||||||
// drag(event, el)
|
drag(event, el)
|
||||||
};
|
};
|
||||||
|
|
||||||
// 鼠标松开事件
|
// 鼠标松开事件
|
||||||
const handleMouseup = () => {
|
const handleMouseup = () => {
|
||||||
|
window['tsObj']._Store.setCursorLeft(window['tsObj']._Store._currentTimestamp)
|
||||||
document.removeEventListener("mousemove", handleMousemove);
|
document.removeEventListener("mousemove", handleMousemove);
|
||||||
document.removeEventListener("mouseup", handleMouseup);
|
document.removeEventListener("mouseup", handleMouseup);
|
||||||
clearInterval(window.intervalID)
|
clearInterval(window.intervalID)
|
||||||
@ -45,9 +46,52 @@ export default {
|
|||||||
function drag(event, el) {
|
function drag(event, el) {
|
||||||
let newX = currentX + startX - (window['tsObj']._Store._scales.gridWidth || 400)
|
let newX = currentX + startX - (window['tsObj']._Store._scales.gridWidth || 400)
|
||||||
let isSide = (newX > window['tsObj']._Store._panelWidth - 50) || (newX < 50)
|
let isSide = (newX > window['tsObj']._Store._panelWidth - 50) || (newX < 50)
|
||||||
console.log("isSide", isSide)
|
// console.log("isSide", isSide)
|
||||||
console.log("newX", newX)
|
// console.log("newX", newX)
|
||||||
if (isSide) {
|
if (isSide) {
|
||||||
|
if (window.intervalID)
|
||||||
|
return
|
||||||
|
if (newX <= 0) {
|
||||||
|
newX = 0
|
||||||
|
window['tsObj']._Store.setScale("cursorLeft", newX)
|
||||||
|
} else if (newX < 50) {
|
||||||
|
if (window['tsObj']._Store._scales.scrollLeft == 0) {
|
||||||
|
window['tsObj']._Store.setScale("cursorLeft", newX)
|
||||||
|
clearInterval(window.intervalID);
|
||||||
|
window.intervalID = null
|
||||||
|
} else {
|
||||||
|
window.intervalID = setInterval(() => {
|
||||||
|
let newLeft = window['tsObj']._Store._scales.scrollLeft - 1;
|
||||||
|
let finalX = newLeft
|
||||||
|
if (newLeft < 0)
|
||||||
|
finalX = 0
|
||||||
|
window['tsObj']._Store.setScale("scrollLeft", finalX)
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
} else if (newX + window['tsObj']._Store._scales.scrollLeft >= window['tsObj']._Store._scales.fullWidth) {
|
||||||
|
newX = window['tsObj']._Store._panelWidth
|
||||||
|
window['tsObj']._Store.setScale("cursorLeft", newX)
|
||||||
|
} else {
|
||||||
|
let maxScroll = window['tsObj']._Store._scales.fullWidth - window['tsObj']._Store._panelWidth
|
||||||
|
if (window['tsObj']._Store._scales.scrollLeft == maxScroll) {
|
||||||
|
window['tsObj']._Store.setScale("cursorLeft", newX)
|
||||||
|
clearInterval(window.intervalID);
|
||||||
|
window.intervalID = null
|
||||||
|
} else {
|
||||||
|
window['intervalID'] = setInterval(() => {
|
||||||
|
// console.log("intervalID",intervalID)
|
||||||
|
let newLeft = window['tsObj']._Store._scales.scrollLeft + 1;
|
||||||
|
let finalX = newLeft
|
||||||
|
if (newLeft >= maxScroll) {
|
||||||
|
window['tsObj']._Store.setScale("cursorLeft", newX)
|
||||||
|
clearInterval(window.intervalID);
|
||||||
|
window.intervalID = null
|
||||||
|
finalX = maxScroll
|
||||||
|
}
|
||||||
|
window['tsObj']._Store.setScale("scrollLeft", finalX)
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
clearInterval(window.intervalID)
|
clearInterval(window.intervalID)
|
||||||
window.intervalID = null
|
window.intervalID = null
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
let option = {
|
let option = {
|
||||||
width: 1300,
|
width: 1300,
|
||||||
@ -22,8 +21,9 @@ let option = {
|
|||||||
devTools: true,
|
devTools: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function leftClick(options) {
|
function leftClick(options) {
|
||||||
const { ipcRenderer } = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
console.log('leftClick', options)
|
console.log('leftClick', options)
|
||||||
let id = options.id;
|
let id = options.id;
|
||||||
let node = window.treeObj.getNodeByParam("id", id, null);
|
let node = window.treeObj.getNodeByParam("id", id, null);
|
||||||
@ -164,18 +164,21 @@ function leftClick(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function rightClick(options) {
|
function rightClick(options) {
|
||||||
console.log("rightClick", options);
|
console.log("rightClick", options);
|
||||||
let id = options.id;
|
let id = options.id;
|
||||||
let node = window.treeObj.getNodeByParam("id", id, null);
|
let node = window.treeObj.getNodeByParam("id", id, null);
|
||||||
if (node) window.treeObj.selectNode(node);
|
if (node) window.treeObj.selectNode(node);
|
||||||
YJ.Global.splitScreen.setActiveId([id]);
|
// 自定义,实例右键点击菜单
|
||||||
|
// YJ.Global.splitScreen.setActiveId([id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
let a = new Map()
|
let a = new Map()
|
||||||
|
|
||||||
async function tankuang(id, node, info) {
|
async function tankuang(id, node, info) {
|
||||||
const electron = require("electron");
|
const electron = require("electron");
|
||||||
const { ipcRenderer } = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
|
|
||||||
let availablePort = await ipcRenderer.invoke('get-available-port');
|
let availablePort = await ipcRenderer.invoke('get-available-port');
|
||||||
window.treeObj.selectNode(node);
|
window.treeObj.selectNode(node);
|
||||||
@ -225,4 +228,4 @@ async function tankuang(id, node, info) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { leftClick, rightClick };
|
export {leftClick, rightClick};
|
||||||
|
|||||||
Reference in New Issue
Block a user