diff --git a/src/assets/img/icon-add.png b/src/assets/img/icon-add.png new file mode 100644 index 000000000..07d1bb4dd Binary files /dev/null and b/src/assets/img/icon-add.png differ diff --git a/src/assets/scss/modules/management/form-main.scss b/src/assets/scss/modules/management/form-main.scss index 60f243942..b05026758 100644 --- a/src/assets/scss/modules/management/form-main.scss +++ b/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; } diff --git a/src/js/util.js b/src/js/util.js index 333f03517..eceb943be 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -12,6 +12,7 @@ export default { * @param {*} messageObj */ validateRule(messageObj) { + let message = '' for (var oneObj in messageObj) { message = message + messageObj[oneObj][0].message + '
' diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 2d786fa23..caf9fbcbe 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1390,11 +1390,23 @@ export default { async updatePeo () { const url = "/gov/org/staff/editstaff" + console.log(this.peoForm.gender) + + if(this.peoForm.gender === '男'){ + this.peoForm.gender = 1 + } else if (this.peoForm.gender === '女') { + this.peoForm.gender = 2 + } else if (this.peoForm.gender === 1) { + this.peoForm.gender = 1 + } else if (this.peoForm.gender === 2) { + this.peoForm.gender = 2 + } + let params = { staffId: this.userStaffId, name: this.peoForm.name, mobile: this.peoForm.mobile, - gender: this.peoForm.gender === '男' ? 1 : 0, + gender:this.peoForm.gender, workType: this.peoForm.post, roles: this.peoForm.duty, newRoles: this.peoForm.newRoles, diff --git a/src/views/modules/communityService/fuwujilu/addForm.vue b/src/views/modules/communityService/fuwujilu/addForm.vue index 45bb12bcf..c019c48aa 100644 --- a/src/views/modules/communityService/fuwujilu/addForm.vue +++ b/src/views/modules/communityService/fuwujilu/addForm.vue @@ -75,7 +75,12 @@ :label="item.title" :value="item.policyId"> + + 预览 确 定 + + + + + @@ -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 @@ -366,7 +389,7 @@ export default { disabledDate: startDisabledDate }, - showFeedback: true, + showFeedback: false, serviceOptions: [], serviceOptiondList: [], policyList: [], @@ -374,6 +397,12 @@ export default { fileList: [], uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', + policyId: '', + showPersonList: false, + ruleList: [], + + firstInitMap: true, + } }, @@ -386,13 +415,18 @@ export default { }, }, - components: {}, + components: { personList }, async mounted () { this.startLoading() - this.initMap() + + this.getDictOptions(); this.getPolicyList(); - this.$refs.ref_form_feedback.resetFields(); + if (this.showFeedback) { + this.initMap() + this.$refs.ref_form_feedback.resetFields(); + } + if (this.formType === 'add') { this.$refs.ref_form.resetFields(); await this.loadScopeTree() @@ -407,6 +441,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' @@ -467,6 +544,13 @@ export default { handleChangeFeedback (val) { this.showFeedback = val + if (this.firstInitMap) { + this.$nextTick(() => { + this.initMap() + }) + + } + }, @@ -533,6 +617,13 @@ export default { app.util.validateRule(messageObj) this.btnDisable = false } else { + var oDate1 = new Date(this.formData.serviceTimeStart); + var oDate2 = new Date(this.formData.serviceTimeEnd); + if (oDate1.getTime() > oDate2.getTime()) { + this.$message.error('服务截止时间必须大于服务开始时间') + return false + } + if (this.showFeedback) { this.$refs['ref_form_feedback'].validate((valid, messageObj) => { @@ -570,6 +661,7 @@ export default { console.log(this.formData) // return false const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 + if (this.formData.principalContact && regPhone.test(this.formData.principalContact) === false) { this.btnDisable = false this.$message({ @@ -583,7 +675,7 @@ export default { const url = '/heart/icServiceRecordV2/add' // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate' let params = { - + serviceCategoryKey: this.serviceCategoryKey, ...this.formData } @@ -719,6 +811,7 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { + // 定义地图中心点坐标 var center = new window.TMap.LatLng(36.0722275, 120.38945519) // 定义map变量,调用 TMap.Map() 构造函数创建地图 @@ -745,6 +838,8 @@ export default { }) this.handleMoveCenter() this.convert() + + this.firstInitMap = false }, setMarker (lat, lng) { @@ -926,6 +1021,10 @@ export default { type: String, required: '' }, + serviceCategoryKey: { + type: String, + required: '' + }, serviceProjectName: {//服务项目名称 type: String, required: false, diff --git a/src/views/modules/communityService/fuwujilu/detailForm.vue b/src/views/modules/communityService/fuwujilu/detailForm.vue index 652b399a1..970e99846 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' @@ -398,7 +470,7 @@ export default { this.feedbackFormData = { ...data.feedback } this.fileList = [] - if (data.feedback.fileList && data.feedback.fileList.length > 0) { + if (data.feedback && data.feedback.fileList && data.feedback.fileList.length > 0) { data.feedback.fileList.forEach(element => { let obj = { name: element.name, @@ -435,7 +507,7 @@ export default { }, async editFuwu () { const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - if (regPhone.test(this.formData.principalContact) === false) { + if (this.formData.principalContact && regPhone.test(this.formData.principalContact) === false) { this.btnDisable = false this.$message({ type: 'warning', diff --git a/src/views/modules/communityService/fuwujilu/fuwuList.vue b/src/views/modules/communityService/fuwujilu/fuwuList.vue index b5f64cdca..aacc936b8 100644 --- a/src/views/modules/communityService/fuwujilu/fuwuList.vue +++ b/src/views/modules/communityService/fuwujilu/fuwuList.vue @@ -179,7 +179,7 @@ + width="220"> @@ -268,9 +293,10 @@ import axios from "axios"; import addForm from "./addForm"; import detailForm from "./detailForm"; import feedBackForm from "./addForm"; +import personList from "../policy/personList"; export default { - components: { addForm, detailForm, feedBackForm }, + components: { addForm, detailForm, feedBackForm, personList }, data () { let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 @@ -356,7 +382,9 @@ export default { serviceOptions: [], serviceOptiondList: [], - + policyId: '', + showPersonList: false, + ruleList: [] }; }, computed: { @@ -441,6 +469,31 @@ export default { return this.$message.error("网络错误"); }); }, + //加载组织数据 + async handlePersonList (row) { + + this.policyId = row.policyId + await this.loadRuleList() + this.formType = 'personList' + 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) + } + + }, async handleAdd () { @@ -450,6 +503,7 @@ export default { }, async handleDetail (row) { + this.detailDiaTitle = "服务详情" this.serviceRecordId = row.serviceRecordId this.serviceOrgName = row.serviceOrgName @@ -458,7 +512,9 @@ export default { }, async handleEdit (row) { + this.detailDiaTitle = "编辑服务" this.serviceRecordId = row.serviceRecordId + this.serviceOrgName = row.serviceOrgName this.formType = 'edit' this.showDetail = true @@ -541,6 +597,7 @@ export default { const { data, code, msg } = await requestPost(url, { pageSize, pageNo, + serviceCategoryKey: this.serviceCategoryKey, ...formData, }); @@ -617,9 +674,18 @@ export default { this.pageNo = 1 - // this.getTableData() + this.getTableData() }, }, + + props: { + + serviceCategoryKey: { + type: String, + required: 'true' + }, + + } }; diff --git a/src/views/modules/communityService/fuwujilu/fuwuList00.vue b/src/views/modules/communityService/fuwujilu/fuwuList00.vue new file mode 100644 index 000000000..6fb615f8f --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList00.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList01.vue b/src/views/modules/communityService/fuwujilu/fuwuList01.vue new file mode 100644 index 000000000..84a766dbd --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList01.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList02.vue b/src/views/modules/communityService/fuwujilu/fuwuList02.vue new file mode 100644 index 000000000..0490cfa91 --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList02.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList03.vue b/src/views/modules/communityService/fuwujilu/fuwuList03.vue new file mode 100644 index 000000000..8985e32ac --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList03.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList04.vue b/src/views/modules/communityService/fuwujilu/fuwuList04.vue new file mode 100644 index 000000000..1dcca1d4c --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList04.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList05.vue b/src/views/modules/communityService/fuwujilu/fuwuList05.vue new file mode 100644 index 000000000..9015eeb63 --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList05.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList06.vue b/src/views/modules/communityService/fuwujilu/fuwuList06.vue new file mode 100644 index 000000000..ef9930ad5 --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList06.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/fuwujilu/fuwuList07.vue b/src/views/modules/communityService/fuwujilu/fuwuList07.vue new file mode 100644 index 000000000..8b9b37b4f --- /dev/null +++ b/src/views/modules/communityService/fuwujilu/fuwuList07.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index 4d6f5f555..5b6718dcd 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -61,20 +61,24 @@ prop="content" label-width="150px" style="display: block"> - -
+
删除细则 +
+
{{'匹配规则'+(index+1)}}
- - -
- 增加细则
+ +
+ +
+ 增加细则
oDate2.getTime()) { + this.$message.error('结束日期必须大于开始日期') + return false + } + + let isOk = false - for (let index = 0; index < this.ruleList.length; index++) { - let oneRule = this.ruleList[index] + for (let index = 0; index < this.formData.ruleList.length; index++) { + let oneRule = this.formData.ruleList[index] let refObj = this.$refs['ref_rule' + index][0] - refObj.getRule(true, true, true) + refObj.getRule() if (refObj.okflag) { - oneRule.resiRuleList = refObj.resiRuleList - oneRule.resiRuleList.forEach(element => { - element.itemList = [] - element.colOption = [] - if (!element.colValLabel) { - element.colValLabel = element.colVal - } - if (!element.nextLogicalRelName) { - element.nextLogicalRelName = '' - } + if (!refObj.personChecked && !refObj.houseChecked && !refObj.staticChecked) { + this.$message.error('请选择匹配规则' + (index + 1)) + isOk = false + break + } else { - element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName + 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 = '' + } - 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.resiRuleList = [] } - element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName + if (refObj.houseChecked) { - }); + 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 + + 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 @@ -446,9 +488,10 @@ export default { return false } - this.formData.ruleList = this.ruleList + // this.formData.ruleList = this.ruleList console.log(this.formData.ruleList) + // return false this.btnDisable = true @@ -457,7 +500,7 @@ export default { }, 5000) this.$refs['ref_form'].validate((valid, messageObj) => { if (!valid) { - app.util.validateRule(messageObj) + // app.util.validateRule(messageObj) this.btnDisable = false } else { this.addFuwu() @@ -473,8 +516,9 @@ export default { this.formData.attachmentList = [...this.fileList] let url = '/heart/policy/add' - if (this.formType === 'add') { + if (this.formType === 'add' || this.formType === 'copy') { url = '/heart/policy/add' + this.formData.policyId = '' } else { url = '/heart/policy/update' this.formData.policyId = this.policyId @@ -639,6 +683,18 @@ export default { }, computed: { dataRule () { + + + // this.ruleList.forEach((element, index) => { + // let one = [ + // { required: true, message: '政策细则' + (index + 1) + '不能为空', trigger: 'blur' } + // ] + // rules['ruleName' + (index + 1)] = one + + // }); + + + return { policyLevel: [ @@ -650,9 +706,7 @@ export default { title: [ { required: true, message: '政策标题不能为空', trigger: 'change' } ], - content: [ - { required: true, message: '政策内容不能为空', trigger: 'change' } - ], + } @@ -690,4 +744,20 @@ export default { .item_width_short { width: 380px; } + +.item_rule { + display: flex; + justify-content: start; +} +.item_label { + flex: 0 0 150px; + line-height: 30px; + text-align: right; + padding-right: 12px; +} +.item_label:before { + content: "*"; + color: #f56c6c; + margin-right: 4px; +} diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue index 86abe1f8c..1fbfa97ca 100644 --- a/src/views/modules/communityService/policy/policyList.vue +++ b/src/views/modules/communityService/policy/policyList.vue @@ -126,7 +126,7 @@ + width="220">