channelMapInfobox.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div id="channelMapInfobox" style="display: none">
  3. <div >
  4. <el-descriptions class="margin-top" title="channel.name" :column="4" direction="vertical">
  5. <el-descriptions-item label="生产厂商">{{channel.manufacture}}</el-descriptions-item>
  6. <el-descriptions-item label="型号">{{channel.model}}</el-descriptions-item>
  7. <el-descriptions-item label="设备归属" >{{channel.owner}}</el-descriptions-item>
  8. <el-descriptions-item label="行政区域" >{{channel.civilCode}}</el-descriptions-item>
  9. <el-descriptions-item label="安装地址" >{{channel.address}}</el-descriptions-item>
  10. <el-descriptions-item label="云台类型" >{{channel.ptzTypeText}}</el-descriptions-item>
  11. <el-descriptions-item label="经纬度" >{{channel.longitude}},{{channel.latitude}}</el-descriptions-item>
  12. <el-descriptions-item label="状态">
  13. <el-tag size="small" v-if="channel.status === 1">在线</el-tag>
  14. <el-tag size="small" v-if="channel.status === 0">离线</el-tag>
  15. </el-descriptions-item>
  16. </el-descriptions>
  17. </div>
  18. <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>
  19. </div>
  20. </template>
  21. <script>
  22. import devicePlayer from '../dialog/devicePlayer.vue'
  23. export default {
  24. name: "channelMapInfobox",
  25. props: ['channel'],
  26. computed: {devicePlayer},
  27. created() {},
  28. data() {
  29. return {
  30. showDialog: false,
  31. isLoging: false
  32. };
  33. },
  34. methods: {
  35. play: function (){
  36. let deviceId = this.channel.deviceId;
  37. this.isLoging = true;
  38. let channelId = this.channel.channelId;
  39. console.log("通知设备推流1:" + deviceId + " : " + channelId);
  40. let that = this;
  41. this.$axios({
  42. method: 'get',
  43. url: '/api/play/start/' + deviceId + '/' + channelId
  44. }).then(function (res) {
  45. that.isLoging = false;
  46. if (res.data.code === 0) {
  47. that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
  48. streamInfo: res.data.data,
  49. hasAudio: this.channel.hasAudio
  50. });
  51. } else {
  52. that.$message.error(res.data.msg);
  53. }
  54. }).catch(function (e) {
  55. });
  56. },
  57. close: function () {
  58. },
  59. },
  60. };
  61. </script>