量测:ads添加参数
单风机:修改风速对应字段
This commit is contained in:
parent
e364693226
commit
5badbfe212
@ -609,13 +609,14 @@ const initTrendChart = (type: 'day' | 'month') => {
|
|||||||
const samePeriod: number[] = type === 'day' ? TrendDataForDay.samePeriod.value : TrendDataForMonth.map((item) => item.samePeriod)
|
const samePeriod: number[] = type === 'day' ? TrendDataForDay.samePeriod.value : TrendDataForMonth.map((item) => item.samePeriod)
|
||||||
const xAxisdata: string[] = type === 'day' ? TrendDataForDay.currentPeriod.time : TrendDataForMonth.map((item) => item.generationTime)
|
const xAxisdata: string[] = type === 'day' ? TrendDataForDay.currentPeriod.time : TrendDataForMonth.map((item) => item.generationTime)
|
||||||
const trendChart = state.charts?.trendChart ?? echarts.init(trendChartRef.value as unknown as HTMLElement)
|
const trendChart = state.charts?.trendChart ?? echarts.init(trendChartRef.value as unknown as HTMLElement)
|
||||||
|
const legend = type === 'day' ? ['当天', '环比'] : ['本月', '环比']
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
grid: {
|
grid: {
|
||||||
top: 30,
|
top: 30,
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
left: 100,
|
left: 70,
|
||||||
borderColor: '#dadada',
|
borderColor: '#dadada',
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -679,14 +680,14 @@ const initTrendChart = (type: 'day' | 'month') => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
legend: {
|
legend: {
|
||||||
data: ['本期', '同期'],
|
data: legend,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#73767a',
|
color: '#73767a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '本期',
|
name: legend[0],
|
||||||
data: currentPeriod,
|
data: currentPeriod,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
@ -695,7 +696,7 @@ const initTrendChart = (type: 'day' | 'month') => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '同期',
|
name: legend[1],
|
||||||
data: samePeriod,
|
data: samePeriod,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
@ -1021,9 +1022,6 @@ const createRealTimeData = async () => {
|
|||||||
temperatureChartsData[1].value = getCutDecimalsValue(realData.itempnacelle_1sec)
|
temperatureChartsData[1].value = getCutDecimalsValue(realData.itempnacelle_1sec)
|
||||||
temperatureChartsData[2].value = getCutDecimalsValue(realData.itempoutdoor_1sec)
|
temperatureChartsData[2].value = getCutDecimalsValue(realData.itempoutdoor_1sec)
|
||||||
|
|
||||||
const ipitchangle = Math.min(realData.ipitchangle1, realData.ipitchangle2, realData.ipitchangle3)
|
|
||||||
realTimeDataForSingle.value.ipitchangle = ipitchangle / 1 === 0 ? ipitchangle : Math.floor(ipitchangle * 1000) / 1000
|
|
||||||
|
|
||||||
const overviewDatakeys: any = Object.keys(overviewData)
|
const overviewDatakeys: any = Object.keys(overviewData)
|
||||||
const sigleDataKeys: any = Object.keys(realTimeDataForSingle.value)
|
const sigleDataKeys: any = Object.keys(realTimeDataForSingle.value)
|
||||||
|
|
||||||
@ -1201,22 +1199,13 @@ const getThisDayChartData = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLastYearTodayTimestamp = () => {
|
const getLastMonthThisDayChartData = () => {
|
||||||
const now = new Date()
|
|
||||||
const lastYear = now.getFullYear() - 1
|
|
||||||
const lastYearToday = new Date(lastYear, now.getMonth(), now.getDate())
|
|
||||||
return lastYearToday.getTime()
|
|
||||||
}
|
|
||||||
|
|
||||||
const getLastYearChartData = () => {
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const start = getLastYearTodayTimestamp()
|
const start = dayjs().subtract(1, 'month').startOf('day').valueOf()
|
||||||
const end = new Date()
|
const end = dayjs().subtract(1, 'month').valueOf()
|
||||||
end.setFullYear(end.getFullYear() - 1)
|
|
||||||
|
|
||||||
getChartData<'iKWhThisDay'>({
|
getChartData<'iKWhThisDay'>({
|
||||||
startTime: start,
|
startTime: start,
|
||||||
endTime: end.getTime(),
|
endTime: end,
|
||||||
attr: ['iKWhThisDay'],
|
attr: ['iKWhThisDay'],
|
||||||
interval: '1h',
|
interval: '1h',
|
||||||
}).then(({ times, val }) => {
|
}).then(({ times, val }) => {
|
||||||
@ -1272,7 +1261,7 @@ const getAllChartData = (type: ('power' | 'trend' | 'frequency')[] = ['power', '
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (type.includes('trend')) {
|
if (type.includes('trend')) {
|
||||||
const trendDataForLastYear = getLastYearChartData()
|
const trendDataForLastYear = getLastMonthThisDayChartData()
|
||||||
const trendDataForThisDay = getThisDayChartForHourData()
|
const trendDataForThisDay = getThisDayChartForHourData()
|
||||||
Promise.all([trendDataForLastYear, trendDataForThisDay]).then(() => {
|
Promise.all([trendDataForLastYear, trendDataForThisDay]).then(() => {
|
||||||
initTrendChart(trendChartType.value)
|
initTrendChart(trendChartType.value)
|
||||||
|
@ -284,6 +284,14 @@ export const excelDefaultConfig: any = {
|
|||||||
label: '寄存器地址',
|
label: '寄存器地址',
|
||||||
code: 'registerAddr',
|
code: 'registerAddr',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '启用变量',
|
||||||
|
code: 'variableEnable',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '变量名称',
|
||||||
|
code: 'variableName',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '上界',
|
label: '上界',
|
||||||
code: 'upBound',
|
code: 'upBound',
|
||||||
@ -341,6 +349,10 @@ export const excelDefaultConfig: any = {
|
|||||||
"8. 16位BCD数据",
|
"8. 16位BCD数据",
|
||||||
"9. 8位归一化值"
|
"9. 8位归一化值"
|
||||||
], // 数据类型的提示
|
], // 数据类型的提示
|
||||||
|
R0C7:[
|
||||||
|
"0. 不启用",
|
||||||
|
"1. 启用"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
//遥控147 CONTROL
|
//遥控147 CONTROL
|
||||||
147: {
|
147: {
|
||||||
|
Loading…
Reference in New Issue
Block a user