|
|
@@ -36,9 +36,19 @@
|
|
|
<el-tab-pane
|
|
|
v-for="tab in tabs"
|
|
|
:key="tab.key"
|
|
|
- :label="tab.label"
|
|
|
:name="tab.key"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template #label>
|
|
|
+ <span class="c-sibling-item">{{ tab.label }}</span>
|
|
|
+ <template v-if="tab.icon">
|
|
|
+ <i
|
|
|
+ :class="tab.icon"
|
|
|
+ class="c-sibling-item near has-active"
|
|
|
+ @click="tab.on"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<warning
|
|
|
v-else-if="!loading"
|
|
|
@@ -57,6 +67,7 @@
|
|
|
:online="isOnline"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <sensor-dashboard-dialog ref="sensorDashboardDialog" />
|
|
|
</wrapper>
|
|
|
</template>
|
|
|
|
|
|
@@ -75,6 +86,7 @@ import DeviceInvoke from './components/DeviceInvoke'
|
|
|
import DeviceExternal from './components/DeviceExternal'
|
|
|
import Sensors from './components/external/Sensors'
|
|
|
import DeviceTakeOver from './components/DeviceTakeOver'
|
|
|
+import SensorDashboardDialog from './components/SensorDashboardDialog'
|
|
|
|
|
|
export default {
|
|
|
name: 'DeviceDetail',
|
|
|
@@ -85,7 +97,8 @@ export default {
|
|
|
DeviceInvoke,
|
|
|
DeviceExternal,
|
|
|
Sensors,
|
|
|
- DeviceTakeOver
|
|
|
+ DeviceTakeOver,
|
|
|
+ SensorDashboardDialog
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -100,7 +113,7 @@ export default {
|
|
|
{ key: 'DeviceInfo', label: '设备信息' },
|
|
|
{ key: 'DeviceRuntime', label: '运行状态' },
|
|
|
this.$store.getters.isGroupAdmin || this.$store.getters.isOperator ? { key: 'DeviceInvoke', label: '远程操控' } : null,
|
|
|
- { key: 'Sensors', label: '传感器' },
|
|
|
+ { key: 'Sensors', label: '传感器', icon: 'el-icon-date', on: this.onShowSensorTables },
|
|
|
{ key: 'DeviceExternal', label: '全链路监测' },
|
|
|
{ key: 'DeviceAlarm', label: '设备告警' },
|
|
|
__TAKEOVER__ && this.$store.getters.isGroupAdmin ? { key: 'DeviceTakeOver', label: '接管' } : null
|
|
|
@@ -148,6 +161,9 @@ export default {
|
|
|
stop()
|
|
|
},
|
|
|
methods: {
|
|
|
+ onShowSensorTables () {
|
|
|
+ this.$refs.sensorDashboardDialog.show(this.deviceId)
|
|
|
+ },
|
|
|
onBack () {
|
|
|
switch (this.$route.name) {
|
|
|
case 'device-management-detail':
|