Browse Source

1111

master
jiangyy 3 years ago
parent
commit
6d44bcb02a
  1. 4
      src/assets/scss/modules/management/form-main.scss
  2. 117
      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;
}

117
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,74 +399,82 @@ export default {
let refObj = this.$refs['ref_rule' + index][0]
refObj.getRule(true, true, true)
refObj.getRule()
if (refObj.okflag) {
if (refObj.personChecked) {
oneRule.resiRuleList = refObj.resiRuleList
oneRule.resiRuleList.forEach(element => {
element.itemList = []
element.colOption = []
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
});
if (!refObj.personChecked && !refObj.houseChecked && !refObj.staticChecked) {
this.$message.error('请选择匹配规则' + (index + 1))
isOk = false
break
} else {
oneRule.resiRuleList = []
}
if (refObj.houseChecked) {
if (refObj.personChecked) {
oneRule.resiRuleList = refObj.resiRuleList
oneRule.resiRuleList.forEach(element => {
element.itemList = []
element.colOption = []
oneRule.houseRuleList = refObj.houseRuleList
oneRule.houseRuleList.forEach(element => {
element.itemList = []
element.colOption = []
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
});
} else {
oneRule.resiRuleList = []
}
});
} else {
oneRule.houseRuleList = []
}
if (refObj.houseChecked) {
if (refObj.staticChecked) {
oneRule.houseRuleList = refObj.houseRuleList
oneRule.houseRuleList.forEach(element => {
element.itemList = []
element.colOption = []
oneRule.statRuleList = refObj.statRuleList
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
oneRule.statRuleList.forEach(element => {
element.itemList = []
element.colOption = []
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
});
} else {
oneRule.houseRuleList = []
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (refObj.staticChecked) {
});
oneRule.statRuleList = refObj.statRuleList
} else {
oneRule.statRuleList = []
}
oneRule.statRuleList.forEach(element => {
element.itemList = []
element.colOption = []
isOk = true
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
});
} else {
oneRule.statRuleList = []
}
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