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
a55df700
Commit
a55df700
authored
Oct 24, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏问题修改,以及ar插件引入
parent
f9c91904
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1371 additions
and
6 deletions
+1371
-6
arWebControl.debug.js
src/components/ar/arWebControl.debug.js
+1169
-0
index.vue
src/components/ar/index.vue
+185
-0
screenDisplay.vue
src/components/screenDisplay.vue
+17
-6
No files found.
src/components/ar/arWebControl.debug.js
0 → 100644
View file @
a55df700
This diff is collapsed.
Click to expand it.
src/components/ar/index.vue
0 → 100644
View file @
a55df700
<
template
>
<div
id=
"panel"
>
<div
id=
"ar-div"
class=
"panel-child"
></div>
<div
v-if=
"outTime"
class=
"errorContent"
>
<h-empty>
<template
#
img
>
<h-empty-error-control
/>
</
template
>
<
template
#
description
>
<p
v-if=
"!connectError && outTime"
>
正在尝试第
{{
outTime
}}
次建立连接
</p>
<p
v-else-if=
"connectError&&loginFailure"
>
{{
loginFailedText
}}
</p>
<p
v-else-if=
"connectError"
>
连接失败! 请检查客户端是否安装并开启
<el-button
type=
"link"
@
click=
"jumpTo"
>
去下载
</el-button>
</p>
</
template
>
</h-empty>
<p></p>
</div>
</div>
</template>
<
script
>
import
ARWebControl
from
"./arWebControl.debug"
;
// 该接口为vlmas组件ui接口,如果是在copas中调用,可以使用vlmas wiki中提供的api接口,如果是组件中使用,需要对应组件参照wiki提供相应接口
import
{
getClientInfo
}
from
"@/api/index"
;
export
default
{
name
:
"OpenClient"
,
components
:
{},
props
:
{},
data
()
{
return
{
control
:
null
,
ip
:
""
,
port
:
""
,
protocolType
:
""
,
userInfo
:
null
,
domainId
:
""
,
outTime
:
0
,
connectError
:
false
,
loginFailure
:
false
,
loginFailedText
:
""
};
},
mounted
()
{
document
.
title
=
"AR车间"
;
console
.
log
(
"----state----"
,
this
.
$store
.
state
,
document
.
title
);
this
.
ip
=
window
.
location
.
hostname
;
this
.
protocolType
=
window
.
location
.
protocol
.
replace
(
':'
,
''
)
if
(
window
.
location
.
port
)
{
this
.
port
=
window
.
location
.
port
;
}
else
{
this
.
port
=
this
.
protocolType
===
"https"
?
"443"
:
"80"
;
}
this
.
getClientInfo
();
},
beforeDestroy
()
{
if
(
this
.
control
)
{
this
.
control
.
setWindowStatus
(
0
);
this
.
control
=
null
;
}
},
beforeRouteLeave
(
to
,
from
,
next
)
{
// 导航离开该组件的对应路由时调用
// 可以访问组件实例 `this`
document
.
title
=
"vlmas"
;
next
();
},
methods
:
{
init
()
{
// 初始化
if
(
this
.
control
)
{
this
.
control
.
setWindowStatus
(
0
);
this
.
control
=
null
;
}
const
loginType
=
3
;
const
ip
=
this
.
ip
;
const
port
=
this
.
port
;
const
userName
=
this
.
userInfo
.
userId
;
const
credential
=
this
.
userInfo
.
tgc
;
const
indexCode
=
""
;
const
wsPort
=
"7789"
;
const
domainId
=
this
.
domainId
;
const
protocolType
=
this
.
protocolType
this
.
control
=
new
ARWebControl
(
"ar-div"
,
loginType
,
ip
,
port
,
userName
,
credential
,
indexCode
,
wsPort
,
domainId
,
protocolType
);
console
.
log
(
"params--"
,
{
loginType
,
ip
,
port
,
userName
,
credential
,
domainId
});
window
.
addEventListener
(
"ar_loaded"
,
event
=>
{
if
(
event
.
detail
.
loadingStatus
)
{
this
.
outTime
=
0
;
this
.
connectError
=
false
;
console
.
log
(
"ms3d已加载"
);
}
});
window
.
addEventListener
(
"ar_custom_message"
,
event
=>
{
console
.
log
(
event
.
detail
.
data
);
});
window
.
addEventListener
(
"ar_keydown"
,
event
=>
{
console
.
log
(
event
.
detail
.
data
);
});
// 次数
window
.
addEventListener
(
"ar_websocket_link_times"
,
event
=>
{
this
.
outTime
=
event
.
detail
.
time
;
});
// 超时
window
.
addEventListener
(
"ar_websocket_link_time_out"
,
event
=>
{
this
.
connectError
=
event
.
detail
.
flag
;
});
// 登录失败
window
.
addEventListener
(
"ar_login_failure"
,
event
=>
{
this
.
loginFailure
=
true
;
this
.
connectError
=
true
;
this
.
loginFailedText
=
event
.
detail
||
"登录失败!"
;
});
// 启动
this
.
control
.
setupControl
();
},
async
getClientInfo
()
{
try
{
const
{
code
,
data
}
=
await
getClientInfo
();
if
(
code
===
"0"
)
{
this
.
userInfo
=
data
.
currentUser
||
{};
this
.
domainId
=
data
.
domainId
;
this
.
init
();
}
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
jumpTo
()
{
window
.
open
(
"/portal/ui/download/attachment"
);
}
}
};
</
script
>
<
style
scoped
>
html
,
body
{
height
:
100%
;
margin
:
0
;
padding
:
0
;
}
#panel
{
height
:
100%
;
display
:
flex
;
flex-direction
:
row
;
border-right
:
1px
solid
#000
;
}
.panel-child
{
width
:
100%
;
height
:
100%
;
}
.errorContent
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
}
</
style
>
src/components/screenDisplay.vue
View file @
a55df700
...
...
@@ -1009,6 +1009,11 @@ export default defineComponent({
_this
.
voideShow
=
true
;
});
});
popupButtons2
.
addEventListener
(
"dblclick"
,
function
(
event
)
{
if
(
markerId
.
includes
(
"marker3"
))
{
console
.
log
(
'ggggggggggggggggggggggggggggggggggggggggggggggggggggggg'
)
}
})
popupButtons2
.
addEventListener
(
"click"
,
function
(
event
)
{
if
(
markerId
.
includes
(
"marker1"
))
{
console
.
log
(
'1111111111111111111111111111111111111111111111111111111111111'
,
centerId
)
...
...
@@ -3073,12 +3078,18 @@ export default defineComponent({
this
.
queryParams
=
JSON
.
stringify
(
videoList
)
}
else
{
// ElMessage({
// message: res.data,
// type: 'warning'
// })
if
(
num
+
1
<
this
.
transferList
.
length
)
{
num
+=
1
this
.
getVideoAPI
(
num
)
}
else
{
this
.
stationName
=
this
.
transferList
[
num
].
stationName
this
.
videoLoading
=
false
ElMessage
({
message
:
res
.
data
,
type
:
'warning'
})
}
}
})
},
...
...
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