This commit is contained in:
zh
2025-09-19 09:26:36 +08:00
parent 451d5cdda6
commit f47c33c51e
12 changed files with 28 additions and 17 deletions

View File

@ -36,6 +36,7 @@
"pinia-plugin-persistedstate": "^4.4.1", "pinia-plugin-persistedstate": "^4.4.1",
"scss": "^0.2.4", "scss": "^0.2.4",
"verror": "^1.10.1", "verror": "^1.10.1",
"vue-clipboard3": "^2.0.0",
"vue-i18n": "^9.14.5", "vue-i18n": "^9.14.5",
"vue-router": "^4.5.1", "vue-router": "^4.5.1",
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"

View File

@ -11,14 +11,17 @@ declare module 'vue' {
BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default'] BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default']
Directory: typeof import('./src/components/dialog/directory.vue')['default'] Directory: typeof import('./src/components/dialog/directory.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] 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'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSlider: typeof import('element-plus/es')['ElSlider'] ElSlider: typeof import('element-plus/es')['ElSlider']
ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElSwitch: typeof import('element-plus/es')['ElSwitch']
@ -26,6 +29,7 @@ declare module 'vue' {
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs'] ElTabs: typeof import('element-plus/es')['ElTabs']
ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default'] Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default']
Pagination: typeof import('./src/components/Pagination/index.vue')['default'] Pagination: typeof import('./src/components/Pagination/index.vue')['default']

View File

@ -58,7 +58,7 @@ import useClipboard from 'vue-clipboard3'
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
const { t } = useI18n() const { t } = useI18n()
const authInfo = ref({ const authInfo:any = ref({
license_code: '', license_code: '',
//授权信息 //授权信息
generateTime: '', //开始时间 generateTime: '', //开始时间
@ -94,7 +94,7 @@ const getStatus = () => {
} else { } else {
authInfo.value.status = false authInfo.value.status = false
} }
window.checkAuthIsValid = authInfo.value.status (window as any).checkAuthIsValid = authInfo.value.status
} }
const getAuthCode = async () => { const getAuthCode = async () => {
const res = await AuthApi.authInfo() const res = await AuthApi.authInfo()

View File

@ -153,6 +153,7 @@ const contextMenu = reactive({
}) })
const tableRef = ref() const tableRef = ref()
// @ts-ignore
var sortableInstance: any = reactive(null) var sortableInstance: any = reactive(null)
//拖拽 //拖拽
const setSort = () => { const setSort = () => {

View File

@ -168,6 +168,7 @@ const contextMenu = reactive({
}) })
const treeRef = ref() const treeRef = ref()
// @ts-ignore
var sortableInstance: any = reactive(null) var sortableInstance: any = reactive(null)
//拖拽 //拖拽

View File

@ -194,7 +194,7 @@ const handleClick = (item: any, e) => {
leftSideSecondRef.value.initList(item) leftSideSecondRef.value.initList(item)
} else if (item.key === 'model') { } else if (item.key === 'model') {
//模型库 //模型库
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
eventBus.emit('openModel', true) eventBus.emit('openModel', true)
} else { } else {
ElMessage({ ElMessage({

View File

@ -420,7 +420,7 @@ const methodMap = {
}, },
//模型压平 //模型压平
pressModel() { pressModel() {
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
let selectedNode = window.treeObj.getSelectedNodes()[0] let selectedNode = window.treeObj.getSelectedNodes()[0]
if (selectedNode) { if (selectedNode) {
let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType) let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
@ -496,7 +496,7 @@ const methodMap = {
}, },
//地形开挖 //地形开挖
terrainDig() { terrainDig() {
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
// new YJ.Analysis.TerrainExcavation(window.Earth1); // new YJ.Analysis.TerrainExcavation(window.Earth1);
eventBus.emit('terrainExcavationDialog') eventBus.emit('terrainExcavationDialog')
} else { } else {
@ -508,7 +508,7 @@ const methodMap = {
}, },
//剖切 //剖切
tilesetClipping() { tilesetClipping() {
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
let selectedNode = window.treeObj.getSelectedNodes() let selectedNode = window.treeObj.getSelectedNodes()
if (selectedNode.length < 1) { if (selectedNode.length < 1) {
ElMessage({ ElMessage({
@ -555,7 +555,7 @@ const methodMap = {
gdbImport() {}, gdbImport() {},
//圆形统计 //圆形统计
circleStatistics() { circleStatistics() {
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
eventBus.emit('goodsSearchCircleDialog') eventBus.emit('goodsSearchCircleDialog')
} else { } else {
ElMessage({ ElMessage({
@ -566,7 +566,7 @@ const methodMap = {
}, },
//多边形统计 //多边形统计
polygonStatistics() { polygonStatistics() {
if (window.checkAuthIsValid) { if ((window as any).checkAuthIsValid) {
eventBus.emit('goodsSearchPolgonDialog') eventBus.emit('goodsSearchPolgonDialog')
} else { } else {
ElMessage({ ElMessage({

View File

@ -184,6 +184,7 @@ const { cusAddNodes } = useTreeNode()
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
let viewPointHeight:any = ref(0)
var show: any = ref(false) var show: any = ref(false)
var flyRoam: any = reactive([]) var flyRoam: any = reactive([])
@ -232,7 +233,7 @@ const draw = (data) => {
const clangeViewPointHeight = () => {} const clangeViewPointHeight = () => {}
const viewPointHeightInput = () => { const viewPointHeightInput = () => {
let dom = document.getElementById('viewPointHeight') let dom:any = document.getElementById('viewPointHeight')
if (viewPointHeight.value < dom.min * 1) { if (viewPointHeight.value < dom.min * 1) {
viewPointHeight.value = dom.min * 1 viewPointHeight.value = dom.min * 1
} else if (viewPointHeight.value > dom.max * 1) { } else if (viewPointHeight.value > dom.max * 1) {

View File

@ -136,7 +136,7 @@
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.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 baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')

View File

@ -197,11 +197,13 @@ async function tankuang(id, node, info) {
console.error('创建窗口失败:', error) console.error('创建窗口失败:', error)
} }
return return
// @ts-ignore
let newDataWin = new win({ let newDataWin = new win({
...option, ...option,
title: node.detail.name, title: node.detail.name,
}); });
newDataWin.openDevTools(true); newDataWin.openDevTools(true);
// @ts-ignore
newDataWin.loadURL(`http://localhost:${staticPort}/infoShow.html`); newDataWin.loadURL(`http://localhost:${staticPort}/infoShow.html`);
newDataWin.on("ready-to-show", () => { 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) { newDataWin.on("close", function (event) {
window._winMap.delete(id); (window as any)._winMap.delete(id);
}); });
} else { } else {
BrowserWindow.fromId((window as any)._winMap.get(id)).show(); BrowserWindow.fromId((window as any)._winMap.get(id)).show();

View File

@ -246,6 +246,7 @@ const createEarth = async () => {
} }
}) })
tree.value.initTreeCallBack() tree.value.initTreeCallBack()
// @ts-ignore
let options = JSON.parse(localStorage.getItem('defaultView')) let options = JSON.parse(localStorage.getItem('defaultView'))
YJ.Global.setDefaultView(window.earth, options) YJ.Global.setDefaultView(window.earth, options)
setTimeout(() => { setTimeout(() => {
@ -302,9 +303,9 @@ const getStatus = (time) => {
const currentTimestamp = Date.now() const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) { if (timestamp > currentTimestamp) {
window.checkAuthIsValid = true (window as any).checkAuthIsValid = true
} else { } else {
window.checkAuthIsValid = false (window as any).checkAuthIsValid = false
} }
} }

View File

@ -122,9 +122,9 @@ export const useLogin = () => {
const currentTimestamp = Date.now() const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) { if (timestamp > currentTimestamp) {
window.checkAuthIsValid = true (window as any).checkAuthIsValid = true
} else { } else {
window.checkAuthIsValid = false (window as any).checkAuthIsValid = false
} }
} }