From 3a3cc473c33cb4a97399ace76a1b35e9ffd68525 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期一, 20 十一月 2023 16:45:17 +0800 Subject: [PATCH] feat: 无任务选中通道时从p[lc读取统计 --- src/views/dashboard/components/DashboardTitle.vue | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/views/dashboard/components/DashboardTitle.vue b/src/views/dashboard/components/DashboardTitle.vue index 015694a..446f322 100644 --- a/src/views/dashboard/components/DashboardTitle.vue +++ b/src/views/dashboard/components/DashboardTitle.vue @@ -2,14 +2,9 @@ <div class="dashboard-title"> <div class="title-text"> 鏅鸿兘宸ヤ綔鍙� 鈥� - <el-popover - placement="bottom" - :width="200" - trigger="click" - :content="deviceStore?.deviceInfo?.currentDeviceID ?? ''" - > + <el-popover placement="bottom" :width="200" trigger="click" :content="currentDeviceName"> <template #reference> - <el-text truncated class="device-name">{{ deviceStore?.deviceInfo?.currentDeviceID ?? '' }}</el-text> + <el-text truncated class="device-name">{{ currentDeviceName }}</el-text> </template> </el-popover> <el-icon size="32" color="#0db7f5" style="margin-left: 20px; cursor: pointer" @click="openDevicesModal"> @@ -31,10 +26,15 @@ <IconCloudOff></IconCloudOff> </el-icon> </div> + + <div class="params-config" @click="openConfigModal"> + <el-icon size="28"><Setting /></el-icon> + </div> </div> </div> <DeviceCheckList v-model="showDevicesModal" @should-reload="emits('shouldReload')"></DeviceCheckList> <TroubleTrackerModal v-model="showProblemsModal" :problems="problemList"></TroubleTrackerModal> + <DeliverParamsConfigModal v-model="showConfigModal"></DeliverParamsConfigModal> </template> <script setup lang="ts"> import AlertLightIcon from '@/components/icons/AlertLightIcon.vue' @@ -48,6 +48,8 @@ import { useRequest } from 'vue-hooks-plus' import { apiGetProblemList } from '@/api' import { PROBLEMS_POLLING_DURATION } from '@/common/constants' +import { Setting } from '@element-plus/icons-vue' +import DeliverParamsConfigModal from '@/views/dashboard/components/DeliverParamsConfigModal.vue' const emits = defineEmits<{ shouldReload: [] @@ -73,6 +75,12 @@ // 鑾峰彇褰撳墠璁惧鍚� const deviceStore = useDevicesStore() +const currentDeviceName = computed(() => { + return ( + deviceStore?.deviceInfo?.deviceList?.find((ele) => ele?.deviceID === deviceStore?.deviceInfo?.currentDeviceID) + ?.deviceName ?? '' + ) +}) // 闂璇婃柇鍒楄〃 const problemList = computed(() => { @@ -97,6 +105,14 @@ return cloudConnection ? cloudConnection?.CheckResult : true }) +// 閰嶇疆涓嬪彂鍙傛暟寮圭獥 +const showConfigModal = ref(false) +function openConfigModal() { + showConfigModal.value = true +} +function closeConfigModal() { + showConfigModal.value = false +} /** * 杞闂璇婃柇 */ @@ -142,4 +158,10 @@ font-size: 40px; color: #fff; } +.cloud-connection-status { + margin-right: 10px; +} +.params-config { + cursor: pointer; +} </style> -- Gitblit v1.8.0