master
zhaoqiang 2024-07-17 22:09:39 +08:00
parent dd06453577
commit f3fb3335a9
2 changed files with 25 additions and 34 deletions

20
components.d.ts vendored
View File

@ -7,28 +7,8 @@ export {}
/* prettier-ignore */ /* prettier-ignore */
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCol: typeof import('element-plus/es')['ElCol']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElInput: typeof import('element-plus/es')['ElInput']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover'] ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
} }

View File

@ -296,7 +296,7 @@
</div> --> </div> -->
</div> </div>
<div class="loading" v-if="loadingFlag"> <div class="loading" v-if="loadingFlag">
<loadingPage></loadingPage> <div class="text">计算中...</div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -508,7 +508,7 @@ let dialogVisible = ref<boolean>(false)
let draw: any = null // svg let draw: any = null // svg
let SVGContainer = ref() // svgDOM let SVGContainer = ref() // svgDOM
let tabValue = ref<string>('有功') let tabValue = ref<string>('有功')
let loadingFlag = ref<boolean>(false) let loadingFlag = ref<boolean>(true)
let timer = ref<any>('') let timer = ref<any>('')
// -------线 // -------线
let handleClose = () => { let handleClose = () => {
@ -529,8 +529,8 @@ let svgImage = new URL('@/assets/images/svgImage/active.jpg', import.meta.url).h
let svgLevel = ref<number>(1) let svgLevel = ref<number>(1)
// svg svg // svg svg
let handleEnter = () => { let handleEnter = () => {
dialogVisible.value = true
loadingFlag.value = true loadingFlag.value = true
dialogVisible.value = true
send3d_xuehua() send3d_xuehua()
nextTick(() => { nextTick(() => {
SVGContainer.value.innerHTML = OpticalStorageSVG as any SVGContainer.value.innerHTML = OpticalStorageSVG as any
@ -542,6 +542,7 @@ let handleEnter = () => {
setTimeout(() => { setTimeout(() => {
nextTick(() => { nextTick(() => {
loadingFlag.value = false
let data = [ let data = [
{ {
id: '555_1', id: '555_1',
@ -1149,7 +1150,7 @@ let handleEnter = () => {
} }
}) })
}) })
}, 3000) }, 5000)
} }
// svg // svg
const send3d_xuehua = () => { const send3d_xuehua = () => {
@ -1168,8 +1169,6 @@ const send3d_xuehua = () => {
// svg svg // svg svg
let handleEnter2 = () => { let handleEnter2 = () => {
dialogVisible.value = true dialogVisible.value = true
loadingFlag.value = true
getSvgData_api({}) getSvgData_api({})
.then(res => { .then(res => {
nextTick(() => { nextTick(() => {
@ -1308,6 +1307,8 @@ let handleEnter2 = () => {
// } // }
} }
let handleShowSvg = async (svgIndex: string) => { let handleShowSvg = async (svgIndex: string) => {
loadingFlag.value = true
// let setData = { id: svgIndex } // let setData = { id: svgIndex }
// svgdApi(setData) // svgdApi(setData)
// .then(res => { // .then(res => {
@ -1447,6 +1448,8 @@ let handleShowSvg = async (svgIndex: string) => {
} }
// //
let handleCustomLine = (svgHtml, result) => { let handleCustomLine = (svgHtml, result) => {
loadingFlag.value = true
nextTick(() => { nextTick(() => {
SVGContainer.value.innerHTML = svgHtml as any SVGContainer.value.innerHTML = svgHtml as any
draw = SVG(SVGContainer.value.getElementsByTagName('svg')[0]) draw = SVG(SVGContainer.value.getElementsByTagName('svg')[0])
@ -1455,6 +1458,8 @@ let handleCustomLine = (svgHtml, result) => {
draw.zoom(0.5) draw.zoom(0.5)
setTimeout(() => { setTimeout(() => {
loadingFlag.value = false
console.log(result, 'result') console.log(result, 'result')
let polyline = draw.find('polyline') let polyline = draw.find('polyline')
const dom = draw.find('g') const dom = draw.find('g')
@ -1682,6 +1687,8 @@ let handleCustomLine = (svgHtml, result) => {
} }
// 线 // 线
let handleAnimate = async (result: any) => { let handleAnimate = async (result: any) => {
loadingFlag.value = false
console.log(result, 'resultresultresultresultresult') console.log(result, 'resultresultresultresultresult')
// g // g
let aclineDOM = draw.find('g') let aclineDOM = draw.find('g')
@ -2304,7 +2311,6 @@ let handleAnimate = async (result: any) => {
const polyine = item.findOne('polyline') const polyine = item.findOne('polyline')
polyine.attr({ stroke: '#FFFFFF' }) polyine.attr({ stroke: '#FFFFFF' })
}) })
loadingFlag.value = false
} }
// const handleClose = () => { // const handleClose = () => {
@ -3262,7 +3268,6 @@ const styleVar = computed(() => {
height: changeHeight(515); height: changeHeight(515);
width: 80%; width: 80%;
width: 100%; width: 100%;
} }
.os2info2 { .os2info2 {
@ -3276,7 +3281,6 @@ const styleVar = computed(() => {
width: 80%; width: 80%;
width: 100%; width: 100%;
} }
} }
} }
@ -3934,11 +3938,18 @@ const styleVar = computed(() => {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
top: 0; top: 0%;
left: 0; left: 0%;
z-index: 99999; // transform: translate(-50% -50%);
background-color: rgba(0, 0, 0, 0.3); font-size: changeHeight(70);
display: none; color: #fff;
.text {
width: changeHeight(300);
height: changeHeight(100);
position: absolute;
top: 15%;
left: 5%;
}
} }
} }
</style> </style>