|
@@ -8,9 +8,9 @@
|
|
|
</div>
|
|
|
<vue-seamless-scroll :data="listData" class="seamless-warp" :class-option="classOption">
|
|
|
<div class="seamless-item" v-for="(item, index) in listData" :key="index">
|
|
|
- <div>{{ item.name }}</div>
|
|
|
- <div>{{ item.type }}</div>
|
|
|
- <div>{{ item.createTime }}</div>
|
|
|
+ <div>{{ item.alarmMsg }}</div>
|
|
|
+ <div>{{ item.objName}}</div>
|
|
|
+ <div>{{ item.alarmTime }}</div>
|
|
|
</div>
|
|
|
</vue-seamless-scroll>
|
|
|
</CusModule>
|
|
@@ -40,9 +40,13 @@ import * as echarts from 'echarts'
|
|
|
import {mapState} from 'vuex';
|
|
|
import {DateTool} from "@/utils/DateTool";
|
|
|
import {ecoDateRange, predictionProdDateRange} from "@/api/screen";
|
|
|
+import {listAlarmInfo} from "@/api/alarm/alarm-info";
|
|
|
+import {ALARM_STATE} from "@/enums/alarm";
|
|
|
+import {ApiCode} from "@/api/apiEmums";
|
|
|
|
|
|
export default {
|
|
|
name: 'SourceRight',
|
|
|
+ dicts: ['alarm_type'],
|
|
|
data() {
|
|
|
return {
|
|
|
lineData: [],
|
|
@@ -61,38 +65,7 @@ export default {
|
|
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
|
|
waitTime: 1000 // 单步运动停止
|
|
|
},
|
|
|
- listData: [
|
|
|
- {
|
|
|
- name: '光伏板故障',
|
|
|
- type: 'AF1001',
|
|
|
- createTime: '2024-10-07 12:15:46'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '变电柜故障',
|
|
|
- type: 'AB1068',
|
|
|
- createTime: '2024-10-08 11:11:41'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '光伏板故障',
|
|
|
- type: 'AF1066',
|
|
|
- createTime: '2024-10-09 15:15:46'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '变电相故障',
|
|
|
- type: 'AC1061',
|
|
|
- createTime: '2024-10-08 11:11:41'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '变电柜故障',
|
|
|
- type: 'AB1076',
|
|
|
- createTime: '2024-10-10 12:33:40'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '光伏板故障',
|
|
|
- type: 'AF1008',
|
|
|
- createTime: '2024-10-10 12:35:40'
|
|
|
- }
|
|
|
- ]
|
|
|
+ listData: []
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -186,6 +159,7 @@ export default {
|
|
|
getDatas() {
|
|
|
this.getEcoDateRange()
|
|
|
this.getDatesOfLastTenDays()
|
|
|
+ this.getRealTimeAlarm()
|
|
|
},
|
|
|
async getDatesOfLastTenDays() {
|
|
|
const next5Day = DateTool.addDays(DateTool.now(), 4);
|
|
@@ -215,6 +189,24 @@ export default {
|
|
|
this.reduce.coal = (elecEcoQuantity * this.elec2CFactor / 1000).toFixed(2)
|
|
|
this.reduce.co2 = (elecEcoQuantity * this.regionFactor / 1000).toFixed(2)
|
|
|
},
|
|
|
+ async getRealTimeAlarm() {
|
|
|
+ let result = [];
|
|
|
+ const {
|
|
|
+ code,
|
|
|
+ rows,
|
|
|
+ } = await listAlarmInfo({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ areaCode: this.areaType,
|
|
|
+ alarmStateList: [
|
|
|
+ ALARM_STATE.new.value, ALARM_STATE.disposing.value,
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ if (ApiCode.SUCCESS === code && rows && rows.length > 0) {
|
|
|
+ result = rows;
|
|
|
+ }
|
|
|
+ this.listData = result;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|