|
|
@ -3,13 +3,13 @@ |
|
|
|
|
|
|
|
<div class="m-main"> |
|
|
|
<div v-for="(ruleItem,ruleIndex) in smartRuleList" |
|
|
|
:key="ruleIndex" |
|
|
|
class="row-item"> |
|
|
|
:key="ruleIndex"> |
|
|
|
<div class="row-item"> |
|
|
|
<el-select class="item_width_1" |
|
|
|
v-model="ruleItem.selSmartType" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in smartList1" |
|
|
|
<el-option v-for="item in smartList" |
|
|
|
@click.native="handleSelSmartType(ruleIndex,item)" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
@ -81,67 +81,65 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="ruleItem.selSmartType==='person'"> |
|
|
|
<div v-for="(personItem,personIndex) in resiRuleList" |
|
|
|
:key="personIndex" |
|
|
|
<div v-if="ruleItem.selSmartType==='person'" |
|
|
|
class="row-item-one"> |
|
|
|
|
|
|
|
<el-select class="item_width_1" |
|
|
|
v-model="personItem.itemGroupId" |
|
|
|
v-model="ruleItem.personRule.itemGroupId" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in groupList" |
|
|
|
@click.native="handleSelGroup(personIndex,item)" |
|
|
|
@click.native="handleSelGroup(ruleIndex,item)" |
|
|
|
:key="item.id" |
|
|
|
:label="item.label" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select class="item_width_1" |
|
|
|
v-model="personItem.itemId" |
|
|
|
v-model="ruleItem.personRule.itemId" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in personItem.itemList" |
|
|
|
@click.native="handleSelGroupItem(personIndex,item)" |
|
|
|
<el-option v-for="item in ruleItem.personRule.itemList" |
|
|
|
@click.native="handleSelGroupItem(ruleIndex,item)" |
|
|
|
:key="item.itemId" |
|
|
|
:label="item.label" |
|
|
|
:value="item.itemId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select class="item_width_1" |
|
|
|
v-model="personItem.queryType" |
|
|
|
v-model="ruleItem.personRule.queryType" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in queryList" |
|
|
|
@click.native="handleSelPersonQuery(personIndex,item)" |
|
|
|
@click.native="handleSelPersonQuery(ruleIndex,item)" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<div v-if="personItem.queryType!=='is_null'&&personItem.queryType!=='is_not_null'"> |
|
|
|
<div v-if="ruleItem.personRule.queryType!=='is_null'&&ruleItem.personRule.queryType!=='is_not_null'"> |
|
|
|
|
|
|
|
<el-select v-if="personItem.colType==='select'||personItem.colType==='radio'||personItem.colType==='checkbox'" |
|
|
|
<el-select v-if="ruleItem.personRule.colType==='select'||ruleItem.personRule.colType==='radio'||ruleItem.personRule.colType==='checkbox'" |
|
|
|
class="item_width_2" |
|
|
|
v-model="personItem.colVal" |
|
|
|
v-model="ruleItem.personRule.colVal" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in personItem.colOption" |
|
|
|
@click.native="handleSelPersonValue(personIndex,item)" |
|
|
|
<el-option v-for="item in ruleItem.personRule.colOption" |
|
|
|
@click.native="handleSelPersonValue(ruleIndex,item)" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-input-number v-else-if="personItem.colType==='inputNum'" |
|
|
|
<el-input-number v-else-if="ruleItem.personRule.colType==='inputNum'" |
|
|
|
class="item_width_2" |
|
|
|
v-model="personItem.colVal" |
|
|
|
v-model="ruleItem.personRule.colVal" |
|
|
|
:min="0" |
|
|
|
size="small" |
|
|
|
label="请输入"></el-input-number> |
|
|
|
|
|
|
|
<el-date-picker v-else-if="personItem.colType==='datepicker'||personItem.colType==='date'" |
|
|
|
v-model="personItem.colVal" |
|
|
|
<el-date-picker v-else-if="ruleItem.personRule.colType==='datepicker'||ruleItem.personRule.colType==='date'" |
|
|
|
v-model="ruleItem.personRule.colVal" |
|
|
|
class="item_width_2" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
@ -152,22 +150,20 @@ |
|
|
|
class="item_width_2" |
|
|
|
size="small" |
|
|
|
placeholder="请输入" |
|
|
|
v-model="personItem.colVal"> |
|
|
|
v-model="ruleItem.personRule.colVal"> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-select v-if="ruleIndex<(smartRuleList.length-1)" |
|
|
|
class="item_width_1" |
|
|
|
v-model="ruleItem.houseRule.nextLogicalRel" |
|
|
|
v-model="ruleItem.nextLogicalRel" |
|
|
|
size="small" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in logicalList" |
|
|
|
@click.native="handleSelPersonLogical(ruleIndex,item)" |
|
|
|
@click.native="handleSelLogical(ruleIndex,item)" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
@ -177,11 +173,17 @@ |
|
|
|
<img v-if=" ruleIndex<smartRuleList.length-1" |
|
|
|
class="img_del" |
|
|
|
src="@/assets/img/icon-del.png" |
|
|
|
@click="delHouse(ruleIndex)"> |
|
|
|
<img v-if=" ruleIndex==smartRuleList.length-1" |
|
|
|
class="img_del" |
|
|
|
@click="delRule(ruleIndex)"> |
|
|
|
|
|
|
|
<div v-if=" ruleIndex==smartRuleList.length-1" |
|
|
|
class="d-icon"> |
|
|
|
<img class="img_del" |
|
|
|
src="@/assets/img/icon-add.png" |
|
|
|
@click="addHouse(ruleIndex)"> |
|
|
|
@click="addRule(ruleIndex)"> |
|
|
|
<div class="d-save">保存为常用查询条件</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
@ -204,11 +206,7 @@ export default { |
|
|
|
personChecked: false, |
|
|
|
houseChecked: false, |
|
|
|
|
|
|
|
houseSel: true, |
|
|
|
personSel: false, |
|
|
|
|
|
|
|
|
|
|
|
smartList1: [ |
|
|
|
smartList: [ |
|
|
|
{ |
|
|
|
value: 'house', |
|
|
|
label: '房屋信息' |
|
|
@ -232,32 +230,18 @@ export default { |
|
|
|
], |
|
|
|
houseItemList: [],//房屋信息第二列 |
|
|
|
|
|
|
|
resiRuleList: [ |
|
|
|
{ |
|
|
|
ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
itemGroupId: '', |
|
|
|
itemId: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
okflag: false, |
|
|
|
|
|
|
|
itemList: [], |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
nextLogicalRelName: '', |
|
|
|
} |
|
|
|
], |
|
|
|
showPersonList: false, |
|
|
|
ruleList: {}, |
|
|
|
|
|
|
|
houseRuleList: [ |
|
|
|
smartRuleList: [ |
|
|
|
{ |
|
|
|
ruleDesc: '', |
|
|
|
selSmartType: 'house', |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
nextLogicalRelName: '', |
|
|
|
houseRule: { |
|
|
|
ruleDesc: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
@ -270,38 +254,28 @@ export default { |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
nextLogicalRelName: '', |
|
|
|
} |
|
|
|
], |
|
|
|
|
|
|
|
okflag: false, |
|
|
|
|
|
|
|
showPersonList: false, |
|
|
|
ruleList: {}, |
|
|
|
|
|
|
|
smartRuleList: [ |
|
|
|
{ |
|
|
|
selSmartType: 'house', |
|
|
|
houseRule: { |
|
|
|
ruleDesc: '', |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
}, |
|
|
|
personRule: { |
|
|
|
ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 |
|
|
|
itemGroupId: '', |
|
|
|
itemId: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
|
|
|
|
titleName: '房屋信息', |
|
|
|
itemList: [], |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '房屋信息', |
|
|
|
itemGroupName: '', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
nextLogicalRelName: '', |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
} |
|
|
@ -326,10 +300,9 @@ export default { |
|
|
|
handleSelSmartType (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
|
|
|
|
if (item.value === 'house') { |
|
|
|
// if (item.value === 'house') { |
|
|
|
oneData.houseRule = { |
|
|
|
ruleDesc: '', |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
@ -342,13 +315,10 @@ export default { |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
nextLogicalRelName: '', |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} |
|
|
|
oneData.personRule = { |
|
|
|
ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
itemGroupId: '', |
|
|
|
itemId: '', |
|
|
|
queryType: '', |
|
|
@ -363,191 +333,195 @@ export default { |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
nextLogicalRelName: '', |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
console.log(this.smartRuleList) |
|
|
|
}, |
|
|
|
async setRule (resiRuleList, houseRuleList) { |
|
|
|
// this.startLoading() |
|
|
|
if (this.groupList.length == 0 || this.houseItemList.length === 0) { |
|
|
|
setTimeout(() => { |
|
|
|
this.setRule(resiRuleList, houseRuleList); |
|
|
|
}, 500); |
|
|
|
return false |
|
|
|
} |
|
|
|
// async setRule (smartRuleList, smartRuleList) { |
|
|
|
// // this.startLoading() |
|
|
|
// if (this.groupList.length == 0 || this.houseItemList.length === 0) { |
|
|
|
// setTimeout(() => { |
|
|
|
// this.setRule(smartRuleList, smartRuleList); |
|
|
|
// }, 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] |
|
|
|
// this.smartRuleList = smartRuleList |
|
|
|
// if (this.smartRuleList && this.smartRuleList.length > 0) { |
|
|
|
// this.personChecked = true |
|
|
|
// for (let i = 0; i < this.smartRuleList.length; i++) { |
|
|
|
// let element = this.smartRuleList[i] |
|
|
|
|
|
|
|
let selGroup = this.groupList.filter((item) => |
|
|
|
element.itemGroupId === item.id |
|
|
|
); |
|
|
|
console.log(selGroup) |
|
|
|
// let selGroup = this.groupList.filter((item) => |
|
|
|
// element.itemGroupId === item.id |
|
|
|
// ); |
|
|
|
// console.log(selGroup) |
|
|
|
|
|
|
|
if (selGroup.length > 0) { |
|
|
|
await this.handleSelGroup(i, selGroup[0], true) |
|
|
|
// if (selGroup.length > 0) { |
|
|
|
// await this.handleSelGroup(i, selGroup[0], true) |
|
|
|
|
|
|
|
|
|
|
|
let selItem = element.itemList.filter((item) => |
|
|
|
element.itemId === item.itemId); |
|
|
|
if (selItem.length > 0) { |
|
|
|
await this.handleSelGroupItem(i, selItem[0], true) |
|
|
|
} |
|
|
|
// let selItem = element.itemList.filter((item) => |
|
|
|
// element.itemId === item.itemId); |
|
|
|
// if (selItem.length > 0) { |
|
|
|
// await this.handleSelGroupItem(i, selItem[0], true) |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
this.houseRuleList = houseRuleList |
|
|
|
if (this.houseRuleList && this.houseRuleList.length > 0) { |
|
|
|
this.houseChecked = true |
|
|
|
this.houseRuleList.forEach((element, index) => { |
|
|
|
// this.smartRuleList = smartRuleList |
|
|
|
// if (this.smartRuleList && this.smartRuleList.length > 0) { |
|
|
|
// this.houseChecked = true |
|
|
|
// this.smartRuleList.forEach((element, index) => { |
|
|
|
|
|
|
|
let selHouseItem = this.houseItemList.filter((item) => |
|
|
|
element.colKey === item.colKey |
|
|
|
); |
|
|
|
// let selHouseItem = this.houseItemList.filter((item) => |
|
|
|
// element.colKey === item.colKey |
|
|
|
// ); |
|
|
|
|
|
|
|
if (selHouseItem.length > 0) { |
|
|
|
this.handleSelHouseItem(index, selHouseItem[0], true) |
|
|
|
} |
|
|
|
// if (selHouseItem.length > 0) { |
|
|
|
// this.handleSelHouseItem(index, selHouseItem[0], true) |
|
|
|
// } |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
// }); |
|
|
|
// } |
|
|
|
|
|
|
|
}, |
|
|
|
// }, |
|
|
|
|
|
|
|
getRule () { |
|
|
|
this.okflag = false |
|
|
|
|
|
|
|
let messageObj = this.validateRule(this.personChecked, this.houseChecked) |
|
|
|
|
|
|
|
// console.log('resiRuleList', this.resiRuleList) |
|
|
|
// console.log('houseRuleList', this.houseRuleList) |
|
|
|
let messageObj = this.validateRule() |
|
|
|
|
|
|
|
if (messageObj) { |
|
|
|
this.$message.error(messageObj) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.resiRuleList.length > 0) { |
|
|
|
this.resiRuleList[this.resiRuleList.length - 1].nextLogicalRel = '' |
|
|
|
if (this.smartRuleList.length > 0) { |
|
|
|
this.smartRuleList[this.smartRuleList.length - 1].nextLogicalRel = '' |
|
|
|
} |
|
|
|
|
|
|
|
if (this.houseRuleList.length > 0) { |
|
|
|
this.houseRuleList[this.houseRuleList.length - 1].nextLogicalRel = '' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log('smartRuleList', this.smartRuleList) |
|
|
|
|
|
|
|
this.okflag = true |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
validateRule (valPerson, valHouse) { |
|
|
|
validateRule () { |
|
|
|
|
|
|
|
let message = '' |
|
|
|
if (valPerson) { |
|
|
|
|
|
|
|
this.resiRuleList.forEach((item, index) => { |
|
|
|
this.smartRuleList.forEach((item, index) => { |
|
|
|
if (item.selSmartType === 'person') { |
|
|
|
|
|
|
|
if (item.itemGroupId === '' || |
|
|
|
item.itemId === '' || |
|
|
|
item.queryType === '' || |
|
|
|
item.colKey === '' |
|
|
|
if (item.personRule.itemGroupId === '' || |
|
|
|
item.personRule.itemId === '' || |
|
|
|
item.personRule.queryType === '' || |
|
|
|
item.personRule.colKey === '' |
|
|
|
) { |
|
|
|
message = '匹配规则' + (this.index + 1) + '人员信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
if ((index != this.resiRuleList.length - 1) && item.nextLogicalRel === '') { |
|
|
|
message = '匹配规则' + (this.index + 1) + '人员信息不完整,请填写完整!' |
|
|
|
message = '第' + (index + 1) + '行人员信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
|
|
|
|
if ((item.queryType !== 'is_null' && item.queryType !== 'is_not_null') && item.colVal === '') { |
|
|
|
message = '匹配规则' + (this.index + 1) + '人员信息不完整,请填写完整!' |
|
|
|
if ((item.personRule.queryType !== 'is_null' && item.personRule.queryType !== 'is_not_null') && item.personRule.colVal === '') { |
|
|
|
message = '第' + (index + 1) + '行人员信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (valHouse) { |
|
|
|
if (item.selSmartType === 'house') { |
|
|
|
|
|
|
|
this.houseRuleList.forEach((item, index) => { |
|
|
|
|
|
|
|
if (item.itemGroupId === '' || |
|
|
|
item.itemId === '' || |
|
|
|
item.queryType === '' || |
|
|
|
item.colKey === '' |
|
|
|
if (item.houseRule.itemGroupId === '' || |
|
|
|
item.houseRule.itemId === '' || |
|
|
|
item.houseRule.queryType === '' || |
|
|
|
item.houseRule.colKey === '' |
|
|
|
) { |
|
|
|
message = '匹配规则' + (this.index + 1) + '房屋信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
if ((index != this.houseRuleList.length - 1) && item.nextLogicalRel === '') { |
|
|
|
message = '匹配规则' + (this.index + 1) + '房屋信息不完整,请填写完整!' |
|
|
|
message = '第' + (index + 1) + '行房屋信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
|
|
|
|
if ((item.queryType !== 'is_null' && item.queryType !== 'is_not_null') && item.colVal === '') { |
|
|
|
message = '匹配规则' + (this.index + 1) + '房屋信息不完整,请填写完整!' |
|
|
|
|
|
|
|
if ((item.houseRule.queryType !== 'is_null' && item.houseRule.queryType !== 'is_not_null') && item.houseRule.colVal === '') { |
|
|
|
message = '第' + (index + 1) + '行房屋信息不完整,请填写完整!' |
|
|
|
return message |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((index != this.smartRuleList.length - 1) && item.nextLogicalRel === '') { |
|
|
|
message = '第' + (index + 1) + '行逻辑选项不能为空!' |
|
|
|
return message |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return message |
|
|
|
}, |
|
|
|
|
|
|
|
handlePreview () { |
|
|
|
if (!this.personChecked && !this.houseChecked) { |
|
|
|
this.$message.info('请勾选要预览的规则') |
|
|
|
return false |
|
|
|
} |
|
|
|
handleClose () { |
|
|
|
this.showPersonList = false |
|
|
|
}, |
|
|
|
|
|
|
|
this.getRule() |
|
|
|
if (!this.okflag) { |
|
|
|
return false |
|
|
|
} |
|
|
|
this.ruleList = {} |
|
|
|
this.ruleList = { |
|
|
|
resiRuleList: [], |
|
|
|
houseRuleList: [], |
|
|
|
addRule () { |
|
|
|
|
|
|
|
} |
|
|
|
let obj = { |
|
|
|
selSmartType: 'house', |
|
|
|
nextLogicalRel: '',//与上一条的关系;and、or |
|
|
|
nextLogicalRelName: '', |
|
|
|
houseRule: { |
|
|
|
ruleDesc: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
|
|
|
|
titleName: '房屋信息', |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '房屋信息', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
|
|
|
|
}, |
|
|
|
personRule: { |
|
|
|
ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 |
|
|
|
itemGroupId: '', |
|
|
|
itemId: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
|
|
|
|
if (this.personChecked) { |
|
|
|
this.ruleList.resiRuleList = this.resiRuleList |
|
|
|
itemList: [], |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
} |
|
|
|
if (this.houseChecked) { |
|
|
|
this.ruleList.houseRuleList = this.houseRuleList |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.showPersonList = true |
|
|
|
this.smartRuleList.push(obj) |
|
|
|
}, |
|
|
|
|
|
|
|
handleClose () { |
|
|
|
this.showPersonList = false |
|
|
|
|
|
|
|
delRule (index) { |
|
|
|
this.smartRuleList.splice(index, 1); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//选择人员信息第一列下拉框 |
|
|
|
async handleSelGroup (personIndex, item, isSet) { |
|
|
|
async handleSelGroup (ruleIndex, item, isSet) { |
|
|
|
const url = '/oper/customize/icformitem/getItemListV2' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree' |
|
|
|
let params = { |
|
|
@ -560,20 +534,20 @@ export default { |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
|
|
let oneData = this.resiRuleList[personIndex] |
|
|
|
oneData.itemGroupName = item.label |
|
|
|
oneData.itemList = data |
|
|
|
oneData.colTable = item.tableName |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
oneData.personRule.itemGroupName = item.label |
|
|
|
oneData.personRule.itemList = data |
|
|
|
oneData.personRule.colTable = item.tableName |
|
|
|
|
|
|
|
if (!isSet) {//如果是详情,赋值,不需要置空 |
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.itemId = '' |
|
|
|
oneData.queryType = '' |
|
|
|
oneData.colKey = '' |
|
|
|
oneData.colVal = '' |
|
|
|
|
|
|
|
oneData.personRule.itemId = '' |
|
|
|
oneData.personRule.queryType = '' |
|
|
|
oneData.personRule.colKey = '' |
|
|
|
oneData.personRule.colVal = '' |
|
|
|
} |
|
|
|
|
|
|
|
this.$set(this.resiRuleList, personIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -581,18 +555,18 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//选择人员信息第二列下拉框 |
|
|
|
async handleSelGroupItem (personIndex, item, isSet) { |
|
|
|
async handleSelGroupItem (ruleIndex, item, isSet) { |
|
|
|
|
|
|
|
let oneData = this.resiRuleList[personIndex] |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
|
|
|
|
oneData.colKey = item.columnName |
|
|
|
oneData.colType = item.itemType |
|
|
|
oneData.itemLabel = item.label |
|
|
|
oneData.personRule.colKey = item.columnName |
|
|
|
oneData.personRule.colType = item.itemType |
|
|
|
oneData.personRule.itemLabel = item.label |
|
|
|
|
|
|
|
if (!isSet) {//如果是详情,赋值,不需要置空 |
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.queryType = '' |
|
|
|
oneData.colVal = '' |
|
|
|
|
|
|
|
oneData.personRule.queryType = '' |
|
|
|
oneData.personRule.colVal = '' |
|
|
|
} |
|
|
|
|
|
|
|
if (item.optionSourceType === 'remote') { |
|
|
@ -603,61 +577,54 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
oneData.colOption = data |
|
|
|
oneData.personRule.colOption = data |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
} else { |
|
|
|
oneData.colOption = item.options |
|
|
|
oneData.personRule.colOption = item.options |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$set(this.resiRuleList, personIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择人员信息第三列 |
|
|
|
handleSelPersonQuery (personIndex, item) { |
|
|
|
let oneData = this.resiRuleList[personIndex] |
|
|
|
oneData.queryTypeName = item.label |
|
|
|
handleSelPersonQuery (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
oneData.personRule.queryTypeName = item.label |
|
|
|
|
|
|
|
|
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.colVal = '' |
|
|
|
oneData.colValLabel = '' |
|
|
|
oneData.personRule.colVal = '' |
|
|
|
oneData.personRule.colValLabel = '' |
|
|
|
|
|
|
|
this.$set(this.resiRuleList, personIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
}, |
|
|
|
//选择人员信息第四列 |
|
|
|
handleSelPersonValue (personIndex, item) { |
|
|
|
let oneData = this.resiRuleList[personIndex] |
|
|
|
handleSelPersonValue (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
|
|
|
|
oneData.colValLabel = item.label |
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.personRule.colValLabel = item.label |
|
|
|
|
|
|
|
this.$set(this.resiRuleList, personIndex, oneData) |
|
|
|
}, |
|
|
|
//选择人员信息第五列 |
|
|
|
handleSelPersonLogical (personIndex, item) { |
|
|
|
let oneData = this.resiRuleList[personIndex] |
|
|
|
|
|
|
|
oneData.nextLogicalRelName = item.label |
|
|
|
|
|
|
|
this.$set(this.resiRuleList, personIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选择房屋信息第二列下拉框 |
|
|
|
async handleSelHouseItem (houseIndex, item, isSet) { |
|
|
|
async handleSelHouseItem (ruleIndex, item, isSet) { |
|
|
|
|
|
|
|
let oneData = this.houseRuleList[houseIndex] |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
|
|
|
|
oneData.colTable = item.tableName |
|
|
|
oneData.colType = item.itemType |
|
|
|
oneData.itemLabel = item.label |
|
|
|
oneData.houseRule.colTable = item.tableName |
|
|
|
oneData.houseRule.colType = item.itemType |
|
|
|
oneData.houseRule.itemLabel = item.label |
|
|
|
|
|
|
|
if (!isSet) {//如果是详情,赋值,不需要置空 |
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.queryType = '' |
|
|
|
oneData.colVal = '' |
|
|
|
|
|
|
|
oneData.houseRule.queryType = '' |
|
|
|
oneData.houseRule.colVal = '' |
|
|
|
} |
|
|
|
|
|
|
|
if (item.optionSourceType === 'remote') { |
|
|
@ -672,47 +639,47 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
oneData.colOption = data |
|
|
|
oneData.houseRule.colOption = data |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
} else { |
|
|
|
oneData.colOption = [] |
|
|
|
oneData.houseRule.colOption = [] |
|
|
|
} |
|
|
|
|
|
|
|
this.$set(this.houseRuleList, houseIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择房屋第三列 |
|
|
|
handleSelHouseQuery (houseIndex, item) { |
|
|
|
let oneData = this.houseRuleList[houseIndex] |
|
|
|
oneData.queryTypeName = item.label |
|
|
|
handleSelHouseQuery (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
oneData.houseRule.queryTypeName = item.label |
|
|
|
|
|
|
|
|
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
oneData.colVal = '' |
|
|
|
oneData.colValLabel = '' |
|
|
|
oneData.houseRule.colVal = '' |
|
|
|
oneData.houseRule.colValLabel = '' |
|
|
|
|
|
|
|
this.$set(this.houseRuleList, houseIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
}, |
|
|
|
//选择房屋第四列 |
|
|
|
handleSelHouseValue (houseIndex, item) { |
|
|
|
let oneData = this.houseRuleList[houseIndex] |
|
|
|
oneData.colValLabel = item.label |
|
|
|
oneData.nextLogicalRel = '' |
|
|
|
handleSelHouseValue (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
oneData.houseRule.colValLabel = item.label |
|
|
|
|
|
|
|
|
|
|
|
this.$set(this.houseRuleList, houseIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
}, |
|
|
|
//选择房屋第五列 |
|
|
|
handleSelHouseLogical (houseIndex, item) { |
|
|
|
let oneData = this.houseRuleList[houseIndex] |
|
|
|
|
|
|
|
//选择第五列:逻辑 |
|
|
|
handleSelLogical (ruleIndex, item) { |
|
|
|
let oneData = this.smartRuleList[ruleIndex] |
|
|
|
oneData.nextLogicalRelName = item.label |
|
|
|
|
|
|
|
this.$set(this.houseRuleList, houseIndex, oneData) |
|
|
|
this.$set(this.smartRuleList, ruleIndex, oneData) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取人员信息---第一列 |
|
|
|
async loadPersonGroup () { |
|
|
|
const url = '/oper/customize/icformitemgroup/list' |
|
|
@ -784,45 +751,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
dataRule () { |
|
|
|
return { |
|
|
|
|
|
|
|
|
|
|
|
serviceTimeStart: [ |
|
|
|
{ required: true, message: '服务时间不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
serviceScope: [ |
|
|
|
{ required: true, message: '服务范围不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
feedbackDataRule () { |
|
|
|
return { |
|
|
|
|
|
|
|
|
|
|
|
serviceGoal: [ |
|
|
|
{ required: true, message: '服务目标不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
|
|
|
|
serviceEffect: [ |
|
|
|
{ required: true, message: '服务效果不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
servicePeopleNumber: [ |
|
|
|
{ required: true, message: '服务人数不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
serviceStatus: [ |
|
|
|
{ required: true, message: '服务状态不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
satisfaction: [ |
|
|
|
{ required: true, message: '满意度不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
address: [ |
|
|
|
{ required: true, message: '地址不能为空', trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
props: { |
|
|
|
|
|
|
@ -830,10 +758,7 @@ export default { |
|
|
|
type: String, |
|
|
|
required: 'true' |
|
|
|
}, |
|
|
|
index: { |
|
|
|
type: Number, |
|
|
|
default: 1 |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -842,7 +767,7 @@ export default { |
|
|
|
|
|
|
|
<style lang="scss" scoped > |
|
|
|
.m-main { |
|
|
|
display: flex; |
|
|
|
// display: flex; |
|
|
|
margin-top: 15px; |
|
|
|
} |
|
|
|
|
|
|
@ -864,7 +789,7 @@ export default { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
.item_width_1 { |
|
|
|
width: 120px; |
|
|
|
width: 200px; |
|
|
|
margin-right: 10px; |
|
|
|
} |
|
|
|
.item_width_2 { |
|
|
@ -878,6 +803,9 @@ export default { |
|
|
|
/deep/.el-checkbox:last-of-type { |
|
|
|
margin-right: 10px; |
|
|
|
} |
|
|
|
.d-icon { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|
|
|
|
.img_del { |
|
|
|
width: 25px; |
|
|
@ -885,4 +813,30 @@ export default { |
|
|
|
margin-top: 3px; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
.d-save { |
|
|
|
position: relative; |
|
|
|
margin-top: 3px; |
|
|
|
margin-left: 10px; |
|
|
|
width: 138px; |
|
|
|
height: 25px; |
|
|
|
background: #dde8f3; |
|
|
|
text-align: center; |
|
|
|
border-radius: 3px; |
|
|
|
font-size: 12px; |
|
|
|
font-family: Source Han Serif CN; |
|
|
|
font-weight: 600; |
|
|
|
color: #0043c8; |
|
|
|
line-height: 26px; |
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
&::before { |
|
|
|
position: absolute; |
|
|
|
left: 0; |
|
|
|
top: 9px; |
|
|
|
width: 8px; |
|
|
|
height: 8px; |
|
|
|
background: #006ecd; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|