Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
AI云守
ai-yunshou-vue
Commits
64b3652e
Commit
64b3652e
authored
Sep 03, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 日志管理接口对接联调,优化项目结构,解决项目bug
parent
b7f2ce3b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
313 additions
and
235 deletions
+313
-235
src/api/logControl/index.js
src/api/logControl/index.js
+92
-0
src/views/alarmControl/components/form.vue
src/views/alarmControl/components/form.vue
+1
-1
src/views/alarmControl/index.vue
src/views/alarmControl/index.vue
+1
-1
src/views/algorithmList/components/details.vue
src/views/algorithmList/components/details.vue
+9
-9
src/views/logControl/index.vue
src/views/logControl/index.vue
+178
-192
src/views/videoControl/videoPreview/index.vue
src/views/videoControl/videoPreview/index.vue
+32
-32
No files found.
src/api/logControl/index.js
0 → 100644
View file @
64b3652e
/**
* 查询算法日志信息列表
* @param {string} algorrithmName
* @param {string} cameraNo
* @param {string} costTime
* @param {string} createBy
* @param {string} createTime
* @param {string} jsonResult
* @param {string} operId
* @param {string} operParam
* @param {string} operTime
* @param {string} params
* @param {string} remark
* @param {string} searchValue
* @param {string} status
* @param {string} updateBy
* @param {string} updateTime
* @returns
*/
import
request
from
'
@/utils/request
'
// 查询摄像头日志列表
export
function
listCameraLog
(
query
)
{
return
request
({
url
:
'
/test/cameraLog/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询算法日志列表
export
function
listAlgLog
(
query
)
{
return
request
({
url
:
'
/test/algorithmLog/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询算法日志列表x详情
export
function
detailAlgLog
(
id
)
{
return
request
({
url
:
`/test/algorithmLog/
${
id
}
`
,
method
:
'
get
'
,
})
}
// 修改算法日志状态
export
function
updateStatusAlgLog
(
query
)
{
return
request
({
url
:
`/test/algorithmLog/updateStatus`
,
method
:
'
get
'
,
params
:
query
})
}
// 新增算法日志列表
export
function
addAlgLog
(
data
)
{
return
request
({
url
:
'
/test/algorithmLog
'
,
method
:
'
post
'
,
data
:
data
})
}
// 修改算法日志列表
export
function
updateAlgLog
(
data
)
{
return
request
({
url
:
'
/test/algorithmLog
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除算法日志列表
export
function
deleteAlgLog
(
ids
)
{
return
request
({
url
:
`/test/algorithmLog/
${
ids
}
`
,
method
:
'
delete
'
})
}
// 导出算法日志列表
export
function
exportAlgLog
(
data
)
{
return
request
({
url
:
`/test/algorithmLog/export`
,
method
:
'
post
'
,
data
:
data
})
}
src/views/alarmControl/components/form.vue
View file @
64b3652e
...
...
@@ -18,7 +18,7 @@
预警等级
</div>
</
template
>
{{form.alarmLevel
Id
}}
{{form.alarmLevel
Name
}}
</el-descriptions-item>
<el-descriptions-item>
<
template
#label
>
...
...
src/views/alarmControl/index.vue
View file @
64b3652e
...
...
@@ -74,7 +74,7 @@
<div
style=
"width: 100%;overflow: hidden;"
>
<ImagePreview
style=
"width: 100%;"
:src=
"item.alarmImg"
/>
</div>
<h2>
{{
item
.
alarmType
}}
</h2>
<h2
:style=
"
{color:item.alarmLevelColor}"
>
{{
item
.
alarmType
}}
</h2>
<p
style=
"color: #999999;font-size: 12px;"
>
{{
parseTime
(
item
.
alarmTime
)
}}
</p>
...
...
src/views/algorithmList/components/details.vue
View file @
64b3652e
...
...
@@ -78,10 +78,6 @@
:isShowTip=
"false"
@
update:modelObj=
"getImgObj"
/>
<div
v-else
style=
"position: absolute;bottom: 5px;left: 26%;"
class=
"text-style"
>
请开启算法
</div>
<!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> -->
</div>
</el-card>
<el-card
>
...
...
@@ -116,7 +112,7 @@
<div
style=
"display: flex;justify-content: space-between;margin: 10px 0;"
>
<!-- <el-button type="primary" plain>重置区域</el-button> -->
<div></div>
<
el-button
type=
"primary"
plain
@
click=
"downVideo"
>
下载识别视频
</el-button
>
<
!-- <el-button type="primary" plain @click="downVideo">下载识别视频</el-button> --
>
<!-- <el-button v-if="getFileType(outFilePath)=='1'" type="primary" plain @click="downVideo">下载识别视频</el-button> -->
</div>
</el-card>
...
...
@@ -136,7 +132,7 @@
</div>
<el-divider
/>
<div
class=
"img-box gird-layout"
>
<div
class=
"img-item"
v-for=
"item in
effective
List"
:key=
"item.id"
>
<div
class=
"img-item"
v-for=
"item in
invalidImg
List"
:key=
"item.id"
>
<ImagePreview
style=
"height: 100%;"
:src=
"item.caseFile"
/>
</div>
</div>
...
...
@@ -155,10 +151,10 @@
</div>
<el-divider
/>
<div
class=
"img-box gird-layout"
>
<div
class=
"img-item"
v-for=
"item in invalidList"
:key=
"item.id"
>
<ImagePreview
style=
"height: 100%;"
:src=
"item.caseFile"
/>
<div
class=
"img-item"
v-for=
"item in invalidImgList"
:key=
"item.id"
>
<ImagePreview
style=
"height: 100%;"
:src=
"item.caseFile"
/>
</div>
</div>
</div>
<img
class=
"top-tip"
src=
"@/assets/images/close.png"
alt=
""
>
</div>
...
...
@@ -191,6 +187,8 @@ const backVideo = ref({})
const
applicationList
=
ref
([])
const
effectiveList
=
ref
([])
const
invalidList
=
ref
([])
const
invalidImgList
=
ref
([])
const
effectiveImgList
=
ref
([])
const
imgVideoData
=
ref
([])
const
nowText
=
ref
(
'
算法详情
'
)
const
baseUrl
=
'
http://192.168.3.82
'
...
...
@@ -228,6 +226,8 @@ function getDetials(){
listBoundary
({
algorithmId
:
roleId
}).
then
(
res
=>
{
effectiveList
.
value
=
res
.
rows
.
filter
(
item
=>
item
.
caseType
===
'
0
'
)
invalidList
.
value
=
res
.
rows
.
filter
(
item
=>
item
.
caseType
===
'
1
'
)
invalidImgList
.
value
=
res
.
rows
.
filter
(
item
=>
item
.
caseType
===
'
1
'
&&
item
.
caseFile
)
effectiveImgList
.
value
=
res
.
rows
.
filter
(
item
=>
item
.
caseType
===
'
0
'
&&
item
.
caseFile
)
})
}
/** 查询案例文件列表 */
...
...
src/views/logControl/index.vue
View file @
64b3652e
This diff is collapsed.
Click to expand it.
src/views/videoControl/videoPreview/index.vue
View file @
64b3652e
...
...
@@ -54,7 +54,7 @@
>
<
template
v-slot:default
>
<!--
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
-->
<canvas
id=
"video"
style=
"width: 100%
"
></canvas>
<canvas
id=
"video"
:style=
"
{width: '100%', maxHeight: (globalScreenHeight-120)+'px'}
" >
</canvas>
</
template
>
</el-card>
</div>
...
...
@@ -84,7 +84,7 @@
<el-form-item
label=
"预警区域:"
>
{{
form
.
title
}}
</el-form-item>
-->
<el-form-item
label=
"预警类型:"
>
{{
item
.
alarmType
}}
</el-form-item>
<el-form-item
label=
"预警时间:"
>
{{
parseTime
(
item
.
alarmTime
)
}}
</el-form-item>
<el-form-item
label=
"预警等级:"
><el-tag
:
type=
"'danger'"
effect=
"dark"
>
{{
item
.
alarmLevelId
+
'
级
预警
'
}}
</el-tag></el-form-item>
<el-form-item
label=
"预警等级:"
><el-tag
:
color=
"item.alarmLevelColor"
type=
"info"
effect=
"dark"
>
{{
item
.
alarmLevelName
+
'
预警
'
}}
</el-tag></el-form-item>
</el-form>
</
template
>
</el-card>
...
...
@@ -135,67 +135,67 @@ const data = reactive({
});
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
/** 通过条件过滤节点 */
onMounted
(()
=>
{
// player.value.play()//播放
getTreeData
()
getWaringData
()
getVideos
()
})
onDeactivated
(()
=>
{
player
.
value
.
destroy
();
player
.
value
=
null
;
})
watch
(
deptName
,
(
val
)
=>
{
deptTreeRef
.
value
.
filter
(
val
)
})
const
filterNode
=
(
value
,
data
)
=>
{
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
};
function
getTreeData
()
{
videoTreeListManage
().
then
((
res
)
=>
{
console
.
log
(
"
🚀 ~ videoTreeListManage ~ res:
"
,
res
)
deptOptions
.
value
=
res
.
data
})
}
function
getWaringData
()
{
listAlarm
().
then
((
res
)
=>
{
listAlarm
(
queryParams
.
value
).
then
((
res
)
=>
{
algorithmList
.
value
=
res
.
rows
})
}
getTreeData
()
getWaringData
()
function
getVideos
(
str
){
let
canvas
=
document
.
getElementById
(
'
video
'
)
let
url
=
str
?
str
:
'
rtsp://192.168.20.211:554/av0_0
'
if
(
player
.
value
)
{
player
.
value
.
destroy
();
player
.
value
=
null
;
}
player
.
value
=
new
JSMpeg
.
Player
(
"
ws://192.168.4.232:9999/rtsp?url=
"
+
btoa
(
url
),
{
canvas
:
canvas
})
player
.
value
.
play
()
}
// // 当需要重新加载视频流时,可以调用以下函数
// function reloadVideoStream(str) {
// let canvas = document.getElementById('video')
// var ctx = canvas.getContext('2d');
// ctx.clearRect(0, 0, canvas.width, canvas.height);
// // 更新视频流URL
// player.value = new JSMpeg.Player("ws://192.168.4.232:9999/rtsp?url="+btoa(str), {canvas: canvas})
// // 开始解码新的视频流
// player.value.play();
// }
onMounted
(()
=>
{
// player.value.play()//播放
getVideos
()
})
watch
(
deptName
,
(
val
)
=>
{
deptTreeRef
.
value
.
filter
(
val
)
})
}
function
handleNodeClick
(
row
)
{
const
treeType
=
row
.
id
.
split
(
"
-
"
)[
0
];
const
treeID
=
row
.
id
.
split
(
"
-
"
)[
1
];
if
(
treeType
==
'
点位
'
){
handlvideoPath
(
treeID
)
queryParams
.
value
.
locationId
=
treeID
;
queryParams
.
value
.
regionId
=
null
;
}
else
{
queryParams
.
value
.
regionId
=
treeID
;
queryParams
.
value
.
locationId
=
null
;
}
}
getWaringData
()
}
function
handAdd
(
row
)
{
algFormRef
.
value
.
handleAdd
();
}
function
handleSetSize
(
row
)
{
}
function
handleUpdate
(
row
)
{
}
function
handlvideoPath
(
id
)
{
idDevice
(
id
).
then
((
res
)
=>
{
getVideos
(
res
.
data
.
videoUrl
)
...
...
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