Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
海康威视
web-project
Commits
a40e1144
Commit
a40e1144
authored
Oct 21, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图代码修改
parent
13fb6153
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
screenDisplay.vue
src/components/screenDisplay.vue
+9
-1
videoComponents.vue
src/components/videoComponents.vue
+8
-4
index.js
src/router/index.js
+3
-2
index.js
src/store/index.js
+1
-1
home.vue
src/views/home.vue
+1
-0
No files found.
src/components/screenDisplay.vue
View file @
a40e1144
...
...
@@ -589,6 +589,7 @@ import {
}
from
"../api/screenDisplay"
;
import
moment
from
'moment'
import
{
defineComponent
}
from
"vue"
;
import
store
from
"@/store/index.js"
;
export
default
defineComponent
({
components
:
{
videoComponents
,
...
...
@@ -1127,7 +1128,14 @@ export default defineComponent({
postServicCenterList
()
{
postServicCenterList
().
then
((
res
)
=>
{
if
(
res
.
success
===
true
)
{
this
.
servicCenterList
=
res
.
data
;
// 获取登录人所属于的服务中心
var
result
=
store
.
getters
.
getEnterprise
();
const
userCenterList
=
result
[
0
].
serviceCenterList
// 过滤接口数据,取两个数组的交集
const
finialList
=
res
.
data
.
filter
(
item1
=>
userCenterList
.
some
(
item2
=>
item1
.
centerId
===
item2
.
serviceCenterId
)
);
this
.
servicCenterList
=
finialList
;
this
.
servicCenterList
.
forEach
((
element
,
index
)
=>
{
element
.
markerId
=
"marker1_"
+
index
;
element
.
openF
=
false
;
...
...
src/components/videoComponents.vue
View file @
a40e1144
...
...
@@ -57,6 +57,7 @@
<
script
setup
>
// ../OutputFile/VideoWebPlugin.zip
const
stopShow
=
ref
(
false
);
import
{
ref
,
reactive
,
onMounted
,
defineEmits
,
onUnmounted
,
provide
,
computed
,
handleError
,
watch
}
from
'vue'
import
{
useRoute
}
from
'vue-router'
import
http
from
'../api/http'
...
...
@@ -291,10 +292,11 @@ function initPlugin() {
oWebControl
.
JS_SetWindowControlCallback
({
// 设置消息回调
cbIntegrationCallBack
:
cbIntegrationCallBack
});
oWebControl
.
JS_CreateWnd
(
"playWnd"
,
pProps
.
divWidth
,
pProps
.
divHeight
).
then
(
function
()
{
//JS_CreateWnd创建视频播放窗口,宽高可设定
init
();
// 创建播放实例成功后初始化
});
if
(
stopShow
.
value
===
false
)
{
oWebControl
.
JS_CreateWnd
(
"playWnd"
,
pProps
.
divWidth
,
pProps
.
divHeight
).
then
(
function
()
{
//JS_CreateWnd创建视频播放窗口,宽高可设定
init
();
// 创建播放实例成功后初始化
});
}
},
function
()
{
// 启动插件服务失败
});
//playVideo()
...
...
@@ -644,6 +646,7 @@ watch(
const
params
=
JSON
.
parse
(
pProps
.
queryParams
)
// const params = ['31c0d567dd1944d5b4ea3eddf94f740b']
if
(
params
&&
params
.
length
>
0
)
{
stopShow
.
value
=
false
hidePlay
();
await
initIp
();
//ip
initPlugin
();
...
...
@@ -660,6 +663,7 @@ watch(
()
=>
pProps
.
stopParams
,
async
(
newData
)
=>
{
console
.
log
(
'停停停停停停停停停停停停'
)
stopShow
.
value
=
true
hidePlay
();
}
)
...
...
src/router/index.js
View file @
a40e1144
...
...
@@ -708,10 +708,11 @@ router.beforeEach(async (to, from, next) => {
let
hasNewRoutes
=
false
;
//如果用户登录成功,调用Vuex方法,存储用户信息
if
(
userInfo
&&
!
isgetOrg
)
{
// if (userInfo && !isgetOrg) {
if
(
userInfo
)
{
try
{
const
res
=
await
store
.
dispatch
(
"getOrg"
);
isgetOrg
=
true
;
//
isgetOrg = true;
}
catch
(
error
)
{
store
.
commit
(
"clearUserInfo"
,
""
);
return
next
(
"/login"
);
...
...
src/store/index.js
View file @
a40e1144
...
...
@@ -13,7 +13,7 @@ function getUserInfo(state) {
return
state
.
userInfo
;
}
function
getEnterprise
(
state
){
if
(
state
.
enterprise
)
return
state
.
enterprise
;
//
if (state.enterprise) return state.enterprise;
let
enterprise
=
localStorage
.
getItem
(
keys
.
ENTERPRISE
);
if
(
enterprise
)
{
state
.
enterprise
=
JSON
.
parse
(
enterprise
);
...
...
src/views/home.vue
View file @
a40e1144
...
...
@@ -767,6 +767,7 @@ export default defineComponent({
if
(
res
==
"confirm"
)
{
store
.
commit
(
"clearUserInfo"
,
""
);
localStorage
.
removeItem
(
'AIToken'
)
localStorage
.
removeItem
(
'enterprise'
)
router
.
push
({
path
:
"/login"
});
}
else
{
//重置视频插件位置
...
...
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