|
@@ -2,45 +2,53 @@
|
|
|
<div class="monit">
|
|
|
<div class="monit-left">
|
|
|
<div class="monit-title" @click="isShow = !isShow">
|
|
|
- <div>
|
|
|
- <span>配怀舍过道东 </span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <i class="icon"></i>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-show="isShow" class="monit-content">
|
|
|
- <div class="content-flex">
|
|
|
- <select-block :title="'一栋'">
|
|
|
- <template v-slot:left>
|
|
|
- <select-column :list="simulatedData"></select-column>
|
|
|
- </template>
|
|
|
- <template v-slot:right>
|
|
|
- <select-column :list="simulatedData" :floor="false" :type="1"></select-column>
|
|
|
- </template>
|
|
|
- </select-block>
|
|
|
- </div>
|
|
|
- <div class="content-flex">
|
|
|
- <select-block :title="'一栋'">
|
|
|
- <template v-slot:left>
|
|
|
- <select-column :list="simulatedData"></select-column>
|
|
|
- </template>
|
|
|
- <template v-slot:right>
|
|
|
- <select-column :list="simulatedData" :type="1"></select-column>
|
|
|
- </template>
|
|
|
- </select-block>
|
|
|
- </div>
|
|
|
- <div class="content-flex">
|
|
|
- <select-block :title="'一栋'">
|
|
|
- <template v-slot:left>
|
|
|
- <select-column :list="simulatedData"></select-column>
|
|
|
- </template>
|
|
|
- <template v-slot:right>
|
|
|
- <select-column :list="simulatedData" :type="1"></select-column>
|
|
|
- </template>
|
|
|
- </select-block>
|
|
|
- </div>
|
|
|
+ <el-cascader
|
|
|
+ v-model="videoId"
|
|
|
+ :options="options"
|
|
|
+ size="mini"
|
|
|
+ @change="handleChange"
|
|
|
+ :props="{value: 'id', label: 'cameraName', children: 'cameraList', expandTrigger: 'hover'}"
|
|
|
+ :show-all-levels="false"></el-cascader>
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <span>配怀舍过道东 </span>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <i class="icon"></i>-->
|
|
|
+<!-- </div>-->
|
|
|
</div>
|
|
|
+ <iframe v-if="isVideo" :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0" allowfullscreen="true"></iframe>
|
|
|
+<!-- <div v-show="isShow" class="monit-content">-->
|
|
|
+<!-- <div class="content-flex">-->
|
|
|
+<!-- <select-block :title="'一栋'">-->
|
|
|
+<!-- <template v-slot:left>-->
|
|
|
+<!-- <select-column :list="simulatedData"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-slot:right>-->
|
|
|
+<!-- <select-column :list="simulatedData" :floor="false" :type="1"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </select-block>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="content-flex">-->
|
|
|
+<!-- <select-block :title="'一栋'">-->
|
|
|
+<!-- <template v-slot:left>-->
|
|
|
+<!-- <select-column :list="simulatedData"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-slot:right>-->
|
|
|
+<!-- <select-column :list="simulatedData" :type="1"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </select-block>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="content-flex">-->
|
|
|
+<!-- <select-block :title="'一栋'">-->
|
|
|
+<!-- <template v-slot:left>-->
|
|
|
+<!-- <select-column :list="simulatedData"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-slot:right>-->
|
|
|
+<!-- <select-column :list="simulatedData" :type="1"></select-column>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </select-block>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
</div>
|
|
|
<div class="monit-right">
|
|
|
<swiper style="height: 100%; margin-top: auto; margin-bottom: auto;" class="swiper" :options="swiperOption">
|
|
@@ -55,15 +63,13 @@
|
|
|
<script>
|
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
|
import 'swiper/css/swiper.css'
|
|
|
-import SelectBlock from "@/views/Zoology/leftTop/SelectBlock";
|
|
|
-import SelectColumn from "@/views/Zoology/leftTop/SelectColumn";
|
|
|
+import {getVideoAll, getVideo} from "@/utils/api";
|
|
|
+
|
|
|
export default {
|
|
|
name: "Monit",
|
|
|
components: {
|
|
|
swiper,
|
|
|
swiperSlide,
|
|
|
- SelectBlock,
|
|
|
- SelectColumn
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -78,22 +84,36 @@ export default {
|
|
|
disableOnInteraction: false
|
|
|
},
|
|
|
},
|
|
|
+ videoId: '',
|
|
|
isShow: false,
|
|
|
- simulatedData: [ // 左上 —— 模拟的数据
|
|
|
- { id: 1, name: '1' },
|
|
|
- { id: 2, name: '11' },
|
|
|
- { id: 3, name: '111' },
|
|
|
- { id: 4, name: '1111' },
|
|
|
- { id: 5, name: '11112' },
|
|
|
- { id: 6, name: '11111' },
|
|
|
- { id: 7, name: '111111' },
|
|
|
- { id: 8, name: '1111111' },
|
|
|
- { id: 9, name: '11111112' },
|
|
|
- { id: 10, name: '11111113' },
|
|
|
- { id: 11, name: '11111114' },
|
|
|
- { id: 12, name: '11111115' },
|
|
|
- ],
|
|
|
+ isVideo: false,
|
|
|
+ options: [],
|
|
|
+ cameraOne: '',
|
|
|
+ cameraTwo: '',
|
|
|
}
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ getVideoAll({}).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ this.options = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleChange(value) {
|
|
|
+ let val = value[value.length - 1];
|
|
|
+ let params= {
|
|
|
+ cameraIds: [val],
|
|
|
+ }
|
|
|
+ getVideo(params).then(res =>{
|
|
|
+ this.isVideo = true;
|
|
|
+ this.cameraOne = res.data[0].wsUrl;
|
|
|
+ this.cameraTwo = res.data[0].rtspUrl;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -113,6 +133,8 @@ export default {
|
|
|
background: url("../../assets/BioSafety/kuang.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
position: relative;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 40px 30px 30px 30px;
|
|
|
}
|
|
|
.monit-right {
|
|
|
width: 450px;
|
|
@@ -166,4 +188,4 @@ export default {
|
|
|
.content-flex {
|
|
|
flex: 1;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|