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 8f739a8a
authored
Mar 11, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改展示页 上线环境IP
1 parent
91972a43
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
342 additions
and
269 deletions
src/App.vue
src/api/baseUrl.js
src/api/resource/index.js
src/views/Show.vue
src/views/resource/treeComponents/cameraDialog.vue
src/views/sceneManage/setting/area.vue
src/views/sceneManage/setting/areaconfig/TraficCanvas.vue
src/views/sceneManage/setting/areaconfig/trafficback.vue
src/views/sceneManage/setting/demarcate.vue
src/views/sceneManage/setting/index.vue
src/views/sceneManage/setting/parameter.vue
src/App.vue
View file @
8f739a8
...
...
@@ -16,7 +16,7 @@ export default {
}
let
token
=
localStorage
.
getItem
(
"atoken"
);
if
(
!
token
)
{
alert
(
'errtoken'
)
console
.
log
(
'errtoken'
)
this
.
$router
.
push
(
"/login"
);
}
},
...
...
src/api/baseUrl.js
View file @
8f739a8
...
...
@@ -10,7 +10,7 @@ switch (process.env.NODE_ENV) {
baseUrl
=
"https://pre-server.feleti.cn"
;
// 预上线环境url
break
;
case
"production"
:
baseUrl
=
"http://
192.168.9.133:2008
0"
;
// 生产环境url
baseUrl
=
"http://
vion-panda.51vip.biz:5251
0"
;
// 生产环境url
break
;
}
...
...
src/api/resource/index.js
View file @
8f739a8
import
api
from
'../index'
import
baseUrl
from
'../baseUrl'
import
api
from
"../index"
;
import
baseUrl
from
"../baseUrl"
;
export
default
{
devs
(
params
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs`
,
params
)
},
treeList
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchan_struct`
,
params
)
},
getVideoList
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans`
,
params
)
},
addCode
(
params
,
id
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes`
,
params
)
},
addNode
(
params
,
id
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/org`
,
params
)
},
getCode
(
params
,
id
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes`
,
params
)
},
editCamera
(
params
,
id
,
unid
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes/
${
unid
}
`
,
params
)
},
delCode
(
params
,
id
,
unid
){
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes/
${
unid
}
`
,
params
)
},
delOrg
(
params
,
id
){
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/org/
${
id
}
`
,
params
)
},
delCamera
(
params
,
id
,
id2
){
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
)
},
getCameraTable
(
params
,
id
,
id2
){
console
.
log
(
id2
)
if
(
id2
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
)
}
else
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans`
,
params
)
devs
(
params
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs`
,
params
);
},
treeList
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchan_struct`
,
params
);
},
getVideoList
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans`
,
params
);
},
addCode
(
params
,
id
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes`
,
params
);
},
addNode
(
params
,
id
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/org`
,
params
);
},
getCode
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes`
,
params
);
},
editCamera
(
params
,
id
,
unid
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes/
${
unid
}
`
,
params
);
},
delCode
(
params
,
id
,
unid
)
{
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/codes/custom/cates/
${
id
}
/codes/
${
unid
}
`
,
params
);
},
delOrg
(
params
,
id
)
{
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/org/
${
id
}
`
,
params
);
},
delCamera
(
params
,
id
,
id2
)
{
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
);
},
getCameraTable
(
params
,
id
,
id2
)
{
console
.
log
(
id2
);
if
(
id2
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
);
}
else
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans`
,
params
);
}
},
editVideo
(
params
,
id
,
id2
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
)
},
editCamera
(
params
,
id
,
id2
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
)
},
uploadFile
(
params
,
id
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vfile_vchans`
,
params
,{
'Content-Type'
:
'multipart/form-data'
})
},
getResource
(
params
,
id
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/status`
,
params
)
},
getDevsName
(
params
,
id
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/fx_devs`
,
params
)
},
getStoreConList
(
params
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs`
,
params
)
},
uploadStore
(
params
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs`
,
params
,{
'Content-Type'
:
'multipart/form-data'
})
},
getSubTask
(
params
,
id
){
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/tasks/
${
id
}
/subtasks`
,
params
)
},
delStore
(
params
,
id
){
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs/
${
id
}
`
,
params
)
editVideo
(
params
,
id
,
id2
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
);
},
getsip
(
params
,
id
,
id2
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/sip_server`
,
params
)
addCamera
(
params
,
id
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans`
,
params
);
},
addSip
(
params
,
id
,
id2
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/sip_server`
,
params
)
editCamera
(
params
,
id
,
id2
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vchans/
${
id2
}
`
,
params
);
},
editSip
(
params
,
id
,
id2
,
id3
){
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/
${
id3
}
/sip_server`
,
params
)
uploadFile
(
params
,
id
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/vfile_vchans`
,
params
,
{
"Content-Type"
:
"multipart/form-data"
}
);
},
delSip
(
params
,
id
,
id2
,
id3
){
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/
${
id3
}
/sip_server`
,
params
)
getResource
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/status`
,
params
);
},
getDevsName
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/fx_devs`
,
params
);
},
getStoreConList
(
params
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs`
,
params
);
},
uploadStore
(
params
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs`
,
params
,
{
"Content-Type"
:
"multipart/form-data"
});
},
getSubTask
(
params
,
id
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/tasks/
${
id
}
/subtasks`
,
params
);
},
delStore
(
params
,
id
)
{
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/store_confs/
${
id
}
`
,
params
);
},
getsip
(
params
,
id
,
id2
)
{
return
api
.
get
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/sip_server`
,
params
);
},
addSip
(
params
,
id
,
id2
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/sip_server`
,
params
);
},
editSip
(
params
,
id
,
id2
,
id3
)
{
return
api
.
post
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/
${
id3
}
/sip_server`
,
params
);
},
delSip
(
params
,
id
,
id2
,
id3
)
{
return
api
.
delete
(
`
${
baseUrl
}
/api/v1/devconf_fx/devs/
${
id
}
/
${
id2
}
/
${
id3
}
/sip_server`
,
params
);
}
}
\ No newline at end of file
};
src/views/Show.vue
View file @
8f739a8
<
template
>
<div
class
=
""
>
<div
class
>
<el-header
class=
"headers"
>
<span
class=
"title"
>
实事分析展示
</span>
</el-header>
...
...
@@ -18,22 +18,25 @@
<div
class=
"imgDiv"
>
<!-- 加入img 100% -->
<div
v-if=
"resultData[0]"
>
<img
:src =
"resultData[0].pic"
class=
"photos"
/>
<img
:src=
"resultData[0].pic"
class=
"photos"
/>
</div>
</div>
<div
style=
"padding:0 10px 10px 10px"
>
<div
class=
"textDiv"
>
<div
v-if=
"resultData[0]"
>
<p>
抓拍时间:
{{
resultData
[
0
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
0
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
0
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
0
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
0
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
0
].
illegal_text
}}
</p>
<p>
抓拍时间:
{{
resultData
[
0
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
0
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
0
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
0
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
0
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
0
].
illegal_text
}}
</p>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
...
...
@@ -45,17 +48,17 @@
<div
class=
"leftImg"
>
<!-- 加入img 100% -->
<div
v-if=
"resultData[1]"
>
<img
:src =
"resultData[1].pic"
class=
"photos"
/>
<img
:src=
"resultData[1].pic"
class=
"photos"
/>
</div>
</div>
<div
class=
"rightDiv"
>
<div
v-if=
"resultData[1]"
>
<p>
抓拍时间:
{{
resultData
[
1
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
1
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
1
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
1
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
1
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
1
].
illegal_text
}}
</p>
<p>
抓拍时间:
{{
resultData
[
1
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
1
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
1
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
1
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
1
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
1
].
illegal_text
}}
</p>
</div>
</div>
<div
style=
"clear: both;"
></div>
...
...
@@ -65,17 +68,17 @@
<div
class=
"leftImg"
>
<!-- 加入img 100% -->
<div
v-if=
"resultData[2]"
>
<img
:src =
"resultData[2].pic"
class=
"photos"
/>
<img
:src=
"resultData[2].pic"
class=
"photos"
/>
</div>
</div>
<div
class=
"rightDiv"
>
<div
v-if=
"resultData[2]"
>
<p>
抓拍时间:
{{
resultData
[
2
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
2
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
2
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
2
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
2
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
2
].
illegal_text
}}
</p>
<p>
抓拍时间:
{{
resultData
[
2
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
2
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
2
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
2
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
2
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
2
].
illegal_text
}}
</p>
</div>
</div>
<div
style=
"clear: both;"
></div>
...
...
@@ -85,17 +88,17 @@
<div
class=
"leftImg"
>
<!-- 加入img 100% -->
<div
v-if=
"resultData[3]"
>
<img
:src =
"resultData[3].pic"
class=
"photos"
/>
<img
:src=
"resultData[3].pic"
class=
"photos"
/>
</div>
</div>
<div
class=
"rightDiv"
>
<div
v-if=
"resultData[3]"
>
<p>
抓拍时间:
{{
resultData
[
3
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
3
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
3
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
3
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
3
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
3
].
illegal_text
}}
</p>
<p>
抓拍时间:
{{
resultData
[
3
].
shoot_dt
}}
</p>
<p>
抓拍地点:
{{
resultData
[
3
].
location_name
}}
</p>
<p>
车牌号码:
{{
resultData
[
3
].
vehicle_plate_text
}}
</p>
<p>
车辆类型:
{{
resultData
[
3
].
vehicle_body_type_text
}}
</p>
<p>
车身颜色:
{{
resultData
[
3
].
vehicle_body_color_text
}}
</p>
<p>
违法类型:
{{
resultData
[
3
].
illegal_text
}}
</p>
</div>
</div>
<div
style=
"clear: both;"
></div>
...
...
@@ -109,38 +112,40 @@
</
template
>
<
script
>
import
videoplay
from
'./public/videoPlay'
import
videoplay
from
"./public/videoPlay"
;
export
default
{
name
:
"home"
,
data
(){
return
{
data
()
{
return
{
isCollapse
:
false
,
conHeight
:
0
,
playurl
:
''
,
subtaskid
:
''
,
taskid
:
''
,
showws
:
null
,
keepAlive
:
null
,
quitws
:
false
,
resultData
:
[]
conHeight
:
0
,
playurl
:
""
,
subtaskid
:
""
,
taskid
:
""
,
showws
:
null
,
keepAlive
:
null
,
quitws
:
false
,
resultData
:
[]
};
},
created
(){
this
.
taskid
=
this
.
$route
.
params
.
taskid
this
.
subtaskid
=
this
.
$route
.
params
.
subtaskid
this
.
playurl
=
this
.
$route
.
params
.
playurl
created
()
{
let
url
=
location
.
href
;
let
params
=
url
.
split
(
"?"
)[
1
];
this
.
taskid
=
this
.
getQueryVariable
(
"taskid"
);
this
.
subtaskid
=
this
.
getQueryVariable
(
"subtaskid"
);
this
.
playurl
=
this
.
getQueryVariable
(
"playurl"
);
},
mounted
(){
this
.
$refs
.
videoplay
.
videoPlay
()
mounted
()
{
this
.
$refs
.
videoplay
.
videoPlay
();
},
components
:
{
videoplay
// HelloWorld
},
methods
:{
methods
:
{
connectwebsocket
(
type
)
{
let
that
=
this
;
this
.
connect_id
=
new
Date
().
getTime
();
...
...
@@ -162,6 +167,7 @@ export default {
};
this
.
showws
.
onmessage
=
evt
=>
{
let
data
=
JSON
.
parse
(
evt
.
data
);
// eslint-disable-next-line no-empty
if
(
data
.
command
)
{
}
else
if
(
data
.
type
==
"response"
)
{
console
.
log
(
"请求任务推送成功"
);
...
...
@@ -170,13 +176,16 @@ export default {
try
{
data
.
picsEmpty
=
data
.
pics
.
length
==
0
?
true
:
false
;
data
.
pic
=
data
.
pics
[
0
].
src_url
||
"data:image/jpeg;base64,"
+
data
.
pics
[
0
].
pic_base64
;
data
.
bigpic
=
data
.
pics
[
0
].
src_url
||
"data:image/jpeg;base64,"
+
data
.
pics
[
0
].
pic_base64
;
data
.
pics
[
0
].
src_url
||
"data:image/jpeg;base64,"
+
data
.
pics
[
0
].
pic_base64
;
data
.
bigpic
=
data
.
pics
[
0
].
src_url
||
"data:image/jpeg;base64,"
+
data
.
pics
[
0
].
pic_base64
;
that
.
$buildCode
.
init
(
data
);
if
(
that
.
resultData
.
length
>
4
)
{
that
.
resultData
.
pop
(
data
)
if
(
that
.
resultData
.
length
>
4
)
{
that
.
resultData
.
pop
(
data
);
}
else
{
that
.
resultData
.
unshift
(
data
)
that
.
resultData
.
unshift
(
data
);
}
}
catch
(
err
)
{
console
.
log
(
err
);
...
...
@@ -205,13 +214,24 @@ export default {
}
catch
(
err
)
{
console
.
log
(
err
);
}
},
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
href
.
split
(
"?"
)[
1
];
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
)
{
return
pair
[
1
];
}
}
return
false
;
}
},
beforeMount
()
{
this
.
connectwebsocket
();
//监听成功
this
.
showws
.
onopen
=
()
=>
{
this
.
showws
.
onopen
=
()
=>
{
let
send_mesage
=
'{"type":"request","connect_id": "'
+
this
.
connect_id
+
...
...
@@ -224,14 +244,14 @@ export default {
//监听断开
this
.
showws
.
onclose
=
function
()
{
if
(
quitws
)
return
if
(
quitws
)
return
;
window
.
clearInterval
(
this
.
keepAlive
);
this
.
connectwebsocket
(
1
);
};
},
beforeDestroy
()
{
this
.
showws
.
close
();
this
.
quitws
=
true
this
.
quitws
=
true
;
try
{
window
.
clearTimeout
(
this
.
keepAlive
);
}
catch
(
error
)
{}
...
...
@@ -239,80 +259,80 @@ export default {
};
</
script
>
<
style
scoped=
"scoped"
lang=
"scss"
>
.headers
{
.headers
{
line-height
:
60px
;
}
.title
{
font-size
:
24px
;
font-family
:
MicrosoftYaHeiUI
;
color
:
rgba
(
255
,
255
,
255
,
1
);
-webkit-background-clip
:
text
;
}
.videoCon
{
background
:
#FFFFFF
;
width
:
100%
;
height
:
70vh
;
}
.imgCon
{
}
.title
{
font-size
:
24px
;
font-family
:
MicrosoftYaHeiUI
;
color
:
rgba
(
255
,
255
,
255
,
1
);
-webkit-background-clip
:
text
;
}
.videoCon
{
background
:
#ffffff
;
width
:
100%
;
height
:
70vh
;
background
:
#FFFFFF
;
}
.imgDiv
{
padding
:
0
10px
0
10px
;
height
:
40vh
;
}
.imgDiv
>
div
{
}
.imgCon
{
height
:
70vh
;
background
:
#ffffff
;
}
.imgDiv
{
padding
:
0
10px
0
10px
;
height
:
40vh
;
}
.imgDiv
>
div
{
height
:
100%
;
background
:
#d8d8d8
;
}
.lDiv
{
}
.lDiv
{
float
:
left
;
}
.lDiv
:nth-last-of-type
(
2
)
{
}
.lDiv
:nth-last-of-type
(
2
)
{
margin
:
0
;
}
.rightDiv
{
width
:
10.5vw
;
height
:
20vh
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.rightDiv
{
width
:
10.5vw
;
height
:
20vh
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
border-left
:
none
;
color
:
#555555
;
font-size
:
12px
;
float
:
left
;
}
.rightDiv
p
{
}
.rightDiv
p
{
margin
:
10px
0
;
margin-left
:
10px
;
}
.textDiv
{
height
:
29vh
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.textDiv
{
height
:
29vh
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
color
:
#555555
;
font-size
:
22px
;
}
.textDiv
p
{
font-size
:
22px
;
}
.textDiv
p
{
margin
:
14px
0
;
margin-left
:
37px
;
}
.bottomDiv
{
}
.bottomDiv
{
padding
:
7px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
display
:
flex
;
flex-flow
:
row
nowrap
;
}
.leftImg
{
}
.leftImg
{
width
:
21vw
;
height
:
20.2vh
;
background
:
#d8d8d8
;
overflow
:
hidden
;
float
:
left
;
}
.leftImg
>
div
{
}
.leftImg
>
div
{
height
:
100%
;
width
:
100%
;
}
.photos
{
}
.photos
{
width
:
100%
;
height
:
100%
;
}
}
</
style
>
src/views/resource/treeComponents/cameraDialog.vue
View file @
8f739a8
...
...
@@ -170,7 +170,7 @@
if
(
this
.
type
==
'add'
){
this
.
$refs
[
'cameraDialog'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$api
.
resource
.
addCamera
(
this
.
addVideoParam
,
this
.
devsId
).
then
(
res
=>
{
this
.
$api
.
resource
.
addCamera
(
this
.
addVideoParam
,
localStorage
.
getItem
(
'dev_unid'
)
).
then
(
res
=>
{
if
(
res
.
ecode
==
200
){
this
.
$message
({
message
:
res
.
enote
,
...
...
src/views/sceneManage/setting/area.vue
View file @
8f739a8
...
...
@@ -6,11 +6,19 @@
width=
"1100px"
:before-close=
"beforeHideModal"
>
<TraficCanvas
:bgUrl=
'bgUrl'
v-if=
"type=='0' || type=='5'"
ref=
'canvas'
></TraficCanvas>
<FlowCanvas
:bgUrl=
'bgUrl'
v-if=
"type=='1'"
ref=
'canvas'
></FlowCanvas>
<SafeCanvas
:bgUrl=
'bgUrl'
v-if=
"type=='2'"
ref=
'canvas'
></SafeCanvas>
<FaceCanvas
:bgUrl=
'bgUrl'
v-if=
"type=='4'"
ref=
'canvas'
></FaceCanvas>
<ComplexCanvas
:bgUrl=
'bgUrl'
v-if=
"type=='7'"
ref=
'canvas'
></ComplexCanvas>
<TraficCanvas
:bgUrl=
"bgUrl"
v-if=
"type == '0' || type == '5' || type == '3'"
ref=
"canvas"
></TraficCanvas>
<FlowCanvas
:bgUrl=
"bgUrl"
v-if=
"type == '1'"
ref=
"canvas"
></FlowCanvas>
<SafeCanvas
:bgUrl=
"bgUrl"
v-if=
"type == '2'"
ref=
"canvas"
></SafeCanvas>
<FaceCanvas
:bgUrl=
"bgUrl"
v-if=
"type == '4'"
ref=
"canvas"
></FaceCanvas>
<ComplexCanvas
:bgUrl=
"bgUrl"
v-if=
"type == '7'"
ref=
"canvas"
></ComplexCanvas>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"beforeHideModal"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
确 定
</el-button>
...
...
@@ -19,23 +27,23 @@
</div>
</
template
>
<
script
>
import
TraficCanvas
from
"./areaconfig/TraficCanvas"
;
import
FlowCanvas
from
"./areaconfig/FlowCanvas"
;
import
SafeCanvas
from
"./areaconfig/SafeCanvas"
;
import
FaceCanvas
from
"./areaconfig/FaceCanvas"
;
import
ComplexCanvas
from
"./areaconfig/ComplexCanvas"
;
import
TraficCanvas
from
"./areaconfig/TraficCanvas"
;
import
FlowCanvas
from
"./areaconfig/FlowCanvas"
;
import
SafeCanvas
from
"./areaconfig/SafeCanvas"
;
import
FaceCanvas
from
"./areaconfig/FaceCanvas"
;
import
ComplexCanvas
from
"./areaconfig/ComplexCanvas"
;
export
default
{
data
()
{
return
{
dialogVisible
:
false
,
isShow
:
false
,
type
:
'0'
,
type
:
"0"
,
btnIsactive
:
false
,
showClose
:
false
,
roiBody
:
{},
XMLStr
:
""
,
taskData
:
''
,
bgUrl
:
''
taskData
:
""
,
bgUrl
:
""
};
},
components
:
{
...
...
@@ -46,27 +54,35 @@ export default {
ComplexCanvas
},
methods
:
{
showModal
:
function
(
data
,
mtaskdata
)
{
showModal
:
function
(
data
,
mtaskdata
)
{
var
_this
=
this
;
this
.
$store
.
commit
(
'setocxstate'
,
0
)
this
.
$store
.
commit
(
"setocxstate"
,
0
);
this
.
taskData
=
mtaskdata
;
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
this
.
type
=
data
.
algo_type
;
// this.type = 2;
this
.
bgUrl
=
""
;
//获取视频截图
this
.
$api
.
task
.
cutpic
(
mtaskdata
.
vchan
.
vdev_unid
,
mtaskdata
.
vchan
.
vchan_refid
,
mtaskdata
.
subtask_id
).
then
(
data
=>
{
this
.
$api
.
task
.
cutpic
(
mtaskdata
.
vchan
.
vdev_unid
,
mtaskdata
.
vchan
.
vchan_refid
,
mtaskdata
.
subtask_id
)
.
then
(
data
=>
{
if
(
!
data
.
ecode
)
{
this
.
bgUrl
=
"data:image/png;base64,"
+
data
.
pic_base64
;
setTimeout
(()
=>
{
let
img
=
document
.
getElementById
(
'pic'
).
childNodes
[
0
]
let
img
=
document
.
getElementById
(
"pic"
).
childNodes
[
0
];
let
canvas
=
document
.
createElement
(
"canvas"
);
canvas
.
width
=
800
;
canvas
.
height
=
500
;
try
{
canvas
.
getContext
(
"2d"
).
drawImage
(
img
,
0
,
0
,
800
,
500
);
_this
.
bgUrl
=
canvas
.
toDataURL
(
"image/webp"
);
}
catch
(
error
)
{}
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
500
);
}
else
{
alert
(
"区域设置截图失败!"
+
data
.
enote
);
...
...
@@ -78,14 +94,12 @@ export default {
setTimeout
(()
=>
{
_this
.
$refs
.
canvas
.
stageInit
();
if
(
data
.
rois
)
{
_this
.
$refs
.
canvas
.
configInit
(
data
.
rois
[
0
].
roi
);
_this
.
$refs
.
canvas
.
configInit
(
data
.
rois
[
0
].
roi
);
}
},
300
);
},
beforeHideModal
:
function
()
{
this
.
$store
.
commit
(
'setocxstate'
,
1
)
this
.
$store
.
commit
(
"setocxstate"
,
1
);
this
.
dialogVisible
=
false
;
this
.
$refs
.
canvas
.
clear
();
this
.
$refs
.
canvas
.
cindex
=
0
;
...
...
@@ -101,11 +115,12 @@ export default {
this
.
btnIsactive
=
true
;
try
{
this
.
EditList
(
1
);
}
catch
(
error
)
{}
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
save
:
function
()
{
if
(
this
.
$refs
.
canvas
.
roadFlag
===
false
)
{
this
.
$alert
(
"车道线有修改,请检查车道属性是否正确"
,
"提示"
,
{
confirmButtonText
:
"确定"
});
...
...
@@ -125,8 +140,6 @@ export default {
this
.
beforeHideModal
();
}
}
}
}
;
</
script
>
<
style
lang=
"stylus"
scoped
>
</
style
>
<
style
lang=
"stylus"
scoped
></
style
>
src/views/sceneManage/setting/areaconfig/TraficCanvas.vue
View file @
8f739a8
...
...
@@ -2305,8 +2305,8 @@ export default {
}
},
mounted
()
{
console
.
log
(
eventJson
);
this
.
eventData
=
eventJson
;
//
console.log(eventJson);
//
this.eventData = eventJson;
// this.stageInit()
key
(
"alt+1"
,
()
=>
{
if
(
this
.
istest
)
{
...
...
src/views/sceneManage/setting/areaconfig/trafficback.vue
View file @
8f739a8
...
...
@@ -2299,7 +2299,6 @@ export default {
}
},
mounted
()
{
console
.
log
(
eventJson
)
this
.
eventData
=
eventJson
// this.stageInit()
key
(
'alt+1'
,()
=>
{
...
...
src/views/sceneManage/setting/demarcate.vue
View file @
8f739a8
...
...
@@ -207,8 +207,8 @@ export default {
this
.
stage
.
add
(
this
.
signLayer
);
this
.
layers
=
[
this
.
signLayer
];
}
console
.
log
(
this
.
taskData
.
mtasks
[
0
].
scenes
[
0
].
calibration
);
let
cal
=
this
.
taskData
.
mtasks
[
0
].
scenes
[
0
].
calibration
;
console
.
log
(
this
.
taskData
.
calibration
);
let
cal
=
this
.
taskData
.
calibration
;
if
(
cal
===
null
||
cal
==
undefined
)
{
this
.
configInit
(
""
);
}
...
...
src/views/sceneManage/setting/index.vue
View file @
8f739a8
...
...
@@ -6,8 +6,9 @@
border
stripe
style=
"width: 80%;float:left"
height=
"25vh"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"
80
"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"
50"
align=
"center
"
>
</el-table-column>
<el-table-column
prop=
"name"
...
...
@@ -27,10 +28,10 @@
<el-table-column
prop=
"address"
align=
"center"
label=
"参数设置"
>
<
template
slot-scope=
"scope"
>
<div
class=
"table-set"
>
<span
@
click=
"setParam(scope.row)"
>
参数设置
</span>
<span
@
click=
"setArea(scope.row)"
>
区域设置
</span>
<span
@
click=
"setDemarcate(scope.row)"
>
标定设置
</span>
<span
@
click=
"setTimer(scope.row)"
>
时间设置
</span>
<span
@
click=
"setParam(scope.row
, scope.$index
)"
>
参数设置
</span>
<span
@
click=
"setArea(scope.row
, scope.$index
)"
>
区域设置
</span>
<span
@
click=
"setDemarcate(scope.row
, scope.$index
)"
>
标定设置
</span>
<span
@
click=
"setTimer(scope.row
, scope.$index
)"
>
时间设置
</span>
</div>
</
template
>
</el-table-column>
...
...
@@ -127,6 +128,7 @@ export default {
timer
:
0
,
timersel
:
0
,
timerDialog
:
false
,
curindex
:
0
,
timeroptions
:
[
30
,
40
,
50
,
60
,
100
],
timerscenes
:
null
,
taskInfo
:
{
...
...
@@ -148,14 +150,17 @@ export default {
handleparam
},
methods
:
{
setParam
()
{
this
.
$refs
.
parameter
.
init
(
this
.
taskInfo
);
setParam
(
scenesdata
,
index
)
{
this
.
curindex
=
index
;
this
.
$refs
.
parameter
.
init
(
scenesdata
);
},
setArea
(
roidata
)
{
setArea
(
roidata
,
index
)
{
this
.
curindex
=
index
;
this
.
$refs
.
areas
.
showModal
(
roidata
,
this
.
taskInfo
);
},
setDemarcate
()
{
this
.
$refs
.
demarcate
.
showModal
(
this
.
taskInfo
);
setDemarcate
(
scenesdata
,
index
)
{
this
.
curindex
=
index
;
this
.
$refs
.
demarcate
.
showModal
(
scenesdata
);
},
handleparam
(
type
)
{
this
.
$refs
.
handleparam
.
show
(
type
);
...
...
@@ -195,14 +200,15 @@ export default {
});
},
showview
()
{
this
.
$router
.
push
({
let
routeData
=
this
.
$router
.
resolve
({
name
:
"show"
,
params
:
{
query
:
{
taskid
:
this
.
taskid
,
subtaskid
:
this
.
subtaskid
,
playurl
:
this
.
playurl
}
});
window
.
open
(
routeData
.
href
,
'_blank'
);
},
submit
:
function
(
xml
,
type
)
{
let
postObj
=
{
...
...
@@ -212,31 +218,23 @@ export default {
mtask_unid
:
this
.
taskInfo
.
mtasks
[
0
].
mtask_unid
,
// type: 0,
// priority: 0,
scenes
:
[
{
scene_unid
:
this
.
taskInfo
.
mtasks
[
0
].
scenes
[
0
].
scene_unid
,
play_urls
:
{
rtsp
:
this
.
vchanUrl
}
// algo_args: {}
}
]
scenes
:
this
.
taskInfo
.
mtasks
[
0
].
scenes
}
]
};
if
(
type
==
"roi"
)
{
postObj
.
mtasks
[
0
].
scenes
[
0
].
rois
=
[
postObj
.
mtasks
[
0
].
scenes
[
this
.
curindex
].
rois
=
[
{
roi
:
xml
}
];
}
else
if
(
type
==
"config"
)
{
postObj
.
mtasks
[
0
].
scenes
[
0
].
config
=
{
postObj
.
mtasks
[
0
].
scenes
[
this
.
curindex
].
config
=
{
xml
:
xml
};
}
else
if
(
type
==
"calibration"
)
{
console
.
log
(
xml
);
postObj
.
mtasks
[
0
].
scenes
[
0
].
calibration
=
{
postObj
.
mtasks
[
0
].
scenes
[
this
.
curindex
].
calibration
=
{
calibration
:
xml
};
}
...
...
@@ -254,14 +252,14 @@ export default {
});
switch
(
type
)
{
case
"roi"
:
this
.
taskInfo
.
mtasks
[
0
].
scenes
[
0
].
rois
=
[
this
.
taskInfo
.
mtasks
[
0
].
scenes
[
this
.
curindex
].
rois
=
[
{
roi
:
xml
}
];
break
;
case
"calibration"
:
this
.
taskInfo
.
mtasks
[
0
].
scenes
[
0
].
calibration
=
{
this
.
taskInfo
.
mtasks
[
0
].
scenes
[
this
.
curindex
].
calibration
=
{
calibration
:
xml
};
break
;
...
...
src/views/sceneManage/setting/parameter.vue
View file @
8f739a8
...
...
@@ -4,7 +4,8 @@
title=
"参数设置"
:visible
.
sync=
"dialogVisible"
width=
"50%"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<span>
<iframe
id=
"iframe"
...
...
@@ -28,52 +29,53 @@ export default {
data
()
{
return
{
dialogVisible
:
false
,
XMLStr
:
''
,
basicXml
:
''
,
taskData
:
""
XMLStr
:
""
,
basicXml
:
""
,
taskData
:
""
};
},
methods
:
{
init
(
data
){
this
.
$store
.
commit
(
'setocxstate'
,
0
)
init
(
data
)
{
this
.
$store
.
commit
(
"setocxstate"
,
0
);
this
.
dialogVisible
=
true
;
this
.
taskData
=
data
;
let
that
=
this
;
setTimeout
(()
=>
{
that
.
xmlInit
(
data
.
mtasks
[
0
].
scenes
[
0
]
);
},
800
)
setTimeout
(()
=>
{
that
.
xmlInit
(
data
);
},
800
);
},
balltaskinit
(
data
){
this
.
$store
.
commit
(
'setocxstate'
,
0
)
balltaskinit
(
data
)
{
this
.
$store
.
commit
(
"setocxstate"
,
0
);
this
.
dialogVisible
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
xmlInit
(
data
);
},
800
)
},
800
);
},
xmlInit
:
function
(
obj
)
{
this
.
XMLStr
=
obj
.
config
.
xml
||
'<?xml version="1.0" encoding="GBK"?><root></root>'
console
.
log
(
'XML:'
+
this
.
XMLStr
.
split
(
'@'
).
length
)
if
(
this
.
XMLStr
.
split
(
'@'
).
length
>
1
)
{
this
.
XMLStr
=
'<?xml version="1.0" encoding="GBK"?><root></root>'
xmlInit
:
function
(
obj
)
{
this
.
XMLStr
=
obj
.
config
.
xml
||
'<?xml version="1.0" encoding="GBK"?><root></root>'
;
console
.
log
(
"XML:"
+
this
.
XMLStr
.
split
(
"@"
).
length
);
if
(
this
.
XMLStr
.
split
(
"@"
).
length
>
1
)
{
this
.
XMLStr
=
'<?xml version="1.0" encoding="GBK"?><root></root>'
;
}
this
.
basicXml
=
obj
.
basicConfig
.
xml
;
this
.
$refs
.
iframe
.
contentWindow
.
loadParameterTree
(
this
.
basicXml
,
this
.
XMLStr
);
this
.
$refs
.
iframe
.
contentWindow
.
loadParameterTree
(
this
.
basicXml
,
this
.
XMLStr
);
},
save
:
function
()
{
save
:
function
()
{
this
.
$refs
.
iframe
.
contentWindow
.
submit
();
//ifram 传递回来的饿xml
this
.
XMLStr
=
this
.
$refs
.
iframe
.
contentWindow
.
xmlStr
;
this
.
dialogVisible
=
false
;
this
.
$parent
.
submit
(
this
.
XMLStr
,
'config'
)
this
.
$parent
.
submit
(
this
.
XMLStr
,
"config"
);
},
handleClose
(
done
)
{
this
.
dialogVisible
=
false
;
this
.
$store
.
commit
(
'setocxstate'
,
1
)
this
.
$store
.
commit
(
"setocxstate"
,
1
);
}
}
}
}
;
</
script
>
<
style
lang=
"stylus"
scoped
>
</
style
>
<
style
lang=
"stylus"
scoped
></
style
>
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