Commit a32f6509 authored by 陈龙's avatar 陈龙

fix: 修复单位问题

parent a6a8fcb5
......@@ -44,10 +44,11 @@ const deviceParams = [
}*/
// 邳州张楼水厂
{
"deviceCode": "LLJ00000001",
"sensors": "出水累计流量",
"deviceType": "流量计"
},/*
"deviceCode": "JFJ00000001",
"sensors": "2号溶液池液位",
"deviceType": "加矾间"
},
/*
{
"deviceCode": "JFJ00000001",
"sensors": "沉淀池投矾量瞬时,",
......
......@@ -322,34 +322,34 @@ const seriesTemplate = (param, unit) => {
<span style="${isMobile() ? 'width: ' + handlePx(90, 'px') + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap' : ''}">${param.seriesName}</span>
<span style="display:inline-block;">:</span>
<span style="color:${color};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value?.toFixed(3) ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>`;
return param.componentSubType !== 'candlestick'
? `<div style="display: flex; align-items: center;">
<span style="${isMobile() ? 'width: ' + handlePx(90, 'px') + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap' : ''}">${param.seriesName}</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value[1] ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>`
: `
<div style="display: flex; align-items: center;">
<span>首值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value[1] ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
<div style="display: flex; align-items: center;">
<span>尾值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value[2] ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
<div style="display: flex; align-items: center;">
<span>周期最小值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value[3] ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
<div style="display: flex; align-items: center;">
<span>周期最大值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${value[4] ?? '-'}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
`;
};
......@@ -804,19 +804,19 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
}</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.NORMAL};margin: 0 ${handlePx(5, 'px')} 0 auto;">${e[0]?.value?.[1] ?? '-'
}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
<div style="display: flex; align-items: center;">
<span>周期最小值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${e?.[1]?.value?.[1] ?? '-'
}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
<div style="display: flex; align-items: center;">
<span>周期最大值</span><span style="display:inline-block;">:</span>
<span style="color: ${COLOR.AVG};margin: 0 ${handlePx(5, 'px')} 0 auto;">${_maxValues[e?.[2]?.dataIndex] ?? '-'
}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit}</span>
<span style="font-size: ${handlePx(12, 'px')};">${_unit??''}</span>
</div>
</div>
</div>`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment