diff --git a/src/views/model/alert/deviceparamalert.vue b/src/views/model/alert/deviceparamalert.vue
index 86f6127..f8ce7da 100644
--- a/src/views/model/alert/deviceparamalert.vue
+++ b/src/views/model/alert/deviceparamalert.vue
@@ -3,10 +3,10 @@
-
+
@@ -86,10 +86,10 @@
-
+
-
中台设备ID![Image]()
+
设备编号
@@ -273,7 +273,7 @@
-
+
@@ -305,7 +305,6 @@
-
@@ -612,18 +611,41 @@ function handlePolicy(row) {
function submitForm() {
proxy.$refs["alertRef"].validate(valid => {
if (valid) {
+ let param = {"deviceUuid":form.value.deviceUuid,"paramCode":form.value.paramCode};
if (form.value.id != null) {
- updateAlert(form.value).then(response => {
- proxy.$modal.msgSuccess("修改成功");
- open.value = false;
- getList();
+ getDeviceParamsAlertInfo(param).then(response => {
+ const result = response.rows;
+ const newArray = result.filter(item => item.id !== form.value.id);
+ if (newArray?.length > 0) {
+ ElMessageBox.alert('该告警方式名称重复', '提示', {
+ confirmButtonText: '确定',
+ center: true,
+ })
+ }else{
+ updateAlert(form.value).then(response => {
+ proxy.$modal.msgSuccess("修改成功");
+ open.value = false;
+ getList();
+ });
+ }
});
} else {
- addAlert(form.value).then(response => {
- proxy.$modal.msgSuccess("新增成功");
- open.value = false;
- getList();
- handlePolicy(response.data);
+ getDeviceParamsAlertInfo(param).then(response => {
+ const result = response.rows;
+ const newArray = result.filter(item => item.id !== form.value.id);
+ if (newArray?.length > 0) {
+ ElMessageBox.alert('该告警方式名称重复', '提示', {
+ confirmButtonText: '确定',
+ center: true,
+ })
+ }else{
+ addAlert(form.value).then(response => {
+ proxy.$modal.msgSuccess("新增成功");
+ open.value = false;
+ getList();
+ handlePolicy(response.data);
+ });
+ }
});
}
}
@@ -684,12 +706,11 @@ function handleDelete(row) {
}
const _names = row.deviceName?row.deviceName + "-" + row.paramName : names.value;
proxy.$modal.confirm('是否确认删除"' + _names + '"的告警策略?').then(function() {
- return delLogicconfig(_ids);
+ return delAlert(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
-
}
/** 导出按钮操作 */
@@ -859,11 +880,13 @@ function getModelList(row){
queryModel.value.logicCode = row.logicCode;
queryModel.value.paramType = row.paramType;
listModelEnabledNoPage(queryModel.value).then(response => {
+
modelList.value = response.data;
formPolicy.value.alertId = row.id;
formPolicy.value.deviceId = row.deviceUuid;
proxy.$refs.policyTable.clearSelection();
listPolicyInfo(queryPolicy.value).then(responsePolicy=>{
+
//修改界面初始化
if(responsePolicy.data && responsePolicy.data.length>0){
oldPolicyRows.value = responsePolicy.data;
@@ -872,6 +895,7 @@ function getModelList(row){
formPolicy.value.id = responsePolicy.data[0].id;
modelList.value.map(element=>{
responsePolicy.data.forEach(item=>{
+
if(item.alertModelId == element.id){
// policyDeviceUuid.value = item.deviceId;
// policyAlertId.value = item.alertId;
@@ -893,8 +917,6 @@ function getModelList(row){
element.id = item.alertModelId;
proxy.$refs.policyTable.toggleRowSelection(element,true);
return element;
- }else{
- element.id = null;
}
})
})
@@ -919,6 +941,7 @@ function mapFormTable(){
}else if(paramTypeValue.value == '1'){
policyParam.intValue = item.value;
}
+
policyParam.level = item.level;
policyParam.alertModelId = item.id;
policyParam.name = item.name;
@@ -947,6 +970,7 @@ function mapFormTableUpdate(){
}else if(paramTypeValue.value == '1'){
policyParam.intValue = item.value;
}
+
policyParam.level = item.level;
policyParam.alertModelId = item.id;
policyParam.name = item.name;
@@ -1195,7 +1219,6 @@ function levelChange(value){
}
})
}
-
}
function toggleFixedColumns() {
diff --git a/src/views/model/alert/logicconfig.vue b/src/views/model/alert/logicconfig.vue
index 00fe5f5..d7af891 100644
--- a/src/views/model/alert/logicconfig.vue
+++ b/src/views/model/alert/logicconfig.vue
@@ -321,7 +321,7 @@ function submitForm() {
center: true,
})
}else{
- listLogicconfigNoPage(form.value).then(response => {
+ updateLogicconfig(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
@@ -329,7 +329,7 @@ function submitForm() {
}
});
} else {
- listLogicconfig(param).then(response => {
+ listLogicconfigNoPage(param).then(response => {
const result = response.data;
const newArray = result.filter(item => item.id !== form.value.id);
if (newArray?.length > 0) {
diff --git a/src/views/model/alert/method.vue b/src/views/model/alert/method.vue
index 7df9a47..98e07e8 100644
--- a/src/views/model/alert/method.vue
+++ b/src/views/model/alert/method.vue
@@ -285,7 +285,8 @@ function submitForm() {
if (form.value.id != null) {
listMethodNoPage(param).then(response => {
const result = response.data;
- if(result?.length > 0){
+ const newArray = result.filter(item => item.id !== form.value.id);
+ if (newArray?.length > 0) {
ElMessageBox.alert('该告警方式名称重复', '提示', {
confirmButtonText: '确定',
center: true,
diff --git a/src/views/model/alert/noalertparams.vue b/src/views/model/alert/noalertparams.vue
index b067a92..1fa6d9c 100644
--- a/src/views/model/alert/noalertparams.vue
+++ b/src/views/model/alert/noalertparams.vue
@@ -63,7 +63,7 @@
-
+
diff --git a/src/views/model/alert/policy.vue b/src/views/model/alert/policy.vue
index d6866d5..d4517e3 100644
--- a/src/views/model/alert/policy.vue
+++ b/src/views/model/alert/policy.vue
@@ -148,10 +148,10 @@
-->
-
+
】
@@ -451,8 +451,10 @@ function submitForm() {
/** 导出按钮操作 */
function handleExport() {
+ let paramForSearch = {...queryParams.value};
+ paramForSearch.methodIds = paramForSearch?.methodIds?.join(',');
proxy.download('model/dcBusiAlertParamPolicy/export', {
- ...queryParams.value
+ ...paramForSearch
}, `policy_${new Date().getTime()}.xlsx`)
}
diff --git a/src/views/model/device/index.vue b/src/views/model/device/index.vue
index bdea6e5..8030240 100644
--- a/src/views/model/device/index.vue
+++ b/src/views/model/device/index.vue
@@ -241,7 +241,7 @@
-
+
@@ -409,11 +409,11 @@
-
+
@@ -423,7 +423,7 @@
-
+
@@ -729,7 +729,7 @@ function submitForm() {
listWithFilterColumn(param).then(response => {
let total = response.data.tableData.total;
if(total > 0){
- ElMessageBox.alert('设备中台uuid不能重复', '提示', {
+ ElMessageBox.alert('设备uuid不能重复', '提示', {
confirmButtonText: '确定',
center: true,
})
diff --git a/src/views/model/paramclass/index.vue b/src/views/model/paramclass/index.vue
index 2371e9e..55793a4 100644
--- a/src/views/model/paramclass/index.vue
+++ b/src/views/model/paramclass/index.vue
@@ -53,10 +53,6 @@
-
-
-
-
@@ -174,6 +170,11 @@
+
+
+
+
+
@@ -192,9 +193,9 @@