From de4fbcfec29576d75faee9efe9598e0f7781e939 Mon Sep 17 00:00:00 2001 From: xuyuanqing <392009588@qq.com> Date: Fri, 29 Mar 2024 16:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E7=94=B3=E8=AF=B7=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/HomeApplyUploadComp.vue | 8 +- .../homeApplication/applicationNewList.vue | 2 +- .../homeApplication/proposerLiteNew.vue | 3059 +++++++++-------- 3 files changed, 1548 insertions(+), 1521 deletions(-) diff --git a/src/components/home/HomeApplyUploadComp.vue b/src/components/home/HomeApplyUploadComp.vue index dd38896f..4294f581 100644 --- a/src/components/home/HomeApplyUploadComp.vue +++ b/src/components/home/HomeApplyUploadComp.vue @@ -84,7 +84,7 @@ export default { file.response = resp; console.log(resp); file.fileList = item.fileList; - this.onFileListChanged("ADD", resp.id); + this.onFileListChanged("ADD", resp); this.setFileStatus(file, 'done', '文件上传成功'); this.$emit('onUploadSuccess', file); } @@ -146,15 +146,15 @@ export default { return UfileList; } }, - onFileListChanged(type, id) { + onFileListChanged(type, data) { if(this.proposerId != -1) return; if(type === "ADD") { - this.newAttachments.push(id); + this.newAttachments.push(data); } else if(type === "REMOVE") { - let index = this.newAttachments.indexOf(id); + let index = this.newAttachments.indexOf(data.id); if(index !== -1) this.newAttachments.splice(index, 1); } diff --git a/src/views/sunVillage_info/homeApplication/applicationNewList.vue b/src/views/sunVillage_info/homeApplication/applicationNewList.vue index 9a43a996..c3da4425 100644 --- a/src/views/sunVillage_info/homeApplication/applicationNewList.vue +++ b/src/views/sunVillage_info/homeApplication/applicationNewList.vue @@ -53,7 +53,7 @@ - + diff --git a/src/views/sunVillage_info/homeApplication/proposerLiteNew.vue b/src/views/sunVillage_info/homeApplication/proposerLiteNew.vue index 63ff6c2c..76a3e27c 100644 --- a/src/views/sunVillage_info/homeApplication/proposerLiteNew.vue +++ b/src/views/sunVillage_info/homeApplication/proposerLiteNew.vue @@ -897,6 +897,9 @@ + @@ -2144,6 +2147,8 @@ nhxxList: [], zjddmColumns: [], zjdzdxxList: [], + fileTypeList: [], + fileIdList: [], zjdzdxxDetailed: { zdszd: null, zdszn: null, @@ -3481,8 +3486,14 @@ }, // 初次申请草稿的附件上传 onUploadFinished(fileIdList) { - console.info(fileIdList); - this.$set(this.applicationDetail, "fileList", fileIdList); + this.fileTypeList = []; + this.fileIdList = []; + let _this = this; + fileIdList.forEach(function (item) { + _this.fileTypeList.push(item.fileType); + _this.fileIdList.push(item.id); + }) + this.$set(this.applicationDetail, "fileList", this.fileIdList); }, // 获取申请人信息 getApplyerDetail(val) { @@ -3671,144 +3682,73 @@ this.notify("提交失败!", 'danger'); }).finally(() => { }); - }, - // 判断角色是否符合 - isInRoles(myRoles, requireRoles) { - if (!Array.isArray(myRoles)) - myRoles = myRoles.split(','); - if (!Array.isArray(requireRoles)) - requireRoles = requireRoles.split(','); - for (let r of requireRoles) { - if (myRoles.indexOf(r) !== -1) - return true; - } - return false; - }, - // 转换地图数据用于提交后台 - convertGeom(json) { - let data = JSON.parse(json); - if (data.hasOwnProperty('coordinates')) - return JSON.stringify(data.coordinates); - return null; - }, - zkshClick() { - if (this.zjdzdxxDetailedShow) { - this.zjdzdxxDetailedShow = false; - } else { - this.zjdzdxxDetailedShow = true; - } - }, - // 审批(同意/驳回) - auditProposer(pass) { - let _this = this; - switch (this.processKeyField) { - case PROPOSER_STAGE_BASE_APPLY_ACTIVITY: { - let comment; - const role = this.$store.getters.roles[0]; - let msg = ""; - switch (role) { - case "agriculture": - msg = this.validateAgricultureForm(pass); - if (msg) { - break; - } - comment = this.applicationDetail.ydjfsp.nyncbmscyj; - // if(this.$refs.pictureUploadApplyingTHouseApproveAgriculture && this.$refs.pictureUploadApplyingTHouseApproveAgriculture.isValid()) { - // this.submitHouseApproveAgricultureOptions().then(item=>{ - if (msg) { - return; - } + }, + // 判断角色是否符合 + isInRoles(myRoles, requireRoles) { + if (!Array.isArray(myRoles)) + myRoles = myRoles.split(','); + if (!Array.isArray(requireRoles)) + requireRoles = requireRoles.split(','); + for (let r of requireRoles) { + if (myRoles.indexOf(r) !== -1) + return true; + } + return false; + }, + // 转换地图数据用于提交后台 + convertGeom(json) { + let data = JSON.parse(json); + if (data.hasOwnProperty('coordinates')) + return JSON.stringify(data.coordinates); + return null; + }, + zkshClick() { + if (this.zjdzdxxDetailedShow) { + this.zjdzdxxDetailedShow = false; + } else { + this.zjdzdxxDetailedShow = true; + } + }, + // 审批(同意/驳回) + auditProposer(pass) { + let _this = this; + switch (this.processKeyField) { + case PROPOSER_STAGE_BASE_APPLY_ACTIVITY: { + let comment; + const role = this.$store.getters.roles[0]; + let msg = ""; + switch (role) { + case "agriculture": + msg = this.validateAgricultureForm(pass); + if (msg) { + break; + } + comment = this.applicationDetail.ydjfsp.nyncbmscyj; + // if(this.$refs.pictureUploadApplyingTHouseApproveAgriculture && this.$refs.pictureUploadApplyingTHouseApproveAgriculture.isValid()) { + // this.submitHouseApproveAgricultureOptions().then(item=>{ + if (msg) { + return; + } - saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, comment); - }).catch(resp => { - this.notify(msg, 'danger'); - this.notify("保存失败!", 'danger'); - }); - // }); - // } else { - // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan)) { - // msg = "农村农业部门现场拍照不能为空"; - // break; - // } - // } - break; - case "building": - msg = this.validateBuildingForm(pass); - comment = this.applicationDetail.ydjfsp.zfcxjsbmscyj; - // if(this.$refs.pictureUploadApplyingTHouseApproveOther && this.$refs.pictureUploadApplyingTHouseApproveOther.isValid()) { - // this.submitHouseApproveOtherOptions().then(item=>{ - // setTimeout(() => { - saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, comment); - }).catch(resp => { - this.notify(msg, 'danger'); - this.notify("保存失败!", 'danger'); - }); - // }, 500); - // }); - // } else { - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.otherPlan)) { - // msg = "住建部门现场拍照不能为空"; - // break; - // } - // } - break; - case "nature_resource": - msg = this.validateNatureForm(pass); - if (msg) { - break; - } - this.$set(this.applicationDetail, 'tHouseApproveTownOptions', null); - this.$set(this.applicationDetail, 'tHouseApproveOtherOptions', null); - this.$set(this.applicationDetail, 'tHouseApproveAgricultureOptions', null); - comment = this.applicationDetail.ydjfsp.zrzybmscyj; - saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, comment); - }).catch(resp => { - this.notify(msg, 'danger'); - this.notify("保存失败!", 'danger'); - }); - break; - case "town_leader": - // msg = this.validateAgricultureForm(pass); - // if (msg) { - // break; - // } - // msg = this.validateNatureForm(); - // if (msg) { - // break; - // } - // - // msg = this.validateBuildingForm(); - // if (msg) { - // break; - // } - msg = this.validateTownForm(); - if (msg) { + saveHomeBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, comment); + }).catch(resp => { + this.notify(msg, 'danger'); + this.notify("保存失败!", 'danger'); + }); + // }); + // } else { + // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan)) { + // msg = "农村农业部门现场拍照不能为空"; + // break; + // } + // } break; - } - comment = this.applicationDetail.ydjfsp.zfcxjsbmscyj; - // this.submitHouseApproveAgricultureOptions().then(item=>{ - // _this.submitHouseApproveNatureplanOptions().then(item2=>{ - // _this.submitHouseApproveOtherOptions().then(item3=>{ - // if(_this.$refs.pictureUploadApplyingTHouseApproveTown && _this.$refs.pictureUploadApplyingTHouseApproveTown.isValid()) { - // _this.submitHouseApproveTownOptions().then(item4=>{ - // //地图判断 - // if (_this.drawInsert != null) { - // _this.applicationDetail.tHouseApproveNatureOptions.theGeom = JSON.stringify(_this.drawInsert); - // } - // else { - // if(_this.applicationDetail.tHouseApproveNatureOptions && _this.applicationDetail.tHouseApproveNatureOptions.theGeom == null){ - // _this.applicationDetail.tHouseApproveNatureOptions.theGeom = _this.convertGeom(_this.applicationDetail.tHouseApplyProposedSituation.theGeom); - // } - // } - if (!pass) { - comment = "驳回"; - } - if (this.applicationDetail.ydjfsp.zjdzlpmwzt != null && this.applicationDetail.ydjfsp.zjdzlpmwzt !== "") { - // _this.submitHouseApproveLocationplanOptions(pass, comment).then(item5=>{ - // _this.submitHouseApproveNatureplanOptions().then(item6=>{ + case "building": + msg = this.validateBuildingForm(pass); + comment = this.applicationDetail.ydjfsp.zfcxjsbmscyj; + // if(this.$refs.pictureUploadApplyingTHouseApproveOther && this.$refs.pictureUploadApplyingTHouseApproveOther.isValid()) { + // this.submitHouseApproveOtherOptions().then(item=>{ // setTimeout(() => { saveHomeBaseInfo(this.applicationDetail).then((response) => { this.complete(pass, comment); @@ -3816,487 +3756,323 @@ this.notify(msg, 'danger'); this.notify("保存失败!", 'danger'); }); - // }, 500); - // }); + // }, 500); // }); - } else { - this.notify("宅基地坐落平面位置图不能为空", 'danger'); - this.$refs.form.validate().then(() => { - }).catch((e) => { - }) - } - // }); - // } else { - - // if(!pass){ - // comment = "驳回"; - // } - // setTimeout(() => { - // saveHouseBaseInfo(_this.applicationDetail).then((response) => { - // _this.complete(pass, comment); - // }).catch(resp => { - // _this.notify(msg, 'danger'); - // _this.notify("保存失败!", 'danger'); - // }); - // }, 500); - // } - // } - // }); - // }); - // }); - break; - default: - if (this.checkString(this.applicationDetail.cjxzscyj)) - msg = '村领导意见不能为空'; - else - comment = this.applicationDetail.cjxzscyj; - if (this.checkString(this.applicationDetail.cjxzscr)) { - msg = "村级领导签名不能为空"; - } else if (this.$refs.pictureUploadApplyingTHouseApproveVillage && this.$refs.pictureUploadApplyingTHouseApproveVillage.isValid()) { - this.submitHouseApproveVillageplanOptions(pass, comment); - return; - } else { - setTimeout(() => { + // } else { + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.otherPlan)) { + // msg = "住建部门现场拍照不能为空"; + // break; + // } + // } + break; + case "nature_resource": + msg = this.validateNatureForm(pass); + if (msg) { + break; + } + this.$set(this.applicationDetail, 'tHouseApproveTownOptions', null); + this.$set(this.applicationDetail, 'tHouseApproveOtherOptions', null); + this.$set(this.applicationDetail, 'tHouseApproveAgricultureOptions', null); + comment = this.applicationDetail.ydjfsp.zrzybmscyj; + saveHomeBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, comment); + }).catch(resp => { + this.notify(msg, 'danger'); + this.notify("保存失败!", 'danger'); + }); + break; + case "town_leader": + // msg = this.validateAgricultureForm(pass); + // if (msg) { + // break; + // } + // msg = this.validateNatureForm(); + // if (msg) { + // break; + // } + // + // msg = this.validateBuildingForm(); + // if (msg) { + // break; + // } + msg = this.validateTownForm(); + if (msg) { + break; + } + comment = this.applicationDetail.ydjfsp.zfcxjsbmscyj; + // this.submitHouseApproveAgricultureOptions().then(item=>{ + // _this.submitHouseApproveNatureplanOptions().then(item2=>{ + // _this.submitHouseApproveOtherOptions().then(item3=>{ + // if(_this.$refs.pictureUploadApplyingTHouseApproveTown && _this.$refs.pictureUploadApplyingTHouseApproveTown.isValid()) { + // _this.submitHouseApproveTownOptions().then(item4=>{ + // //地图判断 + // if (_this.drawInsert != null) { + // _this.applicationDetail.tHouseApproveNatureOptions.theGeom = JSON.stringify(_this.drawInsert); + // } + // else { + // if(_this.applicationDetail.tHouseApproveNatureOptions && _this.applicationDetail.tHouseApproveNatureOptions.theGeom == null){ + // _this.applicationDetail.tHouseApproveNatureOptions.theGeom = _this.convertGeom(_this.applicationDetail.tHouseApplyProposedSituation.theGeom); + // } + // } + if (!pass) { + comment = "驳回"; + } + if (this.applicationDetail.ydjfsp.zjdzlpmwzt != null && this.applicationDetail.ydjfsp.zjdzlpmwzt !== "") { + // _this.submitHouseApproveLocationplanOptions(pass, comment).then(item5=>{ + // _this.submitHouseApproveNatureplanOptions().then(item6=>{ + // setTimeout(() => { saveHomeBaseInfo(this.applicationDetail).then((response) => { this.complete(pass, comment); }).catch(resp => { this.notify(msg, 'danger'); this.notify("保存失败!", 'danger'); }); - }, 500); - } - //} - // if(this.selectedTabName ==0){ - // if(this.currentUserRole == 'village_leader'){ - // //村级审核人员签字 - // //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) - // this.applicationDetail.tHouseApproveVillageOptions.villageLeader = res.fileName; - // } else if(this.currentUserRole == 'task_executor'){ - // //自然资源部门签字 - // if(this.checkString(this.applicationDetail.tHouseApproveNatureOptions.approveLeader)) - // return '自然资源部门签字不能为空'; - // this.applicationDetail.tHouseApproveNatureOptions.approveLeader = res.fileName; - // } else if (this.currentUserRole == ''){ - // //其他部门签字 - // if(this.checkString(this.applicationDetail.tHouseApproveOtherOptions.approveLeader)) - // return '其他部门签字不能为空'; - // this.applicationDetail.tHouseApproveOtherOptions.approveLeader = res.fileName; - // } else if (this.currentUserRole == ''){ - // //农村农业部门签字 - // if(this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.approveLeader)) - // return '农村农业部门签字不能为空'; - // this.applicationDetail.tHouseApproveAgricultureOptions.approveLeader = res.fileName; - // } else if (this.currentUserRole == ''){ - // //镇级领导签字 tHouseApproveTownOptions - // if(this.checkString(this.applicationDetail.tHouseApproveTownOptions.approveLeader)) - // return '镇级领导签字不能为空'; - // this.applicationDetail.tHouseApproveTownOptions.approveLeader = res.fileName; - // } - // this.showesign =false; - // } else if(this.selectedTabName ==1){ - // - // } else if (this.selectedTabName ==2){ - // - // } - break; - } - if (msg) { - this.notify(msg, 'danger'); - this.$refs.form.validate().then(() => { - }).catch((e) => { - }) - return; - } - } - break; - case PROPOSER_STAGE_START_ACTIVITY: - let _this = this; - const role = this.$store.getters.roles[0]; - if (role === "nature_resource") { - if (this.drawInsert != null) { - this.applicationDetail.ydjfkg.theGeomJson = JSON.stringify(this.drawInsert); - } else { - if (this.applicationDetail.ydjfkg.theGeomJson == null) { - if (this.applicationDetail.ydjfkg.theGeom == null) { - this.notify("请在地图上标注宅基地位置!", 'danger'); - break; + // }, 500); + // }); + // }); + } else { + this.notify("宅基地坐落平面位置图不能为空", 'danger'); + this.$refs.form.validate().then(() => { + }).catch((e) => { + }) + } + // }); + // } else { + + // if(!pass){ + // comment = "驳回"; + // } + // setTimeout(() => { + // saveHouseBaseInfo(_this.applicationDetail).then((response) => { + // _this.complete(pass, comment); + // }).catch(resp => { + // _this.notify(msg, 'danger'); + // _this.notify("保存失败!", 'danger'); + // }); + // }, 500); + // } + // } + // }); + // }); + // }); + break; + default: + if (this.checkString(this.applicationDetail.cjxzscyj)) + msg = '村领导意见不能为空'; + else + comment = this.applicationDetail.cjxzscyj; + if (this.checkString(this.applicationDetail.cjxzscr)) { + msg = "村级领导签名不能为空"; + } else if (this.$refs.pictureUploadApplyingTHouseApproveVillage && this.$refs.pictureUploadApplyingTHouseApproveVillage.isValid()) { + this.submitHouseApproveVillageplanOptions(pass, comment); + return; } else { - this.applicationDetail.ydjfkg.theGeomJson = this.convertGeom(this.applicationDetail.ydjfkg.theGeom); + setTimeout(() => { + saveHomeBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, comment); + }).catch(resp => { + this.notify(msg, 'danger'); + this.notify("保存失败!", 'danger'); + }); + }, 500); } - } + //} + // if(this.selectedTabName ==0){ + // if(this.currentUserRole == 'village_leader'){ + // //村级审核人员签字 + // //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) + // this.applicationDetail.tHouseApproveVillageOptions.villageLeader = res.fileName; + // } else if(this.currentUserRole == 'task_executor'){ + // //自然资源部门签字 + // if(this.checkString(this.applicationDetail.tHouseApproveNatureOptions.approveLeader)) + // return '自然资源部门签字不能为空'; + // this.applicationDetail.tHouseApproveNatureOptions.approveLeader = res.fileName; + // } else if (this.currentUserRole == ''){ + // //其他部门签字 + // if(this.checkString(this.applicationDetail.tHouseApproveOtherOptions.approveLeader)) + // return '其他部门签字不能为空'; + // this.applicationDetail.tHouseApproveOtherOptions.approveLeader = res.fileName; + // } else if (this.currentUserRole == ''){ + // //农村农业部门签字 + // if(this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.approveLeader)) + // return '农村农业部门签字不能为空'; + // this.applicationDetail.tHouseApproveAgricultureOptions.approveLeader = res.fileName; + // } else if (this.currentUserRole == ''){ + // //镇级领导签字 tHouseApproveTownOptions + // if(this.checkString(this.applicationDetail.tHouseApproveTownOptions.approveLeader)) + // return '镇级领导签字不能为空'; + // this.applicationDetail.tHouseApproveTownOptions.approveLeader = res.fileName; + // } + // this.showesign =false; + // } else if(this.selectedTabName ==1){ + // + // } else if (this.selectedTabName ==2){ + // + // } + break; } - saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass); - }).catch(resp => { + if (msg) { this.notify(msg, 'danger'); - this.notify("保存失败!", 'danger'); - }); - } else { - this.complete(pass); + this.$refs.form.validate().then(() => { + }).catch((e) => { + }) + return; + } } - break; - case PROPOSER_STAGE_END_ACTIVITY : { - let comment; - let msg = ""; - const role = this.$store.getters.roles[0]; - switch (role) { - case "agriculture": - msg = this.validateAcceptingFormTown(undefined, role); - if (msg) { - break; - } - comment = this.applicationDetail.ydjfys.nyncbmysyj; - saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, comment); - }).catch(err => { - this.notify('保存失败', 'danger'); - }); - - break; - case "nature_resource": - msg = this.validateAcceptingFormTown(undefined, role); - if (msg) { - break; + break; + case PROPOSER_STAGE_START_ACTIVITY: + let _this = this; + const role = this.$store.getters.roles[0]; + if (role === "nature_resource") { + if (this.drawInsert != null) { + this.applicationDetail.ydjfkg.theGeomJson = JSON.stringify(this.drawInsert); + } else { + if (this.applicationDetail.ydjfkg.theGeomJson == null) { + if (this.applicationDetail.ydjfkg.theGeom == null) { + this.notify("请在地图上标注宅基地位置!", 'danger'); + break; + } else { + this.applicationDetail.ydjfkg.theGeomJson = this.convertGeom(this.applicationDetail.ydjfkg.theGeom); + } + } } - comment = this.applicationDetail.ydjfys.zrzybmysyj; saveHomeBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, comment); - }).catch(err => { - this.notify('保存失败', 'danger'); + this.complete(pass); + }).catch(resp => { + this.notify(msg, 'danger'); + this.notify("保存失败!", 'danger'); }); - break; - case "town_leader": - msg = this.validateAcceptingFormTown(); - if (msg) { - break; - } - comment = this.applicationDetail.ydjfys.xzzfysyj; - if (this.applicationDetail.ydjfys.jgpmjt != null) { + } else { + this.complete(pass); + } + break; + case PROPOSER_STAGE_END_ACTIVITY : { + let comment; + let msg = ""; + const role = this.$store.getters.roles[0]; + switch (role) { + case "agriculture": + msg = this.validateAcceptingFormTown(undefined, role); + if (msg) { + break; + } + comment = this.applicationDetail.ydjfys.nyncbmysyj; saveHomeBaseInfo(this.applicationDetail).then((response) => { this.complete(pass, comment); }).catch(err => { this.notify('保存失败', 'danger'); }); - } else { - msg = "竣工平面简图不能为空"; - } - break; - default: - comment = '同意'; - if (this.applicationDetail.ydjfys.jgpmjt != null) { + break; + case "nature_resource": + msg = this.validateAcceptingFormTown(undefined, role); + if (msg) { + break; + } + comment = this.applicationDetail.ydjfys.zrzybmysyj; saveHomeBaseInfo(this.applicationDetail).then((response) => { this.complete(pass, comment); }).catch(err => { this.notify('保存失败', 'danger'); }); - } else { - msg = "竣工平面简图不能为空"; - } - break; - } - if (msg) { - this.notify(msg, 'danger'); - this.$refs.form.validate().then(() => { - }).catch(e => { - }); - return; - } + break; + case "town_leader": + msg = this.validateAcceptingFormTown(); + if (msg) { + break; + } + comment = this.applicationDetail.ydjfys.xzzfysyj; + if (this.applicationDetail.ydjfys.jgpmjt != null) { + saveHomeBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, comment); + }).catch(err => { + this.notify('保存失败', 'danger'); + }); + } else { + msg = "竣工平面简图不能为空"; + } + + break; + default: + comment = '同意'; + if (this.applicationDetail.ydjfys.jgpmjt != null) { + saveHomeBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, comment); + }).catch(err => { + this.notify('保存失败', 'danger'); + }); + } else { + msg = "竣工平面简图不能为空"; + } + break; + } + if (msg) { + this.notify(msg, 'danger'); + this.$refs.form.validate().then(() => { + }).catch(e => { + }); + return; + } - // //农村农业部 - // if (this.$refs.tHouseApplyEndNongye && this.$refs.tHouseApplyEndNongye.isValid()) { - // this.submitHouseApproveEndNongyeOptions(); - // return; - // } - // //自然资源部 - // if (this.$refs.pictureUploadAccepting && this.$refs.pictureUploadAccepting.isValid()) { - // this.submitHouseApproveEndNatureOptions(); - // return; - // } - // //乡镇领导部 - // if (this.$refs.pictureUploadAccepting && this.$refs.pictureUploadAccepting.isValid()) { - // this.submitHouseApproveEndBZhenOptions(); - // return; - // } + // //农村农业部 + // if (this.$refs.tHouseApplyEndNongye && this.$refs.tHouseApplyEndNongye.isValid()) { + // this.submitHouseApproveEndNongyeOptions(); + // return; + // } + // //自然资源部 + // if (this.$refs.pictureUploadAccepting && this.$refs.pictureUploadAccepting.isValid()) { + // this.submitHouseApproveEndNatureOptions(); + // return; + // } + // //乡镇领导部 + // if (this.$refs.pictureUploadAccepting && this.$refs.pictureUploadAccepting.isValid()) { + // this.submitHouseApproveEndBZhenOptions(); + // return; + // } - console.log(this.applicationDetail.tHouseApplyEnd); + console.log(this.applicationDetail.tHouseApplyEnd); + } + break; + default: + break; } - break; - default: - break; - } - }, - //村级领导审批现场图片 - submitHouseApproveVillageplanOptions(pass, commentText) { - this.applicationDetail.tHouseApproveVillageOptions.villagePlan = null; - return this.$refs.pictureUploadApplyingTHouseApproveVillage.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApproveVillageOptions.villagePlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villagePlan)) { - return "村级现场拍照不能为空"; - } else { - saveHouseBaseInfo(this.applicationDetail).then((response) => { - this.complete(pass, commentText); - }).catch(resp => { - this.notify("保存失败!", 'danger'); + }, + //村级领导审批现场图片 + submitHouseApproveVillageplanOptions(pass, commentText) { + this.applicationDetail.tHouseApproveVillageOptions.villagePlan = null; + return this.$refs.pictureUploadApplyingTHouseApproveVillage.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); }); - } - }).catch((x) => { - this.notify("村级上传现场照片失败!", 'danger'); - }); - }, - //自然资源部门审批现场图片 - submitHouseApproveNatureplanOptions() { - this.applicationDetail.tHouseApproveNatureOptions.naturePlan = null; - return this.$refs.pictureUploadApplyingTHouseApproveNature.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApproveNatureOptions.naturePlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.naturePlan)) { - return "自然资源部门现场拍照不能为空"; - } - }).catch((x) => { - this.notify("自然资源部门上传现场照片失败!", 'danger'); - }); - }, - //农村农业部门审批现场图片 - submitHouseApproveAgricultureOptions() { - this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan = null; - return this.$refs.pictureUploadApplyingTHouseApproveAgriculture.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan)) { - return "农村农业部现场拍照不能为空"; - } - }).catch((x) => { - this.notify("农村农业部上传现场照片失败!", 'danger'); - }); - }, - //其他部门审批现场图片 - submitHouseApproveOtherOptions() { - this.applicationDetail.tHouseApproveOtherOptions.otherPlan = null; - return this.$refs.pictureUploadApplyingTHouseApproveOther.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApproveOtherOptions.otherPlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.otherPlan)) { - return "其他部门现场拍照不能为空"; - } - }).catch((x) => { - this.notify("其他部门上传现场照片失败!", 'danger'); - }); - }, - //镇级领导审批现场图片 - submitHouseApproveTownOptions() { - this.applicationDetail.tHouseApproveTownOptions.townPlan = null; - return this.$refs.pictureUploadApplyingTHouseApproveTown.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApproveTownOptions.townPlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApproveTownOptions.townPlan)) { - return "镇级领导现场拍照不能为空"; - } - }).catch((x) => { - this.notify("镇级领导上传现场照片失败!", 'danger'); - }); - }, - //验收农业部门审批现场图片 - submitHouseApproveEndNongyeOptions() { - this.applicationDetail.tHouseApplyEnd.nongyePlan = null; - return this.$refs.tHouseApplyEndNongye.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApplyEnd.nongyePlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApplyEnd.nongyePlan)) { - return "农业部门现场拍照不能为空"; - } - }).catch((x) => { - this.notify("农业部门上传现场照片失败!", 'danger'); - }); - }, - //验收自然资源部门审批现场图片 - submitHouseApproveEndNatureOptions() { - this.applicationDetail.tHouseApplyEnd.naturePlan = null; - return this.$refs.tHouseApplyEndNature.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApplyEnd.naturePlan = JSON.stringify(list); - // if(this.checkString(this.applicationDetail.tHouseApplyEnd.naturePlan)){ - // return "自然资源部门现场拍照不能为空"; - // } - }).catch((x) => { - this.notify("自然资源部门上传现场照片失败!", 'danger'); - }); - }, - //验收住建部门审批现场图片 - submitHouseApproveEndBuildingOptions() { - this.applicationDetail.tHouseApplyEnd.buildingPlan = null; - this.$refs.tHouseApplyEndBuilding.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApplyEnd.buildingPlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingPlan)) { - return "住建部门现场拍照不能为空"; - } - }).catch((x) => { - this.notify("住建部门上传现场照片失败!", 'danger'); - }); - }, - //验收镇政府审批现场图片 - submitHouseApproveEndBZhenOptions() { - this.applicationDetail.tHouseApplyEnd.zhenPlan = null; - return this.$refs.tHouseApplyEndZhen.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); - }); - this.applicationDetail.tHouseApplyEnd.zhenPlan = JSON.stringify(list); - if (this.checkString(this.applicationDetail.tHouseApplyEnd.zhenPlan)) { - return "镇政府现场拍照不能为空"; - } - }).catch((x) => { - this.notify("镇政府上传现场照片失败!", 'danger'); - }); - }, - // 带平面图附件上传的镇级申请审批 - submitHouseApproveLocationplanOptions(pass, commentText) { - this.applicationDetail.ydjfsp.zjdzlpmwzt = null; - return this.$refs.pictureUploadApplying.updatePlanFiles().then((x) => { - let list = []; - x.data.forEach((f) => { - let item = { - id: f.id, - fileName: f.fileName, - fileUrl: f.fileUrl, - fileType: f.fileType, - tableId: f.tableId, - tableName: f.tableName, - }; - list.push(item); + this.applicationDetail.tHouseApproveVillageOptions.villagePlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villagePlan)) { + return "村级现场拍照不能为空"; + } else { + saveHouseBaseInfo(this.applicationDetail).then((response) => { + this.complete(pass, commentText); + }).catch(resp => { + this.notify("保存失败!", 'danger'); + }); + } + }).catch((x) => { + this.notify("村级上传现场照片失败!", 'danger'); }); - this.applicationDetail.ydjfsp.zjdzlpmwzt = list[0].fileUrl; - }).catch((x) => { - this.notify("上传宅基地坐落平面位置图失败!", 'danger'); - }); - }, - fileUpdate(val) { - const params = new FormData(); - params.append("tableId", this.applicationDetail.ydjfsp.id); - params.append("tableName", "t_homeapply_ydjfsp"); - params.append("bizPath", "upload"); - params.append("fileType", "0"); - params.append('file', val[0].file); - attach(params).then((resp) => { - this.$set(this.applicationDetail.ydjfsp, 'zjdzlpmwzt', resp.fileUrl); - }); - }, - fileUpdatePmt(val) { - const params = new FormData(); - params.append("tableId", this.applicationDetail.ydjfys.id); - params.append("tableName", "t_homeapply_ydjfsq"); - params.append("bizPath", "upload"); - params.append("fileType", "0"); - params.append('file', val[0].file); - attach(params).then((resp) => { - this.$set(this.applicationDetail.ydjfys, 'jgpmjt', resp.fileUrl); - }); - }, - // 带平面图附件上传的镇级验收审批 - submitHouseApplyEndLocationplanOptions(pass, commentText) { - return this.$refs.pictureUploadAccepting.updatePlanFiles() - .then((x) => { + }, + //自然资源部门审批现场图片 + submitHouseApproveNatureplanOptions() { + this.applicationDetail.tHouseApproveNatureOptions.naturePlan = null; + return this.$refs.pictureUploadApplyingTHouseApproveNature.updatePlanFiles().then((x) => { let list = []; x.data.forEach((f) => { let item = { @@ -4309,992 +4085,1243 @@ }; list.push(item); }); - - this.applicationDetail.tHouseApplyEnd.locationPlan = JSON.stringify(list); + this.applicationDetail.tHouseApproveNatureOptions.naturePlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.naturePlan)) { + return "自然资源部门现场拍照不能为空"; + } }).catch((x) => { - this.notify("上传宅基地坐落平面位置图失败!", 'danger'); - }); - }, - // 审批工具函数(同意/驳回, 意见) - complete(pass, comment) { - if (!this.taskId || !this.auditbatchNo) { - console.error(this.taskId, this.auditbatchNo); - return false; - } - let data = { - taskId: this.taskId, - auditbatchNo: this.auditbatchNo, - pass: pass ? "true" : "false", - remark: comment ? comment : (pass ? '同意' : '驳回'), - }; - request({ - url: "/approval/audit/audit", - method: "post", - data: data, - }).then((response) => { - this.notify("操作成功", 'success'); - this.$router.go(0); - this.goBack(); - }).catch(e => { - this.notify("操作失败!", 'danger'); - }); - return true; - }, - // 请求结果提示工具函数 - notify(message, type) { - Notify.clear(); - Notify({type: type || 'primary', message: message}); - }, - // 当自然资源部门地图绘制被重置时 - onNatureMapDrawReseted() { - this.drawInsert = null; - if (this.applicationDetail.tHouseApproveNatureOptions.theGeom) { - let lastData = JSON.parse(this.applicationDetail.tHouseApproveNatureOptions.theGeom); - if (lastData.hasOwnProperty('coordinates')) // 从后台获取的 - this.drawInsert = lastData.coordinates; - } - }, - // 当验收地图绘制被重置时 - onAcceptanceMapDrawReseted() { - this.drawInsert = null; - if (this.applicationDetail.tHouseApplyEnd.theGeom) { - let lastData = JSON.parse(this.applicationDetail.tHouseApplyEnd.theGeom); - if (lastData.hasOwnProperty('coordinates')) // 从后台获取的 - this.drawInsert = lastData.coordinates; - } - }, - // 打开附件树 - openAttachment() { - this.attachmentVisible = true; - if (this.attachmentActive == this.active) - this.$nextTick(() => { - this.$refs.attachmentDialog.scrollTo(this.active); + this.notify("自然资源部门上传现场照片失败!", 'danger'); }); - }, - // 选择步骤页面 - selectTab(index) { - if (index <= this.active) { - this.selectedTabName = index; - } - //console.log(index, this.active,this.selectedTabName); - }, - // 保存开工(是否提交) - startProposerApply(submit) { - console.info(submit); - let msg = this.validateStartFormBase(); - - if (msg) { - this.notify(msg, 'danger'); - return; - } - this.$set(this.applicationDetail, 'applyUserId', this.sysFarmer.id); - saveHomeBaseInfo(this.applicationDetail).then((resp) => { - if(submit) - { - submitStart(this.applicationDetail.id).then(resp => { - this.notify("操作成功", 'success'); - this.goBack(); - }).catch((e) => { - this.notify("操作失败!", 'danger'); + }, + //农村农业部门审批现场图片 + submitHouseApproveAgricultureOptions() { + this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan = null; + return this.$refs.pictureUploadApplyingTHouseApproveAgriculture.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.agriculturePlan)) { + return "农村农业部现场拍照不能为空"; + } + }).catch((x) => { + this.notify("农村农业部上传现场照片失败!", 'danger'); + }); + }, + //其他部门审批现场图片 + submitHouseApproveOtherOptions() { + this.applicationDetail.tHouseApproveOtherOptions.otherPlan = null; + return this.$refs.pictureUploadApplyingTHouseApproveOther.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApproveOtherOptions.otherPlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.otherPlan)) { + return "其他部门现场拍照不能为空"; + } + }).catch((x) => { + this.notify("其他部门上传现场照片失败!", 'danger'); + }); + }, + //镇级领导审批现场图片 + submitHouseApproveTownOptions() { + this.applicationDetail.tHouseApproveTownOptions.townPlan = null; + return this.$refs.pictureUploadApplyingTHouseApproveTown.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); }); + this.applicationDetail.tHouseApproveTownOptions.townPlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApproveTownOptions.townPlan)) { + return "镇级领导现场拍照不能为空"; + } + }).catch((x) => { + this.notify("镇级领导上传现场照片失败!", 'danger'); + }); + }, + //验收农业部门审批现场图片 + submitHouseApproveEndNongyeOptions() { + this.applicationDetail.tHouseApplyEnd.nongyePlan = null; + return this.$refs.tHouseApplyEndNongye.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApplyEnd.nongyePlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApplyEnd.nongyePlan)) { + return "农业部门现场拍照不能为空"; + } + }).catch((x) => { + this.notify("农业部门上传现场照片失败!", 'danger'); + }); + }, + //验收自然资源部门审批现场图片 + submitHouseApproveEndNatureOptions() { + this.applicationDetail.tHouseApplyEnd.naturePlan = null; + return this.$refs.tHouseApplyEndNature.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApplyEnd.naturePlan = JSON.stringify(list); + // if(this.checkString(this.applicationDetail.tHouseApplyEnd.naturePlan)){ + // return "自然资源部门现场拍照不能为空"; + // } + }).catch((x) => { + this.notify("自然资源部门上传现场照片失败!", 'danger'); + }); + }, + //验收住建部门审批现场图片 + submitHouseApproveEndBuildingOptions() { + this.applicationDetail.tHouseApplyEnd.buildingPlan = null; + this.$refs.tHouseApplyEndBuilding.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApplyEnd.buildingPlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingPlan)) { + return "住建部门现场拍照不能为空"; + } + }).catch((x) => { + this.notify("住建部门上传现场照片失败!", 'danger'); + }); + }, + //验收镇政府审批现场图片 + submitHouseApproveEndBZhenOptions() { + this.applicationDetail.tHouseApplyEnd.zhenPlan = null; + return this.$refs.tHouseApplyEndZhen.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.tHouseApplyEnd.zhenPlan = JSON.stringify(list); + if (this.checkString(this.applicationDetail.tHouseApplyEnd.zhenPlan)) { + return "镇政府现场拍照不能为空"; + } + }).catch((x) => { + this.notify("镇政府上传现场照片失败!", 'danger'); + }); + }, + // 带平面图附件上传的镇级申请审批 + submitHouseApproveLocationplanOptions(pass, commentText) { + this.applicationDetail.ydjfsp.zjdzlpmwzt = null; + return this.$refs.pictureUploadApplying.updatePlanFiles().then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + this.applicationDetail.ydjfsp.zjdzlpmwzt = list[0].fileUrl; + }).catch((x) => { + this.notify("上传宅基地坐落平面位置图失败!", 'danger'); + }); + }, + fileUpdate(val) { + const params = new FormData(); + params.append("tableId", this.applicationDetail.ydjfsp.id); + params.append("tableName", "t_homeapply_ydjfsp"); + params.append("bizPath", "upload"); + params.append("fileType", "0"); + params.append('file', val[0].file); + attach(params).then((resp) => { + this.$set(this.applicationDetail.ydjfsp, 'zjdzlpmwzt', resp.fileUrl); + }); + }, + fileUpdatePmt(val) { + const params = new FormData(); + params.append("tableId", this.applicationDetail.ydjfys.id); + params.append("tableName", "t_homeapply_ydjfsq"); + params.append("bizPath", "upload"); + params.append("fileType", "0"); + params.append('file', val[0].file); + attach(params).then((resp) => { + this.$set(this.applicationDetail.ydjfys, 'jgpmjt', resp.fileUrl); + }); + }, + // 带平面图附件上传的镇级验收审批 + submitHouseApplyEndLocationplanOptions(pass, commentText) { + return this.$refs.pictureUploadAccepting.updatePlanFiles() + .then((x) => { + let list = []; + x.data.forEach((f) => { + let item = { + id: f.id, + fileName: f.fileName, + fileUrl: f.fileUrl, + fileType: f.fileType, + tableId: f.tableId, + tableName: f.tableName, + }; + list.push(item); + }); + + this.applicationDetail.tHouseApplyEnd.locationPlan = JSON.stringify(list); + }).catch((x) => { + this.notify("上传宅基地坐落平面位置图失败!", 'danger'); + }); + }, + // 审批工具函数(同意/驳回, 意见) + complete(pass, comment) { + if (!this.taskId || !this.auditbatchNo) { + console.error(this.taskId, this.auditbatchNo); + return false; } - else - { - this.notify("保存成功", 'success'); + let data = { + taskId: this.taskId, + auditbatchNo: this.auditbatchNo, + pass: pass ? "true" : "false", + remark: comment ? comment : (pass ? '同意' : '驳回'), + }; + request({ + url: "/approval/audit/audit", + method: "post", + data: data, + }).then((response) => { + this.notify("操作成功", 'success'); + this.$router.go(0); this.goBack(); + }).catch(e => { + this.notify("操作失败!", 'danger'); + }); + return true; + }, + // 请求结果提示工具函数 + notify(message, type) { + Notify.clear(); + Notify({type: type || 'primary', message: message}); + }, + // 当自然资源部门地图绘制被重置时 + onNatureMapDrawReseted() { + this.drawInsert = null; + if (this.applicationDetail.tHouseApproveNatureOptions.theGeom) { + let lastData = JSON.parse(this.applicationDetail.tHouseApproveNatureOptions.theGeom); + if (lastData.hasOwnProperty('coordinates')) // 从后台获取的 + this.drawInsert = lastData.coordinates; } - }).catch((e) => { - this.notify('保存失败', 'danger'); - }); - }, - // 保存验收(是否提交) - endProposerApply(submit) { - // this.$refs.form.validate().then(() => { - let msg = this.validateAcceptingFormBase(); - if (msg) { - this.notify(msg, 'danger'); - return; - } - // if (this.drawInsert != null) { - // this.applicationDetail.tHouseApplyEnd.theGeom = JSON.stringify(this.drawInsert); - // } - // else { - // if(this.applicationDetail.tHouseApplyEnd.theGeom == null){ - // this.applicationDetail.tHouseApplyEnd.theGeom = this.convertGeom(this.applicationDetail.tHouseApproveNatureOptions.theGeom); - // } - // } - console.info(this.applicationDetail); - saveHomeBaseInfo(this.applicationDetail).then(resp => { - if(submit) - { - submitCheck(this.applicationDetail.id).then(resp => { - this.notify("操作成功", 'success'); + }, + // 当验收地图绘制被重置时 + onAcceptanceMapDrawReseted() { + this.drawInsert = null; + if (this.applicationDetail.tHouseApplyEnd.theGeom) { + let lastData = JSON.parse(this.applicationDetail.tHouseApplyEnd.theGeom); + if (lastData.hasOwnProperty('coordinates')) // 从后台获取的 + this.drawInsert = lastData.coordinates; + } + }, + // 打开附件树 + openAttachment() { + this.attachmentVisible = true; + if (this.attachmentActive == this.active) + this.$nextTick(() => { + this.$refs.attachmentDialog.scrollTo(this.active); + }); + }, + // 选择步骤页面 + selectTab(index) { + if (index <= this.active) { + this.selectedTabName = index; + } + //console.log(index, this.active,this.selectedTabName); + }, + // 保存开工(是否提交) + startProposerApply(submit) { + console.info(submit); + let msg = this.validateStartFormBase(); + + if (msg) { + this.notify(msg, 'danger'); + return; + } + this.$set(this.applicationDetail, 'applyUserId', this.sysFarmer.id); + saveHomeBaseInfo(this.applicationDetail).then((resp) => { + if (submit) { + submitStart(this.applicationDetail.id).then(resp => { + this.notify("操作成功", 'success'); + this.goBack(); + }).catch((e) => { + this.notify("操作失败!", 'danger'); + }); + } else { + this.notify("保存成功", 'success'); this.goBack(); - }).catch(err => { - this.notify("操作失败!", 'danger'); + } + }).catch((e) => { + this.notify('保存失败', 'danger'); + }); + }, + // 保存验收(是否提交) + endProposerApply(submit) { + // this.$refs.form.validate().then(() => { + let msg = this.validateAcceptingFormBase(); + if (msg) { + this.notify(msg, 'danger'); + return; + } + // if (this.drawInsert != null) { + // this.applicationDetail.tHouseApplyEnd.theGeom = JSON.stringify(this.drawInsert); + // } + // else { + // if(this.applicationDetail.tHouseApplyEnd.theGeom == null){ + // this.applicationDetail.tHouseApplyEnd.theGeom = this.convertGeom(this.applicationDetail.tHouseApproveNatureOptions.theGeom); + // } + // } + console.info(this.applicationDetail); + saveHomeBaseInfo(this.applicationDetail).then(resp => { + if (submit) { + submitCheck(this.applicationDetail.id).then(resp => { + this.notify("操作成功", 'success'); + this.goBack(); + }).catch(err => { + this.notify("操作失败!", 'danger'); + }); + } else { + this.notify("保存成功", 'success'); + this.goBack(); + } + }).catch(err => { + this.notify('保存失败', 'danger'); + }); + // }).catch(e => { + // let msg = this.validateAcceptingFormBase(); + // if (msg) { + // this.notify(msg, 'danger'); + // return; + // } + // }); + }, + // 获取登录人位置坐标 + getLandCoord(func) { + if (func + && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== '' + && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') { + this.$nextTick(() => { + func(this.tGeoOrganizationLng, this.tGeoOrganizationLat); + }) + } else { + console.info(this.deptId); + getQueryLand(this.deptId).then((response) => { + if (response.code == 200) { + let InsertCode = response.data; + this.form.orgCode = InsertCode.orgCode; + this.tGeoOrganizationLat = InsertCode.lat; + this.tGeoOrganizationLng = InsertCode.lng; + if (func) { + func(this.tGeoOrganizationLng, this.tGeoOrganizationLat); + } + } }); } - else - { - this.notify("保存成功", 'success'); - this.goBack(); + }, + validateBaseApplyFormBase() { + + if (this.checkString(this.applicationDetail.sqhhzxm)) { + return "申请户主姓名不能为空"; + } + if (this.checkString(this.applicationDetail.sqhhzxb)) { + return "户主性别不能为空"; + } + if (this.checkString(this.applicationDetail.sqhhznl)) { + return "户主年龄不能为空"; + } + if (this.checkString(this.applicationDetail.sqhhzlxdh, /(^\d{7}(\d{4})?$)/)) { + return "请填写有效的联系电话"; + } + if (this.checkString(this.applicationDetail.sqhhzsfzh, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) { + return "请填写有效的身份证号"; + } + if (this.checkString(this.applicationDetail.sqhhzhkszd)) { + return "户口所在地不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyProposer.familyAddress)) { + // return "家庭住址不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyProposer.members)) { + // return "家庭人口数不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyProposer.existHomestead)) { + // return "是否已有宅基地不能为空"; + // } + + for (let i in this.applicationDetail.sqrjtcyList) { + let v = this.applicationDetail.sqrjtcyList[i]; + console.info(v); + if (this.checkString(v.xm)) { + return "成员姓名不能为空"; + } + if (this.checkString(v.nl)) { + return "年龄不能为空"; + } + if (this.checkString(v.yhzgx)) { + return "与户主关系不能为空"; + } + if (this.checkString(v.sfzh, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) { + return "请填写有效的家庭成员身份证"; + } + if (this.checkString(v.hkszd)) { + return "户口所在地不能为空"; + } + } + + if (this.applicationDetail.sfyyzjd === 'Y') { + if (this.checkString(this.applicationDetail.xzjdmj)) { + return "宅基地面积不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.landPerArea)) { + // return "人均宅基地面积不能为空"; + // } + if (this.checkString(this.applicationDetail.xjzmj)) { + return "建筑面积不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.buildingPerArea)) { + // return "人均建筑面积不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.landCertificateNo)) { + // return "不动产单元号不能为空"; + // } + if (this.checkString(this.applicationDetail.xzjdczqk)) { + return "处置情况不能为空"; + } + if (this.applicationDetail.xzjdczqk == '1') { + if (this.checkString(this.applicationDetail.xzjdblmj)) { + return "保留面积不能为空"; + } + } else if (this.applicationDetail.xzjdczqk == '3') { + if (this.checkString(this.applicationDetail.xzjdzqtqk)) { + return "处置情况不能为空"; + } + } + } + + if (this.checkString(this.applicationDetail.nsqzjdmj)) { + return "宅基地面积不能为空"; + } + if (this.checkString(this.applicationDetail.nsqfjzdmj)) { + return "房基占地面积不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjddz)) { + return "地址不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjdszd)) { + return "东至不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjdszx)) { + return "西至不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjdszn)) { + return "南至不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjdszb)) { + return "北至不能为空"; + } + if (this.checkString(this.applicationDetail.zfjzmj)) { + return "住房建筑面积不能为空"; + } + if (this.checkString(this.applicationDetail.jzcs)) { + return "建筑层数不能为空"; + } + if (this.checkString(this.applicationDetail.jzgd)) { + return "建筑高度不能为空"; + } + if (this.checkString(this.applicationDetail.sfzqxlqlryj)) { + return "征求相邻权利人意见不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.housingStructure)) { + // return "房屋构造不能为空"; + // } + if (this.checkString(this.applicationDetail.jflx)) { + return "建房类型不能为空"; + } + if (this.checkString(this.applicationDetail.nsqzjddldm)) { + return "土地类型不能为空"; + } + // if(this.applicationDetail.tHouseApplyProposedSituation.geographicType == '10') + // { + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.constructionLandArea)) { + // return "建设用地面积不能为空"; + // } + // } + // else if(this.applicationDetail.tHouseApplyProposedSituation.geographicType == '20') + // { + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.unusedLandArea)) { + // return "未利用地不能为空"; + // } + // } + // else + // { + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.agriculturalLandArea)) { + // return "农用地不能为空"; + // } + // } + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.designPaper)) { + // return "设计图纸不能为空"; + // } + // if(this.applicationDetail.tHouseApplyProposedSituation.designPaper == '2') + // { + // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.houseTypeId)) { + // return "房屋户型不能为空"; + // } + // } + if (this.checkString(this.applicationDetail.sqly)) { + return "申请理由不能为空"; + } + if (this.fileTypeList.indexOf("1") === -1) { + return "请上传申请会议纪要"; + } else if (this.fileTypeList.indexOf("2") === -1) { + return "请上传申请承诺书"; + } else if (this.fileTypeList.indexOf("3") === -1) { + return "请上传身份材料"; + } + return false; + }, + onConfirmZjdxx(val) { + let _this = this; + this.zjdzdxxList.map(function (item) { + if (item.zjddm === val) { + _this.applicationDetail.xzjdmj = item.zdmj; //宅基地面积 + _this.applicationDetail.xjzmj = item.scjzmj; + _this.applicationDetail.qszsh = item.zsh; + _this.$set(_this.zjdzdxxDetailed, 'zdszd', item.zdszd); + _this.$set(_this.zjdzdxxDetailed, 'zdszn', item.zdszn); + _this.$set(_this.zjdzdxxDetailed, 'zdszx', item.zdszx); + _this.$set(_this.zjdzdxxDetailed, 'zdszb', item.zdszb); + } + }); + this.showZjdzk = false; + }, + validateNatureForm() { + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.landArea)) { + // return "用地面积不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.rightsType)) { + // return "土地权属不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.east)) { + // return "北至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.west)) { + // return "西至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.south)) { + // return "南至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.north)) { + // return "北至不能为空"; + // } + if (this.checkString(this.applicationDetail.ydjfsp.zrzybmscyj)) { + return "说明不能为空"; + } else if (this.checkString(this.applicationDetail.ydjfsp.zrzybmscrxm)) { + return "自然资源签名不能为空"; + } + return false; + }, + validateAgricultureForm(pass) { + // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isMembership)) { + // return "成员资格审查不能为空"; + // } + // + // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isOnehouse)) { + // return "一户一宅情况不能为空"; + // } + // + // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isReviewmaterials)) { + // return "村委会审查材料不能为空"; + // } + if (this.checkString(this.applicationDetail.ydjfsp.nyncbmscyj)) { + return "说明不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfsp.nyncbmscrxm)) { + return "农村农业部门签名不能为空"; + } + // if (this.checkString(this.applicationDetail.ydjfsp.theGeomPoint)) { + // return "农村农业部门现场定位不能为空"; + // } + + // 通过时检查打勾, 农业部门 + if (pass) { + // if(this.applicationDetail.tHouseApproveAgricultureOptions.isMembership != '1') + // { + // return "同意申请时需通过成员资格审查"; + // } + // if(this.applicationDetail.tHouseApproveAgricultureOptions.isOnehouse != '1') + // { + // return "同意申请时需符合一户一宅情况"; + // } + // if(this.applicationDetail.tHouseApproveAgricultureOptions.isReviewmaterials != '1') + // { + // return "同意申请时需齐全村委会审查材料"; + // } + } + return false; + }, + validateBuildingForm() { + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingType)) { + // return "建筑类型不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingArea)) { + // return "建筑面积不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingFloors)) { + // return "建筑层数不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingHight)) { + // return "建筑高度不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingLandArea)) { + // return "建筑占地面积不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions)) { + // return "图纸类型不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.east)) { + // return "东至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.west)) { + // return "西至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.south)) { + // return "南至不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.north)) { + // return "北至不能为空"; + // } + if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscyj)) { + return "说明不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscrxm)) { + return "住建部门签名不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint)) { + // return "住建部门现场定位不能为空"; + // } + return false; + }, + validateTownForm() { + if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscyj)) { + return "镇政府审批意见不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfsp.xzzfshpzrxm)) { + return "镇政府审批签字不能为空"; } - }).catch(err => { - this.notify('保存失败', 'danger'); - }); - // }).catch(e => { - // let msg = this.validateAcceptingFormBase(); - // if (msg) { - // this.notify(msg, 'danger'); - // return; - // } - // }); - }, - // 获取登录人位置坐标 - getLandCoord(func) { - if (func - && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== '' - && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') { - this.$nextTick(() => { - func(this.tGeoOrganizationLng, this.tGeoOrganizationLat); - }) - } else { - console.info(this.deptId); - getQueryLand(this.deptId).then((response) => { - if (response.code == 200) { - let InsertCode = response.data; - this.form.orgCode = InsertCode.orgCode; - this.tGeoOrganizationLat = InsertCode.lat; - this.tGeoOrganizationLng = InsertCode.lng; - if (func) { - func(this.tGeoOrganizationLng, this.tGeoOrganizationLat); - } - } - }); - } - }, - validateBaseApplyFormBase() { - if (this.checkString(this.applicationDetail.sqhhzxm)) { - return "申请户主姓名不能为空"; - } - if (this.checkString(this.applicationDetail.sqhhzxb)) { - return "户主性别不能为空"; - } - if (this.checkString(this.applicationDetail.sqhhznl)) { - return "户主年龄不能为空"; - } - if (this.checkString(this.applicationDetail.sqhhzlxdh, /(^\d{7}(\d{4})?$)/)) { - return "请填写有效的联系电话"; - } - if (this.checkString(this.applicationDetail.sqhhzsfzh, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) { - return "请填写有效的身份证号"; - } - if (this.checkString(this.applicationDetail.sqhhzhkszd)) { - return "户口所在地不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApplyProposer.familyAddress)) { - // return "家庭住址不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyProposer.members)) { - // return "家庭人口数不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyProposer.existHomestead)) { - // return "是否已有宅基地不能为空"; - // } - - for (let i in this.applicationDetail.sqrjtcyList) { - let v = this.applicationDetail.sqrjtcyList[i]; - console.info(v); - if (this.checkString(v.xm)) { - return "成员姓名不能为空"; + if (this.fileTypeList.indexOf("4") === -1) { + return "请上传归档文件"; } - if (this.checkString(v.nl)) { - return "年龄不能为空"; + // if (this.checkString(this.applicationDetail.tHouseApproveTownOptions.theGeomPoint)) { + // return "镇政府审批现场定位不能为空"; + // } + return false; + }, + validateAcceptingFormBase() { + + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.houseCertificateNo)) { + // return "权属证书号(不动产)不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.landCertificateNo)) { + // return "权属证书号(宅基地)不能为空"; + // } + if (this.checkString(this.applicationDetail.ydjfys.pjcg)) { + return "批建高度不能为空"; } - if (this.checkString(v.yhzgx)) { - return "与户主关系不能为空"; + if (this.checkString(this.applicationDetail.ydjfys.pjcs)) { + return "批建层数不能为空"; } - if (this.checkString(v.sfzh, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) { - return "请填写有效的家庭成员身份证"; + if (this.checkString(this.applicationDetail.ydjfys.jggd)) { + return "竣工高度不能为空"; } - if (this.checkString(v.hkszd)) { - return "户口所在地不能为空"; + if (this.checkString(this.applicationDetail.ydjfys.jgcs)) { + return "竣工层数不能为空"; } - } - - if (this.applicationDetail.sfyyzjd === 'Y') { - if (this.checkString(this.applicationDetail.xzjdmj)) { - return "宅基地面积不能为空"; + if (this.checkString(this.applicationDetail.ydjfys.pzzjdmj)) { + return "批准宅基地面积不能为空"; } - // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.landPerArea)) { - // return "人均宅基地面积不能为空"; - // } - if (this.checkString(this.applicationDetail.xjzmj)) { - return "建筑面积不能为空"; + if (this.checkString(this.applicationDetail.ydjfys.syzjdmj)) { + return "实用宅基地面积不能为空"; } - // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.buildingPerArea)) { - // return "人均建筑面积不能为空"; + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingOtherArea)) { + // return "配套附属设施建筑面积不能为空"; // } - // if (this.checkString(this.applicationDetail.tHouseApplyCurrentSituation.landCertificateNo)) { - // return "不动产单元号不能为空"; + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.designPaper)) { + // return "建筑风貌不能为空"; // } - if (this.checkString(this.applicationDetail.xzjdczqk)) { - return "处置情况不能为空"; + if (this.checkString(this.applicationDetail.ydjfys.cjhtzjdqk)) { + return "旧宅基地退还情况不能为空"; } - if (this.applicationDetail.xzjdczqk == '1') { - if (this.checkString(this.applicationDetail.xzjdblmj)) { - return "保留面积不能为空"; - } - } else if (this.applicationDetail.xzjdczqk == '3') { - if (this.checkString(this.applicationDetail.xzjdzqtqk)) { - return "处置情况不能为空"; - } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.houseCost)) { + // return "住房造价不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.facadeColor)) { + // return "外立面颜色不能为空"; + // } + if (this.checkString(this.applicationDetail.ydjfys.pzfjzdmj)) { + return "批准房基占地面积不能为空"; } - } - - if (this.checkString(this.applicationDetail.nsqzjdmj)) { - return "宅基地面积不能为空"; - } - if (this.checkString(this.applicationDetail.nsqfjzdmj)) { - return "房基占地面积不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjddz)) { - return "地址不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjdszd)) { - return "东至不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjdszx)) { - return "西至不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjdszn)) { - return "南至不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjdszb)) { - return "北至不能为空"; - } - if (this.checkString(this.applicationDetail.zfjzmj)) { - return "住房建筑面积不能为空"; - } - if (this.checkString(this.applicationDetail.jzcs)) { - return "建筑层数不能为空"; - } - if (this.checkString(this.applicationDetail.jzgd)) { - return "建筑高度不能为空"; - } - if (this.checkString(this.applicationDetail.sfzqxlqlryj)) { - return "征求相邻权利人意见不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.housingStructure)) { - // return "房屋构造不能为空"; - // } - if (this.checkString(this.applicationDetail.jflx)) { - return "建房类型不能为空"; - } - if (this.checkString(this.applicationDetail.nsqzjddldm)) { - return "土地类型不能为空"; - } - // if(this.applicationDetail.tHouseApplyProposedSituation.geographicType == '10') - // { - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.constructionLandArea)) { - // return "建设用地面积不能为空"; - // } - // } - // else if(this.applicationDetail.tHouseApplyProposedSituation.geographicType == '20') - // { - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.unusedLandArea)) { - // return "未利用地不能为空"; - // } - // } - // else - // { - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.agriculturalLandArea)) { - // return "农用地不能为空"; - // } - // } - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.designPaper)) { - // return "设计图纸不能为空"; - // } - // if(this.applicationDetail.tHouseApplyProposedSituation.designPaper == '2') - // { - // if (this.checkString(this.applicationDetail.tHouseApplyProposedSituation.houseTypeId)) { - // return "房屋户型不能为空"; - // } - // } - if (this.checkString(this.applicationDetail.sqly)) { - return "申请理由不能为空"; - } - - return false; - }, - onConfirmZjdxx(val) { - let _this = this; - this.zjdzdxxList.map(function (item) { - if (item.zjddm === val) { - _this.applicationDetail.xzjdmj = item.zdmj; //宅基地面积 - _this.applicationDetail.xjzmj = item.scjzmj; - _this.applicationDetail.qszsh = item.zsh; - _this.$set(_this.zjdzdxxDetailed, 'zdszd', item.zdszd); - _this.$set(_this.zjdzdxxDetailed, 'zdszn', item.zdszn); - _this.$set(_this.zjdzdxxDetailed, 'zdszx', item.zdszx); - _this.$set(_this.zjdzdxxDetailed, 'zdszb', item.zdszb); + if (this.checkString(this.applicationDetail.ydjfys.sjfjzdmj)) { + return "实际房基占地面积不能为空"; } - }); - this.showZjdzk = false; - }, - validateNatureForm() { - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.landArea)) { - // return "用地面积不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.rightsType)) { - // return "土地权属不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.east)) { - // return "北至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.west)) { - // return "西至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.south)) { - // return "南至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveNatureOptions.north)) { - // return "北至不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfsp.zrzybmscyj)) { - return "说明不能为空"; - } else if (this.checkString(this.applicationDetail.ydjfsp.zrzybmscrxm)) { - return "自然资源签名不能为空"; - } - return false; - }, - validateAgricultureForm(pass) { - // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isMembership)) { - // return "成员资格审查不能为空"; - // } - // - // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isOnehouse)) { - // return "一户一宅情况不能为空"; - // } - // - // if (this.checkString(this.applicationDetail.tHouseApproveAgricultureOptions.isReviewmaterials)) { - // return "村委会审查材料不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfsp.nyncbmscyj)) { - return "说明不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfsp.nyncbmscrxm)) { - return "农村农业部门签名不能为空"; - } - // if (this.checkString(this.applicationDetail.ydjfsp.theGeomPoint)) { - // return "农村农业部门现场定位不能为空"; - // } - - // 通过时检查打勾, 农业部门 - if (pass) { - // if(this.applicationDetail.tHouseApproveAgricultureOptions.isMembership != '1') - // { - // return "同意申请时需通过成员资格审查"; + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isEnjoySubsidy)) { + // return "是否享受住房建设补助政策不能为空"; // } - // if(this.applicationDetail.tHouseApproveAgricultureOptions.isOnehouse != '1') - // { - // return "同意申请时需符合一户一宅情况"; + // if (this.applicationDetail.tHouseApplyEnd.isEnjoySubsidy === 'Y' && this.checkString(this.applicationDetail.tHouseApplyEnd.enjoySubsidyContent)) { + // return "享受住房建设补助政策不能为空"; // } - // if(this.applicationDetail.tHouseApproveAgricultureOptions.isReviewmaterials != '1') + if (this.fileTypeList.indexOf("9") === -1) { + return "验收会议纪要"; + } else if (this.fileTypeList.indexOf("10") === -1) { + return "验收保证书"; + } + return false; + }, + validateAcceptingFormTown(pass, role) { + // + // if(0) // { - // return "同意申请时需齐全村委会审查材料"; + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isProjectFinished)) { + // return "是否已完成工程设计和合同约定的各项内容不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isQualifiedQuality)) { + // return "承揽人对完工住房质量自查是否合格不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.hasBuildingRecord)) { + // return "是否有施工记录资料不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isSignWarranty)) { + // return "建房村民和承揽人是否已经共同签署农村住房质量保修书不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isHandleProblem)) { + // return "住房城乡建设行政主管部门或乡(镇)人民政府责令整改的问题是否全部整改完毕不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isDesignPaperSame)) { + // return "建筑风貌是否与设计图基本一致不能为空"; + // } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isOtherAcceptanceFinished)) { + // return "法律、法规规定的其他验收条件完成情况不能为空"; + // } // } - } - return false; - }, - validateBuildingForm() { - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingType)) { - // return "建筑类型不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingArea)) { - // return "建筑面积不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingFloors)) { - // return "建筑层数不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingHight)) { - // return "建筑高度不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.buildingLandArea)) { - // return "建筑占地面积不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions)) { - // return "图纸类型不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.east)) { - // return "东至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.west)) { - // return "西至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.south)) { - // return "南至不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.north)) { - // return "北至不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscyj)) { - return "说明不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscrxm)) { - return "住建部门签名不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint)) { - // return "住建部门现场定位不能为空"; - // } - return false; - }, - validateTownForm() { - if (this.checkString(this.applicationDetail.ydjfsp.zfcxjsbmscyj)) { - return "镇政府审批意见不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfsp.xzzfshpzrxm)) { - return "镇政府审批签字不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApproveTownOptions.theGeomPoint)) { - // return "镇政府审批现场定位不能为空"; - // } - return false; - }, - validateAcceptingFormBase() { - - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.houseCertificateNo)) { - // return "权属证书号(不动产)不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.landCertificateNo)) { - // return "权属证书号(宅基地)不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfys.pjcg)) { - return "批建高度不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.pjcs)) { - return "批建层数不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.jggd)) { - return "竣工高度不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.jgcs)) { - return "竣工层数不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.pzzjdmj)) { - return "批准宅基地面积不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.syzjdmj)) { - return "实用宅基地面积不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingOtherArea)) { - // return "配套附属设施建筑面积不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.designPaper)) { - // return "建筑风貌不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfys.cjhtzjdqk)) { - return "旧宅基地退还情况不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.houseCost)) { - // return "住房造价不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.facadeColor)) { - // return "外立面颜色不能为空"; - // } - if (this.checkString(this.applicationDetail.ydjfys.pzfjzdmj)) { - return "批准房基占地面积不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfys.sjfjzdmj)) { - return "实际房基占地面积不能为空"; - } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isEnjoySubsidy)) { - // return "是否享受住房建设补助政策不能为空"; - // } - // if (this.applicationDetail.tHouseApplyEnd.isEnjoySubsidy === 'Y' && this.checkString(this.applicationDetail.tHouseApplyEnd.enjoySubsidyContent)) { - // return "享受住房建设补助政策不能为空"; - // } - - return false; - }, - validateAcceptingFormTown(pass, role) { - // - // if(0) - // { - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isProjectFinished)) { - // return "是否已完成工程设计和合同约定的各项内容不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isQualifiedQuality)) { - // return "承揽人对完工住房质量自查是否合格不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.hasBuildingRecord)) { - // return "是否有施工记录资料不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isSignWarranty)) { - // return "建房村民和承揽人是否已经共同签署农村住房质量保修书不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isHandleProblem)) { - // return "住房城乡建设行政主管部门或乡(镇)人民政府责令整改的问题是否全部整改完毕不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isDesignPaperSame)) { - // return "建筑风貌是否与设计图基本一致不能为空"; - // } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.isOtherAcceptanceFinished)) { - // return "法律、法规规定的其他验收条件完成情况不能为空"; - // } - // } - - if (!role || role === 'agriculture') { - if (this.checkString(this.applicationDetail.ydjfys.nyncbmysyj)) { - return "乡镇农业农村部门意见不能为空"; + + if (!role || role === 'agriculture') { + if (this.checkString(this.applicationDetail.ydjfys.nyncbmysyj)) { + return "乡镇农业农村部门意见不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.nyncbmysjbrxm)) { + return "乡镇农业农村部门经办人不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.nyncbmyssj)) { + return "乡镇农业农村部门经办时间不能为空"; + } + + } + if (!role || role === 'nature_resource') { + if (this.checkString(this.applicationDetail.ydjfys.zrzybmysyj)) { + return "乡镇自然资源部门意见不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.zrzybmysjbrxm)) { + return "乡镇自然资源部门经办人不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.zrzybmyssj)) { + return "乡镇自然资源部门经办时间不能为空"; + } } - if (this.checkString(this.applicationDetail.ydjfys.nyncbmysjbrxm)) { - return "乡镇农业农村部门经办人不能为空"; + if (0) { + if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmysyj)) { + return "乡镇住建部门意见不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmysjbrxm)) { + return "乡镇住建部门验收负责人不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmyssj)) { + return "乡镇住建部门验收时间不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingGeom)) { + // return "住建部门现场定位不能为空"; + // } + // if(this.$refs.tHouseApplyEndBuilding && this.$refs.tHouseApplyEndBuilding.isValid()) { + // this.submitHouseApproveEndBuildingOptions(); + // } else { + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingPlan)) { + // return "住建部门现场拍照不能为空"; + // } + // } } - if (this.checkString(this.applicationDetail.ydjfys.nyncbmyssj)) { - return "乡镇农业农村部门经办时间不能为空"; + if (!role) { + if (this.checkString(this.applicationDetail.ydjfys.jgpmjtjbr)) { + return "竣工平面简图经办人不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.xzzfysyj)) { + return "乡镇政府验收意见不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.xzzfysjbrxm)) { + return "乡镇政府验收负责人不能为空"; + } + if (this.checkString(this.applicationDetail.ydjfys.xzzfyssj)) { + return "乡镇政府验收时间不能为空"; + } + // if (this.checkString(this.applicationDetail.tHouseApplyEnd.zhenGeom)) { + // return "乡镇政府现场定位不能为空"; + // } + } - } - if (!role || role === 'nature_resource') { - if (this.checkString(this.applicationDetail.ydjfys.zrzybmysyj)) { - return "乡镇自然资源部门意见不能为空"; + // 通过时检查打勾, 农业部门 + if (pass) { + if (this.fileTypeList.indexOf("11") === -1) { + return "请上传归档文件"; + } + // if(this.applicationDetail.tHouseApplyEnd.isProjectFinished != 'Y') + // { + // return "同意验收时需已完成工程设计和合同约定的各项内容"; + // } + // if(this.applicationDetail.tHouseApplyEnd.isQualifiedQuality != 'Y') + // { + // return "同意验收时需承揽人对完工住房质量自查合格"; + // } + // if(this.applicationDetail.tHouseApplyEnd.hasBuildingRecord != 'Y') + // { + // return "同意验收时需有施工记录资料"; + // } + // if(this.applicationDetail.tHouseApplyEnd.isSignWarranty != 'Y') + // { + // return "同意验收时需建房村民和承揽人已经共同签署农村住房质量保修书"; + // } + // if(this.applicationDetail.tHouseApplyEnd.isHandleProblem != 'Y') + // { + // return "同意验收时需住房城乡建设行政主管部门或乡(镇)人民政府责令整改的问题全部整改完毕"; + // } + // if(this.applicationDetail.tHouseApplyEnd.isDesignPaperSame != 'Y') + // { + // return "同意验收时需建筑风貌是否与设计图基本一致"; + // } + // if(this.applicationDetail.tHouseApplyEnd.isOtherAcceptanceFinished != 'Y') + // { + // return "同意验收时需法律、法规规定的其他验收条件完成情况"; + // } } - if (this.checkString(this.applicationDetail.ydjfys.zrzybmysjbrxm)) { - return "乡镇自然资源部门经办人不能为空"; + + return false; + }, + onConfirmTytz(val) { + this.$set(this.applicationDetail, 'tyhxt', val.id); + this.tytzName = val.name; + this.showTyt = false; + }, + validateStartFormBase() { + if (this.checkString(this.applicationDetail.ydjfkg.kgrq)) { + return "计划开工时间不能为空"; } - if (this.checkString(this.applicationDetail.ydjfys.zrzybmyssj)) { - return "乡镇自然资源部门经办时间不能为空"; + if (this.checkString(this.applicationDetail.ydjfkg.jgrq)) { + return "计划竣工时间不能为空"; } - } - if (0) { - if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmysyj)) { - return "乡镇住建部门意见不能为空"; + if (this.fileTypeList.indexOf("5") === -1) { + return "请上传开工证书"; + } else if (this.fileTypeList.indexOf("6") === -1) { + return "请上传开工"; } - if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmysjbrxm)) { - return "乡镇住建部门验收负责人不能为空"; + return false; + }, + parseIDCard(idcard) { + if (!idcard) + return false; + if (idcard.length !== 18) + return false; + if (!/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(idcard)) + return false; + let sex = (parseInt(idcard.substr(16, 1)) % 2) ^ 1; + let now = new Date().getFullYear(); + let y = parseInt(idcard.substr(6, 4)); + let age = Math.max(now - y, 0); + return [sex, age]; + }, + updateUserInfo() { + let res = this.parseIDCard(this.applicationDetail.tHouseApplyProposer.idcard); + if (res) { + this.applicationDetail.tHouseApplyProposer.sex = res[0]; + this.applicationDetail.tHouseApplyProposer.age = res[1]; } - if (this.checkString(this.applicationDetail.ydjfys.zfcxjsbmyssj)) { - return "乡镇住建部门验收时间不能为空"; + }, + updateMemberInfo(index) { + let res = this.parseIDCard(this.applicationDetail.sqrjtcyList[index].sfzh); + if (res) { + this.$set(this.applicationDetail.sqrjtcyList[index], 'nl', res[1]); } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingGeom)) { - // return "住建部门现场定位不能为空"; - // } - // if(this.$refs.tHouseApplyEndBuilding && this.$refs.tHouseApplyEndBuilding.isValid()) { - // this.submitHouseApproveEndBuildingOptions(); - // } else { - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.buildingPlan)) { - // return "住建部门现场拍照不能为空"; - // } - // } - } - if (!role) { - if (this.checkString(this.applicationDetail.ydjfys.jgpmjtjbr)) { - return "竣工平面简图经办人不能为空"; + }, + searchCommit(data) { + this.showesign = true; + this.onCliceQz = data; + console.info(this.$store.getters.baseRoutingUrl); + console.log(this.currentUserRole); + console.log(this.$store.getters.baseRoutingUrl); + console.info(this.applicationDetail.ydjfys.zrzybmysjbrxm); + if (this.selectedTabName == 0) { + if (this.currentUserRole == 'village_leader' && this.onCliceQz == 'cjxzscr' && this.applicationDetail.cjxzscr != '' && this.applicationDetail.cjxzscr != null) { + //村级审核人员签字 + //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.cjxzscr; + } else if ((this.currentUserRole == 'nature_resource') && this.onCliceQz == 'ydjfsp.zrzybmscrxm' && this.applicationDetail.ydjfsp.zrzybmscrxm != '' && this.applicationDetail.ydjfsp.zrzybmscrxm != null) { + //自然资源部门签字 + + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.zrzybmscrxm; + } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'building') && this.onCliceQz == 'ydjfsp.zfcxjsbmscrxm' && this.applicationDetail.ydjfsp.zfcxjsbmscrxm != '' && this.applicationDetail.ydjfsp.zfcxjsbmscrxm != null) { + //住建部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.zfcxjsbmscrxm; + } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfsp.nyncbmscrxm' && this.applicationDetail.ydjfsp.nyncbmscrxm != '' && this.applicationDetail.ydjfsp.nyncbmscrxm != null) { + //农村农业部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.nyncbmscrxm; + } else if (this.currentUserRole == 'town_leader' && this.onCliceQz == 'ydjfsp.xzzfshpzrxm' && this.applicationDetail.ydjfsp.xzzfshpzrxm != '' && this.applicationDetail.ydjfsp.xzzfshpzrxm != null) { + //镇级领导签字 tHouseApproveTownOptions + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.xzzfshpzrxm; + } else { + this.resultImg = null + if (this.$refs.esign) { + this.$refs.esign.reset(); + } + } + } else if (this.selectedTabName == 1) { + + } else if (this.selectedTabName == 2) { + if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfys.nyncbmysjbrxm' && this.applicationDetail.ydjfys.nyncbmysjbrxm != '' && this.applicationDetail.ydjfys.nyncbmysjbrxm != null) { + //农村农业部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.nyncbmysjbrxm; + } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zrzybmysjbrxm' && this.applicationDetail.ydjfys.zrzybmysjbrxm != '' && this.applicationDetail.ydjfys.zrzybmysjbrxm != null) { + //自然资源部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.zrzybmysjbrxm; + } else if ((this.currentUserRole == 'building' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zfcxjsbmysjbrxm' && this.applicationDetail.ydjfys.zfcxjsbmysjbrxm != '' && this.applicationDetail.ydjfys.zfcxjsbmysjbrxm != null) { + //镇级领导部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.zfcxjsbmysjbrxm; + } else if ((this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.xzzfysjbrxm' && this.applicationDetail.ydjfys.xzzfysjbrxm != '' && this.applicationDetail.ydjfys.xzzfysjbrxm != null) { + //镇级领导部门签字 + this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.xzzfysjbrxm; + } else { + this.resultImg = null + if (this.$refs.esign) { + this.$refs.esign.reset(); + } + } } - if (this.checkString(this.applicationDetail.ydjfys.xzzfysyj)) { - return "乡镇政府验收意见不能为空"; + }, + // 清空画板 + handleReset() { + this.resultImg = null + if (this.$refs.esign) { + this.$refs.esign.reset(); } - if (this.checkString(this.applicationDetail.ydjfys.xzzfysjbrxm)) { - return "乡镇政府验收负责人不能为空"; + }, + // 生成签字图 + handleGenerate() { + this.$refs.esign + .generate() // 使用生成器调用把签字的图片转换成为base64图片格式 + .then((res) => { + this.resultImg = res; + }) + .catch((err) => { + // 画布没有签字时会执行这里提示一下 + this.$message({ + type: "warning", + message: "请签名后再生成签字图片", + }); + }); + // 在这里向后端发请求把转换后的base64文件传给后端,后端接收以后再转换成图片做静态图片存储 + // 当然也可以把base64转成流文件blob格式的,类似上传给后端这样,具体哪种方式看后端要求 + setTimeout(() => { + // 这里要使用定时器稍微延后以后就能取到base64数据了,当然也可以再加一个确认按钮,如:确认使用这张base64签名图片 + // 点击确认以后,在其回调函数中,再把base64的签名图片传给后端用于存储 + const blobBin = atob(this.resultImg.split(',')[1]) + let d = [] + for (let i = 0; i < blobBin.length; i++) { + d.push(blobBin.charCodeAt(i)) + } + const data2 = new FormData(); + data2.append("file", new Blob([new Uint8Array(d)], {type: 'image/jpeg'})); + uploadFile(data2).then(res => { + console.log(res); + console.log(this.selectedTabName); + console.log(this.currentUserRole); + if (this.selectedTabName == 0) { + if (this.currentUserRole == 'village_leader' && this.onCliceQz == 'cjxzscr') { + //村级审核人员签字 + //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) + this.applicationDetail.cjxzscr = res.fileName; + } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfsp.zrzybmscrxm') { + //自然资源部门签字 + this.applicationDetail.ydjfsp.zrzybmscrxm = res.fileName; + } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'building') && this.onCliceQz == 'ydjfsp.zfcxjsbmscrxm') { + //其他部门签字 + this.applicationDetail.ydjfsp.zfcxjsbmscrxm = res.fileName; + } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfsp.nyncbmscrxm') { + //农村农业部门签字 + this.applicationDetail.ydjfsp.nyncbmscrxm = res.fileName; + } else if (this.currentUserRole == 'town_leader' && this.onCliceQz == 'ydjfsp.xzzfshpzrxm') { + //镇级领导签字 tHouseApproveTownOptions + this.applicationDetail.ydjfsp.xzzfshpzrxm = res.fileName; + } + this.showesign = false; + } else if (this.selectedTabName == 1) { + + } else if (this.selectedTabName == 2) { + if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfys.nyncbmysjbrxm') { + //农村农业部门签字 + this.applicationDetail.ydjfys.nyncbmysjbrxm = res.fileName; + } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zrzybmysjbrxm') { + //自然资源部门签字 + this.applicationDetail.ydjfys.zrzybmysjbrxm = res.fileName; + } else if ((this.currentUserRole == 'building' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zfcxjsbmysjbrxm') { + //自然资源部门签字 + this.applicationDetail.ydjfys.zfcxjsbmysjbrxm = res.fileName; + } else if ((this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.xzzfysjbrxm') { + //镇级领导部门签字 + this.applicationDetail.ydjfys.xzzfysjbrxm = res.fileName; + } + this.showesign = false; + } + }) + }, 200); + }, + + //定位当前位置 + dingweiCommit(data) { + //this.mapShow =true; + this.mapZbNow = data; + // saveHouseBaseInfo(this.applicationDetail).then((response) => { + // }).catch(resp => { + // this.notify("保存失败!", 'danger'); + // }); + console.log(document.cookie); + console.log(window.location.href); + let chars = window.location.href.split("lat=")[1] || ""; + if (chars != "" && chars != null && chars != undefined) { + var urlZb = window.location.href.split("&lat=")[0]; + window.location = `https://www.nongshen.net/static/tdtLocation/location.html?exiturl=${urlZb}`; + } else { + window.location = `https://www.nongshen.net/static/tdtLocation/location.html?exiturl=${window.location.href}`; } - if (this.checkString(this.applicationDetail.ydjfys.xzzfyssj)) { - return "乡镇政府验收时间不能为空"; + }, + dingweiCommitLook(data) { + this.mapShow = true; + var zb; + //定位坐标点查看 + if (data == 'tHomeapplyYdjfkg') { + zb = this.applicationDetail.ydjfkg.theGeomJson; } - // if (this.checkString(this.applicationDetail.tHouseApplyEnd.zhenGeom)) { - // return "乡镇政府现场定位不能为空"; - // } + setTimeout(() => { + var zbCl = zb.replace("POINT(", "").replace(")", "").replace(" ", ","); + zbCl = JSON.stringify([zbCl]).replaceAll("\"", ""); + var vector_drawing; + let projection = new ol.proj.Projection({ + //地图投影类型 + code: "EPSG:3857", + units: "degrees", + //extent:extent + }); + let aerial = new ol.layer.Tile({ + source: new ol.source.XYZ({ + url: "http://t0.tianditu.gov.cn/img_w/wmts?" + + "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" + + "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067", + }), + isGroup: true, + name: "卫星影像图", + }); - } + let yingxzi = new ol.layer.Tile({ + source: new ol.source.XYZ({ + url: "https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067", + }), + isGroup: true, + name: "天地图文字标注--卫星影像图", + }); + //加载地图 + let map = new ol.Map({ + controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮 + layers: [aerial, yingxzi], + projection: projection, + target: 'uuidMap', + logo: 'false', + view: new ol.View({ + center: ol.proj.fromLonLat(JSON.parse(zbCl)), + //zoom: false, + zoom: 17.9, + minZoom: 0, //地图缩小限制 + maxZoom: 18.3, //地图放大限制 + }), + }); + var newcenterFeature = new ol.Feature({ + geometry: new ol.geom.Point(ol.proj.fromLonLat(JSON.parse(zbCl))), //几何信息 + name: "到场点", + }); + var sourceMapLook = new ol.source.Vector({wrapX: false}); + vector_drawing = new ol.layer.Vector({ + source: sourceMapLook, + }); + map.addLayer(vector_drawing); + newcenterFeature.setStyle(createLabelStyle()); //设置要素样式 + sourceMapLook.addFeature(newcenterFeature); + + //矢量标注样式设置函数,设置image为图标ol.style.Icon + function createLabelStyle() { + return new ol.style.Style({ + image: new ol.style.Icon({ + //设置图标偏移 + anchor: [0.5, 1], + //标注样式的起点位置 + anchorOrigin: "top-right", + //X方向单位:分数 + anchorXUnits: "fraction", + //Y方向单位:像素 + anchorYUnits: "pixels", + //偏移起点位置的方向 + offsetOrigin: "top-right", + //透明度 + opacity: 0.9, + //图片路径 + src: require("../../../assets/images/housesteadSurvey/mark.png"), + }), + zIndex: 9999, + }); + } + }, 1000); + }, + mapZbQx() { - // 通过时检查打勾, 农业部门 - if (pass) { - // if(this.applicationDetail.tHouseApplyEnd.isProjectFinished != 'Y') - // { - // return "同意验收时需已完成工程设计和合同约定的各项内容"; + }, + mapZbQd() { + // //申请审批定位 + // if(this.mapZbNow == 'tHouseApproveVillage' && this.formEnabled.baseApplyForm.villageFormEnabled){ + // this.applicationDetail.tHouseApproveVillageOptions.theGeom = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.isQualifiedQuality != 'Y') - // { - // return "同意验收时需承揽人对完工住房质量自查合格"; + // if (this.mapZbNow == 'tHouseApproveNature' && this.formEnabled.baseApplyForm.nature_resourceFormEnabled){ + // this.applicationDetail.tHouseApproveNatureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.hasBuildingRecord != 'Y') - // { - // return "同意验收时需有施工记录资料"; + // if(this.mapZbNow == 'tHouseApproveAgriculture' && this.formEnabled.baseApplyForm.agricultureFormEnabled){ + // this.applicationDetail.tHouseApproveAgricultureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.isSignWarranty != 'Y') - // { - // return "同意验收时需建房村民和承揽人已经共同签署农村住房质量保修书"; + // if(this.mapZbNow == 'tHouseApproveOther' && this.formEnabled.baseApplyForm.buildingFormEnabled){ + // this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.isHandleProblem != 'Y') - // { - // return "同意验收时需住房城乡建设行政主管部门或乡(镇)人民政府责令整改的问题全部整改完毕"; + // if(this.mapZbNow == 'tHouseApproveTown' && this.formEnabled.baseApplyForm.townFormEnabled){ + // this.applicationDetail.tHouseApproveTownOptions.theGeomPoint = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.isDesignPaperSame != 'Y') - // { - // return "同意验收时需建筑风貌是否与设计图基本一致"; + // //验收申请定位 + // if(this.mapZbNow == 'tHouseApplyEndNongye' && this.formEnabled.acceptingForm.agricultureFormEnabled){ + // this.applicationDetail.tHouseApplyEnd.nongyeGeom = JSON.stringify(this.mapBcZb); // } - // if(this.applicationDetail.tHouseApplyEnd.isOtherAcceptanceFinished != 'Y') - // { - // return "同意验收时需法律、法规规定的其他验收条件完成情况"; + // if(this.mapZbNow == 'tHouseApplyEndNature' && this.formEnabled.acceptingForm.nature_resourceFormEnabled){ + // this.applicationDetail.tHouseApplyEnd.natureGeom = JSON.stringify(this.mapBcZb); // } - } - - return false; - }, - onConfirmTytz(val) { - this.$set(this.applicationDetail, 'tyhxt', val.id); - this.tytzName = val.name; - this.showTyt = false; - }, - validateStartFormBase() { - if (this.checkString(this.applicationDetail.ydjfkg.kgrq)) { - return "计划开工时间不能为空"; - } - if (this.checkString(this.applicationDetail.ydjfkg.jgrq)) { - return "计划竣工时间不能为空"; - } - return false; - }, - parseIDCard(idcard) { - if (!idcard) - return false; - if (idcard.length !== 18) - return false; - if (!/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(idcard)) - return false; - let sex = (parseInt(idcard.substr(16, 1)) % 2) ^ 1; - let now = new Date().getFullYear(); - let y = parseInt(idcard.substr(6, 4)); - let age = Math.max(now - y, 0); - return [sex, age]; - }, - updateUserInfo() { - let res = this.parseIDCard(this.applicationDetail.tHouseApplyProposer.idcard); - if (res) { - this.applicationDetail.tHouseApplyProposer.sex = res[0]; - this.applicationDetail.tHouseApplyProposer.age = res[1]; - } - }, - updateMemberInfo(index) { - let res = this.parseIDCard(this.applicationDetail.sqrjtcyList[index].sfzh); - if (res) { - this.$set(this.applicationDetail.sqrjtcyList[index], 'nl', res[1]); - } - }, - searchCommit(data) { - this.showesign = true; - this.onCliceQz = data; - console.info(this.$store.getters.baseRoutingUrl); - console.log(this.currentUserRole); - console.log(this.$store.getters.baseRoutingUrl); - console.info(this.applicationDetail.ydjfys.zrzybmysjbrxm); - if (this.selectedTabName == 0) { - if (this.currentUserRole == 'village_leader' && this.onCliceQz == 'cjxzscr' && this.applicationDetail.cjxzscr != '' && this.applicationDetail.cjxzscr != null) { - //村级审核人员签字 - //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.cjxzscr; - } else if ((this.currentUserRole == 'nature_resource') && this.onCliceQz == 'ydjfsp.zrzybmscrxm' && this.applicationDetail.ydjfsp.zrzybmscrxm != '' && this.applicationDetail.ydjfsp.zrzybmscrxm != null) { - //自然资源部门签字 - - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.zrzybmscrxm; - } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'building') && this.onCliceQz == 'ydjfsp.zfcxjsbmscrxm' && this.applicationDetail.ydjfsp.zfcxjsbmscrxm != '' && this.applicationDetail.ydjfsp.zfcxjsbmscrxm != null) { - //住建部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.zfcxjsbmscrxm; - } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfsp.nyncbmscrxm' && this.applicationDetail.ydjfsp.nyncbmscrxm != '' && this.applicationDetail.ydjfsp.nyncbmscrxm != null) { - //农村农业部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.nyncbmscrxm; - } else if (this.currentUserRole == 'town_leader' && this.onCliceQz == 'ydjfsp.xzzfshpzrxm' && this.applicationDetail.ydjfsp.xzzfshpzrxm != '' && this.applicationDetail.ydjfsp.xzzfshpzrxm != null) { - //镇级领导签字 tHouseApproveTownOptions - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfsp.xzzfshpzrxm; - } else { - this.resultImg = null - if (this.$refs.esign) { - this.$refs.esign.reset(); - } + // if(this.mapZbNow == 'tHouseApplyEndZhen' && this.formEnabled.acceptingForm.townFormEnabled){ + // this.applicationDetail.tHouseApplyEnd.zhenGeom = JSON.stringify(this.mapBcZb); + // } + //申请审批定位 + if (this.formEnabled.baseApplyForm.villageFormEnabled) { + this.applicationDetail.tHouseApproveVillageOptions.theGeom = JSON.stringify(this.mapBcZb); } - } else if (this.selectedTabName == 1) { - - } else if (this.selectedTabName == 2) { - if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfys.nyncbmysjbrxm' && this.applicationDetail.ydjfys.nyncbmysjbrxm != '' && this.applicationDetail.ydjfys.nyncbmysjbrxm != null) { - //农村农业部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.nyncbmysjbrxm; - } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zrzybmysjbrxm' && this.applicationDetail.ydjfys.zrzybmysjbrxm != '' && this.applicationDetail.ydjfys.zrzybmysjbrxm != null) { - //自然资源部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.zrzybmysjbrxm; - } else if ((this.currentUserRole == 'building' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zfcxjsbmysjbrxm' && this.applicationDetail.ydjfys.zfcxjsbmysjbrxm != '' && this.applicationDetail.ydjfys.zfcxjsbmysjbrxm != null) { - //镇级领导部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.zfcxjsbmysjbrxm; - } else if ((this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.xzzfysjbrxm' && this.applicationDetail.ydjfys.xzzfysjbrxm != '' && this.applicationDetail.ydjfys.xzzfysjbrxm != null) { - //镇级领导部门签字 - this.resultImg = this.$store.getters.baseRoutingUrl + this.applicationDetail.ydjfys.xzzfysjbrxm; - } else { - this.resultImg = null - if (this.$refs.esign) { - this.$refs.esign.reset(); - } + if (this.formEnabled.baseApplyForm.nature_resourceFormEnabled) { + this.applicationDetail.tHouseApproveNatureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); } - } - }, - // 清空画板 - handleReset() { - this.resultImg = null - if (this.$refs.esign) { - this.$refs.esign.reset(); - } - }, - // 生成签字图 - handleGenerate() { - this.$refs.esign - .generate() // 使用生成器调用把签字的图片转换成为base64图片格式 - .then((res) => { - this.resultImg = res; - }) - .catch((err) => { - // 画布没有签字时会执行这里提示一下 - this.$message({ - type: "warning", - message: "请签名后再生成签字图片", - }); - }); - // 在这里向后端发请求把转换后的base64文件传给后端,后端接收以后再转换成图片做静态图片存储 - // 当然也可以把base64转成流文件blob格式的,类似上传给后端这样,具体哪种方式看后端要求 - setTimeout(() => { - // 这里要使用定时器稍微延后以后就能取到base64数据了,当然也可以再加一个确认按钮,如:确认使用这张base64签名图片 - // 点击确认以后,在其回调函数中,再把base64的签名图片传给后端用于存储 - const blobBin = atob(this.resultImg.split(',')[1]) - let d = [] - for (let i = 0; i < blobBin.length; i++) { - d.push(blobBin.charCodeAt(i)) + if (this.formEnabled.baseApplyForm.agricultureFormEnabled) { + this.applicationDetail.tHouseApproveAgricultureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); } - const data2 = new FormData(); - data2.append("file", new Blob([new Uint8Array(d)], {type: 'image/jpeg'})); - uploadFile(data2).then(res => { - console.log(res); - console.log(this.selectedTabName); - console.log(this.currentUserRole); - if (this.selectedTabName == 0) { - if (this.currentUserRole == 'village_leader' && this.onCliceQz == 'cjxzscr') { - //村级审核人员签字 - //if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageLeader)) - this.applicationDetail.cjxzscr = res.fileName; - } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfsp.zrzybmscrxm') { - //自然资源部门签字 - this.applicationDetail.ydjfsp.zrzybmscrxm = res.fileName; - } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'building') && this.onCliceQz == 'ydjfsp.zfcxjsbmscrxm') { - //其他部门签字 - this.applicationDetail.ydjfsp.zfcxjsbmscrxm = res.fileName; - } else if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfsp.nyncbmscrxm') { - //农村农业部门签字 - this.applicationDetail.ydjfsp.nyncbmscrxm = res.fileName; - } else if (this.currentUserRole == 'town_leader' && this.onCliceQz == 'ydjfsp.xzzfshpzrxm') { - //镇级领导签字 tHouseApproveTownOptions - this.applicationDetail.ydjfsp.xzzfshpzrxm = res.fileName; - } - this.showesign = false; - } else if (this.selectedTabName == 1) { - - } else if (this.selectedTabName == 2) { - if ((this.currentUserRole == 'town_leader' || this.currentUserRole == 'agriculture') && this.onCliceQz == 'ydjfys.nyncbmysjbrxm') { - //农村农业部门签字 - this.applicationDetail.ydjfys.nyncbmysjbrxm = res.fileName; - } else if ((this.currentUserRole == 'nature_resource' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zrzybmysjbrxm') { - //自然资源部门签字 - this.applicationDetail.ydjfys.zrzybmysjbrxm = res.fileName; - } else if ((this.currentUserRole == 'building' || this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.zfcxjsbmysjbrxm') { - //自然资源部门签字 - this.applicationDetail.ydjfys.zfcxjsbmysjbrxm = res.fileName; - } else if ((this.currentUserRole == 'town_leader') && this.onCliceQz == 'ydjfys.xzzfysjbrxm') { - //镇级领导部门签字 - this.applicationDetail.ydjfys.xzzfysjbrxm = res.fileName; - } - this.showesign = false; - } - }) - }, 200); - }, - - //定位当前位置 - dingweiCommit(data) { - //this.mapShow =true; - this.mapZbNow = data; - // saveHouseBaseInfo(this.applicationDetail).then((response) => { - // }).catch(resp => { - // this.notify("保存失败!", 'danger'); - // }); - console.log(document.cookie); - console.log(window.location.href); - let chars = window.location.href.split("lat=")[1] || ""; - if (chars != "" && chars != null && chars != undefined) { - var urlZb = window.location.href.split("&lat=")[0]; - window.location = `https://www.nongshen.net/static/tdtLocation/location.html?exiturl=${urlZb}`; - } else { - window.location = `https://www.nongshen.net/static/tdtLocation/location.html?exiturl=${window.location.href}`; - } - }, - dingweiCommitLook(data) { - this.mapShow = true; - var zb; - //定位坐标点查看 - if (data == 'tHomeapplyYdjfkg') { - zb = this.applicationDetail.ydjfkg.theGeomJson; - } - setTimeout(() => { - var zbCl = zb.replace("POINT(", "").replace(")", "").replace(" ", ","); - zbCl = JSON.stringify([zbCl]).replaceAll("\"", ""); - var vector_drawing; - let projection = new ol.proj.Projection({ - //地图投影类型 - code: "EPSG:3857", - units: "degrees", - //extent:extent - }); - let aerial = new ol.layer.Tile({ - source: new ol.source.XYZ({ - url: "http://t0.tianditu.gov.cn/img_w/wmts?" + - "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" + - "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067", - }), - isGroup: true, - name: "卫星影像图", - }); - - let yingxzi = new ol.layer.Tile({ - source: new ol.source.XYZ({ - url: "https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067", - }), - isGroup: true, - name: "天地图文字标注--卫星影像图", - }); - //加载地图 - let map = new ol.Map({ - controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮 - layers: [aerial, yingxzi], - projection: projection, - target: 'uuidMap', - logo: 'false', - view: new ol.View({ - center: ol.proj.fromLonLat(JSON.parse(zbCl)), - //zoom: false, - zoom: 17.9, - minZoom: 0, //地图缩小限制 - maxZoom: 18.3, //地图放大限制 - }), - }); - var newcenterFeature = new ol.Feature({ - geometry: new ol.geom.Point(ol.proj.fromLonLat(JSON.parse(zbCl))), //几何信息 - name: "到场点", - }); - var sourceMapLook = new ol.source.Vector({wrapX: false}); - vector_drawing = new ol.layer.Vector({ - source: sourceMapLook, - }); - map.addLayer(vector_drawing); - newcenterFeature.setStyle(createLabelStyle()); //设置要素样式 - sourceMapLook.addFeature(newcenterFeature); - - //矢量标注样式设置函数,设置image为图标ol.style.Icon - function createLabelStyle() { - return new ol.style.Style({ - image: new ol.style.Icon({ - //设置图标偏移 - anchor: [0.5, 1], - //标注样式的起点位置 - anchorOrigin: "top-right", - //X方向单位:分数 - anchorXUnits: "fraction", - //Y方向单位:像素 - anchorYUnits: "pixels", - //偏移起点位置的方向 - offsetOrigin: "top-right", - //透明度 - opacity: 0.9, - //图片路径 - src: require("../../../assets/images/housesteadSurvey/mark.png"), - }), - zIndex: 9999, - }); + if (this.formEnabled.baseApplyForm.buildingFormEnabled) { + this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint = JSON.stringify(this.mapBcZb); + } + if (this.formEnabled.baseApplyForm.townFormEnabled) { + this.applicationDetail.tHouseApproveTownOptions.theGeomPoint = JSON.stringify(this.mapBcZb); + } + //验收申请定位 + if (this.formEnabled.acceptingForm.agricultureFormEnabled) { + this.applicationDetail.tHouseApplyEnd.nongyeGeom = JSON.stringify(this.mapBcZb); + } + if (this.formEnabled.acceptingForm.nature_resourceFormEnabled) { + this.applicationDetail.tHouseApplyEnd.natureGeom = JSON.stringify(this.mapBcZb); + } + if (this.formEnabled.acceptingForm.townFormEnabled) { + this.applicationDetail.tHouseApplyEnd.zhenGeom = JSON.stringify(this.mapBcZb); } - }, 1000); - }, - mapZbQx() { - }, - mapZbQd() { - // //申请审批定位 - // if(this.mapZbNow == 'tHouseApproveVillage' && this.formEnabled.baseApplyForm.villageFormEnabled){ - // this.applicationDetail.tHouseApproveVillageOptions.theGeom = JSON.stringify(this.mapBcZb); - // } - // if (this.mapZbNow == 'tHouseApproveNature' && this.formEnabled.baseApplyForm.nature_resourceFormEnabled){ - // this.applicationDetail.tHouseApproveNatureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - // } - // if(this.mapZbNow == 'tHouseApproveAgriculture' && this.formEnabled.baseApplyForm.agricultureFormEnabled){ - // this.applicationDetail.tHouseApproveAgricultureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - // } - // if(this.mapZbNow == 'tHouseApproveOther' && this.formEnabled.baseApplyForm.buildingFormEnabled){ - // this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - // } - // if(this.mapZbNow == 'tHouseApproveTown' && this.formEnabled.baseApplyForm.townFormEnabled){ - // this.applicationDetail.tHouseApproveTownOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - // } - // //验收申请定位 - // if(this.mapZbNow == 'tHouseApplyEndNongye' && this.formEnabled.acceptingForm.agricultureFormEnabled){ - // this.applicationDetail.tHouseApplyEnd.nongyeGeom = JSON.stringify(this.mapBcZb); - // } - // if(this.mapZbNow == 'tHouseApplyEndNature' && this.formEnabled.acceptingForm.nature_resourceFormEnabled){ - // this.applicationDetail.tHouseApplyEnd.natureGeom = JSON.stringify(this.mapBcZb); - // } - // if(this.mapZbNow == 'tHouseApplyEndZhen' && this.formEnabled.acceptingForm.townFormEnabled){ - // this.applicationDetail.tHouseApplyEnd.zhenGeom = JSON.stringify(this.mapBcZb); - // } - //申请审批定位 - if (this.formEnabled.baseApplyForm.villageFormEnabled) { - this.applicationDetail.tHouseApproveVillageOptions.theGeom = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.baseApplyForm.nature_resourceFormEnabled) { - this.applicationDetail.tHouseApproveNatureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.baseApplyForm.agricultureFormEnabled) { - this.applicationDetail.tHouseApproveAgricultureOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.baseApplyForm.buildingFormEnabled) { - this.applicationDetail.tHouseApproveOtherOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.baseApplyForm.townFormEnabled) { - this.applicationDetail.tHouseApproveTownOptions.theGeomPoint = JSON.stringify(this.mapBcZb); - } - //验收申请定位 - if (this.formEnabled.acceptingForm.agricultureFormEnabled) { - this.applicationDetail.tHouseApplyEnd.nongyeGeom = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.acceptingForm.nature_resourceFormEnabled) { - this.applicationDetail.tHouseApplyEnd.natureGeom = JSON.stringify(this.mapBcZb); - } - if (this.formEnabled.acceptingForm.townFormEnabled) { - this.applicationDetail.tHouseApplyEnd.zhenGeom = JSON.stringify(this.mapBcZb); + }, + } + , + watch: { + selectedTabName: function (newVal, oldVal) { + this.$nextTick(() => { + if (newVal == PROPOSER_STAGE_BASE_APPLY) { + this.pointDarw(null); + // this.pointDarwNature(null); + this.$refs.pointDarwMap && this.$refs.pointDarwMap.update(); + this.$refs.pointDarwNatureMap && this.$refs.pointDarwNatureMap.update(); + } else if (newVal == PROPOSER_STAGE_START) { + // this.paintStartNatureMap(null); + this.$refs.startNatureMap && this.$refs.startNatureMap.update(); + } else if (newVal == PROPOSER_STAGE_END) { + // this.pointWrapAcceptance(null); + this.$refs.pointDarwAcceptanceMap && this.$refs.pointDarwAcceptanceMap.update(); + } + }) } - - }, - } - , - watch: { - selectedTabName: function (newVal, oldVal) { - this.$nextTick(() => { - if (newVal == PROPOSER_STAGE_BASE_APPLY) { - this.pointDarw(null); - // this.pointDarwNature(null); - this.$refs.pointDarwMap && this.$refs.pointDarwMap.update(); - this.$refs.pointDarwNatureMap && this.$refs.pointDarwNatureMap.update(); - } else if (newVal == PROPOSER_STAGE_START) { - // this.paintStartNatureMap(null); - this.$refs.startNatureMap && this.$refs.startNatureMap.update(); - } else if (newVal == PROPOSER_STAGE_END) { - // this.pointWrapAcceptance(null); - this.$refs.pointDarwAcceptanceMap && this.$refs.pointDarwAcceptanceMap.update(); - } - }) + , } - , - } }