diff --git a/public/测试.svg b/public/测试.svg index f898eff..6beb1d0 100644 --- a/public/测试.svg +++ b/public/测试.svg @@ -1 +1 @@ -高背压凝汽器
收球网
收球网
收球网
收球网
低背压凝汽器
装球室
装球室
装球室
装球室
M
M
S
S
M
M
M
M
A
A
234.89
234.89
46.43
46.43
Mpa
Mpa
0.24
0.24
M
M
S
S
M
M
M
M
A
A
231.60
231.60
46.43
46.43
Mpa
Mpa
0.22
0.22
M
M
S
S
M
M
M
M
A
A
-0.21
-0.21
46.43
46.43
Mpa
Mpa
-0.00
-0.00
M
M
M
M
M
M
A
A
0.02
0.02
Mpa
Mpa
-0.00
-0.00
高位油箱
M
M
M
M
M
M
至厂外排污沟
至厂外排污沟
低位油箱
M
M
M
M
Mpa
Mpa
0.22
0.22
Mpa
Mpa
0.22
0.22
Mpa
Mpa
0.22
0.22
47.06
47.06
44.51
44.51
44.45
44.45
47.19
47.19
47.44
47.44
-88.37
-88.37
37.82
37.82
38.20
38.20
32.77
32.77
32.77
32.77
32.00
32.00
32.00
32.00
Kpa
Kpa
-90.70
-90.70
B侧
B侧
A侧
A侧
循泵A
循泵A
循泵B
循泵B
循泵C
循泵C
辅助循泵D
辅助循泵D
Text is not SVG - cannot display
\ No newline at end of file +高背压凝汽器
收球网
收球网
收球网
收球网
低背压凝汽器
装球室
装球室
装球室
装球室
M
M
S
S
M
M
M
M
A
A
234.89
234.89
46.43
46.43
Mpa
Mpa
0.24
0.24
M
M
S
S
M
M
M
M
A
A
231.60
231.60
46.43
46.43
Mpa
Mpa
0.22
0.22
M
M
S
S
M
M
M
M
A
A
-0.21
-0.21
46.43
46.43
Mpa
Mpa
-0.00
-0.00
M
M
M
M
M
M
A
A
0.02
0.02
Mpa
Mpa
-0.00
-0.00
高位油箱
M
M
M
M
M
M
至厂外排污沟
至厂外排污沟
低位油箱
M
M
M
M
Mpa
Mpa
0.22
0.22
Mpa
Mpa
0.22
0.22
Mpa
Mpa
0.22
0.22
47.06
47.06
44.51
44.51
44.45
44.45
47.19
47.19
47.44
47.44
-88.37
-88.37
37.82
37.82
38.20
38.20
32.77
32.77
32.77
32.77
32.00
32.00
32.00
32.00
Kpa
Kpa
-90.70
-90.70
B侧
B侧
A侧
A侧
循泵A
循泵A
循泵B
循泵B
循泵C
循泵C
辅助循泵D
辅助循泵D
Text is not SVG - cannot display
\ No newline at end of file diff --git a/src/views/dashboard/demo/components/ParameterInfo.vue b/src/views/dashboard/demo/components/ParameterInfo.vue index cad2940..285d3b9 100644 --- a/src/views/dashboard/demo/components/ParameterInfo.vue +++ b/src/views/dashboard/demo/components/ParameterInfo.vue @@ -89,7 +89,6 @@ onBeforeUpdate(async () => { --> diff --git a/src/views/dashboard/demo/components/staticSvg.vue b/src/views/dashboard/demo/components/staticSvg.vue index f455fb0..b54644c 100644 --- a/src/views/dashboard/demo/components/staticSvg.vue +++ b/src/views/dashboard/demo/components/staticSvg.vue @@ -44,6 +44,6 @@ function fullScreen() { diff --git a/src/views/dashboard/demo/components/svg.vue b/src/views/dashboard/demo/components/svg.vue index d2d4f3f..21e2856 100644 --- a/src/views/dashboard/demo/components/svg.vue +++ b/src/views/dashboard/demo/components/svg.vue @@ -59,9 +59,9 @@ async function loadSvg() { // 等待DOM更新后应用实时数据 await nextTick() - document.querySelector('.svg-container > svg')?.removeAttribute('width') - document.querySelector('.svg-container > svg')?.removeAttribute('height') - + document.querySelector('.svg-container > svg')?.setAttribute('width', '100%') + document.querySelector('.svg-container > svg')?.setAttribute('height', '100%') + document.querySelector('.svg-container > svg')?.setAttribute('preserveAspectRatio', 'none') // updateRealtimeValues() } catch (error) { @@ -76,8 +76,10 @@ async function updateRealtimeValues() { return try { const svgElement = document.querySelector('.svg-container > svg') - svgElement?.removeAttribute('width') - svgElement?.removeAttribute('height') + svgElement?.setAttribute('width', '100%') + svgElement?.setAttribute('height', '100%') + svgElement?.setAttribute('preserveAspectRatio', 'none') + // 获取SVG元素 if (!svgElement) return @@ -212,9 +214,12 @@ defineExpose({