From f47c33c51e49a89a35d35474bae9c8bc7be33389 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Fri, 19 Sep 2025 09:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/renderer/components.d.ts | 6 +++++- .../headers/components/setPup/components/authorize.vue | 4 ++-- .../components/setPup/components/modelManage copy.vue | 1 + .../components/setPup/components/modelManage.vue | 1 + .../src/views/components/leftSide/leftSideFirst.vue | 2 +- .../src/views/components/leftSide/leftSideSecond.vue | 10 +++++----- .../src/views/components/propertyBox/FlyRoam.vue | 3 ++- .../src/views/components/propertyBox/RoutePlanning.vue | 2 +- src/renderer/src/views/components/tree/entityClick.ts | 6 ++++-- src/renderer/src/views/home/index.vue | 5 +++-- src/renderer/src/views/login/useLogin.ts | 4 ++-- 12 files changed, 28 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 16e7c91..e14adff 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "pinia-plugin-persistedstate": "^4.4.1", "scss": "^0.2.4", "verror": "^1.10.1", + "vue-clipboard3": "^2.0.0", "vue-i18n": "^9.14.5", "vue-router": "^4.5.1", "vuedraggable": "^2.24.3" diff --git a/src/renderer/components.d.ts b/src/renderer/components.d.ts index caebf2c..003e90b 100644 --- a/src/renderer/components.d.ts +++ b/src/renderer/components.d.ts @@ -11,14 +11,17 @@ declare module 'vue' { BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default'] Directory: typeof import('./src/components/dialog/directory.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] - ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] + ElCol: typeof import('element-plus/es')['ElCol'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] @@ -26,6 +29,7 @@ declare module 'vue' { ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTree: typeof import('element-plus/es')['ElTree'] ElUpload: typeof import('element-plus/es')['ElUpload'] Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default'] Pagination: typeof import('./src/components/Pagination/index.vue')['default'] diff --git a/src/renderer/src/views/components/headers/components/setPup/components/authorize.vue b/src/renderer/src/views/components/headers/components/setPup/components/authorize.vue index 6fb6471..3e2c793 100644 --- a/src/renderer/src/views/components/headers/components/setPup/components/authorize.vue +++ b/src/renderer/src/views/components/headers/components/setPup/components/authorize.vue @@ -58,7 +58,7 @@ import useClipboard from 'vue-clipboard3' const eventBus: any = inject('bus') const { t } = useI18n() -const authInfo = ref({ +const authInfo:any = ref({ license_code: '', //授权信息 generateTime: '', //开始时间 @@ -94,7 +94,7 @@ const getStatus = () => { } else { authInfo.value.status = false } - window.checkAuthIsValid = authInfo.value.status + (window as any).checkAuthIsValid = authInfo.value.status } const getAuthCode = async () => { const res = await AuthApi.authInfo() diff --git a/src/renderer/src/views/components/headers/components/setPup/components/modelManage copy.vue b/src/renderer/src/views/components/headers/components/setPup/components/modelManage copy.vue index 03a5683..7edd310 100644 --- a/src/renderer/src/views/components/headers/components/setPup/components/modelManage copy.vue +++ b/src/renderer/src/views/components/headers/components/setPup/components/modelManage copy.vue @@ -153,6 +153,7 @@ const contextMenu = reactive({ }) const tableRef = ref() +// @ts-ignore var sortableInstance: any = reactive(null) //拖拽 const setSort = () => { diff --git a/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue b/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue index c2c05be..5cd9f16 100644 --- a/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue +++ b/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue @@ -168,6 +168,7 @@ const contextMenu = reactive({ }) const treeRef = ref() +// @ts-ignore var sortableInstance: any = reactive(null) //拖拽 diff --git a/src/renderer/src/views/components/leftSide/leftSideFirst.vue b/src/renderer/src/views/components/leftSide/leftSideFirst.vue index c9211c1..5ab2310 100644 --- a/src/renderer/src/views/components/leftSide/leftSideFirst.vue +++ b/src/renderer/src/views/components/leftSide/leftSideFirst.vue @@ -194,7 +194,7 @@ const handleClick = (item: any, e) => { leftSideSecondRef.value.initList(item) } else if (item.key === 'model') { //模型库 - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { eventBus.emit('openModel', true) } else { ElMessage({ diff --git a/src/renderer/src/views/components/leftSide/leftSideSecond.vue b/src/renderer/src/views/components/leftSide/leftSideSecond.vue index d5afb94..dcb7497 100644 --- a/src/renderer/src/views/components/leftSide/leftSideSecond.vue +++ b/src/renderer/src/views/components/leftSide/leftSideSecond.vue @@ -420,7 +420,7 @@ const methodMap = { }, //模型压平 pressModel() { - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { let selectedNode = window.treeObj.getSelectedNodes()[0] if (selectedNode) { let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType) @@ -496,7 +496,7 @@ const methodMap = { }, //地形开挖 terrainDig() { - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { // new YJ.Analysis.TerrainExcavation(window.Earth1); eventBus.emit('terrainExcavationDialog') } else { @@ -508,7 +508,7 @@ const methodMap = { }, //剖切 tilesetClipping() { - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { let selectedNode = window.treeObj.getSelectedNodes() if (selectedNode.length < 1) { ElMessage({ @@ -555,7 +555,7 @@ const methodMap = { gdbImport() {}, //圆形统计 circleStatistics() { - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { eventBus.emit('goodsSearchCircleDialog') } else { ElMessage({ @@ -566,7 +566,7 @@ const methodMap = { }, //多边形统计 polygonStatistics() { - if (window.checkAuthIsValid) { + if ((window as any).checkAuthIsValid) { eventBus.emit('goodsSearchPolgonDialog') } else { ElMessage({ diff --git a/src/renderer/src/views/components/propertyBox/FlyRoam.vue b/src/renderer/src/views/components/propertyBox/FlyRoam.vue index eaa19a8..9560000 100644 --- a/src/renderer/src/views/components/propertyBox/FlyRoam.vue +++ b/src/renderer/src/views/components/propertyBox/FlyRoam.vue @@ -184,6 +184,7 @@ const { cusAddNodes } = useTreeNode() const baseDialog: any = ref(null) const eventBus: any = inject('bus') +let viewPointHeight:any = ref(0) var show: any = ref(false) var flyRoam: any = reactive([]) @@ -232,7 +233,7 @@ const draw = (data) => { const clangeViewPointHeight = () => {} const viewPointHeightInput = () => { - let dom = document.getElementById('viewPointHeight') + let dom:any = document.getElementById('viewPointHeight') if (viewPointHeight.value < dom.min * 1) { viewPointHeight.value = dom.min * 1 } else if (viewPointHeight.value > dom.max * 1) { diff --git a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue index 55a4e73..3b049c1 100644 --- a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue +++ b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue @@ -136,7 +136,7 @@ import { ref, reactive } from 'vue' import { inject } from 'vue' import Dialog from '@/components/dialog/baseDialog.vue' -import { RouteApi } from '@/api/route/index.ts' +import { RouteApi } from '@/api/route/index' const baseDialog: any = ref(null) const eventBus: any = inject('bus') diff --git a/src/renderer/src/views/components/tree/entityClick.ts b/src/renderer/src/views/components/tree/entityClick.ts index ffefc1f..4923b70 100644 --- a/src/renderer/src/views/components/tree/entityClick.ts +++ b/src/renderer/src/views/components/tree/entityClick.ts @@ -197,11 +197,13 @@ async function tankuang(id, node, info) { console.error('创建窗口失败:', error) } return + // @ts-ignore let newDataWin = new win({ ...option, title: node.detail.name, }); newDataWin.openDevTools(true); + // @ts-ignore newDataWin.loadURL(`http://localhost:${staticPort}/infoShow.html`); newDataWin.on("ready-to-show", () => { @@ -212,10 +214,10 @@ async function tankuang(id, node, info) { }); }); - window._winMap.set(id, newDataWin.id); + (window as any)._winMap.set(id, newDataWin.id); newDataWin.on("close", function (event) { - window._winMap.delete(id); + (window as any)._winMap.delete(id); }); } else { BrowserWindow.fromId((window as any)._winMap.get(id)).show(); diff --git a/src/renderer/src/views/home/index.vue b/src/renderer/src/views/home/index.vue index f395abd..c5be399 100644 --- a/src/renderer/src/views/home/index.vue +++ b/src/renderer/src/views/home/index.vue @@ -246,6 +246,7 @@ const createEarth = async () => { } }) tree.value.initTreeCallBack() + // @ts-ignore let options = JSON.parse(localStorage.getItem('defaultView')) YJ.Global.setDefaultView(window.earth, options) setTimeout(() => { @@ -302,9 +303,9 @@ const getStatus = (time) => { const currentTimestamp = Date.now() if (timestamp > currentTimestamp) { - window.checkAuthIsValid = true + (window as any).checkAuthIsValid = true } else { - window.checkAuthIsValid = false + (window as any).checkAuthIsValid = false } } diff --git a/src/renderer/src/views/login/useLogin.ts b/src/renderer/src/views/login/useLogin.ts index 36cd9e0..4cd8542 100644 --- a/src/renderer/src/views/login/useLogin.ts +++ b/src/renderer/src/views/login/useLogin.ts @@ -122,9 +122,9 @@ export const useLogin = () => { const currentTimestamp = Date.now() if (timestamp > currentTimestamp) { - window.checkAuthIsValid = true + (window as any).checkAuthIsValid = true } else { - window.checkAuthIsValid = false + (window as any).checkAuthIsValid = false } }