diff --git a/imt-ui/src/api/system/notice.js b/imt-ui/src/api/system/notice.js index 14924f1..2f594b1 100644 --- a/imt-ui/src/api/system/notice.js +++ b/imt-ui/src/api/system/notice.js @@ -1,52 +1,60 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询公告列表 export function listNotice(query) { return request({ - url: '/system/notice/page', - method: 'get', - params: query - }) + url: "/system/notice/page", + method: "get", + params: query, + }); } // 查询公告详细 export function getNotice(noticeId) { return request({ - url: '/system/notice/get?id=' + noticeId, - method: 'get' - }) + url: "/system/notice/get?id=" + noticeId, + method: "get", + }); } // 新增公告 export function addNotice(data) { return request({ - url: '/system/notice/create', - method: 'post', - data: data - }) + url: "/system/notice/create", + method: "post", + data: data, + }); } // 修改公告 export function updateNotice(data) { return request({ - url: '/system/notice/update', - method: 'put', - data: data - }) + url: "/system/notice/update", + method: "put", + data: data, + }); } // 删除公告 export function delNotice(noticeId) { return request({ - url: '/system/notice/delete?id=' + noticeId, - method: 'delete' - }) + url: "/system/notice/delete?id=" + noticeId, + method: "delete", + }); } // 推送公告 export function pushNotice(noticeId) { return request({ - url: '/system/notice/push?id=' + noticeId, - method: 'post' - }) + url: "/system/notice/push?id=" + noticeId, + method: "post", + }); +} + +//推送公告直接到站内信 +export function pushMessage(noticeId) { + return request({ + url: "/system/notice/pushMessage?id=" + noticeId, + method: "post", + }); } diff --git a/imt-ui/src/api/system/tenant.js b/imt-ui/src/api/system/tenant.js index bef02c5..833e7fa 100644 --- a/imt-ui/src/api/system/tenant.js +++ b/imt-ui/src/api/system/tenant.js @@ -1,65 +1,73 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 使用租户名,获得租户编号 export function getTenantIdByName(name) { return request({ - url: '/system/tenant/get-id-by-name', - method: 'get', + url: "/system/tenant/get-id-by-name", + method: "get", params: { - name - } - }) + name, + }, + }); } // 创建租户 export function createTenant(data) { return request({ - url: '/system/tenant/create', - method: 'post', - data: data - }) + url: "/system/tenant/create", + method: "post", + data: data, + }); } // 更新租户 export function updateTenant(data) { return request({ - url: '/system/tenant/update', - method: 'put', - data: data - }) + url: "/system/tenant/update", + method: "put", + data: data, + }); } // 删除租户 export function deleteTenant(id) { return request({ - url: '/system/tenant/delete?id=' + id, - method: 'delete' - }) + url: "/system/tenant/delete?id=" + id, + method: "delete", + }); } // 获得租户 export function getTenant(id) { return request({ - url: '/system/tenant/get?id=' + id, - method: 'get' - }) + url: "/system/tenant/get?id=" + id, + method: "get", + }); } // 获得租户分页 export function getTenantPage(query) { return request({ - url: '/system/tenant/page', - method: 'get', - params: query - }) + url: "/system/tenant/page", + method: "get", + params: query, + }); } // 导出租户 Excel export function exportTenantExcel(query) { return request({ - url: '/system/tenant/export-excel', - method: 'get', + url: "/system/tenant/export-excel", + method: "get", params: query, - responseType: 'blob' - }) + responseType: "blob", + }); +} + +//获取租户列表信息 +export function getTenantList() { + return request({ + url: "/system/tenant/getList", + method: "get", + }); } diff --git a/imt-ui/src/views/system/alarm/alarmdata/index.vue b/imt-ui/src/views/system/alarm/alarmdata/index.vue index 9fec9cc..81d6dbe 100644 --- a/imt-ui/src/views/system/alarm/alarmdata/index.vue +++ b/imt-ui/src/views/system/alarm/alarmdata/index.vue @@ -261,11 +261,11 @@ align="center" prop="equipNo" /> - + /> --> --> - {{ parseTime(scope.row.createTime) }} - + --> 点检方案提交 - - - + + @@ -535,10 +534,7 @@ import { getFieldList } from "@/api/data/query.js"; import { getAlarmRules } from "@/api/system/alarm/alarmrules"; import AlarmSubmitMaintenanceOrderForm from "@/views/system/maintenance/maintenanceInfo/alarmSubmitMaintenanceOrderForm.vue"; import { getGatewayCardTree } from "@/api/system/gatewayinfo/card"; -import AlarmSubmitMaintenanceOrderForm - from "@/views/system/maintenance/maintenanceInfo/alarmSubmitMaintenanceOrderForm.vue"; -import AlarmSubmitMaintenancePatrolPlanForm - from "@/views/system/maintenance/maintenanceInfo/AlarmSubmitMaintenancePatrolPlanForm.vue"; +import AlarmSubmitMaintenancePatrolPlanForm from "@/views/system/maintenance/maintenanceInfo/AlarmSubmitMaintenancePatrolPlanForm.vue"; var _ = require("lodash"); export default { name: "AlarmData", @@ -637,16 +633,20 @@ export default { }, methods: { //判断显示维修工单提交还是显示点检方案提交 - showSubmitButton(){ - EquipAlarmDataApi.isSubmitPatrolPlan(this.$route.query.equipAlarmId).then(res=>{ - this.showPatrolPlanSubmit = res.data; - console.log("this.showPatrolPlanSubmit",this.showPatrolPlanSubmit); - if (res.data){ - EquipAlarmDataApi.isSubmitOrder(this.$route.query.equipAlarmId).then(res=>{ - this.maintenanceOrderId = res.data - }) + showSubmitButton() { + EquipAlarmDataApi.isSubmitPatrolPlan(this.$route.query.equipAlarmId).then( + (res) => { + this.showPatrolPlanSubmit = res.data; + console.log("this.showPatrolPlanSubmit", this.showPatrolPlanSubmit); + if (res.data) { + EquipAlarmDataApi.isSubmitOrder( + this.$route.query.equipAlarmId + ).then((res) => { + this.maintenanceOrderId = res.data; + }); + } } - }) + ); }, cardChange(e) { // console.log("选择:", e); @@ -661,6 +661,7 @@ export default { async handleAlarmDataQuery(row) { //需要row提供匹配数据名称和单位等信息 this.loading = true; + console.log("时间", this.datetimeRange); //根据时间查询参数数据 // this.dataQueryParams.nameKey = row // ? row.nameKey @@ -687,7 +688,7 @@ export default { // ); const alarmTime = new Date(this.selectedRow.lastAlarmTime); const hoursAgo = new Date(alarmTime.getTime() - 1 * 60 * 60 * 1000); - this.datetimeRange = [hoursAgo, alarmTime]; + this.datetimeRange = [hoursAgo.toISOString(), alarmTime.toISOString()]; this.handleAlarmDataQuery(null); }, /**报警原因 */ @@ -699,7 +700,7 @@ export default { this.detailLoading = false; }, /**报警趋势 */ - handleAlarmTrend(row) { + async handleAlarmTrend(row) { if (_.endsWith(row.nameKey, "_diff")) { row.nameKey = row.nameKey.substr(0, row.nameKey.length - 5); } @@ -766,7 +767,7 @@ export default { this.$refs.submitOrderForm.open(this.$route.query.equipAlarmId); }, handelPatrolPlan() { - this.$refs.submitPatrolPlanForm.open(this.$route.query.equipAlarmId) + this.$refs.submitPatrolPlanForm.open(this.$route.query.equipAlarmId); }, /**echart表初始化 */ initchart(xData, yData, name, unit) { diff --git a/imt-ui/src/views/system/notify/my/index.vue b/imt-ui/src/views/system/notify/my/index.vue index 9c13e69..41c7da2 100644 --- a/imt-ui/src/views/system/notify/my/index.vue +++ b/imt-ui/src/views/system/notify/my/index.vue @@ -1,71 +1,212 @@