Commit 10cd4822 by caoyanzhi

对未选择标签或者添加了一个空标签组进行拦截

parent 9fcce8f4
......@@ -364,7 +364,7 @@ export default {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const flag = this.ruleForm.isActive === 0 && this.ruleForm.updateType !== 1 && this.ruleForm.updateDay === '';
const isEmpty = this.ruleForm.selectedTags.length === 0 || this.ruleForm.selectedTags.every(item => item.length === 0);
const isEmpty = this.ruleForm.selectedTags.length === 0 || this.ruleForm.selectedTags.some(item => item.length === 0);
if (flag) {
this.$message.error({ message: '请选择更新频率!' });
return false;
......
......@@ -316,6 +316,11 @@ export default {
effectiveDateTmp: `${this.tagConfig.date.split(' ')[0]} 23:59:59`
};
// 必填项目
const isEmpty = this.selectedTags.length === 0 || this.selectedTags.some(item => item.length === 0);
if (isEmpty) {
this.$message.warning({ message: '请至少保留一个标签!' })
return;
}
if (param.groupName == '') {
this.$message.warning({ message: '会员分组名称不能为空!' })
return;
......@@ -800,4 +805,4 @@ export default {
.margin-60 {
margin-left: 60px;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment