af-mobile-client-vue3 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/img/component/location.png +0 -0
- package/src/assets/img/component/mapLayers.png +0 -0
- package/src/assets/img/component/positioning.png +0 -0
- package/src/components/data/XOlMap/README.md +178 -169
- package/src/components/data/XOlMap/XLocationPicker/index.vue +191 -0
- package/src/components/data/XOlMap/index.vue +818 -433
- package/src/components/data/XOlMap/types.ts +138 -0
- package/src/router/routes.ts +7 -1
- package/src/services/api/common.ts +2 -2
- package/src/stores/modules/user.ts +3 -3
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +120 -0
- package/src/views/component/XOlMapView/index.vue +420 -0
- package/src/views/component/XRequestView/index.vue +49 -0
- package/src/views/component/index.vue +5 -1
- package/src/views/user/login/LoginForm.vue +0 -1
- package/src/components/data/XOlMap/demo.vue +0 -330
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
3
|
+
import { showNotify } from 'vant'
|
|
4
|
+
import { onMounted, ref } from 'vue'
|
|
5
|
+
import XOlMap from '../../../components/data/XOlMap/index.vue'
|
|
6
|
+
import 'vant/lib/index.css'
|
|
7
|
+
|
|
8
|
+
const mapRef = ref()
|
|
9
|
+
|
|
10
|
+
// WMS 配置
|
|
11
|
+
const wmsConfig = {
|
|
12
|
+
layers: [
|
|
13
|
+
{
|
|
14
|
+
phoneShow: false,
|
|
15
|
+
show: false,
|
|
16
|
+
id: 1,
|
|
17
|
+
layerName: 'gis:lp',
|
|
18
|
+
value: '低压管线',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
phoneShow: true,
|
|
22
|
+
show: true,
|
|
23
|
+
id: 2,
|
|
24
|
+
layerName: 'gis:mp',
|
|
25
|
+
value: '中压管线',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
phoneShow: false,
|
|
29
|
+
show: false,
|
|
30
|
+
id: 3,
|
|
31
|
+
layerName: 'gis:surface_valve',
|
|
32
|
+
value: '地面阀门',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
phoneShow: false,
|
|
36
|
+
show: false,
|
|
37
|
+
id: 4,
|
|
38
|
+
layerName: 'gis:valve_chamber',
|
|
39
|
+
value: '阀门井',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
phoneShow: false,
|
|
43
|
+
show: false,
|
|
44
|
+
id: 6,
|
|
45
|
+
layerName: 'gis:hp',
|
|
46
|
+
value: '高压管线',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
phoneShow: false,
|
|
50
|
+
show: false,
|
|
51
|
+
id: 5,
|
|
52
|
+
layerName: 'gis:pressure_regulating_box',
|
|
53
|
+
value: '调压箱',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
wms: {
|
|
57
|
+
workspace: 'gis',
|
|
58
|
+
srs: 'EPSG:3857',
|
|
59
|
+
format: 'image/png',
|
|
60
|
+
version: '1.1.0',
|
|
61
|
+
url: '/linepatrol/geoserver/gis/wms',
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 初始化地图
|
|
66
|
+
onMounted(() => {
|
|
67
|
+
mapRef.value.init({
|
|
68
|
+
center: [108.948024, 34.263161], // 西安坐标
|
|
69
|
+
zoom: 12,
|
|
70
|
+
maxZoom: 18,
|
|
71
|
+
minZoom: 4,
|
|
72
|
+
tianDiTuKey: 'c16876b28898637c0a1a68b3fa410504',
|
|
73
|
+
})
|
|
74
|
+
mapRef.value.addWMSLayers(wmsConfig)
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// 地图控制函数
|
|
78
|
+
const handleSetCenter = () => mapRef.value.setCenter([116.404, 39.915]) // 切换到北京
|
|
79
|
+
const handleSetZoom = () => mapRef.value.setZoom(14) // 设置缩放级别为14
|
|
80
|
+
const handleGetZoom = () => showNotify({ type: 'primary', message: `当前缩放级别:${mapRef.value.getZoom()}` })
|
|
81
|
+
const handleSetCenterAndZoom = () => mapRef.value.setCenterAndZoom([120.153576, 30.287459], 15) // 切换到杭州
|
|
82
|
+
|
|
83
|
+
// 点位数据
|
|
84
|
+
const poiPoints = [
|
|
85
|
+
{
|
|
86
|
+
longitude: 108.988024,
|
|
87
|
+
latitude: 34.283161,
|
|
88
|
+
title: '大雁塔',
|
|
89
|
+
extData: { type: 'poi' },
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
longitude: 108.948024,
|
|
93
|
+
latitude: 34.263161,
|
|
94
|
+
title: '钟楼',
|
|
95
|
+
extData: { type: 'poi' },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
longitude: 108.968024,
|
|
99
|
+
latitude: 34.273161,
|
|
100
|
+
title: '小寨',
|
|
101
|
+
extData: { type: 'poi' },
|
|
102
|
+
},
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
const schoolPoints = [
|
|
106
|
+
{
|
|
107
|
+
longitude: 108.968024,
|
|
108
|
+
latitude: 34.273161,
|
|
109
|
+
title: '西安电子科技大学',
|
|
110
|
+
extData: {
|
|
111
|
+
type: 'school',
|
|
112
|
+
level: '985',
|
|
113
|
+
studentCount: 25000,
|
|
114
|
+
departments: ['通信学院', '计算机学院', '电子工程学院'],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
const hospitalPoints = [
|
|
120
|
+
{
|
|
121
|
+
longitude: 108.948024,
|
|
122
|
+
latitude: 34.263161,
|
|
123
|
+
title: '西安市第一医院',
|
|
124
|
+
extData: {
|
|
125
|
+
type: 'hospital',
|
|
126
|
+
level: '三甲',
|
|
127
|
+
departments: ['急诊科', '内科', '外科'],
|
|
128
|
+
contact: '029-12345678',
|
|
129
|
+
address: '西安市雁塔区',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
longitude: 108.978024,
|
|
134
|
+
latitude: 34.278161,
|
|
135
|
+
title: '西安市中心医院',
|
|
136
|
+
extData: {
|
|
137
|
+
type: 'hospital',
|
|
138
|
+
level: '三甲',
|
|
139
|
+
departments: ['急诊科', '内科', '外科'],
|
|
140
|
+
contact: '029-87654321',
|
|
141
|
+
address: '西安市新城区',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
// 点位处理函数
|
|
147
|
+
function handlePointClick(point: any) {
|
|
148
|
+
showNotify({
|
|
149
|
+
type: 'primary',
|
|
150
|
+
message: `点击了: ${point.title}\n类型: ${point.extData.type}`,
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// 添加点位示例
|
|
155
|
+
function handleAddPoints() {
|
|
156
|
+
mapRef.value.addPointLayer({
|
|
157
|
+
id: 1,
|
|
158
|
+
value: '学校啊啊啊',
|
|
159
|
+
show: true,
|
|
160
|
+
showInControl: false, // 不添加图层控制按钮
|
|
161
|
+
icon: 'https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png',
|
|
162
|
+
iconAnchor: [0.5, 1],
|
|
163
|
+
onClick: handlePointClick,
|
|
164
|
+
dataProvider: async () => {
|
|
165
|
+
// 模拟从API获取学校数据
|
|
166
|
+
return new Promise((resolve) => {
|
|
167
|
+
setTimeout(() => {
|
|
168
|
+
resolve([
|
|
169
|
+
{
|
|
170
|
+
longitude: 108.968024,
|
|
171
|
+
latitude: 34.273161,
|
|
172
|
+
title: '普通点位',
|
|
173
|
+
extData: {
|
|
174
|
+
type: 'school',
|
|
175
|
+
level: '985',
|
|
176
|
+
studentCount: 25000,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
])
|
|
180
|
+
}, 1000)
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 添加分类点位示例
|
|
187
|
+
function handleAddPointLayer() {
|
|
188
|
+
// 添加学校点位图层
|
|
189
|
+
mapRef.value.addPointLayer({
|
|
190
|
+
id: 1,
|
|
191
|
+
value: '学校',
|
|
192
|
+
show: true,
|
|
193
|
+
icon: 'https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
|
|
194
|
+
iconAnchor: [0.5, 1],
|
|
195
|
+
onClick: handlePointClick,
|
|
196
|
+
dataProvider: async () => {
|
|
197
|
+
// 模拟从API获取学校数据
|
|
198
|
+
return new Promise((resolve) => {
|
|
199
|
+
setTimeout(() => {
|
|
200
|
+
resolve([
|
|
201
|
+
{
|
|
202
|
+
longitude: 108.958024,
|
|
203
|
+
latitude: 34.283161,
|
|
204
|
+
title: '西安交通大学',
|
|
205
|
+
extData: {
|
|
206
|
+
type: 'school',
|
|
207
|
+
level: '985',
|
|
208
|
+
studentCount: 30000,
|
|
209
|
+
departments: ['机械学院', '电气学院', '管理学院'],
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
])
|
|
213
|
+
}, 1000)
|
|
214
|
+
})
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
// 添加医院点位图层
|
|
219
|
+
mapRef.value.addPointLayer({
|
|
220
|
+
id: 2,
|
|
221
|
+
value: '医院',
|
|
222
|
+
show: true,
|
|
223
|
+
icon: 'https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
|
|
224
|
+
iconAnchor: [0.5, 1],
|
|
225
|
+
onClick: handlePointClick,
|
|
226
|
+
dataProvider: async () => {
|
|
227
|
+
// 模拟从API获取医院数据
|
|
228
|
+
return new Promise((resolve) => {
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
resolve([
|
|
231
|
+
{
|
|
232
|
+
longitude: 108.978024,
|
|
233
|
+
latitude: 34.278161,
|
|
234
|
+
title: '西安市中心医院',
|
|
235
|
+
extData: {
|
|
236
|
+
type: 'hospital',
|
|
237
|
+
level: '三甲',
|
|
238
|
+
departments: ['急诊科', '内科', '外科'],
|
|
239
|
+
contact: '029-87654321',
|
|
240
|
+
address: '西安市新城区',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
])
|
|
244
|
+
}, 1000)
|
|
245
|
+
})
|
|
246
|
+
},
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// 添加海量点示例
|
|
251
|
+
function handleAddMassPoints() {
|
|
252
|
+
mapRef.value.addWebGLPoints({
|
|
253
|
+
id: 3,
|
|
254
|
+
value: '海量点',
|
|
255
|
+
show: true,
|
|
256
|
+
icon: 'https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png',
|
|
257
|
+
iconSize: [6, 6],
|
|
258
|
+
onClick: handlePointClick,
|
|
259
|
+
dataProvider: () => {
|
|
260
|
+
// 生成10000个随机点
|
|
261
|
+
return Array.from({ length: 10000 }, (_, index) => ({
|
|
262
|
+
longitude: 108.948024 + (Math.random() - 0.5) * 0.1,
|
|
263
|
+
latitude: 34.263161 + (Math.random() - 0.5) * 0.1,
|
|
264
|
+
title: `点位${index + 1}`,
|
|
265
|
+
extData: { type: 'mass' },
|
|
266
|
+
}))
|
|
267
|
+
},
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// 导航模式相关
|
|
272
|
+
const isNavigationMode = ref(false)
|
|
273
|
+
|
|
274
|
+
// 开启导航模式
|
|
275
|
+
function startNavigation() {
|
|
276
|
+
isNavigationMode.value = true
|
|
277
|
+
mapRef.value?.startNavigation()
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// 停止导航模式
|
|
281
|
+
function stopNavigation() {
|
|
282
|
+
isNavigationMode.value = false
|
|
283
|
+
mapRef.value?.stopNavigation()
|
|
284
|
+
}
|
|
285
|
+
</script>
|
|
286
|
+
|
|
287
|
+
<template>
|
|
288
|
+
<NormalDataLayout id="XOlMapView" title="XOlMap地图组件">
|
|
289
|
+
<template #layout_content>
|
|
290
|
+
<div class="demo-container">
|
|
291
|
+
<div class="map-container">
|
|
292
|
+
<XOlMap ref="mapRef" />
|
|
293
|
+
</div>
|
|
294
|
+
<div class="control-panel">
|
|
295
|
+
<div class="control-group">
|
|
296
|
+
<div class="group-title">
|
|
297
|
+
地图控制
|
|
298
|
+
</div>
|
|
299
|
+
<van-button type="primary" size="small" @click="handleSetCenter">
|
|
300
|
+
切换到北京
|
|
301
|
+
</van-button>
|
|
302
|
+
<van-button type="primary" size="small" @click="handleSetZoom">
|
|
303
|
+
设置缩放级别14
|
|
304
|
+
</van-button>
|
|
305
|
+
<van-button type="primary" size="small" @click="handleGetZoom">
|
|
306
|
+
获取当前缩放级别
|
|
307
|
+
</van-button>
|
|
308
|
+
<van-button type="primary" size="small" @click="handleSetCenterAndZoom">
|
|
309
|
+
切换到杭州(级别15)
|
|
310
|
+
</van-button>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<div class="control-group">
|
|
314
|
+
<div class="group-title">
|
|
315
|
+
点位示例
|
|
316
|
+
</div>
|
|
317
|
+
<van-button type="success" size="small" @click="handleAddPoints">
|
|
318
|
+
添加普通点位
|
|
319
|
+
</van-button>
|
|
320
|
+
<van-button type="success" size="small" @click="handleAddPointLayer">
|
|
321
|
+
添加分类点位
|
|
322
|
+
</van-button>
|
|
323
|
+
<van-button type="warning" size="small" @click="handleAddMassPoints">
|
|
324
|
+
添加海量点(1万)
|
|
325
|
+
</van-button>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<div class="control-group">
|
|
329
|
+
<div class="group-title">
|
|
330
|
+
导航模式测试
|
|
331
|
+
</div>
|
|
332
|
+
<van-button
|
|
333
|
+
:type="isNavigationMode ? 'danger' : 'primary'"
|
|
334
|
+
size="small"
|
|
335
|
+
@click="isNavigationMode ? stopNavigation() : startNavigation()"
|
|
336
|
+
>
|
|
337
|
+
{{ isNavigationMode ? '停止导航' : '开始导航' }}
|
|
338
|
+
</van-button>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</template>
|
|
343
|
+
</NormalDataLayout>
|
|
344
|
+
</template>
|
|
345
|
+
|
|
346
|
+
<style scoped lang="less">
|
|
347
|
+
.demo-container {
|
|
348
|
+
width: 100%;
|
|
349
|
+
height: 100%;
|
|
350
|
+
position: relative;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.map-container {
|
|
354
|
+
width: 100%;
|
|
355
|
+
height: 100%;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.control-panel {
|
|
359
|
+
position: absolute;
|
|
360
|
+
left: 10px;
|
|
361
|
+
top: 10px;
|
|
362
|
+
z-index: 1000;
|
|
363
|
+
background: white;
|
|
364
|
+
padding: 10px;
|
|
365
|
+
border-radius: 4px;
|
|
366
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
367
|
+
display: flex;
|
|
368
|
+
flex-direction: column;
|
|
369
|
+
gap: 16px;
|
|
370
|
+
|
|
371
|
+
.control-group {
|
|
372
|
+
display: flex;
|
|
373
|
+
flex-direction: column;
|
|
374
|
+
gap: 8px;
|
|
375
|
+
|
|
376
|
+
.group-title {
|
|
377
|
+
font-size: 14px;
|
|
378
|
+
font-weight: 500;
|
|
379
|
+
color: #333;
|
|
380
|
+
padding-left: 4px;
|
|
381
|
+
border-left: 3px solid #1989fa;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:deep(.van-button) {
|
|
385
|
+
margin-bottom: 8px;
|
|
386
|
+
|
|
387
|
+
&:last-child {
|
|
388
|
+
margin-bottom: 0;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
:deep(.van-button) {
|
|
394
|
+
width: 140px;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// 移动端适配
|
|
399
|
+
@media screen and (max-width: 768px) {
|
|
400
|
+
.control-panel {
|
|
401
|
+
left: 8px;
|
|
402
|
+
top: 8px;
|
|
403
|
+
padding: 8px;
|
|
404
|
+
gap: 12px;
|
|
405
|
+
|
|
406
|
+
.control-group {
|
|
407
|
+
gap: 6px;
|
|
408
|
+
|
|
409
|
+
.group-title {
|
|
410
|
+
font-size: 12px;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
:deep(.van-button) {
|
|
415
|
+
width: 120px;
|
|
416
|
+
font-size: 12px;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
</style>
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { queryProse } from '@af-mobile-client-vue3/api/mock'
|
|
3
|
+
import { getUserPermissions } from '@af-mobile-client-vue3/services/api/search'
|
|
3
4
|
import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
5
|
+
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
6
|
import { showToast, Button as VanButton, Cell as VanCell, CellGroup as VanCellGroup } from 'vant'
|
|
5
7
|
import { reactive, ref } from 'vue'
|
|
6
8
|
import { useRouter } from 'vue-router'
|
|
7
9
|
|
|
8
10
|
// 路由
|
|
9
11
|
const router = useRouter()
|
|
12
|
+
// 用户store
|
|
13
|
+
const userStore = useUserStore()
|
|
10
14
|
|
|
11
15
|
// 数据定义
|
|
12
16
|
const requestTypes = ref('GET, POST, DELETE')
|
|
13
17
|
const getResult = ref('')
|
|
14
18
|
const postResult = ref('')
|
|
19
|
+
const permissionsResult = ref('')
|
|
20
|
+
const storePermissionsResult = ref('')
|
|
15
21
|
const postData = reactive({
|
|
16
22
|
name: '',
|
|
17
23
|
value: '',
|
|
@@ -36,6 +42,31 @@ async function handleGetRequest() {
|
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
|
|
45
|
+
// 获取用户权限
|
|
46
|
+
async function handleGetPermissions() {
|
|
47
|
+
try {
|
|
48
|
+
const userInfo = userStore.getUserInfo()
|
|
49
|
+
if (!userInfo || !userInfo.id) {
|
|
50
|
+
showToast('请先登录')
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 从API获取权限
|
|
55
|
+
const permissions = await getUserPermissions(userInfo.id.toString())
|
|
56
|
+
permissionsResult.value = JSON.stringify(permissions, null, 2)
|
|
57
|
+
|
|
58
|
+
// 从Store获取权限
|
|
59
|
+
const storePermissions = userStore.getPermissions()
|
|
60
|
+
storePermissionsResult.value = JSON.stringify(storePermissions, null, 2)
|
|
61
|
+
|
|
62
|
+
showToast('获取权限成功')
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.error('获取权限失败:', error)
|
|
66
|
+
showToast('获取权限失败')
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
39
70
|
// 定义请求数据类型
|
|
40
71
|
interface RequestData {
|
|
41
72
|
name: string
|
|
@@ -118,6 +149,24 @@ const userInfo = await get<UserInfo>('/api/user/info')
|
|
|
118
149
|
</div>
|
|
119
150
|
</div>
|
|
120
151
|
|
|
152
|
+
<!-- 用户权限部分 -->
|
|
153
|
+
<div class="request-section">
|
|
154
|
+
<h3>用户权限获取</h3>
|
|
155
|
+
<VanButton type="primary" size="small" @click="handleGetPermissions">
|
|
156
|
+
获取用户权限
|
|
157
|
+
</VanButton>
|
|
158
|
+
|
|
159
|
+
<div v-if="permissionsResult" class="result-box">
|
|
160
|
+
<h4>API请求权限结果:</h4>
|
|
161
|
+
<pre>{{ permissionsResult }}</pre>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div v-if="storePermissionsResult" class="result-box">
|
|
165
|
+
<h4>Store缓存权限结果:</h4>
|
|
166
|
+
<pre>{{ storePermissionsResult }}</pre>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
121
170
|
<!-- 类型定义说明 -->
|
|
122
171
|
<div class="code-section">
|
|
123
172
|
<h3>类型定义</h3>
|
|
@@ -51,9 +51,13 @@ const list = ref([
|
|
|
51
51
|
to: '/Component/XFormAppraiseView/2/debug',
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
name: '
|
|
54
|
+
name: 'XOlMap 地图组件',
|
|
55
55
|
to: '/Component/XOlMapView',
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
name: 'XOlMap 地址选择器',
|
|
59
|
+
to: '/Component/XOlMapView/XLocationPicker',
|
|
60
|
+
},
|
|
57
61
|
{
|
|
58
62
|
name: '请求示例',
|
|
59
63
|
to: '/Component/XRequestView',
|
|
@@ -172,7 +172,6 @@ async function afterGeneral(result) {
|
|
|
172
172
|
// 如果result中没有返回 权限 需要主动获取权限列表
|
|
173
173
|
if (!result.permissions) {
|
|
174
174
|
result.permissions = await getUserPermissions(result.id)
|
|
175
|
-
console.log(result.permissions, '====')
|
|
176
175
|
}
|
|
177
176
|
userState.setPermissions(result.permissions)
|
|
178
177
|
userState.setRoles([{ id: 'admin', operation: ['add', 'edit', 'delete'] }])
|