c248f96e by 焦泽平
2 parents fa620d00 c2bc1fbb
......@@ -46,6 +46,7 @@
@contextmenu.prevent="openMenu($event, item,list)"
:class="{
active_color: item.expand,
curPage:$route.query.bsm==item.bsm
}"
>
<img class="qsztImg" v-if="item.qszt=='0'" :src="linshi"/>
......@@ -404,4 +405,7 @@ export default {
position: relative;
top: 1px;
}
.curPage{
color: orange;
}
</style>
......
......@@ -73,6 +73,7 @@
<li v-show="isZD && (zdQszt == '1' || zdQszt == '2')" @click="openCreateDialog">添加定着物</li>
<li v-show="isZD && (zdQszt != '1' && zdQszt != '2')" class="noEdit">添加定着物</li>
<li @click="deleteByBsm()">删除</li>
<li @click="deleteGeoByBsm()">删除图形</li>
</ul>
<ul
v-show="dzVisible"
......@@ -429,12 +430,51 @@ export default {
}
});
},
//删除图形
deleteGeoByBsm() {
var self = this;
var BSM = "";
var type = this.zdData.type;
if (type == "zd") {
BSM = this.zdData.zdbsm;
} else {
BSM = this.zdData.bsm;
}
//删除图形相关信息
var type = this.zdData.type;
this.queryGeoByBsm(BSM, type,function (features) {
if (features && features.length > 0 && features[0].geometry.rings.length > 0) {
var layer = null;
if (type == 'zd') {
layer = self.getLayerByName("ZDJBXX");
} else {
layer = self.getLayerByName("ZRZ");
}
var featureUrl = layer.layerUrl.replace("MapServer", "FeatureServer");
featureUrl += "/" + layer.id;
features[0].geometry = null;
self.updateGraphic(featureUrl, features, function (res) {
if(!res.updateFeatureResults[0].error){
self.$message.warning("删除成功!!!")
self.addGeoByBsm(BSM,type,"testMap");
}
});
}else {
self.$message.warning("暂无图形信息!!!")
}
});
},
/*
* 导入图形
* */
importGeo(){
var self = this;
var BSM = "";
if(this.zdData.qszt != '0'){
this.$message.warning("不是临时数据,不能导入图形!!!");
return;
}
//先这么写着 后面返回类型 根据类型判断
var type = this.zdData.type;
if(type == "zd"){
......
......@@ -249,7 +249,7 @@ export default {
var graphic = {
attributes:JSON.parse(JSON.stringify(attributes)),
geometry:{
rings:[[points.concat()]]
rings:[[points]]
}
}
features.push(graphic);
......@@ -340,7 +340,7 @@ export default {
},
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 => {
var graphics = this.txtResult.filter(item => {
return item.attributes.name == value;
})
var graphic = graphics[0];
......@@ -371,7 +371,7 @@ export default {
}
});
}else {
self.zrzOverAnalys(this.propertyInfo.bsm,graphic,function (flag,mes) {
self.zrzOverAnalys(self.propertyInfo.bsm,graphic,function (flag,mes) {
if(flag){
self.$message.warning(mes);
return;
......@@ -578,7 +578,7 @@ export default {
featureUrl += "/"+layer.id;
if(self.geoInfo){
self.geoInfo.BSM = self.propertyInfo.bsm;
graphic.attributes = self.geoInfo;
graphic.attributes = self.geoInfo.attributes;
//替换 生成图像 高亮
self.updateGraphic(featureUrl,graphic,function (res) {
var addRresult = res.updateFeatureResults[0];
......
......@@ -234,10 +234,10 @@ export default {
if(features && features.length > 0){
attributes.OBJECTID = features[0].attributes.OBJECTID;
features[0].attributes = attributes;
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 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]]";
features[0].geometry.spatialReference = {
wkt:wkt
}
}*/
featureUpdate.methods.updateGraphic(featureUrl,features[0],callBackFunction);
}else{
var graphic = {
......@@ -348,7 +348,7 @@ export default {
var zdLayer = null,
zrzLayer = null;
zdLayer = self.getLayerByName("ZDJBXX");
zdLayer = self.getLayerByName("ZRZ");
zrzLayer = self.getLayerByName("ZRZ");
var layerIds = [];
layerIds.push(zdLayer.id);
layerIds.push(zrzLayer.id);
......@@ -358,11 +358,11 @@ export default {
var flag = false,
mesge = "";
if(results && results.length > 0){
for(var i = 1;i < results.length;i++){
for(var i = 0;i < results.length;i++){
var feature = results[i].feature,
layerName = results[i].layerName;
if(layerName == 'ZRZ'){
if(feature.attributes['标识码'] != bsm){
if(!feature.attributes['标识码'] || feature.attributes['标识码'] != bsm){
var interFlag = geometryEngine.intersects(polygon,feature.geometry);
if(interFlag){
flag = true;
......@@ -370,7 +370,7 @@ export default {
break;
}
}
}else {
}else if(layerName == 'ZDJBXX') {
var interFlag = geometryEngine.intersects(polygon,feature.geometry);
var withinFlag = geometryEngine.within(polygon,feature.geometry);
if(!withinFlag && interFlag){
......@@ -468,7 +468,7 @@ export default {
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 ){
if( !features[0].geometry || features[0].geometry.rings.length == 0 ){
self.$message.success("暂无图形信息!!");
return;
}
......
......@@ -37,7 +37,7 @@
<hr />
<div class="contentItem" v-for="(value,key,index) in item.attributes" :key="index">
<span class="key">{{key}}</span>
<span class="value" :title="value">{{value}}</span>
<span class="value" :title="value">{{value == 'Null' ?"":value}}</span>
</div>
</div>
</el-card>
......@@ -142,7 +142,6 @@ export default {
},
//图层选择事件
selectLayerChange(){
debugger
var self = this;
this.features = [];
var layerAndResult = this.results.filter(function (item) {
......
......@@ -30,10 +30,11 @@ export default {
console.log("没有找到图层,不能查询");
return;
}
var view = maps[viewId];
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 ){
if( !features[0].geometry || features[0].geometry.rings.length == 0){
self.$message.success("暂无图形信息!!");
return;
}
......@@ -42,7 +43,6 @@ export default {
]).then( ([
GraphicsLayer
]) => {
var view = maps[viewId];
var layer = view.map.findLayerById("highlightLayer");
if(layer){
layer.removeAll();
......
......@@ -307,6 +307,7 @@
import moveH from "./../../../../../components/moveH/moveH";
import { getLpb, insertUpDownC, deleteCByBsm } from "@api/lpb";
import { hhb } from "@api/h";
import { Message } from 'element-ui';
export default {
name: "",
components: { moveH },
......@@ -576,7 +577,6 @@ export default {
this.lpbChTop = e.pageY;
if (this.isHbfg) {
this.rightClickFlag = 'hb';
console.log(this.fghbChoosedList,'this.fghbChoosedList ');
if (this.fghbChoosedList.length>1) {
this.lpbChVisible = true;
//判断选中户可以执行的合并类型
......@@ -717,19 +717,25 @@ export default {
.then(() => {
//确定合并 调用合并接口 this.hbsmList为选中户bsm数组 TO DO
let params = {
"ljzbsm": "",
"newuserbsm": "",
"oldBsms": olbBsms,
"scyclx": "",
"zdybsm": "",
"zrzbsm": ""
"scyclx": this.$parent.scyclx,
"ljzbsm": this.fghbChoosedList[0].ljzbsm,
"zdybsm": this.fghbChoosedList[0].zdybsm,
"zrzbsm": this.fghbChoosedList[0].zrzbsm
}
console.log(params,'params');
// hhb(params).then(() => {
//合并成功后更新楼盘表
// })
// .catch(() => {});
// console.log(params,'params');
hhb(params).then((res) => {
if(res.code == 200){
Message.success('合并成功');
// 清除选中户
this.clearChoosedH();
this.fghbChoosedList = [];
// 更新楼盘表
this.getLpb(this.zrzbsm, this.$parent.scyclx);
}
})
.catch(() => {});
})
.catch(() => {});
}else{
......
......@@ -280,6 +280,7 @@
import {getBdcdyh,saveZrzInfo,getZrzDetailByBsm} from "../../../api/zrz"
import {getQjZdjbxxDetailById} from "../../../api/zd"
import {submit,registerCall} from "../../../api/common"
import geoUtils from "@components/lineTree/tx/js/geoUtils";
export default {
name:'zrz',
components:{
......@@ -358,7 +359,6 @@
loading:false,
source:'',
geoAttributes:{
OBJECTID:null,
YSDM:"",
BDCDYH:"",
ZDDM:"",
......@@ -400,6 +400,7 @@
mainBoxWidth:0,
}
},
mixins:[geoUtils],
methods: {
registerCall(){
let data={
......@@ -540,7 +541,7 @@
type: "warning",
});
}else{
saveZrzInfo(this.form).then((res)=>{
saveZrzInfo(this.form).then((res)=>{
if(res.code===200){
this.$message.success("保存完成!")
}else {
......@@ -558,9 +559,12 @@
for(var key in this.geoAttributes){
if(key == "BSM"){
self.geoAttributes[key] = this.bsm
}else{
}else if(key == 'JGRQ'){
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.formData[formKay];
self.geoAttributes[key] = new Date(self.form[formKay]).getTime();
}else {
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.form[formKay];
}
}
self.updAttributes(this.bsm,'zrz',this.geoAttributes,function (res) {
......