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();
computeDelPolicy();
computeAddPolicy();
updatePolicyBatch(policyParams.value,deletePolicyRows.value,addPolicyRows.value,policyDeviceUuid.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false;
getList();
});
if(deletePolicyRows.value?.length>0){
const policyTableRows = proxy.$refs.policyTable.getSelectionRows();
if(policyTableRows===undefined||policyTableRows==null||policyTableRows.length==0){
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'){
if (valid) {
formPolicy.value.methodIds = formPolicy.value.methodIds?.join(',');
updatePolicy(formPolicy.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
proxy.$modal.msgSuccess("修改成功");
openPolicy.value = false;
getList();
});
@ -831,7 +860,7 @@ function submitFormPolicy() {
if (valid) {
formPolicy.value.methodIds = formPolicy.value.methodIds?.join(',');
addPolicy(formPolicy.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
proxy.$modal.msgSuccess("新增成功");
openPolicy.value = false;
getList();
});
@ -1032,7 +1061,7 @@ function computeDelPolicy() {
policyParam.name = item.name;
policyParam.statusValue = item.statusValue;
policyParam.statusType = item.statusType;
policyParam.methodIds = item.methodIds?.join(',');
policyParam.methodIds = item.methodIds;
policyParam.operator = item.operator;
policyParam.sortId = item.sort;
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="operator" />
<el-table-column label="代码" align="center" prop="code" />
<el-table-column label="等级名称" align="center" prop="levelName" />
</el-table>
<pagination

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

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

Loading…
Cancel
Save