From 9263b46309353e04529c8ac09e56526b919e392d Mon Sep 17 00:00:00 2001
From: xyq <392009588@qq.com>
Date: Wed, 20 Sep 2023 18:11:52 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83=E6=9F=A5?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/homesteadSurvey/index.vue | 101 +++++++++++++++++++--------
src/views/homesteadSurvey/list.vue | 2 +-
src/views/homesteadSurvey/list4.vue | 103 ++++++++++++++++------------
3 files changed, 134 insertions(+), 72 deletions(-)
diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue
index 014ff227..780ff646 100644
--- a/src/views/homesteadSurvey/index.vue
+++ b/src/views/homesteadSurvey/index.vue
@@ -70,7 +70,13 @@
-
+
@@ -93,10 +99,17 @@
{{item.rwzxr}}
-
+
+
-
+
@@ -120,10 +133,16 @@
{{item.rwzxr}}
-
+
-
+
@@ -146,7 +165,7 @@
{{item.rwzxr}}
-
+
@@ -207,9 +226,9 @@
nickName:"",
text:0,
isLoadingtask:false,
- countqb:0,
- countyhc:0,
- countwhc:0,
+ countqb:1,
+ countyhc:1,
+ countwhc:1,
//宅调人员列表
taskExecutortions:[],
@@ -329,51 +348,63 @@
onRefreshtask(){
this.isLoadingtask = false;
let _this = this
- if(this.active==1){
+ if(this.active==1 && this.loading ){
let params = {
"rwfbzt":"PUBLISHED",
- "params":{deptId:this.$store.state.user.loginDeptId},
+ "params":this.queryParams.params,
+ "parentId":this.queryParams.parentId,
"pageNum": this.countyhc+1,
- "pageSize":10,
+ "pageSize":4,
}
listTask(params).then((response) => {
- if(response.rows.length>0&&this.doneList.length0&&this.totalList.length {
- this.doneList.unshift(res)
+ this.totalList.push(res)
})
this.countyhc++
+ this.loading = false;
+ }else{
+ this.finished = true;
}
});
- }else if(this.active==2){
+ }else if(this.active==2 && this.loading){
let params = {
"rwwczt": "PUBLISHED",
"rwfbzt":"PUBLISHED",
- "params":{deptId:this.$store.state.user.loginDeptId},
+ "params":this.queryParams.params,
+ "parentId":this.queryParams.parentId,
"pageNum": this.countwhc+1,
- "pageSize":10,
+ "pageSize":4,
}
listTask(params).then((response) => {
- if(response.rows.lenght>0&&this.todoList.length0&&this.doneList.length {
- this.todoList.unshift(res)
+ this.doneList.push(res)
})
this.countwhc++
+ this.loading = false;
+ }else{
+ this.finished = true;
}
});
- }else{
+ }else if(this.active==3 && this.loading){
let params = {
- "rwwczt": "UNPUBLISHED",
+ "rwwczt": "UNFINISHED",
"rwfbzt":"PUBLISHED",
- "params":{deptId:this.$store.state.user.loginDeptId},
+ "params":this.queryParams.params,
+ "parentId":this.queryParams.parentId,
"pageNum": this.countqb+1,
- "pageSize":10,
+ "pageSize":4,
}
listTask(params).then((response) => {
- if(response.rows.length>0&&this.totalList.length0&&this.todoList.length {
- this.totalList.unshift(res)
+ this.todoList.push(res)
})
this.countqb++
+ this.loading = false;
+ }else{
+ this.finished = true
}
});
}
@@ -440,6 +471,14 @@
this.queryNum();
},
checkBadge(){
+ this.finished = false;
+ this.loading = false;
+ this.countqb = 1;
+ this.countyhc = 1;
+ this.countwhc = 1;
+ this.totalList = []
+ this.doneList = [];
+ this.todoList = [];
this.getList();
this.queryNum();
},
@@ -464,10 +503,14 @@
});
}else{
this.$set(this.switchParams, "rwzxr", null);
+ if(this.switchParams.parentId == null){
+ this.$set(this.switchParams, "params", {deptId:100});
+ }
listTask(this.switchParams).then(response => {
this.done = 0;
this.todo = 0;
this.total = response.total;
+ console.info(this.total)
response.rows.map(res => {
if(res.rwwczt == "FINISHED"){
this.done+=1
@@ -485,16 +528,16 @@
if(this.active==1) {
this.$set(this.queryParams, "rwfbzt", "PUBLISHED");
this.$set(this.queryParams, "rwwczt", null);
- this.$set(this.queryParams, "pageNum", this.countyhc + 1);
- this.$set(this.queryParams, "pageSize", 10);
+ this.$set(this.queryParams, "pageNum", this.countyhc);
+ this.$set(this.queryParams, "pageSize", 4);
}else if(this.active==2) {
this.$set(this.queryParams, "rwwczt", "FINISHED");
this.$set(this.queryParams, "rwfbzt", "PUBLISHED");
- this.$set(this.queryParams, "pageNum", this.countwhc + 1);
+ this.$set(this.queryParams, "pageNum", this.countwhc);
}else{
this.$set(this.queryParams, "rwwczt", "UNFINISHED");
this.$set(this.queryParams, "rwfbzt", "PUBLISHED");
- this.$set(this.queryParams, "pageNum", this.countqb + 1);
+ this.$set(this.queryParams, "pageNum", this.countqb);
}
listTask(this.queryParams).then(response => {
if(this.active==1) {
diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue
index 3463933d..886fe8f1 100644
--- a/src/views/homesteadSurvey/list.vue
+++ b/src/views/homesteadSurvey/list.vue
@@ -800,7 +800,7 @@
this.loading2 = false
}else{
this.loading2 = false
- this.loading2 = true
+ this.finished2 = true
}
});
}else if(this.active==1&&this.loading2){
diff --git a/src/views/homesteadSurvey/list4.vue b/src/views/homesteadSurvey/list4.vue
index 883e12e3..6602c972 100644
--- a/src/views/homesteadSurvey/list4.vue
+++ b/src/views/homesteadSurvey/list4.vue
@@ -1228,7 +1228,7 @@
import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr";
import {listZrz,getZrzZjdDmList,getZrz} from "@/api/homesteadSurvey/zrz";
import {listFsss,getFsssZjdDmList,getFsss} from "@/api/homesteadSurvey/fsss";
- import {getGeoServerConfigKey} from "@/api/system/config";
+ import {getGeoServerConfigKey,getConfigKey} from "@/api/system/config";
import { listTown, getTown } from "@/api/homesteadSurvey/town";
import { listVillage} from "@/api/homesteadSurvey/village";
import {deptGetId,} from "@/api/homestead/index";
@@ -1287,6 +1287,11 @@
showhncylist:false,
showhncy:false,
activeBtn:4,
+ mapGeoServerUrl:"",
+ mobileSurveykey:'',
+ mobileSurveyZrzkey:"",
+ mobileSurveyFssskey:"",
+ mobileSurveyCjqykey:"",
value:'',
// 宅基地搜索框
zjdvalue:"",
@@ -3018,6 +3023,18 @@
// });
// }
// });
+ getConfigKey("geoserver.layer.homestead.mobileSurvey").then(response => {
+ this.mobileSurveykey = response.msg;
+ });
+ getConfigKey("geoserver.layer.building").then(response => {
+ this.mobileSurveyZrzkey = response.msg;
+ });
+ getConfigKey("geoserver.layer.annex").then(response => {
+ this.mobileSurveyFssskey = response.msg;
+ });
+ getConfigKey("geoserver.layer.villageBorder").then(response => {
+ this.mobileSurveyCjqykey = response.msg;
+ });
//通过数据直接查询方式--------加载较慢 end
getGeoServerConfigKey().then(response => {
this.mapGeoServerUrl = response.msg;
@@ -3025,6 +3042,7 @@
this.GetMapsInit();
}, 300);
});
+
var that = this;
setTimeout(function () {
var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
@@ -3109,7 +3127,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_cjqy',
+ LAYERS: that.mobileSurveyCjqykey,
TILED: true,
cql_filter: cql_filter,
SRID: 3857,
@@ -3285,22 +3303,22 @@
//村边界查询开始 ------------------------------end
//国有数据加载-----------------------------------start
- deptGetId(that.surveyItem.deptId).then((res) => {
- var cql_filter_guoyou = "ZLDWDM='" + res.data.orgCode + "0000000'";
- var guoyouTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_gydl/wms",
- params: {
- LAYERS: 'zjd_gydl:DLTB',
- TILED: true,
- cql_filter: cql_filter_guoyou,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(guoyouTc);
- });
+ // deptGetId(that.surveyItem.deptId).then((res) => {
+ // var cql_filter_guoyou = "ZLDWDM='" + res.data.orgCode + "0000000'";
+ // var guoyouTc = new ol.layer.Image({
+ // source: new ol.source.ImageWMS({
+ // url: that.mapGeoServerUrl + "/wms",
+ // params: {
+ // LAYERS: 'zjd_gydl:DLTB',
+ // TILED: true,
+ // cql_filter: cql_filter_guoyou,
+ // SRID: 3857,
+ // TIMESTAMP: new Date().getTime(),
+ // },
+ // }),
+ // });
+ // map.addLayer(guoyouTc);
+ // });
//国有数据加载----------------------------------end
//宅基地图层查询开始 ------------------start
//var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'";
@@ -3308,7 +3326,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey',
+ LAYERS: that.mobileSurveykey,
TILED: true,
cql_filter: cql_filter+" and survey_status = '1'",
SRID: 3857,
@@ -3320,7 +3338,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey',
+ LAYERS: that.mobileSurveykey,
TILED: true,
cql_filter: cql_filter+" and survey_status = '2'",
SRID: 3857,
@@ -3332,7 +3350,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey',
+ LAYERS: that.mobileSurveykey,
TILED: true,
cql_filter: cql_filter+" and survey_status = '3'",
SRID: 3857,
@@ -3344,7 +3362,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey',
+ LAYERS: that.mobileSurveykey,
TILED: true,
cql_filter: cql_filter+" and survey_status = '4'",
SRID: 3857,
@@ -3356,7 +3374,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey',
+ LAYERS: that.mobileSurveykey,
TILED: true,
cql_filter: cql_filter+" and survey_status = '5'",
SRID: 3857,
@@ -3370,7 +3388,7 @@
service: "WFS",
version: "1.0.0",
request: "GetFeature",
- typename: "nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey",
+ typename:that.mobileSurveykey,
//featureNS: 'nsgk_hc',//命名空间 URI
cql_filter: cql_filter,
//featurePrefix: 'nationalwater',//工作区名称
@@ -3400,7 +3418,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_zrz',
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -3416,7 +3434,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_fsss',
+ LAYERS: that.mobileSurveyFssskey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -3533,7 +3551,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_zrz',
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
cql_filter: cql_filter,
SRID: 3857,
@@ -3549,7 +3567,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_fsss',
+ LAYERS: that.mobileSurveyFssskey,
TILED: true,
cql_filter: cql_filter,
SRID: 3857,
@@ -4602,7 +4620,7 @@
service: "WFS",
version: "1.0.0",
request: "GetFeature",
- typename: "nsgk_wulanhaote:t_homespace_cjqy",
+ typename: that.mobileSurveyCjqykey,
//featureNS: 'nsgk_hc',//命名空间 URI
cql_filter: cql_filter,
//featurePrefix: 'nationalwater',//工作区名称
@@ -4624,10 +4642,11 @@
return geojsonmap;
})
.then((data) => {
- let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
- resolution:resolution + Math.random() * 0.00000001,
- map.getView().fit(data.bbox);
- map.getView().setResolution(resolution);
+ let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
+ resolution:resolution + Math.random() * 0.00000001,
+ map.getView().fit(data.bbox);
+ map.getView().setResolution(resolution);
+
// var datamap = data.bbox;
// var center = ol.extent.getCenter(datamap);
// map.getView().animate({
@@ -4655,7 +4674,7 @@
var wmsSource = new ol.source.TileWMS({
url: that.mapGeoServerUrl+"/wms",
params: {
- LAYERS: "nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey",
+ LAYERS:that.mobileSurveykey,
TILED: true,
SRID: 3857,
serverType: "geoserver",
@@ -4668,7 +4687,7 @@
var ZjdwmsSource = new ol.source.TileWMS({
url: that.mapGeoServerUrl+"/wms",
params: {
- LAYERS: "nsgk_wulanhaote:t_homestead_zjdzdxx_mobile_survey",
+ LAYERS: that.mobileSurveykey,
TILED: true,
SRID: 3857,
serverType: "geoserver",
@@ -4681,7 +4700,7 @@
var ZrzwmsSource = new ol.source.TileWMS({
url: that.mapGeoServerUrl+"/wms",
params: {
- LAYERS: "nsgk_wulanhaote:t_homespace_zrz",
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
SRID: 3857,
serverType: "geoserver",
@@ -4694,7 +4713,7 @@
var FssswmsSource = new ol.source.TileWMS({
url: that.mapGeoServerUrl+"/wms",
params: {
- LAYERS: "nsgk_wulanhaote:t_homestead_fsss",
+ LAYERS: that.mobileSurveyFssskey,
TILED: true,
SRID: 3857,
serverType: "geoserver",
@@ -4879,7 +4898,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_zrz',
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -5068,7 +5087,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_zrz',
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -5084,7 +5103,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_fsss',
+ LAYERS: that.mobileSurveyFssskey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -5255,7 +5274,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homespace_zrz',
+ LAYERS: that.mobileSurveyZrzkey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,
@@ -5271,7 +5290,7 @@
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl + "/wms",
params: {
- LAYERS: 'nsgk_wulanhaote:t_homestead_fsss',
+ LAYERS: that.mobileSurveyFssskey,
TILED: true,
cql_filter: cql_filter_map,
SRID: 3857,