This commit is contained in:
高云鹏 2024-12-12 11:12:11 +08:00
commit 0d233b2c69
3 changed files with 23 additions and 13 deletions

View File

@ -138,6 +138,9 @@ public class CalcService {
FunctionWindSpeedFactor windSpeedFactor = new FunctionWindSpeedFactor(dataService,cacheService); FunctionWindSpeedFactor windSpeedFactor = new FunctionWindSpeedFactor(dataService,cacheService);
aviator.addFunction(windSpeedFactor); aviator.addFunction(windSpeedFactor);
FunctionIsOnline isOnline = new FunctionIsOnline(adminRedisTemplate, cacheService);
aviator.addFunction(isOnline);
} }
/** /**

View File

@ -6,32 +6,35 @@
@click="handleClick(item)" @click="handleClick(item)"
@contextmenu.prevent="windContextMenu($event,item)" @contextmenu.prevent="windContextMenu($event,item)"
> >
<div class="FanList-panel" :class="item.standard == true ? 'wind-mark' : 'wind-default'"> <div class="FanList-panel" :class="{
'wind-mark': item.standard==1,
'wind-default': item.standard==0,
'wind-offline': item.attributeMap.processedoperationmode == 33
}">
<div class="fanlist-top"> <div class="fanlist-top">
<span :class="item.standard == true ? 'wind-mark-icon' : 'fanlist-icon'"> <span :class="item.standard == 1 ? 'wind-mark-icon' : 'fanlist-icon'">
<img :class="item.standard == true ? '' : 'wind-picture'" src="~assets/dashboard/biaogan.png" alt="" /> <img :class="item.standard == 1 ? '' : 'wind-picture'" src="~assets/dashboard/biaogan.png" alt="" />
</span> </span>
<span class="fanlist-name"> {{ item.name }}</span> <span class="fanlist-name"> {{ item.name }}</span>
<el-tag v-if="item.attributeMap.processedoperationmode === 20" class="tag-panel is-primary" type="primary">并网</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 20" class="tag-panel is-primary" type="primary">并网</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 11" class="tag-panel is-warning" type="primary">待机</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 11" class="tag-panel is-warning" type="primary">待机</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 16" class="tag-panel is-success" type="primary">启动</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 16" class="tag-panel is-success" type="primary">启动</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 10" class="tag-panel is-maintenance" type="primary" <el-tag v-if="item.attributeMap.processedoperationmode === 10" class="tag-panel is-maintenance" type="primary"
>维护</el-tag >维护</el-tag>
>
<el-tag v-if="item.attributeMap.processedoperationmode === 0" class="tag-panel is-offline" type="primary">离线</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 0" class="tag-panel is-offline" type="primary">离线</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 8" class="tag-panel info" type="primary">限功率运行</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 8" class="tag-panel info" type="primary">限功率运行</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 6" class="tag-panel is-danger" type="primary">正常停机</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 6" class="tag-panel is-danger" type="primary">正常停机</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 1" class="tag-panel is-danger" type="primary" <el-tag v-if="item.attributeMap.processedoperationmode === 1" class="tag-panel is-danger" type="primary"
>外部因素导致停机</el-tag >外部因素导致停机</el-tag>
>
<el-tag v-if="item.attributeMap.processedoperationmode === 2" class="tag-panel is-danger" type="primary">停机</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 2" class="tag-panel is-danger" type="primary">停机</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 1110" class="tag-panel is-info" type="primary">解缆状态</el-tag> <el-tag v-if="item.attributeMap.processedoperationmode === 1110" class="tag-panel is-info" type="primary">解缆状态</el-tag>
<el-tag v-if="item.attributeMap.processedoperationmode === 1111" class="tag-panel is-danger" type="primary" <el-tag v-if="item.attributeMap.processedoperationmode === 1111" class="tag-panel is-danger" type="primary"
>电网故障停机</el-tag >电网故障停机</el-tag>
>
<el-tag v-if="item.attributeMap.processedoperationmode === 1112" class="tag-panel is-danger" type="primary" <el-tag v-if="item.attributeMap.processedoperationmode === 1112" class="tag-panel is-danger" type="primary"
>安全链停机</el-tag >安全链停机</el-tag>
> <el-tag v-if="item.attributeMap.processedoperationmode === 33" class="tag-panel is-offline" type="primary"
>通讯中断</el-tag>
</div> </div>
<div class="fanlist-main"> <div class="fanlist-main">
<el-row> <el-row>
@ -254,6 +257,10 @@ const sendManualCommand = (type: 1 | 0) => {
background-image: linear-gradient(180deg, #f0f6ff 0%, #ffffff 50%); background-image: linear-gradient(180deg, #f0f6ff 0%, #ffffff 50%);
border: 1px solid #e1edf6; border: 1px solid #e1edf6;
} }
.wind-offline {
background-image: linear-gradient(180deg, #eeeeee 0%, #eeeeee 50%);
border: 1px solid #eeeeee;
}
.wind-picture { .wind-picture {
display: none; display: none;
} }

View File

@ -414,7 +414,7 @@ const statAnalysisExport = () => {
const calculateAverages = (data: any) => { const calculateAverages = (data: any) => {
let maxWindSpeed = Math.max(...data.map((item: any) => item[0])) let maxWindSpeed = Math.max(...data.map((item: any) => item[0]))
let interval = 5 // 5m/s let interval = 0.5
let result = [] let result = []
for (let windSpeed = 0; windSpeed <= maxWindSpeed; windSpeed += interval) { for (let windSpeed = 0; windSpeed <= maxWindSpeed; windSpeed += interval) {