|
@@ -113,8 +113,6 @@
|
|
|
|
|
|
<script>
|
|
|
import * as echarts from 'echarts'
|
|
|
-// import { listAlarmdata } from "@/api/alarm/alarmdata.js";
|
|
|
-// import { listNotice } from "@/api/system/notice";
|
|
|
// import { firstload } from "@/api/homepage.js";
|
|
|
// import { envirinfo } from "@/api/environSafe/hsmsstatistics.js";
|
|
|
import { httpAction, getAction, postAction } from '@/api/manage'
|
|
@@ -129,20 +127,20 @@ export default {
|
|
|
{
|
|
|
title: '消息标题',
|
|
|
align: 'center',
|
|
|
- dataIndex: 'noticeTitle',
|
|
|
+ dataIndex: 'titile',
|
|
|
customRender: function (text) {
|
|
|
return !text ? '' : text.length > 20 ? text.substr(0, 20) + "..." : text
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- title: '消息类型',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'noticeType',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '消息类型',
|
|
|
+ // align: 'center',
|
|
|
+ // dataIndex: 'msgCategory',
|
|
|
+ // },
|
|
|
{
|
|
|
title: '生成时间',
|
|
|
align: 'center',
|
|
|
- dataIndex: 'createTime',
|
|
|
+ dataIndex: 'msgContent',
|
|
|
},
|
|
|
],
|
|
|
alarmcolumns: [
|
|
@@ -155,12 +153,19 @@ export default {
|
|
|
title: '报警描述',
|
|
|
align: 'center',
|
|
|
dataIndex: 'remark',
|
|
|
+ render: (text) => {
|
|
|
+ const maxLength = 20; // 最大长度
|
|
|
+ return text.length > maxLength ? `${text.substring(0, maxLength)}...` : text;
|
|
|
+ },
|
|
|
+ // customRender: function (text) {
|
|
|
+ // return !text ? '' : text.length > 20 ? text.substr(0, 20) + "..." : text
|
|
|
+ // },
|
|
|
},
|
|
|
- {
|
|
|
- title: '报警类型',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'alarmtype',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '报警类型',
|
|
|
+ // align: 'center',
|
|
|
+ // dataIndex: 'alarmtype',
|
|
|
+ // },
|
|
|
{
|
|
|
title: '报警时间',
|
|
|
align: 'center',
|
|
@@ -222,14 +227,16 @@ export default {
|
|
|
//湿度
|
|
|
humis:[],
|
|
|
url: {
|
|
|
- list: "/homepate/statistics/firstload",
|
|
|
- equipment: "/equipmentStatistics/equipmentStatistics/machineSum",
|
|
|
- repair: "/cmmsRepair/cmmsRepair/indexrepairnum",
|
|
|
- upkeep: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNumDay",
|
|
|
- upkeepAll: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNum",
|
|
|
- inspect: "/cmmsInspect/cmmsInspect/indexinspectnum",
|
|
|
- todayelectricity: "/dataElectricity/dataElectricity/todayelectricity",
|
|
|
- envirinfo: "/hsms/statistics/envirinfo",
|
|
|
+ list: "/homepate/statistics/firstload",
|
|
|
+ equipment: "/equipmentStatistics/equipmentStatistics/machineSum",
|
|
|
+ repair: "/cmmsRepair/cmmsRepair/indexrepairnum",
|
|
|
+ upkeep: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNumDay",
|
|
|
+ upkeepAll: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNum",
|
|
|
+ inspect: "/cmmsInspect/cmmsInspect/indexinspectnum",
|
|
|
+ todayelectricity: "/dataElectricity/dataElectricity/todayelectricity",
|
|
|
+ envirinfo: "/hsms/statistics/envirinfo",
|
|
|
+ listAlarm: "/tpmMessageAlarm/tpmMessageAlarm/list",
|
|
|
+ listNotice: "/sys/sysAnnouncementSend/getAllAnnouncementSend",
|
|
|
},
|
|
|
}
|
|
|
},
|
|
@@ -384,9 +391,10 @@ export default {
|
|
|
this.initTempAndHumiEcharts();
|
|
|
})
|
|
|
|
|
|
-
|
|
|
- this.alarmList = emsdata.homedata.alarmData;
|
|
|
- this.noticeList = emsdata.homedata.noticeData;
|
|
|
+ this.getAlarmList()
|
|
|
+ this.getNoticeList()
|
|
|
+ // this.alarmList = emsdata.homedata.alarmData;
|
|
|
+ // this.noticeList = emsdata.homedata.noticeData;
|
|
|
// this.EnvironmentTemp = emsdata.homedata.EnvironmentTemp;
|
|
|
|
|
|
// this.initEcharts();
|
|
@@ -399,19 +407,24 @@ export default {
|
|
|
pageSize: 5,
|
|
|
status: '0',
|
|
|
}
|
|
|
- listAlarmdata(queryParams).then((response) => {
|
|
|
- this.alarmList = response.rows;
|
|
|
- });
|
|
|
+
|
|
|
+ getAction(this.url.listAlarm, queryParams).then(res=>{
|
|
|
+ console.log("Alarm", res)
|
|
|
+ this.alarmList = res.result.records;
|
|
|
+ })
|
|
|
},
|
|
|
/** 查询消息列表 */
|
|
|
getNoticeList() {
|
|
|
var queryParams = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 5,
|
|
|
+ readFlag: '0'
|
|
|
}
|
|
|
- listNotice(queryParams).then(response => {
|
|
|
- this.noticeList = response.rows;
|
|
|
- });
|
|
|
+
|
|
|
+ getAction(this.url.listNotice, queryParams).then(res=>{
|
|
|
+ console.log("Notice", res)
|
|
|
+ this.noticeList = res.result.records;
|
|
|
+ })
|
|
|
},
|
|
|
initEcharts(){
|
|
|
var _this = this
|