| | |
| | | top="0" class="dialog-center" :modal-append-to-body="false"> |
| | | <alarm-alert v-if="alarmAlertStatus" :visible.sync="alarmAlertStatus"></alarm-alert> |
| | | </el-dialog> |
| | | <weather-component></weather-component> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from '../assets/js/tools' |
| | | import getPageMenu from "@/assets/js/tools/getPageMenu"; |
| | | import checkMenuIsUse from "@/assets/js/tools/checkMenuIsUse"; |
| | | import WeatherComponent from "@/components/weatherComponent"; |
| | | |
| | | export default { |
| | | components: { |
| | | WeatherComponent, |
| | | HdwBadgeBtn, |
| | | ProgressState, |
| | | PifuList, |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item label="区/县" prop="StationName5"> |
| | | <el-select v-model="params.StationName5" placeholder="请选择区县" @change="countyChange" |
| | | <el-form-item label="区/县/班组" prop="StationName5"> |
| | | <el-select |
| | | v-model="params.StationName5" |
| | | placeholder="请选择区县" |
| | | @change="countyChange" |
| | | allow-create |
| | | :filterable="true"> |
| | | <el-option v-for="item in linkage.counties" :key="item" :label="item" :value="item"> |
| | | </el-option> |
| | |
| | | <template> |
| | | <div class="rtmp-video-wrapper"> |
| | | <video ref="videoPlayer" :options="options" class="video-js"></video> |
| | | <video ref="videoPlayer" class="video-js"></video> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import videoJs from 'video.js'; |
| | | import 'videojs-flash'; |
| | | import SWF_URL from 'videojs-swf/dist/video-js.swf'; |
| | | import loadImg from '@/assets/images/dw_bg.jpg'; |
| | | |
| | | export default { |
| | | name: "rtmpVideo", |
| | | player: "", |
| | | props: { |
| | | url: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | |
| | | autoplay: false, // 自动播放 |
| | | sources: [{ // 流配置,数组形式,会根据兼容顺序自动切换 |
| | | type: 'rtmp/mp4', |
| | | src: 'rtmp://58.200.131.2:1935/livetv/hunantv' // 亲测可用 |
| | | src: loadImg // 亲测可用 |
| | | }], |
| | | techOrder: ['html5', 'flash'], |
| | | flash: { |
| | | swf: SWF_URL |
| | | } |
| | | }, |
| | | }, |
| | | playFlag: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | url() { |
| | | this.changeUrl(); |
| | | }, |
| | | }, |
| | | methods: { |
| | | create() { |
| | | let self = this; |
| | | // 初始化播放器 |
| | | this.$options.player = videoJs(this.$refs.videoPlayer, this.options, function onPlayerReady() { |
| | | console.log('onPlayerReady', this); |
| | | |
| | | this.on('pause', function() { |
| | | console.log('暂停播放') |
| | |
| | | }) |
| | | }); |
| | | }, |
| | | changeUrl() { |
| | | let url = this.url; |
| | | if(this.$options.player) { |
| | | let myPlayer = this.$options.player; |
| | | myPlayer.src(url); |
| | | myPlayer.load(url); |
| | | } |
| | | |
| | | }, |
| | | play() { |
| | | this.$nextTick(()=>{ |
| | | if(this.$options.player) { |
| | | this.$options.player.play(); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | dispose() { |
| | | if(this.$options.player) { |
| | |
| | | }, |
| | | mounted() { |
| | | this.create(); |
| | | console.log(this.$options.player); |
| | | }, |
| | | beforeDestroy() { |
| | | this.dispose(); |
New file |
| | |
| | | <template> |
| | | <div class="weather-wrapper"> |
| | | <div class="weather-title"></div> |
| | | <div class="weather-body"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "weatherComponent", |
| | | props: { |
| | | city: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | district: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | getSupportCity() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'http://apis.juhe.cn/simpleWeather/cityList', |
| | | params: { |
| | | key: '195f091cfb0f4a04d053a56d0dbc3f1d' |
| | | }, |
| | | withCredentials: false, |
| | | }).then(res=>{ |
| | | console.log(res); |
| | | }).catch(error=>{ |
| | | |
| | | }); |
| | | }, |
| | | start(mac) { |
| | | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getSupportCity(); |
| | | }, |
| | | beforeDestroy() { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="table-cell text-right">区/县:</div> |
| | | <div class="table-cell text-right">区/县/班组:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | v-model="filters.values.county" |
| | | @change="searchHome" |
| | | size="small" placeholder="请选择区/县"> |
| | | size="small" placeholder="请选择区/县/班组"> |
| | | <el-option |
| | | v-for="item in filters.data.county" |
| | | :key="item.value" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="StationName5" |
| | | label="区县" |
| | | label="区县/班组" |
| | | min-width="120" |
| | | :resizable="false" |
| | | align="center"> |
| | |
| | | if(searchParams.StationName5 == "") { |
| | | // 设置机房 |
| | | this.filters.data.home = [{ |
| | | label: "请选择区/县", |
| | | label: "请选择区/县/班组", |
| | | value: '' |
| | | }]; |
| | | // 查询数据 |
New file |
| | |
| | | <template> |
| | | <div class="endoscope-video"> |
| | | <rtmp-video :url="url"></rtmp-video> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import RtmpVideo from "@/components/rtmpVideo"; |
| | | export default { |
| | | name: "endoscopeVideo", |
| | | components: {RtmpVideo}, |
| | | data() { |
| | | return { |
| | | url: "", |
| | | mac: "", |
| | | } |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'http://121.36.27.55:51389/A059Web/webService/getList', |
| | | withCredentials: false, |
| | | }).then(res=>{ |
| | | let rs = res.data; |
| | | if(rs.code ==200 && rs.data.length) { |
| | | let data = rs.data; |
| | | let mac = data[0].mac; |
| | | let url = data[0].rtmp; |
| | | this.start(mac, url); |
| | | } |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | start(mac, url) { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'http://121.36.27.55:51389/A059Web/webService/startTest', |
| | | withCredentials: false, |
| | | params: { |
| | | mac: mac |
| | | }, |
| | | }).then(res=>{ |
| | | let rs = res.data; |
| | | if(rs.code == 200) { |
| | | this.url = url; |
| | | this.mac = mac; |
| | | } |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | stop() { |
| | | let mac = this.mac; |
| | | if(!mac) { |
| | | return; |
| | | } |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'http://121.36.27.55:51389/A059Web/webService/stopTest', |
| | | withCredentials: false, |
| | | params: { |
| | | mac: mac |
| | | }, |
| | | }).then(res=>{ |
| | | console.log('内窥镜MAC:'+mac+'停止推送视频'); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.stop(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <activate-dialog-content v-if="dialog.show" :type="dialog.type" :batt="batt"></activate-dialog-content> |
| | | </el-dialog> |
| | | <el-dialog title="内窥镜" width="800px" :visible.sync="videoDialog.show" :close-on-click-modal="false" |
| | | top="0" class="dialog-center" :modal-append-to-body="false" :destroy-on-close="true"> |
| | | <rtmp-video></rtmp-video> |
| | | top="0" class="dialog-center" :modal-append-to-body="false"> |
| | | <endoscope-video v-if="videoDialog.show"></endoscope-video> |
| | | </el-dialog> |
| | | </flex-layout> |
| | | </template> |
| | |
| | | const_aio |
| | | } from '@/assets/js/const'; |
| | | import RtmpVideo from "@/components/rtmpVideo"; |
| | | import EndoscopeVideo from "@/pages/dataTest/components/endoscopeVideo"; |
| | | |
| | | let vol, resChart, temp, conduct, currChart, leakVol; |
| | | let staticL, stateL, flushL; |
| | |
| | | export default { |
| | | name: "realTimeAio", |
| | | components: { |
| | | EndoscopeVideo, |
| | | RtmpVideo, |
| | | ContentBox, |
| | | BarChart, |