jiangyy 3 years ago
parent
commit
f0323d051f
  1. BIN
      src/assets/img/icon-add.png
  2. 74
      src/views/modules/communityService/fuwujilu/addForm.vue
  3. 90
      src/views/modules/communityService/fuwujilu/detailForm.vue
  4. 4
      src/views/modules/communityService/fuwujilu/fuwuList.vue
  5. 105
      src/views/modules/communityService/policy/addPolicy.vue
  6. 89
      src/views/modules/communityService/policy/rule.vue

BIN
src/assets/img/icon-add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

74
src/views/modules/communityService/fuwujilu/addForm.vue

@ -75,7 +75,12 @@
:label="item.title" :label="item.title"
:value="item.policyId"> :value="item.policyId">
</el-option> </el-option>
</el-select> </el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList">预览</el-button>
</el-form-item> </el-form-item>
<el-form-item label="经办人" <el-form-item label="经办人"
@ -283,6 +288,24 @@
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> </div>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose">
</person-list>
</el-dialog>
</div> </div>
</template> </template>
@ -290,7 +313,7 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request' import { requestPost } from '@/js/dai/request'
import personList from "../policy/personList";
var map var map
@ -374,6 +397,10 @@ export default {
fileList: [], fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
policyId: '',
showPersonList: false,
ruleList: []
} }
}, },
@ -386,7 +413,7 @@ export default {
}, },
}, },
components: {}, components: { personList },
async mounted () { async mounted () {
this.startLoading() this.startLoading()
this.initMap() this.initMap()
@ -407,6 +434,49 @@ export default {
methods: { 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 () { async getPolicyList () {
const url = '/heart/policy/policyListSelect' const url = '/heart/policy/policyListSelect'

90
src/views/modules/communityService/fuwujilu/detailForm.vue

@ -5,7 +5,6 @@
<el-form ref="ref_form" <el-form ref="ref_form"
:inline="true" :inline="true"
:model="formData" :model="formData"
:disabled="formType==='detail'"
:rules="dataRule" :rules="dataRule"
class="div_form"> class="div_form">
@ -69,7 +68,8 @@
prop="policyId" prop="policyId"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-select v-model="formData.policyId" <el-select :disabled="formType==='detail'"
v-model="formData.policyId"
class="input-width-small" class="input-width-small"
placeholder="请选择" placeholder="请选择"
clearable> clearable>
@ -79,13 +79,19 @@
:value="item.policyId"> :value="item.policyId">
</el-option> </el-option>
</el-select> </el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList">预览</el-button>
</el-form-item> </el-form-item>
<el-form-item label="经办人" <el-form-item label="经办人"
prop="principalName" prop="principalName"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input :disabled="formType==='detail'"
class="item_width_1"
placeholder="请输入经办人姓名" placeholder="请输入经办人姓名"
v-model="formData.principalName"> v-model="formData.principalName">
</el-input> </el-input>
@ -94,7 +100,8 @@
prop="principalContact" prop="principalContact"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input :disabled="formType==='detail'"
class="item_width_1"
placeholder="请输入联系方式" placeholder="请输入联系方式"
v-model="formData.principalContact"> v-model="formData.principalContact">
</el-input> </el-input>
@ -103,7 +110,8 @@
<el-form-item label="服务时间" <el-form-item label="服务时间"
label-width="150px" label-width="150px"
prop="serviceTimeStart"> prop="serviceTimeStart">
<el-date-picker v-model="formData.serviceTimeStart" <el-date-picker :disabled="formType==='detail'"
v-model="formData.serviceTimeStart"
:picker-options="startPickerOptions" :picker-options="startPickerOptions"
class="item_width_2" class="item_width_2"
type="date" type="date"
@ -112,7 +120,8 @@
placeholder="开始时间"> placeholder="开始时间">
</el-date-picker> </el-date-picker>
<span class="data-tag"></span> <span class="data-tag"></span>
<el-date-picker v-model="formData.serviceTimeEnd" <el-date-picker :disabled="formType==='detail'"
v-model="formData.serviceTimeEnd"
:picker-options="endPickerOptions" :picker-options="endPickerOptions"
class="item_width_2 data-tag" class="item_width_2 data-tag"
type="date" type="date"
@ -126,7 +135,8 @@
prop="remark" prop="remark"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input :disabled="formType==='detail'"
class="item_width_1"
type="textarea" type="textarea"
maxlength="500" maxlength="500"
show-word-limit show-word-limit
@ -286,6 +296,24 @@
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> </div>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose">
</person-list>
</el-dialog>
</div> </div>
</template> </template>
@ -293,7 +321,7 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request' import { requestPost } from '@/js/dai/request'
import personList from "../policy/personList";
var map var map
@ -353,9 +381,13 @@ export default {
projectList: [], projectList: [],
fileList: [], fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
policyId: '',
showPersonList: false,
ruleList: []
} }
}, },
components: {}, components: { personList },
mounted () { mounted () {
this.getPolicyList() this.getPolicyList()
if (this.serviceRecordId) {// if (this.serviceRecordId) {//
@ -368,6 +400,46 @@ export default {
methods: { 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 () { async getPolicyList () {
const url = '/heart/policy/policyListSelect' const url = '/heart/policy/policyListSelect'

4
src/views/modules/communityService/fuwujilu/fuwuList.vue

@ -229,6 +229,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="addDiaTitle" :title="addDiaTitle"
:modal-append-to-body="false"
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@ -248,6 +249,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="detailDiaTitle" :title="detailDiaTitle"
:modal-append-to-body="false"
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@ -501,6 +503,7 @@ export default {
}, },
async handleDetail (row) { async handleDetail (row) {
this.detailDiaTitle = "服务详情"
this.serviceRecordId = row.serviceRecordId this.serviceRecordId = row.serviceRecordId
this.serviceOrgName = row.serviceOrgName this.serviceOrgName = row.serviceOrgName
@ -509,6 +512,7 @@ export default {
}, },
async handleEdit (row) { async handleEdit (row) {
this.detailDiaTitle = "编辑服务"
this.serviceRecordId = row.serviceRecordId this.serviceRecordId = row.serviceRecordId
this.serviceOrgName = row.serviceOrgName this.serviceOrgName = row.serviceOrgName
this.formType = 'edit' this.formType = 'edit'

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

@ -71,7 +71,8 @@
</el-form-item> </el-form-item>
<div v-for="(item,index) in formData.ruleList" <div v-for="(item,index) in formData.ruleList"
:key="index"> :key="index"
style="margin-bottom:15px">
<el-form-item :label="'政策细则'+(index+1)" <el-form-item :label="'政策细则'+(index+1)"
:prop="`ruleList.${index}.ruleName`" :prop="`ruleList.${index}.ruleName`"
@ -99,12 +100,13 @@
:formType="formType" :formType="formType"
:index="index"></rule> :index="index"></rule>
</div> </div>
<div v-if="index===(ruleList.length-1)"
class="btn-add-rule"> </div>
<el-button type="primary"
size="mini" <div class="btn-add-rule">
@click="addRule">增加细则</el-button> <el-button type="primary"
</div> size="mini"
@click="addRule">增加细则</el-button>
</div> </div>
<el-form-item label="匹配资源类型" <el-form-item label="匹配资源类型"
@ -400,54 +402,69 @@ export default {
refObj.getRule(true, true, true) refObj.getRule(true, true, true)
if (refObj.okflag) { if (refObj.okflag) {
oneRule.resiRuleList = refObj.resiRuleList if (refObj.personChecked) {
oneRule.resiRuleList.forEach(element => { oneRule.resiRuleList = refObj.resiRuleList
element.itemList = [] oneRule.resiRuleList.forEach(element => {
element.colOption = [] 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) { if (refObj.houseChecked) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
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 element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
oneRule.houseRuleList.forEach(element => {
element.itemList = []
element.colOption = []
if (!element.colValLabel) { });
element.colValLabel = element.colVal } else {
} oneRule.houseRuleList = []
if (!element.nextLogicalRelName) { }
element.nextLogicalRelName = ''
}
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 => { if (!element.colValLabel) {
element.itemList = [] element.colValLabel = element.colVal
element.colOption = [] }
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
if (!element.colValLabel) { element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
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 isOk = true
@ -465,7 +482,7 @@ export default {
// this.formData.ruleList = this.ruleList // this.formData.ruleList = this.ruleList
console.log(this.formData.ruleList) console.log(this.formData.ruleList)
// return false
this.btnDisable = true this.btnDisable = true

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

@ -17,11 +17,11 @@
plain plain
size="mini">预览</el-button> size="mini">预览</el-button>
<el-button v-if="formType!=='detail'" <!-- <el-button v-if="formType!=='detail'"
class="diy-button--add" class="diy-button--add"
@click="addRule" @click="addRule"
plain plain
size="mini">增加</el-button> size="mini">增加</el-button> -->
</div> </div>
<div v-if="personSel" <div v-if="personSel"
@ -112,16 +112,21 @@
</el-option> </el-option>
</el-select> </el-select>
<img v-if="formType!=='detail'" <img v-if="formType!=='detail' && personIndex<resiRuleList.length-1"
class="img_del" class="img_del"
src="@/assets/img/icon-del.png" src="@/assets/img/icon-del.png"
@click="delPerson(personIndex)"> @click="delPerson(personIndex)">
<img v-if="formType!=='detail' && personIndex==resiRuleList.length-1"
class="img_del"
src="@/assets/img/icon-add.png"
@click="addPerson(personIndex)">
</div> </div>
</div> </div>
<div v-if="houseSel"> <div v-if="houseSel"
style="margin-top:10px">
<div v-for="(houseItem,houseIndex) in houseRuleList" <div v-for="(houseItem,houseIndex) in houseRuleList"
:key="houseIndex" :key="houseIndex"
class="row-item"> class="row-item">
@ -203,20 +208,21 @@
</el-option> </el-option>
</el-select> </el-select>
<img v-if="formType!=='detail'" <img v-if="formType!=='detail' && houseIndex<houseRuleList.length-1"
class="img_del" class="img_del"
src="@/assets/img/icon-del.png" src="@/assets/img/icon-del.png"
@click="delHouse(houseIndex)"> @click="delHouse(houseIndex)">
<!-- <el-button icon="el-icon-remove-outline" <img v-if="formType!=='detail' && houseIndex==houseRuleList.length-1"
circle class="img_del"
@click="delHouse(houseIndex)" src="@/assets/img/icon-add.png"
type="danger"></el-button> --> @click="addHouse(houseIndex)">
</div> </div>
</div> </div>
<div v-if="staticSel"> <div v-if="staticSel"
style="margin-top:10px">
<div v-for="(staticItem,staticIndex) in statRuleList" <div v-for="(staticItem,staticIndex) in statRuleList"
:key="staticIndex" :key="staticIndex"
class="row-item"> class="row-item">
@ -297,10 +303,14 @@
</el-option> </el-option>
</el-select> </el-select>
<img v-if="formType!=='detail'" <img v-if="formType!=='detail' && staticIndex<statRuleList.length-1"
class="img_del" class="img_del"
src="@/assets/img/icon-del.png" src="@/assets/img/icon-del.png"
@click="delStatic(staticIndex)"> @click="delStatic(staticIndex)">
<img v-if="formType!=='detail' && staticIndex==statRuleList.length-1"
class="img_del"
src="@/assets/img/icon-add.png"
@click="addStatic(staticIndex)">
</div> </div>
</div> </div>
@ -358,8 +368,7 @@ export default {
], ],
houseItemList: [],// houseItemList: [],//
staticItemList: [],// staticItemList: [],//
resiRuleList: [], resiRuleList: [
resiRuleList1: [
{ {
ruleDesc: '',// ruleDesc: '',//
nextLogicalRel: '',//andor nextLogicalRel: '',//andor
@ -378,12 +387,10 @@ export default {
queryTypeName: '', queryTypeName: '',
colValLabel: '', colValLabel: '',
nextLogicalRelName: '', nextLogicalRelName: '',
} }
], ],
houseRuleList: [],
houseTitleName: '房屋信息', houseRuleList: [
houseRuleList1: [
{ {
ruleDesc: '', ruleDesc: '',
nextLogicalRel: '',//andor nextLogicalRel: '',//andor
@ -402,9 +409,10 @@ export default {
nextLogicalRelName: '', nextLogicalRelName: '',
} }
], ],
houseTitleName: '房屋信息',
statTitleName: '统计信息', statTitleName: '统计信息',
statRuleList: [], statRuleList: [
statRuleList1: [
{ {
ruleDesc: '', ruleDesc: '',
nextLogicalRel: '',//andor nextLogicalRel: '',//andor
@ -421,9 +429,9 @@ export default {
queryTypeName: '', queryTypeName: '',
colValLabel: '', colValLabel: '',
nextLogicalRelName: '', nextLogicalRelName: '',
} }
], ],
okflag: false, okflag: false,
showPersonList: false, showPersonList: false,
@ -513,10 +521,10 @@ export default {
}, },
getRule (valPerson, valHouse, valStatic) { getRule () {
this.okflag = false 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('resiRuleList', this.resiRuleList)
// console.log('houseRuleList', this.houseRuleList) // console.log('houseRuleList', this.houseRuleList)
@ -548,6 +556,7 @@ export default {
let message = '' let message = ''
if (valPerson) { if (valPerson) {
this.resiRuleList.forEach((item, index) => { this.resiRuleList.forEach((item, index) => {
if (index === this.resiRuleList.length - 1) { if (index === this.resiRuleList.length - 1) {
@ -574,6 +583,8 @@ export default {
} }
}); });
} }
if (valHouse) { if (valHouse) {
@ -636,7 +647,7 @@ export default {
return false return false
} }
this.getRule(this.personChecked, this.houseChecked, this.staticChecked) this.getRule()
if (!this.okflag) { if (!this.okflag) {
return false return false
} }
@ -930,6 +941,18 @@ export default {
}, },
addPerson () { 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 = { let obj = {
ruleDesc: '',// ruleDesc: '',//
nextLogicalRel: '',//andor nextLogicalRel: '',//andor
@ -958,6 +981,16 @@ export default {
}, },
addHouse () { 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 = { let obj = {
ruleDesc: '', ruleDesc: '',
nextLogicalRel: '',//andor nextLogicalRel: '',//andor
@ -984,6 +1017,16 @@ export default {
}, },
addStatic () { 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 = { let obj = {
ruleDesc: '', ruleDesc: '',
nextLogicalRel: '',//andor nextLogicalRel: '',//andor

Loading…
Cancel
Save