5a95f8e7 by zhaoqian

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/zd/zddcb/index.vue
2 parents ee7a9031 4a16a083
......@@ -208,3 +208,4 @@ export function registerCall(data) {
data:data
})
}
......
......@@ -10,6 +10,10 @@ export function getSearchList(data) {
})
}
/**
* 宗地分割选择宗地列表
* @param data
*/
export function zdlist(data) {
return request({
url: '/zd/qjZdjbxx/zdlist',
......@@ -17,3 +21,15 @@ export function zdlist(data) {
data:data
})
}
/**
* 多幢分割选择多幢列表
* @param data
*/
export function dzList(data) {
return request({
url:'/fw/qjDz/dzlist',
method:'post',
data:data
})
}
......
......@@ -23,7 +23,15 @@
"color": "#f50325",
"width": 1
}
},
"importSymbol": {
"type": "simple-fill",
"color": [ 245,3, 37, 0.4 ],
"style": "none",
"outline": {
"color": "#006cff",
"width": 2
}
}
}
}
\ No newline at end of file
......
<template>
<div>
<el-dialog
title="新增"
:visible.sync="isVisible"
width="70%"
@close="close"
:modal-append-to-body="false"
center>
<div class="search">
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="宗地编码">
<el-input
v-model="queryData.zddm"
placeholder="输入宗地编码"
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
></el-input>
</el-form-item>
<el-button type="primary" style="margin-left:30px" @click="search">查询</el-button>
<el-button type="warning" @click="reset">重置</el-button>
</el-form>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="权利人">
<el-input
v-model="queryData.qlrmc"
placeholder="输入权利人"
></el-input>
</el-form-item>
<el-form-item label="坐落">
<el-input
v-model="queryData.zl"
placeholder="输入坐落"
></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="table-bode">
<table border="1">
<tr>
<td>序号</td>
<td>操作</td>
<td>宗地代码</td>
<td>不动产单元号</td>
<td>项目名称</td>
<td>不动产权证号</td>
<td>权利人</td>
<td>坐落</td>
</tr>
<tr v-if="Data.length==0">
<td colspan="8">
<span class="noData">暂无数据</span>
</td>
</tr>
<tr v-else v-for="(item,index) in Data" :key="index">
<td>{{index+1}}</td>
<td @click="addData(item)" class="xz">
<span>选择</span>
</td>
<td>{{item.zddm}}</td>
<td>{{item.bdcdyh}}</td>
<td>{{item.xmmc}}</td>
<td>{{item.bdcqzh}}</td>
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
</tr>
</table>
</div>
</div>
<div class="page">
<el-pagination
background
layout="prev, pager, next,total"
:page-size="queryData.pageSize"
:total="total"
@current-change="currentChange"
>
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
import {dzList} from './../../api/search'
export default {
name: "zdQueryData",
data() {
return {
total: 1,
queryData: {
bdcdyh: "",
bdcqzh: "",
qlrmc: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 10,
},
Data: [],
isVisible: false
}
},
props: {
centerDialogVisible: {
type: Boolean,
default: function () {
return false
}
},
isClose: {
type: Boolean,
default: false
}
},
mounted() {
this.getData(this.queryData)
},
created() {
},
methods: {
currentChange: function (val) {
this.queryData.pageNo = val;
this.getData(this.queryData);
},
reset: function () {
this.queryData = {
bdcdyh: "",
bdcqzh: "",
qlrmc: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 10
};
this.getData(this.queryData)
},
getData: function (data) {
dzList(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
})
},
search: function () {
this.getData(this.queryData)
},
addData: function (val) {
this.$emit("getData", val)
if (this.isClose) {
this.close();
}
},
close: function () {
this.$emit('close')
this.reset();
}
},
watch: {
centerDialogVisible(val) {
this.isVisible = val
}
}
}
</script>
<style scoped lang="less">
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
width: 80%;
}
/deep/ .el-form-item__label {
width: 96px;
text-align: right;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
tr:hover {
background-color: #F5F7FA;
}
}
td {
text-align: center;
height: 36px;
min-width: 50px;
}
table:hover {
cursor: pointer;
}
.inputtitle {
line-height: 40px;
}
.shop {
margin-top: 20px;
}
.xz {
color: blue;
}
.noData {
color: #b2b2b2;
}
.table-bode{
height: 450px;
}
.page {
margin-top: 20px;
}
</style>
......@@ -67,7 +67,7 @@
<li @click="exportToShp">ESRI Shape</li>
</ul>
</li>
<li v-show="isZD">导入属性</li>
<li v-show="isZD" @click="drsx">导入属性</li>
<li v-show="!isZD">导入楼盘</li>
<li>重叠分析</li>
<li v-show="isZD && (zdQszt == '1' || zdQszt == '2')" @click="openCreateDialog">添加定着物</li>
......@@ -101,13 +101,15 @@
<li v-show="zdData.type == 'zdy'" @click="deleteZdy">删除</li>
</ul>
<el-dialog title="导入图形" :visible.sync="improtDialog">
<!--@close="closeImportDialog"-->
<el-dialog title="导入图形" :modal="false" :close-on-click-modal="false" custom-class="importDialog" :visible.sync="improtDialog" width="30%" @close="closeImportDialog">
<import-geo :property-info="zdData" :timeLine="new Date().getTime()" :geo-info="currentClickZdGeo" @closeImportDialog="closeImportDialog"></import-geo>
</el-dialog>
<!-- 添加定着物弹框 -->
<el-dialog title="新建" :visible.sync="dialogVisible" width="48%">
<Create @closeDialog="closeDialog" :auth="true"></Create>
</el-dialog>
<sxdr :sxdr-visible="sxdrVisible" @close="sxdrClose" :dylx="zdData.type" :bsm="zdData.bsm"></sxdr>
</div>
</template>
<script>
......@@ -119,6 +121,7 @@ import geoUtils from "@components/lineTree/tx/js/geoUtils";
import featureUpdate from "@libs/map/featureUpdate";
import {deleteLjz,deleteZdy} from "./../../api/lpb"
import exportTemJson from '@/assets/json/exportTemplate.json'
import sxdr from './../../components/sxdr/sxdr'
export default {
inheritAttrs: false,
props: {
......@@ -132,10 +135,11 @@ export default {
default: false,
}
},
components: { lineItem,Create,ImportGeo },
components: { lineItem,Create,ImportGeo,sxdr },
mixins:[geoUtils,featureUpdate],
data() {
return {
sxdrVisible:false,
selectedDetail: {},
timer: {},
formatData: [],
......@@ -195,6 +199,12 @@ export default {
},
methods: {
drsx(){
this.sxdrVisible=true;
},
sxdrClose(){
this.sxdrVisible=false;
},
loading(){
this.$emit("loading")
},
......@@ -432,6 +442,7 @@ export default {
}else {
BSM = this.zdData.bsm;
}
//当确定导入图形是 跳转到图形界面
this.queryGeoByBsm(BSM,type,function (features){
if(features && features.length > 0){
if(features[0].geometry){
......@@ -440,6 +451,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
self.postionToMap();
self.improtDialog = true;
self.currentClickZdGeo = features[0];
}).catch(() => {
......@@ -449,11 +461,13 @@ export default {
});
});
}else {
self.postionToMap();
self.currentClickZdGeo = features[0];
self.improtDialog = true;
}
}else{
self.postionToMap();
self.currentClickZdGeo = null;
self.improtDialog = true;
}
......@@ -502,7 +516,6 @@ export default {
}).then(res => {
debugger
});*/
}else{
self.$message.warning("暂无空间信息!!!!");
}
......@@ -576,6 +589,7 @@ export default {
//关闭图形弹框
closeImportDialog(){
this.improtDialog = false;
this.clearOverLayer();
}
},
......@@ -724,4 +738,8 @@ export default {
center;
background-size: contain;
}
/deep/ .importDialog{
margin-top: 120px!important;
margin-left: 291px;
}
</style>
......
<template>
<div >
<div v-if="!resultDialog && !txtResultDialog" class="importDiv">
<div v-if="!resultDialog && !txtResultDialog && !dealDialog" class="importDiv">
<el-upload
class="upload-demo"
action="#"
......@@ -108,7 +108,7 @@
{ required: true, message: '请选择地块', trigger: 'change' },
]"
>
<el-select v-model="txtZd.name" filterable placeholder="请选择">
<el-select v-model="txtZd.name" filterable placeholder="请选择" @change="txtChange">
<el-option
v-for="(item,index) in txtResult"
:key="index"
......@@ -123,6 +123,30 @@
</el-form-item>
</el-form>
</div>
<div v-if="dealDialog">
<el-form :model="dealForm" ref="dealForm" label-width="100px" size="small" @submit.native.prevent class="demo-ruleForm">
<el-form-item
label="处理方法"
prop="method"
:rules="[
{ required: true, message: '请选择', trigger: 'change' },
]"
>
<el-select v-model="dealForm.method" filterable placeholder="请选择">
<el-option
v-for="(item,index) in dealMethods"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitDealForm('dealForm')">确定</el-button>
<el-button @click="cancelDealForm('dealForm')">取消</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
......@@ -157,6 +181,25 @@ export default {
txtResultDialog:null,
txtZd:{
name:""
},
overResults:[],//与导入宗地重叠的地块
currntDealGraphic:null,
dealMethods:[{
label:"不做处理",
value:"1"
},{
label:"删除叠加部分",
value:"2"
},{
label:"删除已重叠部分",
value:"3"
},{
label:"删除原图形",
value:"4"
}],
dealDialog:false,
dealForm:{
method:""
}
}
},
......@@ -167,6 +210,7 @@ export default {
timeLine(newValue,oldValue){
this.resultDialog = false;
this.txtResultDialog = false;
this.dealDialog = false;
}
},
methods:{
......@@ -268,11 +312,7 @@ export default {
attributes:null,
geometry:geometry
}
if(self.propertyInfo.type == "zd"){
self.saveZd(graphic);
}else{
self.saveZRZ(graphic);
}
self.checkGeo(graphic);
}else{
this.$message.warning(response.message);
}
......@@ -291,25 +331,95 @@ export default {
graphic.geometry.spatialReference = {
wkt:wkt
}
self.checkGeo(graphic);
}else{
console.log('error submit!!');
return false;
}
})
},
txtChange(value){
var wkt = "PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]";
var graphics = self.txtResult.filter(item => {
return item.attributes.name == value;
})
var graphic = graphics[0];
graphic.geometry.type = "polygon";
graphic.geometry.spatialReference = {
wkt:wkt
}
this.addOverLayer(graphic.geometry,[]);
},
//校验空间完整性
checkGeo(graphic){
var self = this;
//校验完整性 直接调用空间方法 提交空间表
self.geoJoint(geometry,function (isJoint,message) {
self.geoJoint(graphic.geometry,function (isJoint,message) {
if(isJoint){
self.$message.warning(message)
return;
}else {
if(self.propertyInfo.type == "zd"){
var type = self.propertyInfo.type;
if(type == 'zd'){
//重叠分析
self.zdOverAnalys(self.propertyInfo.zdbsm,graphic,function (flag,results) {
if(flag){
self.$message.warning("导入的宗地与其他宗地有重叠,请处理!!");
self.dealOverData(results,graphic);
}else {
self.saveZd(graphic);
}else{
}
});
}else {
self.zrzOverAnalys(this.propertyInfo.bsm,graphic,function (flag,mes) {
if(flag){
self.$message.warning(mes);
return;
}else {
self.saveZRZ(graphic);
}
});
}
}
});
}else{
},
//选择处理方式
submitDealForm(formName){
var self = this;
this.$refs[formName].validate((valid) => {
if(valid){
//选择处理方式
var value = self.dealForm.method;
switch (value) {
case '1':self.currntDealGraphic.attributes.BGZT =1;self.saveZd(self.currntDealGraphic);break;
case "2":self.getDifference(self.currntDealGraphic,self.overResults,self.delOverGeo);break;
case "3":self.getResultsDif(self.overResults,self.currntDealGraphic,self.delOtherGeo,true);break;
case "4":self.getResultsDif(self.overResults,self.currntDealGraphic,self.delOtherGeo,false);break;
}
}else {
console.log('error submit!!');
return false;
}
})
},
//裁剪自己在保存
delOverGeo(geometry){
this.currntDealGraphic.attributes.BGZT =2;
if(geometry == null){
this.$message.warning("完全重叠,已删除图形信息!!!")
this.currntDealGraphic.geometry = geometry;
}
this.saveZd(this.currntDealGraphic);
},
//裁剪别的在保存
delOtherGeo(results){
//执行编辑操作
var layer = this.getLayerByName("ZDJBXX");
var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
featureUrl += "/"+layer.id;
this.updateGraphic(featureUrl,results);
this.saveZd(this.currntDealGraphic);
},
//下载文档模板
downloadFile(url,fileName){
let link = document.createElement("a");
......@@ -336,25 +446,20 @@ export default {
attributes:self.currentClickZd,
geometry:geometry
}
self.geoJoint(geometry,function (isJoint,message) {
if(isJoint){
self.$message.warning(message)
return;
}else {
if(self.propertyInfo.type == "zd"){
self.saveZd(graphic);
}else{
self.saveZRZ(graphic);
}
}
});
self.checkGeo(graphic);
} else {
console.log('error submit!!');
return false;
}
});
},
dealOverData(results,graphic){
this.overResults = results;
this.currntDealGraphic = graphic;
this.resultDialog = false;
this.txtResultDialog = false;
this.dealDialog = true;
},
saveZd(graphic){
var self = this;
var points = null,lines = null,
......@@ -363,6 +468,9 @@ export default {
featureUrl += "/"+layer.id;
if(self.geoInfo){
//替换 生成图像 高亮
if(graphic.attributes && graphic.attributes.BGZT){
self.geoInfo.attributes.BGZT = graphic.attributes.BGZT;
}
self.geoInfo.attributes.BSM = this.propertyInfo.zdbsm;
self.geoInfo.attributes.ZDDM = this.propertyInfo.zddm;
self.geoInfo.attributes.XMMC = this.propertyInfo.mc;
......@@ -374,6 +482,7 @@ export default {
var updResult = res.updateFeatureResults[0];
if(updResult.objectId){
var OBJECTID = updResult.objectId;
if(graphic.geometry){
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
......@@ -381,27 +490,36 @@ export default {
lines = res;
self.saveJzx(lines);
});
}
self.$message.success("保存成功!!!");
self.goMap();
}
});
}else{
//生成图像 保存
graphic.attributes = {
var attributes = {
BSM:this.propertyInfo.zdbsm,
ZDDM:this.propertyInfo.zddm,
XMMC:this.propertyInfo.mc
};
if(graphic.attributes && graphic.attributes.BGZT){
attributes.BGZT = graphic.attributes.BGZT;
}
graphic.attributes = attributes;
self.addGraphic(featureUrl,graphic,function (res) {
var addRresult = res.addFeatureResults[0];
if(addRresult.objectId){
var OBJECTID = addRresult.objectId;
if(graphic.geometry) {
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
self.createJZLine(graphic,function (res){
self.createJZLine(graphic, function (res) {
lines = res;
self.saveJzx(lines);
});
}
self.$message.success("保存成功!!!");
self.goMap();
}
});
......@@ -459,12 +577,13 @@ export default {
var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
featureUrl += "/"+layer.id;
if(self.geoInfo){
self.geoInfo.BSM = this.propertyInfo.bsm;
self.geoInfo.BSM = self.propertyInfo.bsm;
graphic.attributes = self.geoInfo;
//替换 生成图像 高亮
self.updateGraphic(featureUrl,graphic,function (res) {
var addRresult = res.updateFeatureResults[0];
if(addRresult.objectId) {
self.$message.success("保存成功!!!");
self.goMap();
}
});
......@@ -478,12 +597,13 @@ export default {
self.addGraphic(featureUrl,graphic,function (res) {
var addRresult = res.addFeatureResults[0];
if(addRresult.objectId) {
self.$message.success("保存成功!!!");
self.goMap();
}
});
}
},
//操作成功跳转
//操作成功不需要跳转地图 (直接定位新导入的图形)
goMap(){
var bsm = "", type = this.propertyInfo.type;
if(type == "zd"){
......@@ -492,35 +612,46 @@ export default {
bsm = this.propertyInfo.bsm;
}
this.resultDialog = false;
this.txtResultDialog = false;
this.dealDialog = false;
this.$emit("closeImportDialog");
var curretRouterInfo = {
path: this.$route.path,
query: this.$route.query
}
sessionStorage.setItem("curretRouterInfo", JSON.stringify(curretRouterInfo));
this.$router.push({
path: "/viewMap",
query: {
bsm: bsm,
type: this.propertyInfo.type
}
});
//TODO 定位当前新导入的图形
this.addGeoByBsm(bsm,type,"testMap");
},
//取消
cancel(){
this.zdForm.zdBsm = "";
this.currentClickZd = null;
this.resultDialog = false;
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//取消文本选择的弹出框
cancelTxtForm(){
this.txtZd.name = "";
this.txtResultDialog = false;
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//取消导入处理的结果
cancelDealForm(){
this.dealForm.method = "";
this.dealDialog = false;
this.overResults = [];
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//宗地选择发生改变
zdChange(value){
this.zdForm.zdBsm = value.XMMC;
this.currentClickZd = value;
var geometry = this.parseWktToArc(this.currentClickZd.wkt);
geometry.type = "polygon";
var wkt = "PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]";
geometry.spatialReference = {
wkt:wkt
}
this.addOverLayer(geometry,[]);
}
}
}
......
......@@ -10,6 +10,7 @@ import featureUpdate from "@libs/map/featureUpdate";
import arcgisParser from 'terraformer-arcgis-parser'
import wktParse from 'terraformer-wkt-parser'
import {maps} from '@/libs/map/mapUtils'
import graphicSymbol from '@/assets/json/graphicSymbol.json'
export default {
data(){
......@@ -197,8 +198,9 @@ export default {
}
for(var i = 0;i < results.length;i++){
var feature = results[i].feature;
var flag = geometryEngine.disjoint(polygon,feature.geometry);
if(flag){
var flag = geometryEngine.intersects(polygon,feature.geometry);
var withinFlag = geometryEngine.within(polygon,feature.geometry);
if(!withinFlag && flag){
isJoint = true;
layerName = results[i].layerName;
switch (layerName) {
......@@ -244,7 +246,260 @@ export default {
featureUpdate.methods.addGraphic(featureUrl,graphic,callBackFunction) ;
}
});
},
//叠加分析 同一个图层的叠加分析
zdOverAnalys(bsm,graphic,callBacFunction){
var self = this;
loadModules([
"esri/geometry/Polygon"
]).then(([
Polygon
]) => {
var zdLayer = null;
zdLayer = self.getLayerByName("ZDJBXX");
var layerIds = [];
layerIds.push(zdLayer.id);
var polygon = new Polygon(graphic.geometry);
identifyUtils.methods.identify(zdLayer.layerUrl,layerIds,polygon,function (res) {
var results = res.results;
//判断数据是否与其他数据有重叠
var flag = false;
if(results && results.length > 0){
flag = true;
//加载在图层上 原本的要导入的数据 和重叠数据
self.addOverLayer(polygon,results);
}
callBacFunction(flag,results);
},true)
}).catch(err => {
console.log(err);
throw (err);
})
},
//添加添加元素和覆盖的元素到地图上
addOverLayer(geometry,results){
var view = maps["testMap"];
loadModules([
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/geometryEngineAsync",
"esri/geometry/Extent"
]).then(([
Graphic,
GraphicsLayer,
geometryEngineAsync,
Extent
])=>{
var graphic = new Graphic({
geometry:geometry
})
var layer = view.map.findLayerById("overLayer");
if(layer){
layer.removeAll();
}else {
layer = new GraphicsLayer({
id:"overLayer"
})
view.map.add(layer);
}
var impotSymbol = graphicSymbol.fillSymbol.importSymbol,
defaultSymbol = graphicSymbol.fillSymbol.defaultSymbol;
for(var i = 0;i < results.length;i++){
var feature = results[i].feature;
feature.symbol = defaultSymbol;
layer.add(feature);
var geo = geometryEngineAsync.intersect(feature.geometry,geometry);
geo.then(function (res) {
var interGra = new Graphic({
geometry:res,
symbol:graphicSymbol.fillSymbol.highlightSymbol
})
layer.add(interGra);
})
}
graphic.symbol = impotSymbol
layer.add(graphic);
var extent = new Extent(JSON.parse(JSON.stringify(graphic.geometry.extent)))
extent.spatialReference = view.spatialReference;
view.extent = extent;
}).catch(err => {
console.log(err);
})
},
clearOverLayer(){
var view = maps["testMap"];
var layer = view.map.findLayerById("overLayer");
if(layer){
layer.removeAll();
}
},
//自然幢叠加分析 不能跨宗地 图层本身的叠加分析
zrzOverAnalys(bsm,graphic,callBacFunction){
var self = this;
loadModules([
"esri/geometry/Polygon",
"esri/geometry/geometryEngine"
]).then(([
Polygon,
geometryEngine
]) => {
var polygon = new Polygon(graphic.geometry);
var zdLayer = null,
zrzLayer = null;
zdLayer = self.getLayerByName("ZDJBXX");
zdLayer = self.getLayerByName("ZRZ");
var layerIds = [];
layerIds.push(zdLayer.id);
layerIds.push(zrzLayer.id);
identifyUtils.methods.identify(zdLayer.layerUrl,layerIds,polygon,function (res) {
var results = res.results;
//判断数据是否与其他数据有重叠
var flag = false,
mesge = "";
if(results && results.length > 0){
for(var i = 1;i < results.length;i++){
var feature = results[i].feature,
layerName = results[i].layerName;
if(layerName == 'ZRZ'){
if(feature.attributes['标识码'] != bsm){
var interFlag = geometryEngine.intersects(polygon,feature.geometry);
if(interFlag){
flag = true;
mesge="导入的自然幢与其他自然幢重叠,不能导入!!!";
break;
}
}
}else {
var interFlag = geometryEngine.intersects(polygon,feature.geometry);
var withinFlag = geometryEngine.within(polygon,feature.geometry);
if(!withinFlag && interFlag){
flag = true;
mesge="导入的自然幢与其跨宗地,不能导入!!!";
break;
}
}
}
}
callBacFunction(flag,mesge);
},true)
}).catch( err => {
console.log(err);
})
},
//去除重叠部分
getDifference(inputGraphic,subGraphic,callBackFuncton){
loadModules([
"esri/geometry/Polygon",
"esri/geometry/geometryEngine",
"esri/Graphic"
]).then(([
Polygon,
geometryEngine,
Graphic
])=>{
var inputGeometry = new Polygon(inputGraphic.geometry);
var outGeometry = null;
for(var i = 0;i < subGraphic.length;i++){
var feature = subGraphic[i].feature;
outGeometry = geometryEngine.difference(inputGeometry,feature.geometry);
}
if(callBackFuncton && typeof callBackFuncton == 'function'){
callBackFuncton(outGeometry);
}
}).catch(err => {
console.log(err);
})
},
//业务处理 先用query方法 查询将所有属性查询 在做空间裁剪
getResultsDif(subGraphics,currntGraphic,callBackFunction,flag){
var self = this;
loadModules([
"esri/geometry/geometryEngine",
"esri/geometry/Polygon"
]).then(([
geometryEngine,
Polygon
]) => {
var objectIds = [];
subGraphics.filter(item => {
objectIds.push(item.feature.attributes.OBJECTID);
})
var inputGeometry = new Polygon(currntGraphic.geometry);
var zdLayer = self.getLayerByName("ZDJBXX");
queryUtils.methods.queryByWhere(zdLayer.layerUrl+"/"+zdLayer.id,{OBJECTID:objectIds},null,true,"",subGraphics[0].feature.geometry.spatialReference,function (result) {
var features = result.features;
if(flag){
for(var i = 0;i < features.length;i++){
features[i].geometry = geometryEngine.difference(features[i].geometry,inputGeometry);
features[i].attributes.BGZT = 3;
}
}else {
for(var i = 0;i < features.length;i++){
features[i].geometry = null;
features[i].attributes.BGZT = 4;
}
}
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(features);
}
})
}).catch(err=>{
console.log(err);
})
},
addGeoByBsm(bsm, type,viewId) {
var self = this;
var layer = null;
if (type == 'zd') {
layer = this.getLayerByName("ZDJBXX");
} else if (type == 'zrz') {
layer = this.getLayerByName("ZRZ");
} else {
console.log("未定义类型!!");
return;
}
if (!layer) {
console.log("没有找到图层,不能查询");
return;
}
queryUtils.methods.queryByWhere(layer.layerUrl+"/"+layer.id, {"BSM": bsm }, null, true, null, null, function (res) {
var features = res.features;
if(features && features.length > 0){
if( !features[0].geometry ){
self.$message.success("暂无图形信息!!");
return;
}
loadModules([
"esri/layers/GraphicsLayer"
]).then( ([
GraphicsLayer
]) => {
var view = maps[viewId];
var layer = view.map.findLayerById("highlightLayer");
if(layer){
layer.removeAll();
}else {
layer = new GraphicsLayer({
id:"highlightLayer"
})
view.map.add(layer,5);
}
var symbol = graphicSymbol.fillSymbol.highlightSymbol;
var graphic = features[0];
graphic.symbol = symbol;
layer.add(graphic);
view.extent = graphic.geometry.extent;
}).catch( err => {
thow(err);
})
}else {
self.$message.success("暂无图形信息!!");
return;
}
});
}
}
}
\ No newline at end of file
......
......@@ -38,14 +38,13 @@
esriMap
]) => {
var map = new esriMap({
basemap:"hybrid"
basemap:"osm"
});
//108.95 34.27
var view = new MapView({
container: self.viewId,
map: map,
zoom:10,
zoom:10,
center: [-0.154133333770497,0.6138183594020817],
spatialReference: {
wkid: 102100
......
......@@ -56,42 +56,7 @@
</el-form>
</el-col>
</el-row>
<!-- <el-row :gutter="10" class="shop">
<el-col :span="4" class="inputtitle">
宗地编码:
</el-col>
<el-col :span="8" class="">
<el-input v-model="queryData.zddm"></el-input>
</el-col>
<el-col :span="4" class="inputtitle">
不动产权证号:
</el-col>
<el-col :span="8" class="">
<el-input v-model="queryData.bdcqzh"></el-input>
</el-col>
</el-row> -->
<!-- <el-row :gutter="10">
<el-col :span="4" class="inputtitle">
不动产单元号:
</el-col>
<el-col :span="8">
<el-input v-model="queryData.bdcdyh"></el-input>
</el-col>
<el-col :span="4" class="inputtitle">
权利人:
</el-col>
<el-col :span="8">
<el-input v-model="queryData.qlrmc"></el-input>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4" class="inputtitle">
坐落:
</el-col>
<el-col :span="8">
<el-input v-model="queryData.zl"></el-input>
</el-col>
</el-row> -->
<div class="table-data">
<table border="1">
<tr>
<td>序号</td>
......@@ -120,9 +85,9 @@
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
</tr>
</table>
</div>
</div>
<div class="page">
<el-pagination
background
......@@ -145,7 +110,7 @@
name: "queryData",
data() {
return {
total:1,
total: 1,
queryData: {
bdcdyh: "",
bdcqzh: "",
......@@ -175,9 +140,9 @@
return ['zd']
}
},
isZdClose:{
type:Boolean,
default:false
isZdClose: {
type: Boolean,
default: false
}
},
mounted() {
......@@ -190,7 +155,7 @@
this.queryData.pageNo = val;
this.getData(this.queryData);
},
reset(){
reset() {
this.queryData = {
bdcdyh: "",
bdcqzh: "",
......@@ -204,23 +169,23 @@
};
this.getData(this.queryData)
},
getData(data){
getData(data) {
data['dylxs'] = this.dylxs;
getSearchList(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
})
},
search(){
search() {
this.getData(this.queryData)
},
addData(val){
addData(val) {
this.$emit("getData", val)
if (this.isZdClose) {
this.close();
}
},
close(){
close() {
this.$emit('close')
this.reset();
}
......@@ -241,7 +206,8 @@
height: auto;
width: 80%;
}
/deep/ .el-form-item__label{
/deep/ .el-form-item__label {
width: 96px;
text-align: right;
}
......@@ -251,7 +217,7 @@
background-color: #fff;
font-size: 14px;
width: 100%;
tr:hover{
tr:hover {
background-color: #F5F7FA;
}
}
......@@ -281,7 +247,10 @@
.noData {
color: #b2b2b2;
}
.page{
.table-data{
height: 450px;
}
.page {
margin-top: 20px;
}
......
<template>
<div>
<el-dialog
title="属性导入"
:visible.sync="isVisible"
width="30%"
:before-close="close">
<div class="main-button">
<el-upload
class="upload-demo"
:action="uploadUrl"
:data="sxdrData"
:on-success="uploadSuccess"
:show-file-list="false"
multiple
>
<el-button type="primary">上传</el-button>
<el-button type="primary" @click="downloadTemplate">下载模板</el-button>
</el-upload>
</div>
<ul>
<li v-for="(item,index) in errorData" :key="index">{{item}}</li>
</ul>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "sxdr",
props: {
sxdrVisible: {
type: Boolean,
default: false
},
dylx: {
type: String,
},
bsm: {
type: String
}
},
data() {
return {
uploadUrl: '',
isVisible: false,
sxdrData: {
bsm: ''
},
errorData: []
}
},
mounted() {
this.$store.state.sxdrType = '';
},
methods: {
loading() {
this.$store.state.sxdrType = this.dylx;
},
reset() {
this.errorData = [];
this.uploadUrl = '';
this.sxdrData = {bsm: ''};
},
close() {
this.$emit('close')
this.reset();
},
downloadTemplate() {
window.open(`/api/tx/excelGeo/zdTemplate?type=` + this.dylx);
},
uploadSuccess(res, file, fileList) {
if (res.success) {
this.$message.success("上传成功")
debugger
this.loading();
this.close()
} else {
this.$message.error("上传失败")
this.errorData = res.result
}
}
},
watch: {
sxdrVisible(val) {
this.isVisible = val;
},
dylx(val) {
switch (val) {
case "zd":
this.uploadUrl = "/api/tx/excelGeo/Zdimport";
break;
default:
break;
}
},
bsm(val) {
this.sxdrData.bsm = val;
}
}
}
</script>
<style scoped lang="less">
.main-button {
display: -webkit-flex;
display: flex;
flex-direction: column-reverse;
flex-wrap: nowrap;
}
ul {
margin-top: 20px;
li {
line-height: 15px;
color: red;
}
}
</style>
......@@ -53,6 +53,7 @@
</el-form>
</el-col>
</el-row>
<div class="table-bode">
<table border="1">
<tr>
<td>序号</td>
......@@ -81,9 +82,9 @@
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
</tr>
</table>
</div>
</div>
<div class="page">
<el-pagination
background
......@@ -106,13 +107,11 @@
name: "zdQueryData",
data() {
return {
total:1,
total: 1,
queryData: {
bdcdyh: "",
bdcqzh: "",
dylxs: ['zd'],
qlrmc: "",
qszt: ["2"],
xmmc: "",
zddm: "",
zl: "",
......@@ -130,15 +129,9 @@
return false
}
},
qszt:{
type:Array,
default:function () {
return ['2']
}
},
isZdClose:{
type:Boolean,
default:false
isZdClose: {
type: Boolean,
default: false
}
},
mounted() {
......@@ -156,7 +149,6 @@
bdcdyh: "",
bdcqzh: "",
qlrmc: "",
qszt: ["2"],
xmmc: "",
zddm: "",
zl: "",
......@@ -166,7 +158,6 @@
this.getData(this.queryData)
},
getData: function (data) {
data['dylxs'] = this.dylxs;
zdlist(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
......@@ -202,18 +193,18 @@
height: auto;
width: 80%;
}
/deep/ .el-form-item__label{
/deep/ .el-form-item__label {
width: 96px;
text-align: right;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
tr:hover{
tr:hover {
background-color: #F5F7FA;
}
}
......@@ -243,7 +234,10 @@
.noData {
color: #b2b2b2;
}
.page{
.table-bode{
height: 450px;
}
.page {
margin-top: 20px;
}
......
......@@ -24,7 +24,7 @@ export default {
identifyParameters.tolerance = tolerance ? tolerance : 3;
identifyParameters.mapExtent = mapExtent ? mapExtent : geometry.extent;
identifyParameters.returnGeometry = returnGeometry ? returnGeometry : false;
//identifyParameters.returnFieldName = false;
//identifyParameters.returnFieldName = true;
identifyParameters.spatialReference = geometry.spatialReference;
identifyTask.execute(identifyParameters).then(result => {
if(callBackFunction && typeof callBackFunction == 'function'){
......
......@@ -22,20 +22,29 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var saveGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
if(!graphic[i].geometry){
geo = null;
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var saveGraphic = new Graphic({
attributes:graphic.attributes,
attributes:graphic[i].attributes,
geometry:geo
});
saveGraphics.push(saveGraphic);
}
featureLayer.applyEdits({
addFeatures:[saveGraphic]
addFeatures:saveGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......@@ -62,20 +71,30 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var updGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
if(!graphic[i].geometry){
geo = new Polygon();
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var updGraphic = new Graphic({
attributes:graphic.attributes,
attributes:graphic[i].attributes,
geometry:geo
});
updGraphics.push(updGraphic);
}
featureLayer.applyEdits({
updateFeatures:[updGraphic]
updateFeatures:updGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......@@ -102,21 +121,31 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var delGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
if(!graphic[i].geometry){
geo = null;
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var delGraphic = new Graphic({
attributes:graphic.attributes,
attributes:graphic[i].attributes,
geometry:geo
});
delGraphics.push(delGraphic);
}
featureLayer.applyEdits({
deleteFeatures:[delGraphic]
deleteFeatures:delGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......
......@@ -28,7 +28,7 @@ export default{
where += " and ";
}
if(Array.isArray(parames[i].value)){
where += parames[i].name + " in (" + parames[i].value.toString + ")";
where += parames[i].name + " in (" + parames[i].value.toString() + ")";
}else if(typeof parames[i].value == 'number'){
where += parames[i].name + " =" + parames[i].value ;
}else{
......
......@@ -15,6 +15,7 @@ const store = new Vuex.Store({
zdmj: '', // 宗地面积
zdzl: '', // 宗地坐落
rightClickZdbsm:'', //右键菜单传入的zdbsm
sxdrType:'', // zd/zrz/dz/h 导入属性刷新数据
tdytList:[],
tddjList:[],
qlxzList:[],
......
......@@ -293,9 +293,10 @@
</tr>
</table>
</div>
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']"
:isZdClose="true"
@close="close"></query-data>
<dz-query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible"
:isClose="true"
@close="close">
</dz-query-data>
<div class="header-button" :style="{width:fgBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="save">保存</el-button>
</div>
......@@ -310,7 +311,7 @@
<ul>
<li><span>宗地代码:</span>{{hFgqData.zddm}}</li>
<li><span>不动产单元号:</span>{{hFgqData.bdcdyh}}</li>
<li><span>项目名称:</span>{{hFgqData.xmmc}}</li>s's's's's's's's's's's's's's's's's's's
<li><span>项目名称:</span>{{hFgqData.xmmc}}</li>
<li><span>不动产权证号:</span>{{hFgqData.bdcqzh}}</li>
<li><span>权利人:</span>{{hFgqData.qlr}}</li>
<li><span>坐落:</span>{{hFgqData.zl}}</li>
......@@ -331,7 +332,7 @@
</div>
<ul>
<li v-for="(item,index) in zdZxx.dzList" :key="index"
:class="(index+1)%2==0?'':'oddborder'">{{item.xmmc}}
:class="(index+1)%2===0?'':'oddborder'">{{item.xmmc}}
</li>
</ul>
</div>
......@@ -455,11 +456,12 @@
import {getHZdxx} from './../../../../api/h'
import QueryData from './../../../../components/queryData/queryData'
import zdQueryData from './../../../../components/zdQueryData/zdQueryData'
import dzQueryData from './../../../../components/dzQueryData/dzQueryData'
import {Message} from 'element-ui'
export default {
name: "",
components: {QueryData, zdQueryData},
components: {QueryData, zdQueryData,dzQueryData},
props: {},
data() {
return {
......@@ -557,7 +559,7 @@
this.dzFghData.fwlist[index].zrzlist.splice(chilInd,1);
this.tempBsmList = this.tempBsmList.filter(i => i!== bsm);
this.dzFgqZrzData.forEach(i=>{
if (i.bsm == bsm) {
if (i.bsm === bsm) {
i.hasChoosed = ""
}
})
......@@ -667,7 +669,7 @@
if(this.dzFgZrzList[childIndex].hasChoosed === '' || this.dzFgZrzList[childIndex].hasChoosed === index){
// this.zdZrzList[childIndex].hasChoosed = index;
if(fwlist.zrzlist.indexOf(bsm) < 0){
if(fwlist.ztype == 'zrz' && fwlist.zrzlist.length>0){
if(fwlist.ztype === 'zrz' && fwlist.zrzlist.length>0){
Message.warning("当前幢类型只能选择一个自然幢")
}else{
//存入当前选择幢信息的bsm
......@@ -744,7 +746,7 @@
}
},
saveZd() {
if(this.tempBsmList.length == (this.zdZxx.dzList.length + this.zdZxx.zrzList.length)){
if(this.tempBsmList.length === (this.zdZxx.dzList.length + this.zdZxx.zrzList.length)){
zdfg(this.zdFghData).then(res => {
if (res.success) {
this.$store.state.zdbsms = res.result;
......@@ -973,9 +975,9 @@
},
dzFgqData: {
handler: function (item) {
this.dzFgqData.oldZdbsm = item.glbsm;
this.getDzZdjbxx(item.glbsm);
this.dzfgGetZrzxx(item.glbsm)
this.dzFgqData.oldZdbsm = item.bsm;
this.getDzZdjbxx(item.bsm);
this.dzfgGetZrzxx(item.bsm)
},
deep: true
},
......
......@@ -76,15 +76,20 @@ export default {
},
mixins:[mapLayerManager,findTask],
mounted(){
var query = this.$route.query;
var query = this.$route.query
var self = this;
setTimeout(function () {
if(query && JSON.stringify(query) != "{}"){
//self.addGeoByBsm(query.bsm,query.type,self.viewId);
if(query.type == 'zd'){
this.getRightTree(query.bsm)
self.getRightTree(query.bsm)
}else if(query.type == 'zrz'){
this.getRightTreeByZrzbsm(query.bsm);
self.getRightTreeByZrzbsm(query.bsm);
}
}
},500);
},
methods:{
......@@ -93,9 +98,9 @@ export default {
var view = maps[this.viewId];
view.ui.remove('zoom');
loadModules([
"esri/layers/MapImageLayer",
"esri/layers/MapImageLayer"
]).then(([
MapImageLayer,
MapImageLayer
])=>{
var mapImageLayer = new MapImageLayer({
url:self.layerUrl,
......@@ -137,9 +142,11 @@ export default {
},
//图层选择事件
selectLayerChange(){
debugger
var self = this;
this.features = [];
var layerAndResult = this.results.filter(function (item) {
return item.layerId = self.selectResLayerId;
return item.layerId == self.selectResLayerId;
})
if(layerAndResult){
this.features = layerAndResult[0].features;
......
......@@ -79,12 +79,12 @@ export default {
return;
}
for(var i = 0;i < searchResult.length;i++){
var layer = view.map.findLayerById("searchResult"+searchResult.layerName);
var layer = view.map.findLayerById("searchResult"+searchResult[i].layerId);
if(layer){
layer.removeAll();
}else{
layer = new GraphicsLayer({
id:"searchResult"+searchResult.layerName
id:"searchResult"+searchResult[i].layerId
})
view.map.add(layer);
}
......
......@@ -81,7 +81,8 @@
</td>
<td colspan="2">宗地特征码<i class="requisite">*</i></td>
<td colspan="4">
<el-select class="formSelect" ref="zdtzm" :disabled="formData.qszt!='0'" v-model="formData.zdtzmbsm">
<el-select class="formSelect" ref="zdtzm" :disabled="formData.qszt!='0'"
v-model="formData.zdtzmbsm">
<el-option
v-for="item in $store.state.zdtzmList"
:key="item.bsm"
......@@ -112,7 +113,8 @@
class="formInput percent80"
v-model="formData.zddm"
/>
<el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn" @click="generatorCode"
<el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn"
@click="generatorCode"
>生成
</el-button>
</td>
......@@ -120,13 +122,14 @@
<tr>
<td colspan="2">地籍号</td>
<td colspan="4">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.djh" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.djh"/>
</td>
<td colspan="2">不动产单元号<i class="requisite">*</i></td>
<td colspan="4" class="psr">
<input
type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="bdcdyh" maxlength="28"
type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="bdcdyh"
maxlength="28"
class="formInput"
v-model="formData.bdcdyh"
/>
......@@ -136,7 +139,8 @@
<tr>
<td colspan="2">坐落<i class="requisite">*</i></td>
<td colspan="4">
<input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zl" class="formInput" v-model="formData.zl" />
<input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zl"
class="formInput" v-model="formData.zl"/>
</td>
<td colspan="2">项目名称</td>
<td colspan="4" class="psr">
......@@ -150,34 +154,32 @@
<tr>
<td colspan="2">国民经济行业分类</td>
<td colspan="4">
<el-select-tree
:disabled="formData.qszt!='0'"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
:placeholder="placeholder"
:data="$store.state.gmjjhyflbsmList"
:props="treeProps"
:check-strictly="checkStrictly"
:clearable="clearable"
v-model="formData.gmjjhyflbsm"
></el-select-tree>
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.gmjjhyflbsm">
<el-option
v-for="item in $store.state.gmjjhyflbsmList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">价格(元)</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jg" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jg"/>
</td>
</tr>
<tr>
<td colspan="2" rowspan="2">所在图幅号</td>
<td colspan="2">比例尺</td>
<td colspan="8" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.blc" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.blc"/>
</td>
</tr>
<tr>
<td colspan="2">图幅号</td>
<td colspan="8" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.tfh" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.tfh"/>
</td>
</tr>
<tr>
......@@ -209,7 +211,7 @@
</td>
<td colspan="2">容积说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm"/>
</td>
</tr>
<tr>
......@@ -241,7 +243,7 @@
</td>
<td colspan="2">建筑密度说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm"/>
</td>
</tr>
<tr>
......@@ -273,32 +275,36 @@
</td>
<td colspan="2">建筑限高说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzxgsm" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzxgsm"/>
</td>
</tr>
<tr>
<td colspan="2" rowspan="4">宗地四至</td>
<td colspan="2">北至<i class="requisite">*</i></td>
<td colspan="8" class="psr">
<input type="text" @blur="inputBlur($event)" ref="zdszb" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszb" />
<input type="text" @blur="inputBlur($event)" ref="zdszb" :disabled="formData.qszt!='0'"
class="formInput" v-model="formData.zdszb"/>
</td>
</tr>
<tr>
<td colspan="2">东至<i class="requisite">*</i></td>
<td colspan="8" class="psr">
<input type="text" @blur="inputBlur($event)" ref="zdszd" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszd" />
<input type="text" @blur="inputBlur($event)" ref="zdszd" :disabled="formData.qszt!='0'"
class="formInput" v-model="formData.zdszd"/>
</td>
</tr>
<tr>
<td colspan="2">南至<i class="requisite">*</i></td>
<td colspan="8" class="psr">
<input type="text" @blur="inputBlur($event)" ref="zdszn" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszn" />
<input type="text" @blur="inputBlur($event)" ref="zdszn" :disabled="formData.qszt!='0'"
class="formInput" v-model="formData.zdszn"/>
</td>
</tr>
<tr>
<td colspan="2">西至<i class="requisite">*</i></td>
<td colspan="8" class="psr">
<input type="text" @blur="inputBlur($event)" ref="zdszx" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszx" />
<input type="text" @blur="inputBlur($event)" ref="zdszx" :disabled="formData.qszt!='0'"
class="formInput" v-model="formData.zdszx"/>
</td>
</tr>
<tr>
......@@ -309,33 +315,38 @@
<tr>
<td colspan="2" rowspan="2">批准面积(㎡)</td>
<td colspan="2" rowspan="2">
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.pzmj" />
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
class="formInput" v-model="formData.pzmj"/>
</td>
<td colspan="2" rowspan="2">宗地面积(㎡)<i class="requisite">*</i></td>
<td colspan="2" rowspan="2">
<input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zdmj" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.zdmj" />
<input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zdmj"
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.zdmj"/>
</td>
<td colspan="2">建筑占地总面积</td>
<td colspan="2">
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.jzzdzmj" />
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
class="formInput" v-model="formData.jzzdzmj"/>
</td>
</tr>
<tr>
<td colspan="2">建筑面积(㎡)</td>
<td colspan="2">
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.jzzmj" />
<input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
class="formInput" v-model="formData.jzzmj"/>
</td>
</tr>
<tr>
<td colspan="2">共有/共用权利人情况</td>
<td colspan="10">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.gygyqlrqk" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput"
v-model="formData.gygyqlrqk"/>
</td>
</tr>
<tr>
<td colspan="2" rowspan="2">说明</td>
<td colspan="10" rowspan="2">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.sm" />
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.sm"/>
</td>
</tr>
</table>
......@@ -358,10 +369,10 @@
</template>
<script>
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import geoUtils from "@components/lineTree/tx/js/geoUtils";
import {
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import geoUtils from "@components/lineTree/tx/js/geoUtils";
import {
getAllList,
getDdicByMC,
getListByXzqbsm,
......@@ -369,15 +380,15 @@ import {
submit,
getTree,
registerCall
} from "../../../api/common";
import {
} from "../../../api/common";
import {
getBdcdyh,
getQjZdjbxxDetailById,
updateQjZdjbxx,
} from "../../../api/zd";
} from "../../../api/zd";
export default {
inject:['getRightTree'],
export default {
inject: ['getRightTree'],
name: "",
components: {
Qlr,
......@@ -386,85 +397,70 @@ export default {
props: {},
data() {
return {
//树型结构
show: true,
clearable: true,
defaultExpandAll: true,
multiple: false,
placeholder: "请选择",
disabled: false,
checkStrictly: true,
treeProps: {
value: "dm",
children: "children",
label: "mc",
},
rules: [],
rjl:'',
jzmd:'',
jzxg:'',
rjl: '',
jzmd: '',
jzxg: '',
compareList: [
{ label: "<", value: "<" },
{ label: ">", value: ">" },
{ label: "=", value: "=" },
{ label: "<=", value: "<=" },
{ label: ">=", value: ">=" },
{ label: "-", value: "-" },
{label: "<", value: "<"},
{label: ">", value: ">"},
{label: "=", value: "="},
{label: "<=", value: "<="},
{label: ">=", value: ">="},
{label: "-", value: "-"},
],
formData: {},
dpdm:'', //宗地底盘代码
curZdbsm:'',
mainBoxWidth:0,
geoAttributes:{
OBJECTID:"",
BSM:"",
YSDM:"",
ZDDM:"",
BDCDYH:"",
ZDTZM :"",
ZL:"",
ZDMJ:0,
MJDW:"",
YT:"",
DJ:"",
JG:0,
QLLX:"",
QLXZ:"",
QLSDFS:"",
RJL:0,
JZMD:0,
JZXG:0,
ZDSZD:"",
ZDSZN :"",
ZDSZX :"",
ZDSZB :"",
TFH:"",
DJH:"",
DAH:"",
BZ :"",
ZT:"",
YWZT:"",
BLID:"",
XMMC:"",
XMID:"",
BGRQ:"",
BGID:"",
BGZT:"",
TDZH:"",
QSZT:0,
BBLX:0,
SFDB:0,
QLR :"",
CUTID:"",
BHQKID:"",
DJZQDM :"",
SYQLXID:"",
dpdm: '', //宗地底盘代码
curZdbsm: '',
mainBoxWidth: 0,
geoAttributes: {
OBJECTID: "",
BSM: "",
YSDM: "",
ZDDM: "",
BDCDYH: "",
ZDTZM: "",
ZL: "",
ZDMJ: 0,
MJDW: "",
YT: "",
DJ: "",
JG: 0,
QLLX: "",
QLXZ: "",
QLSDFS: "",
RJL: 0,
JZMD: 0,
JZXG: 0,
ZDSZD: "",
ZDSZN: "",
ZDSZX: "",
ZDSZB: "",
TFH: "",
DJH: "",
DAH: "",
BZ: "",
ZT: "",
YWZT: "",
BLID: "",
XMMC: "",
XMID: "",
BGRQ: "",
BGID: "",
BGZT: "",
TDZH: "",
QSZT: 0,
BBLX: 0,
SFDB: 0,
QLR: "",
CUTID: "",
BHQKID: "",
DJZQDM: "",
SYQLXID: "",
}
};
},
mixins:[geoUtils],
mixins: [geoUtils],
created() {
this.curZdbsm = this.$route.query.bsm;
},
......@@ -475,12 +471,12 @@ export default {
})
},
methods: {
registerCall(){
let data={
type:'zd',
bsm:this.$store.state.zdbsm
registerCall() {
let data = {
type: 'zd',
bsm: this.$store.state.zdbsm
}
registerCall(data).then(res=>{
registerCall(data).then(res => {
if (res.success) {
this.$message.success("登记成功")
this.getRightTree(this.$store.state.zdbsm)
......@@ -493,8 +489,8 @@ export default {
.then((res) => {
if (res.result) {
this.formData = res.result;
console.log(res.result,'res.result');
this.getXzqData(res.result.xzqbsm,res.result.djqbsm);
console.log(res.result, 'res.result');
this.getXzqData(res.result.xzqbsm, res.result.djqbsm);
//如果没有宗地代码,自动生成
// if(res.result.zddm == null){
// this.generatorCode()
......@@ -506,8 +502,8 @@ export default {
this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? '-' : this.formData.jyjzmd;
this.jzxg = this.isInterval(this.formData.jyjzxg) ? this.formData.jyjzxg : '';
this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? '-' : this.formData.jyjzxg;
if(res.result.list.length>0){
if(res.result.list[0].list.length<1){
if (res.result.list.length > 0) {
if (res.result.list[0].list.length < 1) {
res.result.list[0].list.push({
"pzdjbsm": "",
"pzdjmc": "",
......@@ -526,12 +522,12 @@ export default {
"tdzh": ""
})
}
this.$nextTick(()=>{
this.$nextTick(() => {
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = res.result.list;
})
}else{
this.$nextTick(()=>{
} else {
this.$nextTick(() => {
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = [
{
......@@ -567,30 +563,31 @@ export default {
}
}
})
.catch((error) => {});
.catch((error) => {
});
},
//构造底盘代码,前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
generatorDpdm() {
this.$store.state.xzqList.forEach((item)=>{
if(item.bsm === this.formData.xzqbsm){
this.$store.state.xzqList.forEach((item) => {
if (item.bsm === this.formData.xzqbsm) {
this.dpdm = item.dm;
}
});
this.$store.state.djqList.forEach((item)=>{
if(item.bsm === this.formData.djqbsm){
this.$store.state.djqList.forEach((item) => {
if (item.bsm === this.formData.djqbsm) {
this.dpdm = this.dpdm + item.dm;
}
});
this.$store.state.djzqList.forEach((item)=>{
if(item.bsm === this.formData.djzqbsm){
this.$store.state.djzqList.forEach((item) => {
if (item.bsm === this.formData.djzqbsm) {
this.dpdm = this.dpdm + item.dm;
}
});
this.dpdm = this.dpdm + this.formData.syqlxbsm;
this.$store.state.zdtzmList.forEach((item)=>{
if(item.bsm === this.formData.zdtzmbsm){
this.$store.state.zdtzmList.forEach((item) => {
if (item.bsm === this.formData.zdtzmbsm) {
this.dpdm = this.dpdm + item.dm;
}
});
......@@ -610,7 +607,8 @@ export default {
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {});
.catch((error) => {
});
this.$message({
type: 'success',
message: '生成成功!'
......@@ -626,7 +624,7 @@ export default {
//生成宗地代码
generatorCode() {
if((this.formData.zddm!=null&&this.formData.zddm!=='')||(this.formData.bdcdyh!=null&&this.formData.bdcdyh!=='')){
if ((this.formData.zddm != null && this.formData.zddm !== '') || (this.formData.bdcdyh != null && this.formData.bdcdyh !== '')) {
this.open();
return;
}
......@@ -638,82 +636,83 @@ export default {
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {});
.catch((error) => {
});
},
//修改宗地基本信息
updateZDxx(formData) {
//获取权利性质数据
this.formData.list = this.$refs.qlxzModule.getQlxzDataList();
console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()');
console.log(this.$refs.qlxzModule.getRulesResult(), 'this.$refs.qlxzModule.getRules()');
//判断容密高是否为区间值,如果是区间值,则将输入框的值赋予
this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl;
this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? this.jzmd : this.formData.jyjzmd;
this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? this.jzxg : this.formData.jyjzxg;
this.rules= [
this.rules = [
{
data:this.formData.zdtzmbsm,
name:'宗地特征码',
dom:this.$refs.zdtzm,
data: this.formData.zdtzmbsm,
name: '宗地特征码',
dom: this.$refs.zdtzm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zddm,
name:'宗地代码',
dom:this.$refs.zddm,
data: this.formData.zddm,
name: '宗地代码',
dom: this.$refs.zddm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.bdcdyh,
name:'不动产单元号',
dom:this.$refs.bdcdyh,
data: this.formData.bdcdyh,
name: '不动产单元号',
dom: this.$refs.bdcdyh,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zl,
name:'坐落',
dom:this.$refs.zl,
data: this.formData.zl,
name: '坐落',
dom: this.$refs.zl,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszd,
name:'宗地东至',
dom:this.$refs.zdszd,
data: this.formData.zdszd,
name: '宗地东至',
dom: this.$refs.zdszd,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszb,
name:'宗地北至',
dom:this.$refs.zdszb,
data: this.formData.zdszb,
name: '宗地北至',
dom: this.$refs.zdszb,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszx,
name:'宗地西至',
dom:this.$refs.zdszx,
data: this.formData.zdszx,
name: '宗地西至',
dom: this.$refs.zdszx,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszn,
name:'宗地南至',
dom:this.$refs.zdszn,
data: this.formData.zdszn,
name: '宗地南至',
dom: this.$refs.zdszn,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdmj,
name:'宗地面积',
dom:this.$refs.zdmj,
data: this.formData.zdmj,
name: '宗地面积',
dom: this.$refs.zdmj,
rule: /^\s*$/g, //非空
},
]
// console.log(this.rules,'rules');
this.$refs.qlxzModule.getRules();
let flag = true;
this.rules.forEach(item=>{
if(item.rule.test(item.data) || item.data == null){
if(item.dom.$el){
this.rules.forEach(item => {
if (item.rule.test(item.data) || item.data == null) {
if (item.dom.$el) {
item.dom.$el.style.border = '1px solid red';
item.dom.$el.style.boxSizing = 'border-box';
}else{
} else {
item.dom.style.border = '1px solid red';
item.dom.style.boxSizing = 'border-box';
}
......@@ -726,18 +725,18 @@ export default {
return false
}
})
this.$nextTick(()=>{
if(flag && this.$refs.qlxzModule.getRulesResult()){
this.$nextTick(() => {
if (flag && this.$refs.qlxzModule.getRulesResult()) {
//宗地面积处理
// console.log(this.formData.zdmj,'this.formData.zdmj');
// this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'')
//判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致)
if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){
if (this.formData.zddm.substring(0, 14) != this.dpdm || this.formData.bdcdyh.substring(0, 14) != this.dpdm) {
this.$message({
message: '宗地代码或不动产单元号有误,请核对后再试一次',
type: "warning",
});
}else{
} else {
updateQjZdjbxx(this.formData)
.then((res) => {
if (res.code == 200) {
......@@ -755,28 +754,29 @@ export default {
});
}
})
.catch((error) => {});
.catch((error) => {
});
//保存到空间库里面
var self = this;
for(var key in this.geoAttributes){
if(key == "BSM"){
for (var key in this.geoAttributes) {
if (key == "BSM") {
self.geoAttributes[key] = this.$store.state.zdbsm
}else if(key == 'QLSDFS'){
var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs;
} else if (key == 'QLSDFS') {
var qlsdfsList = self.$store.state.qlsdfsList, value = self.formData.qlsdfs;
var qlsdfs = qlsdfsList.filter(item => {
return item.bsm == value;
})
self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:"";
}else {
self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc : "";
} else {
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.formData[formKay];
}
}
self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) {
self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
console.log("属性保存完成!!");
});
}
}else{
} else {
this.$message({
// message: item.name+'不能为空',
message: '请完善表单后再继续操作',
......@@ -786,23 +786,23 @@ export default {
})
},
inputBlur(e){
if(e.target.value!=''){
e.target.style.border=""
}else{
e.target.style.border="1px solid red";
inputBlur(e) {
if (e.target.value != '') {
e.target.style.border = ""
} else {
e.target.style.border = "1px solid red";
e.target.style.boxSizing = 'border-box';
}
},
//提交宗地基本信息
submitZDxx(){
let data={
glbsm:this.$store.state.zdbsm,
status:1,
type:"zd"
}
submit(data).then((res)=>{
if(res.code===200){
submitZDxx() {
let data = {
glbsm: this.$store.state.zdbsm,
status: 1,
type: "zd"
}
submit(data).then((res) => {
if (res.code === 200) {
this.$message.success("提交成功!")
this.getZdjbxxData(this.curZdbsm);
getTree(this.curZdbsm).then((res) => {
......@@ -830,7 +830,8 @@ export default {
this.djqList = res.result;
this.$store.state.djqList = res.result;
})
.catch((error) => {});
.catch((error) => {
});
},
changeDjq(item) {
getListByPbsm(item)
......@@ -839,23 +840,25 @@ export default {
this.djzqList = res.result;
this.$store.state.djzqList = res.result;
})
.catch((error) => {});
.catch((error) => {
});
},
//判断容密高是否为区间
isInterval(val){
if(val == '>' || val == '<' || val == '=' || val == '>=' || val == '<='|| val == null){
isInterval(val) {
if (val == '>' || val == '<' || val == '=' || val == '>=' || val == '<=' || val == null) {
return false
}else{
} else {
return true;
}
},
//根据宗地信息的行政区代码查询行政区地籍区地籍子区的字典数据
getXzqData(xzqdm,djqdm){
getXzqData(xzqdm, djqdm) {
getAllList()
.then((res) => {
this.$store.state.xzqList = res.result;
})
.catch((error) => {});
.catch((error) => {
});
getListByPbsm(djqdm)
.then((res) => {
......@@ -866,9 +869,11 @@ export default {
//生成底盘代码
this.generatorDpdm();
})
.catch((error) => {});
.catch((error) => {
});
})
.catch((error) => {});
.catch((error) => {
});
}
},
computed: {
......@@ -886,34 +891,46 @@ export default {
},
},
watch: {
zl: function(val) {
zl: function (val) {
this.$store.state.zdzl = val;
},
mj: function(val) {
mj: function (val) {
this.$store.state.zdmj = val;
},
zddm: function(val) {
zddm: function (val) {
this.$store.state.zddm = val;
},
zdbsm:function (val) {
zdbsm: function (val) {
this.getZdjbxxData(val)
this.curZdbsm = val;
},
"formData.bdcdyh":function (val) {
"formData.bdcdyh": function (val) {
if (val != '') {
this.$refs.bdcdyh.style.border = '';
}
},
"formData.zddm":function (val) {
"formData.zddm": function (val) {
if (val != '') {
this.$refs.zddm.style.border = '';
}
}
},
};
"$store.state.sxdrType": {
handler(n) {
this.$message.success(n)
this.$nextTick(()=>{
if (n === 'zd') {
this.getZdjbxxData(this.$store.state.zdbsm)
}
})
},
immediate: true,
deep: true,
}
};
</script>
<style lang="less" scoped>
.main {
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
......@@ -982,7 +999,7 @@ export default {
right: 6px;
text-align: center;
background-color: #ffffff;
.el-button{
.el-button {
padding: 10px 30px;
margin-top: 8px;
}
......@@ -995,5 +1012,5 @@ export default {
border-color: rgba(0, 202, 205, .8);
}
}
}
}
</style>
......