| | |
| | | <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"> |
| | | <el-icon size="32" color="#0db7f5" style="margin-left: 4px; cursor: pointer" @click="openDevicesModal"> |
| | | <IconSlider></IconSlider> |
| | | </el-icon> |
| | | </div> |
| | |
| | | <IconCloudOff></IconCloudOff> |
| | | </el-icon> |
| | | </div> |
| | | |
| | | <div class="reporting-record"> |
| | | <el-icon |
| | | size="26" |
| | | :color="taskStore.activeTask ? '#0db7f5' : '#c0c0c0'" |
| | | :style="{ 'margin-right': '10px', cursor: taskStore.activeTask ? 'pointer' : 'not-allowed' }" |
| | | @click="openReportingRecord" |
| | | > |
| | | <IconRecords></IconRecords> |
| | | </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> |
| | | <ReportingRecordModal v-model="showReportingRecordModal"></ReportingRecordModal> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import AlertLightIcon from '@/components/icons/AlertLightIcon.vue' |
| | | import IconRecords from '~icons/vaadin/records' |
| | | import { computed, onUnmounted, ref } from 'vue' |
| | | import { useDevicesStore } from '@/stores/devices' |
| | | import TroubleTrackerModal from '@/views/dashboard/components/TroubleTrackerModal.vue' |
| | |
| | | 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' |
| | | import ReportingRecordModal from '@/views/dashboard/components/ReportingRecordModal.vue' |
| | | import { useTasksStore } from '@/stores/tasks' |
| | | |
| | | const emits = defineEmits<{ |
| | | shouldReload: [] |
| | |
| | | return cloudConnection ? cloudConnection?.CheckResult : true |
| | | }) |
| | | |
| | | // 配置下发参数弹窗 |
| | | const showConfigModal = ref(false) |
| | | function openConfigModal() { |
| | | showConfigModal.value = true |
| | | } |
| | | function closeConfigModal() { |
| | | showConfigModal.value = false |
| | | } |
| | | /** |
| | | * 轮询问题诊断 |
| | | */ |
| | |
| | | onUnmounted(() => { |
| | | cancelProblemsPolling() |
| | | }) |
| | | |
| | | const taskStore = useTasksStore() |
| | | |
| | | // 是否显示报工记录 |
| | | const showReportingRecordModal = ref(false) |
| | | function openReportingRecord() { |
| | | if (!taskStore.activeTask) { |
| | | ElMessage.error('请先选择任务') |
| | | return |
| | | } |
| | | showReportingRecordModal.value = true |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | cursor: pointer; |
| | | } |
| | | .device-name { |
| | | max-width: 340px; |
| | | max-width: 220px; |
| | | font-size: 40px; |
| | | color: #fff; |
| | | } |
| | | .cloud-connection-status { |
| | | margin-right: 10px; |
| | | } |
| | | .params-config { |
| | | cursor: pointer; |
| | | } |
| | | </style> |