|
|
@ -1,20 +1,20 @@ |
|
|
|
<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> |
|
|
|
<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> |
|
|
@ -22,17 +22,18 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { eventSubscription } from "@/api/system/NonAutomaticWarning"; |
|
|
|
import { eventSubscription } from '@/api/system/NonAutomaticWarning' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "NonAutomaticWarning", |
|
|
|
name: 'NonAutomaticWarning', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// 表单参数 |
|
|
|
form: { |
|
|
|
APPKEY:'22825659', |
|
|
|
APPSECRET:'7Qcq3fr1gaYws6QhyDqt', |
|
|
|
URI:'/artemis/api/common/v1/event/getTopicInfo', |
|
|
|
IP:'10.0.81.28' |
|
|
|
APPKEY: '22825659', |
|
|
|
APPSECRET: '7Qcq3fr1gaYws6QhyDqt', |
|
|
|
URI: '/artemis/api/common/v1/event/getTopicInfo', |
|
|
|
IP: '10.0.81.28' |
|
|
|
}, |
|
|
|
// 表单校验 |
|
|
|
rules: { |
|
|
@ -47,37 +48,35 @@ export default { |
|
|
|
], |
|
|
|
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: '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"); |
|
|
|
} |
|
|
|
this.resetForm('form') |
|
|
|
}, |
|
|
|
/** 提交按钮 */ |
|
|
|
submitForm() { |
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
this.$refs['form'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
console.log(this.form) |
|
|
|
eventSubscription(this.form).then((response)=>{ |
|
|
|
console.log(response) |
|
|
|
eventSubscription(this.form).then(response => { |
|
|
|
}) |
|
|
|
this.reset() |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
</script> |
|
|
|