diff --git a/src/api/homesteadSurvey/index.js b/src/api/homesteadSurvey/index.js
index f1eed6cc..b41f3078 100644
--- a/src/api/homesteadSurvey/index.js
+++ b/src/api/homesteadSurvey/index.js
@@ -76,6 +76,14 @@ export function sysConfig(query) {
})
}
+// 查询全部乡镇数据
+export function getTownInfo(deptId) {
+ return request({
+ url: '/system/dept/getTownByCounty/'+deptId ,
+ method: 'get'
+ })
+}
+
// 查询数据调查任务列表
export function userList() {
return request({
diff --git a/src/store/getters.js b/src/store/getters.js
index fcc6c3b6..0123ff8a 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -8,6 +8,7 @@ const getters = {
bookName: state => state.user.bookName,
deptName: state => state.user.deptName,
nickName: state => state.user.nickName,
+ userId: state => state.user.userId,
baseRoutingUrl: state => state.user.baseRoutingUrl,
businessLevel: state => state.user.businessLevel,
}
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 6006a5f0..fe1cc16d 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -16,6 +16,7 @@ const user = {
nickName: '',
baseRoutingUrl: '',
businessLevel: '',
+ userId:null,
},
mutations: {
@@ -25,6 +26,9 @@ const user = {
SET_NAME: (state, name) => {
state.name = name
},
+ SET_USERID: (state, userId) => {
+ state.userId = userId
+ },
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
},
@@ -68,6 +72,30 @@ const user = {
login(username, password, code, uuid).then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)
+ getInfo(res.token).then(response => {
+ const user = response.user
+ // const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
+ const avatar = "";
+ if (response.roles && response.roles.length > 0) { // 验证返回的roles是否是一个非空数组
+ commit('SET_ROLES', response.roles)
+ commit('SET_PERMISSIONS', response.permissions)
+ } else {
+ commit('SET_ROLES', ['ROLE_DEFAULT'])
+ }
+ commit('SET_BOOKNAME', user.bookName)
+ commit('SET_NAME', user.userName)
+ commit('SET_USERID', user.userId)
+ commit('SET_LOGINDEPTID', user.loginDeptId)
+ commit('SET_LOGINBOOKID', user.loginBookId)
+ commit('SET_DEPTNAME', user.deptName)
+ commit('SET_AVATAR', avatar)
+ commit('SET_NICKNAME', user.nickName);
+ commit('SET_businessLevel', user.businessLevel);
+ //commit('SET_businessLevel', 'TEST');
+ getSystemAttachmentUrl().then((resp) => {
+ commit('SET_baseRoutingUrl', resp.msg);
+ });
+ })
Cookies.set("_Login_url", window.location.href);
resolve()
}).catch(error => {
@@ -127,6 +155,7 @@ const user = {
}
commit('SET_BOOKNAME', user.bookName)
commit('SET_NAME', user.userName)
+ commit('SET_USERID', user.userId)
commit('SET_LOGINDEPTID', user.loginDeptId)
commit('SET_LOGINBOOKID', user.loginBookId)
commit('SET_DEPTNAME', user.deptName)
@@ -134,7 +163,7 @@ const user = {
commit('SET_NICKNAME', user.nickName);
commit('SET_businessLevel', user.businessLevel);
//commit('SET_businessLevel', 'TEST');
-
+ console.info(user.businessLevel);
getSystemAttachmentUrl().then((resp) => {
commit('SET_baseRoutingUrl', resp.msg);
});
@@ -150,6 +179,7 @@ const user = {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
commit('SET_TOKEN', '')
+ commit('SET_businessLevel', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
removeToken()
diff --git a/src/views/homesteadLogin.vue b/src/views/homesteadLogin.vue
index 8b535374..e2437d96 100644
--- a/src/views/homesteadLogin.vue
+++ b/src/views/homesteadLogin.vue
@@ -45,9 +45,6 @@
:rules="[{ required: true, message:'' }]"
/>
-
- {{showMessage ? "记住手机号" : "记住密码"}}
-
+
+ {{showMessage ? "记住手机号" : "记住密码"}}
+
- 登 入
+ 登 录
diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue
index fd575b7c..a19656fd 100644
--- a/src/views/homesteadSurvey/add.vue
+++ b/src/views/homesteadSurvey/add.vue
@@ -5,6 +5,8 @@
@@ -54,15 +56,15 @@
placeholder="行政区划名称"
:rules="[{ required: true, message: '' }]"
/>-->
-
+
+
- 保存
+ 保存
@@ -773,15 +793,10 @@ export default {
return {
active:1,
// 使用权人列表
- syqrlist:[
- {
- shyqrdbxm :'测试测试',
- shyqrdbzjhm :'12324648564',
- nhdm :'777888999',
- }
- ],
+ suyqrList:[],
// 地图绘制
drawInsert: null,
+ permission:false,
// 当前位置信息
tGeoOrganizationLat: null,
tGeoOrganizationLng: null,
@@ -799,7 +814,7 @@ export default {
created(){
let data = this.$route.query.res;
this.form = JSON.parse(localStorage.getItem("zjdzdxxItem"));
- console.info( this.form);
+ this.permission = localStorage.getItem("executePermission");
if(this.form.sfcz === "1"){
this.showCzmj = true;
}
@@ -811,8 +826,10 @@ export default {
if(this.form.zjdlyzk !== "1"){
this.showXzyy = true;
}
+ listSuyqr({}).then((response) => {
+ this.suyqrList = response.rows;
+ });
this.$nextTick(() => {
-
this.pointDarw(null);
// this.pointDarwNature(null);
this.$refs.pointDarwMap && this.$refs.pointDarwMap.update();
@@ -820,34 +837,60 @@ export default {
},
mounted(){
+ },
+ watch:{
+ "form.zjdpzmj":function (newVal,oldVal){
+ if(newVal < 0){
+ this.form.zjdpzmj = "";
+ return false;
+ }
+ if(newVal === "" && oldVal && oldVal.toString().indexOf(".") > 0){
+ this.form.zjdpzmj = oldVal;
+ return false;
+ }
+ if(newVal){
+ newVal = newVal.toString();
+ let pointIndex = newVal.indexOf(".");
+ if(pointIndex > 0 && newVal.length - pointIndex > 3){
+ this.form.zjdpzmj = oldVal;
+ return true;
+ }
+ }
+ }
},
methods: {
submitzjd(){
this.$refs.form.validate().then(() => {
if(this.form.id == null){
+ let surveyItem = JSON.parse(localStorage.getItem("surveyItem"));
+ this.$set(this.form, 'surveyId', surveyItem.id);
addZjdzd(this.form).then(response => {
let _this =this;
- localStorage.setItem("zjdzdxxItem",JSON.stringify(this.form));
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
- }
+ getZjdzd(response.data).then((res) => {
+ localStorage.setItem("zjdzdxxItem",JSON.stringify(res.data));
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.$router.push({path:'/homesteadSurvey/add2'});
+ }
+ })
})
});
}else{
updateZjdzd(this.form).then(response => {
let _this =this;
- localStorage.setItem("zjdzdxxItem",JSON.stringify(this.form));
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
- }
+ getZjdzd(this.form.id).then((res) => {
+ localStorage.setItem("zjdzdxxItem",JSON.stringify(res.data));
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.$router.push({path:'/homesteadSurvey/add2'});
+ }
+ })
})
});
}
@@ -857,6 +900,13 @@ export default {
});
},
+ validator(val){
+ if(val>1||val<0||val.length>4){
+ return false
+ }else{
+ return true
+ }
+ },
guidProduct(){
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
@@ -933,6 +983,30 @@ export default {
this.drawInsert = data;
this.form.theGeomJson = JSON.stringify(this.drawInsert);
},
+ // 获取登录人位置坐标
+ getLandCoord(func) {
+ if (func
+ && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== ''
+ && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') {
+ this.$nextTick(() => {
+ func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
+ })
+ }
+ else {
+ 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);
+ }
+ }
+ });
+ }
+ },
// 当申请地图被重置时
onMapDrawReseted() {
this.drawInsert = null;
@@ -957,6 +1031,9 @@ export default {
this.$router.push({name: this.$router.back(-1)});
// }
},
+ goRightBack(){
+ this.$router.push({path:'/homesteadSurvey/list'});
+ }
}
}
@@ -982,6 +1059,10 @@ export default {
left:0;
bottom:0;
}
+
+/deep/ .van-nav-bar__text {
+ color: #fff;
+}
>>> .delete-button {
height: 100%;
}
diff --git a/src/views/homesteadSurvey/add2.vue b/src/views/homesteadSurvey/add2.vue
index 17928c41..d38b4468 100644
--- a/src/views/homesteadSurvey/add2.vue
+++ b/src/views/homesteadSurvey/add2.vue
@@ -5,6 +5,8 @@
@@ -50,6 +52,13 @@
+
-
+
-
-
+
+
@@ -116,6 +125,10 @@ export default {
data() {
return {
active:2,
+ loading:false,
+ finished:false,
+ permission:false,
+ countyhc:1,
// 使用权人列表
zjdzdxx:{},
syqrlist:[],
@@ -123,17 +136,57 @@ export default {
},
created(){
this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
- this.getList();
+ this.permission = localStorage.getItem("executePermission");
+ if(this.zjdzdxx.zjddm != null ){
+ this.getList();
+ }
},
mounted(){
},
methods: {
getList(){
- getShyqrs({zjddm:this.zjdzdxx.zjddm}).then(response => {
+ let params = {
+ zjddm:this.zjdzdxx.zjddm,
+ pageNum: 1,
+ pageSize:10,
+ }
+ getShyqrs(params).then(response => {
this.syqrlist = response.rows;
+ if(response.rows.length>0&&response.rows.length
{
+ if(response.rows.length>0&&response.rows.length {
+ this.syqrlist.push(res)
+ })
+ this.countyhc++
+ this.loading = false
+ }else{
+ this.loading = false
+ this.finished = true
+ }
+ });
+ }
+
+ },
goBack(){
if(this.ztMap && this.enterMap ==1){
if(this.form.id == null){
@@ -194,4 +247,7 @@ export default {
>>> .label-class .van-collapse-item__title--expanded{
font-weight: bold;
}
+/deep/ .van-nav-bar__text {
+ color: #fff;
+}
diff --git a/src/views/homesteadSurvey/add3.vue b/src/views/homesteadSurvey/add3.vue
index 7b0a6735..8a2b78cf 100644
--- a/src/views/homesteadSurvey/add3.vue
+++ b/src/views/homesteadSurvey/add3.vue
@@ -5,6 +5,8 @@
@@ -50,6 +52,13 @@
+
-
+
-
+
+
@@ -108,21 +118,40 @@ export default {
data() {
return {
active:3,
+ loading:false,
+ finished:false,
+ permission:false,
+ countyhc:1,
zjdzdxx:{},
zrzlist:[]
};
},
created(){
this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
- this.getList();
+ this.permission = localStorage.getItem("executePermission");
+ if(this.zjdzdxx.zjddm != null ){
+ this.getList();
+ }
},
mounted(){
},
methods: {
getList(){
- listZrz({zjddm:this.zjdzdxx.zjddm}).then(response => {
+ let params = {
+ zjddm:this.zjdzdxx.zjddm,
+ pageNum: this.countyhc+1,
+ pageSize:10,
+ }
+ listZrz(params).then(response => {
this.zrzlist = response.rows;
+ if(response.rows.length>0&&response.rows.length
{
+ if(response.rows.length>0&&response.rows.length {
+ this.zrzlist.push(res)
+ })
+ this.countyhc++
+ this.loading = false
+ }else{
+ this.loading = false
+ this.finished = true
+ }
+ });
+ }
+ },
+ goRightBack(){
+ this.$router.push({path:'/homesteadSurvey/list'});
+ },
showPopupzrz(val){
this.$router.push({name:'zrzAdd',query:val});
},
@@ -183,4 +236,7 @@ export default {
>>> .label-class .van-collapse-item__title--expanded{
font-weight: bold;
}
+/deep/ .van-nav-bar__text {
+ color: #fff;
+}
diff --git a/src/views/homesteadSurvey/add4.vue b/src/views/homesteadSurvey/add4.vue
index d4588b63..dbd27a50 100644
--- a/src/views/homesteadSurvey/add4.vue
+++ b/src/views/homesteadSurvey/add4.vue
@@ -5,6 +5,8 @@
@@ -50,6 +52,13 @@
+
-
+
-
+
+
-
+ 添加附属设施信息
+
+ 添加附属设施信息
-
+
异常标记
@@ -123,33 +133,46 @@
保存提交
+
+
+
+
+
+
+ 备注图片
+
+
+
+
+
+
+
+