b67416c0 by lihua

修改合约模板的检验

1 parent 71eba32e
......@@ -72,7 +72,7 @@
:min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport">
<template #header>
<span>约束值</span>
<span style="color:red;margin-left: 2px;">*</span>
<!-- <span style="color:red;margin-left: 2px;">*</span> -->
</template>
<template #default="scope">
<el-input
......@@ -480,6 +480,9 @@ const validateValue = () => {
proxy.$ElMessage.error('行为类型必填,请填写完整');
return false;
}
if (d.action == '删除' || d.action == '加密') { //删除不需要设置如下条件,先不做判断。
continue;
}
// 加密不需要填写约束条件和运算符
if (d.action != '加密' && !d.constraintName) {
proxy.$ElMessage.error('约束条件必填,请填写完整');
......@@ -490,15 +493,20 @@ const validateValue = () => {
return false;
}
if (d.constraintEnName == 'dataField') {
// 如果是模板不需要必填。只有
if (props.productFieldList !== null) {
if (!d.constraintFieldValue?.length) {
proxy.$ElMessage.error('字段的约束值必填,请填写完整');
return false;
}
}
} else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) {
if (props.productFieldList !== null) {
if (!d.constraintConnectorValue?.length) {
proxy.$ElMessage.error('约束值必填,请填写完整');
return false;
}
}
} else {
if (d.action != '加密' && !d.constraintValue) {
proxy.$ElMessage.error('约束值必填,请填写完整');
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!