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 2d6459fb
authored
Mar 17, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加经纬度地图重置
1 parent
5dad5317
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
238 additions
and
111 deletions
dist.zip
src/api/axios.js
src/assets/css/public.css
src/main.js
src/views/Layout/menu.vue
src/views/Login.vue
src/views/ops/equipment_manage.vue
src/views/ops/systemComponents/showSet.vue
src/views/ops/system_manage.vue
src/views/public/mapvideo2.vue
src/views/resource/Codes/eventcodes.vue
src/views/resource/treeComponents/cameraDialog.vue
src/views/resource/treeComponents/cameraTree.vue
src/views/sceneManage/setting/demarcate.vue
src/views/taskManage/index.vue
src/views/taskManage/subtask.vue
src/views/trafficShow/index.vue
src/views/trafficShow/map.vue
dist.zip
View file @
2d6459f
No preview for this file type
src/api/axios.js
View file @
2d6459f
...
...
@@ -2,27 +2,27 @@ import axios from "axios";
import
store
from
"../store/index.js"
;
import
router
from
"../router/index"
;
import
{
Message
,
Loading
}
from
'element-ui'
import
{
Message
,
Loading
}
from
"element-ui"
;
let
loading
;
//内存中正在请求的数量
let
loadingNum
=
0
;
function
startLoading
()
{
if
(
loadingNum
==
0
)
{
loading
=
Loading
.
service
({
lock
:
true
,
text
:
'拼命加载中...'
,
background
:
'rgba(255,255,255,0.5)'
,
})
}
//请求数量加1
loadingNum
++
;
let
loadingNum
=
0
;
function
startLoading
()
{
if
(
loadingNum
==
0
)
{
loading
=
Loading
.
service
({
lock
:
true
,
text
:
"拼命加载中..."
,
background
:
"rgba(255,255,255,0.5)"
});
}
//请求数量加1
loadingNum
++
;
}
function
endLoading
()
{
//请求数量减1
loadingNum
--
if
(
loadingNum
<=
0
)
{
loading
.
close
()
}
//请求数量减1
loadingNum
--
;
if
(
loadingNum
<=
0
)
{
loading
.
close
();
}
}
// 创建 axios 实例
let
service
=
axios
.
create
({
...
...
@@ -32,64 +32,65 @@ let service = axios.create({
// 添加请求拦截器
service
.
interceptors
.
request
.
use
(
(
config
)
=>
{
startLoading
();
if
(
store
.
state
.
users
.
atoken
)
{
// 判断是否存在token,如果存在的话,则每个http header都加上token
config
.
headers
.
authorization
=
store
.
state
.
users
.
atoken
;
}
else
{
router
.
push
(
"/login"
);
endLoading
();
}
if
(
config
.
method
==
'get'
)
{
config
.
params
=
{
_t
:
Date
.
parse
(
new
Date
())
/
1000
,
...
config
.
params
}
}
return
config
config
=>
{
// startLoading();
let
atoken
=
localStorage
.
getItem
(
"atoken"
);
if
(
atoken
)
{
// 判断是否存在token,如果存在的话,则每个http header都加上token
config
.
headers
.
authorization
=
atoken
;
}
else
{
router
.
push
(
"/login"
);
// endLoading();
}
if
(
config
.
method
==
"get"
)
{
config
.
params
=
{
_t
:
Date
.
parse
(
new
Date
())
/
1000
,
...
config
.
params
};
}
return
config
;
},
(
err
)
=>
{
err
=>
{
// 请求错误处理
return
Promise
.
reject
(
err
)
// config => {
// let token = localStorage.getItem("atoken");
// if (token) {
// // 判断是否存在token,如果存在的话,则每个http header都加上token
// config.headers.authorization = token;
// } else {
// router.push("/login");
// }
// if (config.method == "get") {
// config.params = {
// _t: Date.parse(new Date()) / 1000,
// ...config.params
// };
// }
// return config;
// },
// error => {
// // 请求错误处理
// return Promise.reject(error);
return
Promise
.
reject
(
err
)
;
// config => {
// let token = localStorage.getItem("atoken");
// if (token) {
// // 判断是否存在token,如果存在的话,则每个http header都加上token
// config.headers.authorization = token;
// } else {
// router.push("/login");
// }
// if (config.method == "get") {
// config.params = {
// _t: Date.parse(new Date()) / 1000,
// ...config.params
// };
// }
// return config;
// },
// error => {
// // 请求错误处理
// return Promise.reject(error);
}
);
// 添加响应拦截器
service
.
interceptors
.
response
.
use
(
(
response
)
=>
{
endLoading
();
let
{
data
}
=
response
return
data
response
=>
{
//
endLoading();
let
{
data
}
=
response
;
return
data
;
},
(
err
)
=>
{
endLoading
();
if
(
err
&&
err
.
response
)
{
Message
.
error
({
message
:
err
.
response
.
data
.
enote
});
}
else
{
Message
.
error
({
message
:
'连接服务器失败!'
});
err
=>
{
// endLoading();
if
(
err
&&
err
.
response
)
{
Message
.
error
({
message
:
err
.
response
.
data
.
enote
});
}
else
{
Message
.
error
({
message
:
"连接服务器失败!"
});
}
return
Promise
.
reject
(
err
)
return
Promise
.
reject
(
err
);
}
);
...
...
src/assets/css/public.css
View file @
2d6459f
...
...
@@ -5,6 +5,12 @@ html,body{
padding
:
0
;
margin
:
0
;
}
body
{
background
:
#fff
!important
;
}
.el-main
{
background
:
#f5f7f9
;
}
.home
,
.home-box
{
height
:
100%
;
}
...
...
@@ -158,6 +164,10 @@ html,body{
right
:
.5em
;
top
:
auto
!important
;
}
.rotate-north
{
right
:
.5em
;
bottom
:
3.8em
;
}
.nav-tag-box
{
line-height
:
40px
;
height
:
40px
;
...
...
@@ -217,6 +227,9 @@ html,body{
}
/* 菜单 */
.el-menu-vertical-dem
:not
(
.el-menu--collapse
)
{
min-height
:
900px
;
}
.el-menu
.is-opened
{
background
:
rgba
(
239
,
239
,
239
,
1
);
}
...
...
src/main.js
View file @
2d6459f
...
...
@@ -20,8 +20,8 @@ Vue.prototype.$buildCode = buildCode;
Vue
.
prototype
.
oParse
=
new
XML
.
ObjTree
();
Vue
.
prototype
.
axios
=
axios
;
import
VueParticles
from
"vue-particles"
;
Vue
.
use
(
VueParticles
);
//
import VueParticles from "vue-particles";
//
Vue.use(VueParticles);
Vue
.
use
(
api
);
Vue
.
use
(
ElementUI
,
{
size
:
"small"
,
zIndex
:
3000
});
...
...
src/views/Layout/menu.vue
View file @
2d6459f
...
...
@@ -15,9 +15,9 @@
<el-menu-item
index=
"/trficcshow"
>
<i
class=
"submenuicon"
></i>
交通展示
</el-menu-item>
<el-menu-item
index=
"/behaviorshow"
>
<
!-- <
el-menu-item index="/behaviorshow">
<i class="submenuicon"></i>综治展示
</el-menu-item>
</el-menu-item>
-->
</el-submenu>
<el-submenu
v-for=
"(fristmenu,index) in permission_routers"
:index=
"fristmenu.path"
:key=
"index"
class=
"menu-icon"
>
<
template
slot=
"title"
>
...
...
src/views/Login.vue
View file @
2d6459f
<
template
>
<div
id=
"login"
:style=
"
{ height: innerHeight + 'px' }">
<!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 -->
<vue-particles
<
!--
<
vue-particles
color=
"#dedede"
:particleOpacity=
"0.7"
:particlesNumber=
"80"
...
...
@@ -18,7 +18,7 @@
:clickEffect=
"true"
clickMode=
"push"
>
</vue-particles>
</vue-particles>
-->
<div
class=
"box"
>
<h1>
视频分析综合管理平台
</h1>
<div
style=
"width: 60%;margin: 0 auto;"
>
...
...
@@ -113,7 +113,7 @@ export default {
// localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage
.
setItem
(
"user_unid"
,
res
.
user_unid
);
//本系统可以直接用本地缓存做
localStorage
.
setItem
(
"atoken"
,
res
.
atoken
);
localStorage
.
setItem
(
"atoken"
,
res
.
atoken
);
// 处理登录用户权限菜单显示问题;
//算法配置列表
this
.
algoList
();
...
...
@@ -224,7 +224,7 @@ export default {
},
getDev
()
{
this
.
$api
.
resource
.
devs
().
then
(
res
=>
{
session
Storage
.
setItem
(
'dev_unid'
,
res
[
0
].
dev_unid
);
local
Storage
.
setItem
(
'dev_unid'
,
res
[
0
].
dev_unid
);
this
.
getDevsName
(
res
[
0
].
dev_unid
);
})
},
...
...
src/views/ops/equipment_manage.vue
View file @
2d6459f
...
...
@@ -349,7 +349,7 @@ export default {
}
.left-box
{
overflow
:
auto
;
width
:
6
3vw
;
width
:
7
3vw
;
position
:
relative
;
height
:
100%
;
margin
:
0
0
12vh
0
;
...
...
src/views/ops/systemComponents/showSet.vue
0 → 100644
View file @
2d6459f
<
template
>
<div
class=
"contentBox minHeight"
>
<el-col
:span=
"12"
>
<el-form
label-position=
"left"
label-width=
"80px"
:model=
"formLabelAlign"
>
<el-form-item
label=
"视频1"
>
<el-input
v-model=
"formLabelAlign.video1"
></el-input>
</el-form-item>
<el-form-item
label=
"视频2"
>
<el-input
v-model=
"formLabelAlign.video2"
></el-input>
</el-form-item>
<el-form-item
label=
"视频3"
>
<el-input
v-model=
"formLabelAlign.video3"
></el-input>
</el-form-item>
<el-form-item
label=
"视频4"
>
<el-input
v-model=
"formLabelAlign.video4"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
提交
</el-button>
</el-form-item>
</el-form>
</el-col>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
activeName
:
'first'
,
height
:
''
,
formLabelAlign
:{
video1
:
""
,
video2
:
""
,
video3
:
""
,
video4
:
""
,
}
}
},
mounted
(){
},
methods
:{
handleClick
(
tab
,
event
)
{
},
onSubmit
(){
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/views/ops/system_manage.vue
View file @
2d6459f
...
...
@@ -8,6 +8,9 @@
<el-tab-pane
label=
"系统维护"
name=
"second"
>
<sytemset></sytemset>
</el-tab-pane>
<el-tab-pane
label=
"展示设置"
name=
"third"
>
<showset></showset>
</el-tab-pane>
</el-tabs>
</div>
...
...
@@ -16,7 +19,7 @@
<
script
>
import
proofreadtime
from
'./systemComponents/proofreadtime'
import
sytemset
from
'./systemComponents/sytemSet'
import
showset
from
'./systemComponents/showSet'
export
default
{
data
(){
return
{
...
...
@@ -25,7 +28,7 @@
}
},
components
:{
proofreadtime
,
sytemset
proofreadtime
,
sytemset
,
showset
},
mounted
(){
this
.
height
=
document
.
body
.
clientHeight
-
140
+
'px'
...
...
src/views/public/mapvideo2.vue
View file @
2d6459f
...
...
@@ -30,7 +30,7 @@ export default {
props
:
[
"playersrc"
,
"vnum"
],
methods
:
{
initocx
(){
VionVideo
.
Init
(
0
,
'Null'
,
4
);
VionVideo
.
Init
(
2
,
'Null'
,
4
);
},
downloadOCx
()
{
if
(
navigator
.
userAgent
.
indexOf
(
'Trident'
)
>
-
1
)
{
...
...
@@ -61,7 +61,7 @@ export default {
},
mounted
()
{
var
testStr
=
'Null'
;
nvrTotalOcx
.
Init
(
0
,
testStr
,
4
);
nvrTotalOcx
.
Init
(
2
,
testStr
,
4
);
nvrTotalOcx
.
SetSingleWindow
(
true
);
nvrTotalOcx
.
SetParam
(
"SetLanguage"
,
"Chinese"
);
nvrTotalOcx
.
SetParam
(
"VideoSize"
,
0
);
...
...
@@ -79,9 +79,7 @@ export default {
},
1000
)
console
.
log
(
'shipin'
+
a
)
},
watch
:
{
},
watch
:
{},
beforeDestroy
:
function
()
{
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
...
...
src/views/resource/Codes/eventcodes.vue
View file @
2d6459f
...
...
@@ -47,6 +47,9 @@
:formatter=
"cateFormatter"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"active"
label=
"状态"
:formatter=
"activeFormatter"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"operation"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-tooltip
...
...
@@ -126,7 +129,20 @@
>
<el-input
v-model=
"codeData.name"
></el-input>
</el-form-item>
<el-form-item
label=
"启用"
prop=
"active"
:rules=
"[
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
>
<el-select
v-model=
"codeData.active"
placeholder=
"请选择"
>
<el-option
label=
"开启"
:value=
"1"
></el-option>
<el-option
label=
"关闭"
:value=
"0"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"detailVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"saveCode"
...
...
@@ -151,7 +167,8 @@ export default {
codeData
:
{
name
:
""
,
code
:
""
,
catename
:
""
catename
:
""
,
active
:
1
},
editStatus
:
0
,
event_type_unid
:
""
...
...
@@ -190,6 +207,15 @@ export default {
cateFormatter
(
row
)
{
return
this
.
getCateName
(
row
.
event_cate_unid
);
},
activeFormatter
(
row
){
let
text
=
"开启"
if
(
row
.
active
&&
row
.
active
==
0
)
{
text
=
"关闭"
}
else
{
text
=
"开启"
}
return
text
},
editCode
(
index
,
row
)
{
this
.
event_type_unid
=
row
.
event_type_unid
;
this
.
detailVisible
=
true
;
...
...
@@ -198,7 +224,8 @@ export default {
name
:
row
.
name
,
code
:
row
.
code
,
catename
:
this
.
getCateName
(
this
.
curcate
),
event_cate_unid
:
row
.
event_cate_unid
event_cate_unid
:
row
.
event_cate_unid
,
active
:
row
.
active
};
},
deleteCode
(
index
,
row
)
{
...
...
src/views/resource/treeComponents/cameraDialog.vue
View file @
2d6459f
...
...
@@ -51,6 +51,12 @@
<el-form-item
label=
"密码"
>
<el-input
v-model=
"addVideoParam.password"
></el-input>
</el-form-item>
<el-form-item
label=
"经度"
>
<el-input
v-model=
"addVideoParam.longitude"
></el-input>
</el-form-item>
<el-form-item
label=
"纬度"
>
<el-input
v-model=
"addVideoParam.latitude"
></el-input>
</el-form-item>
<el-form-item
label=
"扩展字段1"
>
<el-input
v-model=
"addVideoParam.extend_1"
></el-input>
</el-form-item>
...
...
@@ -85,7 +91,9 @@
extend_1
:
''
,
extend_2
:
''
,
is_dome
:
false
,
vchan_type
:
'camera'
vchan_type
:
'camera'
,
longitude
:
''
,
latitude
:
''
},
initParam
:{
},
...
...
@@ -143,6 +151,8 @@
this
.
addVideoParam
.
password
=
node
.
password
;
this
.
addVideoParam
.
extend_1
=
node
.
extend_1
;
this
.
addVideoParam
.
extend_2
=
node
.
extend_2
;
this
.
addVideoParam
.
longitude
=
node
.
longitude
;
this
.
addVideoParam
.
latitude
=
node
.
latitude
;
}
else
if
(
type
==
'detail'
){
this
.
type
=
'detail'
;
this
.
addVideoParam
.
addr_unid
=
node
.
addrNode
.
unid
;
...
...
@@ -164,6 +174,8 @@
this
.
addVideoParam
.
password
=
node
.
password
;
this
.
addVideoParam
.
extend_1
=
node
.
extend_1
;
this
.
addVideoParam
.
extend_2
=
node
.
extend_2
;
this
.
addVideoParam
.
longitude
=
node
.
longitude
;
this
.
addVideoParam
.
latitude
=
node
.
latitude
;
}
},
save
(){
...
...
src/views/resource/treeComponents/cameraTree.vue
View file @
2d6459f
...
...
@@ -129,7 +129,7 @@
{
min
:
2
,
max
:
9
,
message
:
'长度在 2 到 9 个字符'
,
trigger
:
'blur'
}
],
},
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
}
},
components
:{
...
...
src/views/sceneManage/setting/demarcate.vue
View file @
2d6459f
...
...
@@ -308,7 +308,6 @@ export default {
},
changeCanvasState
:
function
()
{
alert
(
1
);
if
(
this
.
canvasState
)
{
this
.
cancleSelectedGroup
();
}
...
...
src/views/taskManage/index.vue
View file @
2d6459f
...
...
@@ -67,7 +67,7 @@
</div>
<div
style=
"padding: 0 23px 20px 23px;width:98%"
>
<el-table
height=
"5
0
vh"
height=
"5
9
vh"
:data=
"tableData"
stripe
border
...
...
@@ -584,20 +584,4 @@ export default {
color
:
#f2365a
;
font-size
:
16px
;
}
.subtask-info
:nth-child
(
2
)
{
width
:
8vw
;
}
.subtask-info
:nth-child
(
4
)
{
width
:
6vw
;
}
.subtask-info
:nth-child
(
6
)
{
width
:
4.5vw
;
}
.subtask-info
:nth-child
(
8
)
{
width
:
4vw
;
}
.subtask-info
:nth-child
(
10
)
{
width
:
12vw
;
}
</
style
>
src/views/taskManage/subtask.vue
View file @
2d6459f
...
...
@@ -99,20 +99,20 @@ export default {
height
:
40px
;
line-height
:
40px
;
}
.subtask-info
:nth-child
(
2
)
{
.subtask-info
:nth-child
(
3
)
{
width
:
9vw
;
overflow
:
hidden
;
}
.subtask-info
:nth-child
(
4
)
{
.subtask-info
:nth-child
(
5
)
{
width
:
6vw
;
}
.subtask-info
:nth-child
(
6
)
{
.subtask-info
:nth-child
(
7
)
{
width
:
4.5vw
;
}
.subtask-info
:nth-child
(
8
)
{
.subtask-info
:nth-child
(
9
)
{
width
:
4vw
;
}
.subtask-info
:nth-child
(
1
0
)
{
.subtask-info
:nth-child
(
1
1
)
{
width
:
12vw
;
}
.sub-btn
{
...
...
src/views/trafficShow/index.vue
View file @
2d6459f
<
template
>
<el-row
:gutter=
"10"
style=
"padding: 10px 0 10px 10px;width: 100%;overflow:hidden"
>
<el-col
:span=
"1
5
"
>
<el-col
:span=
"1
7
"
>
<div
id=
"map"
class=
"maps"
>
<showmap
ref=
"map"
></showmap>
<div
class=
"eventlist-box"
>
...
...
@@ -18,7 +18,7 @@
</div>
<div
style=
"clear: both;"
></div>
</el-col>
<el-col
:span=
"
9
"
>
<el-col
:span=
"
7
"
>
<el-row>
<div
class=
"collect-box"
>
<div
class=
"header-title"
>
今日抓拍量
</div>
...
...
@@ -113,6 +113,7 @@ import eventTypedis from "./eventTypedis";
import
eventList
from
"./eventList"
;
import
alarmEvent
from
"./alarmEvent"
;
import
devInfo
from
"../behaviorShow/devInfo"
;
export
default
{
data
()
{
return
{
...
...
src/views/trafficShow/map.vue
View file @
2d6459f
...
...
@@ -34,6 +34,7 @@ import Feature from "ol/Feature"; //元素
import
Overlay
from
"ol/Overlay"
;
//弹出框
import
{
toStringHDMS
}
from
"ol/coordinate"
;
import
{
fromLonLat
,
toLonLat
}
from
"ol/proj"
;
import
{
defaults
as
defaultControls
,
Control
}
from
'ol/control.js'
;
import
{
Tile
as
TileLayer
,
Vector
as
VectorLayer
,
...
...
@@ -71,6 +72,40 @@ var content = "";
var
voideocontent
=
""
;
var
closer
=
""
;
var
overlay
=
""
;
var
RotateNorthControl
=
(
function
(
Control
)
{
function
RotateNorthControl
(
opt_options
)
{
var
options
=
opt_options
||
{};
var
button
=
document
.
createElement
(
'button'
);
button
.
className
=
'el-icon-aim'
;
var
element
=
document
.
createElement
(
'div'
);
element
.
className
=
'rotate-north ol-unselectable ol-control'
;
element
.
appendChild
(
button
);
Control
.
call
(
this
,
{
element
:
element
,
target
:
options
.
target
});
button
.
addEventListener
(
'click'
,
this
.
handleRotateNorth
.
bind
(
this
),
false
);
}
if
(
Control
)
RotateNorthControl
.
__proto__
=
Control
;
RotateNorthControl
.
prototype
=
Object
.
create
(
Control
&&
Control
.
prototype
);
RotateNorthControl
.
prototype
.
constructor
=
RotateNorthControl
;
RotateNorthControl
.
prototype
.
handleRotateNorth
=
function
handleRotateNorth
()
{
let
pos
=
[
120.324447
,
36.074594
];
Views
.
animate
({
center
:
pos
,
duration
:
400
,
zoom
:
14
});
};
return
RotateNorthControl
;
}(
Control
));
export
default
{
data
()
{
return
{
...
...
@@ -142,6 +177,9 @@ export default {
center
:
[
120.324447
,
36.064594
]
});
map
=
new
Map
({
controls
:
defaultControls
().
extend
([
new
RotateNorthControl
()
]),
// 设置地图图层
layers
:
[
// 创建一个使用Open Street Map地图源的瓦片图层
...
...
@@ -177,8 +215,8 @@ export default {
let
that
=
this
;
map
.
on
(
"click"
,
e
=>
{
console
.
log
(
'经纬度'
,
e
.
coordinate
);
var
pixel
=
map
.
getEventPixel
(
e
.
originalEvent
);
console
.
log
(
pixel
);
//点击相机标注点
map
.
forEachFeatureAtPixel
(
pixel
,
function
(
feature
)
{
// var coodinate = e.coordinate;
...
...
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