| | |
| | | import IconCloudOff from '~icons/material-symbols-light/cloud-off-outline' |
| | | import IconSlider from '~icons/bx/slider' |
| | | import { useRequest } from 'vue-hooks-plus' |
| | | import { apiGetProblemList } from '@/api' |
| | | // 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 problemList = computed(() => { |
| | | return problemsRes?.value?.data ?? [] |
| | | // return problemsRes?.value?.data ?? [] |
| | | return [] |
| | | }) |
| | | // 问题诊断icon状态, 问题列表中有一条异常即为红灯 否则是绿灯 true绿灯 |
| | | const problemsIconStatus = computed(() => { |
| | |
| | | // 默认绿灯, 拿到一次数据后才以接口为准 |
| | | return true |
| | | } |
| | | return !problemList.value.some((ele) => !ele.CheckResult) |
| | | // return !problemList.value.some((ele) => !ele.CheckResult) |
| | | return false |
| | | }) |
| | | // 云端连接icon状态, 问题列表中有一条代表云端链接的, 异常即为红色云icon 否则是绿色 true绿云 |
| | | const cloudConnectionIconStatus = computed(() => { |
| | |
| | | return true |
| | | } |
| | | // 没数据就当是链接正常 |
| | | const cloudConnection = problemList.value.find((ele) => ele.ItemCode === 'cloud') |
| | | return cloudConnection ? cloudConnection?.CheckResult : true |
| | | // const cloudConnection = problemList.value.find((ele) => ele.ItemCode === 'cloud') |
| | | // return cloudConnection ? cloudConnection?.CheckResult : true |
| | | return false |
| | | }) |
| | | |
| | | // 配置下发参数弹窗 |
| | |
| | | /** |
| | | * 轮询问题诊断 |
| | | */ |
| | | const { |
| | | data: problemsRes, |
| | | run: startProblemsPolling, |
| | | cancel: cancelProblemsPolling |
| | | } = useRequest(apiGetProblemList, { |
| | | manual: true, |
| | | pollingInterval: PROBLEMS_POLLING_DURATION, |
| | | pollingWhenHidden: false |
| | | }) |
| | | startProblemsPolling() |
| | | onUnmounted(() => { |
| | | cancelProblemsPolling() |
| | | }) |
| | | // const { |
| | | // data: problemsRes, |
| | | // run: startProblemsPolling, |
| | | // cancel: cancelProblemsPolling |
| | | // } = useRequest(apiGetProblemList, { |
| | | // manual: true, |
| | | // pollingInterval: PROBLEMS_POLLING_DURATION, |
| | | // pollingWhenHidden: false |
| | | // }) |
| | | // startProblemsPolling() |
| | | // onUnmounted(() => { |
| | | // cancelProblemsPolling() |
| | | // }) |
| | | |
| | | const taskStore = useTasksStore() |
| | | |