4a37e5f0 by lihua

修复策略的必填检验

1 parent 8a872c10
...@@ -87,6 +87,7 @@ const verifyDialogBtnClick = (btn, info) => { ...@@ -87,6 +87,7 @@ const verifyDialogBtnClick = (btn, info) => {
87 localStorage.setItem('userRole', selectRole.value); 87 localStorage.setItem('userRole', selectRole.value);
88 // 从浏览器缓存中重新加载页面 88 // 从浏览器缓存中重新加载页面
89 location.reload(); 89 location.reload();
90 window.location.href = location.origin + '/';
90 } 91 }
91 }).catch(() => { 92 }).catch(() => {
92 verifyDialogInfo.value.footer.btns[1].loading = false; 93 verifyDialogInfo.value.footer.btns[1].loading = false;
......
...@@ -198,7 +198,7 @@ const tableInfo = ref({ ...@@ -198,7 +198,7 @@ const tableInfo = ref({
198 actionInfo: { 198 actionInfo: {
199 label: "操作", 199 label: "操作",
200 type: "btn", 200 type: "btn",
201 width: 160, 201 width: 140,
202 btns: (scope) => { 202 btns: (scope) => {
203 let btns: any = []; 203 let btns: any = [];
204 let row = scope.row; 204 let row = scope.row;
......
...@@ -474,27 +474,32 @@ const validateValue = () => { ...@@ -474,27 +474,32 @@ const validateValue = () => {
474 proxy.$ElMessage.error('行为类型必填,请填写完整'); 474 proxy.$ElMessage.error('行为类型必填,请填写完整');
475 return false; 475 return false;
476 } 476 }
477 if (!d.constraintName) { 477 // 加密不需要填写约束条件和运算符
478 if (d.action != '加密' && !d.constraintName) {
478 proxy.$ElMessage.error('约束条件必填,请填写完整'); 479 proxy.$ElMessage.error('约束条件必填,请填写完整');
479 return false; 480 return false;
480 } 481 }
481 if (!d.constraintOperatorCode) { 482 if (d.action != '加密' && !d.constraintOperatorCode) {
482 proxy.$ElMessage.error('运算符必填,请填写完整'); 483 proxy.$ElMessage.error('运算符必填,请填写完整');
483 return false; 484 return false;
484 } 485 }
485 if (!d.constraintValue) { 486 if (d.constraintEnName == 'dataField') {
486 proxy.$ElMessage.error('约束值必填,请填写完整'); 487 if (!d.constraintFieldValue?.length) {
488 proxy.$ElMessage.error('字段的约束值必填,请填写完整');
487 return false; 489 return false;
488 } 490 }
489 if (d.constraintName.includes('字段') && !d.constraintFieldValue?.length) { 491 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) {
492 if (!d.constraintConnectorValue?.length) {
490 proxy.$ElMessage.error('约束值必填,请填写完整'); 493 proxy.$ElMessage.error('约束值必填,请填写完整');
491 return false; 494 return false;
492 } 495 }
493 if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && !d.constraintConnectorValue?.length) { 496 } else {
497 if (d.action != '加密' && !d.constraintValue) {
494 proxy.$ElMessage.error('约束值必填,请填写完整'); 498 proxy.$ElMessage.error('约束值必填,请填写完整');
495 return false; 499 return false;
496 } 500 }
497 } 501 }
502 }
498 return true; 503 return true;
499 } 504 }
500 505
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!