diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index d44de3c7..0e6e0f6c 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -95,7 +95,8 @@ label-width="150px" style="display: block"> + :formType="formType" + :index="index">
@@ -372,14 +373,14 @@ export default { async handleAdd () { let isOk = false - this.ruleList.forEach((oneRule, index) => { - // if (!oneRule.ruleName) { - // this.$message.error('政策细则不能为空') - // isOk = false - // } + + for (let index = 0; index < this.ruleList.length; index++) { + let oneRule = this.ruleList[index] + let refObj = this.$refs['ref_rule' + index][0] refObj.getRule(true, true, true) + if (refObj.okflag) { oneRule.resiRuleList = refObj.resiRuleList oneRule.resiRuleList.forEach(element => { @@ -434,11 +435,11 @@ export default { } else { isOk = false - - } - }); + break + } + } if (!isOk) { return false @@ -487,7 +488,7 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { - this.$message.success('新增成功') + this.$message.success('操作成功') this.resetData() this.$emit('handleOk') } else { diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue index 715957b0..86abe1f8 100644 --- a/src/views/modules/communityService/policy/policyList.vue +++ b/src/views/modules/communityService/policy/policyList.vue @@ -126,7 +126,7 @@ + width="200">