Commit 8487a0ac authored by 张牧越's avatar 张牧越

styleFix

parent f3f20b82
...@@ -55,9 +55,10 @@ ...@@ -55,9 +55,10 @@
<div class="status-text">数据更新</div> <div class="status-text">数据更新</div>
</div> </div>
</div> </div>
<div id="video-container" v-if="deviceData.camera_id"></div> <div id="video-container" v-if="deviceData.is_camera == 1"></div>
<div id="video-container-img" v-else> <div id="video-container-img" v-else>
<img :src="deviceData.image_url" alt="" /> <img src="@/assets/tower/no_camera.png" alt="" />
<div>暂无监控信息</div>
</div> </div>
</div> </div>
...@@ -179,6 +180,7 @@ export default { ...@@ -179,6 +180,7 @@ export default {
}); });
}, },
openedEvents() { openedEvents() {
if (this.deviceData.is_camera == 1) {
getTowerLiveUrl(this.deviceData.camera_id).then((res) => { getTowerLiveUrl(this.deviceData.camera_id).then((res) => {
const myVideoDiv = document.getElementById(`video-container`); const myVideoDiv = document.getElementById(`video-container`);
myVideoDiv.innerHTML = `<video myVideoDiv.innerHTML = `<video
...@@ -205,6 +207,14 @@ export default { ...@@ -205,6 +207,14 @@ export default {
}); });
}); });
}); });
} else {
getDeviceTodayChart(this.deviceId).then((result) => {
this.todayData = result.data;
this.$nextTick(() => {
this.renderTodayChart();
});
});
}
}, },
}, },
computed: { computed: {
...@@ -242,17 +252,24 @@ export default { ...@@ -242,17 +252,24 @@ export default {
.base-info { .base-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20px;
} }
#video-container { #video-container {
width: calc(40% - 20px); width: calc(40% - 20px);
height: 200px;
} }
.video-container-img { #video-container-img {
width: calc(40% - 20px); width: calc(40% - 50px);
height: 200px; text-align: center;
border: 1px solid #00b7ee;
box-shadow: 0px 21px 24px 0px rgba(42, 78, 169, 0.4);
border-radius: 4px;
padding: 20px;
background: #113e77;
text-align: center;
font-size: 14px;
color: #3f6fab;
img { img {
width: 100%; width: 130px;
height: 100%;
vertical-align: top; vertical-align: top;
} }
} }
...@@ -271,6 +288,9 @@ export default { ...@@ -271,6 +288,9 @@ export default {
background: #113e77; background: #113e77;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
&:nth-child(n + 5) {
margin-bottom: 0;
}
.status-value { .status-value {
font-size: 18px; font-size: 18px;
color: #13e0ff; color: #13e0ff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment