Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
海康威视
web-project
Commits
21d6ee04
Commit
21d6ee04
authored
Jul 28, 2024
by
moonby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
240728
parent
2c29b21d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
66 deletions
+81
-66
HeatUserPage.vue
src/views/HeatUserPage/HeatUserPage.vue
+41
-34
TapPage.vue
src/views/HeatUserPage/TapPage.vue
+40
-32
No files found.
src/views/HeatUserPage/HeatUserPage.vue
View file @
21d6ee04
...
...
@@ -2,17 +2,24 @@
<el-card
class=
"card-contianer"
:body-style=
"
{ 'padding': '0px 0px 0px 0px', 'height': '110px' }">
<div
class=
"div-header"
>
<el-row>
<el-col
:span=
"2"
>
<div
class=
"div-button"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
搜
索
</el-button>
</div>
<el-col
:span=
"4"
>
<div
class=
"div-button"
style=
"display: flex;"
>
<div
class=
"div-autoRefresh"
>
<el-switch
v-model=
"isHisData"
class=
"switch-autoRefresh"
active-text=
"历史数据"
inactive-text=
"实时数据"
style=
"--el-switch-on-color: #13ce66; --el-switch-off-color: rgb(64, 158, 255)"
@
change=
"changeData"
/>
</div>
</div>
</el-col>
<el-col
:span=
"
7
"
>
<el-col
:span=
"
9
"
>
<div
class=
"div-dropdown text-center"
>
<span>
小区名称
:
</span>
<el-cascader
:options=
"DataInfo.tree"
v-model=
"DataInfo.name"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width:
20
0px;"
/>
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width:
31
0px;"
/>
</div>
</el-col>
<el-col
:span=
"9"
>
...
...
@@ -32,27 +39,23 @@
</el-form-item>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"div-button"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"15"
>
<div
style=
"display: flex;"
>
<div
class=
"div-autoRefresh"
>
<el-switch
v-model=
"isHisData"
class=
"switch-autoRefresh"
active-text=
"历史数据"
inactive-text=
"实时数据"
style=
"--el-switch-on-color: #13ce66; --el-switch-off-color: rgb(64, 158, 255)"
@
change=
"changeData"
/>
</div>
</div>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
搜
索
</el-button>
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
</el-row>
</div>
</el-col>
...
...
@@ -261,6 +264,7 @@ var dateArr = [
date
.
getHours
(),
date
.
getMinutes
(),
date
.
getSeconds
(),
date
.
getMonth
()
-
1
];
for
(
var
i
=
0
;
i
<
dateArr
.
length
;
i
++
)
{
if
(
dateArr
[
i
]
>=
1
&&
dateArr
[
i
]
<=
9
)
{
...
...
@@ -277,12 +281,12 @@ if (day >= 1 && day <= 9) {
// var startTime = year + "-" + dateArr[0] + "-" + day + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
var
startTimeValue
=
sessionStorage
.
getItem
(
"DeviceQueryStart"
);
if
(
!
startTimeValue
){
startTimeValue
=
year
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
startTimeValue
=
(
year
-
1
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
startTimeValue
);
}
var
endTimeValue
=
sessionStorage
.
getItem
(
"DeviceQueryEnd"
);
if
(
!
endTimeValue
){
endTimeValue
=
(
year
+
1
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
endTimeValue
=
(
year
)
+
"-"
+
dateArr
[
5
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTimeValue
);
}
...
...
@@ -290,11 +294,11 @@ startTime.value = startTimeValue;
endTime
.
value
=
endTimeValue
;
console
.
log
(
endTime
)
const
props
=
{
emitPath
:
false
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
DataInfo
=
reactive
({
"enterpriseId"
:
enterpriseId
.
value
,
tree
:
[],
"name"
:
""
,
"name"
:
[]
,
"interval"
:
2
,
"sort"
:
""
,
"pageIndex"
:
0
,
...
...
@@ -409,7 +413,6 @@ async function initHis() {
tableInfo
.
hisData
.
length
=
0
;
await
getHisData
();
//设置总页数
total
.
value
=
tableInfo
.
hisData
.
length
;
var
list
=
[];
// console.log(tableInfo)
tableInfo
.
hisData
.
forEach
(
data
=>
{
...
...
@@ -436,13 +439,12 @@ async function getRealData() {
async
function
getHisData
()
{
loading
.
value
=
true
await
http
.
post
(
dataUrl
,
{
name
:
""
,
startTime
:
startTime
.
value
,
endTime
:
endTime
.
value
,
start
:
currentPage
.
value
-
1
,
count
:
pageSize
.
value
,
sort
:
""
}).
then
((
result
)
=>
{
await
http
.
post
(
dataUrl
,
{
name
:
[]
,
startTime
:
startTime
.
value
,
endTime
:
endTime
.
value
,
start
:
currentPage
.
value
-
1
,
count
:
pageSize
.
value
,
sort
:
""
}).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
//处理返回数据
// makeFormsTitle(result.data.title)
;
t
ableInfo
.
hisData
=
result
.
data
;
//处理返回数据
;
tableInfo
.
hisData
=
result
.
data
.
dataInfoList
;
t
otal
.
value
=
result
.
data
.
rowCount
;
setshowData
();
// makeFormsData(result.data.realData);
}
else
{
tableInfo
.
tableData
.
length
=
0
;
}
...
...
@@ -456,15 +458,15 @@ async function getHisDataByInfo(name, start, end, startPage, pagesCount, sort) {
await
http
.
post
(
dataUrl
,
{
name
:
name
,
startTime
:
start
,
endTime
:
end
,
start
:
startPage
,
count
:
pagesCount
,
sort
:
sort
}).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
//处理返回数据
// makeFormsTitle(result.data.title)
;
t
ableInfo
.
hisData
=
result
.
data
;
tableInfo
.
hisData
=
result
.
data
.
dataInfoList
;
t
otal
.
value
=
result
.
data
.
rowCount
;
setshowData
();
// makeFormsData(result.data.realData);
}
else
{
tableInfo
.
tableData
.
length
=
0
;
}
})
loading
.
value
=
false
total
.
value
=
tableInfo
.
tableData
.
length
;
}
function
setshowData
()
{
...
...
@@ -503,8 +505,13 @@ function SearchData() {
//实时数据,本地搜索
function
SearchRealData
()
{
var
data
=
tableInfo
.
realData
.
filter
((
current
,
index
)
=>
{
console
.
log
(
current
)
return
DataInfo
.
name
?
current
.
name
==
DataInfo
.
name
:
true
if
(
DataInfo
.
name
.
length
==
0
){
return
true
;
}
if
(
DataInfo
.
name
.
includes
(
current
.
name
)){
return
true
;
}
return
false
;
})
console
.
log
(
DataInfo
)
// console.log(data)
...
...
src/views/HeatUserPage/TapPage.vue
View file @
21d6ee04
...
...
@@ -2,17 +2,24 @@
<el-card
class=
"card-contianer"
:body-style=
"
{ 'padding': '0px 0px 0px 0px', 'height': '110px' }">
<div
class=
"div-header"
>
<el-row>
<el-col
:span=
"2"
>
<div
class=
"div-button"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
搜
索
</el-button>
</div>
<el-col
:span=
"4"
>
<div
class=
"div-button"
style=
"display: flex;"
>
<div
class=
"div-autoRefresh"
>
<el-switch
v-model=
"isHisData"
class=
"switch-autoRefresh"
active-text=
"历史数据"
inactive-text=
"实时数据"
style=
"--el-switch-on-color: #13ce66; --el-switch-off-color: rgb(64, 158, 255)"
@
change=
"changeData"
/>
</div>
</div>
</el-col>
<el-col
:span=
"
7
"
>
<el-col
:span=
"
9
"
>
<div
class=
"div-dropdown text-center"
>
<span>
小区名称
:
</span>
<el-cascader
:options=
"DataInfo.tree"
v-model=
"DataInfo.name"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width:
20
0px;"
/>
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width:
31
0px;"
/>
</div>
</el-col>
<el-col
:span=
"9"
>
...
...
@@ -32,27 +39,23 @@
</el-form-item>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"div-button"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"15"
>
<div
style=
"display: flex;"
>
<div
class=
"div-autoRefresh"
>
<el-switch
v-model=
"isHisData"
class=
"switch-autoRefresh"
active-text=
"历史数据"
inactive-text=
"实时数据"
style=
"--el-switch-on-color: #13ce66; --el-switch-off-color: rgb(64, 158, 255)"
@
change=
"changeData"
/>
</div>
</div>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
搜
索
</el-button>
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
</el-row>
</div>
</el-col>
...
...
@@ -277,12 +280,12 @@ if (day >= 1 && day <= 9) {
// var startTime = year + "-" + dateArr[0] + "-" + day + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
var
startTimeValue
=
sessionStorage
.
getItem
(
"DeviceQueryStart"
);
if
(
!
startTimeValue
){
startTimeValue
=
year
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
startTimeValue
=
(
year
-
1
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
startTimeValue
);
}
var
endTimeValue
=
sessionStorage
.
getItem
(
"DeviceQueryEnd"
);
if
(
!
endTimeValue
){
endTimeValue
=
(
year
+
1
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
endTimeValue
=
year
+
"-"
+
(
dateArr
[
0
]
-
1
)
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTimeValue
);
}
...
...
@@ -290,11 +293,11 @@ startTime.value = startTimeValue;
endTime
.
value
=
endTimeValue
;
console
.
log
(
endTime
)
const
props
=
{
emitPath
:
false
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
DataInfo
=
reactive
({
"enterpriseId"
:
enterpriseId
.
value
,
tree
:
[],
"name"
:
""
,
"name"
:
[]
,
"interval"
:
2
,
"sort"
:
""
,
"pageIndex"
:
0
,
...
...
@@ -412,7 +415,7 @@ async function initHis() {
tableInfo
.
hisData
.
length
=
0
;
await
getHisData
();
//设置总页数
total
.
value
=
tableInfo
.
hisData
.
length
;
var
list
=
[];
// console.log(tableInfo)
tableInfo
.
hisData
.
forEach
(
data
=>
{
...
...
@@ -439,13 +442,13 @@ async function getRealData() {
async
function
getHisData
()
{
loading
.
value
=
true
await
http
.
post
(
dataUrl
,
{
name
:
""
,
startTime
:
startTime
.
value
,
endTime
:
endTime
.
value
,
start
:
currentPage
.
value
-
1
,
count
:
pageSize
.
value
,
sort
:
""
}).
then
((
result
)
=>
{
await
http
.
post
(
dataUrl
,
{
name
:
[]
,
startTime
:
startTime
.
value
,
endTime
:
endTime
.
value
,
start
:
currentPage
.
value
-
1
,
count
:
pageSize
.
value
,
sort
:
""
}).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
//处理返回数据
// makeFormsTitle(result.data.title);
tableInfo
.
hisData
=
result
.
data
;
tableInfo
.
hisData
=
result
.
data
.
dataInfoList
;
total
.
value
=
result
.
data
.
rowCount
;
setshowData
();
// makeFormsData(result.data.realData);
}
else
{
tableInfo
.
tableData
.
length
=
0
;
}
...
...
@@ -460,7 +463,8 @@ async function getHisDataByInfo(name, start, end, startPage, pagesCount, sort) {
if
(
result
.
status
===
0
)
{
//处理返回数据
// makeFormsTitle(result.data.title);
tableInfo
.
hisData
=
result
.
data
;
tableInfo
.
hisData
=
result
.
data
.
dataInfoList
;
total
.
value
=
result
.
data
.
rowCount
;
setshowData
();
// makeFormsData(result.data.realData);
}
else
{
...
...
@@ -468,6 +472,7 @@ async function getHisDataByInfo(name, start, end, startPage, pagesCount, sort) {
}
})
loading
.
value
=
false
total
.
value
=
tableInfo
.
tableData
.
length
;
}
function
setshowData
()
{
...
...
@@ -505,11 +510,14 @@ function SearchData() {
//实时数据,本地搜索
function
SearchRealData
()
{
var
data
=
tableInfo
.
realData
.
filter
((
current
,
index
)
=>
{
console
.
log
(
current
)
return
DataInfo
.
name
?
current
.
name
==
DataInfo
.
name
:
true
if
(
DataInfo
.
name
.
length
==
0
){
return
true
;
}
if
(
DataInfo
.
name
.
includes
(
current
.
name
)){
return
true
;
}
return
false
;
})
console
.
log
(
DataInfo
)
// console.log(data)
setShowThisData
(
data
);
}
...
...
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