Selaa lähdekoodia

宅基地bug修改2

wulanhaote
zhao 3 vuotta sitten
vanhempi
commit
d1af9a9e2b
4 muutettua tiedostoa jossa 222 lisäystä ja 162 poistoa
  1. +17
    -0
      src/permission.js
  2. +4
    -0
      src/store/modules/user.js
  3. +9
    -0
      src/utils/request.js
  4. +192
    -162
      src/views/onlineHome/homestead/homeApplication/proposerLite.vue

+ 17
- 0
src/permission.js Näytä tiedosto

@@ -3,6 +3,7 @@ import store from './store'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
import Cookies from "js-cookie";

NProgress.configure({ showSpinner: false })

@@ -126,6 +127,14 @@ router.beforeEach((to, from, next) => {
next()
}).catch(err => {
store.dispatch('LogOut').then(() => {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
{
next({ path: '/onlineHomeLogin' })
return;
}
} catch (e) { console.log(e); }
// Message.error(err)
if ('/authenticRight/index'.indexOf(to.path) !== -1) {
next({ path: '/authenticRight/login' })
@@ -157,6 +166,14 @@ router.beforeEach((to, from, next) => {
console.log(to.path)
next()
} else {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
{
next({ path: `/onlineHomeLogin?redirect=${to.fullPath}` })
return;
}
} catch (e) { console.log(e); }
if ('/authenticRight/index'.indexOf(to.path) !== -1) {
next(`/authenticRight/login?redirect=${to.fullPath}`)
} else if ('/homestead/index'.indexOf(to.path) !== -1) {


+ 4
- 0
src/store/modules/user.js Näytä tiedosto

@@ -2,6 +2,7 @@ import { login, logout, getInfo, smsLogin } from '@/api/login';
import { registerOn } from "@/api/register";
import { getToken, setToken, removeToken } from '@/utils/auth'
import { getSystemAttachmentUrl } from '@/api/system/config'
import Cookies from "js-cookie";

const user = {
state: {
@@ -63,6 +64,7 @@ const user = {
login(username, password, code, uuid).then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)
Cookies.set("_Login_url", window.location.href);
resolve()
}).catch(error => {
reject(error)
@@ -79,6 +81,7 @@ const user = {
smsLogin(mobile, smsCode, uuid).then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)
Cookies.set("_Login_url", window.location.href);
resolve()
}).catch(error => {
reject(error)
@@ -97,6 +100,7 @@ const user = {
registerOn(memberName, idcard, mobile, smsCode, uuid).then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)
Cookies.set("_Login_url", window.location.href);
resolve()
}).catch(error => {
reject(error)


+ 9
- 0
src/utils/request.js Näytä tiedosto

@@ -4,6 +4,7 @@ import { Notify, Dialog, Toast } from 'vant';
import store from '@/store'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import Cookies from "js-cookie";

axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
@@ -69,6 +70,14 @@ service.interceptors.response.use(res => {
})
.then(() => {
store.dispatch('LogOut').then(() => {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
{
window.location.href = loginUrl;
return;
}
} catch (e) { console.log(e); }
if (window.location.href.indexOf('lawEnforcement') != -1) {
window.location.href = '/lawEnforcement/login';
} else if (window.location.href.indexOf('authenticRight') != -1) {


+ 192
- 162
src/views/onlineHome/homestead/homeApplication/proposerLite.vue Näytä tiedosto

@@ -19,7 +19,7 @@
</van-steps>

<div class="main" style="padding-bottom: 1rem;">
<van-form>
<van-form ref="form">
<template v-if="selectedTabName == 0 && formVisible.baseApplyFormVisible"> <!-- 申请 -->
<div :class="active == 0 ? '' : 'noModify'">
<p class="topTit">农村宅基地和建房(规划许可)申请表</p>
@@ -264,7 +264,7 @@
<van-row type="flex" justify="space-between" align="center">
<van-col span="5">村级<br/>审核<br/>意见</van-col>
<van-col span="19">
<van-field required :readonly="!formEnabled.baseApplyForm.villageFormEnabled" v-model="applicationDetail.tHouseApproveVillageOptions.villageOption" rows="2" autosize type="textarea" placeholder="同意申请宅基地"/>
<van-field required :readonly="!formEnabled.baseApplyForm.villageFormEnabled" v-model="applicationDetail.tHouseApproveVillageOptions.villageOption" rows="2" autosize type="textarea" placeholder="同意申请宅基地" :rules="[{ required: true }]"/>
</van-col>
</van-row>
</div>
@@ -306,7 +306,7 @@
:readonly="!formEnabled.baseApplyForm.townFormEnabled"
:columns="[{dictLabel: '齐全', dictValue: '1'}, {dictLabel: '不齐全', dictValue: '2'}]"
/>
<van-field required :readonly="!formEnabled.baseApplyForm.townFormEnabled" rows="2" v-model="applicationDetail.tHouseApproveAgricultureOptions.approveOption" autosize type="textarea" placeholder="审查意见"/>
<van-field required :readonly="!formEnabled.baseApplyForm.townFormEnabled" rows="2" v-model="applicationDetail.tHouseApproveAgricultureOptions.approveOption" autosize type="textarea" placeholder="审查意见" :rules="[{ required: true }]"/>
</van-col>
</van-row>
</div>
@@ -1268,14 +1268,14 @@ export default {
if(!value.tHouseApproveNatureOptions)
{
this.$set(this.applicationDetail, "tHouseApproveNatureOptions", {
landArea: "",
rightsType: "",
east: "", // 东至
west: "", // 西至
south: "", // 南至
north: "", // 北至
landArea: null,
rightsType: null,
east: null, // 东至
west: null, // 西至
south: null, // 南至
north: null, // 北至
approveLeader: handlerName,
approveOption: "",
approveOption: null,
approveTime: handlerTime,
//theGeom: value.tHouseApplyProposedSituation.theGeom,
});
@@ -1290,11 +1290,11 @@ export default {
if(!value.tHouseApproveAgricultureOptions)
{
this.$set(this.applicationDetail, "tHouseApproveAgricultureOptions", {
isMembership: "",
isOnehouse: "",
isReviewmaterials: "",
isMembership: null,
isOnehouse: null,
isReviewmaterials: null,
approveLeader: handlerName,
approveOption: "",
approveOption: null,
approveTime: handlerTime,
});
}
@@ -1308,18 +1308,18 @@ export default {
if(!value.tHouseApproveOtherOptions)
{
this.$set(this.applicationDetail, "tHouseApproveOtherOptions", {
buildingType: "",
buildingArea: "",
buildingFloors: "",
buildingHight: "",
buildingLandArea: "",
buildingType: null,
buildingArea: null,
buildingFloors: null,
buildingHight: null,
buildingLandArea: null,
designPaper: "1",
east: "", // 东至
west: "", // 西至
south: "", // 南至
north: "", // 北至
east: null, // 东至
west: null, // 西至
south: null, // 南至
north: null, // 北至
approveLeader: handlerName,
approveOption: "",
approveOption: null,
approveTime: handlerTime,
});
}
@@ -1348,7 +1348,7 @@ export default {
{
this.$set(this.applicationDetail, 'tHouseApproveLocationplanOptions', {
locationPlan: null,
cartographicUnit: '',
cartographicUnit: null,
surveyPersonnel: handlerName,
suveyTime: handlerTime,
cartographer: handlerName,
@@ -1373,8 +1373,8 @@ export default {
if(!this.applicationDetail.tHouseApplyStart)
{
this.$set(this.applicationDetail, 'tHouseApplyStart', {
startDate: '',
endDate: '',
startDate: null,
endDate: null,
});
}
}
@@ -1583,37 +1583,37 @@ export default {
existHomestead: "N",
});
this.$set(this.applicationDetail, "tHouseApplyCurrentSituation", {
landArea: "", //宅基地面积
landPerArea: "", //人均宅基地面积
landCertificateNo: "", //权属证书号
buildingPerArea: "", //人均建筑面积
houseCertificateNo: "", //权属证书号
landIsposal: "", // 现宅基地处置情况
reservedArea: "", // 保留m²
otherRemark: "", // 其他
landArea: null, //宅基地面积
landPerArea: null, //人均宅基地面积
landCertificateNo: null, //权属证书号
buildingPerArea: null, //人均建筑面积
houseCertificateNo: null, //权属证书号
landIsposal: null, // 现宅基地处置情况
reservedArea: null, // 保留m²
otherRemark: null, // 其他
});
this.$set(this.applicationDetail, "tHouseApplyFamilyMembers", []);
this.$set(this.applicationDetail, "tHouseApplyProposedSituation", {
location: "", // 拟建位置
landArea: "", // 宅基地面积
east: "", // 东至
west: "", // 西至
south: "", // 南至
north: "", // 北至
geographicType: "", // 地类
constructionLandArea: "", // 建设用地面积
unusedLandArea: "", // 未利用地面积
agriculturalLandArea: "", // 农用地面积
farmLandArea: "", //耕地面积
forestLandArea: "", // 林地面积
buildingArea: "", // 建筑面积
buildingFloors: "", // 建筑层数
buildingHight: "", // 建筑高度
location: null, // 拟建位置
landArea: null, // 宅基地面积
east: null, // 东至
west: null, // 西至
south: null, // 南至
north: null, // 北至
geographicType: null, // 地类
constructionLandArea: null, // 建设用地面积
unusedLandArea: null, // 未利用地面积
agriculturalLandArea: null, // 农用地面积
farmLandArea: null, //耕地面积
forestLandArea: null, // 林地面积
buildingArea: null, // 建筑面积
buildingFloors: null, // 建筑层数
buildingHight: null, // 建筑高度
designPaper: "1", // 设计图纸
housingStructure: "", // 房屋构造
housingStructure: null, // 房屋构造
isAdvice: "1", // 是否征求相邻权利人意见
buildingType: "4",
buildingLandArea:"", //房基占地面积
buildingLandArea:null, //房基占地面积
buildingDesign: "1",//是否有住房建设设计图
buildingAtlas: "1", //是否采用住建部门提供的图集
houseTypeId: null,
@@ -1627,19 +1627,19 @@ export default {
//现宅基地情况
this.$set(this.applicationDetail, 'tHouseApplyCurrentSituation', {
//宅基地面积
landArea: '',
landArea: null,
//人均宅基地面积
landPerArea: '',
landPerArea: null,
//不动产单元号
landCertificateNo: '',
landCertificateNo: null,
//农民房屋幢号
houseCertificateNo: '',
houseCertificateNo: null,
//建筑面积
buildingArea: '',
buildingArea: null,
//人均建筑面积
buildingPerArea: '',
buildingPerArea: null,
//现宅基地处置情况 字典 land_isposal
landIsposal: ""
landIsposal: null
});
}
}
@@ -1651,11 +1651,11 @@ export default {
this.applicationDetail.tHouseApplyProposer.members++;
this.applicationDetail.tHouseApplyFamilyMembers.push({
//applyProposerId: this.applicationDetail.tHouseApplyFamilyMembers[0].applyProposerId,
memberName:'',
age:'',
familyStatusName:'',
idcard :'',
householdRegister:'',
memberName:null,
age:null,
familyStatusName:null,
idcard :null,
householdRegister:null,
});
this.$nextTick(() => {
this.$refs.memberTabs.scrollTo(this.applicationDetail.tHouseApplyFamilyMembers.length - 1);
@@ -1754,43 +1754,52 @@ export default {
},
// 保存申请(是否提交)
saveProposerApply(submit) {
let msg = this.validateBaseApplyFormBase();
if(msg)
{
this.notify(msg, 'danger');
return;
}
//地图判断
if (this.drawInsert != null) {
this.applicationDetail.tHouseApplyProposedSituation.theGeom = JSON.stringify(this.drawInsert);
}
else
{
if(this.applicationDetail.tHouseApplyProposer.existHomestead === 'Y' && this.applicationDetail.tHouseApplyProposedSituation.theGeom) // 新增时 && 已有宅基地时 && 重新画过图且被清理掉
this.$refs.form.validate().then(() => {
let msg = this.validateBaseApplyFormBase();
if(msg)
{
this.applicationDetail.tHouseApplyProposedSituation.theGeom = this.convertGeom(this.applicationDetail.tHouseApplyProposedSituation.theGeom);
this.notify(msg, 'danger');
return;
}
}
if(this.checkString(this.applicationDetail.tHouseApplyProposedSituation.theGeom))
{
this.notify("请标注宅基地位置!", 'danger');
return;
}
console.log("进行保存", this.applicationDetail);
saveHouseBaseInfo(this.applicationDetail).then((response) => {
if(submit)
{
this.id = response.data;
this.submitApplyProposer();
//地图判断
if (this.drawInsert != null) {
this.applicationDetail.tHouseApplyProposedSituation.theGeom = JSON.stringify(this.drawInsert);
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
if(this.applicationDetail.tHouseApplyProposer.existHomestead === 'Y' && this.applicationDetail.tHouseApplyProposedSituation.theGeom) // 新增时 && 已有宅基地时 && 重新画过图且被清理掉
{
this.applicationDetail.tHouseApplyProposedSituation.theGeom = this.convertGeom(this.applicationDetail.tHouseApplyProposedSituation.theGeom);
}
}
if(this.checkString(this.applicationDetail.tHouseApplyProposedSituation.theGeom))
{
this.notify("请标注宅基地位置!", 'danger');
return;
}
console.log("进行保存", this.applicationDetail);
saveHouseBaseInfo(this.applicationDetail).then((response) => {
if(submit)
{
this.id = response.data;
this.submitApplyProposer();
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
}
}).catch((e) => {
this.notify("保存失败!", 'danger');
}).finally(() => {
});
}).catch(e => {
let msg = this.validateBaseApplyFormBase();
if(msg)
{
this.notify(msg, 'danger');
return;
}
}).catch((e) => {
this.notify("保存失败!", 'danger');
}).finally(() => {
});
},
// 判断状态是否符合
@@ -1832,21 +1841,21 @@ export default {
this.applicationDetail.tHouseApplyCurrentSituation.buildingArea= resp.data.scjzmj; //建筑面积
this.applicationDetail.tHouseApplyCurrentSituation.buildingPerArea= (resp.data.scjzmj/(this.applicationDetail.tHouseApplyProposer.members +1)); //人均建筑面积
this.applicationDetail.tHouseApplyCurrentSituation.houseCertificateNo= resp.data.zrzh; //自然幢号
this.applicationDetail.tHouseApplyCurrentSituation.landIsposal= ""; // 现宅基地处置情况
this.applicationDetail.tHouseApplyCurrentSituation.reservedArea= ""; // 保留m²
this.applicationDetail.tHouseApplyCurrentSituation.otherRemark= ""; // 其他
this.applicationDetail.tHouseApplyCurrentSituation.landIsposal= null; // 现宅基地处置情况
this.applicationDetail.tHouseApplyCurrentSituation.reservedArea= null; // 保留m²
this.applicationDetail.tHouseApplyCurrentSituation.otherRemark= null; // 其他
this.renderMapRegion(resp.data.theGeom);
} else {
this.applicationDetail.tHouseApplyProposer.existHomestead ="N";
// 现宅基地及农房情况对象
this.applicationDetail.tHouseApplyCurrentSituation.landArea = ""; //宅基地面积
this.applicationDetail.tHouseApplyCurrentSituation.landPerArea= ""; //人均宅基地面积
this.applicationDetail.tHouseApplyCurrentSituation.landCertificateNo= ""; //权属证书号
this.applicationDetail.tHouseApplyCurrentSituation.buildingPerArea= ""; //人均建筑面积
this.applicationDetail.tHouseApplyCurrentSituation.houseCertificateNo= ""; //权属证书号
this.applicationDetail.tHouseApplyCurrentSituation.landIsposal= ""; // 现宅基地处置情况
this.applicationDetail.tHouseApplyCurrentSituation.reservedArea= ""; // 保留m²
this.applicationDetail.tHouseApplyCurrentSituation.otherRemark= ""; // 其他
this.applicationDetail.tHouseApplyCurrentSituation.landArea = null; //宅基地面积
this.applicationDetail.tHouseApplyCurrentSituation.landPerArea= null; //人均宅基地面积
this.applicationDetail.tHouseApplyCurrentSituation.landCertificateNo= null; //权属证书号
this.applicationDetail.tHouseApplyCurrentSituation.buildingPerArea= null; //人均建筑面积
this.applicationDetail.tHouseApplyCurrentSituation.houseCertificateNo= null; //权属证书号
this.applicationDetail.tHouseApplyCurrentSituation.landIsposal= null; // 现宅基地处置情况
this.applicationDetail.tHouseApplyCurrentSituation.reservedArea= null; // 保留m²
this.applicationDetail.tHouseApplyCurrentSituation.otherRemark= null; // 其他
this.renderMapRegion(null);
}
});
@@ -1894,7 +1903,7 @@ export default {
case PROPOSER_STAGE_BASE_APPLY_ACTIVITY: {
let comment;
const role = this.$store.getters.roles[0];
console.log(role);
//console.log(role);
let msg = "";
switch (role) {
case "town_leader":
@@ -1927,19 +1936,23 @@ export default {
this.applicationDetail.tHouseApproveNatureOptions.theGeom = this.convertGeom(this.applicationDetail.tHouseApplyProposedSituation.theGeom);
}
}
console.log(this.$refs.pictureUploadApplying, this.$refs.pictureUploadApplying.isValid());
//console.log(this.$refs.pictureUploadApplying, this.$refs.pictureUploadApplying.isValid());
if(this.$refs.pictureUploadApplying && this.$refs.pictureUploadApplying.isValid()) {
this.submitHouseApproveLocationplanOptions(pass, comment);
return;
}
break;
default:
comment = this.applicationDetail.tHouseApproveVillageOptions.villageOption;
if(this.checkString(this.applicationDetail.tHouseApproveVillageOptions.villageOption))
msg = '村领导意见不能为空';
else
comment = this.applicationDetail.tHouseApproveVillageOptions.villageOption;
break;
}
if (msg) {
this.notify(msg, 'danger');
break;
this.$refs.form.validate().then(() => {}).catch((e)=>{})
return;
}

saveHouseBaseInfo(this.applicationDetail).then((response) => {
@@ -1968,7 +1981,8 @@ export default {
}
if (msg) {
this.notify(msg, 'danger');
break;
this.$refs.form.validate().then(() => {}).catch(e=>{});
return;
}

if (this.$refs.pictureUploadAccepting && this.$refs.pictureUploadAccepting.isValid()) {
@@ -2110,66 +2124,82 @@ export default {
},
// 保存开工(是否提交)
startProposerApply(submit) {
let msg = this.validateStartFormBase();
if (msg) {
this.notify(msg, 'danger');
return;
}
updateStart({
id: this.applicationDetail.tHouseApplyStart.id,
startDate: this.applicationDetail.tHouseApplyStart.startDate,
endDate: this.applicationDetail.tHouseApplyStart.endDate,
}).then(resp => {
if(submit)
{
submitStartWLHT(this.applicationDetail.tHouseApplyStart.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
}).catch((e) => {
this.notify("操作失败!", 'danger');
});
this.$refs.form.validate().then(() => {
let msg = this.validateStartFormBase();
if (msg) {
this.notify(msg, 'danger');
return;
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
updateStart({
id: this.applicationDetail.tHouseApplyStart.id,
startDate: this.applicationDetail.tHouseApplyStart.startDate,
endDate: this.applicationDetail.tHouseApplyStart.endDate,
}).then(resp => {
if(submit)
{
submitStartWLHT(this.applicationDetail.tHouseApplyStart.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
}).catch((e) => {
this.notify("操作失败!", 'danger');
});
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
}
}).catch((e) => {
this.notify('保存失败', 'danger');
});
}).catch(e => {
let msg = this.validateStartFormBase();
if (msg) {
this.notify(msg, 'danger');
return;
}
}).catch((e) => {
this.notify('保存失败', 'danger');
});
},
// 保存验收(是否提交)
endProposerApply(submit) {
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);
this.$refs.form.validate().then(() => {
let msg = this.validateAcceptingFormBase();
if (msg) {
this.notify(msg, 'danger');
return;
}
}
updateEnd(this.applicationDetail.tHouseApplyEnd).then(resp => {
if(submit)
{
submitEndWLHT(this.applicationDetail.tHouseApplyEnd.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
}).catch(err => {
this.notify("操作失败!", 'danger');
});
if (this.drawInsert != null) {
this.applicationDetail.tHouseApplyEnd.theGeom = JSON.stringify(this.drawInsert);
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
else {
if(this.applicationDetail.tHouseApplyEnd.theGeom == null){
this.applicationDetail.tHouseApplyEnd.theGeom = this.convertGeom(this.applicationDetail.tHouseApproveNatureOptions.theGeom);
}
}
updateEnd(this.applicationDetail.tHouseApplyEnd).then(resp => {
if(submit)
{
submitEndWLHT(this.applicationDetail.tHouseApplyEnd.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
}).catch(err => {
this.notify("操作失败!", 'danger');
});
}
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
}
}).catch(err => {
this.notify('保存失败', 'danger');
});
}).catch(e => {
let msg = this.validateAcceptingFormBase();
if (msg) {
this.notify(msg, 'danger');
return;
}
}).catch(err => {
this.notify('保存失败', 'danger');
});
},
// 获取登录人位置坐标


Ladataan…
Peruuta
Tallenna