Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
This commit is contained in:
1
src/renderer/src/auto-imports.d.ts
vendored
1
src/renderer/src/auto-imports.d.ts
vendored
@ -8,7 +8,6 @@ export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
|
||||
@ -10,18 +10,19 @@
|
||||
class="simple-upload"
|
||||
>
|
||||
<el-button class="clickBut" color="#005c5c" :loading="isUploading">
|
||||
<UploadFilled class="mr-2" />
|
||||
<UploadFilled class="mr-2"/>
|
||||
{{ t('auths.upload') }}
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import {UploadFilled} from '@element-plus/icons-vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
const eventBus: any = inject('bus')
|
||||
const { t } = useI18n()
|
||||
const {t} = useI18n()
|
||||
|
||||
// 组件属性
|
||||
const props = defineProps({
|
||||
@ -51,7 +52,8 @@ const isUploading = ref(false)
|
||||
// 上传地址
|
||||
const uploadUrl = () => {
|
||||
//process.env.BASE_API +
|
||||
let url = 'http://127.0.0.1:8848' + '/auth/import'
|
||||
console.log(process.env.BASE_API, 'yyyyy')
|
||||
let url = (localStorage.getItem("ip") || 'http://127.0.0.1:8848') + '/auth/import'
|
||||
return url
|
||||
}
|
||||
// 上传前处理
|
||||
@ -91,6 +93,7 @@ const handleError = (error: Error) => {
|
||||
.simple-upload {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
::v-deep .clickBut:hover {
|
||||
color: rgba(0, 255, 255, 1) !important;
|
||||
}
|
||||
|
||||
@ -144,13 +144,21 @@ const initTreeCallBack = () => {
|
||||
}
|
||||
let detail = typeof arr[i].detail == 'string' ? JSON.parse(arr[i].detail || '{}') : arr[i].detail
|
||||
let params = typeof arr[i].params == 'string' ? JSON.parse(arr[i].params || '{}') : arr[i].params
|
||||
if (!detail.name) {
|
||||
detail.name = arr[i].sourceName
|
||||
}
|
||||
if (!detail.id) {
|
||||
detail.id = arr[i].id
|
||||
if (detail) {
|
||||
if (!detail.name) {
|
||||
detail.name = arr[i].sourceName
|
||||
}
|
||||
if (!detail.id) {
|
||||
detail.id = arr[i].id
|
||||
}
|
||||
}
|
||||
if (layerTypes.includes(arr[i].sourceType)) {
|
||||
if (!detail && !params) {
|
||||
detail = {
|
||||
id: arr[i].id,
|
||||
name: arr[i].sourceName
|
||||
}
|
||||
}
|
||||
layers.push(
|
||||
{
|
||||
sourceType: arr[i].sourceType,
|
||||
@ -217,6 +225,89 @@ const onClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
// YJ.Global.splitScreen.setActiveId(source_ids);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数
|
||||
* @param event
|
||||
* @param treeId
|
||||
* @param treeNode
|
||||
*/
|
||||
const onCheck = (event: any, treeId: any, treeNode: any) => {
|
||||
console.log(treeNode, 'treeNode')
|
||||
let p_ids: any = []
|
||||
let parentNode = treeNode.getParentNode();
|
||||
if (parentNode) {
|
||||
checkChildNodes(parentNode);
|
||||
}
|
||||
let canCheckType: Array<any> = ['directory', 'gdslImagery', 'terrain', 'tileset', 'arcgisWximagery', 'arcgisBlueImagery', 'gdlwImagery']
|
||||
|
||||
// 检查子节点状态,更新父节点
|
||||
function checkChildNodes(parentNode) {
|
||||
var children = parentNode.children;
|
||||
if (!children || children.length === 0) return;
|
||||
|
||||
// 检查是否所有子节点都未被选中
|
||||
var allUnchecked = true;
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var childNode = children[i];
|
||||
// 如果有任何一个子节点被选中,则父节点不应被取消
|
||||
if (childNode.isShow) {
|
||||
allUnchecked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果所有子节点都未被选中,且父节点当前是选中状态,则取消父节点选择
|
||||
if (allUnchecked && parentNode.isShow) {
|
||||
p_ids.push(
|
||||
{
|
||||
id: parentNode.id,
|
||||
isShow: 0
|
||||
}
|
||||
)
|
||||
window['treeObj'].checkNode(parentNode, false, true);
|
||||
} else {
|
||||
p_ids.push(
|
||||
{
|
||||
id: parentNode.id,
|
||||
isShow: 1
|
||||
}
|
||||
)
|
||||
}
|
||||
// 递归检查上一级父节点
|
||||
var grandParent = parentNode.getParentNode();
|
||||
if (grandParent) {
|
||||
checkChildNodes(grandParent);
|
||||
}
|
||||
}
|
||||
|
||||
let ids = [...p_ids]
|
||||
|
||||
|
||||
function sourceStatus(node) {
|
||||
if (canCheckType.includes(node.sourceType)) {
|
||||
ids.push({id: node.id, isShow: node.isShow ? 1 : 0})
|
||||
console.log(node)
|
||||
let entityObject
|
||||
entityObject = (window as any)._entityMap.get(node.id)
|
||||
if (entityObject) {
|
||||
entityObject.show = node.isShow;
|
||||
|
||||
// cusUpdateNode({id: node.id, sourceName: node.sourceName, params: JSON.stringify(params)})
|
||||
}
|
||||
}
|
||||
|
||||
if (node.sourceType === 'directory') {
|
||||
if (node.children && node.children.length > 0) {
|
||||
node.children.forEach((item) => {
|
||||
sourceStatus(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceStatus(treeNode)
|
||||
console.log("ids", ids)
|
||||
}
|
||||
const onMouseDown = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
console.log("onMouseDown")
|
||||
let isShift = event.shiftKey
|
||||
@ -299,6 +390,7 @@ const setting = {
|
||||
onMouseDown: onMouseDown,
|
||||
onRightClick: rightClick,
|
||||
onClick: onClick,
|
||||
onCheck: onCheck,
|
||||
onDblClick: onDblClick
|
||||
/*
|
||||
onClick: this.onClick,
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
popper-style="background: transparent !important;color:#fff;padding:0;min-width:50px"
|
||||
>
|
||||
<template #reference>
|
||||
<span class="el-icon">{{ TSOBJ._Store._multiplier }}×</span>
|
||||
<span class="">{{ TSOBJ._Store._multiplier }}×</span>
|
||||
</template>
|
||||
<div class="multiplierBox">
|
||||
<span v-for="item in multipliers"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
content="推演描述"
|
||||
placement="top"
|
||||
>
|
||||
<svg-icon @click="isShowPup = true" :size="20" class="icon-svg-item" name="des_detail"/>
|
||||
<svg-icon @click="showInfo" :size="20" class="icon-svg-item" name="des_detail"/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="titles">实景三维态势推演系统</div>
|
||||
@ -125,6 +125,7 @@ import {TsApi} from "../../api/ts";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {addMapSource} from "../../common/addMapSource";
|
||||
|
||||
const planInfo = ref({})
|
||||
const isShowPup = ref(false)
|
||||
const des_detail = ref("")
|
||||
const stamp = ref("")
|
||||
@ -176,11 +177,14 @@ let data = new FormData()
|
||||
data.append("id", planId)
|
||||
TsApi.queryPlan(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
des_detail.value = res.data.desc
|
||||
planInfo.value = res.data
|
||||
}
|
||||
})
|
||||
const eventBus: any = inject('bus')
|
||||
|
||||
const showInfo = () => {
|
||||
isShowPup.value = true
|
||||
des_detail.value = planInfo.value.desc
|
||||
}
|
||||
let submit = () => {
|
||||
let obj = {
|
||||
id: params.id,
|
||||
@ -190,6 +194,7 @@ let submit = () => {
|
||||
TsApi.updatePlan(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({type: 'success', message: "操作成功"})
|
||||
planInfo.value.desc = des_detail.value
|
||||
}
|
||||
isShowPup.value = false
|
||||
})
|
||||
@ -386,6 +391,10 @@ const handleClick = (e) => {
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-slider__bar) {
|
||||
background-color: #0ff;
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
.leftTimeDesc {
|
||||
@ -463,3 +472,4 @@ const handleClick = (e) => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -33,6 +33,10 @@ export function initMapData(type, data, cb: any = null) {
|
||||
case 'pincerArrow':
|
||||
entityObject = new YJ.Obj.PincerArrowObject(window['earth_ts'], data)
|
||||
break
|
||||
case 'terrain':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.Terrain(window['earth_ts'], data)
|
||||
break
|
||||
case 'tileset':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.Tileset(window['earth_ts'], data)
|
||||
@ -46,6 +50,22 @@ export function initMapData(type, data, cb: any = null) {
|
||||
entityObject = new YJ.Obj.Layer(window['earth_ts'], data)
|
||||
cb && cb(entityObject)
|
||||
break
|
||||
case 'gdslImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.GDSLImagery(window['earth_ts'], data)
|
||||
break
|
||||
case 'gdlwImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.GDLWImagery(window['earth_ts'], data)
|
||||
break
|
||||
case 'arcgisBlueImagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.ArcgisBLUEImagery(window['earth_ts'], data)
|
||||
break
|
||||
case 'arcgisWximagery':
|
||||
data.host = baseURL
|
||||
entityObject = new YJ.Obj.ArcgisWXImagery(window['earth_ts'], data)
|
||||
break
|
||||
case "guiji":
|
||||
entityObject = new YJ.Obj.TrajectoryMotionObject(
|
||||
window['earth_ts'],
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="index">
|
||||
<div class="index ts-zyl">
|
||||
<!--<span @click="back">态势</span>-->
|
||||
<div class="dateTime">
|
||||
<span>{{ date.hms }}</span>
|
||||
@ -35,18 +35,19 @@
|
||||
placeholder="请输入创建人姓名"
|
||||
clearable
|
||||
/></span>
|
||||
<span>创建时间 <el-date-picker
|
||||
:teleported="false"
|
||||
class="dark-time-picker"
|
||||
v-model="searchParams.datetime"
|
||||
type="datetimerange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
date-format="YYYY-MM-DD ddd"
|
||||
time-format="A hh:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/></span>
|
||||
<span>创建时间
|
||||
<el-date-picker
|
||||
:teleported="false"
|
||||
class="dark-time-picker"
|
||||
v-model="searchParams.datetime"
|
||||
type="datetimerange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
date-format="YYYY-MM-DD"
|
||||
time-format="HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/></span>
|
||||
<el-button @click="search">搜索</el-button>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</div>
|
||||
@ -169,7 +170,13 @@ let searchParams: any = ref({
|
||||
createdBy: "",
|
||||
datetime: "",
|
||||
})
|
||||
|
||||
/**
|
||||
* Moment 格式化:日期 + 英文星期缩写
|
||||
*/
|
||||
const formatDateWithWeek = (date) => {
|
||||
// moment('2025-11-28').format('ddd') → "Fri"
|
||||
return moment(date).format('YYYY-MM-DD ddd');
|
||||
};
|
||||
let pageSize: any = ref(10)
|
||||
let pageNum: any = ref(1)
|
||||
let total: any = ref(0)
|
||||
@ -191,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])
|
||||
@ -201,7 +208,7 @@ const getList = (params: any = null) => {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
formData.append('username', params["createdBy"])
|
||||
|
||||
}
|
||||
@ -231,11 +238,12 @@ const toTSEdit = (row) => {
|
||||
query: {id: row.id, name: row.name, desc: row.desc, start_time: new Date(row.simulationStartTime).getTime(),}
|
||||
})
|
||||
}
|
||||
|
||||
const delPlanBtn = (id) => {
|
||||
ElMessageBox.confirm('确定要永久删除此推演方案吗?此操作不可撤销', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
cancelButtonText: '取消',
|
||||
}).then(() => {
|
||||
delPlan(id)
|
||||
}).catch(() => {
|
||||
@ -549,8 +557,7 @@ background-color: transparent;
|
||||
background-color: rgba(0, 255, 255, 0.2);
|
||||
}*/
|
||||
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
:deep(.el-picker-panel) {
|
||||
color: var(--el-text-color-regular);
|
||||
background: var(--el-bg-color-overlay);
|
||||
@ -582,4 +589,16 @@ background-color: transparent;
|
||||
--el-fill-color-blank: #00000000;
|
||||
--el-text-color-regular: #fff;
|
||||
}
|
||||
|
||||
.el-message-box {
|
||||
background: linear-gradient(180deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0) 100%), rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.ts-zyl {
|
||||
svg:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -153,6 +153,7 @@ const defaultProps = {
|
||||
label: 'label',
|
||||
}
|
||||
const handleNodeClick = (data: Tree, node, TreeNode, event) => {
|
||||
reset()
|
||||
currentKey.value = data.id; // data.id 为节点的唯一 key(需与 tree 的 node-key 对应)
|
||||
form.name = data.name + '-' + zNode.value.sourceName
|
||||
}
|
||||
@ -244,10 +245,9 @@ const reset = () => {
|
||||
second.value = 0
|
||||
numbers.value = 0
|
||||
times.value = 1
|
||||
form = {
|
||||
name: '闪烁-',
|
||||
// datetime: '',
|
||||
}
|
||||
form.name = '闪烁-'
|
||||
// datetime: '',
|
||||
|
||||
form['datetime'] = new Date(window['tsObj']._Store._currentTimestamp)
|
||||
currentKey.value = "flicker"
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
<el-date-picker
|
||||
:readonly="Boolean(currentPlanId)"
|
||||
v-model="sizeForm.simulationStartTime"
|
||||
popper-class="ts-zyl"
|
||||
type="datetime"
|
||||
timezone="Asia/Shanghai"
|
||||
value-format="YYYY-MM-DDTHH:mm:ss"
|
||||
@ -347,4 +348,29 @@ defineExpose({
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.ts-zyl {
|
||||
.el-date-picker {
|
||||
color-scheme: dark;
|
||||
|
||||
--el-bg-color-page: #0a0a0a;
|
||||
--el-bg-color: #141414;
|
||||
--el-bg-color-overlay: #1d1e1f;
|
||||
--el-text-color-primary: #E5EAF3;
|
||||
--el-text-color-regular: #CFD3DC;
|
||||
--el-text-color-secondary: #A3A6AD;
|
||||
--el-text-color-placeholder: #8D9095;
|
||||
--el-text-color-disabled: #6C6E72;
|
||||
--el-border-color-darker: #636466;
|
||||
--el-border-color-dark: #58585B;
|
||||
--el-border-color: #4C4D4F;
|
||||
--el-border-color-light: #414243;
|
||||
--el-border-color-lighter: #363637;
|
||||
--el-border-color-extra-light: #2B2B2C;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user