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.geoJoint(geometry,function (isJoint,message) {
if(isJoint){
self.$message.warning(message)
return;
}else {
if(self.propertyInfo.type == "zd"){
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(graphic.geometry,function (isJoint,message) {
if(isJoint){
self.$message.warning(message)
return;
}else {
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,34 +482,44 @@ export default {
var updResult = res.updateFeatureResults[0];
if(updResult.objectId){
var OBJECTID = updResult.objectId;
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
self.createJZLine(graphic,function (res){
lines = res;
self.saveJzx(lines);
});
if(graphic.geometry){
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
self.createJZLine(graphic,function (res){
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;
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
self.createJZLine(graphic,function (res){
lines = res;
self.saveJzx(lines);
});
if(graphic.geometry) {
points = self.craetJZPoint(graphic);
self.savejzd(points)
//生成边框线
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"){
......@@ -491,36 +611,47 @@ export default {
}else {
bsm = this.propertyInfo.bsm;
}
this.resultDialog = 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
}
});
this.resultDialog = false;
this.txtResultDialog = false;
this.dealDialog = false;
this.$emit("closeImportDialog");
//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,19 +38,18 @@
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
}
});
center: [-0.154133333770497,0.6138183594020817],
spatialReference: {
wkid: 102100
}
});
maps[self.viewId] = view;
if(self.afterLoaderFunction && typeof self.afterLoaderFunction == 'function'){
self.afterLoaderFunction(view);
......
......@@ -10,32 +10,32 @@
<div class="search">
<!-- <el-button type="primary" @click="search">查询</el-button>
<el-button type="primary" @click="result">重置</el-button> -->
<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="输入宗地编码"
v-model="queryData.zddm"
placeholder="输入宗地编码"
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
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-form>
</el-col>
</el-row>
<el-row>
......@@ -43,85 +43,50 @@
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="权利人">
<el-input
v-model="queryData.qlrmc"
placeholder="输入权利人"
v-model="queryData.qlrmc"
placeholder="输入权利人"
></el-input>
</el-form-item>
<el-form-item label="坐落">
<el-input
v-model="queryData.zl"
placeholder="输入坐落"
v-model="queryData.zl"
placeholder="输入坐落"
></el-input>
</el-form-item>
</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-form>
</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> -->
<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 class="table-data">
<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
......@@ -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>
......@@ -13,26 +13,26 @@
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="宗地编码">
<el-input
v-model="queryData.zddm"
placeholder="输入宗地编码"
v-model="queryData.zddm"
placeholder="输入宗地编码"
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
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-form>
</el-col>
</el-row>
<el-row>
......@@ -40,49 +40,50 @@
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="权利人">
<el-input
v-model="queryData.qlrmc"
placeholder="输入权利人"
v-model="queryData.qlrmc"
placeholder="输入权利人"
></el-input>
</el-form-item>
<el-form-item label="坐落">
<el-input
v-model="queryData.zl"
placeholder="输入坐落"
v-model="queryData.zl"
placeholder="输入坐落"
></el-input>
</el-form-item>
</el-form>
</el-form>
</el-col>
</el-row>
<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 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
......@@ -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 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);
var saveGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
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[i].attributes,
geometry:geo
});
saveGraphics.push(saveGraphic);
}
var saveGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
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 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);
var updGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
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[i].attributes,
geometry:geo
});
updGraphics.push(updGraphic);
}
var updGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
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 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);
var delGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
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[i].attributes,
geometry:geo
});
delGraphics.push(delGraphic);
}
var delGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
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:[],
......
......@@ -162,7 +162,7 @@
</el-tab-pane>
<el-tab-pane label="自然幢" name="zrz">
<ul>
<li :class="[zdFghData.newZdlist[index].zrz.indexOf(childItem) > -1 ? 'choosed':'',(childItem.hasChoosed === index || childItem.hasChoosed === '' )? '':'cantClick']"
<li :class="[zdFghData.newZdlist[index].zrz.indexOf(childItem) > -1 ? 'choosed':'',(childItem.hasChoosed === index || childItem.hasChoosed === '' )? '':'cantClick']"
@click="zrzHandleCommand(childItem,childItem.bsm,index,childIndex)" v-for="(childItem,childIndex) in zdZrzList" :key="childIndex*Math.random()">
{{childItem.xmmc}} <i class="fa fa-check" style="color:'#4EB2FF'"></i>
</li>
......@@ -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 = ""
}
})
......@@ -621,7 +623,7 @@
ztype: 'zrz'
})
},
dzHandleCommand(obj,bsm, index,childIndex) {
//判断选中状态
if(this.zdDzList[childIndex].hasChoosed === '' || this.zdDzList[childIndex].hasChoosed === index){
......@@ -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
......@@ -686,7 +688,7 @@
return
}
break;
default:
break;
}
......@@ -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;
......@@ -760,7 +762,7 @@
}
})
}else{
this.$message.warning("幢信息未选择完成,无法保存")
this.$message.warning("幢信息未选择完成,无法保存")
}
},
saveDz() {
......@@ -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
},
......@@ -1001,7 +1003,7 @@
</script>
<style scoped lang="less">
.fg {
.menu {
/deep/ .el-tabs__content {
position: unset;
......@@ -1041,7 +1043,7 @@
}
}
}
/deep/ .el-card__header{
padding: 16px 20px;
background-color: #FAFAFA;
......@@ -1143,7 +1145,7 @@
width: 96% !important;
}
}
}
.zrz {
width: 100%;
......@@ -1215,7 +1217,7 @@
background: #FAFAFA;
}
}
tr:hover {
background-color: #F5F7FA;
}
......@@ -1271,7 +1273,7 @@
display: inline-block;
}
}
}
}
.choose{
width: 88px;
color: #30A4FD;
......
......@@ -76,15 +76,20 @@ export default {
},
mixins:[mapLayerManager,findTask],
mounted(){
var query = this.$route.query;
if(query && JSON.stringify(query) != "{}"){
//self.addGeoByBsm(query.bsm,query.type,self.viewId);
if(query.type == 'zd'){
this.getRightTree(query.bsm)
}else if(query.type == 'zrz'){
this.getRightTreeByZrzbsm(query.bsm);
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'){
self.getRightTree(query.bsm)
}else if(query.type == 'zrz'){
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);
}
......
<template>
<div class="main" ref="mainBox">
<div class="formMenu">
<Qlr ref="qlrxxModule" :bsm="curZdbsm" :qszt="formData.qszt"></Qlr>
<!-- <el-button
<div class="main" ref="mainBox">
<div class="formMenu">
<Qlr ref="qlrxxModule" :bsm="curZdbsm" :qszt="formData.qszt"></Qlr>
<!-- <el-button
type="primary"
class="changeBtn"
@click="getQlrxxData"
......@@ -14,986 +14,1003 @@
@click="getQlxzData"
>获取权利性质组件数据</el-button
> -->
<table class="zdjbxxTable" cellspacing="0" cellpadding="0" border="1">
<tr>
<th colspan="12">宗地基本信息</th>
</tr>
<tr>
<td colspan="2">行政区</td>
<td colspan="2">
<el-select
:disabled="formData.qszt!='0'"
class="formSelect"
v-model="formData.xzqbsm"
@change="changeXzq(formData.xzqbsm)"
>
<el-option
v-for="item in $store.state.xzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍区</td>
<td colspan="2">
<el-select
class="formSelect"
:disabled="formData.qszt!='0'"
v-model="formData.djqbsm"
@change="changeDjq(formData.djqbsm)"
>
<el-option
v-for="item in $store.state.djqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍子区</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.djzqbsm">
<el-option
v-for="item in $store.state.djzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">权利类型</td>
<td colspan="4">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.qllxbsm">
<el-option
v-for="item in $store.state.qllxList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</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-option
v-for="item in $store.state.zdtzmList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">权利设定方式</td>
<td colspan="4">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.qlsdfs">
<el-option
v-for="item in $store.state.qlsdfsList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">宗地代码<i class="requisite">*</i></td>
<td colspan="4" class="psr">
<input :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zddm" on maxlength="19"
type="text"
class="formInput percent80"
v-model="formData.zddm"
/>
<el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn" @click="generatorCode"
>生成
</el-button>
</td>
</tr>
<tr>
<td colspan="2">地籍号</td>
<td colspan="4">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.djh" />
</td>
<table class="zdjbxxTable" cellspacing="0" cellpadding="0" border="1">
<tr>
<th colspan="12">宗地基本信息</th>
</tr>
<tr>
<td colspan="2">行政区</td>
<td colspan="2">
<el-select
:disabled="formData.qszt!='0'"
class="formSelect"
v-model="formData.xzqbsm"
@change="changeXzq(formData.xzqbsm)"
>
<el-option
v-for="item in $store.state.xzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍区</td>
<td colspan="2">
<el-select
class="formSelect"
:disabled="formData.qszt!='0'"
v-model="formData.djqbsm"
@change="changeDjq(formData.djqbsm)"
>
<el-option
v-for="item in $store.state.djqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍子区</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.djzqbsm">
<el-option
v-for="item in $store.state.djzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">权利类型</td>
<td colspan="4">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.qllxbsm">
<el-option
v-for="item in $store.state.qllxList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</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-option
v-for="item in $store.state.zdtzmList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">权利设定方式</td>
<td colspan="4">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.qlsdfs">
<el-option
v-for="item in $store.state.qlsdfsList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">宗地代码<i class="requisite">*</i></td>
<td colspan="4" class="psr">
<input :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zddm" on maxlength="19"
type="text"
class="formInput percent80"
v-model="formData.zddm"
/>
<el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn"
@click="generatorCode"
>生成
</el-button>
</td>
</tr>
<tr>
<td colspan="2">地籍号</td>
<td colspan="4">
<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"
class="formInput"
v-model="formData.bdcdyh"
/>
<!-- <el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn">生成</el-button> -->
</td>
</tr>
<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" />
</td>
<td colspan="2">项目名称</td>
<td colspan="4" class="psr">
<input :disabled="formData.qszt!='0'"
type="text"
class="formInput "
v-model="formData.xmmc"
/>
</td>
</tr>
<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>
</td>
<td colspan="2">价格(元)</td>
<td colspan="4" class="psr">
<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" />
</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" />
</td>
</tr>
<tr>
<td colspan="2">容积率</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyrjl">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text" :disabled="formData.qszt!='0'"
v-model="rjl"
v-show="isInterval(formData.jyrjl)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyrjl)">-</span>
<input
type="text" :disabled="formData.qszt!='0'"
v-model="formData.rjl"
:class="isInterval(formData.jyrjl) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">容积说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm" />
</td>
</tr>
<tr>
<td colspan="2">建筑密度</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyjzmd">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text"
v-model="jzmd" :disabled="formData.qszt!='0'"
v-show="isInterval(formData.jyjzmd)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyjzmd)">-</span>
<input
type="text"
v-model="formData.jzmd" :disabled="formData.qszt!='0'"
:class="isInterval(formData.jyjzmd) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">建筑密度说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm" />
</td>
</tr>
<tr>
<td colspan="2">建筑限高</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyjzxg">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text" :disabled="formData.qszt!='0'"
v-model="jzxg"
v-show="isInterval(formData.jyjzxg)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyjzxg)">-</span>
<input
type="text" :disabled="formData.qszt!='0'"
v-model="formData.jzxg"
:class="isInterval(formData.jyjzxg) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">建筑限高说明</td>
<td colspan="4" class="psr">
<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" />
</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" />
</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" />
</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" />
</td>
</tr>
<tr>
<td colspan="12">
<Qlxz ref="qlxzModule" :hasSyqx='true' :formData="formData"></Qlxz>
</td>
</tr>
<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" />
</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" />
</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" />
</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" />
</td>
</tr>
<tr>
<td colspan="2">共有/共用权利人情况</td>
<td colspan="10">
<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" />
</td>
</tr>
</table>
<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"
class="formInput"
v-model="formData.bdcdyh"
/>
<!-- <el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn">生成</el-button> -->
</td>
</tr>
<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"/>
</td>
<td colspan="2">项目名称</td>
<td colspan="4" class="psr">
<input :disabled="formData.qszt!='0'"
type="text"
class="formInput "
v-model="formData.xmmc"
/>
</td>
</tr>
<tr>
<td colspan="2">国民经济行业分类</td>
<td colspan="4">
<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"/>
</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"/>
</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"/>
</td>
</tr>
<tr>
<td colspan="2">容积率</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyrjl">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text" :disabled="formData.qszt!='0'"
v-model="rjl"
v-show="isInterval(formData.jyrjl)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyrjl)">-</span>
<input
type="text" :disabled="formData.qszt!='0'"
v-model="formData.rjl"
:class="isInterval(formData.jyrjl) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">容积说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm"/>
</td>
</tr>
<tr>
<td colspan="2">建筑密度</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyjzmd">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text"
v-model="jzmd" :disabled="formData.qszt!='0'"
v-show="isInterval(formData.jyjzmd)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyjzmd)">-</span>
<input
type="text"
v-model="formData.jzmd" :disabled="formData.qszt!='0'"
:class="isInterval(formData.jyjzmd) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">建筑密度说明</td>
<td colspan="4" class="psr">
<input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm"/>
</td>
</tr>
<tr>
<td colspan="2">建筑限高</td>
<td colspan="2">
<el-select class="formSelect" :disabled="formData.qszt!='0'" v-model="formData.jyjzxg">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</td>
<td colspan="2">
<input
type="text" :disabled="formData.qszt!='0'"
v-model="jzxg"
v-show="isInterval(formData.jyjzxg)"
class="formInput percent47"
/>
<span class="percent4" v-show="isInterval(formData.jyjzxg)">-</span>
<input
type="text" :disabled="formData.qszt!='0'"
v-model="formData.jzxg"
:class="isInterval(formData.jyjzxg) ? 'formInput percent47' : 'formInput'"
/>
</td>
<td colspan="2">建筑限高说明</td>
<td colspan="4" class="psr">
<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"/>
</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"/>
</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"/>
</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"/>
</td>
</tr>
<tr>
<td colspan="12">
<Qlxz ref="qlxzModule" :hasSyqx='true' :formData="formData"></Qlxz>
</td>
</tr>
<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"/>
</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"/>
</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"/>
</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"/>
</td>
</tr>
<tr>
<td colspan="2">共有/共用权利人情况</td>
<td colspan="10">
<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"/>
</td>
</tr>
</table>
<!-- <div style="min-height: 40px;text-align: center;margin-top: 10px">
<el-button type="success" class="saveBtn" @click="updateZDxx">保存</el-button>
<el-button type="primary" @click="submitZDxx">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div> -->
<!-- <div style="min-height: 40px;text-align: center;margin-top: 10px">
<el-button type="success" class="saveBtn" @click="updateZDxx">保存</el-button>
<el-button type="primary" @click="submitZDxx">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div> -->
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="updateZDxx">保存</el-button>
<el-button type="primary" @click="submitZDxx">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
<!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> -->
</div>
</div>
</div>
<el-button type="primary" class="saveBtn" @click="updateZDxx">保存</el-button>
<el-button type="primary" @click="submitZDxx">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
<!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> -->
</div>
</div>
</div>
</template>
<script>
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import geoUtils from "@components/lineTree/tx/js/geoUtils";
import {
getAllList,
getDdicByMC,
getListByXzqbsm,
getListByPbsm,
submit,
getTree,
registerCall
} from "../../../api/common";
import {
getBdcdyh,
getQjZdjbxxDetailById,
updateQjZdjbxx,
} from "../../../api/zd";
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import geoUtils from "@components/lineTree/tx/js/geoUtils";
import {
getAllList,
getDdicByMC,
getListByXzqbsm,
getListByPbsm,
submit,
getTree,
registerCall
} from "../../../api/common";
import {
getBdcdyh,
getQjZdjbxxDetailById,
updateQjZdjbxx,
} from "../../../api/zd";
export default {
inject:['getRightTree'],
name: "",
components: {
Qlr,
Qlxz,
},
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:'',
compareList: [
{ 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:"",
}
};
},
mixins:[geoUtils],
created() {
this.curZdbsm = this.$route.query.bsm;
},
mounted() {
this.getZdjbxxData(this.$store.state.zdbsm);
this.$nextTick(() => {
this.mainBoxWidth = this.$refs.mainBox.clientWidth;
})
},
methods: {
registerCall(){
let data={
type:'zd',
bsm:this.$store.state.zdbsm
}
registerCall(data).then(res=>{
if (res.success) {
this.$message.success("登记成功")
this.getRightTree(this.$store.state.zdbsm)
export default {
inject: ['getRightTree'],
name: "",
components: {
Qlr,
Qlxz,
},
props: {},
data() {
return {
rules: [],
rjl: '',
jzmd: '',
jzxg: '',
compareList: [
{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: "",
}
};
},
mixins: [geoUtils],
created() {
this.curZdbsm = this.$route.query.bsm;
},
mounted() {
this.getZdjbxxData(this.$store.state.zdbsm);
this.$nextTick(() => {
this.mainBoxWidth = this.$refs.mainBox.clientWidth;
})
},
//根据zdbsm查询基本信息
getZdjbxxData(bsm) {
getQjZdjbxxDetailById(bsm)
.then((res) => {
if (res.result) {
this.formData = res.result;
console.log(res.result,'res.result');
this.getXzqData(res.result.xzqbsm,res.result.djqbsm);
//如果没有宗地代码,自动生成
// if(res.result.zddm == null){
// this.generatorCode()
// }
//判断容密高是否为区间值,如果是区间值,则将校验值置为'-'并给rjl,jzmd,jzxg赋值
this.rjl = this.isInterval(this.formData.jyrjl) ? this.formData.jyrjl : '';
this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? '-' : this.formData.jyrjl;
this.jzmd = this.isInterval(this.formData.jyjzmd) ? this.formData.jyjzmd : '';
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){
res.result.list[0].list.push({
"pzdjbsm": "",
"pzdjmc": "",
"pzytdm": "",
"pzytmc": "",
"pzytmj": 0,
"qlxzbsm": "",
"sjdjbsm": "",
"sjdjmc": "",
"sjytdm": "",
"sjytmc": "",
"sjytmj": 0,
"syqx": "",
"tdsyjssj": "",
"tdsyqssj": "",
"tdzh": ""
})
}
this.$nextTick(()=>{
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = res.result.list;
})
}else{
this.$nextTick(()=>{
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = [
{
id: Math.random(),
isInside: false,
hasNotBorder: false,
bsm: "", //权利性质标识码
glbsm: "", //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM
qlxzdm: "",
zhqlxzlx: "", //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质
list: [
{
pzdjbsm: "",
pzdjmc: "",
pzytdm: "",
pzytmc: "",
pzytmj: 0,
qlxzbsm: "",
sjdjbsm: "",
sjdjmc: "",
sjytdm: "",
sjytmc: "",
sjytmj: 0,
syqx: "",
tdsyjssj: "",
tdsyqssj: "",
tdzh: "",
},
],
},
];
})
}
}
})
.catch((error) => {});
},
methods: {
registerCall() {
let data = {
type: 'zd',
bsm: this.$store.state.zdbsm
}
registerCall(data).then(res => {
if (res.success) {
this.$message.success("登记成功")
this.getRightTree(this.$store.state.zdbsm)
}
})
},
//根据zdbsm查询基本信息
getZdjbxxData(bsm) {
getQjZdjbxxDetailById(bsm)
.then((res) => {
if (res.result) {
this.formData = res.result;
console.log(res.result, 'res.result');
this.getXzqData(res.result.xzqbsm, res.result.djqbsm);
//如果没有宗地代码,自动生成
// if(res.result.zddm == null){
// this.generatorCode()
// }
//判断容密高是否为区间值,如果是区间值,则将校验值置为'-'并给rjl,jzmd,jzxg赋值
this.rjl = this.isInterval(this.formData.jyrjl) ? this.formData.jyrjl : '';
this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? '-' : this.formData.jyrjl;
this.jzmd = this.isInterval(this.formData.jyjzmd) ? this.formData.jyjzmd : '';
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) {
res.result.list[0].list.push({
"pzdjbsm": "",
"pzdjmc": "",
"pzytdm": "",
"pzytmc": "",
"pzytmj": 0,
"qlxzbsm": "",
"sjdjbsm": "",
"sjdjmc": "",
"sjytdm": "",
"sjytmc": "",
"sjytmj": 0,
"syqx": "",
"tdsyjssj": "",
"tdsyqssj": "",
"tdzh": ""
})
}
this.$nextTick(() => {
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = res.result.list;
})
} else {
this.$nextTick(() => {
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = [
{
id: Math.random(),
isInside: false,
hasNotBorder: false,
bsm: "", //权利性质标识码
glbsm: "", //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM
qlxzdm: "",
zhqlxzlx: "", //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质
list: [
{
pzdjbsm: "",
pzdjmc: "",
pzytdm: "",
pzytmc: "",
pzytmj: 0,
qlxzbsm: "",
sjdjbsm: "",
sjdjmc: "",
sjytdm: "",
sjytmc: "",
sjytmj: 0,
syqx: "",
tdsyjssj: "",
tdsyqssj: "",
tdzh: "",
},
],
},
];
})
}
}
})
.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.dpdm = item.dm;
}
});
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.dpdm = this.dpdm + item.dm;
}
});
//构造底盘代码,前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
generatorDpdm() {
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.dpdm = this.dpdm + item.dm;
}
});
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.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.dpdm = this.dpdm + item.dm;
}
});
},
//不动产单元号再次生成提示框
open() {
this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.generatorDpdm();
getBdcdyh(this.dpdm, "zd")
.then((res) => {
console.log(res);
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {
});
this.$message({
type: 'success',
message: '生成成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
//生成宗地代码
generatorCode() {
if ((this.formData.zddm != null && this.formData.zddm !== '') || (this.formData.bdcdyh != null && this.formData.bdcdyh !== '')) {
this.open();
return;
}
this.generatorDpdm();
//不动产单元号再次生成提示框
open() {
this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.generatorDpdm();
getBdcdyh(this.dpdm, "zd")
.then((res) => {
console.log(res);
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {});
this.$message({
type: 'success',
message: '生成成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
.catch((error) => {
});
},
//修改宗地基本信息
updateZDxx(formData) {
//获取权利性质数据
this.formData.list = this.$refs.qlxzModule.getQlxzDataList();
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 = [
{
data: this.formData.zdtzmbsm,
name: '宗地特征码',
dom: this.$refs.zdtzm,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zddm,
name: '宗地代码',
dom: this.$refs.zddm,
rule: /^\s*$/g, //非空
},
{
data: this.formData.bdcdyh,
name: '不动产单元号',
dom: this.$refs.bdcdyh,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zl,
name: '坐落',
dom: this.$refs.zl,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zdszd,
name: '宗地东至',
dom: this.$refs.zdszd,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zdszb,
name: '宗地北至',
dom: this.$refs.zdszb,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zdszx,
name: '宗地西至',
dom: this.$refs.zdszx,
rule: /^\s*$/g, //非空
},
{
data: this.formData.zdszn,
name: '宗地南至',
dom: this.$refs.zdszn,
rule: /^\s*$/g, //非空
},
{
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) {
item.dom.$el.style.border = '1px solid red';
item.dom.$el.style.boxSizing = 'border-box';
} else {
item.dom.style.border = '1px solid red';
item.dom.style.boxSizing = 'border-box';
}
// this.$message({
// // message: item.name+'不能为空',
// message: '不能为空',
// type: "warning",
// });
flag = false;
return false
}
})
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) {
this.$message({
message: '宗地代码或不动产单元号有误,请核对后再试一次',
type: "warning",
});
} else {
updateQjZdjbxx(this.formData)
.then((res) => {
if (res.code == 200) {
console.log(res);
this.$message({
message: '保存成功',
type: "success",
});
// 保存成功再次查询
this.getZdjbxxData(this.$store.state.zdbsm);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
})
.catch((error) => {
});
//保存到空间库里面
var self = this;
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;
var qlsdfs = qlsdfsList.filter(item => {
return item.bsm == value;
})
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) {
console.log("属性保存完成!!");
});
}
} else {
this.$message({
// message: item.name+'不能为空',
message: '请完善表单后再继续操作',
type: "warning",
});
}
})
//生成宗地代码
generatorCode() {
},
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) {
this.$message.success("提交成功!")
this.getZdjbxxData(this.curZdbsm);
getTree(this.curZdbsm).then((res) => {
if (res.success) {
// console.log('successsuccesssuccesssuccess');
this.$store.state.treeData = res.result;
}
});
}
})
},
getQlrxxData() {
console.log(this.$refs.qlrxxModule.getQlgyfsData()); //权利共有方式数据
console.log(this.$refs.qlrxxModule.getQlrxxData()); //权利人表格数据
},
getQlxzData() {
console.log(this.$refs.qlxzModule.getQlxzDataList()); //权利性质数据
},
//行政区划选择
changeXzq(id) {
getListByXzqbsm(id)
.then((res) => {
this.formData.djqbsm = "";
this.formData.djzqbsm = "";
this.djqList = res.result;
this.$store.state.djqList = res.result;
})
.catch((error) => {
});
},
changeDjq(item) {
getListByPbsm(item)
.then((res) => {
this.formData.djzqbsm = "";
this.djzqList = res.result;
this.$store.state.djzqList = res.result;
})
.catch((error) => {
});
},
//判断容密高是否为区间
isInterval(val) {
if (val == '>' || val == '<' || val == '=' || val == '>=' || val == '<=' || val == null) {
return false
} else {
return true;
}
},
//根据宗地信息的行政区代码查询行政区地籍区地籍子区的字典数据
getXzqData(xzqdm, djqdm) {
getAllList()
.then((res) => {
this.$store.state.xzqList = res.result;
})
.catch((error) => {
});
if((this.formData.zddm!=null&&this.formData.zddm!=='')||(this.formData.bdcdyh!=null&&this.formData.bdcdyh!=='')){
this.open();
return;
getListByPbsm(djqdm)
.then((res) => {
this.$store.state.djzqList = res.result;
getListByXzqbsm(xzqdm)
.then((res) => {
this.$store.state.djqList = res.result;
//生成底盘代码
this.generatorDpdm();
})
.catch((error) => {
});
})
.catch((error) => {
});
}
this.generatorDpdm();
getBdcdyh(this.dpdm, "zd")
.then((res) => {
console.log(res);
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {});
},
//修改宗地基本信息
updateZDxx(formData) {
//获取权利性质数据
this.formData.list = this.$refs.qlxzModule.getQlxzDataList();
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= [
{
data:this.formData.zdtzmbsm,
name:'宗地特征码',
dom:this.$refs.zdtzm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zddm,
name:'宗地代码',
dom:this.$refs.zddm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.bdcdyh,
name:'不动产单元号',
dom:this.$refs.bdcdyh,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zl,
name:'坐落',
dom:this.$refs.zl,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszd,
name:'宗地东至',
dom:this.$refs.zdszd,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszb,
name:'宗地北至',
dom:this.$refs.zdszb,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszx,
name:'宗地西至',
dom:this.$refs.zdszx,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zdszn,
name:'宗地南至',
dom:this.$refs.zdszn,
rule: /^\s*$/g, //非空
},
{
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){
item.dom.$el.style.border = '1px solid red';
item.dom.$el.style.boxSizing = 'border-box';
}else{
item.dom.style.border = '1px solid red';
item.dom.style.boxSizing = 'border-box';
}
// this.$message({
// // message: item.name+'不能为空',
// message: '不能为空',
// type: "warning",
// });
flag = false;
return false
}
})
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){
this.$message({
message: '宗地代码或不动产单元号有误,请核对后再试一次',
type: "warning",
});
}else{
updateQjZdjbxx(this.formData)
.then((res) => {
if (res.code == 200) {
console.log(res);
this.$message({
message: '保存成功',
type: "success",
});
// 保存成功再次查询
this.getZdjbxxData(this.$store.state.zdbsm);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
})
.catch((error) => {});
//保存到空间库里面
var self = this;
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;
var qlsdfs = qlsdfsList.filter(item => {
return item.bsm == value;
})
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) {
console.log("属性保存完成!!");
});
}
}else{
this.$message({
// message: item.name+'不能为空',
message: '请完善表单后再继续操作',
type: "warning",
});
}
})
},
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){
this.$message.success("提交成功!")
this.getZdjbxxData(this.curZdbsm);
getTree(this.curZdbsm).then((res) => {
if (res.success) {
// console.log('successsuccesssuccesssuccess');
this.$store.state.treeData = res.result;
}
});
}
})
},
getQlrxxData() {
console.log(this.$refs.qlrxxModule.getQlgyfsData()); //权利共有方式数据
console.log(this.$refs.qlrxxModule.getQlrxxData()); //权利人表格数据
},
getQlxzData() {
console.log(this.$refs.qlxzModule.getQlxzDataList()); //权利性质数据
},
//行政区划选择
changeXzq(id) {
getListByXzqbsm(id)
.then((res) => {
this.formData.djqbsm = "";
this.formData.djzqbsm = "";
this.djqList = res.result;
this.$store.state.djqList = res.result;
})
.catch((error) => {});
},
changeDjq(item) {
getListByPbsm(item)
.then((res) => {
this.formData.djzqbsm = "";
this.djzqList = res.result;
this.$store.state.djzqList = res.result;
})
.catch((error) => {});
},
//判断容密高是否为区间
isInterval(val){
if(val == '>' || val == '<' || val == '=' || val == '>=' || val == '<='|| val == null){
return false
}else{
return true;
}
},
//根据宗地信息的行政区代码查询行政区地籍区地籍子区的字典数据
getXzqData(xzqdm,djqdm){
getAllList()
.then((res) => {
this.$store.state.xzqList = res.result;
})
.catch((error) => {});
getListByPbsm(djqdm)
.then((res) => {
this.$store.state.djzqList = res.result;
getListByXzqbsm(xzqdm)
.then((res) => {
this.$store.state.djqList = res.result;
//生成底盘代码
this.generatorDpdm();
})
.catch((error) => {});
})
.catch((error) => {});
}
},
computed: {
zl() {
return this.formData.zl;
},
mj() {
return this.formData.zdmj;
},
zddm() {
return this.formData.zddm;
},
zdbsm() {
return this.$route.query.bsm;
},
},
watch: {
zl: function(val) {
this.$store.state.zdzl = val;
},
mj: function(val) {
this.$store.state.zdmj = val;
},
zddm: function(val) {
this.$store.state.zddm = val;
},
zdbsm:function (val) {
this.getZdjbxxData(val)
this.curZdbsm = val;
},
"formData.bdcdyh":function (val) {
if (val != '') {
this.$refs.bdcdyh.style.border = '';
}
},
"formData.zddm":function (val) {
if (val != '') {
this.$refs.zddm.style.border = '';
}
}
},
};
},
computed: {
zl() {
return this.formData.zl;
},
mj() {
return this.formData.zdmj;
},
zddm() {
return this.formData.zddm;
},
zdbsm() {
return this.$route.query.bsm;
},
},
watch: {
zl: function (val) {
this.$store.state.zdzl = val;
},
mj: function (val) {
this.$store.state.zdmj = val;
},
zddm: function (val) {
this.$store.state.zddm = val;
},
zdbsm: function (val) {
this.getZdjbxxData(val)
this.curZdbsm = val;
},
"formData.bdcdyh": function (val) {
if (val != '') {
this.$refs.bdcdyh.style.border = '';
}
},
"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 {
box-sizing: border-box;
padding: 18px;
height: auto;
.formMenu {
width: 100%;
margin: 0 auto;
margin-bottom: 50px;
}
.zdjbxxTable {
margin: 10px 0;
background-color: #fff;
font-size: 14px;
width: 100%;
table-layout: fixed;
th {
height: 36px;
line-height: 36px;
font-size: 16px;
}
td {
text-align: center;
height: 36px;
border-color: #E6E6E6;
}
/deep/ .el-input__inner {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
}
.percent68 {
width: 68% !important;
float: left;
position: relative;
top: 7px;
}
.percent47 {
width: 45% !important;
float: left;
}
.percent4 {
height: 20px;
line-height: 20px;
width: 4% !important;
float: left;
}
.percent30 {
width: 30% !important;
float: left;
}
.el-input__icon {
line-height: 37px;
}
.el-select {
width: 100%;
}
}
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
.formMenu {
width: 100%;
margin: 0 auto;
margin-bottom: 50px;
}
.zdjbxxTable {
margin: 10px 0;
background-color: #fff;
font-size: 14px;
width: 100%;
table-layout: fixed;
th {
height: 36px;
line-height: 36px;
font-size: 16px;
}
td {
text-align: center;
height: 36px;
border-color: #E6E6E6;
}
/deep/ .el-input__inner {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
}
.percent68 {
width: 68% !important;
float: left;
position: relative;
top: 7px;
}
.percent47 {
width: 45% !important;
float: left;
}
.percent4 {
height: 20px;
line-height: 20px;
width: 4% !important;
float: left;
}
.percent30 {
width: 30% !important;
float: left;
}
.el-input__icon {
line-height: 37px;
}
.el-select {
width: 100%;
}
}
.header-button {
height: 50px;
position: fixed;
bottom: 0;
right: 6px;
text-align: center;
background-color: #ffffff;
.el-button{
padding: 10px 30px;
margin-top: 8px;
}
.saveBtn {
background-color: #00CACD;
border-color: #00CACD;
}
.saveBtn:hover {
background-color: rgba(0, 202, 205, .8);
border-color: rgba(0, 202, 205, .8);
}
}
}
.header-button {
height: 50px;
position: fixed;
bottom: 0;
right: 6px;
text-align: center;
background-color: #ffffff;
.el-button {
padding: 10px 30px;
margin-top: 8px;
}
.saveBtn {
background-color: #00CACD;
border-color: #00CACD;
}
.saveBtn:hover {
background-color: rgba(0, 202, 205, .8);
border-color: rgba(0, 202, 205, .8);
}
}
}
</style>
......