Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 64a24323
authored
Jun 23, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交稳定版本
1 parent
b8787dfc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
29 deletions
dist.zip
src/api/task/index.js
src/api/task/urls.js
src/store/state.js
src/views/Login.vue
src/views/taskManage/editVideo.vue
src/views/taskManage/subtask.vue
dist.zip
View file @
64a2432
No preview for this file type
src/api/task/index.js
View file @
64a2432
...
@@ -27,6 +27,9 @@ export default {
...
@@ -27,6 +27,9 @@ export default {
getSubTask
(
taskid
)
{
getSubTask
(
taskid
)
{
return
api
.
get
(
urls
.
getSubTask
(
taskid
));
return
api
.
get
(
urls
.
getSubTask
(
taskid
));
},
},
addSubtaskList
(
taskid
,
params
)
{
return
api
.
post
(
urls
.
setSubTaskList
(
taskid
),
params
);
},
getStream
(
devid
,
vrefid
,
params
)
{
getStream
(
devid
,
vrefid
,
params
)
{
return
api
.
post
(
urls
.
getstream
(
devid
,
vrefid
),
params
);
return
api
.
post
(
urls
.
getstream
(
devid
,
vrefid
),
params
);
},
},
...
...
src/api/task/urls.js
View file @
64a2432
...
@@ -22,6 +22,9 @@ export default {
...
@@ -22,6 +22,9 @@ export default {
setSubTask
:
id
=>
{
setSubTask
:
id
=>
{
return
`
${
baseUrl
}
/api/v1/devconf_fx/tasks/
${
id
}
/subtask`
;
return
`
${
baseUrl
}
/api/v1/devconf_fx/tasks/
${
id
}
/subtask`
;
},
},
setSubTaskList
:
id
=>
{
return
`
${
baseUrl
}
/api/v1/devconf_fx/tasks/
${
id
}
/subtask/batch`
;
},
getstream
:
(
devid
,
vrefid
)
=>
{
getstream
:
(
devid
,
vrefid
)
=>
{
return
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
devid
}
/vchans/
${
vrefid
}
/live`
;
return
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
devid
}
/vchans/
${
vrefid
}
/live`
;
},
},
...
...
src/store/state.js
View file @
64a2432
src/views/Login.vue
View file @
64a2432
...
@@ -127,9 +127,19 @@ export default {
...
@@ -127,9 +127,19 @@ export default {
this
.
getEventList
();
this
.
getEventList
();
this
.
getDev
();
this
.
getDev
();
this
.
getMenu
(
res
.
user_unid
);
this
.
getMenu
(
res
.
user_unid
);
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
enote
});
}
}
})
})
.
catch
(
err
=>
{});
.
catch
(
err
=>
{
this
.
$message
({
type
:
"error"
,
message
:
err
});
});
},
},
getMenu
(
id
)
{
getMenu
(
id
)
{
//获取菜单
//获取菜单
...
...
src/views/taskManage/editVideo.vue
View file @
64a2432
...
@@ -31,18 +31,14 @@
...
@@ -31,18 +31,14 @@
<videoplay
ref=
"video"
:playurl=
"play_url"
></videoplay>
<videoplay
ref=
"video"
:playurl=
"play_url"
></videoplay>
</div>
</div>
<div
class=
"tableBox"
>
<div
class=
"tableBox"
>
<el-table
<el-table
height=
"286"
:data=
"tableData"
border
width=
"300"
>
height=
"286"
<el-table-column
align=
"center"
prop=
"name"
label=
"视频源名称"
>
:data=
"tableData"
<template
slot-scope=
"scope"
>
border
<div
@
click=
"rowclick(scope.row)"
>
@
current-change=
"rowclick"
{{
scope
.
row
.
name
}}
width=
"300"
</div>
>
</
template
>
<el-table-column
</el-table-column>
align=
"center"
prop=
"name"
label=
"视频源名称"
></el-table-column>
<el-table-column
align=
"center"
label=
"视频状态"
>
<el-table-column
align=
"center"
label=
"视频状态"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-html=
"statusFormatter(scope.row)"
></div>
<div
v-html=
"statusFormatter(scope.row)"
></div>
...
@@ -87,7 +83,7 @@
...
@@ -87,7 +83,7 @@
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
save
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
editsubTask
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
...
@@ -213,7 +209,8 @@ export default {
...
@@ -213,7 +209,8 @@ export default {
}
}
}
}
if
(
data
.
leaf
&&
!
staus
)
{
if
(
data
.
leaf
&&
!
staus
)
{
this
.
editsubTask
(
data
);
// this.editsubTask(data);
this
.
tableData
.
push
(
data
);
staus
=
false
;
staus
=
false
;
}
}
},
},
...
@@ -223,8 +220,11 @@ export default {
...
@@ -223,8 +220,11 @@ export default {
this
.
$emit
(
"refresh"
);
this
.
$emit
(
"refresh"
);
});
});
},
},
editsubTask
(
vchan
)
{
editsubTask
()
{
let
status
=
true
;
let
status
=
true
;
let
subData
=
[];
this
.
tableData
.
map
(
e
=>
{
let
vchan
=
e
;
let
data
=
{
let
data
=
{
is_dome
:
false
,
is_dome
:
false
,
subtask_name
:
vchan
.
name
,
subtask_name
:
vchan
.
name
,
...
@@ -239,15 +239,19 @@ export default {
...
@@ -239,15 +239,19 @@ export default {
flag
:
1
flag
:
1
}
}
};
};
this
.
$api
.
task
.
editSubTask
(
this
.
editData
.
task_id
,
data
).
then
(
res
=>
{
subData
.
push
(
data
);
});
console
.
log
(
subData
);
this
.
$api
.
task
.
addSubtaskList
(
this
.
editData
.
task_id
,
subData
)
.
then
(
res
=>
{
if
(
res
&&
res
.
ecode
!=
"500"
)
{
if
(
res
&&
res
.
ecode
!=
"500"
)
{
this
.
$message
({
this
.
$message
({
message
:
"添加成功"
,
message
:
"添加成功"
,
type
:
"success"
type
:
"success"
});
});
res
.
name
=
vchan
.
name
;
this
.
setvisible
=
false
;
res
.
subtask_id
=
res
.
id
;
this
.
$emit
(
"refresh"
);
this
.
tableData
.
push
(
res
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
enote
);
this
.
$message
.
error
(
res
.
enote
);
}
}
...
@@ -314,6 +318,8 @@ export default {
...
@@ -314,6 +318,8 @@ export default {
this
.
$refs
.
tree
.
setCheckedKeys
(
arr
);
this
.
$refs
.
tree
.
setCheckedKeys
(
arr
);
},
},
rowclick
(
row
)
{
rowclick
(
row
)
{
//播放视频
// this.vchanClick(row);
// console.log("row", row);
// console.log("row", row);
// this.play_url = {
// this.play_url = {
// rtsp_url: row.play_url
// rtsp_url: row.play_url
...
...
src/views/taskManage/subtask.vue
View file @
64a2432
<
template
>
<
template
>
<div
class=
"expande-table-row"
>
<div
class=
"expande-table-row"
>
<span
class=
"label labelindex"
>
{{
subindex
+
1
}}
</span>
<span
class=
"label labelindex"
>
{{
subindex
+
1
}}
</span>
<
el-tooltip
class=
"item"
effect=
"dark"
:content=
"subTaskData.info"
placement=
"top-start"
><span
class=
"subtask-info taskstatus"
v-html=
"formater(subTaskData)"
></span></el-tooltip
>
<
span
class=
"subtask-info taskstatus"
v-html=
"formater(subTaskData)"
@
click=
"showinfo(subTaskData)"
></span
>
<span
class=
"label"
>
视频源文件
</span>
<span
class=
"label"
>
视频源文件
</span>
<span
class=
"subtask-info"
>
{{
subTaskData
.
vchan_name
}}
</span>
<span
class=
"subtask-info"
>
{{
subTaskData
.
vchan_name
}}
</span>
<span
class=
"label"
>
任务ID
</span>
<span
class=
"label"
>
任务ID
</span>
...
@@ -12,7 +12,9 @@
...
@@ -12,7 +12,9 @@
<span
class=
"subtask-info"
>
{{
subTaskData
.
video_busy
}}
</span>
<span
class=
"subtask-info"
>
{{
subTaskData
.
video_busy
}}
</span>
<span
class=
"label"
>
设备容量
</span>
<span
class=
"label"
>
设备容量
</span>
<span
class=
"subtask-info"
>
{{
subTaskData
.
video_total
}}
</span>
-->
<span
class=
"subtask-info"
>
{{
subTaskData
.
video_total
}}
</span>
-->
<span
class=
"label"
>
分析设备
</span>
<span
class=
"label"
>
任务信息
</span>
<span
class=
"subtask-info"
>
{{
subTaskData
.
info
}}
</span>
<!--
<span
class=
"label"
>
分析设备
</span>
<span
class=
"subtask-info"
>
<span
class=
"subtask-info"
>
<el-select
v-model=
"assign_id"
>
<el-select
v-model=
"assign_id"
>
<el-option
<el-option
...
@@ -37,7 +39,7 @@
...
@@ -37,7 +39,7 @@
{{
item
.
in_ip
}}
{{
item
.
license_info
.
platType
}}
{{
item
.
in_ip
}}
{{
item
.
license_info
.
platType
}}
</el-option>
</el-option>
</el-select>
</el-select>
</span>
</span>
-->
<span
class=
"label sub-btn"
@
click=
"subMove"
hidden
>
确定
</span>
<span
class=
"label sub-btn"
@
click=
"subMove"
hidden
>
确定
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -100,10 +102,13 @@ export default {
...
@@ -100,10 +102,13 @@ export default {
}
else
{
}
else
{
return
"<span class='errorbox statusbox'>异常</span>"
;
return
"<span class='errorbox statusbox'>异常</span>"
;
}
}
},
showinfo
(
data
){
console
.
log
(
"任务状态信息:"
,
data
.
info
);
}
}
},
},
created
()
{
created
()
{
console
.
log
(
this
.
subTaskData
);
//
console.log(this.subTaskData);
},
},
watch
:
{},
watch
:
{},
mounted
()
{}
mounted
()
{}
...
@@ -131,10 +136,10 @@ export default {
...
@@ -131,10 +136,10 @@ export default {
line-height
:
40px
;
line-height
:
40px
;
}
}
.labelindex
{
.labelindex
{
width
:
3
vw
;
width
:
4
vw
;
}
}
.taskstatus
{
.taskstatus
{
width
:
6
vw
;
width
:
8
vw
;
}
}
.subtask-info
{
.subtask-info
{
border-left
:
1px
solid
#f0f0f0
;
border-left
:
1px
solid
#f0f0f0
;
...
@@ -144,14 +149,15 @@ export default {
...
@@ -144,14 +149,15 @@ export default {
line-height
:
40px
;
line-height
:
40px
;
}
}
.subtask-info
:nth-child
(
4
)
{
.subtask-info
:nth-child
(
4
)
{
width
:
8
vw
;
width
:
10
vw
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.subtask-info
:nth-child
(
6
)
{
.subtask-info
:nth-child
(
6
)
{
width
:
1
5
vw
;
width
:
1
8
vw
;
}
}
.subtask-info
:nth-child
(
8
)
{
.subtask-info
:nth-child
(
8
)
{
width
:
12vw
;
width
:
16vw
;
border-right
:
1px
solid
#f0f0f0
;
}
}
.subtask-info
:nth-child
(
10
)
{
.subtask-info
:nth-child
(
10
)
{
width
:
3vw
;
width
:
3vw
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment