Browse Source

Merge branch 'dev-policy0718' into dev

V1.0
jiangyy 4 years ago
parent
commit
bfdc28cf22
  1. 33
      src/views/modules/communityService/policy/addPolicy.vue
  2. 3
      src/views/modules/communityService/policy/personListItem.vue
  3. 2
      src/views/modules/communityService/policy/policyList.vue
  4. 33
      src/views/modules/communityService/policy/rule.vue

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

@ -95,7 +95,8 @@
label-width="150px"
style="display: block">
<rule :ref="'ref_rule'+index"
:formType="formType"></rule>
:formType="formType"
:index="index"></rule>
</el-form-item>
<div v-if="index===(ruleList.length-1)"
class="btn-add-rule">
@ -126,6 +127,7 @@
accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3"
:on-success="handleFileSuccess"
:on-remove="handleFileRemove"
:on-preview="handleFileDownload"
:limit="3"
:before-upload="beforeUpload"
:file-list="fileList">
@ -372,14 +374,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 +436,11 @@ export default {
} else {
isOk = false
}
});
break
}
}
if (!isOk) {
return false
@ -487,7 +489,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 {
@ -593,7 +595,18 @@ export default {
this.$emit('handleClose')
},
//
handleFileDownload (file) {
var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.name;
console.log(a)
a.href = file.url;
a.dispatchEvent(event);
},
resetData () {
this.ruleList = []

3
src/views/modules/communityService/policy/personListItem.vue

@ -11,6 +11,7 @@
prop="orgId">
<el-cascader class="customer_cascader"
ref="myCascader"
size="small"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
@ -454,7 +455,7 @@ export default {
}
this.pageNo = 1
// this.loadTable()
this.loadTable()
},

2
src/views/modules/communityService/policy/policyList.vue

@ -126,7 +126,7 @@
<el-table-column fixed="right"
label="操作"
align="center"
width="180">
width="200">
<template slot-scope="scope">
<el-button @click="handleDetail(scope.row)"
type="text"

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

@ -15,7 +15,6 @@
class="diy-button--search"
@click="handlePreview"
plain
:disabled="formType!=='detail' "
size="mini">预览</el-button>
<el-button v-if="formType!=='detail'"
@ -85,7 +84,7 @@
<el-date-picker v-else-if="personItem.colType==='datepicker'||personItem.colType==='date'"
v-model="personItem.colVal"
class="item_width_1"
class="item_width_2"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd HH:mm:ss"
@ -175,7 +174,7 @@
label="请输入"></el-input-number>
<el-date-picker v-else-if="houseItem.colType==='datepicker'||houseItem.colType==='date'"
v-model="houseItem.colVal"
class="item_width_1"
class="item_width_2"
type="datetime"
size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
@ -270,7 +269,7 @@
label="请输入"></el-input-number>
<el-date-picker v-else-if="staticItem.colType==='datepicker'||staticItem.colType==='date'"
v-model="staticItem.colVal"
class="item_width_1"
class="item_width_2"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd HH:mm:ss"
@ -557,7 +556,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '人员信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '人员信息不完整,请填写完整!'
return message
}
} else {
@ -568,7 +567,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '人员信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '人员信息不完整,请填写完整!'
return message
}
}
@ -587,7 +586,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '房屋信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '房屋信息不完整,请填写完整!'
return message
}
} else {
@ -596,7 +595,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '房屋信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '房屋信息不完整,请填写完整!'
return message
}
}
@ -610,7 +609,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '统计信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '统计信息不完整,请填写完整!'
return message
}
} else {
@ -619,7 +618,7 @@ export default {
item.colKey === '' ||
item.colVal === '') {
message = '统计信息不完整,请填写完整!'
message = '匹配规则' + (this.index + 1) + '统计信息不完整,请填写完整!'
return message
}
}
@ -932,7 +931,7 @@ export default {
addPerson () {
let obj = {
ruleDesc: '',//
nextLogicalRel: 'and',//andor
nextLogicalRel: '',//andor
itemGroupId: '',
itemId: '',
queryType: '',
@ -960,7 +959,7 @@ export default {
addHouse () {
let obj = {
ruleDesc: '',
nextLogicalRel: 'and',//andor
nextLogicalRel: '',//andor
queryType: '',
colTable: '',
colKey: '',
@ -986,7 +985,7 @@ export default {
addStatic () {
let obj = {
ruleDesc: '',
nextLogicalRel: 'and',//andor
nextLogicalRel: '',//andor
queryType: '',
colTable: '',
colKey: '',
@ -1141,6 +1140,10 @@ export default {
type: String,
required: 'true'
},
index: {
type: Number,
required: 'true'
},
}
}
@ -1168,6 +1171,10 @@ export default {
width: 120px;
margin-right: 10px;
}
.item_width_2 {
width: 200px;
margin-right: 10px;
}
/deep/ .el-checkbox {
margin-right: 10px;

Loading…
Cancel
Save