Browse Source

修改公服大屏

master
changtong 4 months ago
parent
commit
093c9d79a2
  1. 8
      config/index.js
  2. 8
      src/views/common-components/common-live-player.vue
  3. 27
      src/views/screen/smart-travel.vue

8
config/index.js

@ -12,16 +12,16 @@ module.exports = {
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: { proxyTable: {
'/api': { '/api': {
target: 'http://192.168.111.200:9990', // target: 'http://192.168.111.200:9990',
// target: 'http://60.255.186.185:9024/api', target: 'http://60.255.186.185:9024/api',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api': '' '^/api': ''
} }
}, },
'/localImage': { '/localImage': {
// target: 'http://60.255.186.185:9024/', target: 'http://60.255.186.185:9024/',
target: 'http://localhost:9990/', // target: 'http://localhost:9990/',
changeOrigin: true, changeOrigin: true,
}, },
'/socket.io': { '/socket.io': {

8
src/views/common-components/common-live-player.vue

@ -2,7 +2,7 @@
<template> <template>
<div style="width: 100%; height: 100%;"> <div style="width: 100%; height: 100%;">
<LivePlayer :videoUrl="videoUrl" :autoplay="true" :live="live" :muted="muted" :poster="poster" :aspect="aspect" <LivePlayer :videoUrl="videoUrl" :autoplay="true" :live="live" :muted="muted" :poster="poster" :aspect="aspect"
:loop="loop" @ended="ended"></LivePlayer> :loop="loop" @ended="ended" :alt="altText" @error="error"></LivePlayer>
</div> </div>
</template> </template>
@ -61,6 +61,7 @@ export default {
components: {LivePlayer}, components: {LivePlayer},
data() { data() {
return { return {
altText: "暂无监控资源"
}; };
}, },
// //
@ -72,7 +73,10 @@ export default {
methods: { methods: {
ended () { ended () {
this.$emit("ended") this.$emit("ended")
} },
error () {
this.$message.error("监控异常,请切换其他监控")
},
}, },
// - // -
mounted() { mounted() {

27
src/views/screen/smart-travel.vue

@ -208,16 +208,7 @@ export default {
videoUrl: "", videoUrl: "",
tabs: ["省份", "城市"], tabs: ["省份", "城市"],
tabIndex: 0, tabIndex: 0,
videoList: [ videoList: [],
{
deviceName: "监控监控监控1111",
url: "",
},
{
deviceName: "监控监控监控1111",
url: "",
},
],
videoIndex: 0, videoIndex: 0,
treeList: [ treeList: [
{ {
@ -225,6 +216,11 @@ export default {
code: "F511502", code: "F511502",
expand: true, expand: true,
children: [ children: [
{
title: "合江门冠英街",
code: "F51150202",
expand: true,
},
{ {
title: "流杯池公园", title: "流杯池公园",
code: "F51150205", code: "F51150205",
@ -240,11 +236,6 @@ export default {
code: "F51150203", code: "F51150203",
expand: true, expand: true,
}, },
{
title: "合江门冠英街",
code: "F51150202",
expand: true,
},
{ {
title: "五粮液景区", title: "五粮液景区",
code: "F51150201", code: "F51150201",
@ -259,6 +250,7 @@ export default {
dayvalue: 0, dayvalue: 0,
provinceList: [], provinceList: [],
cityList: [], cityList: [],
timer: null
}; };
}, },
computed: {}, computed: {},
@ -268,9 +260,14 @@ export default {
calcRate(); calcRate();
windowDraw(); windowDraw();
this.changeTree(this.treeList[0].children[0]); this.changeTree(this.treeList[0].children[0]);
this.timer = setInterval(()=> {
this.realtimeTourist();
this.touristCumulative();
}, 300000)
}, },
beforeDestroy() { beforeDestroy() {
echartsClear(); echartsClear();
this.timer = null
}, },
methods: { methods: {
openApp () { openApp () {

Loading…
Cancel
Save