Browse Source

1111

master
jiangyy 3 years ago
parent
commit
6d44bcb02a
  1. 4
      src/assets/scss/modules/management/form-main.scss
  2. 15
      src/views/modules/communityService/policy/addPolicy.vue
  3. 5
      src/views/modules/communityService/policy/rule.vue

4
src/assets/scss/modules/management/form-main.scss

@ -15,6 +15,10 @@
width: 220px;
}
.item_width_3{
width: 780px;
}
.list_item_width_1 {
width: 165px;
}

15
src/views/modules/communityService/policy/addPolicy.vue

@ -61,11 +61,11 @@
prop="content"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
<el-input class="item_width_3"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
:rows="10"
placeholder="请输入政策内容"
v-model="formData.content"></el-input>
</el-form-item>
@ -399,9 +399,16 @@ export default {
let refObj = this.$refs['ref_rule' + index][0]
refObj.getRule(true, true, true)
refObj.getRule()
if (refObj.okflag) {
if (!refObj.personChecked && !refObj.houseChecked && !refObj.staticChecked) {
this.$message.error('请选择匹配规则' + (index + 1))
isOk = false
break
} else {
if (refObj.personChecked) {
oneRule.resiRuleList = refObj.resiRuleList
oneRule.resiRuleList.forEach(element => {
@ -467,6 +474,7 @@ export default {
}
isOk = true
}
} else {
isOk = false
@ -482,6 +490,7 @@ export default {
// this.formData.ruleList = this.ruleList
console.log(this.formData.ruleList)
// return false

5
src/views/modules/communityService/policy/rule.vue

@ -464,8 +464,11 @@ export default {
}, 500);
return false
}
this.resiRuleList = resiRuleList
if (this.resiRuleList && this.resiRuleList.length > 0) {
this.personChecked = true
for (let i = 0; i < this.resiRuleList.length; i++) {
let element = this.resiRuleList[i]
@ -490,6 +493,7 @@ export default {
this.houseRuleList = houseRuleList
if (this.houseRuleList && this.houseRuleList.length > 0) {
this.houseChecked = true
this.houseRuleList.forEach((element, index) => {
let selHouseItem = this.houseItemList.filter((item) =>
@ -504,6 +508,7 @@ export default {
}
this.statRuleList = statRuleList
if (this.statRuleList && this.statRuleList.length > 0) {
this.staticChecked = true
this.statRuleList.forEach((element, index) => {
let selStaticItem = this.staticItemList.filter((item) =>

Loading…
Cancel
Save