Commit 66a3ac3e authored by 胥静's avatar 胥静

Merge branch 'master_dev'

parents 2c6371a9 8354aff6
...@@ -116,10 +116,12 @@ export class TopicModuleDetailComponent implements OnInit { ...@@ -116,10 +116,12 @@ export class TopicModuleDetailComponent implements OnInit {
this.req.frequency = 0; this.req.frequency = 0;
this.isUpdate = false; this.isUpdate = false;
this.try = { this.try = {
trans: {topicName: 'topicName', topicType: 'topicType', trans: {topicName: 'topicName', topicType: 'topicType', retentionPolicyNo: 'retentionPolicyNo',
dataType: 'dataType', interval: 'inTime', dataInterval: 'dataInterval'}, dataType: 'dataType', interval: 'inTime', dataInterval: 'dataInterval'},
field: ['topicName', 'topicType', 'dataType', 'interval'], field: ['topicName', 'topicType', 'dataType', 'interval', 'retentionPolicyNo'],
num: ['dataType', 'interval', 'dataInterval']}; num: ['dataType', 'interval', 'dataInterval'],
retentionPolicyNo: ['retentionPolicyNo']
};
this.isV = true; this.isV = true;
} }
...@@ -137,10 +139,12 @@ export class TopicModuleDetailComponent implements OnInit { ...@@ -137,10 +139,12 @@ export class TopicModuleDetailComponent implements OnInit {
} }
this.try = { this.try = {
trans: {topicName: 'topicName', topicType: 'topicType', trans: {topicName: 'topicName', topicType: 'topicType', retentionPolicyNo: 'retentionPolicyNo',
dataType: 'dataType', interval: 'inTime', dataInterval: 'dataInterval'}, dataType: 'dataType', interval: 'inTime', dataInterval: 'dataInterval'},
field: ['topicModelNo', 'topicName', 'topicType', 'dataType', 'interval'], field: ['topicModelNo', 'topicName', 'topicType', 'dataType', 'interval','retentionPolicyNo'],
num: ['dataType', 'interval', 'dataInterval']}; num: ['dataType', 'interval', 'dataInterval'],
retentionPolicyNo: ['retentionPolicyNo']
};
this.isV = true; this.isV = true;
} }
......
...@@ -71,6 +71,14 @@ export class CheckService { ...@@ -71,6 +71,14 @@ export class CheckService {
} }
} }
if (req.retentionPolicyNo) {
console.log(req, req.retentionPolicyNo)
req.retentionPolicyNo.filter((item) => this.checkRetentionPolicyNo(fieldStr, data, item));
if (this.flag) {
return false;
}
}
return true; return true;
} }
...@@ -93,6 +101,19 @@ export class CheckService { ...@@ -93,6 +101,19 @@ export class CheckService {
} }
} }
private checkRetentionPolicyNo(fieldStr, data, field) {
if (this.flag === 1) {
return false;
}
if ((data[field] === '' || isUndefined(data[field]) || data[field] === null) && fieldStr.indexOf('-' + field + '-') >= -1) {
this.message.warning(this.translate.instant(this.trans[field]) + '为必填字段, 请检查');
this.flag = 1;
return false;
} else {
return true
}
}
private checkTime(fieldStr, data, time) { private checkTime(fieldStr, data, time) {
if (this.flag === 1) { if (this.flag === 1) {
return false; return false;
......
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