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 91972a43
authored
Mar 09, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改复制链接后设备列表请求错误
1 parent
a1aef303
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
18 deletions
src/App.vue
src/api/axios.js
src/router/index.js
src/views/Home.vue
src/views/Layout/menu.vue
src/views/Login.vue
src/views/ops/systemComponents/proofreadtime.vue
src/views/ops/systemComponents/sytemSet.vue
src/views/resource/nationalStandard.vue
src/views/resource/store_confs.vue
src/views/resource/videoEquipment.vue
src/App.vue
View file @
91972a4
...
@@ -16,6 +16,7 @@ export default {
...
@@ -16,6 +16,7 @@ export default {
}
}
let
token
=
localStorage
.
getItem
(
"atoken"
);
let
token
=
localStorage
.
getItem
(
"atoken"
);
if
(
!
token
)
{
if
(
!
token
)
{
alert
(
'errtoken'
)
this
.
$router
.
push
(
"/login"
);
this
.
$router
.
push
(
"/login"
);
}
}
},
},
...
...
src/api/axios.js
View file @
91972a4
...
@@ -33,10 +33,11 @@ service.interceptors.request.use(
...
@@ -33,10 +33,11 @@ service.interceptors.request.use(
);
);
// 添加响应拦截器
// 添加响应拦截器
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
let
{
data
}
=
response
;
let
{
data
}
=
response
;
return
data
;
return
data
;
},
},
error
=>
{
error
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
...
...
src/router/index.js
View file @
91972a4
...
@@ -8,7 +8,7 @@ export const constantRouterMap = [
...
@@ -8,7 +8,7 @@ export const constantRouterMap = [
path
:
"/"
,
path
:
"/"
,
name
:
"首页"
,
name
:
"首页"
,
component
:
resolve
=>
require
([
"../views/Layout/index.vue"
],
resolve
),
component
:
resolve
=>
require
([
"../views/Layout/index.vue"
],
resolve
),
redirect
:
"/
trficcshow
"
,
redirect
:
"/
login
"
,
children
:
[
children
:
[
{
{
path
:
"/trficcshow"
,
path
:
"/trficcshow"
,
...
...
src/views/Home.vue
View file @
91972a4
...
@@ -12,7 +12,6 @@ export default {
...
@@ -12,7 +12,6 @@ export default {
}
}
},
},
created
(){
created
(){
alert
(
1
)
}
}
}
}
</
script
>
</
script
>
...
...
src/views/Layout/menu.vue
View file @
91972a4
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
return
{
return
{
full
:
false
,
full
:
false
,
isCollapse
:
false
,
isCollapse
:
false
,
activemenu
:
"/"
,
activemenu
:
"/
indexshow
"
,
topbar
:[]
topbar
:[]
};
};
},
},
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
this
.
$router
.
push
(
key
);
this
.
$router
.
push
(
key
);
localStorage
.
setItem
(
"curmenu"
,
key
);
localStorage
.
setItem
(
"curmenu"
,
key
);
this
.
activemenu
=
key
this
.
activemenu
=
key
;
},
},
collapsemenu
()
{
collapsemenu
()
{
this
.
isCollapse
=
!
this
.
isCollapse
;
this
.
isCollapse
=
!
this
.
isCollapse
;
...
@@ -58,21 +58,23 @@ export default {
...
@@ -58,21 +58,23 @@ export default {
...
mapGetters
([
"permission_routers"
])
...
mapGetters
([
"permission_routers"
])
},
},
created
()
{
created
()
{
let
activemenu
=
localStorage
.
getItem
(
"curmenu"
);
// let activemenu = localStorage.getItem("curmenu");
let
activemenu
=
location
.
href
.
split
(
'#'
)[
1
];
if
(
activemenu
)
{
if
(
activemenu
)
{
this
.
activemenu
=
activemenu
;
this
.
activemenu
=
activemenu
;
this
.
$router
.
push
(
activemenu
);
this
.
$router
.
push
(
activemenu
);
}
else
{
}
else
{
this
.
$router
.
push
(
'/'
);
this
.
$router
.
push
(
"/"
);
this
.
activemenu
=
'/'
;
this
.
activemenu
=
'/'
;
}
}
},
},
watch
:{
watch
:{
$route
(
t
,
f
){
$route
(
t
,
f
){
console
.
log
(
'to'
,
t
)
let
obj
=
{
let
obj
=
{
name
:
f
.
name
,
name
:
t
.
name
,
path
:
f
.
path
,
path
:
t
.
path
,
icon
:
f
.
meta
.
icon
// icon:t
.meta.icon
}
}
this
.
$emit
(
"setTopBar"
,
obj
)
this
.
$emit
(
"setTopBar"
,
obj
)
}
}
...
...
src/views/Login.vue
View file @
91972a4
...
@@ -144,7 +144,7 @@ export default {
...
@@ -144,7 +144,7 @@ export default {
this
.
$store
this
.
$store
.
dispatch
(
"GetMenuRole"
,
res
.
menu_tree
[
0
].
children
)
.
dispatch
(
"GetMenuRole"
,
res
.
menu_tree
[
0
].
children
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$router
.
push
(
"/"
);
this
.
$router
.
push
(
"/
trficcshow
"
);
});
});
});
});
},
},
...
@@ -248,7 +248,7 @@ export default {
...
@@ -248,7 +248,7 @@ export default {
},
},
getDev
()
{
getDev
()
{
this
.
$api
.
resource
.
devs
().
then
(
res
=>
{
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
);
this
.
getDevsName
(
res
[
0
].
dev_unid
);
});
});
},
},
...
...
src/views/ops/systemComponents/proofreadtime.vue
View file @
91972a4
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
systemTime
:
''
,
systemTime
:
''
,
syncTime
:
false
,
syncTime
:
false
,
computerTime
:
this
.
$moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
),
computerTime
:
this
.
$moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
),
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
device_id
:
sessionStorage
.
getItem
(
'device_id'
),
device_id
:
sessionStorage
.
getItem
(
'device_id'
),
serverAdr
:
''
serverAdr
:
''
}
}
...
...
src/views/ops/systemComponents/sytemSet.vue
View file @
91972a4
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
selectFilename
:
''
,
selectFilename
:
''
,
timeArr
:[],
timeArr
:[],
file
:
null
,
file
:
null
,
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
device_id
:
sessionStorage
.
getItem
(
'device_id'
),
device_id
:
sessionStorage
.
getItem
(
'device_id'
),
}
}
},
},
...
...
src/views/resource/nationalStandard.vue
View file @
91972a4
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
],
],
},
},
user_unid
:
sessionStorage
.
getItem
(
'user_unid'
),
user_unid
:
sessionStorage
.
getItem
(
'user_unid'
),
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
isGetted
:
false
,
isGetted
:
false
,
sipSetting
:{
sipSetting
:{
sip_username
:
''
,
// string
sip_username
:
''
,
// string
...
...
src/views/resource/store_confs.vue
View file @
91972a4
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
isLeaf
:
'leaf'
isLeaf
:
'leaf'
},
},
detailData
:[],
detailData
:[],
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
resource
:{
resource
:{
picture_busy
:
0
,
picture_busy
:
0
,
picture_free
:
0
,
picture_free
:
0
,
...
...
src/views/resource/videoEquipment.vue
View file @
91972a4
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
currentIndex
:
0
,
currentIndex
:
0
,
eventList
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'安防事件'
)),
eventList
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'安防事件'
)),
playurl
:
''
,
playurl
:
''
,
dev_unid
:
session
Storage
.
getItem
(
'dev_unid'
),
dev_unid
:
local
Storage
.
getItem
(
'dev_unid'
),
cameraArr
:[],
cameraArr
:[],
cameraTree
:[],
cameraTree
:[],
videoTree
:[],
videoTree
:[],
...
...
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