Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
葛齐林
energyai_vue
Commits
d8bea079
Commit
d8bea079
authored
Apr 14, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
44a8df15
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
51 deletions
+77
-51
index.vue
src/pages/analysis/indoor/index.vue
+32
-23
index.vue
src/pages/analysis/outdoor/index.vue
+42
-27
history.vue
src/pages/kb/indoor/history.vue
+1
-0
index.vue
src/pages/kb/indoor/index.vue
+1
-0
index.vue
src/pages/kb/outdoor/index.vue
+1
-1
No files found.
src/pages/analysis/indoor/index.vue
View file @
d8bea079
...
...
@@ -14,14 +14,14 @@ card-warp(title="室内气象分析", height="45px", showBackground)
el-button(
size="mini",
type="primary",
@click="handleDate(i
ndex
)",
@click="handleDate(i
tem.id
)",
v-for="(item, index) in typeList",
:key="index",
:class="[i
ndex
== currentActive ? 'isActive' : '']"
:class="[i
tem.id
== currentActive ? 'isActive' : '']"
)
{{
item
.
name
}}
.echartsWarp(width="100%", flex)
div(v-for='item in chartList' :key='item.id')
chart(:id="item.id", :data="data", :title="item.title", :color="item.color")
chart(:id="item.id", :data="
item.
data", :title="item.title", :color="item.color")
</
template
>
<
script
>
...
...
@@ -34,25 +34,17 @@ export default {
return
{
activeName
:
'1'
,
typeList
:
[
{
name
:
'当日'
},
{
name
:
'本周'
},
{
name
:
'当月'
},
{
name
:
'今年'
}
],
currentActive
:
'0'
,
data
:
[
[
'2019-8-14 8:00:00'
,
70
],
[
'2019-8-14 8:00:01'
,
60
],
[
'2019-8-14 8:00:02'
,
30
],
[
'2019-8-14 8:00:03'
,
79
],
[
'2019-8-14 8:00:06'
,
10
],
[
'2019-8-14 8:00:20'
,
31
]
{
name
:
'当日'
,
id
:
1
},
{
name
:
'本周'
,
id
:
2
},
{
name
:
'当月'
,
id
:
3
},
{
name
:
'今年'
,
id
:
4
}
],
currentActive
:
1
,
chartList
:
[
{
id
:
'11'
,
title
:
'温度'
,
color
:
'#21ACFC'
},
{
id
:
'22'
,
title
:
'湿度'
,
color
:
'#36CBCB'
},
{
id
:
'
55'
,
title
:
'CO2'
,
color
:
'#4ECB74'
},
{
id
:
'
77'
,
title
:
'故障报警'
,
color
:
'#975FE4'
}
{
id
:
'11'
,
title
:
'温度'
,
color
:
'#21ACFC'
,
data
:
[]
},
{
id
:
'22'
,
title
:
'湿度'
,
color
:
'#36CBCB'
,
data
:
[]
},
{
id
:
'
33'
,
title
:
'CO2'
,
color
:
'#4ECB74'
,
data
:
[]
},
{
id
:
'
44'
,
title
:
'故障报警'
,
color
:
'#975FE4'
,
data
:
[]
}
]
}
},
...
...
@@ -60,7 +52,24 @@ export default {
tabClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
)
},
getDataList
()
{},
getDataList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/analysis/getSnqxzInfoTj'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
region
:
Number
(
this
.
activeName
),
//区域类型
type
:
this
.
currentActive
})
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
// console.log('数据', data)
this
.
chartList
[
0
].
data
=
data
.
temperatureList
this
.
chartList
[
1
].
data
=
data
.
humidityList
this
.
chartList
[
2
].
data
=
data
.
carbonDioxideList
this
.
chartList
[
3
].
data
=
data
.
carbonDioxideList
}
})
},
// 当日 ,本周
handleDate
(
i
)
{
this
.
currentActive
=
i
...
...
@@ -113,7 +122,7 @@ export default {
color
:
#000000
;
line-height
:
40px
;
&
:
:
before
{
content
:
""
;
content
:
''
;
display
:
inline-block
;
width
:
10px
;
height
:
10px
;
...
...
src/pages/analysis/outdoor/index.vue
View file @
d8bea079
...
...
@@ -11,16 +11,14 @@ card-warp(title="室外气象分析", height="45px", showBackground)
el-button(
size="mini",
type="primary",
@click="handleDate(i
ndex
)",
@click="handleDate(i
tem.id
)",
v-for="(item, index) in typeList",
:key="index",
:class="[i
ndex
== currentActive ? 'isActive' : '']"
:class="[i
tem.id
== currentActive ? 'isActive' : '']"
)
{{
item
.
name
}}
.echartsWarp(width="100%", flex)
div(v-for='item in chartList' :key='item.id')
chart(:id="item.id", :data="data", :title="item.title", :color="item.color")
div
pie
chart(:id="item.id", :data="item.data", :title="item.title", :color="item.color")
</
template
>
<
script
>
...
...
@@ -34,37 +32,54 @@ export default {
data
()
{
return
{
chartList
:
[
{
id
:
'11'
,
title
:
'温度'
,
color
:
'#21ACFC'
},
{
id
:
'22'
,
title
:
'湿度'
,
color
:
'#36CBCB'
},
{
id
:
'33'
,
title
:
'风速'
,
color
:
'#3AA0FF'
},
{
id
:
'44'
,
title
:
'光照'
,
color
:
'#FAD337'
},
{
id
:
'55'
,
title
:
'CO2'
,
color
:
'#4ECB74'
},
{
id
:
'66'
,
title
:
'PM2.5'
,
color
:
'#999999'
},
{
id
:
'77'
,
title
:
'辐射'
,
color
:
'#975FE4'
}
],
data
:
[
[
'2019-8-14 8:00:00'
,
70
],
[
'2019-8-14 8:00:01'
,
60
],
[
'2019-8-14 8:00:02'
,
30
],
[
'2019-8-14 8:00:03'
,
79
],
[
'2019-8-14 8:00:06'
,
10
],
[
'2019-8-14 8:00:20'
,
31
]
{
id
:
'11'
,
title
:
'温度'
,
color
:
'#21ACFC'
,
data
:
[]
},
{
id
:
'22'
,
title
:
'湿度'
,
color
:
'#36CBCB'
,
data
:
[]
},
{
id
:
'33'
,
title
:
'风速'
,
color
:
'#3AA0FF'
,
data
:
[]
},
{
id
:
'44'
,
title
:
'光照'
,
color
:
'#FAD337'
,
data
:
[]
},
{
id
:
'55'
,
title
:
'CO2'
,
color
:
'#4ECB74'
,
data
:
[]
},
{
id
:
'66'
,
title
:
'PM2.5'
,
color
:
'#999999'
,
data
:
[]
},
{
id
:
'77'
,
title
:
'辐射'
,
color
:
'#975FE4'
,
data
:
[]
},
{
id
:
'88'
,
title
:
'故障报警数'
,
color
:
'#F2637B'
,
data
:
[]
}
],
typeList
:
[
{
name
:
'当日'
},
{
name
:
'本周'
},
{
name
:
'当月'
},
{
name
:
'今年'
}
{
name
:
'当日'
,
id
:
1
},
{
name
:
'本周'
,
id
:
2
},
{
name
:
'当月'
,
id
:
3
},
{
name
:
'今年'
,
id
:
4
}
],
currentActive
:
'0'
,
currentActive
:
1
,
name
:
'室外气象站'
}
},
created
()
{
this
.
getDataList
()
},
methods
:
{
getDataList
()
{},
getDataList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/analysis/getSwqxzInfoTj'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
type
:
this
.
currentActive
})
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
// console.log('数据', data)
this
.
chartList
[
0
].
data
=
data
.
temperatureList
this
.
chartList
[
1
].
data
=
data
.
humidityList
this
.
chartList
[
2
].
data
=
data
.
windSpeedList
this
.
chartList
[
3
].
data
=
data
.
illuminanceList
this
.
chartList
[
4
].
data
=
data
.
carbonDioxideList
this
.
chartList
[
5
].
data
=
data
.
fineParticlesList
this
.
chartList
[
6
].
data
=
data
.
radiationList
this
.
chartList
[
7
].
data
=
data
.
radiationList
}
})
},
// 当日 ,本周
handleDate
(
i
)
{
this
.
currentActive
=
i
this
.
getDataList
()
}
}
}
...
...
@@ -89,7 +104,7 @@ export default {
color
:
#000000
;
line-height
:
40px
;
&
:
:
before
{
content
:
""
;
content
:
''
;
display
:
inline-block
;
width
:
10px
;
height
:
10px
;
...
...
src/pages/kb/indoor/history.vue
View file @
d8bea079
...
...
@@ -51,6 +51,7 @@ export default {
currentActive
:
1
,
type
:
null
,
pageSize
:
10
,
pageIndex
:
1
,
totalPage
:
0
,
visible
:
false
,
dataForm
:
{
...
...
src/pages/kb/indoor/index.vue
View file @
d8bea079
...
...
@@ -138,6 +138,7 @@ export default {
dataList
:
[{
id
:
1
}],
dataListLoading
:
false
,
pageSize
:
10
,
pageIndex
:
1
,
totalPage
:
0
}
},
...
...
src/pages/kb/outdoor/index.vue
View file @
d8bea079
...
...
@@ -229,7 +229,7 @@ export default {
},
getDataListTb
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/
kanban
/getSwqxzInfoTj'
),
url
:
this
.
$http
.
adornUrl
(
'/
analysis
/getSwqxzInfoTj'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
type
:
this
.
type
...
...
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