From 17792a477f3be8fc56d6eff2596627e3fbac065f Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Fri, 25 Aug 2023 11:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/alertmodel.js | 53 +++ src/api/model/device.js | 8 + src/api/model/params.js | 8 + src/api/model/policy.js | 55 +++ src/views/model/alert/addalertconfig.vue | 2 +- src/views/model/alert/deviceparamalert.vue | 456 ++++++++++++++++----- src/views/model/alert/model.vue | 382 +++++++++++++++++ src/views/model/alert/policy.vue | 149 ++++--- 8 files changed, 938 insertions(+), 175 deletions(-) create mode 100644 src/api/model/alertmodel.js create mode 100644 src/views/model/alert/model.vue diff --git a/src/api/model/alertmodel.js b/src/api/model/alertmodel.js new file mode 100644 index 0000000..f3a0872 --- /dev/null +++ b/src/api/model/alertmodel.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询告警模版列表 +export function listModel(query) { + return request({ + url: '/model/dcBusiAlertModel/list', + method: 'get', + params: query + }) +} + +// 查询告警模版详细 +export function getModel(id) { + return request({ + url: '/model/dcBusiAlertModel/' + id, + method: 'get' + }) +} + +// 新增告警模版 +export function addModel(data) { + return request({ + url: '/model/dcBusiAlertModel', + method: 'post', + data: data + }) +} + +// 修改告警模版 +export function updateModel(data) { + return request({ + url: '/model/dcBusiAlertModel', + method: 'put', + data: data + }) +} + +// 删除告警模版 +export function delModel(id) { + return request({ + url: '/model/dcBusiAlertModel/' + id, + method: 'delete' + }) +} + +// 导出告警模版 +export function exportModel(query) { + return request({ + url: '/${baseUrl}/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/model/device.js b/src/api/model/device.js index e8c35c4..07f8fd5 100644 --- a/src/api/model/device.js +++ b/src/api/model/device.js @@ -8,6 +8,14 @@ export function listDevice(query) { params: query }) } +// 查询设备信息列表无分页 +export function listDeviceNoPage(query) { + return request({ + url: '/model/dcBaseDeviceinfo/listNoPage', + method: 'get', + params: query + }) +} // 查询设备信息详细 export function getDevice(id) { diff --git a/src/api/model/params.js b/src/api/model/params.js index 4a92438..0ce93c9 100644 --- a/src/api/model/params.js +++ b/src/api/model/params.js @@ -8,6 +8,14 @@ export function listParams(query) { params: query }) } +// 查询设备参数明细列表不分页 +export function listParamsNoPage(query) { + return request({ + url: '/model/dcBaseDeviceParam/listNoPage', + method: 'get', + params: query + }) +} // 查询设备参数明细详细 export function getParams(id) { diff --git a/src/api/model/policy.js b/src/api/model/policy.js index f55991e..eae377a 100644 --- a/src/api/model/policy.js +++ b/src/api/model/policy.js @@ -50,4 +50,59 @@ export function exportPolicy(query) { method: 'get', params: query }) +} + +// 导出参数值状态策略 +export function selectDeviceParamPolicy(query) { + return request({ + url: '/model/dcBusiAlertParamPolicy/selectDeviceParamPolicy', + method: 'post', + params: query + }) +} + + +// 批量新增参数值状态策略 +export function addPolicyBatch(data) { + return request({ + url: '/model/dcBusiAlertParamPolicy/addBatch', + method: 'post', + data: data + }) +} + +// 批量查询参数值状态策略列表 +export function listPolicyNoPage(query) { + return request({ + url: '/model/dcBusiAlertParamPolicy/listNoPage', + method: 'get', + params: query + }) +} + +// 批量修改参数值状态策略 +export function updatePolicyBatch(data) { + return request({ + url: '/model/dcBusiAlertParamPolicy/batchUpdate', + method: 'put', + data: data + }) +} + + +// 查询参数值状态策略信息列表 +export function listPolicyInfo(data) { + return request({ + url: '/model/dcBusiAlertParamPolicy/listInfo', + method: 'post', + data: data + }) +} + +// 删除参数值状态策略 +export function newDelPolicy(ids) { + return request({ + url: '/model/dcBusiAlertParamPolicy/newBatchRemove/' + ids, + method: 'delete' + }) } \ No newline at end of file diff --git a/src/views/model/alert/addalertconfig.vue b/src/views/model/alert/addalertconfig.vue index b0f646a..2c0ac23 100644 --- a/src/views/model/alert/addalertconfig.vue +++ b/src/views/model/alert/addalertconfig.vue @@ -63,7 +63,7 @@ import { required } from "@vee-validate/rules"; import noalertdevices from "./noalertdevices"; import noalertparams from "./noalertparams"; import { onMounted } from "vue"; -import { ElMessage, ElMessageBox } from 'element-plus' +import { ElMessage, ElMessageBox } from 'element-plus'; const { proxy } = getCurrentInstance(); const {dc_class_type, dc_device_partion, dc_model_type} = proxy.useDict('dc_class_type', 'dc_device_partion','dc_model_type'); const router = useRouter(); diff --git a/src/views/model/alert/deviceparamalert.vue b/src/views/model/alert/deviceparamalert.vue index c1aa185..223c64e 100644 --- a/src/views/model/alert/deviceparamalert.vue +++ b/src/views/model/alert/deviceparamalert.vue @@ -77,14 +77,18 @@ - + + + + + - -