feat:图形定位
Showing
4 changed files
with
4 additions
and
398 deletions
... | @@ -11,7 +11,6 @@ | ... | @@ -11,7 +11,6 @@ |
11 | "@antv/g2": "^4.2.8", | 11 | "@antv/g2": "^4.2.8", |
12 | "@babel/polyfill": "^7.12.1", | 12 | "@babel/polyfill": "^7.12.1", |
13 | "@riophae/vue-treeselect": "^0.4.0", | 13 | "@riophae/vue-treeselect": "^0.4.0", |
14 | "@union/gis-sdk": "^1.1.0", | ||
15 | "axios": "^0.21.1", | 14 | "axios": "^0.21.1", |
16 | "bpmn-js": "^7.4.0", | 15 | "bpmn-js": "^7.4.0", |
17 | "bpmn-js-properties-panel": "^0.37.2", | 16 | "bpmn-js-properties-panel": "^0.37.2", | ... | ... |
src/api/json/layer.json
deleted
100644 → 0
1 | [ | ||
2 | { | ||
3 | "label":"不动产", | ||
4 | "id":"1-1", | ||
5 | "alpha":100, | ||
6 | "children":[ | ||
7 | { | ||
8 | "label":"行政区划", | ||
9 | "id": "XZQH", | ||
10 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer", | ||
11 | "alpha":100, | ||
12 | "children":[ | ||
13 | { | ||
14 | "label":"行政区", | ||
15 | "id": "XZQH_0", | ||
16 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer", | ||
17 | "alpha":100 | ||
18 | }, | ||
19 | { | ||
20 | "label":"行政区界限", | ||
21 | "id": "XZQH_1", | ||
22 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/XZQH/MapServer", | ||
23 | "alpha":100 | ||
24 | } | ||
25 | ] | ||
26 | }, | ||
27 | { | ||
28 | "label":"地籍分区", | ||
29 | "id": "DJFQ", | ||
30 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer", | ||
31 | "alpha":100, | ||
32 | "children":[ | ||
33 | { | ||
34 | "label":"地籍区", | ||
35 | "id": "DJFQ_0", | ||
36 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer", | ||
37 | "alpha":100 | ||
38 | }, | ||
39 | { | ||
40 | "label":"地籍子区", | ||
41 | "id": "DJFQ_1", | ||
42 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/DJFQ/MapServer", | ||
43 | "alpha":100 | ||
44 | } | ||
45 | ] | ||
46 | }, | ||
47 | { | ||
48 | "label":"不动产单元", | ||
49 | "id": "bdcDY", | ||
50 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
51 | "alpha":100, | ||
52 | "children":[ | ||
53 | { | ||
54 | "label":"界址点", | ||
55 | "id": "bdcDY_0", | ||
56 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
57 | "alpha":100 | ||
58 | }, | ||
59 | { | ||
60 | "label":"界址线", | ||
61 | "id": "bdcDY_1", | ||
62 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
63 | "alpha":100 | ||
64 | }, | ||
65 | { | ||
66 | "label":"林权", | ||
67 | "id": "bdcDY_2", | ||
68 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
69 | "alpha":100 | ||
70 | }, | ||
71 | { | ||
72 | "label":"自然幢", | ||
73 | "id": "ZRZ", | ||
74 | "name": "zrz", | ||
75 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
76 | "alpha":100 | ||
77 | }, | ||
78 | { | ||
79 | "label":"构筑物", | ||
80 | "id": "bdcDY_4", | ||
81 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
82 | "alpha":100 | ||
83 | }, | ||
84 | { | ||
85 | "label":"点状定着物", | ||
86 | "id": "bdcDY_5", | ||
87 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
88 | "alpha":100 | ||
89 | }, | ||
90 | { | ||
91 | "label":"线状定着物", | ||
92 | "id": "bdcDY_6", | ||
93 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
94 | "alpha":100 | ||
95 | }, | ||
96 | { | ||
97 | "label":"面状定着物", | ||
98 | "id": "bdcDY_7", | ||
99 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/bdcDY_610100/MapServer", | ||
100 | "alpha":100 | ||
101 | }, | ||
102 | { | ||
103 | "label":"宗地", | ||
104 | "id": "ZDJBXX", | ||
105 | "name": "zd", | ||
106 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
107 | "alpha":100, | ||
108 | "fields": [ "YSDM", "ZDDM", "BDCDYH", "ZDTZM", "ZL", "ZDMJ", "MJDW", "QLLX", "QLXZ" ] | ||
109 | }, | ||
110 | { | ||
111 | "label":"宗地历史", | ||
112 | "id": "ZDJBXXLS", | ||
113 | "name": "zdls", | ||
114 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
115 | "alpha":100, | ||
116 | "fields": [ "YSDM", "ZDDM", "BDCDYH", "ZDTZM", "ZL", "ZDMJ", "MJDW", "QLLX", "QLXZ" ] | ||
117 | }, | ||
118 | { | ||
119 | "label":"宗海", | ||
120 | "id": "ZHJBXX", | ||
121 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/BDCDY/MapServer", | ||
122 | "alpha":100 | ||
123 | } | ||
124 | |||
125 | ] | ||
126 | }, | ||
127 | { | ||
128 | "label":"自然地理", | ||
129 | "id": "ZRDL", | ||
130 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer", | ||
131 | "alpha":100, | ||
132 | "children":[ | ||
133 | { | ||
134 | "label":"水系", | ||
135 | "id": "ZRDL_0", | ||
136 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer", | ||
137 | "alpha":100 | ||
138 | }, | ||
139 | { | ||
140 | "label":"植被", | ||
141 | "id": "ZRDL_1", | ||
142 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer", | ||
143 | "alpha":100 | ||
144 | }, | ||
145 | { | ||
146 | "label":"辅助面", | ||
147 | "id": "ZRDL_2", | ||
148 | "url": "http://192.168.2.252:6080/arcgis/rest/services/bdc/ZRDL/MapServer", | ||
149 | "alpha":100 | ||
150 | } | ||
151 | ] | ||
152 | } | ||
153 | ] | ||
154 | }, | ||
155 | { | ||
156 | "label":"厦门数据", | ||
157 | "id":"2-1", | ||
158 | "alpha":100, | ||
159 | "children":[ | ||
160 | { | ||
161 | "label":"规划用地", | ||
162 | "id": "ghyd", | ||
163 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ghyd/MapServer", | ||
164 | "alpha":100, | ||
165 | "children":[ | ||
166 | { | ||
167 | "label":"规划用地", | ||
168 | "id": "ghyd_0", | ||
169 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ghyd/MapServer", | ||
170 | "alpha":100, | ||
171 | "fields": [ "地块编号", "规划现状", "行政区", "维护文号", "规划用地性质代号", "规划用地性质名称", "所属管理单元", "所属编制单元" ] | ||
172 | } | ||
173 | ] | ||
174 | }, | ||
175 | { | ||
176 | "label":"基本农田", | ||
177 | "id": "jbnt", | ||
178 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/jbnt/MapServer", | ||
179 | "alpha":100, | ||
180 | "children":[ | ||
181 | { | ||
182 | "label":"基本农田", | ||
183 | "id": "jbnt_0", | ||
184 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/jbnt/MapServer", | ||
185 | "alpha":100, | ||
186 | "fields": [ "编制单位", "权属单位代码", "权属单位名称", "座落单位代码", "座落单位名称", "地类名称", "基本农田面积" ] | ||
187 | } | ||
188 | ] | ||
189 | }, | ||
190 | { | ||
191 | "label":"行政区划", | ||
192 | "id": "xmxzq", | ||
193 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer", | ||
194 | "alpha":100, | ||
195 | "children":[ | ||
196 | { | ||
197 | "label":"村级行政区划", | ||
198 | "id": "xmxzq_0", | ||
199 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer", | ||
200 | "alpha":100 | ||
201 | }, | ||
202 | { | ||
203 | "label":"镇级行政区划", | ||
204 | "id": "xmxzq_1", | ||
205 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer", | ||
206 | "alpha":100 | ||
207 | }, | ||
208 | { | ||
209 | "label":"区级行政区划", | ||
210 | "id": "xmxzq_2", | ||
211 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xmxzq/MapServer", | ||
212 | "alpha":100 | ||
213 | } | ||
214 | ] | ||
215 | }, | ||
216 | { | ||
217 | "label":"现状建筑", | ||
218 | "id": "xzjz", | ||
219 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xzjz/MapServer", | ||
220 | "alpha":100, | ||
221 | "children":[ | ||
222 | { | ||
223 | "label":"现状建筑", | ||
224 | "id": "xzjz_0", | ||
225 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/xzjz/MapServer", | ||
226 | "alpha":100, | ||
227 | "fields": [ "SJLY", "PRODATE", "GXSJ", "DWMC", "AQDJ", "DWDM", "ZXDX", "ZXDY" ] | ||
228 | } | ||
229 | ] | ||
230 | }, | ||
231 | { | ||
232 | "label":"用地", | ||
233 | "id": "ypyd", | ||
234 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer", | ||
235 | "alpha":100, | ||
236 | "children":[ | ||
237 | { | ||
238 | "label":"用地", | ||
239 | "id": "ypyd_0", | ||
240 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer", | ||
241 | "alpha":100 | ||
242 | }, | ||
243 | { | ||
244 | "label":"选址", | ||
245 | "id": "ypyd_0", | ||
246 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer", | ||
247 | "alpha":100 | ||
248 | }, | ||
249 | { | ||
250 | "label":"红线", | ||
251 | "id": "ypyd_0", | ||
252 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer", | ||
253 | "alpha":100 | ||
254 | }, | ||
255 | { | ||
256 | "label":"道路", | ||
257 | "id": "ypyd_0", | ||
258 | "url": "http://192.168.2.252:6080/arcgis/rest/services/xiamen/ypyd/MapServer", | ||
259 | "alpha":100 | ||
260 | } | ||
261 | ] | ||
262 | } | ||
263 | ] | ||
264 | } | ||
265 | ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | <template> | 1 | <template> |
2 | <div class="gis"> | 2 | <iframe :src="'http://192.168.2.22:8020/#/' + formData.bsmZd" frameborder="0" style="width: 100%; height:710px;"></iframe> |
3 | <div class="gis-container" ref="main"> | ||
4 | <div class="flex-transverse" ref="transverse"> | ||
5 | <div id="arcgisMap0" class="flex-single"></div> | ||
6 | </div> | ||
7 | <div class="flex-vertical" ref="vertical"></div> | ||
8 | </div> | ||
9 | |||
10 | <el-card class="box-card"> | ||
11 | <div v-for="( item, i ) in curr" :key="i" class="text item"> | ||
12 | <el-row> | ||
13 | <el-col :span="10"> | ||
14 | <div class="grid-content">{{ item.key }}</div> | ||
15 | </el-col> | ||
16 | <el-col :span="14"> | ||
17 | <div class="grid-content">{{ item.value }}</div> | ||
18 | </el-col> | ||
19 | </el-row> | ||
20 | </div> | ||
21 | </el-card> | ||
22 | </div> | ||
23 | </template> | 3 | </template> |
24 | |||
25 | <script> | 4 | <script> |
26 | |||
27 | import apiWrapper from '@union/gis-sdk'; | ||
28 | import layerJson from '@/api/json/layer.json'; | ||
29 | import axios from 'axios'; | ||
30 | import { log } from 'bpmn-js-token-simulation'; | ||
31 | |||
32 | export default { | 5 | export default { |
33 | props: { | 6 | props: { |
34 | formData: { | 7 | formData: { |
... | @@ -37,107 +10,6 @@ | ... | @@ -37,107 +10,6 @@ |
37 | return {} | 10 | return {} |
38 | } | 11 | } |
39 | } | 12 | } |
40 | }, | ||
41 | data () { | ||
42 | return { | ||
43 | curr: [] | ||
44 | } | ||
45 | }, | ||
46 | mounted () { | ||
47 | let doc = document.querySelector('.gis'); | ||
48 | this.$nextTick(() => { | ||
49 | Object.assign(doc.style, { width: + doc.clientWidth + 'px', height: '700px' }); | ||
50 | }) | ||
51 | }, | ||
52 | created () { | ||
53 | let { special2 } = apiWrapper.thematic, { wrapper } = apiWrapper, id = this.formData.bsmZd | ||
54 | wrapper.reduction(special2).then(() => { | ||
55 | let { children } = layerJson[0].children[2], i = 0, o, name, url, { Layer } = wrapper; | ||
56 | for (; o = children[i]; i++) if (o.id === 'ZDJBXX' && (name = o.name) === 'zd') { url = o.url + '/' + i; break; } | ||
57 | |||
58 | Layer.createLayer([{ type: 'FeatureServer', url, name, spatial: true, visible: false }]).then(() => { | ||
59 | this.positioning(id, name); | ||
60 | }); | ||
61 | }); | ||
62 | }, | ||
63 | methods: { | ||
64 | positioning (id, name) { | ||
65 | let { Layer } = apiWrapper.wrapper; | ||
66 | Layer.attrGraph({ | ||
67 | grap: id, name, where: { id }, sym: { color: [0, 139, 0, 100], outline: { color: [0, 139, 0, 150], width: 2 } }, | ||
68 | callback: d => { | ||
69 | d.length ? this.analysis(id) : this.$message.error(' 暂无图形'); | ||
70 | } | ||
71 | }); | ||
72 | }, | ||
73 | analysis (id) { | ||
74 | |||
75 | let { Views, Action } = apiWrapper.wrapper; | ||
76 | Views.grapsExtent(id); | ||
77 | setTimeout(() => { Action.gighlight({ name: id, about: 1000 }) }, 1500); | ||
78 | |||
79 | axios.get(window._config.services.management + '/bdcqjdc/rest/zd/qjZdjbxx/getQjZdjbxxDetailById', { params: { id } }).then(d => { | ||
80 | if (d.status !== 200) return; | ||
81 | let { result = {} } = d.data, data = []; | ||
82 | Object.keys(result).forEach(e => { result[e] && data.push({ key: e, value: result[e] }) }); | ||
83 | this.curr.splice(0, ...data); | ||
84 | document.querySelector('.box-card').style.display = 'block'; | ||
85 | }); | ||
86 | } | ||
87 | } | 13 | } |
88 | } | 14 | } |
89 | 15 | </script> | |
90 | </script> | ||
91 | |||
92 | <style scoped lang="scss"> | ||
93 | .gis-container { | ||
94 | display: -webkit-flex; | ||
95 | display: flex; | ||
96 | -webkit-flex-wrap: wrap; | ||
97 | flex-wrap: wrap; | ||
98 | width: 100%; | ||
99 | height: 100%; | ||
100 | } | ||
101 | |||
102 | .flex-transverse { | ||
103 | display: -webkit-flex; | ||
104 | display: flex; | ||
105 | -webkit-flex-wrap: wrap; | ||
106 | flex-wrap: wrap; | ||
107 | width: 100%; | ||
108 | height: 100%; | ||
109 | } | ||
110 | |||
111 | .flex-single { | ||
112 | width: 100%; | ||
113 | height: 100%; | ||
114 | background-color: white; | ||
115 | } | ||
116 | |||
117 | .box-card { | ||
118 | background-color: rgba(255, 255, 255, 0.5); | ||
119 | border-radius: 8px; | ||
120 | top: 30px; | ||
121 | right: 30px; | ||
122 | position: absolute; | ||
123 | width: 16%; | ||
124 | padding: 10px; | ||
125 | display: none; | ||
126 | } | ||
127 | |||
128 | .el-row { | ||
129 | margin-bottom: 20px; | ||
130 | } | ||
131 | .el-col { | ||
132 | border-radius: 4px; | ||
133 | } | ||
134 | .grid-content { | ||
135 | border-radius: 4px; | ||
136 | min-height: 20px; | ||
137 | font-family: "Helvetica Neue"; | ||
138 | } | ||
139 | .row-bg { | ||
140 | padding: 10px 0; | ||
141 | background-color: #f9fafc; | ||
142 | } | ||
143 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-08-09 14:41:17 | 4 | * @LastEditTime: 2023-08-10 09:34:25 |
5 | */ | 5 | */ |
6 | import { getPrintTemplateByCode } from "@/api/print"; | 6 | import { getPrintTemplateByCode } from "@/api/print"; |
7 | import { uploadUndo } from "@/api/clxx"; | 7 | import { uploadUndo } from "@/api/clxx"; |
... | @@ -173,7 +173,7 @@ export default { | ... | @@ -173,7 +173,7 @@ export default { |
173 | break; | 173 | break; |
174 | // 图形定位 | 174 | // 图形定位 |
175 | case "B-TXDW": | 175 | case "B-TXDW": |
176 | this.$popupDialog('图形定位', 'workflow/components/dialog/txdw', { bsmZd: this.bsmZd }, '80%', true) | 176 | this.$popupDialog('图形定位', 'workflow/components/dialog/txdw', { bsmZd: this.bsmZd }, '85%', true) |
177 | break; | 177 | break; |
178 | case "back": //退回按钮 | 178 | case "back": //退回按钮 |
179 | this.$popupDialog("退回", "workflow/components/th", { | 179 | this.$popupDialog("退回", "workflow/components/th", { | ... | ... |
-
Please register or sign in to post a comment