|
@ -1,20 +1,20 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<!-- 添加或修改【请填写功能名称】对话框 --> |
|
|
<!-- 添加或修改【请填写功能名称】对话框 --> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<el-form-item label="用户名称" prop="APPKEY"> |
|
|
<el-form-item label="用户名称" prop="APPKEY"> |
|
|
<el-input v-model="form.APPKEY" placeholder="请输入用户名称" /> |
|
|
<el-input v-model="form.APPKEY" placeholder="请输入用户名称"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="用户密码" prop="APPSECRET"> |
|
|
<el-form-item label="用户密码" prop="APPSECRET"> |
|
|
<el-input v-model="form.APPSECRET" placeholder="请输入用户密码" /> |
|
|
<el-input v-model="form.APPSECRET" placeholder="请输入用户密码"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="请求路径" prop="URI"> |
|
|
<el-form-item label="请求路径" prop="URI"> |
|
|
<el-input v-model="form.URI" placeholder="请输入请求路径" /> |
|
|
<el-input v-model="form.URI" placeholder="请输入请求路径"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="请求端口" prop="IP"> |
|
|
<el-form-item label="请求端口" prop="IP"> |
|
|
<el-input v-model="form.IP" placeholder="请输入请求端口" /> |
|
|
<el-input v-model="form.IP" placeholder="请输入请求端口"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button style="float: right" type="primary" @click="submitForm">订阅</el-button> |
|
|
<el-button style="float: right" type="primary" @click="submitForm">订阅</el-button> |
|
|
</div> |
|
|
</div> |
|
@ -22,17 +22,18 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { eventSubscription } from "@/api/system/NonAutomaticWarning"; |
|
|
import { eventSubscription } from '@/api/system/NonAutomaticWarning' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "NonAutomaticWarning", |
|
|
name: 'NonAutomaticWarning', |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
// 表单参数 |
|
|
// 表单参数 |
|
|
form: { |
|
|
form: { |
|
|
APPKEY:'22825659', |
|
|
APPKEY: '22825659', |
|
|
APPSECRET:'7Qcq3fr1gaYws6QhyDqt', |
|
|
APPSECRET: '7Qcq3fr1gaYws6QhyDqt', |
|
|
URI:'/artemis/api/common/v1/event/getTopicInfo', |
|
|
URI: '/artemis/api/common/v1/event/getTopicInfo', |
|
|
IP:'10.0.81.28' |
|
|
IP: '10.0.81.28' |
|
|
}, |
|
|
}, |
|
|
// 表单校验 |
|
|
// 表单校验 |
|
|
rules: { |
|
|
rules: { |
|
@ -47,37 +48,35 @@ export default { |
|
|
], |
|
|
], |
|
|
IP: [ |
|
|
IP: [ |
|
|
{ required: true, message: '请输入请求端口', trigger: 'blur' } |
|
|
{ required: true, message: '请输入请求端口', trigger: 'blur' } |
|
|
], |
|
|
] |
|
|
} |
|
|
} |
|
|
}; |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 表单重置 |
|
|
// 表单重置 |
|
|
reset() { |
|
|
reset() { |
|
|
this.form = { |
|
|
this.form = { |
|
|
APPKEY:'22825659', |
|
|
APPKEY: '22825659', |
|
|
APPSECRET:'7Qcq3fr1gaYws6QhyDqt', |
|
|
APPSECRET: '7Qcq3fr1gaYws6QhyDqt', |
|
|
URI:'/artemis/api/common/v1/event/getTopicInfo', |
|
|
URI: '/artemis/api/common/v1/event/getTopicInfo', |
|
|
IP:'10.0.81.28' |
|
|
IP: '10.0.81.28' |
|
|
// APPKEY:null, |
|
|
// APPKEY:null, |
|
|
// APPSECRET:null, |
|
|
// APPSECRET:null, |
|
|
// URI:null, |
|
|
// URI:null, |
|
|
// IP:null |
|
|
// IP:null |
|
|
}; |
|
|
} |
|
|
this.resetForm("form"); |
|
|
this.resetForm('form') |
|
|
}, |
|
|
}, |
|
|
/** 提交按钮 */ |
|
|
/** 提交按钮 */ |
|
|
submitForm() { |
|
|
submitForm() { |
|
|
this.$refs["form"].validate(valid => { |
|
|
this.$refs['form'].validate(valid => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
console.log(this.form) |
|
|
eventSubscription(this.form).then(response => { |
|
|
eventSubscription(this.form).then((response)=>{ |
|
|
|
|
|
console.log(response) |
|
|
|
|
|
}) |
|
|
}) |
|
|
this.reset() |
|
|
this.reset() |
|
|
} |
|
|
} |
|
|
}); |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|