修复策略的必填检验
Showing
3 changed files
with
20 additions
and
14 deletions
| ... | @@ -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,25 +474,30 @@ const validateValue = () => { | ... | @@ -474,25 +474,30 @@ 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) { |
| 487 | return false; | 488 | proxy.$ElMessage.error('字段的约束值必填,请填写完整'); |
| 488 | } | 489 | return false; |
| 489 | if (d.constraintName.includes('字段') && !d.constraintFieldValue?.length) { | 490 | } |
| 490 | proxy.$ElMessage.error('约束值必填,请填写完整'); | 491 | } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) { |
| 491 | return false; | 492 | if (!d.constraintConnectorValue?.length) { |
| 492 | } | 493 | proxy.$ElMessage.error('约束值必填,请填写完整'); |
| 493 | if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && !d.constraintConnectorValue?.length) { | 494 | return false; |
| 494 | proxy.$ElMessage.error('约束值必填,请填写完整'); | 495 | } |
| 495 | return false; | 496 | } else { |
| 497 | if (d.action != '加密' && !d.constraintValue) { | ||
| 498 | proxy.$ElMessage.error('约束值必填,请填写完整'); | ||
| 499 | return false; | ||
| 500 | } | ||
| 496 | } | 501 | } |
| 497 | } | 502 | } |
| 498 | return true; | 503 | return true; | ... | ... |
-
Please register or sign in to post a comment