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
c3f04157
Commit
c3f04157
authored
Aug 01, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:视频管理,页面调整。
parent
344cdd20
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
724 additions
and
680 deletions
+724
-680
src/components/TabTitle/index.vue
src/components/TabTitle/index.vue
+32
-27
src/views/algorithmList/index.vue
src/views/algorithmList/index.vue
+1
-1
src/views/logControl/index.vue
src/views/logControl/index.vue
+425
-410
src/views/videoControl/videoPreview/index.vue
src/views/videoControl/videoPreview/index.vue
+266
-242
No files found.
src/components/TabTitle/index.vue
View file @
c3f04157
...
@@ -16,9 +16,10 @@ export default defineComponent({
...
@@ -16,9 +16,10 @@ export default defineComponent({
</
script
>
</
script
>
<
style
scope
lang=
"scss"
>
<
style
scope
lang=
"scss"
>
.tab-title
{
.tab-title
{
display
:
flex
;
display
:
flex
;
align-items
:center
;
/*for vertical align*/
align-items
:
center
;
/*for vertical align*/
font-size
:
20px
;
font-size
:
20px
;
height
:
50px
;
height
:
50px
;
color
:
#1890FF
;
color
:
#1890FF
;
...
@@ -26,18 +27,22 @@ export default defineComponent({
...
@@ -26,18 +27,22 @@ export default defineComponent({
margin-bottom
:
10px
;
margin-bottom
:
10px
;
border-radius
:
5px
;
border-radius
:
5px
;
padding
:
0
;
padding
:
0
;
.el-card__body
{
.el-card__body
{
padding
:
0
!
important
;
padding
:
0
!
important
;
}
}
}
}
.
tab-title
:
:
before
{
content
:
""
;
.
tab-title
:
:
before
{
content
:
""
;
display
:
inline-block
;
display
:
inline-block
;
width
:
8px
;
/* 矩形的宽度 */
width
:
8px
;
height
:
28px
;
/* 矩形的高度 */
/* 矩形的宽度 */
background-color
:
#1890FF
;
/* 矩形的背景颜色 */
height
:
28px
;
/* 矩形的高度 */
background-color
:
#1890FF
;
/* 矩形的背景颜色 */
margin-right
:
8px
;
margin-right
:
8px
;
border-radius
:
8px
;
border-radius
:
8px
;
}
margin-left
:
8px
;
}
</
style
>
</
style
>
src/views/algorithmList/index.vue
View file @
c3f04157
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
default-active=
"2"
default-active=
"2"
class=
"el-menu-vertical-demo"
class=
"el-menu-vertical-demo"
>
>
<el-menu-item
v-for=
"item in algorithmList"
:index=
"item.name"
>
<el-menu-item
v-for=
"item in algorithmList"
:
key=
"item.name"
:
index=
"item.name"
>
<span>
{{ item.name }}
</span>
<span>
{{ item.name }}
</span>
</el-menu-item>
</el-menu-item>
</el-menu>
</el-menu>
...
...
src/views/logControl/index.vue
View file @
c3f04157
...
@@ -11,23 +11,12 @@
...
@@ -11,23 +11,12 @@
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"日志时间"
prop=
"name"
>
<el-form-item
label=
"日志时间"
prop=
"name"
>
<el-date-picker
<el-date-picker
v-model=
"dateRange"
value-format=
"YYYY-MM-DD"
type=
"daterange"
range-separator=
"-"
v-model=
"dateRange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
value-format=
"YYYY-MM-DD"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"摄像头"
prop=
"deptName"
>
<el-form-item
label=
"摄像头"
prop=
"deptName"
>
<el-select
v-model=
"queryParams.deptName"
placeholder=
"请选择摄像头"
clearable
style=
"width: 200px"
>
<el-select
v-model=
"queryParams.deptName"
placeholder=
"请选择摄像头"
clearable
style=
"width: 200px"
>
<el-option
<el-option
v-for=
"dict in sys_job_status"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
v-for=
"dict in sys_job_status"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -49,33 +38,26 @@
...
@@ -49,33 +38,26 @@
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"cronExpression"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"cronExpression"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作人"
align=
"center"
>
<el-table-column
label=
"操作人"
align=
"center"
>
<
template
#default
="
scope
"
>
<
template
#default
="
scope
"
>
<el-switch
<el-switch
v-model=
"scope.row.status"
active-value=
"0"
inactive-value=
"1"
v-model=
"scope.row.status"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
active-value=
"0"
inactive-value=
"1"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
class-name=
"small-padding fixed-width"
>
<
template
#default
="
scope
"
>
<
template
#default
="
scope
"
>
<el-tooltip
content=
"修改"
placement=
"top"
>
<el-tooltip
content=
"修改"
placement=
"top"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['monitor:job:edit']"
></el-button>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['monitor:job:edit']"
></el-button>
</el-tooltip>
</el-tooltip>
<el-tooltip
content=
"删除"
placement=
"top"
>
<el-tooltip
content=
"删除"
placement=
"top"
>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['monitor:job:remove']"
></el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['monitor:job:remove']"
></el-button>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.pageNum"
v-show=
"total > 0"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
:total=
"total"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-card>
</el-card>
<!-- 添加或修改定时任务对话框 -->
<!-- 添加或修改定时任务对话框 -->
...
@@ -90,12 +72,8 @@
...
@@ -90,12 +72,8 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"任务分组"
prop=
"jobGroup"
>
<el-form-item
label=
"任务分组"
prop=
"jobGroup"
>
<el-select
v-model=
"form.jobGroup"
placeholder=
"请选择"
>
<el-select
v-model=
"form.jobGroup"
placeholder=
"请选择"
>
<el-option
<el-option
v-for=
"dict in sys_job_group"
:key=
"dict.value"
:label=
"dict.label"
v-for=
"dict in sys_job_group"
:value=
"dict.value"
></el-option>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -134,11 +112,8 @@
...
@@ -134,11 +112,8 @@
<el-col
:span=
"24"
v-if=
"form.jobId !== undefined"
>
<el-col
:span=
"24"
v-if=
"form.jobId !== undefined"
>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
<el-radio
v-for=
"dict in sys_job_status"
:key=
"dict.value"
:value=
"dict.value"
>
{{ dict.label
v-for=
"dict in sys_job_status"
}}
</el-radio>
:key=
"dict.value"
:value=
"dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -170,7 +145,7 @@
...
@@ -170,7 +145,7 @@
</el-dialog>
</el-dialog>
<el-dialog
title=
"Cron表达式生成器"
v-model=
"openCron"
append-to-body
destroy-on-close
>
<el-dialog
title=
"Cron表达式生成器"
v-model=
"openCron"
append-to-body
destroy-on-close
>
<crontab
ref=
"crontabRef"
@
hide=
"openCron=
false"
@
fill=
"crontabFill"
:expression=
"expression"
></crontab>
<crontab
ref=
"crontabRef"
@
hide=
"openCron =
false"
@
fill=
"crontabFill"
:expression=
"expression"
></crontab>
</el-dialog>
</el-dialog>
<!-- 任务日志详细 -->
<!-- 任务日志详细 -->
...
@@ -182,17 +157,27 @@
...
@@ -182,17 +157,27 @@
<el-form-item
label=
"任务名称:"
>
{{ form.jobName }}
</el-form-item>
<el-form-item
label=
"任务名称:"
>
{{ form.jobName }}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"任务分组:"
>
{{ jobGroupFormat(form) }}
</el-form-item>
<el-form-item
label=
"任务分组:"
>
{{
<el-form-item
label=
"创建时间:"
>
{{ form.createTime }}
</el-form-item>
jobGroupFormat(form)
}}
</el-form-item>
<el-form-item
label=
"创建时间:"
>
{{
form.createTime
}}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"cron表达式:"
>
{{ form.cronExpression }}
</el-form-item>
<el-form-item
label=
"cron表达式:"
>
{{
form.cronExpression
}}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"下次执行时间:"
>
{{ parseTime(form.nextValidTime) }}
</el-form-item>
<el-form-item
label=
"下次执行时间:"
>
{{
parseTime(form.nextValidTime)
}}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"调用目标方法:"
>
{{ form.invokeTarget }}
</el-form-item>
<el-form-item
label=
"调用目标方法:"
>
{{
form.invokeTarget
}}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"任务状态:"
>
<el-form-item
label=
"任务状态:"
>
...
@@ -223,76 +208,91 @@
...
@@ -223,76 +208,91 @@
</
template
>
</
template
>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
setup
name=
"Job"
>
<
script
setup
name=
"Job"
>
import
{
listJob
,
getJob
,
delJob
,
addJob
,
updateJob
,
runJob
,
changeJobStatus
}
from
"
@/api/monitor/job
"
;
import
{
import
Crontab
from
'
@/components/Crontab
'
listJob
,
const
router
=
useRouter
();
getJob
,
const
{
proxy
}
=
getCurrentInstance
();
delJob
,
const
{
sys_job_group
,
sys_job_status
}
=
proxy
.
useDict
(
"
sys_job_group
"
,
"
sys_job_status
"
);
addJob
,
updateJob
,
const
nowText
=
ref
(
"
日志管理
"
);
runJob
,
const
activeName
=
ref
(
"
摄像头日志
"
);
changeJobStatus
,
const
jobList
=
ref
([]);
}
from
"
@/api/monitor/job
"
;
const
open
=
ref
(
false
);
import
Crontab
from
"
@/components/Crontab
"
;
const
loading
=
ref
(
true
);
const
router
=
useRouter
();
const
showSearch
=
ref
(
true
);
const
{
proxy
}
=
getCurrentInstance
();
const
ids
=
ref
([]);
const
{
sys_job_group
,
sys_job_status
}
=
proxy
.
useDict
(
const
dateRange
=
ref
([]);
"
sys_job_group
"
,
const
single
=
ref
(
true
);
"
sys_job_status
"
const
multiple
=
ref
(
true
);
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
nowText
=
ref
(
"
日志管理
"
);
const
openView
=
ref
(
false
);
const
activeName
=
ref
(
"
摄像头日志
"
);
const
openCron
=
ref
(
false
);
const
jobList
=
ref
([]);
const
expression
=
ref
(
""
);
const
open
=
ref
(
false
);
const
loading
=
ref
(
true
);
const
data
=
reactive
({
const
showSearch
=
ref
(
true
);
const
ids
=
ref
([]);
const
dateRange
=
ref
([]);
const
single
=
ref
(
true
);
const
multiple
=
ref
(
true
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
openView
=
ref
(
false
);
const
openCron
=
ref
(
false
);
const
expression
=
ref
(
""
);
const
data
=
reactive
({
form
:
{},
form
:
{},
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
jobName
:
undefined
,
jobName
:
undefined
,
jobGroup
:
undefined
,
jobGroup
:
undefined
,
status
:
undefined
status
:
undefined
,
},
},
rules
:
{
rules
:
{
jobName
:
[{
required
:
true
,
message
:
"
任务名称不能为空
"
,
trigger
:
"
blur
"
}],
jobName
:
[{
required
:
true
,
message
:
"
任务名称不能为空
"
,
trigger
:
"
blur
"
}],
invokeTarget
:
[{
required
:
true
,
message
:
"
调用目标字符串不能为空
"
,
trigger
:
"
blur
"
}],
invokeTarget
:
[
cronExpression
:
[{
required
:
true
,
message
:
"
cron执行表达式不能为空
"
,
trigger
:
"
change
"
}]
{
required
:
true
,
message
:
"
调用目标字符串不能为空
"
,
trigger
:
"
blur
"
},
}
],
});
cronExpression
:
[
{
required
:
true
,
message
:
"
cron执行表达式不能为空
"
,
trigger
:
"
change
"
},
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
],
},
});
function
handleClick
(){
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
}
function
handleClick
()
{
}
/** 查询定时任务列表 */
/** 查询定时任务列表 */
function
getList
()
{
function
getList
()
{
loading
.
value
=
true
;
loading
.
value
=
true
;
listJob
(
proxy
.
addDateRange
(
queryParams
.
value
,
dateRange
.
value
)).
then
(
response
=>
{
listJob
(
proxy
.
addDateRange
(
queryParams
.
value
,
dateRange
.
value
)).
then
(
(
response
)
=>
{
jobList
.
value
=
response
.
rows
;
jobList
.
value
=
response
.
rows
;
total
.
value
=
response
.
total
;
total
.
value
=
response
.
total
;
loading
.
value
=
false
;
loading
.
value
=
false
;
});
}
}
);
}
/** 任务组名字典翻译 */
/** 任务组名字典翻译 */
function
jobGroupFormat
(
row
,
column
)
{
function
jobGroupFormat
(
row
,
column
)
{
return
proxy
.
selectDictLabel
(
sys_job_group
.
value
,
row
.
jobGroup
);
return
proxy
.
selectDictLabel
(
sys_job_group
.
value
,
row
.
jobGroup
);
}
}
/** 取消按钮 */
/** 取消按钮 */
function
cancel
()
{
function
cancel
()
{
open
.
value
=
false
;
open
.
value
=
false
;
reset
();
reset
();
}
}
/** 表单重置 */
/** 表单重置 */
function
reset
()
{
function
reset
()
{
form
.
value
=
{
form
.
value
=
{
jobId
:
undefined
,
jobId
:
undefined
,
jobName
:
undefined
,
jobName
:
undefined
,
...
@@ -301,32 +301,32 @@ function handleClick(){
...
@@ -301,32 +301,32 @@ function handleClick(){
cronExpression
:
undefined
,
cronExpression
:
undefined
,
misfirePolicy
:
1
,
misfirePolicy
:
1
,
concurrent
:
1
,
concurrent
:
1
,
status
:
"
0
"
status
:
"
0
"
,
};
};
proxy
.
resetForm
(
"
jobRef
"
);
proxy
.
resetForm
(
"
jobRef
"
);
}
}
/** 搜索按钮操作 */
/** 搜索按钮操作 */
function
handleQuery
()
{
function
handleQuery
()
{
queryParams
.
value
.
pageNum
=
1
;
queryParams
.
value
.
pageNum
=
1
;
getList
();
getList
();
}
}
/** 重置按钮操作 */
/** 重置按钮操作 */
function
resetQuery
()
{
function
resetQuery
()
{
proxy
.
resetForm
(
"
queryRef
"
);
proxy
.
resetForm
(
"
queryRef
"
);
handleQuery
();
handleQuery
();
}
}
// 多选框选中数据
// 多选框选中数据
function
handleSelectionChange
(
selection
)
{
function
handleSelectionChange
(
selection
)
{
ids
.
value
=
selection
.
map
(
item
=>
item
.
jobId
);
ids
.
value
=
selection
.
map
(
(
item
)
=>
item
.
jobId
);
single
.
value
=
selection
.
length
!=
1
;
single
.
value
=
selection
.
length
!=
1
;
multiple
.
value
=
!
selection
.
length
;
multiple
.
value
=
!
selection
.
length
;
}
}
// 更多操作触发
// 更多操作触发
function
handleCommand
(
command
,
row
)
{
function
handleCommand
(
command
,
row
)
{
switch
(
command
)
{
switch
(
command
)
{
case
"
handleRun
"
:
case
"
handleRun
"
:
handleRun
(
row
);
handleRun
(
row
);
...
@@ -340,84 +340,92 @@ function handleClick(){
...
@@ -340,84 +340,92 @@ function handleClick(){
default
:
default
:
break
;
break
;
}
}
}
}
// 任务状态修改
// 任务状态修改
function
handleStatusChange
(
row
)
{
function
handleStatusChange
(
row
)
{
let
text
=
row
.
status
===
"
0
"
?
"
启用
"
:
"
停用
"
;
let
text
=
row
.
status
===
"
0
"
?
"
启用
"
:
"
停用
"
;
proxy
.
$modal
.
confirm
(
'
确认要"
'
+
text
+
'
""
'
+
row
.
jobName
+
'
"任务吗?
'
).
then
(
function
()
{
proxy
.
$modal
.
confirm
(
'
确认要"
'
+
text
+
'
""
'
+
row
.
jobName
+
'
"任务吗?
'
)
.
then
(
function
()
{
return
changeJobStatus
(
row
.
jobId
,
row
.
status
);
return
changeJobStatus
(
row
.
jobId
,
row
.
status
);
}).
then
(()
=>
{
})
.
then
(()
=>
{
proxy
.
$modal
.
msgSuccess
(
text
+
"
成功
"
);
proxy
.
$modal
.
msgSuccess
(
text
+
"
成功
"
);
}).
catch
(
function
()
{
})
.
catch
(
function
()
{
row
.
status
=
row
.
status
===
"
0
"
?
"
1
"
:
"
0
"
;
row
.
status
=
row
.
status
===
"
0
"
?
"
1
"
:
"
0
"
;
});
});
}
}
/* 立即执行一次 */
/* 立即执行一次 */
function
handleRun
(
row
)
{
function
handleRun
(
row
)
{
proxy
.
$modal
.
confirm
(
'
确认要立即执行一次"
'
+
row
.
jobName
+
'
"任务吗?
'
).
then
(
function
()
{
proxy
.
$modal
.
confirm
(
'
确认要立即执行一次"
'
+
row
.
jobName
+
'
"任务吗?
'
)
.
then
(
function
()
{
return
runJob
(
row
.
jobId
,
row
.
jobGroup
);
return
runJob
(
row
.
jobId
,
row
.
jobGroup
);
}).
then
(()
=>
{
})
proxy
.
$modal
.
msgSuccess
(
"
执行成功
"
);})
.
then
(()
=>
{
.
catch
(()
=>
{});
proxy
.
$modal
.
msgSuccess
(
"
执行成功
"
);
}
})
.
catch
(()
=>
{
});
}
/** 任务详细信息 */
/** 任务详细信息 */
function
handleView
(
row
)
{
function
handleView
(
row
)
{
getJob
(
row
.
jobId
).
then
(
response
=>
{
getJob
(
row
.
jobId
).
then
(
(
response
)
=>
{
form
.
value
=
response
.
data
;
form
.
value
=
response
.
data
;
openView
.
value
=
true
;
openView
.
value
=
true
;
});
});
}
}
/** cron表达式按钮操作 */
/** cron表达式按钮操作 */
function
handleShowCron
()
{
function
handleShowCron
()
{
expression
.
value
=
form
.
value
.
cronExpression
;
expression
.
value
=
form
.
value
.
cronExpression
;
openCron
.
value
=
true
;
openCron
.
value
=
true
;
}
}
/** 确定后回传值 */
/** 确定后回传值 */
function
crontabFill
(
value
)
{
function
crontabFill
(
value
)
{
form
.
value
.
cronExpression
=
value
;
form
.
value
.
cronExpression
=
value
;
}
}
/** 任务日志列表查询 */
/** 任务日志列表查询 */
function
handleJobLog
(
row
)
{
function
handleJobLog
(
row
)
{
const
jobId
=
row
.
jobId
||
0
;
const
jobId
=
row
.
jobId
||
0
;
router
.
push
(
'
/monitor/job-log/index/
'
+
jobId
)
router
.
push
(
"
/monitor/job-log/index/
"
+
jobId
);
}
}
/** 新增按钮操作 */
/** 新增按钮操作 */
function
handleAdd
()
{
function
handleAdd
()
{
reset
();
reset
();
open
.
value
=
true
;
open
.
value
=
true
;
title
.
value
=
"
添加任务
"
;
title
.
value
=
"
添加任务
"
;
}
}
/** 修改按钮操作 */
/** 修改按钮操作 */
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
reset
();
reset
();
const
jobId
=
row
.
jobId
||
ids
.
value
;
const
jobId
=
row
.
jobId
||
ids
.
value
;
getJob
(
jobId
).
then
(
response
=>
{
getJob
(
jobId
).
then
(
(
response
)
=>
{
form
.
value
=
response
.
data
;
form
.
value
=
response
.
data
;
open
.
value
=
true
;
open
.
value
=
true
;
title
.
value
=
"
修改任务
"
;
title
.
value
=
"
修改任务
"
;
});
});
}
}
/** 提交按钮 */
/** 提交按钮 */
function
submitForm
()
{
function
submitForm
()
{
proxy
.
$refs
[
"
jobRef
"
].
validate
(
valid
=>
{
proxy
.
$refs
[
"
jobRef
"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
form
.
value
.
jobId
!=
undefined
)
{
if
(
form
.
value
.
jobId
!=
undefined
)
{
updateJob
(
form
.
value
).
then
(
response
=>
{
updateJob
(
form
.
value
).
then
((
response
)
=>
{
proxy
.
$modal
.
msgSuccess
(
"
修改成功
"
);
proxy
.
$modal
.
msgSuccess
(
"
修改成功
"
);
open
.
value
=
false
;
open
.
value
=
false
;
getList
();
getList
();
});
});
}
else
{
}
else
{
addJob
(
form
.
value
).
then
(
response
=>
{
addJob
(
form
.
value
).
then
((
response
)
=>
{
proxy
.
$modal
.
msgSuccess
(
"
新增成功
"
);
proxy
.
$modal
.
msgSuccess
(
"
新增成功
"
);
open
.
value
=
false
;
open
.
value
=
false
;
getList
();
getList
();
...
@@ -425,31 +433,38 @@ function handleClick(){
...
@@ -425,31 +433,38 @@ function handleClick(){
}
}
}
}
});
});
}
}
/** 删除按钮操作 */
/** 删除按钮操作 */
function
handleDelete
(
row
)
{
function
handleDelete
(
row
)
{
const
jobIds
=
row
.
jobId
||
ids
.
value
;
const
jobIds
=
row
.
jobId
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
'
是否确认删除定时任务编号为"
'
+
jobIds
+
'
"的数据项?
'
).
then
(
function
()
{
proxy
.
$modal
.
confirm
(
'
是否确认删除定时任务编号为"
'
+
jobIds
+
'
"的数据项?
'
)
.
then
(
function
()
{
return
delJob
(
jobIds
);
return
delJob
(
jobIds
);
}).
then
(()
=>
{
})
.
then
(()
=>
{
getList
();
getList
();
proxy
.
$modal
.
msgSuccess
(
"
删除成功
"
);
proxy
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
})
}
.
catch
(()
=>
{
});
}
/** 导出按钮操作 */
/** 导出按钮操作 */
function
handleExport
()
{
function
handleExport
()
{
proxy
.
download
(
"
monitor/job/export
"
,
{
proxy
.
download
(
"
monitor/job/export
"
,
{
...
queryParams
.
value
,
...
queryParams
.
value
,
},
`job_
${
new
Date
().
getTime
()}
.xlsx`
);
},
}
`job_
${
new
Date
().
getTime
()}
.xlsx`
);
}
getList
();
getList
();
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.left-list
{
.left-list
{
min-height
:
700px
;
min-height
:
700px
;
}
}
</
style
>
</
style
>
src/views/videoControl/videoPreview/index.vue
View file @
c3f04157
...
@@ -28,179 +28,179 @@
...
@@ -28,179 +28,179 @@
</div>
</div>
</el-card>
</el-card>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"16
"
>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"14
"
>
<el-scrollbar
height=
"700px"
>
<el-scrollbar
height=
"700px"
>
<el-card
class=
"right-list"
>
<el-card
class=
"right-list"
>
<template
v-slot:header
>
<template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt=
""
>
<span>
视频预览
</span>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt
/>
<span>
视频预览
</span>
</div>
</div>
</
template
>
</
template
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<
!-- <
el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-col :span="1.5">
<el-button
<el-button type="primary" plain @click="handleUpdate">一分屏</el-button>
type=
"primary"
plain
@
click=
"handleUpdate"
>
一分屏
</el-button>
</el-col>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5">
<el-button
<el-button type="primary" plain @click="handleUpdate">四分屏</el-button>
type=
"primary"
plain
@
click=
"handleUpdate"
>
四分屏
</el-button>
</el-col>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5">
<el-button
<el-button type="primary" plain @click="handleDelete">六分屏</el-button>
type=
"primary"
plain
@
click=
"handleDelete"
>
六分屏
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
-->
<div
class=
"alg-list"
>
<div
class=
"alg-list"
>
<el-card
v-for=
"item in algorithmList"
:key=
"item.name"
class=
"alg-item"
shadow=
"hover"
>
<el-card
<
template
v-slot:header
>
class=
"alg-item"
<div
class=
"cleartitle"
>
shadow=
"hover"
<span>
{{
item
.
name
}}
</span>
<el-tag
:type=
"'success'"
effect=
"dark"
>
>
{{
'
success
'
}}
<
template
v-slot:default
>
</el-tag>
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
</div>
</
template
>
<
template
v-slot:default
>
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
<p
style=
"color: #999999;font-size: 12px;"
>
通过摄像头识别吸烟行为的智能算法
</p>
<div
style=
"display: flex;justify-content: flex-end;position: absolute;right: 15px;bottom: 10px;"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(item)"
>
修改
</el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(item)"
>
删除
</el-button>
<el-dropdown
trigger=
"click"
@
command=
"handleSetSize"
>
<el-button
link
type=
"primary"
>
<el-icon
class=
"el-icon--right"
>
<arrow-down
/>
</el-icon>
更多
</el-button>
<template
#dropdown
>
<el-dropdown-menu>
<el-dropdown-item
:command=
"'卸载'"
>
{{
'
卸载
'
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"'导入'"
>
{{
'
导入
'
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"'下载'"
>
{{
'
下载
'
}}
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</div>
</
template
>
</
template
>
</el-card>
</el-card>
</div>
</div>
</el-card>
</el-card>
</el-scrollbar>
</el-scrollbar>
</el-col>
</el-col>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"6"
>
<el-card
class=
"left-list"
>
<el-scrollbar
height=
"700px"
>
<el-card
class=
"danger-list"
>
<
template
v-slot:header
>
<
template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt=
""
>
<span>
实时预警
</span>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt
/>
<span>
实时预警
</span>
</div>
</div>
</
template
>
</
template
>
<div
class=
"alg-list"
>
<el-card
v-for=
"item in algorithmList"
:key=
"item.name"
class=
"alg-item"
shadow=
"hover"
>
<
template
v-slot:default
>
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
<el-form
:model=
"form"
label-width=
"100px"
>
<el-form-item
label=
"预警设备:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"登录信息:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"预警区域:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"预警类型:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"预警时间:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"预警等级:"
><el-tag
:type=
"'danger'"
effect=
"dark"
>
{{
'
一级预警
'
}}
</el-tag></el-form-item>
</el-form>
</
template
>
</el-card>
</div>
</el-card>
</el-card>
</el-scrollbar>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
</template>
</template>
<
script
setup
name=
"Index"
>
<
script
setup
name=
"Index"
>
import
{
ArrowDown
}
from
'
@element-plus/icons-vue
'
import
{
ArrowDown
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
algFormRef
=
ref
(
null
)
const
algFormRef
=
ref
(
null
);
const
nowText
=
ref
(
'
视频预览
'
)
const
nowText
=
ref
(
"
视频预览
"
);
const
deptName
=
ref
(
""
);
const
deptName
=
ref
(
""
);
const
algorithmList
=
reactive
([
const
deptOptions
=
ref
(
undefined
);
const
algorithmList
=
reactive
([
{
{
name
:
"
我的算法
"
,
name
:
"
我的算法
"
,
value
:
1
value
:
1
,
},
},
{
{
name
:
"
最新算法
"
,
name
:
"
最新算法
"
,
value
:
2
value
:
2
,
},
},
{
{
name
:
"
基础算法
"
,
name
:
"
基础算法
"
,
value
:
3
value
:
3
,
},
},
{
{
name
:
"
智慧煤矿
"
,
name
:
"
智慧煤矿
"
,
value
:
4
value
:
4
,
},
},
{
{
name
:
"
智慧能源
"
,
name
:
"
智慧能源
"
,
value
:
5
value
:
5
,
},
},
{
{
name
:
"
智慧校园
"
,
name
:
"
智慧校园
"
,
value
:
6
value
:
6
,
},
},
{
{
name
:
"
智慧港口
"
,
name
:
"
智慧港口
"
,
value
:
7
value
:
7
,
},
},
{
{
name
:
"
智慧煤矿
"
,
name
:
"
智慧煤矿
"
,
value
:
8
value
:
8
,
},
},
{
{
name
:
"
智慧能源
"
,
name
:
"
智慧能源
"
,
value
:
9
value
:
9
,
},
},
{
{
name
:
"
智慧校园
"
,
name
:
"
智慧校园
"
,
value
:
10
value
:
10
,
},
]);
const
data
=
reactive
({
form
:
{
title
:
'
测试测试测试
'
},
},
])
const
data
=
reactive
({
form
:
{},
queryParams
:
{
queryParams
:
{
postCode
:
undefined
,
postCode
:
undefined
,
searchValue
:
''
,
searchValue
:
""
,
status
:
undefined
status
:
undefined
,
},
},
rules
:
{
rules
:
{
postName
:
[{
required
:
true
,
message
:
"
岗位名称不能为空
"
,
trigger
:
"
blur
"
}],
postName
:
[
postCode
:
[{
required
:
true
,
message
:
"
岗位编码不能为空
"
,
trigger
:
"
blur
"
}],
{
required
:
true
,
message
:
"
岗位名称不能为空
"
,
trigger
:
"
blur
"
},
postSort
:
[{
required
:
true
,
message
:
"
岗位顺序不能为空
"
,
trigger
:
"
blur
"
}],
],
}
postCode
:
[
});
{
required
:
true
,
message
:
"
岗位编码不能为空
"
,
trigger
:
"
blur
"
},
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
],
// function closeNow(){
postSort
:
[
// const routerArr=useTagsViewStore().visitedViews
{
required
:
true
,
message
:
"
岗位顺序不能为空
"
,
trigger
:
"
blur
"
},
// const nowPath=location.pathname
],
// return routerArr.filter(item=>{return item.path==nowPath })[0]
},
// }
});
// setTimeout(() => {
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
// nowText=closeNow()
/** 通过条件过滤节点 */
// }, 500);
const
filterNode
=
(
value
,
data
)
=>
{
// function goTarget(url) {
if
(
!
value
)
return
true
;
// window.open(url, '__blank')
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
// }
};
function
handAdd
(
row
){
algFormRef
.
value
.
handleAdd
()
// function closeNow(){
}
// const routerArr=useTagsViewStore().visitedViews
function
handleSetSize
(
row
)
{
// const nowPath=location.pathname
console
.
log
(
'
%c [ row ]-170
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
row
)
// return routerArr.filter(item=>{return item.path==nowPath })[0]
// }
// setTimeout(() => {
// nowText=closeNow()awdasa
// }, 500);
// function goTarget(url) {
// window.open(url, '__blank')
// }
function
handleNodeClick
(
row
)
{
}
function
handAdd
(
row
)
{
algFormRef
.
value
.
handleAdd
();
}
function
handleSetSize
(
row
)
{
console
.
log
(
"
%c [ row ]-170
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
row
);
// reset();
// reset();
// const postId = row.postId || ids.value;
// const postId = row.postId || ids.value;
// getPost(postId).then(response => {
// getPost(postId).then(response => {
...
@@ -208,8 +208,8 @@
...
@@ -208,8 +208,8 @@
// open.value = true;
// open.value = true;
// title.value = "修改岗位";
// title.value = "修改岗位";
// });
// });
}
}
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
// reset();
// reset();
// const postId = row.postId || ids.value;
// const postId = row.postId || ids.value;
// getPost(postId).then(response => {
// getPost(postId).then(response => {
...
@@ -217,10 +217,10 @@
...
@@ -217,10 +217,10 @@
// open.value = true;
// open.value = true;
// title.value = "修改岗位";
// title.value = "修改岗位";
// });
// });
}
}
/** 删除按钮操作 */
/** 删除按钮操作 */
function
handleDelete
(
row
)
{
function
handleDelete
(
row
)
{
// const postIds = row.postId || ids.value;
// const postIds = row.postId || ids.value;
// proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
// proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
// return delPost(postIds);
// return delPost(postIds);
...
@@ -228,35 +228,59 @@
...
@@ -228,35 +228,59 @@
// getList();
// getList();
// proxy.$modal.msgSuccess("删除成功");
// proxy.$modal.msgSuccess("删除成功");
// }).catch(() => {});
// }).catch(() => {});
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.left-list
{
<
style
scoped
lang=
"scss"
>
min-height
:
700px
;
.left-list
{
}
.right-list
{
min-height
:
700px
;
min-height
:
700px
;
.alg-list
{
display
:
grid
;
// grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap
:
16px
;
.el-card
{
border
:
1px
soild
#ff6700
;
}
.alg-item
{
width
:
100%
;
// min-height: 350px;
cursor
:
pointer
;
position
:
relative
;
}
}
}
.right-list
{
}
.danger-list
{
min-height
:
700px
;
min-height
:
700px
;
.alg-list
{
.alg-list
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
2
80px
,
1fr
));
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
1
80px
,
1fr
));
gap
:
16px
;
gap
:
16px
;
.alg-item
{
.el-card
{
border
:
1px
soild
#ff6700
;
}
.alg-item
{
width
:
100%
;
width
:
100%
;
min-height
:
350px
;
//
min-height: 350px;
cursor
:
pointer
;
cursor
:
pointer
;
position
:
relative
;
position
:
relative
;
}
}
.el-form-item--default
,
.el-form-item
{
font-size
:
12px
;
margin-bottom
:
0px
;
}
}
}
}
.cleartitle
{
}
.cleartitle
{
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
600
;
font-weight
:
600
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
align-items
:
center
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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