mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-02 04:57:57 +08:00
后管页面新增 推送设备告警信息
This commit is contained in:
@@ -150,4 +150,23 @@ public class ThirdPartyNotificationController extends BaseController {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备告警信息推送
|
||||||
|
*/
|
||||||
|
@PostMapping("/notificationAlarmInfo")
|
||||||
|
public AjaxResult notificationAlarmInfo(@RequestBody NotificationDTO dto) {
|
||||||
|
AjaxResult result;
|
||||||
|
try {
|
||||||
|
notificationService.notificationAlarmInfo(dto);
|
||||||
|
result = AjaxResult.success();
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
logger.error("设备告警信息推送失败", e);
|
||||||
|
result = AjaxResult.error(e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("设备告警信息推送失败", e);
|
||||||
|
result = AjaxResult.error();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,3 +39,11 @@ export function notificationStationFee(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function notificationAlarmInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/thirdparty/notification/notificationAlarmInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -192,6 +192,29 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card class="box-card" style="margin: 20px 20px 0 20px;" shadow="hover">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>推送设备告警信息</span>
|
||||||
|
<el-button style="float: right; padding: 3px 0" type="text"
|
||||||
|
@click="clickNotificationAlarmInfo">推送</el-button>
|
||||||
|
</div>
|
||||||
|
<el-form ref="notificationForm" :model="notificationAlarmForm" label-width="20%">
|
||||||
|
<el-form-item label="充电桩枪口号" class="getCard">
|
||||||
|
<el-input v-model="notificationAlarmForm.pileConnectorCode"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="枪口状态" class="getCard">
|
||||||
|
<el-input v-model="notificationAlarmForm.status"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item>
|
||||||
|
<el-button type="primary" @click="clickNotificationStationStatus">推送设备状态</el-button>
|
||||||
|
</el-form-item>-->
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
@@ -206,10 +229,11 @@ import { addSecret, getSecret, selectStationList, updateSecret } from "@/api/thi
|
|||||||
import { generateRandomID, isEmptyString } from "@/utils/common";
|
import { generateRandomID, isEmptyString } from "@/utils/common";
|
||||||
import Template from "@/views/billing/template";
|
import Template from "@/views/billing/template";
|
||||||
import {
|
import {
|
||||||
notificationChargeOrderInfo,
|
notificationAlarmInfo,
|
||||||
notificationConnectorChargeStatus, notificationStationFee,
|
notificationChargeOrderInfo,
|
||||||
notificationStationInfo,
|
notificationConnectorChargeStatus, notificationStationFee,
|
||||||
notificationStationStatus
|
notificationStationInfo,
|
||||||
|
notificationStationStatus
|
||||||
} from "@/api/thirdParty/notification";
|
} from "@/api/thirdParty/notification";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -224,6 +248,7 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
notificationStationId: null,
|
notificationStationId: null,
|
||||||
notificationForm: {},
|
notificationForm: {},
|
||||||
|
notificationAlarmForm: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {},
|
||||||
stationList: [],
|
stationList: [],
|
||||||
@@ -295,6 +320,14 @@ export default {
|
|||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 点击推送设备告警信息
|
||||||
|
clickNotificationAlarmInfo() {
|
||||||
|
this.notificationAlarmForm.stationId = this.notificationStationId;
|
||||||
|
this.notificationAlarmForm.platformType = this.platformType;
|
||||||
|
notificationAlarmInfo(this.notificationAlarmForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
});
|
||||||
|
},
|
||||||
// 点击打开 通知菜单
|
// 点击打开 通知菜单
|
||||||
clickDrawer(stationId, stationName) {
|
clickDrawer(stationId, stationName) {
|
||||||
// console.log("站点id:", stationId);
|
// console.log("站点id:", stationId);
|
||||||
|
|||||||
Reference in New Issue
Block a user