Sfoglia il codice sorgente

宅基地调查优化

rongxin_prod
Xyq123* 1 anno fa
parent
commit
9263b46309
3 ha cambiato i file con 134 aggiunte e 72 eliminazioni
  1. +72
    -29
      src/views/homesteadSurvey/index.vue
  2. +1
    -1
      src/views/homesteadSurvey/list.vue
  3. +61
    -42
      src/views/homesteadSurvey/list4.vue

+ 72
- 29
src/views/homesteadSurvey/index.vue Vedi File

@@ -70,7 +70,13 @@
</div>
</div>
<div v-if="active==1" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;">
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask" :immediate-check="false">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
:immediate-check="false"
@load="onRefreshtask"
>
<van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;">
<template #title>
@@ -93,10 +99,17 @@
<p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p>
</template>
</van-cell>
</van-pull-refresh>
</van-list>

</div>
<div v-if="active==2" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;">
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
:immediate-check="false"
@load="onRefreshtask"
>
<van-cell v-for="(item,index) in doneList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;">
<template #title>
@@ -120,10 +133,16 @@
<p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p>
</template>
</van-cell>
</van-pull-refresh>
</van-list>
</div>
<div v-if="active==3" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;">
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
:immediate-check="false"
@load="onRefreshtask"
>
<van-cell v-for="(item,index) in todoList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;">
<template #title>
@@ -146,7 +165,7 @@
<p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p>
</template>
</van-cell>
</van-pull-refresh>
</van-list>
</div>

</div>
@@ -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.length<response.total){
if(response.rows.length>0&&this.totalList.length<response.total){
response.rows.map(res => {
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.length<response.total){
if(response.rows.lenght>0&&this.doneList.length<response.total){
response.rows.map(res => {
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.length<response.total){
if(response.rows.length>0&&this.todoList.length<response.total){
response.rows.map(res => {
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) {


+ 1
- 1
src/views/homesteadSurvey/list.vue Vedi File

@@ -800,7 +800,7 @@
this.loading2 = false
}else{
this.loading2 = false
this.loading2 = true
this.finished2 = true
}
});
}else if(this.active==1&&this.loading2){


+ 61
- 42
src/views/homesteadSurvey/list4.vue Vedi File

@@ -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,


Caricamento…
Annulla
Salva