Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuIncubator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kimber
GaoQuIncubator
Commits
f94c4c3f
Commit
f94c4c3f
authored
Nov 01, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dp地址
parent
cd6c01a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
102 deletions
+27
-102
index.vue
src/views/Screen/index.vue
+27
-102
No files found.
src/views/Screen/index.vue
View file @
f94c4c3f
...
...
@@ -108,26 +108,26 @@ import cuAmap from "@/components/AMap";
import
request
from
"
@/utils/request
"
;
//
let resizeTimeout;
//
window.addEventListener('resize', function() {
//
clearTimeout(resizeTimeout);
//
resizeTimeout = setTimeout(function() {
//
location.reload();
//
// 执行响应逻辑
//
}, 200); // 200毫秒后执行
//
});
let
resizeTimeout
;
window
.
addEventListener
(
'
resize
'
,
function
()
{
clearTimeout
(
resizeTimeout
);
resizeTimeout
=
setTimeout
(
function
()
{
location
.
reload
();
// 执行响应逻辑
},
200
);
// 200毫秒后执行
});
//
function getPxByRem(remValue){// 传入要转换的 rem 值
//
//
获取 html 元素
//
const htmlElement = document.documentElement;
function
getPxByRem
(
remValue
){
// 传入要转换的 rem 值
// 获取 html 元素
const
htmlElement
=
document
.
documentElement
;
//
//
获取 html 元素的 font-size
//
const fontSize = parseFloat(getComputedStyle(htmlElement).fontSize);
// 获取 html 元素的 font-size
const
fontSize
=
parseFloat
(
getComputedStyle
(
htmlElement
).
fontSize
);
//
//
将 rem 转换为 px
//
let pxValue = remValue * fontSize;
//
return pxValue
//
}
// 将 rem 转换为 px
let
pxValue
=
remValue
*
fontSize
;
return
pxValue
}
export
default
{
...
...
@@ -294,11 +294,12 @@ export default {
chartConfig
:
{
chart
:
{
type
:
"
bar
"
,
marginTop
:
20
,
marginTop
:
getPxByRem
(
0.15
)
,
// marginBottom: 10,
// bottom:10,
// left:40,
marginRight
:
30
,
marginBottom
:
getPxByRem
(
0.45
),
marginRight
:
getPxByRem
(
0.3
),
},
xAxis
:
{
type
:
"
category
"
,
...
...
@@ -749,82 +750,6 @@ export default {
method
:
"
get
"
,
}).
then
((
res
)
=>
{
let
list
=
res
.
body
||
[];
list
=
{
names
:
[
{
name
:
"
上缴税费
"
,
key
:
"
num
"
,
},
],
list
:
[
{
date
:
"
2021年
"
,
values
:
{
num
:
100
,
},
},
{
date
:
"
2023年
"
,
values
:
{
num
:
41
,
},
},
{
date
:
"
2024年
"
,
values
:
{
num
:
533
,
},
},
{
date
:
"
2025年
"
,
values
:
{
num
:
303
,
},
},
{
date
:
"
2026年
"
,
values
:
{
num
:
306
,
},
},
{
date
:
"
2027年
"
,
values
:
{
num
:
309
,
},
},
{
date
:
"
2028年
"
,
values
:
{
num
:
312
,
},
},
{
date
:
"
2029年
"
,
values
:
{
num
:
315
,
},
},
{
date
:
"
2030年
"
,
values
:
{
num
:
318
,
},
},
{
date
:
"
2031年
"
,
values
:
{
num
:
321
,
},
},
{
date
:
"
2032年
"
,
values
:
{
num
:
324
,
},
},
],
};
var
chartData
=
Highchart
.
seriesDataFormat
(
list
,
{
datekey
:
"
date
"
,
dataReverse
:
true
,
...
...
@@ -834,10 +759,10 @@ export default {
var
opts
=
{
chartConfig
:
{
chart
:
{
marginTop
:
40
,
marginLeft
:
50
,
marginBottom
:
45
,
marginRight
:
20
,
marginTop
:
getPxByRem
(
0.4
)
,
marginLeft
:
getPxByRem
(
0.5
),
//
50,
marginBottom
:
getPxByRem
(
0.45
)
,
marginRight
:
getPxByRem
(
0.2
)
,
},
xAxis
:
{
lineWidth
:
1
,
// 设置 Y 轴坐标轴线宽度
...
...
@@ -858,7 +783,7 @@ export default {
// tickLength: 0, // 不显示刻度线
gridLineWidth
:
0
,
// 也可以设置不显示网格线
title
:
{
text
:
"
(万元)
"
,
text
:
"
万元
"
,
margin
:
0
,
style
:
{
color
:
"
#eee
"
,
...
...
@@ -866,8 +791,8 @@ export default {
},
rotation
:
0
,
align
:
"
high
"
,
y
:
-
15
,
x
:
45
,
y
:
getPxByRem
(
-
0.15
)
,
x
:
getPxByRem
(
0.4
)
,
},
labels
:
{
style
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment