Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
video-monitoring
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
刘怀志
video-monitoring
Commits
12101ec5
Commit
12101ec5
authored
Aug 03, 2024
by
69237
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu 序号凑合用了QAQ
parent
4e9dc9ee
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
175 deletions
+128
-175
index.vue
src/components/TopNav/index.vue
+60
-143
index.vue
src/views/history/index.vue
+68
-32
No files found.
src/components/TopNav/index.vue
View file @
12101ec5
This diff is collapsed.
Click to expand it.
src/views/history/index.vue
View file @
12101ec5
...
@@ -35,12 +35,16 @@
...
@@ -35,12 +35,16 @@
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
prop=
"monitoringName"
>
<el-form-item
prop=
"monitoringName"
>
<el-
inpu
t
<el-
selec
t
v-model
.
trim
=
"queryParams.monitoringName"
v-model=
"queryParams.monitoringName"
placeholder=
"请输入监控点名称"
placeholder=
"请输入监控点名称"
clearable
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
/>
<el-option
value=
"01"
>
Camera 01
</el-option>
<el-option
value=
"02"
>
Camera 02
</el-option>
<el-option
value=
"03"
>
Camera 03
</el-option>
<el-option
value=
"04"
>
Camera 04
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"monitorState"
>
<el-form-item
prop=
"monitorState"
>
...
@@ -58,11 +62,8 @@
...
@@ -58,11 +62,8 @@
<el-date-picker
<el-date-picker
placeholder=
"请选择监控时间"
placeholder=
"请选择监控时间"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
v-model=
"queryParams.monitorTime"
v-model=
"queryParams.monitoringStarttime"
type=
"datetimerange"
type=
"date"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
>
</el-date-picker>
</el-date-picker>
<!--
<el-date-picker
clearable--
>
<!--
<el-date-picker
clearable--
>
...
@@ -103,7 +104,12 @@
...
@@ -103,7 +104,12 @@
style=
"min-height: 650px"
style=
"min-height: 650px"
>
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
width=
"100"
prop=
"id"
/>
<el-table-column
label=
"序号"
align=
"center"
width=
"100"
>
<template
slot-scope=
"scope"
>
<span>
{{
calculateIndex
(
scope
.
$index
)
}}
</span>
</
template
>
</el-table-column>
<!-- <template slot-scope="scope">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ (scope.$index+1)+(queryParams.pageNum-1)*queryParams.pageSize }}</span>-->
<!-- <span>{{ (scope.$index+1)+(queryParams.pageNum-1)*queryParams.pageSize }}</span>-->
<!-- </template>-->
<!-- </template>-->
...
@@ -198,6 +204,10 @@
...
@@ -198,6 +204,10 @@
:
total
=
"total"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
:
limit
.
sync
=
"queryParams.pageSize"
:
current
-
page
.
sync
=
"currentPage"
:
page
-
size
=
"pageSize"
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
@
pagination
=
"getList"
@
pagination
=
"getList"
/>
/>
...
@@ -234,7 +244,6 @@ export default {
...
@@ -234,7 +244,6 @@ export default {
dicts
:
[
"history_state"
],
dicts
:
[
"history_state"
],
data
()
{
data
()
{
return
{
return
{
backTag
:
true
,
carryRowCode
:
{
carryRowCode
:
{
id
:
""
,
id
:
""
,
monitoringName
:
""
,
monitoringName
:
""
,
...
@@ -257,6 +266,9 @@ export default {
...
@@ -257,6 +266,9 @@ export default {
total
:
0
,
total
:
0
,
// history表格数据
// history表格数据
histableList
:
[],
histableList
:
[],
currentPage
:
1
,
pageSize
:
10
,
currentPageData
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
...
@@ -265,10 +277,10 @@ export default {
...
@@ -265,10 +277,10 @@ export default {
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
monitoringName
:
null
,
monitoringName
:
undefined
,
monitorTime
:
null
,
monitorTime
:
undefined
,
monitorState
:
null
,
monitorState
:
undefined
,
id
:
null
,
id
:
undefined
,
}
,
}
,
// 表单参数
// 表单参数
form
:
{
}
,
form
:
{
}
,
...
@@ -278,8 +290,43 @@ export default {
...
@@ -278,8 +290,43 @@ export default {
}
,
}
,
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
updateCurrentPageData
();
}
,
computed
:
{
startIndexOfPage
()
{
return
(
this
.
currentPage
-
1
)
*
this
.
total
;
}
,
}
,
}
,
methods
:
{
methods
:
{
handleSizeChange
(
val
)
{
this
.
total
=
val
;
this
.
updateCurrentPageData
();
}
,
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
updateCurrentPageData
();
}
,
updateCurrentPageData
()
{
const
startIndex
=
(
this
.
currentPage
-
1
)
*
this
.
total
;
const
endIndex
=
startIndex
+
this
.
total
;
this
.
currentPageData
=
this
.
histableList
.
slice
(
startIndex
,
endIndex
);
}
,
calculateIndex
(
index
)
{
return
this
.
startIndexOfPage
+
index
+
1
;
}
,
prevPage
()
{
if
(
this
.
currentPage
>
1
)
{
this
.
currentPage
--
;
}
}
,
nextPage
()
{
const
maxPage
=
Math
.
ceil
(
this
.
items
.
length
/
this
.
total
);
if
(
this
.
currentPage
<
maxPage
)
{
this
.
currentPage
++
;
}
}
,
formatHoursAsHMS
(
hours
)
{
formatHoursAsHMS
(
hours
)
{
// 确保小时数为整数
// 确保小时数为整数
const
intHours
=
Math
.
floor
(
hours
);
const
intHours
=
Math
.
floor
(
hours
);
...
@@ -308,17 +355,12 @@ export default {
...
@@ -308,17 +355,12 @@ export default {
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
ID
:
null
,
ID
:
undefined
,
monitoringName
:
null
,
monitoringName
:
undefined
,
monitoringStarttime
:
null
,
monitoringStarttime
:
undefined
,
monitoringFinallytime
:
null
,
monitoringFinallytime
:
undefined
,
monitorTime
:
null
,
monitorTime
:
undefined
,
monitorState
:
null
,
monitorState
:
undefined
,
CREATETIME
:
null
,
CREATEBY
:
null
,
UPDATETIME
:
null
,
UPDATEBY
:
null
,
delFlag
:
null
,
}
;
}
;
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
}
,
}
,
...
@@ -346,12 +388,6 @@ export default {
...
@@ -346,12 +388,6 @@ export default {
}
,
}
,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
$router
.
push
({
name
:
"back"
,
query
:
{
backTag
:
true
,
}
,
}
);
this
.
carryRowCode
=
row
;
this
.
carryRowCode
=
row
;
// 查看详情页面(把id换成code)
// 查看详情页面(把id换成code)
this
.
$router
.
push
({
this
.
$router
.
push
({
...
...
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