Commit e071db8f authored by 张耀's avatar 张耀

feat:

预警管理指标配置接口对接
parent 72566ef3
...@@ -29,7 +29,9 @@ const add_form = ref(null); ...@@ -29,7 +29,9 @@ const add_form = ref(null);
const SaveSubmit = async () => { const SaveSubmit = async () => {
let res = await add_form.value.Submit(); let res = await add_form.value.Submit();
if (!res) return; if (!res) return;
Save(res, { id, class_id }); Save(res, { id, class_id }, () => {
Cancle();
});
}; };
const Cancle = () => { const Cancle = () => {
router.go(-1); router.go(-1);
...@@ -43,7 +45,6 @@ const getInfoData = () => { ...@@ -43,7 +45,6 @@ const getInfoData = () => {
}) })
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
console.log(res.data.data);
let res_d = res.data.data; let res_d = res.data.data;
infoData.value = { infoData.value = {
name: res_d.metric_name, name: res_d.metric_name,
......
...@@ -2,7 +2,7 @@ import { ElMessage } from "element-plus"; ...@@ -2,7 +2,7 @@ import { ElMessage } from "element-plus";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
const setParams = (res, { id, class_id }) => { const setParams = (res, { id, class_id }) => {
let params = { let params = {
class_id, class_id: +class_id,
metric_name: res.name, metric_name: res.name,
expr: res.indicator_expression, expr: res.indicator_expression,
alert_range: res.warningScopeRows.map((e) => { alert_range: res.warningScopeRows.map((e) => {
......
...@@ -155,7 +155,6 @@ ...@@ -155,7 +155,6 @@
v-model="closeWarningDialog" v-model="closeWarningDialog"
width="400px" width="400px"
:before-close="cancelCloseWarningDialog"> :before-close="cancelCloseWarningDialog">
<div style="padding-top: 20px">
<el-form ref="closeForm" :model="closeFormData" :rules="closeRules" label-width="80px" class="bg_form"> <el-form ref="closeForm" :model="closeFormData" :rules="closeRules" label-width="80px" class="bg_form">
<el-form-item label="关闭备注" prop="close_notes"> <el-form-item label="关闭备注" prop="close_notes">
<el-input <el-input
...@@ -174,7 +173,6 @@ ...@@ -174,7 +173,6 @@
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<template v-slot:footer> <template v-slot:footer>
<div class="apaas_button"> <div class="apaas_button">
<el-button type="default" @click="cancelCloseWarningDialog">取消</el-button> <el-button type="default" @click="cancelCloseWarningDialog">取消</el-button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment