历史趋势添加值类型

This commit is contained in:
GGJ
2024-10-24 19:39:15 +08:00
parent f74634de71
commit abac6bd5f4
5 changed files with 23 additions and 6 deletions

View File

@@ -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()
</script>

View File

@@ -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

View File

@@ -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' },

View File

@@ -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'],

View File

@@ -15,7 +15,16 @@
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="值类型">
<el-select
style="min-width: 120px !important"
v-model="searchForm.dataLevel"
>
<el-option value="Primary" label="一次值"></el-option>
<el-option value="Secondary" label="二次值"></el-option>
</el-select>
</el-form-item>
<el-form-item class="history_count" v-for="(item, index) in countData" :key="index" :label="item.name + '谐波次数'"
v-show="item.countOptions.length != 0">
@@ -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]
}