437a08f6 by lihua

修改合约模板的检验

1 parent b759f79b
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
72 :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 72 :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport">
73 <template #header> 73 <template #header>
74 <span>约束值</span> 74 <span>约束值</span>
75 <span style="color:red;margin-left: 2px;">*</span> 75 <!-- <span style="color:red;margin-left: 2px;">*</span> -->
76 </template> 76 </template>
77 <template #default="scope"> 77 <template #default="scope">
78 <el-input 78 <el-input
...@@ -480,6 +480,9 @@ const validateValue = () => { ...@@ -480,6 +480,9 @@ const validateValue = () => {
480 proxy.$ElMessage.error('行为类型必填,请填写完整'); 480 proxy.$ElMessage.error('行为类型必填,请填写完整');
481 return false; 481 return false;
482 } 482 }
483 if (d.action == '删除' || d.action == '加密') { //删除不需要设置如下条件,先不做判断。
484 continue;
485 }
483 // 加密不需要填写约束条件和运算符 486 // 加密不需要填写约束条件和运算符
484 if (d.action != '加密' && !d.constraintName) { 487 if (d.action != '加密' && !d.constraintName) {
485 proxy.$ElMessage.error('约束条件必填,请填写完整'); 488 proxy.$ElMessage.error('约束条件必填,请填写完整');
...@@ -490,14 +493,19 @@ const validateValue = () => { ...@@ -490,14 +493,19 @@ const validateValue = () => {
490 return false; 493 return false;
491 } 494 }
492 if (d.constraintEnName == 'dataField') { 495 if (d.constraintEnName == 'dataField') {
493 if (!d.constraintFieldValue?.length) { 496 // 如果是模板不需要必填。只有
494 proxy.$ElMessage.error('字段的约束值必填,请填写完整'); 497 if (props.productFieldList !== null) {
495 return false; 498 if (!d.constraintFieldValue?.length) {
499 proxy.$ElMessage.error('字段的约束值必填,请填写完整');
500 return false;
501 }
496 } 502 }
497 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) { 503 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) {
498 if (!d.constraintConnectorValue?.length) { 504 if (props.productFieldList !== null) {
499 proxy.$ElMessage.error('约束值必填,请填写完整'); 505 if (!d.constraintConnectorValue?.length) {
500 return false; 506 proxy.$ElMessage.error('约束值必填,请填写完整');
507 return false;
508 }
501 } 509 }
502 } else { 510 } else {
503 if (d.action != '加密' && !d.constraintValue) { 511 if (d.action != '加密' && !d.constraintValue) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!