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
8970d106
Commit
8970d106
authored
Sep 11, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复告警管理查询问题,增加选中状态样式
parent
6c632267
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
33 deletions
+118
-33
src/views/alarmControl/index.vue
src/views/alarmControl/index.vue
+61
-11
src/views/algorithmControl/components/algorithmFile.vue
src/views/algorithmControl/components/algorithmFile.vue
+27
-9
src/views/algorithmControl/components/form.vue
src/views/algorithmControl/components/form.vue
+2
-2
src/views/algorithmList/components/form.vue
src/views/algorithmList/components/form.vue
+7
-1
src/views/algorithmList/index.vue
src/views/algorithmList/index.vue
+9
-0
src/views/deviceControl/index.vue
src/views/deviceControl/index.vue
+5
-5
src/views/videoControl/videoPreview/index.vue
src/views/videoControl/videoPreview/index.vue
+7
-5
No files found.
src/views/alarmControl/index.vue
View file @
8970d106
...
...
@@ -7,25 +7,26 @@
<el-card
class=
"right-list"
>
<template
v-slot:header
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
>
<el-form-item
label=
"摄像头
"
prop=
"algorithmName
"
>
<el-select
v-model=
"queryParams.deptName"
placeholder=
"请选择摄像头"
clearable
style=
"width: 200px"
>
<el-form-item
label=
"摄像头
点位"
prop=
"locationId
"
>
<
!--
<
el-select
v-model=
"queryParams.deptName"
placeholder=
"请选择摄像头"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"dict in deviceList"
:key=
"dict.id"
:label=
"dict.deviceName"
:value=
"dict.id"
/>
</el-select>
</el-select>
-->
<el-cascader
v-model=
"myLocation"
@
change=
"locationChange"
style=
"width: 300px;"
:options=
"deptOptions"
:props=
"
{value:'id',label:'label'}"/>
</el-form-item>
<el-form-item
label=
"算法列表"
prop=
"a
pplicationScenarios
"
>
<el-select
v-model=
"queryParams.a
pplicationScenarios
"
placeholder=
"请选择算法列表"
clearable
style=
"width: 200px"
>
<el-form-item
label=
"算法列表"
prop=
"a
lgorithmId
"
>
<el-select
v-model=
"queryParams.a
lgorithmId
"
placeholder=
"请选择算法列表"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"disc in algorithm
_scen
"
:key=
"disc.
value
"
:label=
"disc.
label
"
:value=
"disc.
value
"
v-for=
"disc in algorithm
List
"
:key=
"disc.
id
"
:label=
"disc.
algorithmName
"
:value=
"disc.
id
"
/>
</el-select>
</el-select>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
...
...
@@ -111,6 +112,8 @@
<
script
setup
name=
"Index"
>
import
{
listAlarm
,
detailAlarm
}
from
"
@/api/alarmControl/index.js
"
;
import
{
listDevice
,
}
from
"
@/api/yunshou/device
"
;
import
{
videoTreeListManage
}
from
"
@/api/videoControl/videoPreview
"
;
import
{
listAlg
}
from
"
@/api/algorithmList/index.js
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
algorithm_scen
,
algorithm_case
}
=
proxy
.
useDict
(
"
algorithm_scen
"
,
"
algorithm_case
"
);
import
alarmDetial
from
'
./components/form.vue
'
...
...
@@ -121,11 +124,15 @@
const
alarmDetialRef
=
ref
(
null
)
const
nowText
=
ref
(
'
告警管理
'
)
const
ids
=
ref
([]);
const
myLocation
=
ref
([]);
const
total
=
ref
(
0
);
const
division
=
ref
(
6
);
const
isActive
=
ref
(
'
12
'
);
const
deviceList
=
ref
([]);
const
algList
=
ref
([]);
const
algorithmList
=
ref
([]);
const
deptOptions
=
ref
([]);
const
dateRange
=
ref
([]);
const
data
=
reactive
({
form
:
{},
queryParams
:
{
...
...
@@ -143,6 +150,46 @@
});
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
//点位变化事件
function
locationChange
(
e
){
const
nowArray
=
[...
e
]
const
loctionId
=
nowArray
.
pop
().
split
(
'
-
'
)[
1
]
queryParams
.
value
.
locationId
=
loctionId
;
}
/** 算法列表 */
function
getAlgList
()
{
listAlg
({
pageSize
:
100
,
pageNum
:
1
,}).
then
(
response
=>
{
algorithmList
.
value
=
response
.
rows
;
});
}
function
getTreeData
()
{
videoTreeListManage
().
then
((
res
)
=>
{
deptOptions
.
value
=
addDisabledToNoChildren
(
res
.
data
)
})
}
function
addDisabledToNoChildren
(
data
)
{
return
data
.
map
(
item
=>
{
// 复制当前项以避免直接修改原始数据
let
copy
=
{
...
item
};
// 检查是否有 children 属性
if
((
!
copy
.
children
||
copy
.
children
.
length
===
0
))
{
// 如果没有 children 或 children 为空数组,则添加 disabled: true
if
(
copy
.
id
.
split
(
"
-
"
)[
0
]
==
'
区域
'
){
copy
.
disabled
=
true
;
}
}
else
{
// 如果有 children,则递归处理每个 child
copy
.
children
=
addDisabledToNoChildren
(
copy
.
children
);
}
return
copy
;
});
}
function
changeDivision
(
val
,
pageSize
){
division
.
value
=
val
queryParams
.
value
.
pageSize
=
pageSize
...
...
@@ -158,6 +205,7 @@
/** 重置按钮操作 */
function
resetQuery
()
{
proxy
.
resetForm
(
"
queryRef
"
);
myLocation
.
value
=
[]
handleQuery
();
}
...
...
@@ -169,7 +217,7 @@
/** 查询算法列表 */
function
getList
()
{
listAlarm
(
queryParams
.
value
).
then
(
response
=>
{
listAlarm
(
proxy
.
addDateRange
(
queryParams
.
value
,
dateRange
.
value
)
).
then
(
response
=>
{
algList
.
value
=
response
.
rows
total
.
value
=
response
.
total
;
});
...
...
@@ -204,6 +252,8 @@
proxy
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
}
getTreeData
()
getAlgList
();
getList
();
getDeviceList
();
</
script
>
...
...
src/views/algorithmControl/components/algorithmFile.vue
View file @
8970d106
...
...
@@ -14,21 +14,25 @@
<el-table
:data=
"wrapList"
>
<el-table-column
type=
"expand"
>
<template
#default
="
scope
"
>
<div
m=
"4
"
>
<el-tag
v-for=
"item in scope.row.labelList"
:key=
"item.id"
:type=
"'primary'"
>
{{
item
.
labelCode
+
'
:
'
+
<div
style=
"display: flex;justify-content: flex-start;gap: 20px;
"
>
<el-tag
v-for=
"item in scope.row.labelList"
:key=
"item.id"
:type=
"'primary'"
>
{{
item
.
labelCode
+
'
:
'
+
item
.
labelThreshold
}}
</el-tag>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"文件名称"
align=
"center"
prop=
"algorithmName"
/>
<el-table-column
label=
"文件名称"
align=
"center"
prop=
"algorithmName"
>
<
template
#default
="
scope
"
>
<div>
{{
getFielName
(
scope
.
row
.
algorithmFile
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"algorithmStatus"
>
<
template
#default
="
scope
"
>
<el-tag
:type=
"scope.row.algorithmStatus=='2'?'success':'primary'"
>
{{
scope
.
row
.
algorithmStatus
==
'
2
'
?
'
使用中
'
:
'
已上传
'
}}
</el-tag>
</
template
>
<el-tag
:type=
"scope.row.algorithmStatus=='2'?'success':'primary'"
>
{{
scope
.
row
.
algorithmStatus
==
'
2
'
?
'
使用中
'
:
'
已上传
'
}}
</el-tag>
</
template
>
</el-table-column>
<
el-table-column
label=
"MD5核对结果"
align=
"center"
prop=
"md5Result"
/
>
<
!-- <el-table-column label="MD5核对结果" align="center" prop="md5Result" /> --
>
<el-table-column
label=
"文件大小"
align=
"center"
prop=
"fileSize"
/>
<el-table-column
label=
"
进度"
align=
"center"
prop=
"postSort
"
/>
<el-table-column
label=
"
上传时间"
align=
"center"
prop=
"createTime
"
/>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#default
="
scope
"
>
<!--
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
...
...
@@ -64,6 +68,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"配置文件"
prop=
"configFile"
>
<FileAlgUpload
@
update:modelValue=
"getConfigFile"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<
template
#footer
>
<div
class=
"dialog-footer"
>
...
...
@@ -114,6 +125,11 @@ function reset() {
proxy
.
resetForm
(
"
algRef
"
);
}
function
getFielName
(
str
){
let
array
=
str
.
split
(
'
/
'
)
let
lastElement
=
array
.
pop
();
return
lastElement
}
/** 获取文件列表*/
function
getList
()
{
...
...
@@ -180,12 +196,14 @@ function cancel() {
}
function
getFile
(
url
,
size
)
{
console
.
log
(
"
🚀 ~ getFile ~ url:
"
,
url
)
console
.
log
(
"
🚀 ~ getFile ~ size:
"
,
size
)
form
.
value
.
algorithmFile
=
url
form
.
value
.
fileSize
=
size
+
'
m
'
}
function
getConfigFile
(
url
,
size
)
{
form
.
value
.
configFile
=
url
}
defineExpose
({
handleAdd
,
handleUpdate
,
getList
})
</
script
>
...
...
src/views/algorithmControl/components/form.vue
View file @
8970d106
...
...
@@ -216,7 +216,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"10"
class=
"mb8"
>
<
!-- <
el-row :gutter="10" class="mb8">
<div class="form-title" style="display: flex;justify-content: flex-start;align-items: center;">
<span>算法详情页banner卡片信息</span>
</div>
...
...
@@ -241,7 +241,7 @@
<el-input v-model="form.algorithmIntroduce" placeholder="请输入算法介绍" />
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"10"
class=
"mb8"
>
<div
class=
"form-title"
style=
"display: flex;justify-content: flex-start;align-items: center;"
>
<span>
算法详情页视频
</span>
...
...
src/views/algorithmList/components/form.vue
View file @
8970d106
...
...
@@ -127,7 +127,12 @@ function reset() {
proxy
.
resetForm
(
"
algRef
"
);
}
/** 查询算法列表 */
function
getLevelList
()
{
listAlgLevel
({
pageNum
:
1
,
pageSize
:
100
,}).
then
(
response
=>
{
levelList
.
value
=
response
.
rows
});
}
/** 获取文件列表*/
function
getList
(
id
)
{
...
...
@@ -191,6 +196,7 @@ function cancel() {
open
.
value
=
false
;
reset
();
}
getLevelList
()
defineExpose
({
handleAdd
,
handleUpdate
})
</
script
>
...
...
src/views/algorithmList/index.vue
View file @
8970d106
...
...
@@ -56,6 +56,7 @@
<el-button
type=
"primary"
plain
:class=
"isActive==''?'active':''"
@
click=
"handState('')"
>
全部
</el-button>
</el-col>
...
...
@@ -63,6 +64,7 @@
<el-button
type=
"primary"
plain
:class=
"isActive=='0'?'active':''"
@
click=
"handState('0')"
>
启用中
</el-button>
</el-col>
...
...
@@ -70,6 +72,7 @@
<el-button
type=
"primary"
plain
:class=
"isActive=='1'?'active':''"
@
click=
"handState('1')"
>
已停用
</el-button>
</el-col>
...
...
@@ -156,6 +159,7 @@ import { el } from "element-plus/es/locales.mjs";
const
nowTopTitle
=
ref
(
'
算法管理
'
)
const
listState
=
ref
(
false
)
const
ids
=
ref
([]);
const
isActive
=
ref
(
''
);
// const iconComponent = ref('');
// setTimeout(() => {
// iconComponent.value='CirclePlusFilled'
...
...
@@ -211,6 +215,7 @@ import { el } from "element-plus/es/locales.mjs";
router
.
push
(
"
/algorithmList/details/info/
"
+
row
.
id
);
}
function
handState
(
state
)
{
isActive
.
value
=
state
queryParams
.
value
.
algorithmStatus
=
state
getMyList
()
}
...
...
@@ -291,6 +296,10 @@ import { el } from "element-plus/es/locales.mjs";
</
script
>
<
style
scoped
lang=
"scss"
>
.active
{
background-color
:
#409EFF
;
color
:
#fff
;
}
.more-ellipsis
{
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
...
...
src/views/deviceControl/index.vue
View file @
8970d106
...
...
@@ -13,14 +13,14 @@
@
keyup.enter=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"设备是否有效"
prop=
"isEffective"
>
<
!--
<
el-form-item
label=
"设备是否有效"
prop=
"isEffective"
>
<el-select
v-model=
"queryParams.isEffective"
placeholder=
"请选择是否有效"
clearable
style=
"width: 200px"
>
<el-option
:label=
"'有效'"
:value=
"'0'"
/>
<el-option
:label=
"'无效'"
:value=
"'1'"
/>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"状态"
prop=
"isOpen"
>
<el-select
v-model=
"queryParams.isOpen"
placeholder=
"请选择
所属部门
"
clearable
style=
"width: 200px"
>
<el-select
v-model=
"queryParams.isOpen"
placeholder=
"请选择
状态
"
clearable
style=
"width: 200px"
>
<el-option
:label=
"'运行中'"
:value=
"'0'"
/>
<el-option
:label=
"'已禁用'"
:value=
"'1'"
/>
</el-select>
...
...
@@ -88,7 +88,7 @@
<el-table-column
label=
"设备视频流地址"
align=
"center"
prop=
"videoUrl"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"设备是否有效"
width=
"150"
align=
"center"
prop=
"isEffective"
:show-overflow-tooltip=
"true"
>
<
!--
<
el-table-column
label=
"设备是否有效"
width=
"150"
align=
"center"
prop=
"isEffective"
:show-overflow-tooltip=
"true"
>
<template
#default
="
scope
"
>
<el-tag
:type=
"scope.row.isEffective === '0'?'success' : 'danger'"
...
...
@@ -97,7 +97,7 @@
{{
scope
.
row
.
isEffective
===
'
0
'
?
'
有效
'
:
'
无效
'
}}
</el-tag>
</
template
>
</el-table-column>
</el-table-column>
-->
<el-table-column
label=
"状态"
width=
"150"
align=
"center"
prop=
"isOpen"
:show-overflow-tooltip=
"true"
>
<
template
#default
="
scope
"
>
<el-tag
...
...
src/views/videoControl/videoPreview/index.vue
View file @
8970d106
...
...
@@ -188,12 +188,14 @@ function handleNodeClick(row) {
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
;
}
// else{
// queryParams.value.regionId = treeID;
// }
// clearTimeout(timeoutId);
// getWaringData()
clearTimeout
(
timeoutId
);
getWaringData
()
}
function
handjudge
(
row
)
{
const
treeType
=
row
.
id
.
split
(
"
-
"
)[
0
];
...
...
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