Browse Source

根据测试修改bug

develop
ljlong_2630 1 year ago
parent
commit
4086d6f0dc
  1. 45
      src/views/model/alert/deviceparamalert.vue
  2. 1
      src/views/model/alert/policy.vue
  3. 17
      src/views/model/params/index.vue

45
src/views/model/alert/deviceparamalert.vue

@ -783,16 +783,45 @@ function submitFormPolicy() {
mapFormTableUpdate(); mapFormTableUpdate();
computeDelPolicy(); computeDelPolicy();
computeAddPolicy(); computeAddPolicy();
updatePolicyBatch(policyParams.value,deletePolicyRows.value,addPolicyRows.value,policyDeviceUuid.value).then(response => { if(deletePolicyRows.value?.length>0){
proxy.$modal.msgSuccess("修改成功"); const policyTableRows = proxy.$refs.policyTable.getSelectionRows();
openPolicy.value = false; if(policyTableRows===undefined||policyTableRows==null||policyTableRows.length==0){
getList(); ElMessageBox.confirm('确定删除所有告警配置?', '提示', {
}); confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
center: true,
}).then(() => {
//
updatePolicyBatch(policyParams.value,deletePolicyRows.value,addPolicyRows.value,policyDeviceUuid.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false;
getList();
});
}).catch(() => {
//
return;
});
}else{
updatePolicyBatch(policyParams.value,deletePolicyRows.value,addPolicyRows.value,policyDeviceUuid.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false;
getList();
});
}
}else{
updatePolicyBatch(policyParams.value,deletePolicyRows.value,addPolicyRows.value,policyDeviceUuid.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false;
getList();
});
}
}else if(logicCode.value == 'A'){ }else if(logicCode.value == 'A'){
if (valid) { if (valid) {
formPolicy.value.methodIds = formPolicy.value.methodIds?.join(','); formPolicy.value.methodIds = formPolicy.value.methodIds?.join(',');
updatePolicy(formPolicy.value).then(response => { updatePolicy(formPolicy.value).then(response => {
proxy.$modal.msgSuccess("新增成功"); proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false; openPolicy.value = false;
getList(); getList();
}); });
@ -831,7 +860,7 @@ function submitFormPolicy() {
if (valid) { if (valid) {
formPolicy.value.methodIds = formPolicy.value.methodIds?.join(','); formPolicy.value.methodIds = formPolicy.value.methodIds?.join(',');
addPolicy(formPolicy.value).then(response => { addPolicy(formPolicy.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("新增成功");
openPolicy.value = false; openPolicy.value = false;
getList(); getList();
}); });
@ -1032,7 +1061,7 @@ function computeDelPolicy() {
policyParam.name = item.name; policyParam.name = item.name;
policyParam.statusValue = item.statusValue; policyParam.statusValue = item.statusValue;
policyParam.statusType = item.statusType; policyParam.statusType = item.statusType;
policyParam.methodIds = item.methodIds?.join(','); policyParam.methodIds = item.methodIds;
policyParam.operator = item.operator; policyParam.operator = item.operator;
policyParam.sortId = item.sort; policyParam.sortId = item.sort;
deletePolicyRows.value.push(policyParam); deletePolicyRows.value.push(policyParam);

1
src/views/model/alert/policy.vue

@ -227,6 +227,7 @@
<el-table-column label="等级" align="center" prop="level" /> <el-table-column label="等级" align="center" prop="level" />
<el-table-column label="运算符" align="center" prop="operator" /> <el-table-column label="运算符" align="center" prop="operator" />
<el-table-column label="代码" align="center" prop="code" /> <el-table-column label="代码" align="center" prop="code" />
<el-table-column label="等级名称" align="center" prop="levelName" />
</el-table> </el-table>
<pagination <pagination

17
src/views/model/params/index.vue

@ -378,6 +378,12 @@
</template> </template>
<style lang="scss" > <style lang="scss" >
@import "@/assets/styles/self-defined.scss"; @import "@/assets/styles/self-defined.scss";
.center-message {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
</style> </style>
<script setup name="Params"> <script setup name="Params">
import { listParams, getParams, delParams, addParams, updateParams,listWithFilterColumn } from "@/api/model/params"; import { listParams, getParams, delParams, addParams, updateParams,listWithFilterColumn } from "@/api/model/params";
@ -651,9 +657,13 @@ function submitForm() {
}) })
}else{ }else{
updateParams(form.value).then(response => { updateParams(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); if(response.msg!=null&&!response.msg.includes("操作成功")){
open.value = false; proxy.$modal.msgWarning(response.msg);
getList(); }else{
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
}
}); });
} }
}); });
@ -854,7 +864,6 @@ function getfilterNameItem(value){
}else if(value==='paramModelId'){ }else if(value==='paramModelId'){
if(sortItemMap.value[value]?.length>0 && sortItemMap.value[value].value != undefined && sortItemMap.value[value].value != null){ if(sortItemMap.value[value]?.length>0 && sortItemMap.value[value].value != undefined && sortItemMap.value[value].value != null){
result = sortItemMap.value[value].map(element=>{ result = sortItemMap.value[value].map(element=>{
debugger
return { return {
text: getParamModelName(element.value), text: getParamModelName(element.value),
value: element.value, value: element.value,

Loading…
Cancel
Save