Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
digital-construction
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
张牧越
digital-construction
Commits
f3f20b82
Commit
f3f20b82
authored
Apr 23, 2023
by
张牧越
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
e7939cdb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
25 deletions
+31
-25
.env.development
.env.development
+1
-1
index.js
src/api/index.js
+7
-0
deviceDialog.vue
src/components/tower/deviceDialog.vue
+22
-23
request.js
src/utils/request.js
+1
-1
No files found.
.env.development
View file @
f3f20b82
NODE_ENV = "development"
NODE_ENV = "development"
Mock: true
Mock: true
VUE_APP_API_URL = "http://
qjwl.ythplan.com
/"
VUE_APP_API_URL = "http://
www.ythplat.com:8002
/"
src/api/index.js
View file @
f3f20b82
...
@@ -204,6 +204,13 @@ export function getDeviceTodayChart(deviceId) {
...
@@ -204,6 +204,13 @@ export function getDeviceTodayChart(deviceId) {
})
})
}
}
export
function
getTowerLiveUrl
(
cameraId
)
{
return
request
({
url
:
`/pweb/s/towercrane/camera/liveaddress/
${
cameraId
}
`
,
method
:
'get'
,
})
}
//noise
//noise
...
...
src/components/tower/deviceDialog.vue
View file @
f3f20b82
...
@@ -55,10 +55,7 @@
...
@@ -55,10 +55,7 @@
<div
class=
"status-text"
>
数据更新
</div>
<div
class=
"status-text"
>
数据更新
</div>
</div>
</div>
</div>
</div>
<div
<div
id=
"video-container"
v-if=
"deviceData.camera_id"
></div>
id=
"video-container"
v-if=
"deviceData.camera_live_address_url"
></div>
<div
id=
"video-container-img"
v-else
>
<div
id=
"video-container-img"
v-else
>
<img
:src=
"deviceData.image_url"
alt=
""
/>
<img
:src=
"deviceData.image_url"
alt=
""
/>
</div>
</div>
...
@@ -74,7 +71,7 @@
...
@@ -74,7 +71,7 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDeviceTodayChart
}
from
"@/api/index"
;
import
{
getDeviceTodayChart
,
getTowerLiveUrl
}
from
"@/api/index"
;
require
(
"vue-video-player/node_modules/video.js/dist/video-js.css"
);
require
(
"vue-video-player/node_modules/video.js/dist/video-js.css"
);
import
videojs
from
"video.js"
;
import
videojs
from
"video.js"
;
import
"videojs-contrib-hls"
;
import
"videojs-contrib-hls"
;
...
@@ -182,6 +179,7 @@ export default {
...
@@ -182,6 +179,7 @@ export default {
});
});
},
},
openedEvents
()
{
openedEvents
()
{
getTowerLiveUrl
(
this
.
deviceData
.
camera_id
).
then
((
res
)
=>
{
const
myVideoDiv
=
document
.
getElementById
(
`video-container`
);
const
myVideoDiv
=
document
.
getElementById
(
`video-container`
);
myVideoDiv
.
innerHTML
=
`<video
myVideoDiv
.
innerHTML
=
`<video
id="singleVideo"
id="singleVideo"
...
@@ -195,7 +193,7 @@ export default {
...
@@ -195,7 +193,7 @@ export default {
loop
:
true
,
//是否循环播放
loop
:
true
,
//是否循环播放
});
});
singlePlayer
.
src
({
singlePlayer
.
src
({
src
:
this
.
deviceData
.
camera_
live_address_url
,
src
:
res
.
data
.
live_address_url
,
type
:
"application/x-mpegURL"
,
type
:
"application/x-mpegURL"
,
});
});
singlePlayer
.
play
();
singlePlayer
.
play
();
...
@@ -206,6 +204,7 @@ export default {
...
@@ -206,6 +204,7 @@ export default {
this
.
renderTodayChart
();
this
.
renderTodayChart
();
});
});
});
});
});
},
},
},
},
computed
:
{
computed
:
{
...
...
src/utils/request.js
View file @
f3f20b82
...
@@ -64,7 +64,7 @@ request.interceptors.response.use(
...
@@ -64,7 +64,7 @@ request.interceptors.response.use(
})
})
}
}
if
(
response
.
data
.
status
==
401
)
{
if
(
response
.
data
.
status
==
401
)
{
window
.
location
.
href
=
process
.
env
.
VUE_APP_API_URL
+
'pweb/m/login?is_screen=1'
//
window.location.href = process.env.VUE_APP_API_URL + 'pweb/m/login?is_screen=1'
}
}
return
response
.
data
return
response
.
data
},
},
...
...
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