diff --git a/src/App.vue b/src/App.vue index daf4a1b..a949514 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,10 +9,13 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import useSetTheme from '@/utils/setTheme' import { provide, getCurrentInstance } from 'vue' //线上mqtt -let buildUrl = 'wss://pqmcn.com:8087/mqtt' +// 27服务器项目使用的MQTT:ws://pqmcn.com:8073/mqtt +// 102服务器项目使用的MQTT:wss://pqmcn.com:8087/mqtt +// let buildUrl = 'wss://pqmcn.com:8087/mqtt'//102 +let buildUrl = 'ws://pqmcn.com:8073/mqtt'//27 //本地mqtt let devUrl = 'ws://192.168.1.24:8085/mqtt' -provide('MQTTURL', devUrl) +provide('MQTTURL', buildUrl) useSetTheme() diff --git a/src/utils/echartMethod.ts b/src/utils/echartMethod.ts index 7ff1b26..abbdf1a 100644 --- a/src/utils/echartMethod.ts +++ b/src/utils/echartMethod.ts @@ -13,6 +13,9 @@ export const yMethod = (arr: any) => { } else { min = Math.floor(minValue / 100) * 100 } + } else if (maxValue == minValue && maxValue != 0 && minValue != 0) { + max = Math.ceil(maxValue / 10 + 1) * 10 + min = Math.floor(minValue / 10 - 1) * 10 } else { max = Math.ceil(maxValue / 10) * 10 min = Math.floor(minValue / 10) * 10 diff --git a/src/views/auth/menu/api.vue b/src/views/auth/menu/api.vue index 650b9b3..3841f6c 100644 --- a/src/views/auth/menu/api.vue +++ b/src/views/auth/menu/api.vue @@ -48,7 +48,7 @@ const tableStore = new TableStore({ title: '接口类型', field: 'type', formatter: row => { - return row.cellValue == 1 ? '普通借口' : '公用接口' + return row.cellValue == 1 ? '普通接口' : '公用接口' } }, { title: 'URL接口路径', field: 'path' }, diff --git a/src/views/govern/device/control/detail.vue b/src/views/govern/device/control/detail.vue index c16edae..6107e36 100644 --- a/src/views/govern/device/control/detail.vue +++ b/src/views/govern/device/control/detail.vue @@ -135,7 +135,7 @@ const init = () => { series: res.data.map((item: any) => { return { data: item.map((item: any, i: any) => { - return [res.data[0][i].time, item.statisticalData.toFixed(2)] + return [res.data[0][i]?.time, item.statisticalData.toFixed(2)] }), // data: [ // [1584086222000, '573'], diff --git a/src/views/govern/device/control/tabs/trend.vue b/src/views/govern/device/control/tabs/trend.vue index 39cc91d..f2d1d0d 100644 --- a/src/views/govern/device/control/tabs/trend.vue +++ b/src/views/govern/device/control/tabs/trend.vue @@ -15,7 +15,16 @@ :value="item.id"> - + + + + + + @@ -99,7 +108,8 @@ searchForm.value = { type: typeOptions[0].id, count: '', searchBeginTime: '', - searchEndTime: '' + searchEndTime: '', + dataLevel:'Primary', } //统计指标 const indexOptions: any = ref([]) @@ -176,6 +186,7 @@ const init = async () => { ...trendRequestData.value, list: lists, valueType: searchForm.value.type, + dataLevel: searchForm.value.dataLevel, startTime: datePickerRef.value && datePickerRef.value.timeValue[0], endTime: datePickerRef.value && datePickerRef.value.timeValue[1] }