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
43550ee3
Commit
43550ee3
authored
Jul 29, 2024
by
moonby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
240729
parent
8e6b4d6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
106 deletions
+122
-106
HeatUserPage.vue
src/views/HeatUserPage/HeatUserPage.vue
+80
-64
TapPage.vue
src/views/HeatUserPage/TapPage.vue
+36
-41
VideoViewPage.vue
src/views/Video/VideoViewPage.vue
+6
-1
No files found.
src/views/HeatUserPage/HeatUserPage.vue
View file @
43550ee3
...
...
@@ -3,26 +3,26 @@
<div
class=
"div-header"
>
<el-row>
<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>
<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=
"
9
"
>
<el-col
:span=
"
7
"
>
<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:
31
0px;"
/>
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width:
28
0px;"
/>
</div>
</el-col>
<el-col
:span=
"
9
"
>
<el-col
:span=
"
11
"
>
<div
class=
"div-time-picker"
v-show=
"isHisData"
>
<el-form-item
label=
"开始时间:"
style=
"margin-right: 20px;"
>
<el-config-provider
:locale=
"zhCn"
>
...
...
@@ -42,15 +42,13 @@
<el-col
:span=
"2"
>
<div
class=
"div-button"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"15"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
搜
索
</el-button>
<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>
...
...
@@ -77,9 +75,9 @@
<el-table
v-show=
"isHisData"
:data=
"tableInfo.tableData"
:height=
"tableHeight"
v-loading=
"loading"
:cell-style=
"setCellStyle"
border
highlight-current-row
:header-cell-style=
"setHeaderCellStyle"
:header-cell-class-name=
"handleHeadAddClass"
@
sort-change=
"sortMethod"
>
:header-cell-class-name=
"handleHeadAddClass"
@
sort-change=
"sortMethod"
>
<el-table-column
v-for=
"(item, i) in tableInfo.title.frozenList"
:prop=
"item.field"
:label=
"item.title"
:width=
"item.width"
fixed
sortable
/>
:width=
"item.width"
fixed
sortable
/>
<
template
v-for=
"(item, i) in tableInfo.title.otherList"
>
<el-table-column
:prop=
"item.enName"
:label=
"item.alias"
:width=
"item.width"
>
</el-table-column>
...
...
@@ -259,35 +257,35 @@ var date = new Date();
var
year
=
date
.
getFullYear
();
var
day
=
0
;
var
dateArr
=
[
date
.
getMonth
()
+
1
,
//月份从0~11,所以加一
date
.
getDate
()
-
1
,
date
.
getHours
(),
date
.
getMinutes
(),
date
.
getSeconds
(),
date
.
getDate
()
date
.
getMonth
()
+
1
,
//月份从0~11,所以加一
date
.
getDate
()
-
1
,
date
.
getHours
(),
date
.
getMinutes
(),
date
.
getSeconds
(),
date
.
getDate
()
];
for
(
var
i
=
0
;
i
<
dateArr
.
length
;
i
++
)
{
if
(
dateArr
[
i
]
>=
1
&&
dateArr
[
i
]
<=
9
)
{
dateArr
[
i
]
=
"0"
+
dateArr
[
i
];
}
if
(
dateArr
[
i
]
>=
1
&&
dateArr
[
i
]
<=
9
)
{
dateArr
[
i
]
=
"0"
+
dateArr
[
i
];
}
}
day
=
dateArr
[
1
]
-
1
;
if
(
day
>=
1
&&
day
<=
9
)
{
day
=
"0"
+
day
;
day
=
"0"
+
day
;
}
// var endTime = year + "-" + dateArr[0] + "-" + dateArr[1] + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
// 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
];
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
startTimeValue
);
if
(
!
startTimeValue
)
{
startTimeValue
=
(
year
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
startTimeValue
);
}
var
endTimeValue
=
sessionStorage
.
getItem
(
"DeviceQueryEnd"
);
if
(
!
endTimeValue
)
{
endTimeValue
=
(
year
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
5
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTimeValue
);
if
(
!
endTimeValue
)
{
endTimeValue
=
(
year
)
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
5
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTimeValue
);
}
startTime
.
value
=
startTimeValue
;
...
...
@@ -295,14 +293,14 @@ endTime.value = endTimeValue;
console
.
log
(
endTime
)
function
changeStartTime
(){
function
changeStartTime
()
{
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
startTime
.
value
);
}
function
changeEndTime
(){
function
changeEndTime
()
{
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTime
.
value
);
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
DataInfo
=
reactive
({
"enterpriseId"
:
enterpriseId
.
value
,
tree
:
[],
...
...
@@ -332,6 +330,21 @@ var tableInfo = reactive({
const
loading
=
ref
(
false
);
const
value
=
ref
(
true
);
//日期转换字符串
function
formatDate
(
date
)
{
let
year
=
date
.
getFullYear
();
let
month
=
twoDigits
(
date
.
getMonth
()
+
1
);
// 月份是从0开始的
let
day
=
twoDigits
(
date
.
getDate
());
let
hour
=
twoDigits
(
date
.
getHours
());
let
minute
=
twoDigits
(
date
.
getMinutes
());
let
second
=
twoDigits
(
date
.
getSeconds
());
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hour
}
:
${
minute
}
:
${
second
}
`
;
}
function
twoDigits
(
value
)
{
return
value
<
10
?
'0'
+
value
:
value
;
}
//数据控制,根据isHisData的值决定数据控制逻辑,false为实时数据,true为历史数据
...
...
@@ -391,8 +404,9 @@ function init() {
}
//数据切换
function
changeData
()
{
async
function
changeData
()
{
init
();
getName
();
}
//实时数据初始化
...
...
@@ -403,15 +417,6 @@ async function initReal() {
await
getRealData
();
//设置总页数
total
.
value
=
tableInfo
.
realData
.
length
;
var
list
=
[];
tableInfo
.
realData
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
// console.log(list);
setSelect
(
list2
)
}
//历史数据初始化
async
function
initHis
()
{
...
...
@@ -420,14 +425,6 @@ async function initHis() {
tableInfo
.
tableData
.
length
=
0
;
tableInfo
.
hisData
.
length
=
0
;
await
getHisData
();
//设置总页数
var
list
=
[];
// console.log(tableInfo)
tableInfo
.
hisData
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
setSelect
(
list2
)
}
//获得数据
...
...
@@ -460,6 +457,25 @@ async function getHisData() {
loading
.
value
=
false
}
//获得小区数据
async
function
getName
()
{
loading
.
value
=
true
await
http
.
post
(
'/api/tiger/TigerHeatUser/GetName'
).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
//处理返回数据
var
list
=
[];
result
.
data
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
setSelect
(
list2
)
}
else
{
// tableInfo.tableData.length = 0;
}
})
loading
.
value
=
false
}
//根据参数获得数据
async
function
getHisDataByInfo
(
name
,
start
,
end
,
startPage
,
pagesCount
,
sort
)
{
loading
.
value
=
true
...
...
@@ -492,14 +508,14 @@ function setShowThisData(data) {
//设置搜索栏可选择项
function
setSelect
(
list
)
{
DataInfo
.
tree
.
length
=
0
;
DataInfo
.
name
.
length
=
0
;
DataInfo
.
name
.
length
=
0
;
list
.
forEach
(
area
=>
{
DataInfo
.
tree
.
push
({
value
:
area
,
label
:
area
})
})
if
(
DataInfo
.
tree
.
length
>
0
)
{
if
(
DataInfo
.
tree
.
length
>
0
)
{
DataInfo
.
name
.
push
(
DataInfo
.
tree
[
0
].
value
);
}
}
...
...
@@ -517,10 +533,10 @@ function SearchData() {
//实时数据,本地搜索
function
SearchRealData
()
{
var
data
=
tableInfo
.
realData
.
filter
((
current
,
index
)
=>
{
if
(
DataInfo
.
name
.
length
==
0
)
{
if
(
DataInfo
.
name
.
length
==
0
)
{
return
true
;
}
if
(
DataInfo
.
name
.
includes
(
current
.
name
))
{
if
(
DataInfo
.
name
.
includes
(
current
.
name
))
{
return
true
;
}
return
false
;
...
...
src/views/HeatUserPage/TapPage.vue
View file @
43550ee3
...
...
@@ -15,14 +15,15 @@
</el-col>
<el-col
:span=
"
9
"
>
<el-col
:span=
"
7
"
>
<div
class=
"div-dropdown text-center"
>
<
span>
小区名称
:
</span
>
<
el-form-item
label=
"小区名称:"
>
<el-cascader
:options=
"DataInfo.tree"
v-model=
"DataInfo.name"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width: 310px;"
/>
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width: 280px;"
/>
</el-form-item>
</div>
</el-col>
<el-col
:span=
"
9
"
>
<el-col
:span=
"
11
"
>
<div
class=
"div-time-picker"
v-show=
"isHisData"
>
<el-form-item
label=
"开始时间:"
style=
"margin-right: 20px;"
>
<el-config-provider
:locale=
"zhCn"
>
...
...
@@ -42,10 +43,6 @@
<el-col
:span=
"2"
>
<div
class=
"div-button"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"15"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"SearchData"
icon=
"Search"
>
...
...
@@ -53,6 +50,8 @@
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"3"
>
</el-col>
...
...
@@ -193,18 +192,15 @@
}
.div-dropdown {
//display: flex;
padding-top: 7px;
height: 50px;
padding-left: 10px;
.el-dropdown-link {
margin-top: 5px;
color: white;
}
height: 50px;
padding-left: 10px;
.el-dropdown-link {
margin-top: 5px;
color: white;
}
}
...
...
@@ -389,12 +385,12 @@ function init() {
}
else
{
initReal
();
}
// setSelect();
}
//数据切换
function
changeData
()
{
async
function
changeData
()
{
init
();
getName
();
}
//实时数据初始化
...
...
@@ -403,17 +399,6 @@ async function initReal() {
tableInfo
.
tableData
.
length
=
0
;
tableInfo
.
realData
.
length
=
0
;
await
getRealData
();
//设置总页数
total
.
value
=
tableInfo
.
realData
.
length
;
var
list
=
[];
tableInfo
.
realData
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
// console.log(list);
setSelect
(
list2
)
}
//历史数据初始化
async
function
initHis
()
{
...
...
@@ -422,15 +407,6 @@ async function initHis() {
tableInfo
.
tableData
.
length
=
0
;
tableInfo
.
hisData
.
length
=
0
;
await
getHisData
();
//设置总页数
var
list
=
[];
// console.log(tableInfo)
tableInfo
.
hisData
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
setSelect
(
list2
)
}
//获得数据
...
...
@@ -464,6 +440,25 @@ async function getHisData() {
loading
.
value
=
false
}
//获得小区数据
async
function
getName
()
{
loading
.
value
=
true
await
http
.
post
(
'/api/tiger/TigerHeatUser/GetName'
).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
//处理返回数据
var
list
=
[];
result
.
data
.
forEach
(
data
=>
{
list
.
push
(
data
.
name
);
})
var
list2
=
[...
new
Set
(
list
)];
setSelect
(
list2
)
}
else
{
// tableInfo.tableData.length = 0;
}
})
loading
.
value
=
false
}
//根据参数获得数据
async
function
getHisDataByInfo
(
name
,
start
,
end
,
startPage
,
pagesCount
,
sort
)
{
loading
.
value
=
true
...
...
src/views/Video/VideoViewPage.vue
View file @
43550ee3
...
...
@@ -205,6 +205,12 @@ function getVideoInfo() {
function
initPage
()
{
getVideoInfo
();
//视频信息
getStats
();
//下拉列表
if
(
route
.
query
.
id
){
//设置选择框
VideoInfo
.
value
=
route
.
query
.
id
;
//播放视频
getVideoFromVideoList
(
route
.
query
.
id
);
}
}
//从视频列表中找到当前被选中的换热站对应的所有视频id
...
...
@@ -217,7 +223,6 @@ function getVideoFromVideoList(Id) {
VideoInfo
.
playVideoList
.
push
(
videoId
);
}
})
console
.
log
(
VideoInfo
);
if
(
oWebControl
)
{
playVideoByVideoList
(
VideoInfo
.
playVideoList
)
}
...
...
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