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
2d882c49
Commit
2d882c49
authored
Jul 29, 2024
by
拾柒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面布局,添加历史记录页面
parent
88afe44f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
300 additions
and
4 deletions
+300
-4
histable.js
src/api/system/histable.js
+44
-0
index.js
src/router/index.js
+17
-3
index.vue
src/views/history/index.vue
+235
-0
index.vue
src/views/index.vue
+4
-1
No files found.
src/api/system/histable.js
0 → 100644
View file @
2d882c49
import
request
from
'@/utils/request'
// 查询www列表
export
function
listHistable
(
query
)
{
return
request
({
url
:
'/system/histable/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询www详细
export
function
getHistable
(
ID
)
{
return
request
({
url
:
'/system/histable/'
+
ID
,
method
:
'get'
})
}
// 新增www
export
function
addHistable
(
data
)
{
return
request
({
url
:
'/system/histable'
,
method
:
'post'
,
data
:
data
})
}
// 修改www
export
function
updateHistable
(
data
)
{
return
request
({
url
:
'/system/histable'
,
method
:
'put'
,
data
:
data
})
}
// 删除www
export
function
delHistable
(
ID
)
{
return
request
({
url
:
'/system/histable/'
+
ID
,
method
:
'delete'
})
}
src/router/index.js
View file @
2d882c49
...
...
@@ -106,15 +106,29 @@ export const constantRoutes = [
path
:
'/monitoringPlayback'
,
component
:
Layout
,
hidden
:
false
,
redirect
:
'
noredirect
'
,
redirect
:
'
monitoringPlayback/playback
'
,
children
:
[
{
path
:
'
video
'
,
path
:
'
playback
'
,
component
:
()
=>
import
(
'@/views/video/playback'
),
name
:
'
Video
'
,
name
:
'
Playback
'
,
meta
:
{
title
:
'视频回放'
,
icon
:
'user'
}
}
]
},
{
path
:
'/monitoringhistory'
,
component
:
Layout
,
hidden
:
false
,
redirect
:
'monitoringhistory/history'
,
children
:
[
{
path
:
'history'
,
component
:
()
=>
import
(
'@/views/history/index'
),
name
:
'History'
,
meta
:
{
title
:
'历史记录'
,
icon
:
'user'
}
}
]
}
]
...
...
src/views/history/index.vue
0 → 100644
View file @
2d882c49
<
template
>
<div
class=
"app-container"
>
<div
style=
"background-color: #F6F6FA;height: 95vh;"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"监控点名称"
prop=
"monitoringName"
>
<el-input
v-model=
"queryParams.monitoringName"
placeholder=
"请输入监控点名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"监控时间"
prop=
"monitorTime"
>
<el-date-picker
clearable
v-model=
"queryParams.monitorTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择监控时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"监控状态"
prop=
"monitorState"
>
<el-input
v-model=
"queryParams.monitorState"
placeholder=
"请输入监控状态"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!--
<el-table
v-loading=
"loading"
:data=
"histableList"
@
selection-change=
"handleSelectionChange"
>
-->
<el-table
:data=
"histableList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
/>
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<span>
{{
queryParams
.
pageNum
*
queryParams
.
pageSize
+
scope
.
$index
}}
</span>
-->
<!--
</
template
>
-->
<el-table-column
label=
"监控点名称"
align=
"center"
prop=
"monitoringName"
/>
<el-table-column
label=
"监控开始时间"
align=
"center"
prop=
"monitoringStarttime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
monitoringStarttime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"监控结束时间"
align
=
"center"
prop
=
"monitoringFinallytime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
monitoringFinallytime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"监控时间"
align
=
"center"
prop
=
"monitorTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
monitorTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"监控状态"
align
=
"center"
prop
=
"monitorState"
/>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
>
修改
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改
history
对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
script
>
import
{
listHistable
,
getHistable
,
delHistable
,
addHistable
,
updateHistable
}
from
"@/api/system/histable"
;
import
{
parseTime
}
from
"../../utils/ruoyi"
;
export
default
{
name
:
"Histable"
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// history表格数据
histableList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
monitoringName
:
null
,
monitorTime
:
null
,
monitorState
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
parseTime
,
/** 查询history列表 */
getList
()
{
this
.
loading
=
true
;
listHistable
(
this
.
queryParams
).
then
(
response
=>
{
this
.
histableList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
ID
:
null
,
monitoringName
:
null
,
monitoringStarttime
:
null
,
monitoringFinallytime
:
null
,
monitorTime
:
null
,
monitorState
:
null
,
CREATETIME
:
null
,
CREATEBY
:
null
,
UPDATETIME
:
null
,
UPDATEBY
:
null
,
delFlag
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
ID
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加history"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
// 查看详情页面(把id换成code)
this
.
$router
.
push
({
path
:
'/monitoringPlayback/playback'
,
query
:
{
code
:
row
.
ID
}
}
)
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
ID
!=
null
)
{
updateHistable
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addHistable
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
IDs
=
row
.
ID
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除history编号为"'
+
IDs
+
'"的数据项?'
).
then
(
function
()
{
return
delHistable
(
IDs
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'system/histable/export'
,
{
...
this
.
queryParams
}
,
`histable_${new Date().getTime()
}
.xlsx`
)
}
}
}
;
<
/script
>
src/views/index.vue
View file @
2d882c49
<
template
>
<div
class=
"app-container"
>
<div
style=
"background-color: #F6F6FA;height: 95vh;"
>
<div
style=
"background-color: #F6F6FA;height: 95vh;padding-left: 30px;padding-right: 30px"
>
<div>
<span
style=
"display: flex;justify-content: flex-start;align-items: center;"
><div
style=
"border: 1px solid #116FBB;width: 2px;height: 20px;margin-right: 5px"
></div><h5
style=
"color: #116FBB"
>
员工信息管理
</h5></span>
</div>
<el-row
:gutter=
"20"
>
<!--部门数据-->
<el-col
:span=
"4"
:xs=
"24"
>
...
...
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