Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kd_control
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
kd_control
Commits
240671f8
Commit
240671f8
authored
Sep 27, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sos声音+前台弹出
parent
55b47888
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
5 deletions
+35
-5
.env.development
.env.development
+4
-4
alarm.mp3
src/assets/audio/alarm.mp3
+0
-0
index.vue
src/components/DialView/index.vue
+23
-0
AppMain.vue
src/layout/components/AppMain.vue
+1
-1
index.vue
src/views/MLargeScreen/index.vue
+7
-0
No files found.
.env.development
View file @
240671f8
...
...
@@ -2,14 +2,14 @@ ENV = 'development'
# 接口地址
#
VUE_APP_BASE_API = 'http://39.164.225.220:5002'
#
VUE_APP_LOCAL_API = 'http://39.164.225.220:5002'
VUE_APP_BASE_API = 'http://39.164.225.220:5002'
VUE_APP_LOCAL_API = 'http://39.164.225.220:5002'
#VUE_APP_BASE_API = 'http://192.168.3.23:9400'
#VUE_APP_LOCAL_API = 'http://192.168.3.23:9400'
VUE_APP_BASE_API = 'http://60.212.188.152:9400'
VUE_APP_LOCAL_API = 'http://60.212.188.152:9400'
#
VUE_APP_BASE_API = 'http://60.212.188.152:9400'
#
VUE_APP_LOCAL_API = 'http://60.212.188.152:9400'
VUE_APP_LOCAL_API2 = 'http://192.168.3.23:9400'
VUE_APP_WS_API = 'ws://192.168.3.23:9400/webSocket'
...
...
src/assets/audio/alarm.mp3
0 → 100644
View file @
240671f8
File added
src/
layout/components/dialView
.vue
→
src/
components/DialView/index
.vue
View file @
240671f8
...
...
@@ -53,6 +53,7 @@
<
script
>
import
{
HttpReq
}
from
'
@/assets/js/common.js
'
;
import
JsSIP
from
'
jssip
'
import
alarm
from
"
@/assets/audio/alarm.mp3
"
;
export
default
{
data
()
{
...
...
@@ -66,6 +67,8 @@ export default {
callSipId
:
null
,
status
:
0
,
isReady
:
false
,
audio
:
null
,
loopAgain
:
false
,
message
:
'
正在建立链接,等待服务器响应...
'
,
sosDialTimer
:
null
}
...
...
@@ -122,6 +125,21 @@ export default {
})
},
methods
:
{
audioPlayByUrl
(
url
)
{
this
.
$nextTick
(()
=>
{
this
.
audio
=
document
.
createElement
(
"
audio
"
);
this
.
audio
.
currentTime
=
0
;
this
.
audio
.
src
=
url
;
setTimeout
(()
=>
{
this
.
audio
.
addEventListener
(
'
ended
'
,
()
=>
{
if
(
this
.
loopAgain
)
{
this
.
audio
.
play
();
}
},
false
);
this
.
audio
.
play
();
},
1500
)
})
},
uaRegister
()
{
let
sip_uri_
=
`sip:
${
this
.
uaSipInfo
.
adminsip_id
}
@
${
this
.
uaSipInfo
.
adminwsip_host
}
`
;
let
sip_password_
=
`
${
this
.
uaSipInfo
.
adminsip_pwd
}
`
;
...
...
@@ -251,6 +269,7 @@ export default {
this
.
userAgent
.
start
();
},
uaCall
()
{
this
.
loopAgain
=
false
if
(
this
.
isReady
||
this
.
userAgent
)
{
let
sip_phone_number_
=
`sip:
${
this
.
uaSipInfo
.
room_id
}
@
${
this
.
uaSipInfo
.
adminwsip_host
}
`
;
let
options
=
{
...
...
@@ -293,6 +312,7 @@ export default {
}
},
uaHangup
()
{
this
.
loopAgain
=
false
if
(
this
.
isReady
||
this
.
userAgent
)
{
this
.
isReady
=
false
this
.
userAgent
.
terminateSessions
();
...
...
@@ -327,9 +347,12 @@ export default {
},
showView
()
{
this
.
visible
=
true
this
.
loopAgain
=
true
this
.
audioPlayByUrl
(
alarm
);
},
hideView
()
{
this
.
visible
=
false
this
.
loopAgain
=
false
this
.
uaHangup
()
},
cancelView
()
{
...
...
src/layout/components/AppMain.vue
View file @
240671f8
...
...
@@ -19,7 +19,7 @@
</
template
>
<
script
>
import
dialView
from
"
./dialView
"
;
import
dialView
from
"
@/components/DialView/index
"
;
export
default
{
name
:
'
AppMain
'
,
components
:
{
dialView
},
...
...
src/views/MLargeScreen/index.vue
View file @
240671f8
<
template
>
<div
class=
"bigScreenView"
>
<dial-view
ref=
"dialView"
/>
<!-- 头部标题 -->
<div
class=
"top_title"
style=
"text-align: center"
>
<span
class=
"projectName"
>
恒源矿业二道庄矿区智慧矿山
</span>
...
...
@@ -121,8 +122,11 @@ import 'video.js/dist/video-js.css'
import
videojs
from
'
video.js
'
import
'
videojs-contrib-hls
'
import
dialView
from
"
@/components/DialView/index
"
;
export
default
{
components
:
{
dialView
,
carsEZUIKitJs
,
kaungEZUIKitJs
,
DPcomputer1
,
...
...
@@ -196,6 +200,9 @@ export default {
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dialView
.
init
()
})
this
.
loadData
();
//右上角时钟
this
.
setNowTimes
();
...
...
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