|
|
|
@ -0,0 +1,47 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
{{device.displayName}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body" style="padding:0;">
|
|
|
|
|
<div class="row" style="height:240px;width:320px;margin: 0 auto;">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<video :data-number="device.number" v-if="flvjs.isSupported()"></video>
|
|
|
|
|
<canvas :data-number="device.number" v-else></canvas>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col col-md-8 col-sm-8 align-self-center">
|
|
|
|
|
<div class="row" style="line-height:28px;">
|
|
|
|
|
<img style="height:32px;" v-on:click="execApi(device.number,'/Curtain/On')" src="/IoTCenter/images/left.png" />
|
|
|
|
|
<img style="height:32px;" v-on:click="execApi(device.number,'/Curtain/Stop')" src="/IoTCenter/images/stop.png" />
|
|
|
|
|
<img style="height:32px;" v-on:click="execApi(device.number,'/Curtain/Off')" src="/IoTCenter/images/right.png" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
({
|
|
|
|
|
props: ['device'],
|
|
|
|
|
mounted: function () {
|
|
|
|
|
if (flvjs.isSupported()) {
|
|
|
|
|
playByFlvJs();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
playByWXInlinePlayer();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
playByFlvJs: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
playByWXInlinePlayer: function () {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
url: function () {
|
|
|
|
|
return getDeviceDataValue(this.device,'flv');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|