Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f3af0d32
authored
Mar 03, 2021
by
qiyeqing
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
首页自适应调整
1 parent
cd3121ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
13 deletions
linkwe-ui/src/utils/resize.js
linkwe-ui/src/views/index.vue
linkwe-ui/src/utils/resize.js
0 → 100644
View file @
f3af0d3
<
script
src
=
"node_modules/element-resize-detector/dist/element-resize-detector.min.js"
><
/script
>
var
elemt
=
elementResizeDetectorMaker
();
var
erdUltraFast
=
elementResizeDetectorMaker
({
strategy
:
"scroll"
});
elemt
.
listenTo
(
document
.
getElementById
(
"fatherbox"
),
function
(
element
)
{
var
width
=
element
.
offsetWidth
;
var
height
=
element
.
offsetHeight
;
console
.
log
(
"Size: "
+
width
+
"x"
+
height
);
});
\ No newline at end of file
\ No newline at end of file
linkwe-ui/src/views/index.vue
View file @
f3af0d3
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<div
class=
"index_l whitebg"
>
<div
class=
"index_l whitebg"
>
<div
class=
"box titlebox"
>
<div
class=
"box titlebox"
>
<p
class=
"adminname"
>
{{
getTimeState
()
}}
,Admin
</p>
<p
class=
"adminname"
>
{{
getTimeState
()
}}
,Admin
</p>
<p>
20230-2-2 123:3123:1232
</p>
<p>
{{
parseTime
(
nowTime
)
}}
</p>
</div>
</div>
<div
class=
"tables"
>
<div
class=
"tables"
>
<div
style=
"text-align:left"
>
<div
style=
"text-align:left"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-col
:span=
"24"
>
实时数据
</el-col>
<el-col
:span=
"24"
style=
"font-weight:bold"
>
实时数据
</el-col>
</el-row>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:20px"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:20px"
>
<el-col
:span=
"6"
>
企业成员总数
</el-col>
<el-col
:span=
"6"
>
企业成员总数
</el-col>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<div
class=
"dataall"
style=
"margin-top:20px"
>
<div
class=
"dataall"
style=
"margin-top:20px"
>
<div
style=
"text-align:left"
>
<div
style=
"text-align:left"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-col
:span=
"24"
>
实时数据
<span
class=
"fr fontgay"
>
更新于
{{
uptime
}}
</span></el-col>
<el-col
:span=
"24"
style=
"font-weight:bold"
>
实时数据
<span
class=
"fr fontgay"
>
更新于
{{
uptime
}}
</span></el-col>
</el-row>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
...
@@ -76,7 +76,9 @@
...
@@ -76,7 +76,9 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:20px"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:20px"
>
<div
id=
"main"
style=
"width: 100%;height: 500px;"
></div>
<div
id=
"fatherbox"
>
<div
id=
"main"
ref=
"views"
></div>
</div>
</el-row>
</el-row>
</div>
</div>
</div>
</div>
...
@@ -151,6 +153,10 @@
...
@@ -151,6 +153,10 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
var
elementResizeDetectorMaker
=
require
(
"element-resize-detector"
)
import
{
parseTime
}
from
'@/utils/common.js'
import
{
import
{
content
content
}
from
'@/api/content.js'
}
from
'@/api/content.js'
...
@@ -160,6 +166,7 @@
...
@@ -160,6 +166,7 @@
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
nowTime
:
new
Date
(),
car
:
[{
car
:
[{
name
:
'发起申请数'
,
name
:
'发起申请数'
,
url
:
'/'
url
:
'/'
...
@@ -186,7 +193,8 @@
...
@@ -186,7 +193,8 @@
uptime
:
'21321-21321:22'
,
uptime
:
'21321-21321:22'
,
timeType
:
'day'
,
timeType
:
'day'
,
charts
:
''
,
charts
:
''
,
opinionData
:
[
"3"
,
"2"
,
"4"
,
"4"
,
"5"
]
opinionData
:
[
"3"
,
"2"
,
"4"
,
"4"
,
"5"
],
charts
:
null
}
}
},
},
methods
:
{
methods
:
{
...
@@ -289,8 +297,12 @@
...
@@ -289,8 +297,12 @@
this
.
uptime
=
data
.
updateTime
;
this
.
uptime
=
data
.
updateTime
;
})
})
},
},
drawLine
(
id
)
{
drawLine
(
id
,
width
)
{
this
.
charts
=
echarts
.
init
(
document
.
getElementById
(
id
))
let
obj
=
document
.
getElementById
(
id
)
obj
.
style
.
width
=
width
?
`
${
width
}
px`
:
'100%'
;
obj
.
style
.
height
=
'500px'
;
this
.
charts
=
echarts
.
init
(
obj
)
this
.
charts
.
setOption
({
this
.
charts
.
setOption
({
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
trigger
:
'axis'
...
@@ -329,10 +341,20 @@
...
@@ -329,10 +341,20 @@
//调用
//调用
mounted
()
{
mounted
()
{
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
drawLine
(
'main'
)
this
.
drawLine
(
'main'
,
''
)
})
})
this
.
erchatInfo
()
this
.
erchatInfo
()
this
.
tableInfo
()
this
.
tableInfo
()
var
erd
=
elementResizeDetectorMaker
()
let
that
=
this
erd
.
listenTo
(
document
.
getElementById
(
"fatherbox"
),
function
(
element
)
{
var
width
=
element
.
offsetWidth
var
height
=
element
.
offsetHeight
that
.
$nextTick
(
function
()
{
console
.
log
(
this
.
$refs
[
'views'
])
this
.
drawLine
(
'main'
,
width
)
})
})
}
}
}
}
...
@@ -348,6 +370,9 @@
...
@@ -348,6 +370,9 @@
color
:
#999
;
color
:
#999
;
font-size
:
14px
;
font-size
:
14px
;
}
}
#fatherbox
{
width
:
100%
;
height
:
500px
;
overflow-y
:
scroll
;}
#main
{
width
:
100%
;
height
:
500px
;
}
.fr
{
.fr
{
float
:
right
;
float
:
right
;
}
}
...
@@ -418,21 +443,21 @@
...
@@ -418,21 +443,21 @@
.inedx_r_top
{
.inedx_r_top
{
width
:
100%
;
width
:
100%
;
background
:
#fff
;
background
:
#fff
;
height
:
2
4
0px
;
height
:
2
2
0px
;
border-radius
:
5px
;
border-radius
:
5px
;
.inedx_r_top_header
{
.inedx_r_top_header
{
height
:
1
8
0px
;
height
:
1
6
0px
;
width
:
100%
;
width
:
100%
;
color
:
#999
;
color
:
#999
;
}
}
.inedx_r_top_t
{
.inedx_r_top_t
{
height
:
1
2
0px
;
height
:
1
0
0px
;
width
:
100%
;
width
:
100%
;
line-height
:
1
2
0px
;
line-height
:
1
0
0px
;
padding
:
0
15px
;
padding
:
0
15px
;
font-size
:
2
6
px
;
font-size
:
2
1
px
;
color
:
#199ed8
;
color
:
#199ed8
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment