5 changed files with 162 additions and 10 deletions
@ -0,0 +1,10 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 调用非机预警设备订阅事件
|
||||
|
export function eventSubscription(data) { |
||||
|
return request({ |
||||
|
url: '/nonAutomaticWarning/eventSubscription', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!-- 添加或修改【请填写功能名称】对话框 --> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="用户名称" prop="APPKEY"> |
||||
|
<el-input v-model="form.APPKEY" placeholder="请输入用户名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用户密码" prop="APPSECRET"> |
||||
|
<el-input v-model="form.APPSECRET" placeholder="请输入用户密码" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="请求路径" prop="URI"> |
||||
|
<el-input v-model="form.URI" placeholder="请输入请求路径" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="请求端口" prop="IP"> |
||||
|
<el-input v-model="form.IP" placeholder="请输入请求端口" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button style="float: right" type="primary" @click="submitForm">订阅</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { eventSubscription } from "@/api/system/NonAutomaticWarning"; |
||||
|
export default { |
||||
|
name: "NonAutomaticWarning", |
||||
|
data() { |
||||
|
return { |
||||
|
// 表单参数 |
||||
|
form: { |
||||
|
APPKEY:'22825659', |
||||
|
APPSECRET:'7Qcq3fr1gaYws6QhyDqt', |
||||
|
URI:'/artemis/api/common/v1/event/getTopicInfo', |
||||
|
IP:'10.0.81.28' |
||||
|
}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
APPKEY: [ |
||||
|
{ required: true, message: '请输入用户名称', trigger: 'blur' } |
||||
|
], |
||||
|
APPSECRET: [ |
||||
|
{ required: true, message: '请输入用户密码', trigger: 'blur' } |
||||
|
], |
||||
|
URI: [ |
||||
|
{ required: true, message: '请输入请求路径', trigger: 'blur' } |
||||
|
], |
||||
|
IP: [ |
||||
|
{ required: true, message: '请输入请求端口', trigger: 'blur' } |
||||
|
], |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
APPKEY:'22825659', |
||||
|
APPSECRET:'7Qcq3fr1gaYws6QhyDqt', |
||||
|
URI:'/artemis/api/common/v1/event/getTopicInfo', |
||||
|
IP:'10.0.81.28' |
||||
|
// APPKEY:null, |
||||
|
// APPSECRET:null, |
||||
|
// URI:null, |
||||
|
// IP:null |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
console.log(this.form) |
||||
|
eventSubscription(this.form).then((response)=>{ |
||||
|
console.log(response) |
||||
|
}) |
||||
|
this.reset() |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,24 @@ |
|||||
|
package com.zc.business.domain; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel(value = "NonAutomaticWarning", description = "非机预警事件订阅实体类") |
||||
|
public class NonAutomaticWarning { |
||||
|
|
||||
|
@ApiModelProperty("用户名称") |
||||
|
@JsonProperty |
||||
|
private String APPKEY; |
||||
|
@ApiModelProperty("用户密码") |
||||
|
@JsonProperty |
||||
|
private String APPSECRET; |
||||
|
@ApiModelProperty("请求路径") |
||||
|
@JsonProperty |
||||
|
private String URI; |
||||
|
@ApiModelProperty("请求IP") |
||||
|
@JsonProperty |
||||
|
private String IP; |
||||
|
} |
Loading…
Reference in new issue