924f1c58 by renchao@pashanhoo.com

feat:图形定位

1 parent 6a7adb82
......@@ -11,7 +11,6 @@
"@antv/g2": "^4.2.8",
"@babel/polyfill": "^7.12.1",
"@riophae/vue-treeselect": "^0.4.0",
"@union/gis-sdk": "^1.1.0",
"axios": "^0.21.1",
"bpmn-js": "^7.4.0",
"bpmn-js-properties-panel": "^0.37.2",
......
[
{
"label":"不动产",
"id":"1-1",
"alpha":100,
"children":[
{
"label":"行政区划",
"id": "XZQH",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer",
"alpha":100,
"children":[
{
"label":"行政区",
"id": "XZQH_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer",
"alpha":100
},
{
"label":"行政区界限",
"id": "XZQH_1",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer",
"alpha":100
}
]
},
{
"label":"地籍分区",
"id": "DJFQ",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer",
"alpha":100,
"children":[
{
"label":"地籍区",
"id": "DJFQ_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer",
"alpha":100
},
{
"label":"地籍子区",
"id": "DJFQ_1",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer",
"alpha":100
}
]
},
{
"label":"不动产单元",
"id": "bdcDY",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100,
"children":[
{
"label":"界址点",
"id": "bdcDY_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"界址线",
"id": "bdcDY_1",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"林权",
"id": "bdcDY_2",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"自然幢",
"id": "ZRZ",
"name": "zrz",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"构筑物",
"id": "bdcDY_4",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"点状定着物",
"id": "bdcDY_5",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"线状定着物",
"id": "bdcDY_6",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
},
{
"label":"面状定着物",
"id": "bdcDY_7",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/bdcDY_610100/MapServer",
"alpha":100
},
{
"label":"宗地",
"id": "ZDJBXX",
"name": "zd",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100,
"fields": [ "YSDM", "ZDDM", "BDCDYH", "ZDTZM", "ZL", "ZDMJ", "MJDW", "QLLX", "QLXZ" ]
},
{
"label":"宗地历史",
"id": "ZDJBXXLS",
"name": "zdls",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100,
"fields": [ "YSDM", "ZDDM", "BDCDYH", "ZDTZM", "ZL", "ZDMJ", "MJDW", "QLLX", "QLXZ" ]
},
{
"label":"宗海",
"id": "ZHJBXX",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer",
"alpha":100
}
]
},
{
"label":"自然地理",
"id": "ZRDL",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer",
"alpha":100,
"children":[
{
"label":"水系",
"id": "ZRDL_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer",
"alpha":100
},
{
"label":"植被",
"id": "ZRDL_1",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer",
"alpha":100
},
{
"label":"辅助面",
"id": "ZRDL_2",
"url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer",
"alpha":100
}
]
}
]
},
{
"label":"厦门数据",
"id":"2-1",
"alpha":100,
"children":[
{
"label":"规划用地",
"id": "ghyd",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ghyd/MapServer",
"alpha":100,
"children":[
{
"label":"规划用地",
"id": "ghyd_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ghyd/MapServer",
"alpha":100,
"fields": [ "地块编号", "规划现状", "行政区", "维护文号", "规划用地性质代号", "规划用地性质名称", "所属管理单元", "所属编制单元" ]
}
]
},
{
"label":"基本农田",
"id": "jbnt",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/jbnt/MapServer",
"alpha":100,
"children":[
{
"label":"基本农田",
"id": "jbnt_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/jbnt/MapServer",
"alpha":100,
"fields": [ "编制单位", "权属单位代码", "权属单位名称", "座落单位代码", "座落单位名称", "地类名称", "基本农田面积" ]
}
]
},
{
"label":"行政区划",
"id": "xmxzq",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer",
"alpha":100,
"children":[
{
"label":"村级行政区划",
"id": "xmxzq_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer",
"alpha":100
},
{
"label":"镇级行政区划",
"id": "xmxzq_1",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer",
"alpha":100
},
{
"label":"区级行政区划",
"id": "xmxzq_2",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer",
"alpha":100
}
]
},
{
"label":"现状建筑",
"id": "xzjz",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xzjz/MapServer",
"alpha":100,
"children":[
{
"label":"现状建筑",
"id": "xzjz_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xzjz/MapServer",
"alpha":100,
"fields": [ "SJLY", "PRODATE", "GXSJ", "DWMC", "AQDJ", "DWDM", "ZXDX", "ZXDY" ]
}
]
},
{
"label":"用地",
"id": "ypyd",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer",
"alpha":100,
"children":[
{
"label":"用地",
"id": "ypyd_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer",
"alpha":100
},
{
"label":"选址",
"id": "ypyd_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer",
"alpha":100
},
{
"label":"红线",
"id": "ypyd_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer",
"alpha":100
},
{
"label":"道路",
"id": "ypyd_0",
"url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer",
"alpha":100
}
]
}
]
}
]
\ No newline at end of file
<template>
<div class="gis">
<div class="gis-container" ref="main">
<div class="flex-transverse" ref="transverse">
<div id="arcgisMap0" class="flex-single"></div>
</div>
<div class="flex-vertical" ref="vertical"></div>
</div>
<el-card class="box-card">
<div v-for="( item, i ) in curr" :key="i" class="text item">
<el-row>
<el-col :span="10">
<div class="grid-content">{{ item.key }}</div>
</el-col>
<el-col :span="14">
<div class="grid-content">{{ item.value }}</div>
</el-col>
</el-row>
</div>
</el-card>
</div>
<iframe :src="'http://192.168.2.22:8020/#/' + formData.bsmZd" frameborder="0" style="width: 100%; height:710px;"></iframe>
</template>
<script>
import apiWrapper from '@union/gis-sdk';
import layerJson from '@/api/json/layer.json';
import axios from 'axios';
import { log } from 'bpmn-js-token-simulation';
export default {
props: {
formData: {
......@@ -37,107 +10,6 @@
return {}
}
}
},
data () {
return {
curr: []
}
},
mounted () {
let doc = document.querySelector('.gis');
this.$nextTick(() => {
Object.assign(doc.style, { width: + doc.clientWidth + 'px', height: '700px' });
})
},
created () {
let { special2 } = apiWrapper.thematic, { wrapper } = apiWrapper, id = this.formData.bsmZd
wrapper.reduction(special2).then(() => {
let { children } = layerJson[0].children[2], i = 0, o, name, url, { Layer } = wrapper;
for (; o = children[i]; i++) if (o.id === 'ZDJBXX' && (name = o.name) === 'zd') { url = o.url + '/' + i; break; }
Layer.createLayer([{ type: 'FeatureServer', url, name, spatial: true, visible: false }]).then(() => {
this.positioning(id, name);
});
});
},
methods: {
positioning (id, name) {
let { Layer } = apiWrapper.wrapper;
Layer.attrGraph({
grap: id, name, where: { id }, sym: { color: [0, 139, 0, 100], outline: { color: [0, 139, 0, 150], width: 2 } },
callback: d => {
d.length ? this.analysis(id) : this.$message.error(' 暂无图形');
}
});
},
analysis (id) {
let { Views, Action } = apiWrapper.wrapper;
Views.grapsExtent(id);
setTimeout(() => { Action.gighlight({ name: id, about: 1000 }) }, 1500);
axios.get(window._config.services.management + '/bdcqjdc/rest/zd/qjZdjbxx/getQjZdjbxxDetailById', { params: { id } }).then(d => {
if (d.status !== 200) return;
let { result = {} } = d.data, data = [];
Object.keys(result).forEach(e => { result[e] && data.push({ key: e, value: result[e] }) });
this.curr.splice(0, ...data);
document.querySelector('.box-card').style.display = 'block';
});
}
}
}
</script>
\ No newline at end of file
<style scoped lang="scss">
.gis-container {
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
width: 100%;
height: 100%;
}
.flex-transverse {
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
width: 100%;
height: 100%;
}
.flex-single {
width: 100%;
height: 100%;
background-color: white;
}
.box-card {
background-color: rgba(255, 255, 255, 0.5);
border-radius: 8px;
top: 30px;
right: 30px;
position: absolute;
width: 16%;
padding: 10px;
display: none;
}
.el-row {
margin-bottom: 20px;
}
.el-col {
border-radius: 4px;
}
.grid-content {
border-radius: 4px;
min-height: 20px;
font-family: "Helvetica Neue";
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
</style>
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-09 14:41:17
* @LastEditTime: 2023-08-10 09:34:25
*/
import { getPrintTemplateByCode } from "@/api/print";
import { uploadUndo } from "@/api/clxx";
......@@ -173,7 +173,7 @@ export default {
break;
// 图形定位
case "B-TXDW":
this.$popupDialog('图形定位', 'workflow/components/dialog/txdw', { bsmZd: this.bsmZd }, '80%', true)
this.$popupDialog('图形定位', 'workflow/components/dialog/txdw', { bsmZd: this.bsmZd }, '85%', true)
break;
case "back": //退回按钮
this.$popupDialog("退回", "workflow/components/th", {
......