This commit is contained in:
geting 2024-11-29 17:20:42 +08:00
commit fe4bef3ae1
8 changed files with 148 additions and 136 deletions

View File

@ -18,7 +18,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
@Slf4j
public class FunctionCacheValue extends AbstractFunction {
public static final String CACHE_PREFIX = "calc::cache::";
public static final String CACHE_PREFIX = "calc:cache:";
private AdminRedisTemplate redis = null;
public FunctionCacheValue(AdminRedisTemplate redis) {
this.redis = redis;

View File

@ -55,7 +55,7 @@ public class CalcService {
@Value("${calc.debug.enable}")
Boolean isDebug;
@Value("${calc.debug.task-name")
@Value("${calc.debug.task-name}")
String debugTaskName;
/**

View File

@ -36,13 +36,13 @@
<select id="queryFieldByModelId" resultMap="SysIotModelFieldMap">
select simf.*,sim.iot_model_name as iotModelName,
sim.iot_model_code from sys_iot_model_field simf left join sys_iot_model sim on simf.iot_model_id = sim.id
where simf.iot_model_id = #{id}
where simf.iot_model_id = #{id} order by simf.porder asc
</select>
<select id="queryServiceByModelId" resultMap="SysIotModelServiceMap">
select sims.*,sim.iot_model_name as iotModelName,
sim.iot_model_code from sys_iot_model_service sims left join sys_iot_model sim on sims.iot_model_id = sim.id
where sims.iot_model_id = #{id}
where sims.iot_model_id = #{id} order by sims.porder asc
</select>
<select id="queryIotModelIdByName" resultType="java.lang.Long">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 KiB

After

Width:  |  Height:  |  Size: 631 KiB

View File

@ -120,23 +120,41 @@
>
<el-button @click="sendManualCommand(0)" v-else class="control-btn" type="primary">解锁</el-button>
</div>
<el-tooltip content="变桨/轮毂系统">
<div @click="openSubSystem(1)" class="dot index-1"></div>
<el-tooltip :content="subSystem[0]">
<div @click="openSubSystem(0)" class="dot index-1"></div>
</el-tooltip>
<el-tooltip content="轴承/传动链/齿轮箱系统">
<div @click="openSubSystem(2)" class="dot index-2"></div>
<el-tooltip :content="subSystem[1]">
<div @click="openSubSystem(1)" class="dot index-2"></div>
</el-tooltip>
<el-tooltip content="发电机系统">
<div @click="openSubSystem(3)" class="dot index-3"></div>
<el-tooltip :content="subSystem[2]">
<div @click="openSubSystem(2)" class="dot index-3"></div>
</el-tooltip>
<el-tooltip content="机舱系统">
<div @click="openSubSystem(4)" class="dot index-4"></div>
<el-tooltip :content="subSystem[3]">
<div @click="openSubSystem(3)" class="dot index-4"></div>
</el-tooltip>
<el-tooltip content="控制系统">
<div @click="openSubSystem(5)" class="dot index-5"></div>
<el-tooltip :content="subSystem[4]">
<div @click="openSubSystem(4)" class="dot index-5"></div>
</el-tooltip>
<el-tooltip content="环境/气象系统">
<div @click="openSubSystem(6)" class="dot index-6"></div>
<el-tooltip :content="subSystem[5]">
<div @click="openSubSystem(5)" class="dot index-6"></div>
</el-tooltip>
<el-tooltip :content="subSystem[6]">
<div @click="openSubSystem(6)" class="dot index-7"></div>
</el-tooltip>
<el-tooltip :content="subSystem[7]">
<div @click="openSubSystem(7)" class="dot index-8"></div>
</el-tooltip>
<el-tooltip :content="subSystem[8]">
<div @click="openSubSystem(8)" class="dot index-9"></div>
</el-tooltip>
<el-tooltip :content="subSystem[9]">
<div @click="openSubSystem(9)" class="dot index-10"></div>
</el-tooltip>
<el-tooltip :content="subSystem[10]">
<div @click="openSubSystem(10)" class="dot index-11"></div>
</el-tooltip>
<el-tooltip :content="subSystem[11]">
<div @click="openSubSystem(11)" class="dot index-12"></div>
</el-tooltip>
</div>
<div class="Parameters">
@ -999,14 +1017,16 @@ const createRealTimeData = async () => {
const dataFor138And139: { name: string; value: string }[] = []
const dataFor140: { name: string; value: string }[] = []
const dataFor199: { name: string; value: string }[] = []
const realDataForSub: any = [
{ type138: [], type140: [], type199: [] },
{ type138: [], type140: [], type199: [] },
{ type138: [], type140: [], type199: [] },
{ type138: [], type140: [], type199: [] },
{ type138: [], type140: [], type199: [] },
{ type138: [], type140: [], type199: [] },
]
// const realDataForSub: any = [
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// ]
const realDataForSub: any = subSystem.map(() => ({ type138: [], type140: [], type199: [] }))
modelList.forEach((item: any) => {
const realVal = realData[item.attributeCode.toLowerCase()]
let val = getCutDecimalsValue(realVal)
@ -1025,7 +1045,7 @@ const createRealTimeData = async () => {
}
const showData = {
name: item.attributeName,
value: val === '-' ? val : val + item.unit,
value: val === '-' ? val : val + (item?.unit ?? ''),
}
if (item.attributeType === 138 || item.attributeType === 139) {
dataFor138And139.push(showData)
@ -1034,53 +1054,17 @@ const createRealTimeData = async () => {
} else if (item.attributeType === 199) {
dataFor199.push(showData)
}
if (item.subSystem === '变桨系统' || item.subSystem === '轮毂') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[0].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[0].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[0].type199.push(showData)
}
} else if (item.subSystem === '轴承' || item.subSystem === '传动链' || item.subSystem === '齿轮箱') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[1].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[1].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[1].type199.push(showData)
}
} else if (item.subSystem === '发电机') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[2].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[2].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[2].type199.push(showData)
}
} else if (item.subSystem === '机舱') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[3].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[3].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[3].type199.push(showData)
}
} else if (item.subSystem === '控制系统') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[4].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[4].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[4].type199.push(showData)
}
} else if (item.subSystem === '环境' || item.subSystem === '气象') {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[5].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[5].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[5].type199.push(showData)
if (subSystem.includes(item.subSystem)) {
const index = subSystem.indexOf(item.subSystem)
if (index >= 0) {
if (item.attributeType === 138 || item.attributeType === 139) {
realDataForSub[index].type138.push(showData)
} else if (item.attributeType === 140) {
realDataForSub[index].type140.push(showData)
} else if (item.attributeType === 199) {
realDataForSub[index].type199.push(showData)
}
}
}
})
@ -1088,12 +1072,7 @@ const createRealTimeData = async () => {
overviewSlotData.type140 = dataFor140
overviewSlotData.type199 = dataFor199
realTimeForSubSystem.type1 = realDataForSub[0]
realTimeForSubSystem.type2 = realDataForSub[1]
realTimeForSubSystem.type3 = realDataForSub[2]
realTimeForSubSystem.type4 = realDataForSub[3]
realTimeForSubSystem.type5 = realDataForSub[4]
realTimeForSubSystem.type6 = realDataForSub[5]
realTimeForSubSystem.value = realDataForSub
} catch (err) {
console.log(err)
}
@ -1107,47 +1086,18 @@ const handleClose = (done: () => void) => {
}
const dialogradioactiveName = ref(138)
const realTimeForSubSystem = reactive<any>({
type1: null,
type2: null,
type3: null,
type4: null,
type5: null,
type6: null,
})
const curSubSystem = ref('type1')
const realTimeForSubSystem = ref<any>([])
const curSubSystem = ref(0)
const subSystemDataList = computed(() => {
const type = dialogradioactiveName.value === 138 ? 'type138' : dialogradioactiveName.value === 140 ? 'type140' : 'type199'
return realTimeForSubSystem[curSubSystem.value][type]
return realTimeForSubSystem.value[curSubSystem.value][type]
})
const subSystem = ['变桨1', '变桨2', '变桨3', '传动链齿轮箱', '发电机', '机舱', '控制系统', '轮毂', '偏航系统', '气象', '塔基', '箱变']
const openSubSystem = (type: number) => {
switch (type) {
case 1:
subSystemName.value = '变桨/轮毂系统'
curSubSystem.value = 'type1'
break
case 2:
subSystemName.value = '轴承/传动链/齿轮箱系统'
curSubSystem.value = 'type2'
break
case 3:
subSystemName.value = '发电机系统'
curSubSystem.value = 'type3'
break
case 4:
subSystemName.value = '机舱系统'
curSubSystem.value = 'type4'
break
case 5:
subSystemName.value = '控制系统'
curSubSystem.value = 'type5'
break
case 6:
subSystemName.value = '环境/气象系统'
curSubSystem.value = 'type6'
break
}
subSystemName.value = subSystem[type]
curSubSystem.value = type
visible.value = true
}
@ -1443,6 +1393,7 @@ $labelHeight: 38px;
// overflow-y: auto;
// overflow-x: hidden;
.PitchPart {
width: calc(100% - 10px);
.Pitchitem {
border: 1px solid #e1edf6;
display: flex;
@ -1607,8 +1558,7 @@ $labelHeight: 38px;
position: absolute;
width: 15px;
height: 15px;
border-radius: 10px;
background-color: #ff7e00;
background-color: rgba(255, 255, 255, 0);
&:hover {
cursor: pointer;
}
@ -1618,28 +1568,83 @@ $labelHeight: 38px;
}
}
.index-1 {
left: 25%;
top: 60%;
left: 24%;
top: 1%;
width: 12%;
height: 48%;
}
.index-2 {
left: 52%;
top: 53%;
left: 30%;
top: 83%;
width: 15%;
height: 16%;
}
.index-3 {
left: 65%;
top: 60%;
left: 12.5%;
top: 69%;
width: 4%;
height: 25%;
}
.index-4 {
left: 83%;
top: 54%;
left: 46%;
top: 49%;
width: 12%;
height: 15%;
}
.index-5 {
left: 75%;
top: 28%;
left: 66%;
top: 35%;
width: 8%;
height: 14%;
transform: rotate(-51deg);
}
.index-6 {
left: 60%;
top: 63%;
width: 27%;
height: 5%;
transform: rotate(-15deg);
}
.index-7 {
left: 73%;
top: 4%;
top: 48%;
width: 7%;
height: 11%;
transform: rotate(-13deg);
}
.index-8 {
left: 23%;
top: 53%;
width: 19%;
height: 26%;
}
.index-9 {
left: 50%;
top: 66%;
width: 9%;
height: 13%;
}
.index-10 {
left: 67%;
top: 1%;
width: 12%;
height: 12%;
}
.index-11 {
right: 16%;
bottom: 3%;
width: 13%;
height: 23%;
}
.index-12 {
right: 2%;
bottom: 3%;
width: 13%;
height: 23%;
}
}
.Parameters {

View File

@ -62,7 +62,9 @@
<el-form-item prop="interval" label="时间间隔:">
<el-select v-model="seachOptions.interval" placeholder="请选择时间间隔" style="width: 100px">
<el-option label="原始" value="40s"></el-option>
<el-option label="1分钟" value="1m"></el-option>
<el-option label="5分钟" value="5m"></el-option>
<el-option label="10分钟" value="10m"></el-option>
<el-option label="15分钟" value="15m"></el-option>
<el-option label="1小时" value="1h"></el-option>
<el-option label="1天" value="1d"></el-option>

View File

@ -148,7 +148,7 @@ const shortcuts = [
text: '今天',
value: () => {
const start = getFormattedDate(0) + ' 00:00:00'
const end = new Date()
const end = getFormattedDate(0) + ' 23:59:59'
return [start, end]
},
},
@ -200,11 +200,13 @@ const dateValue = ref('')
const windBlowerValue = ref('')
const windBlowerList = ref<WindBlowerList[]>([])
//
const timeRange = ref([])
const timeRange = ref([]) as any
//
const interval = ref('')
const interval = ref('15m')
const intervals = [
{ label: '一分钟', value: '1m' },
{ label: '五分钟', value: '5m' },
{ label: '十分钟', value: '10m' },
{ label: '十五分钟', value: '15m' },
{ label: '一小时', value: '1h' },
{ label: '一天', value: '1d' },
@ -321,6 +323,7 @@ const queryWindBlower = () => {
modelId: item.modelId,
}
})
windBlowerValue.value = windBlowerList.value?.[0].irn
}
})
}
@ -450,7 +453,7 @@ const queryHistoryData = () => {
tableData.push({
name: item,
times: realResult[item].times,
value: realResult[item].values,
value: realResult[item].values.map((val: any) => (val === 0 ? 0 : val.toFixed(2))),
})
}
})
@ -529,6 +532,7 @@ const timestampToTime = (timestamp: any) => {
getReportTemplateList()
onMounted(() => {
timeRange.value = shortcuts[0].value()
queryWindBlower()
})
</script>

View File

@ -1,7 +1,8 @@
<template>
<div class="report">
<el-container class="mainContainer">
<el-tabs v-model="activeIndex" class="demo-tabs" @tab-click="handleClick">
<SingleReport />
<!-- <el-tabs v-model="activeIndex" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="运行报表" name="1" class="runningReport">
<RunningReport v-if="activeIndex == '1'"></RunningReport>
</el-tab-pane>
@ -11,7 +12,7 @@
<el-tab-pane label="多机报表" name="3" class="mltipleReport">
<MulipleReport v-if="activeIndex == '3'"></MulipleReport>
</el-tab-pane>
</el-tabs>
</el-tabs> -->
</el-container>
</div>
</template>
@ -40,7 +41,7 @@ const handleClick = (val: any) => {
.mainContainer {
width: 100%;
height: 100%;
padding: 0 20px;
padding: 20px;
.el-tabs {
width: 100%;
--el-tabs-header-height: 60px;