From f0323d051ff9bb2eb4221da769448d1cabbcf82f Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 27 Jul 2022 17:42:33 +0800 Subject: [PATCH] 111 --- src/assets/img/icon-add.png | Bin 0 -> 751 bytes .../communityService/fuwujilu/addForm.vue | 74 +++++++++++- .../communityService/fuwujilu/detailForm.vue | 90 +++++++++++++-- .../communityService/fuwujilu/fuwuList.vue | 4 + .../communityService/policy/addPolicy.vue | 105 ++++++++++-------- .../modules/communityService/policy/rule.vue | 89 +++++++++++---- 6 files changed, 284 insertions(+), 78 deletions(-) create mode 100644 src/assets/img/icon-add.png diff --git a/src/assets/img/icon-add.png b/src/assets/img/icon-add.png new file mode 100644 index 0000000000000000000000000000000000000000..07d1bb4dd4e96cc4b9389438b541f168c105a41b GIT binary patch literal 751 zcmVHV%7{;GB9|#8i09s%m7a>}NKr{%jGqAu03=}6SI}%-5C=*B&38ogxQY3b&*pva- z+JzwwAX)@MvGuR}yo~*yETot*utK!BYBQocS$4 zleSq_=?T0#5^&QK0FTv)4$T_ncUr*PTqe#tM#b(%z$&G3#8hC0-fS(9bHyltyV%0J z?IV@1IvK8b#=!PYQbfRyf+xNMtps$Br_UfcY%+I*{NBJ_14z>H-t zSvhxa4^Ure6IindXB|U6?am@`h8R!UEK)G5*RVuPw+q?w^=<_6#q=#Ez7|iQU%_zg zJ8;DZ04uiHWlUW$2cXwB<^EPo_2x7g#Eek>M8&klB_ERlQ4z)=l`ORwFEM^AeLM + + 预览 确 定 + + + + + @@ -290,7 +313,7 @@ import { mapGetters } from 'vuex' import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' - +import personList from "../policy/personList"; var map @@ -374,6 +397,10 @@ export default { fileList: [], uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', + policyId: '', + showPersonList: false, + ruleList: [] + } }, @@ -386,7 +413,7 @@ export default { }, }, - components: {}, + components: { personList }, async mounted () { this.startLoading() this.initMap() @@ -407,6 +434,49 @@ export default { methods: { + + //加载组织数据 + async handlePersonList () { + if (!this.formData.policyId) { + this.$message.info('请先选择政策') + return false + } + + this.policyId = this.formData.policyId + await this.loadRuleList() + + this.showPersonList = true; + }, + + async loadRuleList () { + + const url = "/heart/policy/rulelist/" + this.policyId + + let params = {} + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.ruleList = data + + } else { + this.$message.error(msg) + } + + }, + + handleClose () { + this.showPersonList = false + + + }, + handleOk () { + this.showPersonList = false + + + }, + + async getPolicyList () { const url = '/heart/policy/policyListSelect' diff --git a/src/views/modules/communityService/fuwujilu/detailForm.vue b/src/views/modules/communityService/fuwujilu/detailForm.vue index 9c3e6d98..970e9984 100644 --- a/src/views/modules/communityService/fuwujilu/detailForm.vue +++ b/src/views/modules/communityService/fuwujilu/detailForm.vue @@ -5,7 +5,6 @@ @@ -69,7 +68,8 @@ prop="policyId" label-width="150px" style="display: block"> - @@ -79,13 +79,19 @@ :value="item.policyId"> + + 预览 - @@ -94,7 +100,8 @@ prop="principalContact" label-width="150px" style="display: block"> - @@ -103,7 +110,8 @@ - - - 确 定 + + + + + @@ -293,7 +321,7 @@ import { mapGetters } from 'vuex' import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' - +import personList from "../policy/personList"; var map @@ -353,9 +381,13 @@ export default { projectList: [], fileList: [], uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', + + policyId: '', + showPersonList: false, + ruleList: [] } }, - components: {}, + components: { personList }, mounted () { this.getPolicyList() if (this.serviceRecordId) {//详情 @@ -368,6 +400,46 @@ export default { methods: { + //加载组织数据 + async handlePersonList () { + if (!this.formData.policyId) { + this.$message.info('请先选择政策') + return false + } + + this.policyId = this.formData.policyId + await this.loadRuleList() + + this.showPersonList = true; + }, + + async loadRuleList () { + + const url = "/heart/policy/rulelist/" + this.policyId + + let params = {} + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.ruleList = data + + } else { + this.$message.error(msg) + } + + }, + + handleClose () { + this.showPersonList = false + + + }, + handleOk () { + this.showPersonList = false + + + }, async getPolicyList () { const url = '/heart/policy/policyListSelect' diff --git a/src/views/modules/communityService/fuwujilu/fuwuList.vue b/src/views/modules/communityService/fuwujilu/fuwuList.vue index 09fedaa3..aacc936b 100644 --- a/src/views/modules/communityService/fuwujilu/fuwuList.vue +++ b/src/views/modules/communityService/fuwujilu/fuwuList.vue @@ -229,6 +229,7 @@ :close-on-click-modal="false" :close-on-press-escape="false" :title="addDiaTitle" + :modal-append-to-body="false" width="850px" top="5vh" class="dialog-h" @@ -248,6 +249,7 @@ :close-on-click-modal="false" :close-on-press-escape="false" :title="detailDiaTitle" + :modal-append-to-body="false" width="850px" top="5vh" class="dialog-h" @@ -501,6 +503,7 @@ export default { }, async handleDetail (row) { + this.detailDiaTitle = "服务详情" this.serviceRecordId = row.serviceRecordId this.serviceOrgName = row.serviceOrgName @@ -509,6 +512,7 @@ export default { }, async handleEdit (row) { + this.detailDiaTitle = "编辑服务" this.serviceRecordId = row.serviceRecordId this.serviceOrgName = row.serviceOrgName this.formType = 'edit' diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index 7eb3ba4e..4f2b7c3d 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -71,7 +71,8 @@
+ :key="index" + style="margin-bottom:15px">
-
- 增加细则 -
+ + + +
+ 增加细则
{ - element.itemList = [] - element.colOption = [] + 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 + + }); + } else { + oneRule.resiRuleList = [] + } - if (!element.colValLabel) { - element.colValLabel = element.colVal - } - if (!element.nextLogicalRelName) { - element.nextLogicalRelName = '' - } + if (refObj.houseChecked) { - element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName + oneRule.houseRuleList = refObj.houseRuleList + oneRule.houseRuleList.forEach(element => { + element.itemList = [] + element.colOption = [] - }); + if (!element.colValLabel) { + element.colValLabel = element.colVal + } + if (!element.nextLogicalRelName) { + element.nextLogicalRelName = '' + } - oneRule.houseRuleList = refObj.houseRuleList - oneRule.houseRuleList.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 - oneRule.statRuleList = refObj.statRuleList + oneRule.statRuleList.forEach(element => { + element.itemList = [] + element.colOption = [] - oneRule.statRuleList.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.statRuleList = [] + } isOk = true @@ -465,7 +482,7 @@ export default { // this.formData.ruleList = this.ruleList console.log(this.formData.ruleList) - + // return false this.btnDisable = true diff --git a/src/views/modules/communityService/policy/rule.vue b/src/views/modules/communityService/policy/rule.vue index ef99bb56..14129347 100644 --- a/src/views/modules/communityService/policy/rule.vue +++ b/src/views/modules/communityService/policy/rule.vue @@ -17,11 +17,11 @@ plain size="mini">预览 - 增加 + size="mini">增加 -->
- +
-
+
@@ -203,20 +208,21 @@ - - +
-
+
@@ -297,10 +303,14 @@ - +
@@ -358,8 +368,7 @@ export default { ], houseItemList: [],//房屋信息第二列 staticItemList: [],//统计信息第二列 - resiRuleList: [], - resiRuleList1: [ + resiRuleList: [ { ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 nextLogicalRel: '',//与上一条的关系;and、or @@ -378,12 +387,10 @@ export default { queryTypeName: '', colValLabel: '', nextLogicalRelName: '', - } ], - houseRuleList: [], - houseTitleName: '房屋信息', - houseRuleList1: [ + + houseRuleList: [ { ruleDesc: '', nextLogicalRel: '',//与上一条的关系;and、or @@ -402,9 +409,10 @@ export default { nextLogicalRelName: '', } ], + houseTitleName: '房屋信息', + statTitleName: '统计信息', - statRuleList: [], - statRuleList1: [ + statRuleList: [ { ruleDesc: '', nextLogicalRel: '',//与上一条的关系;and、or @@ -421,9 +429,9 @@ export default { queryTypeName: '', colValLabel: '', nextLogicalRelName: '', - } ], + okflag: false, showPersonList: false, @@ -513,10 +521,10 @@ export default { }, - getRule (valPerson, valHouse, valStatic) { + getRule () { this.okflag = false - let messageObj = this.validateRule(valPerson, valHouse, valStatic) + let messageObj = this.validateRule(this.personChecked, this.houseChecked, this.staticChecked) // console.log('resiRuleList', this.resiRuleList) // console.log('houseRuleList', this.houseRuleList) @@ -548,6 +556,7 @@ export default { let message = '' if (valPerson) { + this.resiRuleList.forEach((item, index) => { if (index === this.resiRuleList.length - 1) { @@ -574,6 +583,8 @@ export default { } }); + + } if (valHouse) { @@ -636,7 +647,7 @@ export default { return false } - this.getRule(this.personChecked, this.houseChecked, this.staticChecked) + this.getRule() if (!this.okflag) { return false } @@ -930,6 +941,18 @@ export default { }, addPerson () { + + // let array = this.resiRuleList[this.resiRuleList.length - 1] + + // if (array.itemGroupId === '' || + // array.itemId === '' || + // array.queryType === '' || + // array.colKey === '' || + // array.colVal === '') { + // this.$message.info('请将上一条填写完整') + // return false + // } + let obj = { ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 nextLogicalRel: '',//与上一条的关系;and、or @@ -958,6 +981,16 @@ export default { }, addHouse () { + // let array = this.houseRuleList[this.houseRuleList.length - 1] + + // if (array.itemGroupId === '' || + // array.itemId === '' || + // array.queryType === '' || + // array.colKey === '' || + // array.colVal === '') { + // this.$message.info('请将上一条填写完整') + // return false + // } let obj = { ruleDesc: '', nextLogicalRel: '',//与上一条的关系;and、or @@ -984,6 +1017,16 @@ export default { }, addStatic () { + // let array = this.statRuleList[this.statRuleList.length - 1] + + // if (array.itemGroupId === '' || + // array.itemId === '' || + // array.queryType === '' || + // array.colKey === '' || + // array.colVal === '') { + // this.$message.info('请将上一条填写完整') + // return false + // } let obj = { ruleDesc: '', nextLogicalRel: '',//与上一条的关系;and、or