|
@@ -2,6 +2,8 @@
|
|
|
<div class="main">
|
|
|
<div class="main-head">
|
|
|
<el-button type="primary" @click="onAddGroup">新增分组</el-button>
|
|
|
+ 显示心跳:<el-switch v-model="showAllChart"/>
|
|
|
+ 显示地图:<el-switch v-model="showAllMap"/>
|
|
|
</div>
|
|
|
<div class="main-content">
|
|
|
<template v-for="item in group">
|
|
@@ -20,9 +22,9 @@
|
|
|
<template v-for="(key, keyIndex) in item.keyList">
|
|
|
<div :style="`color: ${key.online ? '' : 'red'}`">
|
|
|
{{keyIndex + 1}}、{{key.key}}<el-button v-if="!item.isStart" type="danger" size="small" @click="onDelKey(item, key)">删除</el-button>
|
|
|
- <template v-if="item.isStart">
|
|
|
+ <template v-if="item.isStart && (showAllMap || showAllChart)">
|
|
|
<div class="key-content">
|
|
|
- <div class="key-position">
|
|
|
+ <div class="key-position" v-if="showAllMap">
|
|
|
<EasyMapComponent
|
|
|
v-if="key.online"
|
|
|
class="map"
|
|
@@ -30,7 +32,7 @@
|
|
|
/>
|
|
|
<div v-else>无信号</div>
|
|
|
</div>
|
|
|
- <div class="key-heart">
|
|
|
+ <div class="key-heart" v-if="showAllChart">
|
|
|
<HeartLineChart :data="key.apiData"/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -133,6 +135,8 @@ export default defineComponent({
|
|
|
groupForm: {},
|
|
|
showKeyDialog: false,
|
|
|
keyForm: {},
|
|
|
+ showAllChart: true,
|
|
|
+ showAllMap: true,
|
|
|
})
|
|
|
const ref_groupForm = ref()
|
|
|
const ref_keyForm = ref()
|